From c2da2fbe12af7f7769b1e98fa858f58bf6c746f8 Mon Sep 17 00:00:00 2001 From: zrguo <49157727+LarFii@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:19:28 +0800 Subject: [PATCH] build --- .../api/webui/assets/_basePickBy-D3PHsJjq.js | 1 - .../api/webui/assets/_basePickBy-enj1kD1i.js | 1 + ...Uniq-CtAZZJ8e.js => _baseUniq-DHoNBBvA.js} | 2 +- .../architectureDiagram-IEHRJDOE-Bou3pEJo.js | 36 - .../architectureDiagram-NQ2NVSRB-C5lQ6TdU.js | 36 + .../assets/blockDiagram-JOT3LUYC-BxXXNv1O.js | 121 --- .../assets/blockDiagram-PHRCVELO-BX1-QuFh.js | 122 +++ ...T-jk.js => c4Diagram-6F6E4RAY-B6hTg9H8.js} | 4 +- ...CAhtCpmT.js => chunk-353BL4L5-Dc2iugoC.js} | 2 +- ...CGaqGId9.js => chunk-67H74DCK-Bze2qmzX.js} | 2 +- .../webui/assets/chunk-6OLS64BW-DUM-o2FJ.js | 220 ++++++ ...c4P7PYPk.js => chunk-AACKK3MU-Bulquadc.js} | 2 +- .../webui/assets/chunk-AEK57VVT-gQ4j2jcG.js | 220 ------ .../webui/assets/chunk-BFAMUDN2-DUbWdDRU.js | 1 + .../webui/assets/chunk-E2GYISFI-DBdOi329.js | 15 + ...B91iiasA.js => chunk-QEP2MXWD-iMxqHW1H.js} | 7 +- .../webui/assets/chunk-RZ5BOZE2-B615FLH4.js | 1 - .../webui/assets/chunk-SKB7J2MH-CncvyOyo.js | 1 + .../assets/classDiagram-BGRH5UQR-B1ZwhQup.js | 1 + .../assets/classDiagram-GIVACNV2-DBTA8XwB.js | 1 - .../classDiagram-v2-COTLJTTW-DBTA8XwB.js | 1 - .../classDiagram-v2-O24JOBDK-B1ZwhQup.js | 1 + lightrag/api/webui/assets/clone-DMtoZDWc.js | 1 + lightrag/api/webui/assets/clone-Dm5jEAXQ.js | 1 - .../webui/assets/cytoscape.esm-CfBqOv7Q.js | 191 ----- .../webui/assets/cytoscape.esm-DjuLyO2d.js | 331 ++++++++ ...CqR4Poz4.js => dagre-FFZHY6LT-ByNd4rXI.js} | 4 +- .../webui/assets/diagram-3EMPZRKU-CJIrRTbX.js | 24 + .../webui/assets/diagram-5UYTHUR4-BI5BPMV3.js | 24 + .../webui/assets/diagram-SSKATNLV-pBYsrik-.js | 43 -- .../webui/assets/diagram-VNBRO52H-Bu64Jus9.js | 24 - .../webui/assets/diagram-ZTM2IBQH-DdeCcMoF.js | 43 ++ ...3B4h.js => erDiagram-R3QVA2FD-Pi_9scwm.js} | 4 +- ...3sUnM.js => feature-documents-C5UJveNV.js} | 2 +- .../webui/assets/feature-graph-D68hhnYC.js | 702 +++++++++++++++++ .../webui/assets/feature-graph-NODQb6qW.js | 709 ------------------ .../assets/feature-retrieval-D7g3nMgj.js | 10 + .../assets/feature-retrieval-DalFy9WB.js | 10 - .../assets/flowDiagram-4HSFHLVR-DZNySYxV.js | 161 ---- .../assets/flowDiagram-PKI6S5ZS-Ry-v0Q5g.js | 162 ++++ .../assets/ganttDiagram-APWFNJXF-GWTNv7FR.js | 257 ------- .../assets/ganttDiagram-EK5VF46D-Bxc01I9z.js | 267 +++++++ .../gitGraphDiagram-7IBYFJ6S-BXUpvPAf.js | 65 -- .../gitGraphDiagram-GW3U2K7C-tvjpfBbf.js | 65 ++ .../{graph-BLnbmvfZ.js => graph-C9TLhZpq.js} | 2 +- ...r-B-X5JegA.js => graph-vendor-BC3frDkq.js} | 24 +- lightrag/api/webui/assets/index-1Hy45NwC.js | 263 ------- lightrag/api/webui/assets/index-BKeDSElW.js | 3 + lightrag/api/webui/assets/index-BXW7ZC7b.css | 1 + lightrag/api/webui/assets/index-DYCpH32b.js | 151 ++++ lightrag/api/webui/assets/index-DwO2XWaU.css | 1 - lightrag/api/webui/assets/index-yRRg2BZk.js | 151 ---- .../assets/infoDiagram-PH2N3AL5-DAtlRRqj.js | 2 - .../assets/infoDiagram-XT3IWWJI-BuuxTqr8.js | 2 + .../journeyDiagram-EWQZEKCU-yZAKQsFS.js | 139 ++++ .../journeyDiagram-U35MCT3I-BscxFTBa.js | 138 ---- ...=> kanban-definition-ILFWEQ3N-zK-xSLMv.js} | 21 +- lightrag/api/webui/assets/katex-DCmpTppl.js | 261 ------- ...{layout-DsT4215v.js => layout-CSejuzzT.js} | 2 +- .../webui/assets/markdown-vendor-7kCcHxQn.js | 308 ++++++++ .../webui/assets/markdown-vendor-DmIvJdn7.js | 49 -- .../webui/assets/mermaid-vendor-D0f_SE0h.js | 213 ------ .../webui/assets/mermaid-vendor-DOoA-Fcm.js | 213 ++++++ ...> mindmap-definition-CZNETY7S-CrKQy-YF.js} | 4 +- ...Eu_.js => pieDiagram-NIOCPIFQ-CwcVShaD.js} | 2 +- ...s => quadrantDiagram-2OG54O6I-C2wGvonb.js} | 2 +- .../webui/assets/radar-MK3ICKWK-DOAXm8cx.js | 128 ---- .../api/webui/assets/react-vendor-CgPb4pW_.js | 19 + .../api/webui/assets/react-vendor-DEwriMA6.js | 28 - .../requirementDiagram-KVF5MWMF-lKW1n5a1.js | 64 -- .../requirementDiagram-SO3GGRV7-DBB4gQhP.js | 64 ++ ....js => sankeyDiagram-4UZDY2LN-CYCZYo1y.js} | 6 +- .../sequenceDiagram-X6HHIX6F-ByOWqALm.js | 122 --- .../sequenceDiagram-ZIKVLSP4-oO1T3_CU.js | 122 +++ .../assets/stateDiagram-DGXRK772-DjKMsne-.js | 1 - .../assets/stateDiagram-XX37X6EN-CH0H6nhR.js | 1 + .../stateDiagram-v2-GD6S3NHB-CxRIz5En.js | 1 + .../stateDiagram-v2-YXO3MK2T-sVx8nHiu.js | 1 - .../timeline-definition-BDJGKUSR-FwPl5FEj.js | 61 -- .../timeline-definition-RI47OAVP-wbT62k2j.js | 61 ++ .../webui/assets/treemap-6Y5VK53G-DD2bKuQl.js | 128 ++++ .../api/webui/assets/ui-vendor-CeCm8EER.js | 53 -- .../api/webui/assets/ui-vendor-DaJTMqwy.js | 53 ++ .../api/webui/assets/utils-vendor-BysuhMZA.js | 6 - .../api/webui/assets/utils-vendor-elCzPYZl.js | 6 + .../xychartDiagram-H2YORKM3-DP9uyfob.js | 7 + .../xychartDiagram-VJFVF3MP-BHnqzGXj.js | 7 - lightrag/api/webui/index.html | 52 +- lightrag/api/webui/logo.svg | 2 +- .../components/retrieval/QuerySettings.tsx | 86 ++- 90 files changed, 3446 insertions(+), 3483 deletions(-) delete mode 100644 lightrag/api/webui/assets/_basePickBy-D3PHsJjq.js create mode 100644 lightrag/api/webui/assets/_basePickBy-enj1kD1i.js rename lightrag/api/webui/assets/{_baseUniq-CtAZZJ8e.js => _baseUniq-DHoNBBvA.js} (82%) delete mode 100644 lightrag/api/webui/assets/architectureDiagram-IEHRJDOE-Bou3pEJo.js create mode 100644 lightrag/api/webui/assets/architectureDiagram-NQ2NVSRB-C5lQ6TdU.js delete mode 100644 lightrag/api/webui/assets/blockDiagram-JOT3LUYC-BxXXNv1O.js create mode 100644 lightrag/api/webui/assets/blockDiagram-PHRCVELO-BX1-QuFh.js rename lightrag/api/webui/assets/{c4Diagram-VJAJSXHY-BpY1T-jk.js => c4Diagram-6F6E4RAY-B6hTg9H8.js} (76%) rename lightrag/api/webui/assets/{chunk-4BMEZGHF-CAhtCpmT.js => chunk-353BL4L5-Dc2iugoC.js} (78%) rename lightrag/api/webui/assets/{chunk-D6G4REZN-CGaqGId9.js => chunk-67H74DCK-Bze2qmzX.js} (80%) create mode 100644 lightrag/api/webui/assets/chunk-6OLS64BW-DUM-o2FJ.js rename lightrag/api/webui/assets/{chunk-XZIHB7SX-c4P7PYPk.js => chunk-AACKK3MU-Bulquadc.js} (67%) delete mode 100644 lightrag/api/webui/assets/chunk-AEK57VVT-gQ4j2jcG.js create mode 100644 lightrag/api/webui/assets/chunk-BFAMUDN2-DUbWdDRU.js create mode 100644 lightrag/api/webui/assets/chunk-E2GYISFI-DBdOi329.js rename lightrag/api/webui/assets/{chunk-A2AXSNBT-B91iiasA.js => chunk-QEP2MXWD-iMxqHW1H.js} (67%) delete mode 100644 lightrag/api/webui/assets/chunk-RZ5BOZE2-B615FLH4.js create mode 100644 lightrag/api/webui/assets/chunk-SKB7J2MH-CncvyOyo.js create mode 100644 lightrag/api/webui/assets/classDiagram-BGRH5UQR-B1ZwhQup.js delete mode 100644 lightrag/api/webui/assets/classDiagram-GIVACNV2-DBTA8XwB.js delete mode 100644 lightrag/api/webui/assets/classDiagram-v2-COTLJTTW-DBTA8XwB.js create mode 100644 lightrag/api/webui/assets/classDiagram-v2-O24JOBDK-B1ZwhQup.js create mode 100644 lightrag/api/webui/assets/clone-DMtoZDWc.js delete mode 100644 lightrag/api/webui/assets/clone-Dm5jEAXQ.js delete mode 100644 lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js create mode 100644 lightrag/api/webui/assets/cytoscape.esm-DjuLyO2d.js rename lightrag/api/webui/assets/{dagre-OKDRZEBW-CqR4Poz4.js => dagre-FFZHY6LT-ByNd4rXI.js} (82%) create mode 100644 lightrag/api/webui/assets/diagram-3EMPZRKU-CJIrRTbX.js create mode 100644 lightrag/api/webui/assets/diagram-5UYTHUR4-BI5BPMV3.js delete mode 100644 lightrag/api/webui/assets/diagram-SSKATNLV-pBYsrik-.js delete mode 100644 lightrag/api/webui/assets/diagram-VNBRO52H-Bu64Jus9.js create mode 100644 lightrag/api/webui/assets/diagram-ZTM2IBQH-DdeCcMoF.js rename lightrag/api/webui/assets/{erDiagram-Q7BY3M3F-BTmP3B4h.js => erDiagram-R3QVA2FD-Pi_9scwm.js} (59%) rename lightrag/api/webui/assets/{feature-documents-oks3sUnM.js => feature-documents-C5UJveNV.js} (99%) create mode 100644 lightrag/api/webui/assets/feature-graph-D68hhnYC.js delete mode 100644 lightrag/api/webui/assets/feature-graph-NODQb6qW.js create mode 100644 lightrag/api/webui/assets/feature-retrieval-D7g3nMgj.js delete mode 100644 lightrag/api/webui/assets/feature-retrieval-DalFy9WB.js delete mode 100644 lightrag/api/webui/assets/flowDiagram-4HSFHLVR-DZNySYxV.js create mode 100644 lightrag/api/webui/assets/flowDiagram-PKI6S5ZS-Ry-v0Q5g.js delete mode 100644 lightrag/api/webui/assets/ganttDiagram-APWFNJXF-GWTNv7FR.js create mode 100644 lightrag/api/webui/assets/ganttDiagram-EK5VF46D-Bxc01I9z.js delete mode 100644 lightrag/api/webui/assets/gitGraphDiagram-7IBYFJ6S-BXUpvPAf.js create mode 100644 lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-tvjpfBbf.js rename lightrag/api/webui/assets/{graph-BLnbmvfZ.js => graph-C9TLhZpq.js} (94%) rename lightrag/api/webui/assets/{graph-vendor-B-X5JegA.js => graph-vendor-BC3frDkq.js} (66%) delete mode 100644 lightrag/api/webui/assets/index-1Hy45NwC.js create mode 100644 lightrag/api/webui/assets/index-BKeDSElW.js create mode 100644 lightrag/api/webui/assets/index-BXW7ZC7b.css create mode 100644 lightrag/api/webui/assets/index-DYCpH32b.js delete mode 100644 lightrag/api/webui/assets/index-DwO2XWaU.css delete mode 100644 lightrag/api/webui/assets/index-yRRg2BZk.js delete mode 100644 lightrag/api/webui/assets/infoDiagram-PH2N3AL5-DAtlRRqj.js create mode 100644 lightrag/api/webui/assets/infoDiagram-XT3IWWJI-BuuxTqr8.js create mode 100644 lightrag/api/webui/assets/journeyDiagram-EWQZEKCU-yZAKQsFS.js delete mode 100644 lightrag/api/webui/assets/journeyDiagram-U35MCT3I-BscxFTBa.js rename lightrag/api/webui/assets/{kanban-definition-NDS4AKOZ-QESEl0tA.js => kanban-definition-ILFWEQ3N-zK-xSLMv.js} (59%) delete mode 100644 lightrag/api/webui/assets/katex-DCmpTppl.js rename lightrag/api/webui/assets/{layout-DsT4215v.js => layout-CSejuzzT.js} (90%) create mode 100644 lightrag/api/webui/assets/markdown-vendor-7kCcHxQn.js delete mode 100644 lightrag/api/webui/assets/markdown-vendor-DmIvJdn7.js delete mode 100644 lightrag/api/webui/assets/mermaid-vendor-D0f_SE0h.js create mode 100644 lightrag/api/webui/assets/mermaid-vendor-DOoA-Fcm.js rename lightrag/api/webui/assets/{mindmap-definition-ALO5MXBD-aQwMTShx.js => mindmap-definition-CZNETY7S-CrKQy-YF.js} (99%) rename lightrag/api/webui/assets/{pieDiagram-IB7DONF6-D6N6SEu_.js => pieDiagram-NIOCPIFQ-CwcVShaD.js} (69%) rename lightrag/api/webui/assets/{quadrantDiagram-7GDLP6J5-COkzo7lS.js => quadrantDiagram-2OG54O6I-C2wGvonb.js} (99%) delete mode 100644 lightrag/api/webui/assets/radar-MK3ICKWK-DOAXm8cx.js create mode 100644 lightrag/api/webui/assets/react-vendor-CgPb4pW_.js delete mode 100644 lightrag/api/webui/assets/react-vendor-DEwriMA6.js delete mode 100644 lightrag/api/webui/assets/requirementDiagram-KVF5MWMF-lKW1n5a1.js create mode 100644 lightrag/api/webui/assets/requirementDiagram-SO3GGRV7-DBB4gQhP.js rename lightrag/api/webui/assets/{sankeyDiagram-QLVOVGJD-BqECU7xS.js => sankeyDiagram-4UZDY2LN-CYCZYo1y.js} (96%) delete mode 100644 lightrag/api/webui/assets/sequenceDiagram-X6HHIX6F-ByOWqALm.js create mode 100644 lightrag/api/webui/assets/sequenceDiagram-ZIKVLSP4-oO1T3_CU.js delete mode 100644 lightrag/api/webui/assets/stateDiagram-DGXRK772-DjKMsne-.js create mode 100644 lightrag/api/webui/assets/stateDiagram-XX37X6EN-CH0H6nhR.js create mode 100644 lightrag/api/webui/assets/stateDiagram-v2-GD6S3NHB-CxRIz5En.js delete mode 100644 lightrag/api/webui/assets/stateDiagram-v2-YXO3MK2T-sVx8nHiu.js delete mode 100644 lightrag/api/webui/assets/timeline-definition-BDJGKUSR-FwPl5FEj.js create mode 100644 lightrag/api/webui/assets/timeline-definition-RI47OAVP-wbT62k2j.js create mode 100644 lightrag/api/webui/assets/treemap-6Y5VK53G-DD2bKuQl.js delete mode 100644 lightrag/api/webui/assets/ui-vendor-CeCm8EER.js create mode 100644 lightrag/api/webui/assets/ui-vendor-DaJTMqwy.js delete mode 100644 lightrag/api/webui/assets/utils-vendor-BysuhMZA.js create mode 100644 lightrag/api/webui/assets/utils-vendor-elCzPYZl.js create mode 100644 lightrag/api/webui/assets/xychartDiagram-H2YORKM3-DP9uyfob.js delete mode 100644 lightrag/api/webui/assets/xychartDiagram-VJFVF3MP-BHnqzGXj.js diff --git a/lightrag/api/webui/assets/_basePickBy-D3PHsJjq.js b/lightrag/api/webui/assets/_basePickBy-D3PHsJjq.js deleted file mode 100644 index f23cedcb..00000000 --- a/lightrag/api/webui/assets/_basePickBy-D3PHsJjq.js +++ /dev/null @@ -1 +0,0 @@ -import{e as v,c as b,g as m,k as O,h as P,j as p,l as w,m as c,n as x,t as A,o as N}from"./_baseUniq-CtAZZJ8e.js";import{aU as g,aq as _,aV as $,aW as E,aX as F,aY as I,aZ as M,a_ as y,a$ as B,b0 as T}from"./mermaid-vendor-D0f_SE0h.js";var S=/\s/;function q(n){for(var r=n.length;r--&&S.test(n.charAt(r)););return r}var G=/^\s+/;function H(n){return n&&n.slice(0,q(n)+1).replace(G,"")}var o=NaN,L=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,W=/^0o[0-7]+$/i,X=parseInt;function Y(n){if(typeof n=="number")return n;if(v(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=H(n);var t=R.test(n);return t||W.test(n)?X(n.slice(2),t?2:8):L.test(n)?o:+n}var z=1/0,C=17976931348623157e292;function K(n){if(!n)return n===0?n:0;if(n=Y(n),n===z||n===-1/0){var r=n<0?-1:1;return r*C}return n===n?n:0}function U(n){var r=K(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?b(n):[]}var l=Object.prototype,Z=l.hasOwnProperty,dn=_(function(n,r){n=Object(n);var t=-1,e=r.length,a=e>2?r[2]:void 0;for(a&&$(r[0],r[1],a)&&(e=1);++t-1?a[f?r[i]:i]:void 0}}var J=Math.max;function Q(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var a=t==null?0:U(t);return a<0&&(a=J(e+a,0)),P(n,m(r),a)}var hn=D(Q);function V(n,r){var t=-1,e=I(n)?Array(n.length):[];return p(n,function(a,f,i){e[++t]=r(a,f,i)}),e}function gn(n,r){var t=M(n)?w:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&c(n,r,nn)}function rn(n,r){return n2?r[2]:void 0;for(a&&E(r[0],r[1],a)&&(i=1);++t-1?a[f?r[e]:e]:void 0}}var U=Math.max;function Z(n,r,t){var i=n==null?0:n.length;if(!i)return-1;var a=t==null?0:D(t);return a<0&&(a=U(i+a,0)),p(n,b(r),a)}var hn=Q(Z);function V(n,r){var t=-1,i=I(n)?Array(n.length):[];return w(n,function(a,f,e){i[++t]=r(a,f,e)}),i}function gn(n,r){var t=B(n)?c:V;return t(n,b(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function bn(n,r){return n!=null&&A(n,r,nn)}function rn(n,r){return n-1}function $(n){return sn(n)?xn(n):mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=Mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function m(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new I:void 0;for(i.set(n,r),i.set(r,n);++o=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new I}else u=r?[]:s;n:for(;++t-1}function _(n){return sn(n)?xn(n):mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=Mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function m(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new I:void 0;for(i.set(n,r),i.set(r,n);++o=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new I}else u=r?[]:s;n:for(;++ts?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i},function(A,G,L){var u=L(0);function l(){}for(var n in u)l[n]=u[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=l},function(A,G,L){function u(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},A.exports=u},function(A,G,L){var u=L(2),l=L(10),n=L(0),r=L(7),e=L(3),f=L(1),i=L(13),g=L(12),t=L(11);function s(c,h,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var v=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof e){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),v,d=T.length,N=0;N-1&&P>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(M,1),v.target!=v.source&&v.target.edges.splice(P,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,v,d,N=this.getNodes(),S=N.length,M=0;MT&&(c=T),h>v&&(h=v)}return c==l.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,v=l.MAX_VALUE,d=-l.MAX_VALUE,N,S,M,P,K,X=this.nodes,k=X.length,D=0;DN&&(h=N),TM&&(v=M),dN&&(h=N),TM&&(v=M),d=this.nodes.length){var k=0;T.forEach(function(D){D.owner==c&&k++}),k==this.nodes.length&&(this.isConnected=!0)}},A.exports=s},function(A,G,L){var u,l=L(1);function n(r){u=L(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,e,f,i,g){if(f==null&&i==null&&g==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{g=f,i=e,f=r;var t=i.getOwner(),s=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,g);if(f.isInterGraph=!0,f.source=i,f.target=g,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(r){if(r instanceof u){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var i,g=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(e[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(e[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*e[0],s=e[1]/g;e[0]t)return e[0]=f,e[1]=o,e[2]=g,e[3]=X,!1;if(ig)return e[0]=s,e[1]=i,e[2]=P,e[3]=t,!1;if(fg?(e[0]=h,e[1]=T,a=!0):(e[0]=c,e[1]=o,a=!0):p===y&&(f>g?(e[0]=s,e[1]=o,a=!0):(e[0]=v,e[1]=T,a=!0)),-E===y?g>f?(e[2]=K,e[3]=X,m=!0):(e[2]=P,e[3]=M,m=!0):E===y&&(g>f?(e[2]=S,e[3]=M,m=!0):(e[2]=k,e[3]=X,m=!0)),a&&m)return!1;if(f>g?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!a)switch(I){case 1:W=o,R=f+-N/y,e[0]=R,e[1]=W;break;case 2:R=v,W=i+d*y,e[0]=R,e[1]=W;break;case 3:W=T,R=f+N/y,e[0]=R,e[1]=W;break;case 4:R=h,W=i+-d*y,e[0]=R,e[1]=W;break}if(!m)switch(w){case 1:q=M,x=g+-rt/y,e[2]=x,e[3]=q;break;case 2:x=k,q=t+D*y,e[2]=x,e[3]=q;break;case 3:q=X,x=g+rt/y,e[2]=x,e[3]=q;break;case 4:x=K,q=t+-D*y,e[2]=x,e[3]=q;break}}return!1},l.getCardinalDirection=function(n,r,e){return n>r?e:1+e%4},l.getIntersection=function(n,r,e,f){if(f==null)return this.getIntersection2(n,r,e);var i=n.x,g=n.y,t=r.x,s=r.y,o=e.x,c=e.y,h=f.x,T=f.y,v=void 0,d=void 0,N=void 0,S=void 0,M=void 0,P=void 0,K=void 0,X=void 0,k=void 0;return N=s-g,M=i-t,K=t*g-i*s,S=T-c,P=o-h,X=h*c-o*T,k=N*P-S*M,k===0?null:(v=(M*X-P*K)/k,d=(S*K-N*X)/k,new u(v,d))},l.angleOfVector=function(n,r,e,f){var i=void 0;return n!==e?(i=Math.atan((f-r)/(e-n)),e=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),v=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:v>=0&&v<=1?[v]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,A.exports=l},function(A,G,L){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},A.exports=u},function(A,G,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u},function(A,G,L){var u=function(){function i(g,t){for(var s=0;s"u"?"undefined":u(n);return n==null||r!="object"&&r!="function"},A.exports=l},function(A,G,L){function u(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c0&&c;){for(N.push(M[0]);N.length>0&&c;){var P=N[0];N.splice(0,1),d.add(P);for(var K=P.getEdges(),v=0;v-1&&M.splice(rt,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),v=0;v0){for(var T=this.edgeToDummyNodes.get(h),v=0;v=0&&c.splice(X,1);var k=S.getNeighborsList();k.forEach(function(a){if(h.indexOf(a)<0){var m=T.get(a),p=m-1;p==1&&P.push(a),T.set(a,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(v=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s},function(A,G,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u},function(A,G,L){var u=L(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/e),r},l.prototype.transformY=function(n){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/e),r},l.prototype.inverseTransformX=function(n){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/e),r},l.prototype.inverseTransformY=function(n){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/e),r},l.prototype.inverseTransformPoint=function(n){var r=new u(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},A.exports=l},function(A,G,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,v=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(v>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=v.length||N>=v[0].length)){for(var S=0;Si}}]),e}();A.exports=r},function(A,G,L){function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,i=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;V--){if(function(Nt,Mt){return Nt&&Mt}(V0;){var J=void 0,Rt=void 0;for(J=a-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+_*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===a-2)Rt=4;else{var Lt=void 0;for(Lt=a-1;Lt>=J&&Lt!==J;Lt--){var vt=(Lt!==a?Math.abs(r[Lt]):0)+(Lt!==J+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===J?Rt=3:Lt===a-1?Rt=1:(Rt=2,J=Lt)}switch(J++,Rt){case 1:{var it=r[a-2];r[a-2]=0;for(var gt=a-2;gt>=J;gt--){var Tt=u.hypot(this.s[gt],it),At=this.s[gt]/Tt,Dt=it/Tt;this.s[gt]=Tt,gt!==J&&(it=-Dt*r[gt-1],r[gt-1]=At*r[gt-1]);for(var mt=0;mt=this.s[J+1]);){var Ct=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Ct,JMath.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},A.exports=u},function(A,G,L){var u=function(){function r(e,f){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=e,this.sequence2=f,this.match_score=i,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;e--){var f=this.listeners[e];f.event===n&&f.callback===r&&this.listeners.splice(e,1)}},l.emit=function(n,r){for(var e=0;e{var G={45:(n,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),n.exports=f},806:(n,r,e)=>{var f=e(551).FDLayoutConstants;function i(){}for(var g in f)i[g]=f[g];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,n.exports=i},767:(n,r,e)=>{var f=e(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var g in f)i[g]=f[g];n.exports=i},880:(n,r,e)=>{var f=e(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var g in f)i[g]=f[g];n.exports=i},578:(n,r,e)=>{var f=e(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var g in f)i[g]=f[g];n.exports=i},765:(n,r,e)=>{var f=e(551).FDLayout,i=e(578),g=e(880),t=e(991),s=e(767),o=e(806),c=e(902),h=e(551).FDLayoutConstants,T=e(551).LayoutConstants,v=e(551).Point,d=e(551).PointD,N=e(551).DimensionD,S=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,K=e(551).LGraph,X=e(551).Transform,k=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var a=new i(this);return this.graphManager=a,a},D.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},D.prototype.newNode=function(a){return new t(this.graphManager,a)},D.prototype.newEdge=function(a){return new s(null,null,a)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[H],O[H]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(B)||(a.nodesInRelativeHorizontal.push(B),a.nodeToRelativeConstraintMapHorizontal.set(B,[]),a.dummyToNodeForVerticalAlignment.has(B)?a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(B).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(_)||(a.nodesInRelativeVertical.push(_),a.nodeToRelativeConstraintMapVertical.set(_,[]),a.dummyToNodeForHorizontalAlignment.has(_)?a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(_).getCenterY())),a.nodesInRelativeVertical.includes(lt)||(a.nodesInRelativeVertical.push(lt),a.nodeToRelativeConstraintMapVertical.set(lt,[]),a.dummyToNodeForHorizontalAlignment.has(lt)?a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(lt).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push(B):q.set(H,[B]),q.has(B)?q.get(B).push(H):q.set(B,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(lt):V.set(_,[lt]),V.has(lt)?V.get(lt).push(_):V.set(lt,[_])}});var Y=function(H,B){var _=[],lt=[],J=new k,Rt=new Set,Lt=0;return H.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var gt=it;for(J.push(gt),Rt.add(gt),_[Lt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(lt[Lt]=!0);var Tt=H.get(gt);Tt.forEach(function(At){Rt.has(At)||(J.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=Y(q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=Y(V,a.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=a.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(a,m,p){var E=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=K.calculateBounds(a),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w1;){var B=H[0];H.splice(0,1);var _=V.indexOf(B);_>=0&&V.splice(_,1),z--,Y--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var lt=Math.abs(E-p)/Y,J=O;et!=Y;J=++J%z){var Rt=V[J].getOtherEnd(a);if(Rt!=m){var Lt=(p+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,a,Lt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(a){for(var m=M.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;a.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(a.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,a.idToDummyNode[x]=V;var Y=a.getGraphManager().add(a.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;zy?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=a.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;a.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,R)})},D.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=a.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),p=0,E=0;Eq&&(q=Y.rect.height)}p+=q+a.verticalPadding}},D.prototype.tileCompoundMembers=function(a,m){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(a[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(a,m){var p=this.tileNodesByFavoringDim(a,m,!0),E=this.tileNodesByFavoringDim(a,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),Y;m?(Y=Math.ceil(V),Y==V&&Y++):Y=Math.floor(V);var et=Y*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(a,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(a,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};a.sort(function(z,O){var H=W;return w.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V0&&(w+=a.horizontalPadding),a.rowWidth[p]=w,a.width0&&(R+=a.verticalPadding);var W=0;R>a.rowHeight[p]&&(W=a.rowHeight[p],a.rowHeight[p]=R,W=a.rowHeight[p]-W),a.height+=W,a.rows[p].push(m)},D.prototype.getShortestRowIndex=function(a){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=a.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(a,m,p){if(a.idealRowWidth){var E=a.rows.length-1,y=a.rowWidth[E];return y+m+a.horizontalPadding<=a.idealRowWidth}var I=this.getShortestRowIndex(a);if(I<0)return!0;var w=a.rowWidth[I];if(w+a.horizontalPadding+m<=a.width)return!0;var R=0;a.rowHeight[I]0&&(R=p+a.verticalPadding-a.rowHeight[I]);var W;a.width-w>=m+a.horizontalPadding?W=(a.height+R)/(w+m+a.horizontalPadding):W=(a.height+R)/a.width,R=p+a.verticalPadding;var x;return a.widthI&&m!=p){E.splice(-1,1),a.rows[p].push(y),a.rowWidth[m]=a.rowWidth[m]-I,a.rowWidth[p]=a.rowWidth[p]+I,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=a.verticalPadding);var W=a.rowHeight[m]+a.rowHeight[p];a.rowHeight[m]=w,a.rowHeight[p]0)for(var et=y;et<=I;et++)Y[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)Y[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=M.MAX_VALUE,O,H,B=0;B{var f=e(551).FDLayoutNode,i=e(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,v.has(ht)?d[v.get(ht)]:Z.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,v.has(ht)?N[v.get(ht)]:Z.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){Q.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=v.has(ht)?d[v.get(ht)]:Z.get(ht):ct+=v.has(ht)?N[v.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw Zt}}var de=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+de)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,Q=0,Z=0,nt=0;if(b.forEach(function(j){j.left?d[v.get(j.left)]-d[v.get(j.right)]>=0?$++:Q++:N[v.get(j.top)]-N[v.get(j.bottom)]>=0?Z++:nt++}),$>Q&&Z>nt)for(var ut=0;utQ)for(var ot=0;otnt)for(var tt=0;tt1)h.fixedNodeConstraint.forEach(function(F,b){E[b]=[F.position.x,F.position.y],y[b]=[d[v.get(F.nodeId)],N[v.get(F.nodeId)]]}),I=!0;else if(h.alignmentConstraint)(function(){var F=0;if(h.alignmentConstraint.vertical){for(var b=h.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[v.get(dt.values().next().value)]:wt=k(j).x,b[tt].forEach(function(yt){E[F]=[wt,N[v.get(yt)]],y[F]=[d[v.get(yt)],N[v.get(yt)]],F++})},Q=0;Q0?wt=d[v.get(dt.values().next().value)]:wt=k(j).y,Z[tt].forEach(function(yt){E[F]=[d[v.get(yt)],wt],y[F]=[d[v.get(yt)],N[v.get(yt)]],F++})},ut=0;utV&&(V=q[et].length,Y=et);if(V0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(F,b){var $={x:d[v.get(F.nodeId)],y:N[v.get(F.nodeId)]},Q=F.position,Z=X(Q,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(F,b){d[b]+=mt.x}),N.forEach(function(F,b){N[b]+=mt.y}),h.fixedNodeConstraint.forEach(function(F){d[v.get(F.nodeId)]=F.position.x,N[v.get(F.nodeId)]=F.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var xt=h.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(nt){$.add(nt)});var Q=new Set([].concat(f($)).filter(function(nt){return R.has(nt)})),Z=void 0;Q.size>0?Z=d[v.get(Q.values().next().value)]:Z=k($).x,$.forEach(function(nt){R.has(nt)||(d[v.get(nt)]=Z)})},Vt=0;Vt0?Z=N[v.get(Q.values().next().value)]:Z=k($).y,$.forEach(function(nt){R.has(nt)||(N[v.get(nt)]=Z)})},bt=0;bt{n.exports=A}},L={};function u(n){var r=L[n];if(r!==void 0)return r.exports;var e=L[n]={exports:{}};return G[n](e,e.exports,u),e.exports}var l=u(45);return l})()})}(fe)),fe.exports}var vr=le.exports,Re;function pr(){return Re||(Re=1,function(C,U){(function(G,L){C.exports=L(dr())})(vr,function(A){return(()=>{var G={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),i=1;i{var f=function(){function t(s,o){var c=[],h=!0,T=!1,v=void 0;try{for(var d=s[Symbol.iterator](),N;!(h=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));h=!0);}catch(S){T=!0,v=S}finally{try{!h&&d.return&&d.return()}finally{if(T)throw v}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=e(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var w=0;w1){N=v[0],S=N.connectedEdges().length,v.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),K),X},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,S=void 0;try{for(var M=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var K=P.value,X=f(K,2),k=X[0],D=X[1],rt=o.cy.getElementById(k);if(rt){var a=rt.boundingBox(),m=s.xCoords[D]-a.w/2,p=s.xCoords[D]+a.w/2,E=s.yCoords[D]-a.h/2,y=s.yCoords[D]+a.h/2;mh&&(h=p),Ev&&(v=y)}}}catch(x){N=!0,S=x}finally{try{!d&&M.return&&M.return()}finally{if(N)throw S}}var I=t.x-(h+c)/2,w=t.y-(v+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],V=q.getRect().x,Y=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;Vh&&(h=Y),etv&&(v=z)});var R=t.x-(h+c)/2,W=t.y-(v+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,S=void 0,M=void 0,P=void 0,K=t.descendants().not(":parent"),X=K.length,k=0;kN&&(h=N),TM&&(v=M),d{var f=e(548),i=e(140).CoSELayout,g=e(140).CoSENode,t=e(140).layoutBase.PointD,s=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,h=e(140).CoSEConstants,T=function(d,N){var S=d.cy,M=d.eles,P=M.nodes(),K=M.edges(),X=void 0,k=void 0,D=void 0,rt={};d.randomize&&(X=N.nodeIndexes,k=N.xCoords,D=N.yCoords);var a=function(x){return typeof x=="function"},m=function(x,q){return a(x)?x(q):x},p=f.calcParentsWithoutChildren(S,M),E=function W(x,q,V,Y){for(var et=q.length,z=0;z0){var J=void 0;J=V.getGraphManager().add(V.newGraph(),B),W(J,H,V,Y)}}},y=function(x,q,V){for(var Y=0,et=0,z=0;z0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/et:a(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),y(w,R,K),I(w,d),w.runLayout(),rt};n.exports={coseLayout:T}},212:(n,r,e)=>{var f=function(){function d(N,S){for(var M=0;M0)if(p){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,X.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,Tt){w.merge(vt.nodes()[Tt]),gt.isParent()||(V.nodeIndexes.set(vt.nodes()[Tt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),X.push(V);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),X.splice(Y[z],1),rt.splice(Y[z],1)}}D.forEach(function(vt,it){M.eles=vt,k.push(h(M,X[it])),t.relocateComponent(rt[it],k[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],X[it],M)});var O=new Set;if(D.length>1){var H=[],B=K.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(M.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=gt.get(Dt.id()),Tt.nodes.push({x:X[it].xCoords[At]-Dt.boundingbox().w/2,y:X[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else k[it][Dt.id()]&&Tt.nodes.push({x:k[it][Dt.id()].getLeft(),y:k[it][Dt.id()].getTop(),width:k[it][Dt.id()].getWidth(),height:k[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=gt.get(mt.id()),Vt=gt.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,X[it].xCoords,X[it].yCoords,gt);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(X[it].xCoords[St]),Xt.push(X[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(X[it].xCoords[Vt]),Ut.push(X[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else k[it][mt.id()]&&k[it][xt.id()]&&Tt.edges.push({startX:k[it][mt.id()].getCenterX(),startY:k[it][mt.id()].getCenterY(),endX:k[it][xt.id()].getCenterX(),endY:k[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(H.push(Tt),O.add(it))}});var _=m.packComponents(H,M.randomize).shifts;if(M.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(k[vt]).forEach(function(it){var gt=k[vt][it];gt.setCenter(gt.getCenterX()+_[lt].dx,gt.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var y=o(M);X.push(y)}M.quality=="default"||M.quality=="proof"?(k.push(h(M,X[0])),t.relocateComponent(rt[0],k[0],M)):t.relocateComponent(rt[0],X[0],M)}var J=function(it,gt){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=gt);var Tt=void 0,At=void 0,Dt=it.data("id");return k.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return X.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,K),Lt=K.filter(function(vt){return vt.css("display")=="none"});M.eles=K.not(Lt),K.nodes().not(":parent").not(Lt).layoutPositions(S,M,J),Rt.length>0&&Rt.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();n.exports=v},657:(n,r,e)=>{var f=e(548),i=e(140).layoutBase.Matrix,g=e(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),v=h.nodes(":parent"),d=new Map,N=new Map,S=new Map,M=[],P=[],K=[],X=[],k=[],D=[],rt=[],a=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,W=function(){for(var b=0,$=0,Q=!1;$=nt;){ot=Z[nt++];for(var It=M[ot],ft=0;ftdt&&(dt=k[Ct],wt=Ct)}return wt},q=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(S.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=N.get(b),Q=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?Q=S.get(Z):Q=Z,M[$].push(Q),M[N.get(Q)].push(b)})},vt=!0,it=!1,gt=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(F){it=!0,gt=F}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw gt}}m=N.size;var mt=void 0;if(m>2){R=m{var f=e(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&i(cytoscape),n.exports=i},140:n=>{n.exports=A}},L={};function u(n){var r=L[n];if(r!==void 0)return r.exports;var e=L[n]={exports:{}};return G[n](e,e.exports,u),e.exports}var l=u(579);return l})()})}(le)),le.exports}var yr=pr();const Er=fr(yr);var Se={L:"left",R:"right",T:"top",B:"bottom"},Fe={L:at(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:at(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:at(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:at(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:at((C,U)=>C-U+2,"L"),R:at((C,U)=>C-2,"R"),T:at((C,U)=>C-U+2,"T"),B:at((C,U)=>C-2,"B")},mr=at(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=at(function(C){const U=C;return U==="L"||U==="R"||U==="T"||U==="B"},"isArchitectureDirection"),zt=at(function(C){const U=C;return U==="L"||U==="R"},"isArchitectureDirectionX"),Qt=at(function(C){const U=C;return U==="T"||U==="B"},"isArchitectureDirectionY"),Ce=at(function(C,U){const A=zt(C)&&Qt(U),G=Qt(C)&&zt(U);return A||G},"isArchitectureDirectionXY"),Tr=at(function(C){const U=C[0],A=C[1],G=zt(U)&&Qt(A),L=Qt(U)&&zt(A);return G||L},"isArchitecturePairXY"),Nr=at(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),Te=at(function(C,U){const A=`${C}${U}`;return Nr(A)?A:void 0},"getArchitectureDirectionPair"),Lr=at(function([C,U],A){const G=A[0],L=A[1];return zt(G)?Qt(L)?[C+(G==="L"?-1:1),U+(L==="T"?1:-1)]:[C+(G==="L"?-1:1),U]:zt(L)?[C+(L==="L"?1:-1),U+(G==="T"?1:-1)]:[C,U+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=at(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Mr=at(function(C,U){return Ce(C,U)?"bend":zt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ar=at(function(C){return C.type==="service"},"isArchitectureService"),wr=at(function(C){return C.type==="junction"},"isArchitectureJunction"),Ue=at(C=>C.data(),"edgeData"),ae=at(C=>C.data(),"nodeData"),Ye=nr.architecture,pt=new hr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ye,dataStructures:void 0,elements:{}})),Or=at(()=>{pt.reset(),rr()},"clear"),Dr=at(function({id:C,icon:U,in:A,title:G,iconText:L}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:U,iconText:L,title:G,edges:[],in:A}},"addService"),xr=at(()=>Object.values(pt.records.nodes).filter(Ar),"getServices"),Ir=at(function({id:C,in:U}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:U}},"addJunction"),Rr=at(()=>Object.values(pt.records.nodes).filter(wr),"getJunctions"),Sr=at(()=>Object.values(pt.records.nodes),"getNodes"),Ne=at(C=>pt.records.nodes[C],"getNode"),Fr=at(function({id:C,icon:U,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:U,title:G,in:A}},"addGroup"),br=at(()=>Object.values(pt.records.groups),"getGroups"),Pr=at(function({lhsId:C,rhsId:U,lhsDir:A,rhsDir:G,lhsInto:L,rhsInto:u,lhsGroup:l,rhsGroup:n,title:r}){if(!be(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${U}. Expected (L,R,T,B) got ${A}`);if(!be(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${U}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[U]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${U}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[U].in;if(l&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&f&&e==f)throw new Error(`The right-hand id [${U}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:C,lhsDir:A,lhsInto:L,lhsGroup:l,rhsId:U,rhsDir:G,rhsInto:u,rhsGroup:n,title:r};pt.records.edges.push(i),pt.records.nodes[C]&&pt.records.nodes[U]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[U].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Gr=at(()=>pt.records.edges,"getEdges"),Ur=at(()=>{if(pt.records.dataStructures===void 0){const C={},U=Object.entries(pt.records.nodes).reduce((n,[r,e])=>(n[r]=e.edges.reduce((f,i)=>{var s,o;const g=(s=Ne(i.lhsId))==null?void 0:s.in,t=(o=Ne(i.rhsId))==null?void 0:o.in;if(g&&t&&g!==t){const c=Mr(i.lhsDir,i.rhsDir);c!=="bend"&&(C[g]??(C[g]={}),C[g][t]=c,C[t]??(C[t]={}),C[t][g]=c)}if(i.lhsId===r){const c=Te(i.lhsDir,i.rhsDir);c&&(f[c]=i.rhsId)}else{const c=Te(i.rhsDir,i.lhsDir);c&&(f[c]=i.lhsId)}return f},{}),n),{}),A=Object.keys(U)[0],G={[A]:1},L=Object.keys(U).reduce((n,r)=>r===A?n:{...n,[r]:1},{}),u=at(n=>{const r={[n]:[0,0]},e=[n];for(;e.length>0;){const f=e.shift();if(f){G[f]=1,delete L[f];const i=U[f],[g,t]=r[f];Object.entries(i).forEach(([s,o])=>{G[o]||(r[o]=Lr([g,t],s),e.push(o))})}}return r},"BFS"),l=[u(A)];for(;Object.keys(L).length>0;)l.push(u(Object.keys(L)[0]));pt.records.dataStructures={adjList:U,spatialMaps:l,groupAlignments:C}}return pt.records.dataStructures},"getDataStructures"),Yr=at((C,U)=>{pt.records.elements[C]=U},"setElementForId"),Xr=at(C=>pt.records.elements[C],"getElementById"),ue={clear:Or,setDiagramTitle:_e,getDiagramTitle:je,setAccTitle:Ke,getAccTitle:Qe,setAccDescription:Je,getAccDescription:qe,addService:Dr,getServices:xr,addJunction:Ir,getJunctions:Rr,getNodes:Sr,getNode:Ne,addGroup:Fr,getGroups:br,addEdge:Pr,getEdges:Gr,setElementForId:Yr,getElementById:Xr,getDataStructures:Ur};function Pt(C){const U=ge().architecture;return U!=null&&U[C]?U[C]:Ye[C]}at(Pt,"getConfigField");var Hr=at((C,U)=>{sr(C,U),C.groups.map(U.addGroup),C.services.map(A=>U.addService({...A,type:"service"})),C.junctions.map(A=>U.addJunction({...A,type:"junction"})),C.edges.map(U.addEdge)},"populateDb"),Wr={parse:at(async C=>{const U=await lr("architecture",C);Pe.debug(U),Hr(U,ue)},"parse")},Vr=at(C=>` - .edge { - stroke-width: ${C.archEdgeWidth}; - stroke: ${C.archEdgeColor}; - fill: none; - } - - .arrow { - fill: ${C.archEdgeArrowColor}; - } - - .node-bkg { - fill: none; - stroke: ${C.archGroupBorderColor}; - stroke-width: ${C.archGroupBorderWidth}; - stroke-dasharray: 8; - } - .node-icon-text { - display: flex; - align-items: center; - } - - .node-icon-text > div { - color: #fff; - margin: 1px; - height: fit-content; - text-align: center; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - } -`,"getStyles"),zr=Vr,ne=at(C=>`${C}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ne('')},server:{body:ne('')},disk:{body:ne('')},internet:{body:ne('')},cloud:{body:ne('')},unknown:or,blank:{body:ne("")}}},Br=at(async function(C,U){const A=Pt("padding"),G=Pt("iconSize"),L=G/2,u=G/6,l=u/2;await Promise.all(U.edges().map(async n=>{var P,K;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:i,target:g,targetDir:t,targetArrow:s,targetGroup:o,label:c}=Ue(n);let{x:h,y:T}=n[0].sourceEndpoint();const{x:v,y:d}=n[0].midpoint();let{x:N,y:S}=n[0].targetEndpoint();const M=A+4;if(i&&(zt(e)?h+=e==="L"?-M:M:T+=e==="T"?-M:M+18),o&&(zt(t)?N+=t==="L"?-M:M:S+=t==="T"?-M:M+18),!i&&((P=ue.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?h+=e==="L"?L:-L:T+=e==="T"?L:-L),!o&&((K=ue.getNode(g))==null?void 0:K.type)==="junction"&&(zt(t)?N+=t==="L"?L:-L:S+=t==="T"?L:-L),n[0]._private.rscratch){const X=C.insert("g");if(X.insert("path").attr("d",`M ${h},${T} L ${v},${d} L${N},${S} `).attr("class","edge"),f){const k=zt(e)?he[e](h,u):h-l,D=Qt(e)?he[e](T,u):T-l;X.insert("polygon").attr("points",Fe[e](u)).attr("transform",`translate(${k},${D})`).attr("class","arrow")}if(s){const k=zt(t)?he[t](N,u):N-l,D=Qt(t)?he[t](S,u):S-l;X.insert("polygon").attr("points",Fe[t](u)).attr("transform",`translate(${k},${D})`).attr("class","arrow")}if(c){const k=Ce(e,t)?"XY":zt(e)?"X":"Y";let D=0;k==="X"?D=Math.abs(h-N):k==="Y"?D=Math.abs(T-S)/1.5:D=Math.abs(h-N)/2;const rt=X.append("g");if(await Le(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},ge()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),k==="X")rt.attr("transform","translate("+v+", "+d+")");else if(k==="Y")rt.attr("transform","translate("+v+", "+d+") rotate(-90)");else if(k==="XY"){const a=Te(e,t);if(a&&Tr(a)){const m=rt.node().getBoundingClientRect(),[p,E]=Cr(a);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*E*45})`);const y=rt.node().getBoundingClientRect();rt.attr("transform",` - translate(${v}, ${d-m.height/2}) - translate(${p*y.width/2}, ${E*y.height/2}) - rotate(${-1*p*E*45}, 0, ${m.height/2}) - `)}}}}}))},"drawEdges"),$r=at(async function(C,U){const G=Pt("padding")*.75,L=Pt("fontSize"),l=Pt("iconSize")/2;await Promise.all(U.nodes().map(async n=>{const r=ae(n);if(r.type==="group"){const{h:e,w:f,x1:i,y1:g}=n.boundingBox();C.append("rect").attr("x",i+l).attr("y",g+l).attr("width",f).attr("height",e).attr("class","node-bkg");const t=C.append("g");let s=i,o=g;if(r.icon){const c=t.append("g");c.html(`${await me(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(s+l+1)+", "+(o+l+1)+")"),s+=G,o+=L/2-1-2}if(r.label){const c=t.append("g");await Le(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},ge()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(s+l+4)+", "+(o+l+2)+")")}}}))},"drawGroups"),Zr=at(async function(C,U,A){for(const G of A){const L=U.append("g"),u=Pt("iconSize");if(G.title){const e=L.append("g");await Le(e,G.title,{useHtmlLabels:!1,width:u*1.5,classes:"architecture-service-label"},ge()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+u/2+", "+u+")")}const l=L.append("g");if(G.icon)l.html(`${await me(G.icon,{height:u,width:u,fallbackPrefix:oe.prefix})}`);else if(G.iconText){l.html(`${await me("blank",{height:u,width:u,fallbackPrefix:oe.prefix})}`);const i=l.append("g").append("foreignObject").attr("width",u).attr("height",u).append("div").attr("class","node-icon-text").attr("style",`height: ${u}px;`).append("div").html(G.iconText),g=parseInt(window.getComputedStyle(i.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;i.attr("style",`-webkit-line-clamp: ${Math.floor((u-2)/g)};`)}else l.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${u} v${-u} q0,-5 5,-5 h${u} q5,0 5,5 v${u} H0 Z`);L.attr("class","architecture-service");const{width:n,height:r}=L._groups[0][0].getBBox();G.width=n,G.height=r,C.setElementForId(G.id,L)}return 0},"drawServices"),kr=at(function(C,U,A){A.forEach(G=>{const L=U.append("g"),u=Pt("iconSize");L.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",u).attr("height",u),L.attr("class","architecture-junction");const{width:n,height:r}=L._groups[0][0].getBBox();L.width=n,L.height=r,C.setElementForId(G.id,L)})},"drawJunctions");ar([{name:oe.prefix,icons:oe}]);Ge.use(Er);function Xe(C,U){C.forEach(A=>{U.add({group:"nodes",data:{type:"service",id:A.id,icon:A.icon,label:A.title,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}at(Xe,"addServices");function He(C,U){C.forEach(A=>{U.add({group:"nodes",data:{type:"junction",id:A.id,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}at(He,"addJunctions");function We(C,U){U.nodes().map(A=>{const G=ae(A);if(G.type==="group")return;G.x=A.position().x,G.y=A.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}at(We,"positionNodes");function Ve(C,U){C.forEach(A=>{U.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}at(Ve,"addGroups");function ze(C,U){C.forEach(A=>{const{lhsId:G,rhsId:L,lhsInto:u,lhsGroup:l,rhsInto:n,lhsDir:r,rhsDir:e,rhsGroup:f,title:i}=A,g=Ce(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${G}-${L}`,label:i,source:G,sourceDir:r,sourceArrow:u,sourceGroup:l,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:L,targetDir:e,targetArrow:n,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};U.add({group:"edges",data:t,classes:g})})}at(ze,"addEdges");function Be(C,U,A){const G=at((n,r)=>Object.entries(n).reduce((e,[f,i])=>{var s;let g=0;const t=Object.entries(i);if(t.length===1)return e[f]=t[0][1],e;for(let o=0;o{const r={},e={};return Object.entries(n).forEach(([f,[i,g]])=>{var s,o,c;const t=((s=C.getNode(f))==null?void 0:s.in)??"default";r[g]??(r[g]={}),(o=r[g])[t]??(o[t]=[]),r[g][t].push(f),e[i]??(e[i]={}),(c=e[i])[t]??(c[t]=[]),e[i][t].push(f)}),{horiz:Object.values(G(r,"horizontal")).filter(f=>f.length>1),vert:Object.values(G(e,"vertical")).filter(f=>f.length>1)}}),[u,l]=L.reduce(([n,r],{horiz:e,vert:f})=>[[...n,...e],[...r,...f]],[[],[]]);return{horizontal:u,vertical:l}}at(Be,"getAlignments");function $e(C){const U=[],A=at(L=>`${L[0]},${L[1]}`,"posToStr"),G=at(L=>L.split(",").map(u=>parseInt(u)),"strToPos");return C.forEach(L=>{const u=Object.fromEntries(Object.entries(L).map(([e,f])=>[A(f),e])),l=[A([0,0])],n={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;l.length>0;){const e=l.shift();if(e){n[e]=1;const f=u[e];if(f){const i=G(e);Object.entries(r).forEach(([g,t])=>{const s=A([i[0]+t[0],i[1]+t[1]]),o=u[s];o&&!n[s]&&(l.push(s),U.push({[Se[g]]:o,[Se[mr(g)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),U}at($e,"getRelativeConstraints");function Ze(C,U,A,G,L,{spatialMaps:u,groupAlignments:l}){return new Promise(n=>{const r=ir("body").append("div").attr("id","cy").attr("style","display:none"),e=Ge({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});r.remove(),Ve(A,e),Xe(C,e),He(U,e),ze(G,e);const f=Be(L,u,l),i=$e(u),g=e.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[s,o]=t.connectedNodes(),{parent:c}=ae(s),{parent:h}=ae(o);return c===h?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(t){const[s,o]=t.connectedNodes(),{parent:c}=ae(s),{parent:h}=ae(o);return c===h?.45:.001},alignmentConstraint:f,relativePlacementConstraint:i});g.one("layoutstop",()=>{var s;function t(o,c,h,T){let v,d;const{x:N,y:S}=o,{x:M,y:P}=c;d=(T-S+(N-h)*(S-P)/(N-M))/Math.sqrt(1+Math.pow((S-P)/(N-M),2)),v=Math.sqrt(Math.pow(T-S,2)+Math.pow(h-N,2)-Math.pow(d,2));const K=Math.sqrt(Math.pow(M-N,2)+Math.pow(P-S,2));v=v/K;let X=(M-N)*(T-S)-(P-S)*(h-N);switch(!0){case X>=0:X=1;break;case X<0:X=-1;break}let k=(M-N)*(h-N)+(P-S)*(T-S);switch(!0){case k>=0:k=1;break;case k<0:k=-1;break}return d=Math.abs(d)*X,v=v*k,{distances:d,weights:v}}at(t,"getSegmentWeights"),e.startBatch();for(const o of Object.values(e.edges()))if((s=o.data)!=null&&s.call(o)){const{x:c,y:h}=o.source().position(),{x:T,y:v}=o.target().position();if(c!==T&&h!==v){const d=o.sourceEndpoint(),N=o.targetEndpoint(),{sourceDir:S}=Ue(o),[M,P]=Qt(S)?[d.x,N.y]:[N.x,d.y],{weights:K,distances:X}=t(d,N,M,P);o.style("segment-distances",X),o.style("segment-weights",K)}}e.endBatch(),g.run()}),g.run(),e.ready(t=>{Pe.info("Ready",t),n(e)})})}at(Ze,"layoutArchitecture");var qr=at(async(C,U,A,G)=>{const L=G.db,u=L.getServices(),l=L.getJunctions(),n=L.getGroups(),r=L.getEdges(),e=L.getDataStructures(),f=tr(U),i=f.append("g");i.attr("class","architecture-edges");const g=f.append("g");g.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Zr(L,g,u),kr(L,g,l);const s=await Ze(u,l,n,r,L,e);await Br(i,s),await $r(t,s),We(L,s),er(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),Jr={draw:qr},li={parser:Wr,db:ue,renderer:Jr,styles:zr};export{li as diagram}; diff --git a/lightrag/api/webui/assets/architectureDiagram-NQ2NVSRB-C5lQ6TdU.js b/lightrag/api/webui/assets/architectureDiagram-NQ2NVSRB-C5lQ6TdU.js new file mode 100644 index 00000000..05774a29 --- /dev/null +++ b/lightrag/api/webui/assets/architectureDiagram-NQ2NVSRB-C5lQ6TdU.js @@ -0,0 +1,36 @@ +import{_ as nt,g as Je,s as Qe,a as Ke,b as je,t as _e,q as tr,K as er,a3 as rr,F as ir,G as ar,H as nr,z as or,l as Pe,ad as Ne,c as Le,aB as Ee,d as sr,aC as hr,aD as lr}from"./mermaid-vendor-DOoA-Fcm.js";import{p as fr}from"./chunk-353BL4L5-Dc2iugoC.js";import{I as cr}from"./chunk-AACKK3MU-Bulquadc.js";import{p as gr}from"./treemap-6Y5VK53G-DD2bKuQl.js";import{c as Ge}from"./cytoscape.esm-DjuLyO2d.js";import{g as ur}from"./react-vendor-CgPb4pW_.js";import"./feature-graph-D68hhnYC.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";import"./_baseUniq-DHoNBBvA.js";import"./_basePickBy-enj1kD1i.js";import"./clone-DMtoZDWc.js";var le={exports:{}},fe={exports:{}},ce={exports:{}},dr=ce.exports,xe;function vr(){return xe||(xe=1,function(C,X){(function(G,L){C.exports=L()})(dr,function(){return function(A){var G={};function L(g){if(G[g])return G[g].exports;var l=G[g]={i:g,l:!1,exports:{}};return A[g].call(l.exports,l,l.exports,L),l.l=!0,l.exports}return L.m=A,L.c=G,L.i=function(g){return g},L.d=function(g,l,a){L.o(g,l)||Object.defineProperty(g,l,{configurable:!1,enumerable:!0,get:a})},L.n=function(g){var l=g&&g.__esModule?function(){return g.default}:function(){return g};return L.d(l,"a",l),l},L.o=function(g,l){return Object.prototype.hasOwnProperty.call(g,l)},L.p="",L(L.s=28)}([function(A,G,L){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g},function(A,G,L){var g=L(2),l=L(8),a=L(9);function r(f,i,u){g.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=i}r.prototype=Object.create(g.prototype);for(var e in g)r[e]=g[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,i){for(var u=this.getOtherEnd(f),t=i.getGraphManager().getRoot();;){if(u.getOwner()==i)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,G,L){function g(l){this.vGraphObject=l}A.exports=g},function(A,G,L){var g=L(2),l=L(10),a=L(13),r=L(0),e=L(16),f=L(5);function i(t,s,o,c){o==null&&c==null&&(c=s),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}i.prototype=Object.create(g.prototype);for(var u in g)i[u]=g[u];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;hs?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i},function(A,G,L){var g=L(0);function l(){}for(var a in g)l[a]=g[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=l},function(A,G,L){function g(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(l){this.x=l},g.prototype.setY=function(l){this.y=l},g.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},A.exports=g},function(A,G,L){var g=L(2),l=L(10),a=L(0),r=L(7),e=L(3),f=L(1),i=L(13),u=L(12),t=L(11);function s(c,h,T){g.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(g.prototype);for(var o in g)s[o]=g[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var v=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof e){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),v,d=T.length,N=0;N-1&&P>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(M,1),v.target!=v.source&&v.target.edges.splice(P,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,v,d,N=this.getNodes(),S=N.length,M=0;MT&&(c=T),h>v&&(h=v)}return c==l.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,v=l.MAX_VALUE,d=-l.MAX_VALUE,N,S,M,P,K,Y=this.nodes,k=Y.length,D=0;DN&&(h=N),TM&&(v=M),dN&&(h=N),TM&&(v=M),d=this.nodes.length){var k=0;T.forEach(function(D){D.owner==c&&k++}),k==this.nodes.length&&(this.isConnected=!0)}},A.exports=s},function(A,G,L){var g,l=L(1);function a(r){g=L(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,e,f,i,u){if(f==null&&i==null&&u==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{u=f,i=e,f=r;var t=i.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,u);if(f.isInterGraph=!0,f.source=i,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var i,u=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(e[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(e[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var u=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(u=1);var t=u*e[0],s=e[1]/u;e[0]t)return e[0]=f,e[1]=o,e[2]=u,e[3]=Y,!1;if(iu)return e[0]=s,e[1]=i,e[2]=P,e[3]=t,!1;if(fu?(e[0]=h,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):p===y&&(f>u?(e[0]=s,e[1]=o,n=!0):(e[0]=v,e[1]=T,n=!0)),-E===y?u>f?(e[2]=K,e[3]=Y,m=!0):(e[2]=P,e[3]=M,m=!0):E===y&&(u>f?(e[2]=S,e[3]=M,m=!0):(e[2]=k,e[3]=Y,m=!0)),n&&m)return!1;if(f>u?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,e[0]=R,e[1]=W;break;case 2:R=v,W=i+d*y,e[0]=R,e[1]=W;break;case 3:W=T,R=f+N/y,e[0]=R,e[1]=W;break;case 4:R=h,W=i+-d*y,e[0]=R,e[1]=W;break}if(!m)switch(w){case 1:q=M,x=u+-rt/y,e[2]=x,e[3]=q;break;case 2:x=k,q=t+D*y,e[2]=x,e[3]=q;break;case 3:q=Y,x=u+rt/y,e[2]=x,e[3]=q;break;case 4:x=K,q=t+-D*y,e[2]=x,e[3]=q;break}}return!1},l.getCardinalDirection=function(a,r,e){return a>r?e:1+e%4},l.getIntersection=function(a,r,e,f){if(f==null)return this.getIntersection2(a,r,e);var i=a.x,u=a.y,t=r.x,s=r.y,o=e.x,c=e.y,h=f.x,T=f.y,v=void 0,d=void 0,N=void 0,S=void 0,M=void 0,P=void 0,K=void 0,Y=void 0,k=void 0;return N=s-u,M=i-t,K=t*u-i*s,S=T-c,P=o-h,Y=h*c-o*T,k=N*P-S*M,k===0?null:(v=(M*Y-P*K)/k,d=(S*K-N*Y)/k,new g(v,d))},l.angleOfVector=function(a,r,e,f){var i=void 0;return a!==e?(i=Math.atan((f-r)/(e-a)),e=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),v=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:v>=0&&v<=1?[v]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,A.exports=l},function(A,G,L){function g(){}g.sign=function(l){return l>0?1:l<0?-1:0},g.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},g.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},A.exports=g},function(A,G,L){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g},function(A,G,L){var g=function(){function i(u,t){for(var s=0;s"u"?"undefined":g(a);return a==null||r!="object"&&r!="function"},A.exports=l},function(A,G,L){function g(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c0&&c;){for(N.push(M[0]);N.length>0&&c;){var P=N[0];N.splice(0,1),d.add(P);for(var K=P.getEdges(),v=0;v-1&&M.splice(rt,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),v=0;v0){for(var T=this.edgeToDummyNodes.get(h),v=0;v=0&&c.splice(Y,1);var k=S.getNeighborsList();k.forEach(function(n){if(h.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(v=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s},function(A,G,L){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g},function(A,G,L){var g=L(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/e),r},l.prototype.transformY=function(a){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/e),r},l.prototype.inverseTransformX=function(a){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/e),r},l.prototype.inverseTransformY=function(a){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/e),r},l.prototype.inverseTransformPoint=function(a){var r=new g(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},A.exports=l},function(A,G,L){function g(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,v=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(v>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=v.length||N>=v[0].length)){for(var S=0;Si}}]),e}();A.exports=r},function(A,G,L){function g(){}g.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,i=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;V--){if(function(Nt,Mt){return Nt&&Mt}(V0;){var J=void 0,Rt=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+_*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=J&&Lt!==J;Lt--){var vt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==J+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===J?Rt=3:Lt===n-1?Rt=1:(Rt=2,J=Lt)}switch(J++,Rt){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Tt=g.hypot(this.s[ut],it),At=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==J&&(it=-Dt*r[ut-1],r[ut-1]=At*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Ct=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Ct,JMath.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},A.exports=g},function(A,G,L){var g=function(){function r(e,f){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=e,this.sequence2=f,this.match_score=i,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;e--){var f=this.listeners[e];f.event===a&&f.callback===r&&this.listeners.splice(e,1)}},l.emit=function(a,r){for(var e=0;e{var G={45:(a,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),a.exports=f},806:(a,r,e)=>{var f=e(551).FDLayoutConstants;function i(){}for(var u in f)i[u]=f[u];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i},767:(a,r,e)=>{var f=e(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var u in f)i[u]=f[u];a.exports=i},880:(a,r,e)=>{var f=e(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var u in f)i[u]=f[u];a.exports=i},578:(a,r,e)=>{var f=e(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var u in f)i[u]=f[u];a.exports=i},765:(a,r,e)=>{var f=e(551).FDLayout,i=e(578),u=e(880),t=e(991),s=e(767),o=e(806),c=e(902),h=e(551).FDLayoutConstants,T=e(551).LayoutConstants,v=e(551).Point,d=e(551).PointD,N=e(551).DimensionD,S=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,K=e(551).LGraph,Y=e(551).Transform,k=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[H],O[H]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push(B):q.set(H,[B]),q.has(B)?q.get(B).push(H):q.set(B,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(lt):V.set(_,[lt]),V.has(lt)?V.get(lt).push(_):V.set(lt,[_])}});var U=function(H,B){var _=[],lt=[],J=new k,Rt=new Set,Lt=0;return H.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(J.push(ut),Rt.add(ut),_[Lt].push(ut);J.length!=0;){ut=J.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=H.get(ut);Tt.forEach(function(At){Rt.has(At)||(J.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=U(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(V,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=K.calculateBounds(n),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w1;){var B=H[0];H.splice(0,1);var _=V.indexOf(B);_>=0&&V.splice(_,1),z--,U--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var lt=Math.abs(E-p)/U,J=O;et!=U;J=++J%z){var Rt=V[J].getOtherEnd(n);if(Rt!=m){var Lt=(p+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,n,Lt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=M.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(n.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=V;var U=n.getGraphManager().add(n.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;zy?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;Eq&&(q=U.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),U;m?(U=Math.ceil(V),U==V&&U++):U=Math.floor(V);var et=U*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function(z,O){var H=W;return w.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+R)/(w+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]0)for(var et=y;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=M.MAX_VALUE,O,H,B=0;B{var f=e(551).FDLayoutNode,i=e(551).IMath;function u(s,o,c,h){f.call(this,s,o,c,h)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,v.has(ht)?d[v.get(ht)]:Z.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,v.has(ht)?N[v.get(ht)]:Z.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){Q.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=v.has(ht)?d[v.get(ht)]:Z.get(ht):ct+=v.has(ht)?N[v.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw Zt}}var ue=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ue)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,Q=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[v.get(j.left)]-d[v.get(j.right)]>=0?$++:Q++:N[v.get(j.top)]-N[v.get(j.bottom)]>=0?Z++:at++}),$>Q&&Z>at)for(var gt=0;gtQ)for(var ot=0;otat)for(var tt=0;tt1)h.fixedNodeConstraint.forEach(function(F,b){E[b]=[F.position.x,F.position.y],y[b]=[d[v.get(F.nodeId)],N[v.get(F.nodeId)]]}),I=!0;else if(h.alignmentConstraint)(function(){var F=0;if(h.alignmentConstraint.vertical){for(var b=h.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[v.get(dt.values().next().value)]:wt=k(j).x,b[tt].forEach(function(yt){E[F]=[wt,N[v.get(yt)]],y[F]=[d[v.get(yt)],N[v.get(yt)]],F++})},Q=0;Q0?wt=d[v.get(dt.values().next().value)]:wt=k(j).y,Z[tt].forEach(function(yt){E[F]=[d[v.get(yt)],wt],y[F]=[d[v.get(yt)],N[v.get(yt)]],F++})},gt=0;gtV&&(V=q[et].length,U=et);if(V0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(F,b){var $={x:d[v.get(F.nodeId)],y:N[v.get(F.nodeId)]},Q=F.position,Z=Y(Q,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(F,b){d[b]+=mt.x}),N.forEach(function(F,b){N[b]+=mt.y}),h.fixedNodeConstraint.forEach(function(F){d[v.get(F.nodeId)]=F.position.x,N[v.get(F.nodeId)]=F.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var xt=h.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var Q=new Set([].concat(f($)).filter(function(at){return R.has(at)})),Z=void 0;Q.size>0?Z=d[v.get(Q.values().next().value)]:Z=k($).x,$.forEach(function(at){R.has(at)||(d[v.get(at)]=Z)})},Vt=0;Vt0?Z=N[v.get(Q.values().next().value)]:Z=k($).y,$.forEach(function(at){R.has(at)||(N[v.get(at)]=Z)})},bt=0;bt{a.exports=A}},L={};function g(a){var r=L[a];if(r!==void 0)return r.exports;var e=L[a]={exports:{}};return G[a](e,e.exports,g),e.exports}var l=g(45);return l})()})}(fe)),fe.exports}var Er=le.exports,Re;function mr(){return Re||(Re=1,function(C,X){(function(G,L){C.exports=L(yr())})(Er,function(A){return(()=>{var G={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),i=1;i{var f=function(){function t(s,o){var c=[],h=!0,T=!1,v=void 0;try{for(var d=s[Symbol.iterator](),N;!(h=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));h=!0);}catch(S){T=!0,v=S}finally{try{!h&&d.return&&d.return()}finally{if(T)throw v}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=e(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var w=0;w1){N=v[0],S=N.connectedEdges().length,v.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),K),Y},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,S=void 0;try{for(var M=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var K=P.value,Y=f(K,2),k=Y[0],D=Y[1],rt=o.cy.getElementById(k);if(rt){var n=rt.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;mh&&(h=p),Ev&&(v=y)}}}catch(x){N=!0,S=x}finally{try{!d&&M.return&&M.return()}finally{if(N)throw S}}var I=t.x-(h+c)/2,w=t.y-(v+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],V=q.getRect().x,U=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;Vh&&(h=U),etv&&(v=z)});var R=t.x-(h+c)/2,W=t.y-(v+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,S=void 0,M=void 0,P=void 0,K=t.descendants().not(":parent"),Y=K.length,k=0;kN&&(h=N),TM&&(v=M),d{var f=e(548),i=e(140).CoSELayout,u=e(140).CoSENode,t=e(140).layoutBase.PointD,s=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,h=e(140).CoSEConstants,T=function(d,N){var S=d.cy,M=d.eles,P=M.nodes(),K=M.edges(),Y=void 0,k=void 0,D=void 0,rt={};d.randomize&&(Y=N.nodeIndexes,k=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=f.calcParentsWithoutChildren(S,M),E=function W(x,q,V,U){for(var et=q.length,z=0;z0){var J=void 0;J=V.getGraphManager().add(V.newGraph(),B),W(J,H,V,U)}}},y=function(x,q,V){for(var U=0,et=0,z=0;z0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),y(w,R,K),I(w,d),w.runLayout(),rt};a.exports={coseLayout:T}},212:(a,r,e)=>{var f=function(){function d(N,S){for(var M=0;M0)if(p){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,Y.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Tt){w.merge(vt.nodes()[Tt]),ut.isParent()||(V.nodeIndexes.set(vt.nodes()[Tt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),Y.push(V);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),Y.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){M.eles=vt,k.push(h(M,Y[it])),t.relocateComponent(rt[it],k[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],Y[it],M)});var O=new Set;if(D.length>1){var H=[],B=K.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var ut=void 0;if(M.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=ut.get(Dt.id()),Tt.nodes.push({x:Y[it].xCoords[At]-Dt.boundingbox().w/2,y:Y[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else k[it][Dt.id()]&&Tt.nodes.push({x:k[it][Dt.id()].getLeft(),y:k[it][Dt.id()].getTop(),width:k[it][Dt.id()].getWidth(),height:k[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(Y[it].xCoords[St]),Xt.push(Y[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(Y[it].xCoords[Vt]),Ut.push(Y[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else k[it][mt.id()]&&k[it][xt.id()]&&Tt.edges.push({startX:k[it][mt.id()].getCenterX(),startY:k[it][mt.id()].getCenterY(),endX:k[it][xt.id()].getCenterX(),endY:k[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(H.push(Tt),O.add(it))}});var _=m.packComponents(H,M.randomize).shifts;if(M.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=ut,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(k[vt]).forEach(function(it){var ut=k[vt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var y=o(M);Y.push(y)}M.quality=="default"||M.quality=="proof"?(k.push(h(M,Y[0])),t.relocateComponent(rt[0],k[0],M)):t.relocateComponent(rt[0],Y[0],M)}var J=function(it,ut){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,At=void 0,Dt=it.data("id");return k.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return Y.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,K),Lt=K.filter(function(vt){return vt.css("display")=="none"});M.eles=K.not(Lt),K.nodes().not(":parent").not(Lt).layoutPositions(S,M,J),Rt.length>0&&Rt.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();a.exports=v},657:(a,r,e)=>{var f=e(548),i=e(140).layoutBase.Matrix,u=e(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),v=h.nodes(":parent"),d=new Map,N=new Map,S=new Map,M=[],P=[],K=[],Y=[],k=[],D=[],rt=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,W=function(){for(var b=0,$=0,Q=!1;$=at;){ot=Z[at++];for(var It=M[ot],ft=0;ftdt&&(dt=k[Ct],wt=Ct)}return wt},q=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(S.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=N.get(b),Q=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?Q=S.get(Z):Q=Z,M[$].push(Q),M[N.get(Q)].push(b)})},vt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(F){it=!0,ut=F}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=N.size;var mt=void 0;if(m>2){R=m{var f=e(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&i(cytoscape),a.exports=i},140:a=>{a.exports=A}},L={};function g(a){var r=L[a];if(r!==void 0)return r.exports;var e=L[a]={exports:{}};return G[a](e,e.exports,g),e.exports}var l=g(579);return l})()})}(le)),le.exports}var Tr=mr();const Nr=ur(Tr);var Se={L:"left",R:"right",T:"top",B:"bottom"},Fe={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:nt((C,X)=>C-X+2,"L"),R:nt((C,X)=>C-2,"R"),T:nt((C,X)=>C-X+2,"T"),B:nt((C,X)=>C-2,"B")},Lr=nt(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=nt(function(C){const X=C;return X==="L"||X==="R"||X==="T"||X==="B"},"isArchitectureDirection"),zt=nt(function(C){const X=C;return X==="L"||X==="R"},"isArchitectureDirectionX"),Qt=nt(function(C){const X=C;return X==="T"||X==="B"},"isArchitectureDirectionY"),Ce=nt(function(C,X){const A=zt(C)&&Qt(X),G=Qt(C)&&zt(X);return A||G},"isArchitectureDirectionXY"),Cr=nt(function(C){const X=C[0],A=C[1],G=zt(X)&&Qt(A),L=Qt(X)&&zt(A);return G||L},"isArchitecturePairXY"),Mr=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(C,X){const A=`${C}${X}`;return Mr(A)?A:void 0},"getArchitectureDirectionPair"),Ar=nt(function([C,X],A){const G=A[0],L=A[1];return zt(G)?Qt(L)?[C+(G==="L"?-1:1),X+(L==="T"?1:-1)]:[C+(G==="L"?-1:1),X]:zt(L)?[C+(L==="L"?1:-1),X+(G==="T"?1:-1)]:[C,X+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Or=nt(function(C,X){return Ce(C,X)?"bend":zt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=nt(function(C){return C.type==="service"},"isArchitectureService"),xr=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),Ue=nt(C=>C.data(),"edgeData"),ne=nt(C=>C.data(),"nodeData"),Ye=nr.architecture,pt=new cr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ye,dataStructures:void 0,elements:{}})),Ir=nt(()=>{pt.reset(),or()},"clear"),Rr=nt(function({id:C,icon:X,in:A,title:G,iconText:L}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:X,iconText:L,title:G,edges:[],in:A}},"addService"),Sr=nt(()=>Object.values(pt.records.nodes).filter(Dr),"getServices"),Fr=nt(function({id:C,in:X}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:X}},"addJunction"),br=nt(()=>Object.values(pt.records.nodes).filter(xr),"getJunctions"),Pr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Te=nt(C=>pt.records.nodes[C],"getNode"),Gr=nt(function({id:C,icon:X,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:X,title:G,in:A}},"addGroup"),Ur=nt(()=>Object.values(pt.records.groups),"getGroups"),Yr=nt(function({lhsId:C,rhsId:X,lhsDir:A,rhsDir:G,lhsInto:L,rhsInto:g,lhsGroup:l,rhsGroup:a,title:r}){if(!be(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${A}`);if(!be(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[X]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${X}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[X].in;if(l&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&e&&f&&e==f)throw new Error(`The right-hand id [${X}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:C,lhsDir:A,lhsInto:L,lhsGroup:l,rhsId:X,rhsDir:G,rhsInto:g,rhsGroup:a,title:r};pt.records.edges.push(i),pt.records.nodes[C]&&pt.records.nodes[X]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[X].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Xr=nt(()=>pt.records.edges,"getEdges"),Hr=nt(()=>{if(pt.records.dataStructures===void 0){const C={},X=Object.entries(pt.records.nodes).reduce((a,[r,e])=>(a[r]=e.edges.reduce((f,i)=>{var s,o;const u=(s=Te(i.lhsId))==null?void 0:s.in,t=(o=Te(i.rhsId))==null?void 0:o.in;if(u&&t&&u!==t){const c=Or(i.lhsDir,i.rhsDir);c!=="bend"&&(C[u]??(C[u]={}),C[u][t]=c,C[t]??(C[t]={}),C[t][u]=c)}if(i.lhsId===r){const c=me(i.lhsDir,i.rhsDir);c&&(f[c]=i.rhsId)}else{const c=me(i.rhsDir,i.lhsDir);c&&(f[c]=i.lhsId)}return f},{}),a),{}),A=Object.keys(X)[0],G={[A]:1},L=Object.keys(X).reduce((a,r)=>r===A?a:{...a,[r]:1},{}),g=nt(a=>{const r={[a]:[0,0]},e=[a];for(;e.length>0;){const f=e.shift();if(f){G[f]=1,delete L[f];const i=X[f],[u,t]=r[f];Object.entries(i).forEach(([s,o])=>{G[o]||(r[o]=Ar([u,t],s),e.push(o))})}}return r},"BFS"),l=[g(A)];for(;Object.keys(L).length>0;)l.push(g(Object.keys(L)[0]));pt.records.dataStructures={adjList:X,spatialMaps:l,groupAlignments:C}}return pt.records.dataStructures},"getDataStructures"),Wr=nt((C,X)=>{pt.records.elements[C]=X},"setElementForId"),Vr=nt(C=>pt.records.elements[C],"getElementById"),Xe=nt(()=>ir({...Ye,...ar().architecture}),"getConfig"),ge={clear:Ir,setDiagramTitle:tr,getDiagramTitle:_e,setAccTitle:je,getAccTitle:Ke,setAccDescription:Qe,getAccDescription:Je,getConfig:Xe,addService:Rr,getServices:Sr,addJunction:Fr,getJunctions:br,getNodes:Pr,getNode:Te,addGroup:Gr,getGroups:Ur,addEdge:Yr,getEdges:Xr,setElementForId:Wr,getElementById:Vr,getDataStructures:Hr};function Pt(C){return Xe()[C]}nt(Pt,"getConfigField");var zr=nt((C,X)=>{fr(C,X),C.groups.map(X.addGroup),C.services.map(A=>X.addService({...A,type:"service"})),C.junctions.map(A=>X.addJunction({...A,type:"junction"})),C.edges.map(X.addEdge)},"populateDb"),Br={parse:nt(async C=>{const X=await gr("architecture",C);Pe.debug(X),zr(X,ge)},"parse")},$r=nt(C=>` + .edge { + stroke-width: ${C.archEdgeWidth}; + stroke: ${C.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${C.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${C.archGroupBorderColor}; + stroke-width: ${C.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),Zr=$r,ae=nt(C=>`${C}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ae('')},server:{body:ae('')},disk:{body:ae('')},internet:{body:ae('')},cloud:{body:ae('')},unknown:lr,blank:{body:ae("")}}},kr=nt(async function(C,X){const A=Pt("padding"),G=Pt("iconSize"),L=G/2,g=G/6,l=g/2;await Promise.all(X.edges().map(async a=>{var P,K;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:i,target:u,targetDir:t,targetArrow:s,targetGroup:o,label:c}=Ue(a);let{x:h,y:T}=a[0].sourceEndpoint();const{x:v,y:d}=a[0].midpoint();let{x:N,y:S}=a[0].targetEndpoint();const M=A+4;if(i&&(zt(e)?h+=e==="L"?-M:M:T+=e==="T"?-M:M+18),o&&(zt(t)?N+=t==="L"?-M:M:S+=t==="T"?-M:M+18),!i&&((P=ge.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?h+=e==="L"?L:-L:T+=e==="T"?L:-L),!o&&((K=ge.getNode(u))==null?void 0:K.type)==="junction"&&(zt(t)?N+=t==="L"?L:-L:S+=t==="T"?L:-L),a[0]._private.rscratch){const Y=C.insert("g");if(Y.insert("path").attr("d",`M ${h},${T} L ${v},${d} L${N},${S} `).attr("class","edge"),f){const k=zt(e)?he[e](h,g):h-l,D=Qt(e)?he[e](T,g):T-l;Y.insert("polygon").attr("points",Fe[e](g)).attr("transform",`translate(${k},${D})`).attr("class","arrow")}if(s){const k=zt(t)?he[t](N,g):N-l,D=Qt(t)?he[t](S,g):S-l;Y.insert("polygon").attr("points",Fe[t](g)).attr("transform",`translate(${k},${D})`).attr("class","arrow")}if(c){const k=Ce(e,t)?"XY":zt(e)?"X":"Y";let D=0;k==="X"?D=Math.abs(h-N):k==="Y"?D=Math.abs(T-S)/1.5:D=Math.abs(h-N)/2;const rt=Y.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},Le()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),k==="X")rt.attr("transform","translate("+v+", "+d+")");else if(k==="Y")rt.attr("transform","translate("+v+", "+d+") rotate(-90)");else if(k==="XY"){const n=me(e,t);if(n&&Cr(n)){const m=rt.node().getBoundingClientRect(),[p,E]=wr(n);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*E*45})`);const y=rt.node().getBoundingClientRect();rt.attr("transform",` + translate(${v}, ${d-m.height/2}) + translate(${p*y.width/2}, ${E*y.height/2}) + rotate(${-1*p*E*45}, 0, ${m.height/2}) + `)}}}}}))},"drawEdges"),qr=nt(async function(C,X){const G=Pt("padding")*.75,L=Pt("fontSize"),l=Pt("iconSize")/2;await Promise.all(X.nodes().map(async a=>{const r=ne(a);if(r.type==="group"){const{h:e,w:f,x1:i,y1:u}=a.boundingBox();C.append("rect").attr("x",i+l).attr("y",u+l).attr("width",f).attr("height",e).attr("class","node-bkg");const t=C.append("g");let s=i,o=u;if(r.icon){const c=t.append("g");c.html(`${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(s+l+1)+", "+(o+l+1)+")"),s+=G,o+=L/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},Le()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(s+l+4)+", "+(o+l+2)+")")}}}))},"drawGroups"),Jr=nt(async function(C,X,A){for(const G of A){const L=X.append("g"),g=Pt("iconSize");if(G.title){const e=L.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:g*1.5,classes:"architecture-service-label"},Le()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+g/2+", "+g+")")}const l=L.append("g");if(G.icon)l.html(`${await Ee(G.icon,{height:g,width:g,fallbackPrefix:oe.prefix})}`);else if(G.iconText){l.html(`${await Ee("blank",{height:g,width:g,fallbackPrefix:oe.prefix})}`);const i=l.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html(G.iconText),u=parseInt(window.getComputedStyle(i.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;i.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/u)};`)}else l.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);L.attr("class","architecture-service");const{width:a,height:r}=L._groups[0][0].getBBox();G.width=a,G.height=r,C.setElementForId(G.id,L)}return 0},"drawServices"),Qr=nt(function(C,X,A){A.forEach(G=>{const L=X.append("g"),g=Pt("iconSize");L.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",g).attr("height",g),L.attr("class","architecture-junction");const{width:a,height:r}=L._groups[0][0].getBBox();L.width=a,L.height=r,C.setElementForId(G.id,L)})},"drawJunctions");hr([{name:oe.prefix,icons:oe}]);Ge.use(Nr);function He(C,X){C.forEach(A=>{X.add({group:"nodes",data:{type:"service",id:A.id,icon:A.icon,label:A.title,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}nt(He,"addServices");function We(C,X){C.forEach(A=>{X.add({group:"nodes",data:{type:"junction",id:A.id,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}nt(We,"addJunctions");function Ve(C,X){X.nodes().map(A=>{const G=ne(A);if(G.type==="group")return;G.x=A.position().x,G.y=A.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}nt(Ve,"positionNodes");function ze(C,X){C.forEach(A=>{X.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}nt(ze,"addGroups");function Be(C,X){C.forEach(A=>{const{lhsId:G,rhsId:L,lhsInto:g,lhsGroup:l,rhsInto:a,lhsDir:r,rhsDir:e,rhsGroup:f,title:i}=A,u=Ce(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${G}-${L}`,label:i,source:G,sourceDir:r,sourceArrow:g,sourceGroup:l,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:L,targetDir:e,targetArrow:a,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};X.add({group:"edges",data:t,classes:u})})}nt(Be,"addEdges");function $e(C,X,A){const G=nt((a,r)=>Object.entries(a).reduce((e,[f,i])=>{var s;let u=0;const t=Object.entries(i);if(t.length===1)return e[f]=t[0][1],e;for(let o=0;o{const r={},e={};return Object.entries(a).forEach(([f,[i,u]])=>{var s,o,c;const t=((s=C.getNode(f))==null?void 0:s.in)??"default";r[u]??(r[u]={}),(o=r[u])[t]??(o[t]=[]),r[u][t].push(f),e[i]??(e[i]={}),(c=e[i])[t]??(c[t]=[]),e[i][t].push(f)}),{horiz:Object.values(G(r,"horizontal")).filter(f=>f.length>1),vert:Object.values(G(e,"vertical")).filter(f=>f.length>1)}}),[g,l]=L.reduce(([a,r],{horiz:e,vert:f})=>[[...a,...e],[...r,...f]],[[],[]]);return{horizontal:g,vertical:l}}nt($e,"getAlignments");function Ze(C){const X=[],A=nt(L=>`${L[0]},${L[1]}`,"posToStr"),G=nt(L=>L.split(",").map(g=>parseInt(g)),"strToPos");return C.forEach(L=>{const g=Object.fromEntries(Object.entries(L).map(([e,f])=>[A(f),e])),l=[A([0,0])],a={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;l.length>0;){const e=l.shift();if(e){a[e]=1;const f=g[e];if(f){const i=G(e);Object.entries(r).forEach(([u,t])=>{const s=A([i[0]+t[0],i[1]+t[1]]),o=g[s];o&&!a[s]&&(l.push(s),X.push({[Se[u]]:o,[Se[Lr(u)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),X}nt(Ze,"getRelativeConstraints");function ke(C,X,A,G,L,{spatialMaps:g,groupAlignments:l}){return new Promise(a=>{const r=sr("body").append("div").attr("id","cy").attr("style","display:none"),e=Ge({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});r.remove(),ze(A,e),He(C,e),We(X,e),Be(G,e);const f=$e(L,g,l),i=Ze(g),u=e.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[s,o]=t.connectedNodes(),{parent:c}=ne(s),{parent:h}=ne(o);return c===h?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(t){const[s,o]=t.connectedNodes(),{parent:c}=ne(s),{parent:h}=ne(o);return c===h?.45:.001},alignmentConstraint:f,relativePlacementConstraint:i});u.one("layoutstop",()=>{var s;function t(o,c,h,T){let v,d;const{x:N,y:S}=o,{x:M,y:P}=c;d=(T-S+(N-h)*(S-P)/(N-M))/Math.sqrt(1+Math.pow((S-P)/(N-M),2)),v=Math.sqrt(Math.pow(T-S,2)+Math.pow(h-N,2)-Math.pow(d,2));const K=Math.sqrt(Math.pow(M-N,2)+Math.pow(P-S,2));v=v/K;let Y=(M-N)*(T-S)-(P-S)*(h-N);switch(!0){case Y>=0:Y=1;break;case Y<0:Y=-1;break}let k=(M-N)*(h-N)+(P-S)*(T-S);switch(!0){case k>=0:k=1;break;case k<0:k=-1;break}return d=Math.abs(d)*Y,v=v*k,{distances:d,weights:v}}nt(t,"getSegmentWeights"),e.startBatch();for(const o of Object.values(e.edges()))if((s=o.data)!=null&&s.call(o)){const{x:c,y:h}=o.source().position(),{x:T,y:v}=o.target().position();if(c!==T&&h!==v){const d=o.sourceEndpoint(),N=o.targetEndpoint(),{sourceDir:S}=Ue(o),[M,P]=Qt(S)?[d.x,N.y]:[N.x,d.y],{weights:K,distances:Y}=t(d,N,M,P);o.style("segment-distances",Y),o.style("segment-weights",K)}}e.endBatch(),u.run()}),u.run(),e.ready(t=>{Pe.info("Ready",t),a(e)})})}nt(ke,"layoutArchitecture");var Kr=nt(async(C,X,A,G)=>{const L=G.db,g=L.getServices(),l=L.getJunctions(),a=L.getGroups(),r=L.getEdges(),e=L.getDataStructures(),f=er(X),i=f.append("g");i.attr("class","architecture-edges");const u=f.append("g");u.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Jr(L,u,g),Qr(L,u,l);const s=await ke(g,l,a,r,L,e);await kr(i,s),await qr(t,s),Ve(L,s),rr(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),jr={draw:Kr},gi={parser:Br,db:ge,renderer:jr,styles:Zr};export{gi as diagram}; diff --git a/lightrag/api/webui/assets/blockDiagram-JOT3LUYC-BxXXNv1O.js b/lightrag/api/webui/assets/blockDiagram-JOT3LUYC-BxXXNv1O.js deleted file mode 100644 index 8348d25a..00000000 --- a/lightrag/api/webui/assets/blockDiagram-JOT3LUYC-BxXXNv1O.js +++ /dev/null @@ -1,121 +0,0 @@ -import{_ as d,G as at,d as R,e as de,l as L,z as ge,B as ue,C as pe,c as z,aa as fe,U as xe,$ as ye,ab as Z,ac as Yt,ad as be,u as tt,k as we,ae as me,af as xt,ag as Le,i as Tt}from"./mermaid-vendor-D0f_SE0h.js";import{c as Se}from"./clone-Dm5jEAXQ.js";import{G as ve}from"./graph-BLnbmvfZ.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";import"./_baseUniq-CtAZZJ8e.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: -`+M.showPosition()+` -Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error on line "+(A+1)+": Unexpected "+(Y==W?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ft,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:ut,expected:it})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(U[0]){case 1:u.push(Y),S.push(M.yytext),c.push(M.yylloc),u.push(U[1]),Y=null,O=M.yyleng,p=M.yytext,A=M.yylineno,ut=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],$.$=S[S.length-q],$._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&($._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),pt=this.performAction.apply($,[p,O,A,J.yy,U[1],S,c].concat(ce)),typeof pt<"u")return pt;q&&(u=u.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),u.push(this.productions_[U[1]][0]),S.push($.$),c.push($._$),Nt=_[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},T=function(){var N={EOF:1,parseError:d(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,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:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,u=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=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),u.length-1&&(this.yylineno-=u.length-1);var S=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:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+` -`+g+"^"},"showPosition"),test_match:d(function(x,g){var u,w,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],u=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var c in S)this[c]=S[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,u,w;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),c=0;cg[0].length)){if(g=u,w=c,this.options.backtrack_lexer){if(x=this.test_match(u,S[c]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,S[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,u,w,S){switch(w){case 0:return 10;case 1:return g.getLogger().debug("Found space-block"),31;case 2:return g.getLogger().debug("Found nl-block"),31;case 3:return g.getLogger().debug("Found space-block"),29;case 4:g.getLogger().debug(".",u.yytext);break;case 5:g.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:g.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return g.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",g.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),38;case 75:return g.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return g.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return g.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:g.getLogger().debug("LEX POPPING"),this.popState();break;case 85:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return g.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();v.lexer=T;function k(){this.yy={}}return d(k,"Parser"),k.prototype=v,v.Parser=k,new k}();yt.parser=yt;var Ee=yt,V=new Map,St=[],bt=new Map,Ct="color",Bt="fill",_e="bgFill",Ht=",",ke=z(),ct=new Map,De=d(e=>we.sanitizeText(e,ke),"sanitizeText"),Ne=d(function(e,t=""){let r=ct.get(e);r||(r={id:e,styles:[],textStyles:[]},ct.set(e,r)),t!=null&&t.split(Ht).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ct).exec(n)){const s=i.replace(Bt,_e).replace(Ct,Bt);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Te=d(function(e,t=""){const r=V.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),Ce=d(function(e,t){e.split(",").forEach(function(r){let n=V.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},V.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Kt=d((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=De(i.label)),i.type==="classDef"){Ne(i.id,i.css);continue}if(i.type==="applyClass"){Ce(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Te(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(bt.get(i.id)??0)+1;bt.set(i.id,a),i.id=a+"-"+i.id,St.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=V.get(i.id);if(a===void 0?V.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Kt(i.children,i),i.type==="space"){const s=i.width??1;for(let l=0;l{L.debug("Clear called"),ge(),rt={id:"root",type:"composite",children:[],columns:-1},V=new Map([["root",rt]]),vt=[],ct=new Map,St=[],bt=new Map},"clear");function Xt(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Xt,"typeStr2Type");function Ut(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Ut,"edgeTypeStr2Type");function jt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}d(jt,"edgeStrToEdgeData");var It=0,Ie=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),Oe=d(e=>{rt.children=e,Kt(e,rt),vt=rt.children},"setHierarchy"),Re=d(e=>{const t=V.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ze=d(()=>[...V.values()],"getBlocksFlat"),Ae=d(()=>vt||[],"getBlocks"),Me=d(()=>St,"getEdges"),Fe=d(e=>V.get(e),"getBlock"),We=d(e=>{V.set(e.id,e)},"setBlock"),Pe=d(()=>console,"getLogger"),Ye=d(function(){return ct},"getClasses"),He={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Ut,edgeStrToEdgeData:jt,getLogger:Pe,getBlocksFlat:ze,getBlocks:Ae,getEdges:Me,setHierarchy:Oe,getBlock:Fe,setBlock:We,getColumns:Re,getClasses:Ye,clear:Be,generateId:Ie},Ke=He,nt=d((e,t)=>{const r=ue,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return pe(n,i,a,t)},"fade"),Xe=d(e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span,p { - color: ${e.titleColor}; - } - - - - .label text,span,p { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${nt(e.edgeLabelBackground,.5)}; - // background-color: - } - - .node .cluster { - // fill: ${nt(e.mainBkg,.5)}; - fill: ${nt(e.clusterBkg,.5)}; - stroke: ${nt(e.clusterBorder,.2)}; - box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span,p { - color: ${e.titleColor}; - } - /* .cluster div { - color: ${e.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } -`,"getStyles"),Ue=Xe,je=d((e,t,r,n)=>{t.forEach(i=>{rr[i](e,r,n)})},"insertMarkers"),Ve=d((e,t,r)=>{L.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Ge=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Je=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Qe=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$e=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),er=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rr={extension:Ve,composition:Ge,aggregation:Ze,dependency:qe,lollipop:Je,point:Qe,circle:$e,cross:tr,barb:er},ar=je,Wt,Pt,I=((Pt=(Wt=z())==null?void 0:Wt.block)==null?void 0:Pt.padding)??8;function Vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}d(Vt,"calculateBlockPosition");var sr=d(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");function ot(e,t,r=0,n=0){var s,l,o,f,h,y,b,m,E,D,v;L.debug("setBlockSizes abc95 (start)",e.id,(s=e==null?void 0:e.size)==null?void 0:s.x,"block width =",e==null?void 0:e.size,"sieblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((o=e.children)==null?void 0:o.length)>0){for(const S of e.children)ot(S,t);const T=sr(e);i=T.width,a=T.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const S of e.children)S.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${i} ${a} ${JSON.stringify(S.size)}`),S.size.width=i*(S.widthInColumns??1)+I*((S.widthInColumns??1)-1),S.size.height=a,S.size.x=0,S.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${i} maxHeight:${a}`));for(const S of e.children)ot(S,t,i,a);const k=e.columns??-1;let N=0;for(const S of e.children)N+=S.widthInColumns??1;let x=e.children.length;k>0&&k0?Math.min(e.children.length,k):e.children.length;if(S>0){const c=(u-S*I-I)/S;L.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,c);for(const _ of e.children)_.size&&(_.size.width=c)}}e.size={width:u,height:w,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(E=e==null?void 0:e.size)==null?void 0:E.width,(D=e==null?void 0:e.size)==null?void 0:D.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}d(ot,"setBlockSizes");function Et(e,t){var n,i,a,s,l,o,f,h,y,b,m,E,D,v,T,k,N;L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(a=e==null?void 0:e.size)==null?void 0:a.width}`);const r=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const x=((l=(s=e==null?void 0:e.children[0])==null?void 0:s.size)==null?void 0:l.width)??0,g=e.children.length*x+(e.children.length-1)*I;L.debug("widthOfChildren 88",g,"posX");let u=0;L.debug("abc91 block?.size?.x",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-I,S=0;for(const c of e.children){const _=e;if(!c.size)continue;const{width:p,height:A}=c.size,{px:O,py:X}=Vt(r,u);if(X!=S&&(S=X,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((E=e==null?void 0:e.size)==null?void 0:E.width)/2||0):-I,L.debug("New row in layout for block",e.id," and child ",c.id,S)),L.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${u} (px, py) ${O},${X} (${(D=_==null?void 0:_.size)==null?void 0:D.x},${(v=_==null?void 0:_.size)==null?void 0:v.y}) parent: ${_.id} width: ${p}${I}`),_.size){const W=p/2;c.size.x=w+I+W,L.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${W} padding=${I} width=${p} halfWidth=${W} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((c==null?void 0:c.widthInColumns)??1)/2}`),w=c.size.x+W,c.size.y=_.size.y-_.size.height/2+X*(A+I)+A/2+I,L.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${I}${W}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${p*((c==null?void 0:c.widthInColumns)??1)/2}`)}c.children&&Et(c),u+=(c==null?void 0:c.widthInColumns)??1,L.debug("abc88 columnsPos",c,u)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(T=e==null?void 0:e.size)==null?void 0:T.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:a,y:s,width:l,height:o}=e.size;a-l/2n&&(n=a+l/2),s+o/2>i&&(i=s+o/2)}if(e.children)for(const a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=_t(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}d(_t,"findBounds");function Gt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),L.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=_t(t),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}d(Gt,"layout");function wt(e,t){t&&e.attr("style",t)}d(wt,"applyStyle");function Zt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wt(a,e.labelStyle),a.attr("class",i),wt(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Zt,"addHtmlLabel");var ir=d((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Z(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),L.debug("vertexText"+i);const a={isNode:n,label:me(xt(i)),labelStyle:t.replace("fill:","color:")};return Zt(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const l of s){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=l.trim(),a.appendChild(o)}return a}},"createLabel"),j=ir,nr=d((e,t,r,n,i)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),lr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,r,n,i,a)=>{const s=lr[r];if(!s){L.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker"),mt={},P={},cr=d((e,t)=>{const r=z(),n=Z(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Yt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):j(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),mt[t.id]=a,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=j(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startLeft=h,et(o,t.startLabelLeft)}if(t.startLabelRight){const f=j(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=h.node().appendChild(f),y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startRight=h,et(o,t.startLabelRight)}if(t.endLabelLeft){const f=j(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endLeft=h,et(o,t.endLabelLeft)}if(t.endLabelRight){const f=j(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endRight=h,et(o,t.endLabelRight)}return i},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var or=d((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=be(n);if(e.label){const a=mt[e.id];let s=e.x,l=e.y;if(r){const o=tt.calcLabelPosition(r);L.debug("Moving label "+e.label+" from (",s,",",l,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(s=o.x,l=o.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(e.startLabelLeft){const a=P[e.id].startLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){const a=P[e.id].startRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){const a=P[e.id].endLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){const a=P[e.id].endRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),hr=d((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,l=e.height/2;return i>=s||a>=l},"outsideNode"),dr=d((e,t,r)=>{L.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(t)} - insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let l=r.xMath.abs(n-t.x)*o){let y=r.y{L.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(!hr(t,a)&&!i){const s=dr(t,n,a);let l=!1;r.forEach(o=>{l=l||o.x===s.x&&o.y===s.y}),r.some(o=>o.x===s.x&&o.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),gr=d(function(e,t,r,n,i,a,s){let l=r.points;L.debug("abc88 InsertEdge: edge=",r,"e=",t);let o=!1;const f=a.node(t.v);var h=a.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(L.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(L.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),o=!0);const y=l.filter(x=>!Number.isNaN(x.y));let b=ye;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:E}=fe(r),D=xe().x(m).y(E).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),nr(T,r,k,s,i);let N={};return o&&(N.updatedPath=l),N.originalPath=r.points,N},"insertEdge"),ur=d(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),pr=d((e,t,r)=>{const n=ur(e),i=2,a=t.height+2*r.padding,s=a/i,l=t.width+2*s+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*o},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*o,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*o},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function qt(e,t){return e.intersect(t)}d(qt,"intersectNode");var fr=qt;function Jt(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,l=a-n.y,o=Math.sqrt(t*t*l*l+r*r*s*s),f=Math.abs(t*r*s/o);n.x0}d(Lt,"sameSign");var yr=te,br=ee;function ee(e,t,r){var n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(E){s=Math.min(s,E.x),l=Math.min(l,E.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var o=n-e.width/2-s,f=i-e.height/2-l,h=0;h1&&a.sort(function(E,D){var v=E.x-r.x,T=E.y-r.y,k=Math.sqrt(v*v+T*T),N=D.x-r.x,x=D.y-r.y,g=Math.sqrt(N*N+x*x);return k{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,l=e.height/2,o,f;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),o=a===0?0:l*i/a,f=l):(i<0&&(s=-s),o=s,f=i===0?0:s*a/i),{x:r+o,y:n+f}},"intersectRect"),mr=wr,C={node:fr,circle:xr,ellipse:Qt,polygon:br,rect:mr},F=d(async(e,t,r,n)=>{const i=z();let a;const s=t.useHtmlLabels||Z(i.flowchart.htmlLabels);r?a=r:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=o.node();let y;t.labelType==="markdown"?y=Yt(o,Tt(xt(f),i),{useHtmlLabels:s,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):y=h.appendChild(j(Tt(xt(f),i),t.labelStyle,!1,n));let b=y.getBBox();const m=t.padding/2;if(Z(i.flowchart.htmlLabels)){const E=y.children[0],D=R(y),v=E.getElementsByTagName("img");if(v){const T=f.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(k=>new Promise(N=>{function x(){if(k.style.display="flex",k.style.flexDirection="column",T){const g=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(g,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";N(k)}d(x,"setupImage"),setTimeout(()=>{k.complete&&x()}),k.addEventListener("error",x),k.addEventListener("load",x)})))}b=E.getBoundingClientRect(),D.attr("width",b.width),D.attr("height",b.height)}return s?o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):o.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:o}},"labelHelper"),B=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function G(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(G,"insertPolygonShape");var Lr=d(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:a}=await F(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,s),t.intersect=function(l){return C.rect(t,l)},n},"note"),Sr=Lr,zt=d(e=>e?" "+e:"","formatClass"),K=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];L.info("Question main (Circle)");const o=G(r,s,s,l);return o.attr("style",t.style),B(t,o),t.intersect=function(f){return L.warn("Intersect called"),C.polygon(t,l,f)},r},"question"),vr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return C.circle(t,14,s)},r},"choice"),Er=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=4,a=n.height+t.padding,s=a/i,l=n.width+2*s+t.padding,o=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"hexagon"),_r=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,a=n.height+2*t.padding,s=a/i,l=n.width+2*s+t.padding,o=pr(t.directions,n,t),f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"block_arrow"),kr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return G(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_left_inv_arrow"),Dr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_right"),Nr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_left"),Tr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"trapezoid"),Cr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"inv_trapezoid"),Br=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_right_inv_arrow"),Ir=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+t.padding,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return B(t,f),t.intersect=function(h){const y=C.rect(t,h),b=y.x-t.x;if(a!=0&&(Math.abs(b)t.height/2-s)){let m=s*s*(1-b*b/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,h.y-t.y>0&&(m=-m),y.y+=m}return y},r},"cylinder"),Or=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"rect"),Rr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"composite"),zr=d(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);L.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ht(n,t.props.borders,i,a),s.delete("borders")),s.forEach(l=>{L.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(s){return C.rect(t,s)},r},"labelRect");function ht(e,t,r,n){const i=[],a=d(l=>{i.push(l,0)},"addBorder"),s=d(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(L.debug("add top border"),a(r)):s(r),t.includes("r")?(L.debug("add right border"),a(n)):s(n),t.includes("b")?(L.debug("add bottom border"),a(r)):s(r),t.includes("l")?(L.debug("add left border"),a(n)):s(n),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var Ar=d((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof l=="object"?o=l[0]:o=l,L.info("Label text abc79",o,l,typeof l=="object");const f=s.node().appendChild(j(o,t.labelStyle,!0,!0));let h={width:0,height:0};if(Z(z().flowchart.htmlLabels)){const D=f.children[0],v=R(f);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}L.info("Text 2",l);const y=l.slice(1,l.length);let b=f.getBBox();const m=s.node().appendChild(j(y.join?y.join("
"):y,t.labelStyle,!0,!0));if(Z(z().flowchart.htmlLabels)){const D=m.children[0],v=R(m);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}const E=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+E+5)+")"),R(f).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.height+t.padding,a=n.width+i/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return B(t,s),t.intersect=function(l){return C.rect(t,l)},r},"stadium"),Fr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),B(t,a),t.intersect=function(s){return L.info("Circle intersect",t,n.width/2+i,s),C.circle(t,n.width/2+i,s)},r},"circle"),Wr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+a).attr("width",n.width+t.padding+a*2).attr("height",n.height+t.padding+a*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return L.info("DoubleCircle intersect",t,n.width/2+i+a,f),C.circle(t,n.width/2+i+a,f)},r},"doublecircle"),Pr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"subroutine"),Yr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return C.circle(t,7,i)},r},"start"),Mt=d((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return B(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return C.rect(t,l)},n},"forkJoin"),Hr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(a){return C.circle(t,7,a)},r},"end"),Kr=d((e,t)=>{var S;const r=t.padding/2,n=4,i=8;let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),o=s.insert("line"),f=s.insert("line");let h=0,y=n;const b=s.insert("g").attr("class","label");let m=0;const E=(S=t.classData.annotations)==null?void 0:S[0],D=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",v=b.node().appendChild(j(D,t.labelStyle,!0,!0));let T=v.getBBox();if(Z(z().flowchart.htmlLabels)){const c=v.children[0],_=R(v);T=c.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}t.classData.annotations[0]&&(y+=T.height+n,h+=T.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const N=b.node().appendChild(j(k,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let x=N.getBBox();if(Z(z().flowchart.htmlLabels)){const c=N.children[0],_=R(N);x=c.getBoundingClientRect(),_.attr("width",x.width),_.attr("height",x.height)}y+=x.height+n,x.width>h&&(h=x.width);const g=[];t.classData.members.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,g.push(A)}),y+=i;const u=[];if(t.classData.methods.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,u.push(A)}),y+=i,E){let c=(h-T.width)/2;R(v).attr("transform","translate( "+(-1*h/2+c)+", "+-1*y/2+")"),m=T.height+n}let w=(h-x.width)/2;return R(N).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*y/2+m)+")"),m+=x.height+n,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,g.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m+i/2)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,u.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(y/2)-r).attr("width",h+t.padding).attr("height",y+t.padding),B(t,l),t.intersect=function(c){return C.rect(t,c)},s},"class_box"),Ft={rhombus:At,composite:Rr,question:At,rect:Or,labelRect:zr,rectWithTitle:Ar,choice:vr,circle:Fr,doublecircle:Wr,stadium:Mr,hexagon:Er,block_arrow:_r,rect_left_inv_arrow:kr,lean_right:Dr,lean_left:Nr,trapezoid:Tr,inv_trapezoid:Cr,rect_right_inv_arrow:Br,cylinder:Ir,start:Yr,end:Hr,note:Sr,subroutine:Pr,fork:Mt,join:Mt,class_box:Kr},lt={},re=d(async(e,t,r)=>{let n,i;if(t.link){let a;z().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),i=await Ft[t.shape](n,t,r)}else i=await Ft[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),Xr=d(e=>{const t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function kt(e,t,r=!1){var b,m,E;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const o=Le((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:o.labelStyle,shape:s,labelText:f,rx:a,ry:a,class:i,style:o.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((E=(m=at())==null?void 0:m.block)==null?void 0:E.padding)??0}}d(kt,"getNodeFromBlock");async function ae(e,t,r){const n=kt(t,r,!1);if(n.type==="group")return;const i=at(),a=await re(e,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}d(ae,"calculateBlockSize");async function se(e,t,r){const n=kt(t,r,!0);if(r.getBlock(n.id).type!=="space"){const a=at();await re(e,n,{config:a}),t.intersect=n==null?void 0:n.intersect,Xr(n)}}d(se,"insertBlockPositioned");async function dt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await dt(e,i.children,r,n)}d(dt,"performOperations");async function ie(e,t,r){await dt(e,t,r,ae)}d(ie,"calculateBlockSizes");async function ne(e,t,r){await dt(e,t,r,se)}d(ne,"insertBlocks");async function le(e,t,r,n,i){const a=new ve({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const l=n.getBlock(s.start),o=n.getBlock(s.end);if(l!=null&&l.size&&(o!=null&&o.size)){const f=l.size,h=o.size,y=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];gr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await cr(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),or({...s,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(le,"insertEdges");var Ur=d(function(e,t){return t.db.getClasses()},"getClasses"),jr=d(async function(e,t,r,n){const{securityLevel:i,block:a}=at(),s=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const o=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?o.select(`[id="${t}"]`):R(`[id="${t}"]`);ar(f,["point","circle","cross"],n.type,t);const y=s.getBlocks(),b=s.getBlocksFlat(),m=s.getEdges(),E=f.insert("g").attr("class","block");await ie(E,y,s);const D=Gt(s);if(await ne(E,y,s),await le(E,m,b,s,t),D){const v=D,T=Math.max(1,Math.round(.125*(v.width/v.height))),k=v.height+T+10,N=v.width+10,{useMaxWidth:x}=a;de(f,k,N,!!x),L.debug("Here Bounds",D,v),f.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Vr={draw:jr,getClasses:Ur},aa={parser:Ee,db:Ke,renderer:Vr,styles:Ue};export{aa as diagram}; diff --git a/lightrag/api/webui/assets/blockDiagram-PHRCVELO-BX1-QuFh.js b/lightrag/api/webui/assets/blockDiagram-PHRCVELO-BX1-QuFh.js new file mode 100644 index 00000000..ceddc3c3 --- /dev/null +++ b/lightrag/api/webui/assets/blockDiagram-PHRCVELO-BX1-QuFh.js @@ -0,0 +1,122 @@ +import{g as de}from"./chunk-E2GYISFI-DBdOi329.js";import{_ as d,G as at,d as R,e as ge,l as L,z as ue,B as pe,C as fe,c as z,ab as xe,U as ye,a0 as be,X as we,ac as Z,ad as Yt,ae as me,u as tt,k as Le,af as Se,ag as xt,ah as ve,i as Tt}from"./mermaid-vendor-DOoA-Fcm.js";import{c as Ee}from"./clone-DMtoZDWc.js";import{G as _e}from"./graph-C9TLhZpq.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";import"./_baseUniq-DHoNBBvA.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: +`+M.showPosition()+` +Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error on line "+(A+1)+": Unexpected "+(Y==W?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ft,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:ut,expected:it})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(U[0]){case 1:u.push(Y),S.push(M.yytext),c.push(M.yylloc),u.push(U[1]),Y=null,O=M.yyleng,p=M.yytext,A=M.yylineno,ut=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],$.$=S[S.length-q],$._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&($._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),pt=this.performAction.apply($,[p,O,A,J.yy,U[1],S,c].concat(ce)),typeof pt<"u")return pt;q&&(u=u.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),u.push(this.productions_[U[1]][0]),S.push($.$),c.push($._$),Nt=_[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},T=function(){var N={EOF:1,parseError:d(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,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:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,u=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=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),u.length-1&&(this.yylineno-=u.length-1);var S=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:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:d(function(x,g){var u,w,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],u=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var c in S)this[c]=S[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,u,w;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),c=0;cg[0].length)){if(g=u,w=c,this.options.backtrack_lexer){if(x=this.test_match(u,S[c]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,S[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,u,w,S){switch(w){case 0:return 10;case 1:return g.getLogger().debug("Found space-block"),31;case 2:return g.getLogger().debug("Found nl-block"),31;case 3:return g.getLogger().debug("Found space-block"),29;case 4:g.getLogger().debug(".",u.yytext);break;case 5:g.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:g.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return g.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",g.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),38;case 75:return g.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return g.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return g.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:g.getLogger().debug("LEX POPPING"),this.popState();break;case 85:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return g.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();v.lexer=T;function k(){this.yy={}}return d(k,"Parser"),k.prototype=v,v.Parser=k,new k}();yt.parser=yt;var ke=yt,V=new Map,St=[],bt=new Map,Ct="color",Bt="fill",De="bgFill",Ht=",",Ne=z(),ct=new Map,Te=d(e=>Le.sanitizeText(e,Ne),"sanitizeText"),Ce=d(function(e,t=""){let r=ct.get(e);r||(r={id:e,styles:[],textStyles:[]},ct.set(e,r)),t!=null&&t.split(Ht).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ct).exec(n)){const s=i.replace(Bt,De).replace(Ct,Bt);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Be=d(function(e,t=""){const r=V.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),Ie=d(function(e,t){e.split(",").forEach(function(r){let n=V.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},V.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Kt=d((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=Te(i.label)),i.type==="classDef"){Ce(i.id,i.css);continue}if(i.type==="applyClass"){Ie(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Be(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(bt.get(i.id)??0)+1;bt.set(i.id,a),i.id=a+"-"+i.id,St.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=V.get(i.id);if(a===void 0?V.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Kt(i.children,i),i.type==="space"){const s=i.width??1;for(let l=0;l{L.debug("Clear called"),ue(),rt={id:"root",type:"composite",children:[],columns:-1},V=new Map([["root",rt]]),vt=[],ct=new Map,St=[],bt=new Map},"clear");function Xt(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Xt,"typeStr2Type");function Ut(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Ut,"edgeTypeStr2Type");function jt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}d(jt,"edgeStrToEdgeData");var It=0,Re=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),ze=d(e=>{rt.children=e,Kt(e,rt),vt=rt.children},"setHierarchy"),Ae=d(e=>{const t=V.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Me=d(()=>[...V.values()],"getBlocksFlat"),Fe=d(()=>vt||[],"getBlocks"),We=d(()=>St,"getEdges"),Pe=d(e=>V.get(e),"getBlock"),Ye=d(e=>{V.set(e.id,e)},"setBlock"),He=d(()=>console,"getLogger"),Ke=d(function(){return ct},"getClasses"),Xe={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Ut,edgeStrToEdgeData:jt,getLogger:He,getBlocksFlat:Me,getBlocks:Fe,getEdges:We,setHierarchy:ze,getBlock:Pe,setBlock:Ye,getColumns:Ae,getClasses:Ke,clear:Oe,generateId:Re},Ue=Xe,nt=d((e,t)=>{const r=pe,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return fe(n,i,a,t)},"fade"),je=d(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${nt(e.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${nt(e.mainBkg,.5)}; + fill: ${nt(e.clusterBkg,.5)}; + stroke: ${nt(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${de()} +`,"getStyles"),Ve=je,Ge=d((e,t,r,n)=>{t.forEach(i=>{sr[i](e,r,n)})},"insertMarkers"),Ze=d((e,t,r)=>{L.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Je=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$e=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),tr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),er=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),rr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),ar=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),sr={extension:Ze,composition:qe,aggregation:Je,dependency:Qe,lollipop:$e,point:tr,circle:er,cross:rr,barb:ar},ir=Ge,Wt,Pt,I=((Pt=(Wt=z())==null?void 0:Wt.block)==null?void 0:Pt.padding)??8;function Vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}d(Vt,"calculateBlockPosition");var nr=d(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");function ot(e,t,r=0,n=0){var s,l,o,f,h,y,b,m,E,D,v;L.debug("setBlockSizes abc95 (start)",e.id,(s=e==null?void 0:e.size)==null?void 0:s.x,"block width =",e==null?void 0:e.size,"siblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((o=e.children)==null?void 0:o.length)>0){for(const S of e.children)ot(S,t);const T=nr(e);i=T.width,a=T.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const S of e.children)S.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${i} ${a} ${JSON.stringify(S.size)}`),S.size.width=i*(S.widthInColumns??1)+I*((S.widthInColumns??1)-1),S.size.height=a,S.size.x=0,S.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${i} maxHeight:${a}`));for(const S of e.children)ot(S,t,i,a);const k=e.columns??-1;let N=0;for(const S of e.children)N+=S.widthInColumns??1;let x=e.children.length;k>0&&k0?Math.min(e.children.length,k):e.children.length;if(S>0){const c=(u-S*I-I)/S;L.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,c);for(const _ of e.children)_.size&&(_.size.width=c)}}e.size={width:u,height:w,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(E=e==null?void 0:e.size)==null?void 0:E.width,(D=e==null?void 0:e.size)==null?void 0:D.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}d(ot,"setBlockSizes");function Et(e,t){var n,i,a,s,l,o,f,h,y,b,m,E,D,v,T,k,N;L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(a=e==null?void 0:e.size)==null?void 0:a.width}`);const r=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const x=((l=(s=e==null?void 0:e.children[0])==null?void 0:s.size)==null?void 0:l.width)??0,g=e.children.length*x+(e.children.length-1)*I;L.debug("widthOfChildren 88",g,"posX");let u=0;L.debug("abc91 block?.size?.x",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-I,S=0;for(const c of e.children){const _=e;if(!c.size)continue;const{width:p,height:A}=c.size,{px:O,py:X}=Vt(r,u);if(X!=S&&(S=X,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((E=e==null?void 0:e.size)==null?void 0:E.width)/2||0):-I,L.debug("New row in layout for block",e.id," and child ",c.id,S)),L.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${u} (px, py) ${O},${X} (${(D=_==null?void 0:_.size)==null?void 0:D.x},${(v=_==null?void 0:_.size)==null?void 0:v.y}) parent: ${_.id} width: ${p}${I}`),_.size){const W=p/2;c.size.x=w+I+W,L.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${W} padding=${I} width=${p} halfWidth=${W} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((c==null?void 0:c.widthInColumns)??1)/2}`),w=c.size.x+W,c.size.y=_.size.y-_.size.height/2+X*(A+I)+A/2+I,L.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${I}${W}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${p*((c==null?void 0:c.widthInColumns)??1)/2}`)}c.children&&Et(c),u+=(c==null?void 0:c.widthInColumns)??1,L.debug("abc88 columnsPos",c,u)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(T=e==null?void 0:e.size)==null?void 0:T.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:a,y:s,width:l,height:o}=e.size;a-l/2n&&(n=a+l/2),s+o/2>i&&(i=s+o/2)}if(e.children)for(const a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=_t(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}d(_t,"findBounds");function Gt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),L.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=_t(t),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}d(Gt,"layout");function wt(e,t){t&&e.attr("style",t)}d(wt,"applyStyle");function Zt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wt(a,e.labelStyle),a.attr("class",i),wt(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Zt,"addHtmlLabel");var lr=d(async(e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Z(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),L.debug("vertexText"+i);const a=await Se(xt(i)),s={isNode:n,label:a,labelStyle:t.replace("fill:","color:")};return Zt(s)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const l of s){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=l.trim(),a.appendChild(o)}return a}},"createLabel"),j=lr,cr=d((e,t,r,n,i)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),or={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,r,n,i,a)=>{const s=or[r];if(!s){L.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker"),mt={},P={},hr=d(async(e,t)=>{const r=z(),n=Z(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Yt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await j(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),mt[t.id]=a,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=await j(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startLeft=h,et(o,t.startLabelLeft)}if(t.startLabelRight){const f=await j(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=h.node().appendChild(f),y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startRight=h,et(o,t.startLabelRight)}if(t.endLabelLeft){const f=await j(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endLeft=h,et(o,t.endLabelLeft)}if(t.endLabelRight){const f=await j(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endRight=h,et(o,t.endLabelRight)}return i},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var dr=d((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=me(n);if(e.label){const a=mt[e.id];let s=e.x,l=e.y;if(r){const o=tt.calcLabelPosition(r);L.debug("Moving label "+e.label+" from (",s,",",l,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(s=o.x,l=o.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(e.startLabelLeft){const a=P[e.id].startLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){const a=P[e.id].startRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){const a=P[e.id].endLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){const a=P[e.id].endRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),gr=d((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,l=e.height/2;return i>=s||a>=l},"outsideNode"),ur=d((e,t,r)=>{L.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let l=r.xMath.abs(n-t.x)*o){let y=r.y{L.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(!gr(t,a)&&!i){const s=ur(t,n,a);let l=!1;r.forEach(o=>{l=l||o.x===s.x&&o.y===s.y}),r.some(o=>o.x===s.x&&o.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),pr=d(function(e,t,r,n,i,a,s){let l=r.points;L.debug("abc88 InsertEdge: edge=",r,"e=",t);let o=!1;const f=a.node(t.v);var h=a.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(L.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(L.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),o=!0);const y=l.filter(x=>!Number.isNaN(x.y));let b=be;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:E}=xe(r),D=ye().x(m).y(E).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=we(!0)),cr(T,r,k,s,i);let N={};return o&&(N.updatedPath=l),N.originalPath=r.points,N},"insertEdge"),fr=d(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),xr=d((e,t,r)=>{const n=fr(e),i=2,a=t.height+2*r.padding,s=a/i,l=t.width+2*s+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*o},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*o,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*o},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function qt(e,t){return e.intersect(t)}d(qt,"intersectNode");var yr=qt;function Jt(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,l=a-n.y,o=Math.sqrt(t*t*l*l+r*r*s*s),f=Math.abs(t*r*s/o);n.x0}d(Lt,"sameSign");var wr=te,mr=ee;function ee(e,t,r){var n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(E){s=Math.min(s,E.x),l=Math.min(l,E.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var o=n-e.width/2-s,f=i-e.height/2-l,h=0;h1&&a.sort(function(E,D){var v=E.x-r.x,T=E.y-r.y,k=Math.sqrt(v*v+T*T),N=D.x-r.x,x=D.y-r.y,g=Math.sqrt(N*N+x*x);return k{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,l=e.height/2,o,f;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),o=a===0?0:l*i/a,f=l):(i<0&&(s=-s),o=s,f=i===0?0:s*a/i),{x:r+o,y:n+f}},"intersectRect"),Sr=Lr,C={node:yr,circle:br,ellipse:Qt,polygon:mr,rect:Sr},F=d(async(e,t,r,n)=>{const i=z();let a;const s=t.useHtmlLabels||Z(i.flowchart.htmlLabels);r?a=r:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=o.node();let y;t.labelType==="markdown"?y=Yt(o,Tt(xt(f),i),{useHtmlLabels:s,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):y=h.appendChild(await j(Tt(xt(f),i),t.labelStyle,!1,n));let b=y.getBBox();const m=t.padding/2;if(Z(i.flowchart.htmlLabels)){const E=y.children[0],D=R(y),v=E.getElementsByTagName("img");if(v){const T=f.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(k=>new Promise(N=>{function x(){if(k.style.display="flex",k.style.flexDirection="column",T){const g=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(g,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";N(k)}d(x,"setupImage"),setTimeout(()=>{k.complete&&x()}),k.addEventListener("error",x),k.addEventListener("load",x)})))}b=E.getBoundingClientRect(),D.attr("width",b.width),D.attr("height",b.height)}return s?o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):o.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:o}},"labelHelper"),B=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function G(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(G,"insertPolygonShape");var vr=d(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:a}=await F(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,s),t.intersect=function(l){return C.rect(t,l)},n},"note"),Er=vr,zt=d(e=>e?" "+e:"","formatClass"),K=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];L.info("Question main (Circle)");const o=G(r,s,s,l);return o.attr("style",t.style),B(t,o),t.intersect=function(f){return L.warn("Intersect called"),C.polygon(t,l,f)},r},"question"),_r=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return C.circle(t,14,s)},r},"choice"),kr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=4,a=n.height+t.padding,s=a/i,l=n.width+2*s+t.padding,o=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"hexagon"),Dr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,a=n.height+2*t.padding,s=a/i,l=n.width+2*s+t.padding,o=xr(t.directions,n,t),f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"block_arrow"),Nr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return G(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_left_inv_arrow"),Tr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_right"),Cr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_left"),Br=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"trapezoid"),Ir=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"inv_trapezoid"),Or=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_right_inv_arrow"),Rr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+t.padding,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return B(t,f),t.intersect=function(h){const y=C.rect(t,h),b=y.x-t.x;if(a!=0&&(Math.abs(b)t.height/2-s)){let m=s*s*(1-b*b/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,h.y-t.y>0&&(m=-m),y.y+=m}return y},r},"cylinder"),zr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"rect"),Ar=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"composite"),Mr=d(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);L.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ht(n,t.props.borders,i,a),s.delete("borders")),s.forEach(l=>{L.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(s){return C.rect(t,s)},r},"labelRect");function ht(e,t,r,n){const i=[],a=d(l=>{i.push(l,0)},"addBorder"),s=d(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(L.debug("add top border"),a(r)):s(r),t.includes("r")?(L.debug("add right border"),a(n)):s(n),t.includes("b")?(L.debug("add bottom border"),a(r)):s(r),t.includes("l")?(L.debug("add left border"),a(n)):s(n),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var Fr=d(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof l=="object"?o=l[0]:o=l,L.info("Label text abc79",o,l,typeof l=="object");const f=s.node().appendChild(await j(o,t.labelStyle,!0,!0));let h={width:0,height:0};if(Z(z().flowchart.htmlLabels)){const D=f.children[0],v=R(f);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}L.info("Text 2",l);const y=l.slice(1,l.length);let b=f.getBBox();const m=s.node().appendChild(await j(y.join?y.join("
"):y,t.labelStyle,!0,!0));if(Z(z().flowchart.htmlLabels)){const D=m.children[0],v=R(m);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}const E=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+E+5)+")"),R(f).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.height+t.padding,a=n.width+i/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return B(t,s),t.intersect=function(l){return C.rect(t,l)},r},"stadium"),Pr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),B(t,a),t.intersect=function(s){return L.info("Circle intersect",t,n.width/2+i,s),C.circle(t,n.width/2+i,s)},r},"circle"),Yr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+a).attr("width",n.width+t.padding+a*2).attr("height",n.height+t.padding+a*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return L.info("DoubleCircle intersect",t,n.width/2+i+a,f),C.circle(t,n.width/2+i+a,f)},r},"doublecircle"),Hr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"subroutine"),Kr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return C.circle(t,7,i)},r},"start"),Mt=d((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return B(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return C.rect(t,l)},n},"forkJoin"),Xr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(a){return C.circle(t,7,a)},r},"end"),Ur=d(async(e,t)=>{var S;const r=t.padding/2,n=4,i=8;let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),o=s.insert("line"),f=s.insert("line");let h=0,y=n;const b=s.insert("g").attr("class","label");let m=0;const E=(S=t.classData.annotations)==null?void 0:S[0],D=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",v=b.node().appendChild(await j(D,t.labelStyle,!0,!0));let T=v.getBBox();if(Z(z().flowchart.htmlLabels)){const c=v.children[0],_=R(v);T=c.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}t.classData.annotations[0]&&(y+=T.height+n,h+=T.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const N=b.node().appendChild(await j(k,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let x=N.getBBox();if(Z(z().flowchart.htmlLabels)){const c=N.children[0],_=R(N);x=c.getBoundingClientRect(),_.attr("width",x.width),_.attr("height",x.height)}y+=x.height+n,x.width>h&&(h=x.width);const g=[];t.classData.members.forEach(async c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(await j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,g.push(A)}),y+=i;const u=[];if(t.classData.methods.forEach(async c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(await j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,u.push(A)}),y+=i,E){let c=(h-T.width)/2;R(v).attr("transform","translate( "+(-1*h/2+c)+", "+-1*y/2+")"),m=T.height+n}let w=(h-x.width)/2;return R(N).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*y/2+m)+")"),m+=x.height+n,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,g.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m+i/2)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,u.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(y/2)-r).attr("width",h+t.padding).attr("height",y+t.padding),B(t,l),t.intersect=function(c){return C.rect(t,c)},s},"class_box"),Ft={rhombus:At,composite:Ar,question:At,rect:zr,labelRect:Mr,rectWithTitle:Fr,choice:_r,circle:Pr,doublecircle:Yr,stadium:Wr,hexagon:kr,block_arrow:Dr,rect_left_inv_arrow:Nr,lean_right:Tr,lean_left:Cr,trapezoid:Br,inv_trapezoid:Ir,rect_right_inv_arrow:Or,cylinder:Rr,start:Kr,end:Xr,note:Er,subroutine:Hr,fork:Mt,join:Mt,class_box:Ur},lt={},re=d(async(e,t,r)=>{let n,i;if(t.link){let a;z().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),i=await Ft[t.shape](n,t,r)}else i=await Ft[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),jr=d(e=>{const t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function kt(e,t,r=!1){var b,m,E;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const o=ve((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:o.labelStyle,shape:s,labelText:f,rx:a,ry:a,class:i,style:o.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((E=(m=at())==null?void 0:m.block)==null?void 0:E.padding)??0}}d(kt,"getNodeFromBlock");async function ae(e,t,r){const n=kt(t,r,!1);if(n.type==="group")return;const i=at(),a=await re(e,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}d(ae,"calculateBlockSize");async function se(e,t,r){const n=kt(t,r,!0);if(r.getBlock(n.id).type!=="space"){const a=at();await re(e,n,{config:a}),t.intersect=n==null?void 0:n.intersect,jr(n)}}d(se,"insertBlockPositioned");async function dt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await dt(e,i.children,r,n)}d(dt,"performOperations");async function ie(e,t,r){await dt(e,t,r,ae)}d(ie,"calculateBlockSizes");async function ne(e,t,r){await dt(e,t,r,se)}d(ne,"insertBlocks");async function le(e,t,r,n,i){const a=new _e({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const l=n.getBlock(s.start),o=n.getBlock(s.end);if(l!=null&&l.size&&(o!=null&&o.size)){const f=l.size,h=o.size,y=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];pr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await hr(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),dr({...s,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(le,"insertEdges");var Vr=d(function(e,t){return t.db.getClasses()},"getClasses"),Gr=d(async function(e,t,r,n){const{securityLevel:i,block:a}=at(),s=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const o=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?o.select(`[id="${t}"]`):R(`[id="${t}"]`);ir(f,["point","circle","cross"],n.type,t);const y=s.getBlocks(),b=s.getBlocksFlat(),m=s.getEdges(),E=f.insert("g").attr("class","block");await ie(E,y,s);const D=Gt(s);if(await ne(E,y,s),await le(E,m,b,s,t),D){const v=D,T=Math.max(1,Math.round(.125*(v.width/v.height))),k=v.height+T+10,N=v.width+10,{useMaxWidth:x}=a;ge(f,k,N,!!x),L.debug("Here Bounds",D,v),f.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Zr={draw:Gr,getClasses:Vr},na={parser:ke,db:Ue,renderer:Zr,styles:Ve};export{na as diagram}; diff --git a/lightrag/api/webui/assets/c4Diagram-VJAJSXHY-BpY1T-jk.js b/lightrag/api/webui/assets/c4Diagram-6F6E4RAY-B6hTg9H8.js similarity index 76% rename from lightrag/api/webui/assets/c4Diagram-VJAJSXHY-BpY1T-jk.js rename to lightrag/api/webui/assets/c4Diagram-6F6E4RAY-B6hTg9H8.js index 01f3a0c0..0c5cfa01 100644 --- a/lightrag/api/webui/assets/c4Diagram-VJAJSXHY-BpY1T-jk.js +++ b/lightrag/api/webui/assets/c4Diagram-6F6E4RAY-B6hTg9H8.js @@ -1,9 +1,9 @@ -import{g as Se,d as De}from"./chunk-D6G4REZN-CGaqGId9.js";import{_ as g,s as Pe,g as Be,a as Ie,b as Me,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,n as fe}from"./mermaid-vendor-D0f_SE0h.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],n=[1,28],r=[1,63],i=[1,64],a=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,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,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,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,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,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,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:i,37:a,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:n,34:r,36:i,37:a,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +import{g as Se,d as De}from"./chunk-67H74DCK-Bze2qmzX.js";import{_ as g,s as Pe,g as Be,a as Ie,b as Me,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,n as fe}from"./mermaid-vendor-DOoA-Fcm.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,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,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,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,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,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,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,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:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=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),v.length-1&&(this.yylineno-=v.length-1);var R=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:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+` `+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hm[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,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,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ae="",ie=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,n,r,i,a){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]={text:y}}else u.descr={text:n};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.tags=i;if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]=y}else u.link=a;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,n,r){if(t===null||s===null)return;let i={};const a=V.find(u=>u.alias===t);if(a&&t===a.alias?i=a:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];i[u]={text:d}}else i.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];i[u]=d}else i.sprite=l;if(typeof n=="object"){let[u,d]=Object.entries(n)[0];i[u]=d}else i.tags=n;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];i[u]=d}else i.link=r;i.typeC4Shape={text:e},i.parentBoundary=B,i.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,V.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.techn={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof n=="object"){let[d,f]=Object.entries(n)[0];a[d]=f}else a.sprite=n;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.wrap=mt(),a.typeC4Shape={text:e},a.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,V.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.techn={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof n=="object"){let[d,f]=Object.entries(n)[0];a[d]=f}else a.sprite=n;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.wrap=mt(),a.typeC4Shape={text:e},a.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let n={};const r=X.find(i=>i.alias===e);if(r&&e===r.alias?n=r:(n.alias=e,X.push(n)),t==null?n.label={text:""}:n.label={text:t},s==null)n.type={text:"system"};else if(typeof s=="object"){let[i,a]=Object.entries(s)[0];n[i]={text:a}}else n.type={text:s};if(typeof o=="object"){let[i,a]=Object.entries(o)[0];n[i]=a}else n.tags=o;if(typeof l=="object"){let[i,a]=Object.entries(l)[0];n[i]=a}else n.link=l;n.parentBoundary=B,n.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let n={};const r=X.find(i=>i.alias===e);if(r&&e===r.alias?n=r:(n.alias=e,X.push(n)),t==null?n.label={text:""}:n.label={text:t},s==null)n.type={text:"container"};else if(typeof s=="object"){let[i,a]=Object.entries(s)[0];n[i]={text:a}}else n.type={text:s};if(typeof o=="object"){let[i,a]=Object.entries(o)[0];n[i]=a}else n.tags=o;if(typeof l=="object"){let[i,a]=Object.entries(l)[0];n[i]=a}else n.link=l;n.parentBoundary=B,n.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,X.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.type={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.nodeType=e,a.parentBoundary=B,a.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,n,r,i,a,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.shadowing=n;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.sprite=i;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.techn=a;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,n,r){const i=It.find(a=>a.from===t&&a.to===s);if(i!==void 0){if(o!=null)if(typeof o=="object"){let[a,u]=Object.entries(o)[0];i[a]=u}else i.textColor=o;if(l!=null)if(typeof l=="object"){let[a,u]=Object.entries(l)[0];i[a]=u}else i.lineColor=l;if(n!=null)if(typeof n=="object"){let[a,u]=Object.entries(n)[0];i[a]=parseInt(u)}else i.offsetX=parseInt(n);if(r!=null)if(typeof r=="object"){let[a,u]=Object.entries(r)[0];i[a]=parseInt(u)}else i.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const n=Object.values(t)[0];o=parseInt(n)}else o=parseInt(t);if(typeof s=="object"){const n=Object.values(s)[0];l=parseInt(n)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),n0=g(function(){return B},"getCurrentBoundaryParse"),a0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),i0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ae},"getTitle"),c0=g(function(e){ie=e},"setWrap"),mt=g(function(){return ie},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ae="",ie=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ae=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:i0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:n0,getParentBoundaryParse:a0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Me,getAccTitle:Ie,getAccDescription:Be,setAccDescription:Pe,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return De(e,t)},"drawRect"),me=g(function(e,t,s,o,l,n){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let i=n.startsWith("data:image/png;base64")?n:Ye.sanitizeUrl(n);r.attr("xlink:href",i)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let n of t){let r=n.textColor?n.textColor:"#444444",i=n.lineColor?n.lineColor:"#444444",a=n.offsetX?parseInt(n.offsetX):0,u=n.offsetY?parseInt(n.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",n.startPoint.x),y.attr("y1",n.startPoint.y),y.attr("x2",n.endPoint.x),y.attr("y2",n.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",i),y.style("fill","none"),n.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),n.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(n.label.text,o,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+a,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+u,n.label.width,n.label.height,{fill:r},f),n.techn&&n.techn.text!==""&&(f=s.messageFont(),Q(s)("["+n.techn.text+"]",o,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+a,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+s.messageFontSize+5+u,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",n=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",i={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(i={"stroke-width":1});let a={x:t.x,y:t.y,fill:l,stroke:n,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:i};re(o,a);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],n=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const i=e.append("g");i.attr("class","person-man");const a=Se();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":a.x=t.x,a.y=t.y,a.fill=o,a.width=t.width,a.height=t.height,a.stroke=l,a.rx=2.5,a.ry=2.5,a.attrs={"stroke-width":.5},re(i,a);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":i.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),i.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":i.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),i.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(i.append("text").attr("fill",n).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(i,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=n,Q(s)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:n},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=n,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,i,t.x,t.y+t.techn.Y,t.width,t.height,{fill:n,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:n,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=n,Q(s)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:n},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,n,r,i,a,u,d){const f=n.append("text").attr("x",r+a/2).attr("y",i+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,n,r,i,a,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ne(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ne=g(function(e){Ne(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=je(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=fe(t[e].text,o);else{let n=t[e].text.split($t.lineBreakRegex);t[e].textLines=n.length;let r=0;t[e].height=0,t[e].width=0;for(const i of n)t[e].width=Math.max(Tt(i,o),t[e].width),r=fe(i,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let n=Tt(t.label.text,l);j("label",t,o,l,n),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const n of o){l=0;const r=s[n];let i=Pt(_,r.typeC4Shape.text);switch(i.fontSize=i.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",i),r.typeC4Shape.height=i.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let a=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,a,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,a,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,a,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,a,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,n=t.y,r=s+e.width/2,i=o+e.height/2,a=Math.abs(s-l),u=Math.abs(o-n),d=u/a,f=e.height/e.width,y=null;return o==n&&sl?y=new Y(s,i):s==l&&on&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,i+d*e.width/2):y=new Y(r-a/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,i+d*e.width/2):y=new Y(r+a/u*e.height/2,o+e.height):sn?f>=d?y=new Y(s+e.width,i-d*e.width/2):y=new Y(r+e.height/2*a/u,o):s>l&&o>n&&(f>=d?y=new Y(s,i-e.width/2*d):y=new Y(r-e.height/2*a/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let n of t){l=l+1;let r=n.wrap&&_.wrap,i=T0(_);o.db.getC4Type()==="C4Dynamic"&&(n.label.text=l+": "+n.label.text);let u=Tt(n.label.text,i);j("label",n,r,i,u),n.techn&&n.techn.text!==""&&(u=Tt(n.techn.text,i),j("techn",n,r,i,u)),n.descr&&n.descr.text!==""&&(u=Tt(n.descr.text,i),j("descr",n,r,i,u));let d=s(n.from),f=s(n.to),y=O0(d,f);n.startPoint=y.startPoint,n.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let n=new Ee(l);n.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,i]of o.entries()){let a=0;i.image={width:0,height:0,Y:0},i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=a,a=i.image.Y+i.image.height);let u=i.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",i,u,d,n.data.widthLimit),i.label.Y=a+8,a=i.label.Y+i.label.height,i.type&&i.type.text!==""){i.type.text="["+i.type.text+"]";let O=Ut(_);j("type",i,u,O,n.data.widthLimit),i.type.Y=a+5,a=i.type.Y+i.type.height}if(i.descr&&i.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",i,u,O,n.data.widthLimit),i.descr.Y=a+20,a=i.descr.Y+i.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+a;n.setData(O,O,S,S)}else{let O=n.data.stopx!==n.data.startx?n.data.stopx+_.diagramMarginX:n.data.startx,S=n.data.starty;n.setData(O,O,S,S)}n.name=i.alias;let f=l.db.getC4ShapeArray(i.alias),y=l.db.getC4ShapeKeys(i.alias);y.length>0&&Ae(n,e,f,y),t=i.alias;let E=l.db.getBoundarys(t);E.length>0&&se(e,t,n,E,l),i.alias!=="global"&&ke(e,i,n),s.data.stopy=Math.max(n.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(n.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let n;l==="sandbox"&&(n=jt("#i"+t));const r=l==="sandbox"?jt(n.nodes()[0].contentDocument.body):jt("body");let i=o.db;o.db.setWrap(_.wrap),ve=i.getC4ShapeInRow(),ee=i.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(_,null,2)}`);const a=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(a),z.insertDatabaseIcon(a),z.insertClockIcon(a);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundarys("");se(a,"",u,f,o),z.insertArrowHead(a),z.insertArrowEnd(a),z.insertArrowCrossHead(a),z.insertArrowFilledHead(a),R0(a,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&a.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Le(a,O,P,_.useMaxWidth);const M=d?60:0;a.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),de.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ne,draw:S0},D0=g(e=>`.person { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,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,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,a,r,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]={text:y}}else u.descr={text:a};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]=y}else u.tags=n;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.link=i;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,a,r){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.tags=a;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.link=r;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,a,r,n,i,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.shadowing=a;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.techn=i;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,a,r){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(a);if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const a=Object.values(t)[0];o=parseInt(a)}else o=parseInt(t);if(typeof s=="object"){const a=Object.values(s)[0];l=parseInt(a)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),a0=g(function(){return B},"getCurrentBoundaryParse"),i0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),n0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ie},"getTitle"),c0=g(function(e){ne=e},"setWrap"),mt=g(function(){return ne},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ie=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Me,getAccTitle:Ie,getAccDescription:Be,setAccDescription:Pe,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return De(e,t)},"drawRect"),me=g(function(e,t,s,o,l,a){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let n=a.startsWith("data:image/png;base64")?a:Ye.sanitizeUrl(a);r.attr("xlink:href",n)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",n=a.lineColor?a.lineColor:"#444444",i=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",a.startPoint.x),y.attr("y1",a.startPoint.y),y.attr("x2",a.endPoint.x),y.attr("y2",a.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",n),y.style("fill","none"),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",n).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(a.label.text,o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:r},f),a.techn&&a.techn.text!==""&&(f=s.messageFont(),Q(s)("["+a.techn.text+"]",o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};re(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=Se();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},re(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=a,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,a,r,n,i,u,d){const f=a.append("text").attr("x",r+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,a,r,n,i,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ae=g(function(e){Ne(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=je(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=fe(t[e].text,o);else{let a=t[e].text.split($t.lineBreakRegex);t[e].textLines=a.length;let r=0;t[e].height=0,t[e].width=0;for(const n of a)t[e].width=Math.max(Tt(n,o),t[e].width),r=fe(n,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let a=Tt(t.label.text,l);j("label",t,o,l,a),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const a of o){l=0;const r=s[a];let n=Pt(_,r.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",n),r.typeC4Shape.height=n.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let i=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,i,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,i,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,i,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,i,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,a=t.y,r=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-a),d=u/i,f=e.height/e.width,y=null;return o==a&&sl?y=new Y(s,n):s==l&&oa&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,n+d*e.width/2):y=new Y(r-i/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,n+d*e.width/2):y=new Y(r+i/u*e.height/2,o+e.height):sa?f>=d?y=new Y(s+e.width,n-d*e.width/2):y=new Y(r+e.height/2*i/u,o):s>l&&o>a&&(f>=d?y=new Y(s,n-e.width/2*d):y=new Y(r-e.height/2*i/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let a of t){l=l+1;let r=a.wrap&&_.wrap,n=T0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=l+": "+a.label.text);let u=Tt(a.label.text,n);j("label",a,r,n,u),a.techn&&a.techn.text!==""&&(u=Tt(a.techn.text,n),j("techn",a,r,n,u)),a.descr&&a.descr.text!==""&&(u=Tt(a.descr.text,n),j("descr",a,r,n,u));let d=s(a.from),f=s(a.to),y=O0(d,f);a.startPoint=y.startPoint,a.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let a=new Ee(l);a.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,a.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,a.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,a.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;a.setData(O,O,S,S)}else{let O=a.data.stopx!==a.data.startx?a.data.stopx+_.diagramMarginX:a.data.startx,S=a.data.starty;a.setData(O,O,S,S)}a.name=n.alias;let f=l.db.getC4ShapeArray(n.alias),y=l.db.getC4ShapeKeys(n.alias);y.length>0&&Ae(a,e,f,y),t=n.alias;let E=l.db.getBoundaries(t);E.length>0&&se(e,t,a,E,l),n.alias!=="global"&&ke(e,n,a),s.data.stopy=Math.max(a.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(a.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let a;l==="sandbox"&&(a=jt("#i"+t));const r=l==="sandbox"?jt(a.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i),z.insertDatabaseIcon(i),z.insertClockIcon(i);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundaries("");se(i,"",u,f,o),z.insertArrowHead(i),z.insertArrowEnd(i),z.insertArrowCrossHead(i),z.insertArrowFilledHead(i),R0(i,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Le(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),de.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ae,draw:S0},D0=g(e=>`.person { stroke: ${e.personBorder}; fill: ${e.personBkg}; } diff --git a/lightrag/api/webui/assets/chunk-4BMEZGHF-CAhtCpmT.js b/lightrag/api/webui/assets/chunk-353BL4L5-Dc2iugoC.js similarity index 78% rename from lightrag/api/webui/assets/chunk-4BMEZGHF-CAhtCpmT.js rename to lightrag/api/webui/assets/chunk-353BL4L5-Dc2iugoC.js index 50ce15aa..4dbeb981 100644 --- a/lightrag/api/webui/assets/chunk-4BMEZGHF-CAhtCpmT.js +++ b/lightrag/api/webui/assets/chunk-353BL4L5-Dc2iugoC.js @@ -1 +1 @@ -import{_ as l}from"./mermaid-vendor-D0f_SE0h.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; +import{_ as l}from"./mermaid-vendor-DOoA-Fcm.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; diff --git a/lightrag/api/webui/assets/chunk-D6G4REZN-CGaqGId9.js b/lightrag/api/webui/assets/chunk-67H74DCK-Bze2qmzX.js similarity index 80% rename from lightrag/api/webui/assets/chunk-D6G4REZN-CGaqGId9.js rename to lightrag/api/webui/assets/chunk-67H74DCK-Bze2qmzX.js index 03f6dcdc..3bb8675d 100644 --- a/lightrag/api/webui/assets/chunk-D6G4REZN-CGaqGId9.js +++ b/lightrag/api/webui/assets/chunk-67H74DCK-Bze2qmzX.js @@ -1 +1 @@ -import{_ as n,a1 as x,j as l}from"./mermaid-vendor-D0f_SE0h.js";var c=n((a,t)=>{const e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((a,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(a,e).lower()},"drawBackgroundRect"),g=n((a,t)=>{const e=t.text.replace(x," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),h=n((a,t,e,r)=>{const s=a.append("image");s.attr("x",t),s.attr("y",e);const i=l.sanitizeUrl(r);s.attr("xlink:href",i)},"drawImage"),m=n((a,t,e,r)=>{const s=a.append("use");s.attr("x",t),s.attr("y",e);const i=l.sanitizeUrl(r);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{d as a,p as b,m as c,c as d,h as e,g as f,y as g}; +import{_ as n,a2 as o,j as l}from"./mermaid-vendor-DOoA-Fcm.js";var x=n((a,t)=>{const e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((a,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(a,e).lower()},"drawBackgroundRect"),g=n((a,t)=>{const e=t.text.replace(o," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),h=n((a,t,e,r)=>{const s=a.append("image");s.attr("x",t),s.attr("y",e);const i=l.sanitizeUrl(r);s.attr("xlink:href",i)},"drawImage"),m=n((a,t,e,r)=>{const s=a.append("use");s.attr("x",t),s.attr("y",e);const i=l.sanitizeUrl(r);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{d as a,p as b,m as c,x as d,h as e,g as f,y as g}; diff --git a/lightrag/api/webui/assets/chunk-6OLS64BW-DUM-o2FJ.js b/lightrag/api/webui/assets/chunk-6OLS64BW-DUM-o2FJ.js new file mode 100644 index 00000000..75845d5d --- /dev/null +++ b/lightrag/api/webui/assets/chunk-6OLS64BW-DUM-o2FJ.js @@ -0,0 +1,220 @@ +import{g as te}from"./chunk-BFAMUDN2-DUbWdDRU.js";import{s as ee}from"./chunk-SKB7J2MH-CncvyOyo.js";import{_ as f,l as D,c as F,r as se,u as ie,a as re,b as ae,g as ne,s as oe,q as le,t as ce,a1 as he,k as z,z as ue}from"./mermaid-vendor-DOoA-Fcm.js";var vt=function(){var e=f(function(V,o,h,n){for(h=h||{},n=V.length;n--;h[V[n]]=o);return h},"o"),t=[1,2],s=[1,3],a=[1,4],i=[2,4],l=[1,9],d=[1,11],S=[1,16],p=[1,17],T=[1,18],_=[1,19],m=[1,33],k=[1,20],A=[1,21],$=[1,22],x=[1,23],R=[1,24],u=[1,26],L=[1,27],I=[1,28],N=[1,29],G=[1,30],P=[1,31],B=[1,32],at=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],K=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(o,h,n,g,E,r,Z){var c=r.length-1;switch(E){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const tt=r[c-1];tt.description=g.trimColon(r[c]),this.$=tt;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var U=r[c],X=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");U=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:s,6:a},{1:[3]},{3:5,4:t,5:s,6:a},{3:6,4:t,5:s,6:a},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:l,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:p,19:T,22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,7]),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(y,[2,11]),e(y,[2,12],{14:[1,40],15:[1,41]}),e(y,[2,16]),{18:[1,42]},e(y,[2,18],{20:[1,43]}),{23:[1,44]},e(y,[2,22]),e(y,[2,23]),e(y,[2,24]),e(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(y,[2,28]),{34:[1,49]},{36:[1,50]},e(y,[2,31]),{13:51,24:m,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(ct,[2,44],{58:[1,56]}),e(ct,[2,45],{58:[1,57]}),e(y,[2,38]),e(y,[2,39]),e(y,[2,40]),e(y,[2,41]),e(y,[2,6]),e(y,[2,13]),{13:58,24:m,57:K},e(y,[2,17]),e(xt,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(y,[2,29]),e(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(y,[2,14],{14:[1,71]}),{4:l,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,21:[1,72],22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(y,[2,34]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),e(ct,[2,46]),e(ct,[2,47]),e(y,[2,15]),e(y,[2,19]),e(xt,i,{7:78}),e(y,[2,26]),e(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:l,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,21:[1,81],22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:ot,54:lt,57:K},e(y,[2,32]),e(y,[2,33]),e(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=h,n}},"parseError"),parse:f(function(o){var h=this,n=[0],g=[],E=[null],r=[],Z=this.table,c="",U=0,X=0,ut=2,tt=1,Tt=r.slice.call(arguments,1),b=Object.create(this.lexer),j={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(j.yy[Et]=this.yy[Et]);b.setInput(o,j.yy),j.yy.lexer=b,j.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var _t=b.yylloc;r.push(_t);var Qt=b.options&&b.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(O){n.length=n.length-2*O,E.length=E.length-O,r.length=r.length-O}f(Zt,"popStack");function Lt(){var O;return O=g.pop()||b.lex()||tt,typeof O!="number"&&(O instanceof Array&&(g=O,O=g.pop()),O=h.symbols_[O]||O),O}f(Lt,"lex");for(var C,H,w,mt,J={},dt,Y,Ot,ft;;){if(H=n[n.length-1],this.defaultActions[H]?w=this.defaultActions[H]:((C===null||typeof C>"u")&&(C=Lt()),w=Z[H]&&Z[H][C]),typeof w>"u"||!w.length||!w[0]){var Dt="";ft=[];for(dt in Z[H])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");b.showPosition?Dt="Parse error on line "+(U+1)+`: +`+b.showPosition()+` +Expecting `+ft.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Dt="Parse error on line "+(U+1)+": Unexpected "+(C==tt?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(Dt,{text:b.match,token:this.terminals_[C]||C,line:b.yylineno,loc:_t,expected:ft})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+C);switch(w[0]){case 1:n.push(C),E.push(b.yytext),r.push(b.yylloc),n.push(w[1]),C=null,X=b.yyleng,c=b.yytext,U=b.yylineno,_t=b.yylloc;break;case 2:if(Y=this.productions_[w[1]][1],J.$=E[E.length-Y],J._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},Qt&&(J._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(J,[c,X,U,j.yy,w[1],E,r].concat(Tt)),typeof mt<"u")return mt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),r=r.slice(0,-1*Y)),n.push(this.productions_[w[1]][0]),E.push(J.$),r.push(J._$),Ot=Z[n[n.length-2]][n[n.length-1]],n.push(Ot);break;case 3:return!0}}return!0},"parse")},qt=function(){var V={EOF:1,parseError:f(function(h,n){if(this.yy.parser)this.yy.parser.parseError(h,n);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var g=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),n.length-1&&(this.yylineno-=n.length-1);var E=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:n?(n.length===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:f(function(o,h){var n,g,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],n=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in E)this[r]=E[r];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,n,g;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),r=0;rh[0].length)){if(h=n,g=r,this.options.backtrack_lexer){if(o=this.test_match(n,E[r]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,E[g]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(h,n,g,E){switch(g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 70:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return n.yytext=n.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};return V}();gt.lexer=qt;function ht(){this.yy={}}return f(ht,"Parser"),ht.prototype=gt,gt.Parser=ht,new ht}();vt.parser=vt;var Be=vt,de="TB",Yt="TB",Rt="dir",Q="state",q="root",Ct="relation",fe="classDef",pe="style",Se="applyClass",it="default",Gt="divider",Bt="fill:none",Vt="fill: #333",Mt="c",Ut="text",jt="normal",bt="rect",kt="rectWithTitle",ye="stateStart",ge="stateEnd",It="divider",Nt="roundedWithTitle",Te="note",Ee="noteGroup",rt="statediagram",_e="state",me=`${rt}-${_e}`,Ht="transition",De="note",be="note-edge",ke=`${Ht} ${be}`,ve=`${rt}-${De}`,Ce="cluster",Ae=`${rt}-${Ce}`,xe="cluster-alt",Le=`${rt}-${xe}`,zt="parent",Wt="note",Oe="state",At="----",Re=`${At}${Wt}`,wt=`${At}${zt}`,Kt=f((e,t=Yt)=>{if(!e.doc)return t;let s=t;for(const a of e.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir"),Ie=f(function(e,t){return t.db.getClasses()},"getClasses"),Ne=f(async function(e,t,s,a){D.info("REF0:"),D.info("Drawing state diagram (v2)",t);const{securityLevel:i,state:l,layout:d}=F();a.db.extract(a.db.getRootDocV2());const S=a.db.getData(),p=te(t,i);S.type=a.type,S.layoutAlgorithm=d,S.nodeSpacing=(l==null?void 0:l.nodeSpacing)||50,S.rankSpacing=(l==null?void 0:l.rankSpacing)||50,S.markers=["barb"],S.diagramId=t,await se(S,p);const T=8;try{(typeof a.db.getLinks=="function"?a.db.getLinks():new Map).forEach((m,k)=>{var I;const A=typeof k=="string"?k:typeof(k==null?void 0:k.id)=="string"?k.id:"";if(!A){D.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(k));return}const $=(I=p.node())==null?void 0:I.querySelectorAll("g");let x;if($==null||$.forEach(N=>{var P;((P=N.textContent)==null?void 0:P.trim())===A&&(x=N)}),!x){D.warn("⚠️ Could not find node matching text:",A);return}const R=x.parentNode;if(!R){D.warn("⚠️ Node has no parent, cannot wrap:",A);return}const u=document.createElementNS("http://www.w3.org/2000/svg","a"),L=m.url.replace(/^"+|"+$/g,"");if(u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",L),u.setAttribute("target","_blank"),m.tooltip){const N=m.tooltip.replace(/^"+|"+$/g,"");u.setAttribute("title",N)}R.replaceChild(u,x),u.appendChild(x),D.info("🔗 Wrapped node in tag for:",A,m.url)})}catch(_){D.error("❌ Error injecting clickable links:",_)}ie.insertTitle(p,"statediagramTitleText",(l==null?void 0:l.titleTopMargin)??25,a.db.getDiagramTitle()),ee(p,T,rt,(l==null?void 0:l.useMaxWidth)??!0)},"draw"),Ve={getClasses:Ie,draw:Ne,getDir:Kt},St=new Map,M=0;function yt(e="",t=0,s="",a=At){const i=s!==null&&s.length>0?`${a}${s}`:"";return`${Oe}-${e}${i}-${t}`}f(yt,"stateDomId");var we=f((e,t,s,a,i,l,d,S)=>{D.trace("items",t),t.forEach(p=>{switch(p.stmt){case Q:st(e,p,s,a,i,l,d,S);break;case it:st(e,p,s,a,i,l,d,S);break;case Ct:{st(e,p.state1,s,a,i,l,d,S),st(e,p.state2,s,a,i,l,d,S);const T={id:"edge"+M,start:p.state1.id,end:p.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Bt,labelStyle:"",label:z.sanitizeText(p.description??"",F()),arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:jt,classes:Ht,look:d};i.push(T),M++}break}})},"setupDoc"),$t=f((e,t=Yt)=>{let s=t;if(e.doc)for(const a of e.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir");function et(e,t,s){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{const l=s.get(i);l&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...l.styles])}));const a=e.find(i=>i.id===t.id);a?Object.assign(a,t):e.push(t)}f(et,"insertOrUpdateNode");function Xt(e){var t;return((t=e==null?void 0:e.classes)==null?void 0:t.join(" "))??""}f(Xt,"getClassesFromDbInfo");function Jt(e){return(e==null?void 0:e.styles)??[]}f(Jt,"getStylesFromDbInfo");var st=f((e,t,s,a,i,l,d,S)=>{var A,$,x;const p=t.id,T=s.get(p),_=Xt(T),m=Jt(T),k=F();if(D.info("dataFetcher parsedItem",t,T,m),p!=="root"){let R=bt;t.start===!0?R=ye:t.start===!1&&(R=ge),t.type!==it&&(R=t.type),St.get(p)||St.set(p,{id:p,shape:R,description:z.sanitizeText(p,k),cssClasses:`${_} ${me}`,cssStyles:m});const u=St.get(p);t.description&&(Array.isArray(u.description)?(u.shape=kt,u.description.push(t.description)):(A=u.description)!=null&&A.length&&u.description.length>0?(u.shape=kt,u.description===p?u.description=[t.description]:u.description=[u.description,t.description]):(u.shape=bt,u.description=t.description),u.description=z.sanitizeTextOrArray(u.description,k)),(($=u.description)==null?void 0:$.length)===1&&u.shape===kt&&(u.type==="group"?u.shape=Nt:u.shape=bt),!u.type&&t.doc&&(D.info("Setting cluster for XCX",p,$t(t)),u.type="group",u.isGroup=!0,u.dir=$t(t),u.shape=t.type===Gt?It:Nt,u.cssClasses=`${u.cssClasses} ${Ae} ${l?Le:""}`);const L={labelStyle:"",shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:p,dir:u.dir,domId:yt(p,M),type:u.type,isGroup:u.type==="group",padding:8,rx:10,ry:10,look:d};if(L.shape===It&&(L.label=""),e&&e.id!=="root"&&(D.trace("Setting node ",p," to be child of its parent ",e.id),L.parentId=e.id),L.centerLabel=!0,t.note){const I={labelStyle:"",shape:Te,label:t.note.text,cssClasses:ve,cssStyles:[],cssCompiledStyles:[],id:p+Re+"-"+M,domId:yt(p,M,Wt),type:u.type,isGroup:u.type==="group",padding:(x=k.flowchart)==null?void 0:x.padding,look:d,position:t.note.position},N=p+wt,G={labelStyle:"",shape:Ee,label:t.note.text,cssClasses:u.cssClasses,cssStyles:[],id:p+wt,domId:yt(p,M,zt),type:"group",isGroup:!0,padding:16,look:d,position:t.note.position};M++,G.id=N,I.parentId=N,et(a,G,S),et(a,I,S),et(a,L,S);let P=p,B=I.id;t.note.position==="left of"&&(P=I.id,B=p),i.push({id:P+"-"+B,start:P,end:B,arrowhead:"none",arrowTypeEnd:"",style:Bt,labelStyle:"",classes:ke,arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:jt,look:d})}else et(a,L,S)}t.doc&&(D.trace("Adding nodes children "),we(t,t.doc,s,a,i,!l,d,S))},"dataFetcher"),$e=f(()=>{St.clear(),M=0},"reset"),v={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Pt=f(()=>new Map,"newClassesList"),Ft=f(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),pt=f(e=>JSON.parse(JSON.stringify(e)),"clone"),W,Me=(W=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Pt(),this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=re,this.setAccTitle=ae,this.getAccDescription=ne,this.setAccDescription=oe,this.setDiagramTitle=le,this.getDiagramTitle=ce,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case Q:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Ct:this.addRelation(i.state1,i.state2,i.description);break;case fe:this.addStyleClass(i.id.trim(),i.classes);break;case pe:this.handleStyleDef(i);break;case Se:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}const s=this.getStates(),a=F();$e(),st(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,a.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const s=t.id.trim().split(","),a=t.styleClass.split(",");for(const i of s){let l=this.getState(i);if(!l){const d=i.trim();this.addState(d),l=this.getState(d)}l&&(l.styles=a.map(d=>{var S;return(S=d.replace(/;/g,""))==null?void 0:S.trim()}))}}setRootDoc(t){D.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,s,a){if(s.stmt===Ct){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===Q&&(s.id===v.START_NODE?(s.id=t.id+(a?"_start":"_end"),s.start=a):s.id=s.id.trim()),s.stmt!==q&&s.stmt!==Q||!s.doc)return;const i=[];let l=[];for(const d of s.doc)if(d.type===Gt){const S=pt(d);S.doc=pt(l),i.push(S),l=[]}else l.push(d);if(i.length>0&&l.length>0){const d={stmt:Q,id:he(),type:"divider",doc:pt(l)};i.push(pt(d)),s.doc=i}s.doc.forEach(d=>this.docTranslator(s,d,!0))}getRootDocV2(){return this.docTranslator({id:q,stmt:q},{id:q,stmt:q,doc:this.rootDoc},!0),{id:q,doc:this.rootDoc}}addState(t,s=it,a=void 0,i=void 0,l=void 0,d=void 0,S=void 0,p=void 0){const T=t==null?void 0:t.trim();if(!this.currentDocument.states.has(T))D.info("Adding state ",T,i),this.currentDocument.states.set(T,{stmt:Q,id:T,descriptions:[],type:s,doc:a,note:l,classes:[],styles:[],textStyles:[]});else{const _=this.currentDocument.states.get(T);if(!_)throw new Error(`State not found: ${T}`);_.doc||(_.doc=a),_.type||(_.type=s)}if(i&&(D.info("Setting state description",T,i),(Array.isArray(i)?i:[i]).forEach(m=>this.addDescription(T,m.trim()))),l){const _=this.currentDocument.states.get(T);if(!_)throw new Error(`State not found: ${T}`);_.note=l,_.note.text=z.sanitizeText(_.note.text,F())}d&&(D.info("Setting state classes",T,d),(Array.isArray(d)?d:[d]).forEach(m=>this.setCssClass(T,m.trim()))),S&&(D.info("Setting state styles",T,S),(Array.isArray(S)?S:[S]).forEach(m=>this.setStyle(T,m.trim()))),p&&(D.info("Setting state styles",T,S),(Array.isArray(p)?p:[p]).forEach(m=>this.setTextStyle(T,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Pt(),t||(this.links=new Map,ue())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){D.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,a){this.links.set(t,{url:s,tooltip:a}),D.warn("Adding link",t,s,a)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===v.START_NODE?(this.startEndCount++,`${v.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",s=it){return t===v.START_NODE?v.START_TYPE:s}endIdIfNeeded(t=""){return t===v.END_NODE?(this.startEndCount++,`${v.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",s=it){return t===v.END_NODE?v.END_TYPE:s}addRelationObjs(t,s,a=""){const i=this.startIdIfNeeded(t.id.trim()),l=this.startTypeIfNeeded(t.id.trim(),t.type),d=this.startIdIfNeeded(s.id.trim()),S=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(i,l,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(d,S,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:i,id2:d,relationTitle:z.sanitizeText(a,F())})}addRelation(t,s,a){if(typeof t=="object"&&typeof s=="object")this.addRelationObjs(t,s,a);else if(typeof t=="string"&&typeof s=="string"){const i=this.startIdIfNeeded(t.trim()),l=this.startTypeIfNeeded(t),d=this.endIdIfNeeded(s.trim()),S=this.endTypeIfNeeded(s);this.addState(i,l),this.addState(d,S),this.currentDocument.relations.push({id1:i,id2:d,relationTitle:a?z.sanitizeText(a,F()):void 0})}}addDescription(t,s){var l;const a=this.currentDocument.states.get(t),i=s.startsWith(":")?s.replace(":","").trim():s;(l=a==null?void 0:a.descriptions)==null||l.push(z.sanitizeText(i,F()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const a=this.classes.get(t);s&&a&&s.split(v.STYLECLASS_SEP).forEach(i=>{const l=i.replace(/([^;]*);/,"$1").trim();if(RegExp(v.COLOR_KEYWORD).exec(i)){const S=l.replace(v.FILL_KEYWORD,v.BG_FILL).replace(v.COLOR_KEYWORD,v.FILL_KEYWORD);a.textStyles.push(S)}a.styles.push(l)})}getClasses(){return this.classes}setCssClass(t,s){t.split(",").forEach(a=>{var l;let i=this.getState(a);if(!i){const d=a.trim();this.addState(d),i=this.getState(d)}(l=i==null?void 0:i.classes)==null||l.push(s)})}setStyle(t,s){var a,i;(i=(a=this.getState(t))==null?void 0:a.styles)==null||i.push(s)}setTextStyle(t,s){var a,i;(i=(a=this.getState(t))==null?void 0:a.textStyles)==null||i.push(s)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Rt)}getDirection(){var t;return((t=this.getDirectionStatement())==null?void 0:t.value)??de}setDirection(t){const s=this.getDirectionStatement();s?s.value=t:this.rootDoc.unshift({stmt:Rt,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=F();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Kt(this.getRootDocV2())}}getConfig(){return F().state}},f(W,"StateDB"),W.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},W),Pe=f(e=>` +defs #statediagram-barbEnd { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`,"getStyles"),Ue=Pe;export{Me as S,Be as a,Ve as b,Ue as s}; diff --git a/lightrag/api/webui/assets/chunk-XZIHB7SX-c4P7PYPk.js b/lightrag/api/webui/assets/chunk-AACKK3MU-Bulquadc.js similarity index 67% rename from lightrag/api/webui/assets/chunk-XZIHB7SX-c4P7PYPk.js rename to lightrag/api/webui/assets/chunk-AACKK3MU-Bulquadc.js index fe917915..a7436e0b 100644 --- a/lightrag/api/webui/assets/chunk-XZIHB7SX-c4P7PYPk.js +++ b/lightrag/api/webui/assets/chunk-AACKK3MU-Bulquadc.js @@ -1 +1 @@ -import{_ as s}from"./mermaid-vendor-D0f_SE0h.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; +import{_ as s}from"./mermaid-vendor-DOoA-Fcm.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; diff --git a/lightrag/api/webui/assets/chunk-AEK57VVT-gQ4j2jcG.js b/lightrag/api/webui/assets/chunk-AEK57VVT-gQ4j2jcG.js deleted file mode 100644 index 2539c37b..00000000 --- a/lightrag/api/webui/assets/chunk-AEK57VVT-gQ4j2jcG.js +++ /dev/null @@ -1,220 +0,0 @@ -var re=Object.defineProperty;var ae=(e,t,s)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var b=(e,t,s)=>ae(e,typeof t!="symbol"?t+"":t,s);import{g as ne,s as le}from"./chunk-RZ5BOZE2-B615FLH4.js";import{_ as p,l as v,c as A,r as oe,u as ce,a0 as he,k as j,z as ue,a as de,b as fe,g as pe,s as Se,q as ye,t as ge}from"./mermaid-vendor-D0f_SE0h.js";var bt=function(){var e=p(function(P,l,h,a){for(h=h||{},a=P.length;a--;h[P[a]]=l);return h},"o"),t=[1,2],s=[1,3],n=[1,4],o=[2,4],c=[1,9],r=[1,11],d=[1,16],f=[1,17],g=[1,18],E=[1,19],m=[1,32],I=[1,20],G=[1,21],R=[1,22],S=[1,23],L=[1,24],O=[1,26],Y=[1,27],F=[1,28],w=[1,29],$=[1,30],et=[1,31],st=[1,34],it=[1,35],rt=[1,36],at=[1,37],X=[1,33],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],nt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],At=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],St={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(l,h,a,T,_,i,K){var u=i.length-1;switch(_){case 3:return T.setRootDoc(i[u]),i[u];case 4:this.$=[];break;case 5:i[u]!="nl"&&(i[u-1].push(i[u]),this.$=i[u-1]);break;case 6:case 7:this.$=i[u];break;case 8:this.$="nl";break;case 12:this.$=i[u];break;case 13:const J=i[u-1];J.description=T.trimColon(i[u]),this.$=J;break;case 14:this.$={stmt:"relation",state1:i[u-2],state2:i[u]};break;case 15:const yt=T.trimColon(i[u]);this.$={stmt:"relation",state1:i[u-3],state2:i[u-1],description:yt};break;case 19:this.$={stmt:"state",id:i[u-3],type:"default",description:"",doc:i[u-1]};break;case 20:var V=i[u],H=i[u-2].trim();if(i[u].match(":")){var ot=i[u].split(":");V=ot[0],H=[H,ot[1]]}this.$={stmt:"state",id:V,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[u-3],type:"default",description:i[u-5],doc:i[u-1]};break;case 22:this.$={stmt:"state",id:i[u],type:"fork"};break;case 23:this.$={stmt:"state",id:i[u],type:"join"};break;case 24:this.$={stmt:"state",id:i[u],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[u-1].trim(),note:{position:i[u-2].trim(),text:i[u].trim()}};break;case 29:this.$=i[u].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[u].trim(),T.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:i[u-1].trim(),classes:i[u].trim()};break;case 34:this.$={stmt:"style",id:i[u-1].trim(),styleClass:i[u].trim()};break;case 35:this.$={stmt:"applyClass",id:i[u-1].trim(),styleClass:i[u].trim()};break;case 36:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:i[u].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:i[u-2].trim(),classes:[i[u].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:i[u-2].trim(),classes:[i[u].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:s,6:n},{1:[3]},{3:5,4:t,5:s,6:n},{3:6,4:t,5:s,6:n},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],o,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:r,8:8,9:10,10:12,11:13,12:14,13:15,16:d,17:f,19:g,22:E,24:m,25:I,26:G,27:R,28:S,29:L,32:25,33:O,35:Y,37:F,38:w,42:$,45:et,48:st,49:it,50:rt,51:at,54:X},e(y,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:d,17:f,19:g,22:E,24:m,25:I,26:G,27:R,28:S,29:L,32:25,33:O,35:Y,37:F,38:w,42:$,45:et,48:st,49:it,50:rt,51:at,54:X},e(y,[2,7]),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(y,[2,11]),e(y,[2,12],{14:[1,39],15:[1,40]}),e(y,[2,16]),{18:[1,41]},e(y,[2,18],{20:[1,42]}),{23:[1,43]},e(y,[2,22]),e(y,[2,23]),e(y,[2,24]),e(y,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},e(y,[2,28]),{34:[1,48]},{36:[1,49]},e(y,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},e(nt,[2,42],{55:[1,54]}),e(nt,[2,43],{55:[1,55]}),e(y,[2,36]),e(y,[2,37]),e(y,[2,38]),e(y,[2,39]),e(y,[2,6]),e(y,[2,13]),{13:56,24:m,54:X},e(y,[2,17]),e(At,o,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},e(y,[2,29]),e(y,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},e(y,[2,14],{14:[1,67]}),{4:c,5:r,8:8,9:10,10:12,11:13,12:14,13:15,16:d,17:f,19:g,21:[1,68],22:E,24:m,25:I,26:G,27:R,28:S,29:L,32:25,33:O,35:Y,37:F,38:w,42:$,45:et,48:st,49:it,50:rt,51:at,54:X},e(y,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},e(y,[2,32]),e(y,[2,33]),e(y,[2,34]),e(y,[2,35]),e(nt,[2,44]),e(nt,[2,45]),e(y,[2,15]),e(y,[2,19]),e(At,o,{7:72}),e(y,[2,26]),e(y,[2,27]),{4:c,5:r,8:8,9:10,10:12,11:13,12:14,13:15,16:d,17:f,19:g,21:[1,73],22:E,24:m,25:I,26:G,27:R,28:S,29:L,32:25,33:O,35:Y,37:F,38:w,42:$,45:et,48:st,49:it,50:rt,51:at,54:X},e(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:p(function(l,h){if(h.recoverable)this.trace(l);else{var a=new Error(l);throw a.hash=h,a}},"parseError"),parse:p(function(l){var h=this,a=[0],T=[],_=[null],i=[],K=this.table,u="",V=0,H=0,ot=2,J=1,yt=i.slice.call(arguments,1),D=Object.create(this.lexer),M={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(M.yy[gt]=this.yy[gt]);D.setInput(l,M.yy),M.yy.lexer=D,M.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Tt=D.yylloc;i.push(Tt);var se=D.options&&D.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ie(C){a.length=a.length-2*C,_.length=_.length-C,i.length=i.length-C}p(ie,"popStack");function Lt(){var C;return C=T.pop()||D.lex()||J,typeof C!="number"&&(C instanceof Array&&(T=C,C=T.pop()),C=h.symbols_[C]||C),C}p(Lt,"lex");for(var k,U,x,_t,W={},ct,N,It,ht;;){if(U=a[a.length-1],this.defaultActions[U]?x=this.defaultActions[U]:((k===null||typeof k>"u")&&(k=Lt()),x=K[U]&&K[U][k]),typeof x>"u"||!x.length||!x[0]){var Et="";ht=[];for(ct in K[U])this.terminals_[ct]&&ct>ot&&ht.push("'"+this.terminals_[ct]+"'");D.showPosition?Et="Parse error on line "+(V+1)+`: -`+D.showPosition()+` -Expecting `+ht.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Et="Parse error on line "+(V+1)+": Unexpected "+(k==J?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Et,{text:D.match,token:this.terminals_[k]||k,line:D.yylineno,loc:Tt,expected:ht})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+k);switch(x[0]){case 1:a.push(k),_.push(D.yytext),i.push(D.yylloc),a.push(x[1]),k=null,H=D.yyleng,u=D.yytext,V=D.yylineno,Tt=D.yylloc;break;case 2:if(N=this.productions_[x[1]][1],W.$=_[_.length-N],W._$={first_line:i[i.length-(N||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(N||1)].first_column,last_column:i[i.length-1].last_column},se&&(W._$.range=[i[i.length-(N||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(W,[u,H,V,M.yy,x[1],_,i].concat(yt)),typeof _t<"u")return _t;N&&(a=a.slice(0,-1*N*2),_=_.slice(0,-1*N),i=i.slice(0,-1*N)),a.push(this.productions_[x[1]][0]),_.push(W.$),i.push(W._$),It=K[a[a.length-2]][a[a.length-1]],a.push(It);break;case 3:return!0}}return!0},"parse")},ee=function(){var P={EOF:1,parseError:p(function(h,a){if(this.yy.parser)this.yy.parser.parseError(h,a);else throw new Error(h)},"parseError"),setInput:p(function(l,h){return this.yy=h||this.yy||{},this._input=l,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:p(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var h=l.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:p(function(l){var h=l.length,a=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var T=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),a.length-1&&(this.yylineno-=a.length-1);var _=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:a?(a.length===T.length?this.yylloc.first_column:0)+T[T.length-a.length].length-a[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(l){this.unput(this.match.slice(l))},"less"),pastInput:p(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var l=this.pastInput(),h=new Array(l.length+1).join("-");return l+this.upcomingInput()+` -`+h+"^"},"showPosition"),test_match:p(function(l,h){var a,T,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),T=l[0].match(/(?:\r\n?|\n).*/g),T&&(this.yylineno+=T.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],a=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in _)this[i]=_[i];return!1}return!1},"test_match"),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,h,a,T;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),i=0;i<_.length;i++)if(a=this._input.match(this.rules[_[i]]),a&&(!h||a[0].length>h[0].length)){if(h=a,T=i,this.options.backtrack_lexer){if(l=this.test_match(a,_[i]),l!==!1)return l;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(l=this.test_match(h,_[T]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:p(function(){var h=this.next();return h||this.lex()},"lex"),begin:p(function(h){this.conditionStack.push(h)},"begin"),popState:p(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(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:p(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:p(function(h){this.begin(h)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:p(function(h,a,T,_){switch(T){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),a.yytext=a.yytext.substr(2).trim(),31;case 67:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return a.yytext=a.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return P}();St.lexer=ee;function lt(){this.yy={}}return p(lt,"Parser"),lt.prototype=St,St.Parser=lt,new lt}();bt.parser=bt;var Xe=bt,Te="TB",Mt="TB",Rt="dir",dt="state",vt="relation",_e="classDef",Ee="style",me="applyClass",Z="default",Ut="divider",jt="fill:none",zt="fill: #333",Ht="c",Wt="text",Xt="normal",mt="rect",Dt="rectWithTitle",De="stateStart",be="stateEnd",Ot="divider",Nt="roundedWithTitle",ve="note",ke="noteGroup",tt="statediagram",Ce="state",xe=`${tt}-${Ce}`,Kt="transition",Ae="note",Le="note-edge",Ie=`${Kt} ${Le}`,Re=`${tt}-${Ae}`,Oe="cluster",Ne=`${tt}-${Oe}`,we="cluster-alt",$e=`${tt}-${we}`,Jt="parent",qt="note",Pe="state",xt="----",Be=`${xt}${qt}`,wt=`${xt}${Jt}`,Qt=p((e,t=Mt)=>{if(!e.doc)return t;let s=t;for(const n of e.doc)n.stmt==="dir"&&(s=n.value);return s},"getDir"),Ge=p(function(e,t){return t.db.getClasses()},"getClasses"),Ye=p(async function(e,t,s,n){v.info("REF0:"),v.info("Drawing state diagram (v2)",t);const{securityLevel:o,state:c,layout:r}=A();n.db.extract(n.db.getRootDocV2());const d=n.db.getData(),f=ne(t,o);d.type=n.type,d.layoutAlgorithm=r,d.nodeSpacing=(c==null?void 0:c.nodeSpacing)||50,d.rankSpacing=(c==null?void 0:c.rankSpacing)||50,d.markers=["barb"],d.diagramId=t,await oe(d,f);const g=8;ce.insertTitle(f,"statediagramTitleText",(c==null?void 0:c.titleTopMargin)??25,n.db.getDiagramTitle()),le(f,g,tt,(c==null?void 0:c.useMaxWidth)??!0)},"draw"),Ke={getClasses:Ge,draw:Ye,getDir:Qt},ft=new Map,B=0;function pt(e="",t=0,s="",n=xt){const o=s!==null&&s.length>0?`${n}${s}`:"";return`${Pe}-${e}${o}-${t}`}p(pt,"stateDomId");var Fe=p((e,t,s,n,o,c,r,d)=>{v.trace("items",t),t.forEach(f=>{switch(f.stmt){case dt:Q(e,f,s,n,o,c,r,d);break;case Z:Q(e,f,s,n,o,c,r,d);break;case vt:{Q(e,f.state1,s,n,o,c,r,d),Q(e,f.state2,s,n,o,c,r,d);const g={id:"edge"+B,start:f.state1.id,end:f.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:jt,labelStyle:"",label:j.sanitizeText(f.description,A()),arrowheadStyle:zt,labelpos:Ht,labelType:Wt,thickness:Xt,classes:Kt,look:r};o.push(g),B++}break}})},"setupDoc"),$t=p((e,t=Mt)=>{let s=t;if(e.doc)for(const n of e.doc)n.stmt==="dir"&&(s=n.value);return s},"getDir");function q(e,t,s){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(o=>{if(s.get(o)){const c=s.get(o);t.cssCompiledStyles=[...t.cssCompiledStyles,...c.styles]}}));const n=e.find(o=>o.id===t.id);n?Object.assign(n,t):e.push(t)}p(q,"insertOrUpdateNode");function Zt(e){var t;return((t=e==null?void 0:e.classes)==null?void 0:t.join(" "))??""}p(Zt,"getClassesFromDbInfo");function te(e){return(e==null?void 0:e.styles)??[]}p(te,"getStylesFromDbInfo");var Q=p((e,t,s,n,o,c,r,d)=>{var I,G;const f=t.id,g=s.get(f),E=Zt(g),m=te(g);if(v.info("dataFetcher parsedItem",t,g,m),f!=="root"){let R=mt;t.start===!0?R=De:t.start===!1&&(R=be),t.type!==Z&&(R=t.type),ft.get(f)||ft.set(f,{id:f,shape:R,description:j.sanitizeText(f,A()),cssClasses:`${E} ${xe}`,cssStyles:m});const S=ft.get(f);t.description&&(Array.isArray(S.description)?(S.shape=Dt,S.description.push(t.description)):((I=S.description)==null?void 0:I.length)>0?(S.shape=Dt,S.description===f?S.description=[t.description]:S.description=[S.description,t.description]):(S.shape=mt,S.description=t.description),S.description=j.sanitizeTextOrArray(S.description,A())),((G=S.description)==null?void 0:G.length)===1&&S.shape===Dt&&(S.type==="group"?S.shape=Nt:S.shape=mt),!S.type&&t.doc&&(v.info("Setting cluster for XCX",f,$t(t)),S.type="group",S.isGroup=!0,S.dir=$t(t),S.shape=t.type===Ut?Ot:Nt,S.cssClasses=`${S.cssClasses} ${Ne} ${c?$e:""}`);const L={labelStyle:"",shape:S.shape,label:S.description,cssClasses:S.cssClasses,cssCompiledStyles:[],cssStyles:S.cssStyles,id:f,dir:S.dir,domId:pt(f,B),type:S.type,isGroup:S.type==="group",padding:8,rx:10,ry:10,look:r};if(L.shape===Ot&&(L.label=""),e&&e.id!=="root"&&(v.trace("Setting node ",f," to be child of its parent ",e.id),L.parentId=e.id),L.centerLabel=!0,t.note){const O={labelStyle:"",shape:ve,label:t.note.text,cssClasses:Re,cssStyles:[],cssCompilesStyles:[],id:f+Be+"-"+B,domId:pt(f,B,qt),type:S.type,isGroup:S.type==="group",padding:A().flowchart.padding,look:r,position:t.note.position},Y=f+wt,F={labelStyle:"",shape:ke,label:t.note.text,cssClasses:S.cssClasses,cssStyles:[],id:f+wt,domId:pt(f,B,Jt),type:"group",isGroup:!0,padding:16,look:r,position:t.note.position};B++,F.id=Y,O.parentId=Y,q(n,F,d),q(n,O,d),q(n,L,d);let w=f,$=O.id;t.note.position==="left of"&&(w=O.id,$=f),o.push({id:w+"-"+$,start:w,end:$,arrowhead:"none",arrowTypeEnd:"",style:jt,labelStyle:"",classes:Ie,arrowheadStyle:zt,labelpos:Ht,labelType:Wt,thickness:Xt,look:r})}else q(n,L,d)}t.doc&&(v.trace("Adding nodes children "),Fe(t,t.doc,s,n,o,!c,r,d))},"dataFetcher"),Ve=p(()=>{ft.clear(),B=0},"reset"),kt="[*]",Pt="start",Bt=kt,Gt="end",Yt="color",Ft="fill",Me="bgFill",Ue=",";function Ct(){return new Map}p(Ct,"newClassesList");var Vt=p(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ut=p(e=>JSON.parse(JSON.stringify(e)),"clone"),z,Je=(z=class{constructor(t){b(this,"version");b(this,"nodes",[]);b(this,"edges",[]);b(this,"rootDoc",[]);b(this,"classes",Ct());b(this,"documents",{root:Vt()});b(this,"currentDocument",this.documents.root);b(this,"startEndCount",0);b(this,"dividerCnt",0);b(this,"getAccTitle",de);b(this,"setAccTitle",fe);b(this,"getAccDescription",pe);b(this,"setAccDescription",Se);b(this,"setDiagramTitle",ye);b(this,"getDiagramTitle",ge);this.clear(),this.version=t,this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}setRootDoc(t){v.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}getRootDoc(){return this.rootDoc}docTranslator(t,s,n){if(s.stmt===vt)this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);else if(s.stmt===dt&&(s.id==="[*]"?(s.id=n?t.id+"_start":t.id+"_end",s.start=n):s.id=s.id.trim()),s.doc){const o=[];let c=[],r;for(r=0;r0&&c.length>0){const d={stmt:dt,id:he(),type:"divider",doc:ut(c)};o.push(ut(d)),s.doc=o}s.doc.forEach(d=>this.docTranslator(s,d,!0))}}getRootDocV2(){return this.docTranslator({id:"root"},{id:"root",doc:this.rootDoc},!0),{id:"root",doc:this.rootDoc}}extract(t){let s;t.doc?s=t.doc:s=t,v.info(s),this.clear(!0),v.info("Extract initial document:",s),s.forEach(r=>{switch(v.warn("Statement",r.stmt),r.stmt){case dt:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case vt:this.addRelation(r.state1,r.state2,r.description);break;case _e:this.addStyleClass(r.id.trim(),r.classes);break;case Ee:{const d=r.id.trim().split(","),f=r.styleClass.split(",");d.forEach(g=>{let E=this.getState(g);if(E===void 0){const m=g.trim();this.addState(m),E=this.getState(m)}E.styles=f.map(m=>{var I;return(I=m.replace(/;/g,""))==null?void 0:I.trim()})})}break;case me:this.setCssClass(r.id.trim(),r.styleClass);break}});const n=this.getStates(),c=A().look;Ve(),Q(void 0,this.getRootDocV2(),n,this.nodes,this.edges,!0,c,this.classes),this.nodes.forEach(r=>{if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+r.id+"]");r.label=r.label[0]}})}addState(t,s=Z,n=null,o=null,c=null,r=null,d=null,f=null){const g=t==null?void 0:t.trim();if(this.currentDocument.states.has(g)?(this.currentDocument.states.get(g).doc||(this.currentDocument.states.get(g).doc=n),this.currentDocument.states.get(g).type||(this.currentDocument.states.get(g).type=s)):(v.info("Adding state ",g,o),this.currentDocument.states.set(g,{id:g,descriptions:[],type:s,doc:n,note:c,classes:[],styles:[],textStyles:[]})),o&&(v.info("Setting state description",g,o),typeof o=="string"&&this.addDescription(g,o.trim()),typeof o=="object"&&o.forEach(E=>this.addDescription(g,E.trim()))),c){const E=this.currentDocument.states.get(g);E.note=c,E.note.text=j.sanitizeText(E.note.text,A())}r&&(v.info("Setting state classes",g,r),(typeof r=="string"?[r]:r).forEach(m=>this.setCssClass(g,m.trim()))),d&&(v.info("Setting state styles",g,d),(typeof d=="string"?[d]:d).forEach(m=>this.setStyle(g,m.trim()))),f&&(v.info("Setting state styles",g,d),(typeof f=="string"?[f]:f).forEach(m=>this.setTextStyle(g,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Vt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Ct(),t||ue()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){v.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}startIdIfNeeded(t=""){let s=t;return t===kt&&(this.startEndCount++,s=`${Pt}${this.startEndCount}`),s}startTypeIfNeeded(t="",s=Z){return t===kt?Pt:s}endIdIfNeeded(t=""){let s=t;return t===Bt&&(this.startEndCount++,s=`${Gt}${this.startEndCount}`),s}endTypeIfNeeded(t="",s=Z){return t===Bt?Gt:s}addRelationObjs(t,s,n){let o=this.startIdIfNeeded(t.id.trim()),c=this.startTypeIfNeeded(t.id.trim(),t.type),r=this.startIdIfNeeded(s.id.trim()),d=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(o,c,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(r,d,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:o,id2:r,relationTitle:j.sanitizeText(n,A())})}addRelation(t,s,n){if(typeof t=="object")this.addRelationObjs(t,s,n);else{const o=this.startIdIfNeeded(t.trim()),c=this.startTypeIfNeeded(t),r=this.endIdIfNeeded(s.trim()),d=this.endTypeIfNeeded(s);this.addState(o,c),this.addState(r,d),this.currentDocument.relations.push({id1:o,id2:r,title:j.sanitizeText(n,A())})}}addDescription(t,s){const n=this.currentDocument.states.get(t),o=s.startsWith(":")?s.replace(":","").trim():s;n.descriptions.push(j.sanitizeText(o,A()))}cleanupLabel(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(t,s=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const n=this.classes.get(t);s!=null&&s.split(Ue).forEach(o=>{const c=o.replace(/([^;]*);/,"$1").trim();if(RegExp(Yt).exec(o)){const d=c.replace(Ft,Me).replace(Yt,Ft);n.textStyles.push(d)}n.styles.push(c)})}getClasses(){return this.classes}setCssClass(t,s){t.split(",").forEach(n=>{let o=this.getState(n);if(o===void 0){const c=n.trim();this.addState(c),o=this.getState(c)}o.classes.push(s)})}setStyle(t,s){const n=this.getState(t);n!==void 0&&n.styles.push(s)}setTextStyle(t,s){const n=this.getState(t);n!==void 0&&n.textStyles.push(s)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Rt)}getDirection(){var t;return((t=this.getDirectionStatement())==null?void 0:t.value)??Te}setDirection(t){const s=this.getDirectionStatement();s?s.value=t:this.rootDoc.unshift({stmt:Rt,value:t})}trimColon(t){return t&&t[0]===":"?t.substr(1).trim():t.trim()}getData(){const t=A();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Qt(this.getRootDocV2())}}getConfig(){return A().state}},p(z,"StateDB"),b(z,"relationType",{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}),z),je=p(e=>` -defs #statediagram-barbEnd { - fill: ${e.transitionColor}; - stroke: ${e.transitionColor}; - } -g.stateGroup text { - fill: ${e.nodeBorder}; - stroke: none; - font-size: 10px; -} -g.stateGroup text { - fill: ${e.textColor}; - stroke: none; - font-size: 10px; - -} -g.stateGroup .state-title { - font-weight: bolder; - fill: ${e.stateLabelColor}; -} - -g.stateGroup rect { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; -} - -g.stateGroup line { - stroke: ${e.lineColor}; - stroke-width: 1; -} - -.transition { - stroke: ${e.transitionColor}; - stroke-width: 1; - fill: none; -} - -.stateGroup .composit { - fill: ${e.background}; - border-bottom: 1px -} - -.stateGroup .alt-composit { - fill: #e0e0e0; - border-bottom: 1px -} - -.state-note { - stroke: ${e.noteBorderColor}; - fill: ${e.noteBkgColor}; - - text { - fill: ${e.noteTextColor}; - stroke: none; - font-size: 10px; - } -} - -.stateLabel .box { - stroke: none; - stroke-width: 0; - fill: ${e.mainBkg}; - opacity: 0.5; -} - -.edgeLabel .label rect { - fill: ${e.labelBackgroundColor}; - opacity: 0.5; -} -.edgeLabel { - background-color: ${e.edgeLabelBackground}; - p { - background-color: ${e.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; -} -.edgeLabel .label text { - fill: ${e.transitionLabelColor||e.tertiaryTextColor}; -} -.label div .edgeLabel { - color: ${e.transitionLabelColor||e.tertiaryTextColor}; -} - -.stateLabel text { - fill: ${e.stateLabelColor}; - font-size: 10px; - font-weight: bold; -} - -.node circle.state-start { - fill: ${e.specialStateColor}; - stroke: ${e.specialStateColor}; -} - -.node .fork-join { - fill: ${e.specialStateColor}; - stroke: ${e.specialStateColor}; -} - -.node circle.state-end { - fill: ${e.innerEndBackground}; - stroke: ${e.background}; - stroke-width: 1.5 -} -.end-state-inner { - fill: ${e.compositeBackground||e.background}; - // stroke: ${e.background}; - stroke-width: 1.5 -} - -.node rect { - fill: ${e.stateBkg||e.mainBkg}; - stroke: ${e.stateBorder||e.nodeBorder}; - stroke-width: 1px; -} -.node polygon { - fill: ${e.mainBkg}; - stroke: ${e.stateBorder||e.nodeBorder};; - stroke-width: 1px; -} -#statediagram-barbEnd { - fill: ${e.lineColor}; -} - -.statediagram-cluster rect { - fill: ${e.compositeTitleBackground}; - stroke: ${e.stateBorder||e.nodeBorder}; - stroke-width: 1px; -} - -.cluster-label, .nodeLabel { - color: ${e.stateLabelColor}; - // line-height: 1; -} - -.statediagram-cluster rect.outer { - rx: 5px; - ry: 5px; -} -.statediagram-state .divider { - stroke: ${e.stateBorder||e.nodeBorder}; -} - -.statediagram-state .title-state { - rx: 5px; - ry: 5px; -} -.statediagram-cluster.statediagram-cluster .inner { - fill: ${e.compositeBackground||e.background}; -} -.statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${e.altBackground?e.altBackground:"#efefef"}; -} - -.statediagram-cluster .inner { - rx:0; - ry:0; -} - -.statediagram-state rect.basic { - rx: 5px; - ry: 5px; -} -.statediagram-state rect.divider { - stroke-dasharray: 10,10; - fill: ${e.altBackground?e.altBackground:"#efefef"}; -} - -.note-edge { - stroke-dasharray: 5; -} - -.statediagram-note rect { - fill: ${e.noteBkgColor}; - stroke: ${e.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} -.statediagram-note rect { - fill: ${e.noteBkgColor}; - stroke: ${e.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} - -.statediagram-note text { - fill: ${e.noteTextColor}; -} - -.statediagram-note .nodeLabel { - color: ${e.noteTextColor}; -} -.statediagram .edgeLabel { - color: red; // ${e.noteTextColor}; -} - -#dependencyStart, #dependencyEnd { - fill: ${e.lineColor}; - stroke: ${e.lineColor}; - stroke-width: 1; -} - -.statediagramTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; -} -`,"getStyles"),qe=je;export{Je as S,Xe as a,Ke as b,qe as s}; diff --git a/lightrag/api/webui/assets/chunk-BFAMUDN2-DUbWdDRU.js b/lightrag/api/webui/assets/chunk-BFAMUDN2-DUbWdDRU.js new file mode 100644 index 00000000..cebf1c78 --- /dev/null +++ b/lightrag/api/webui/assets/chunk-BFAMUDN2-DUbWdDRU.js @@ -0,0 +1 @@ +import{_ as a,d as o}from"./mermaid-vendor-DOoA-Fcm.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/lightrag/api/webui/assets/chunk-E2GYISFI-DBdOi329.js b/lightrag/api/webui/assets/chunk-E2GYISFI-DBdOi329.js new file mode 100644 index 00000000..5ce88604 --- /dev/null +++ b/lightrag/api/webui/assets/chunk-E2GYISFI-DBdOi329.js @@ -0,0 +1,15 @@ +import{_ as e}from"./mermaid-vendor-DOoA-Fcm.js";var l=e(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,"getIconStyles");export{l as g}; diff --git a/lightrag/api/webui/assets/chunk-A2AXSNBT-B91iiasA.js b/lightrag/api/webui/assets/chunk-QEP2MXWD-iMxqHW1H.js similarity index 67% rename from lightrag/api/webui/assets/chunk-A2AXSNBT-B91iiasA.js rename to lightrag/api/webui/assets/chunk-QEP2MXWD-iMxqHW1H.js index c59c9d42..bfec1cdf 100644 --- a/lightrag/api/webui/assets/chunk-A2AXSNBT-B91iiasA.js +++ b/lightrag/api/webui/assets/chunk-QEP2MXWD-iMxqHW1H.js @@ -1,9 +1,9 @@ -import{g as et,s as tt}from"./chunk-RZ5BOZE2-B615FLH4.js";import{_ as f,l as Oe,c as F,p as st,r as it,u as we,d as $,b as at,a as nt,s as rt,g as ut,q as lt,t as ct,k as v,z as ot,y as ht,i as dt,Y as R}from"./mermaid-vendor-D0f_SE0h.js";var Ve=function(){var s=f(function(I,c,h,p){for(h=h||{},p=I.length;p--;h[I[p]]=c);return h},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],r=[1,42],o=[1,26],A=[1,24],g=[1,25],k=[1,32],L=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],Te=[1,30],ke=[1,31],b=[1,44],E=[1,46],y=[1,43],D=[1,47],De=[1,9],d=[1,8,9],ee=[1,58],te=[1,59],se=[1,60],ie=[1,61],ae=[1,62],Fe=[1,63],Be=[1,64],ne=[1,8,9,41],Pe=[1,76],P=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],re=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],ue=[13,58,84,99,101,102],z=[13,58,71,72,84,99,101,102],Me=[13,58,66,67,68,69,70,84,99,101,102],_e=[1,98],K=[1,115],Y=[1,107],Q=[1,113],W=[1,108],j=[1,109],X=[1,110],q=[1,111],H=[1,112],J=[1,114],Re=[22,58,59,80,84,85,86,87,88,89],Se=[1,8,9,39,41,44],le=[1,8,9,22],Ge=[1,143],Ue=[1,8,9,59],N=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ne={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:f(function(c,h,p,n,C,e,Z){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 12:case 14:this.$=e[t];break;case 10:case 13:this.$=e[t-2]+"."+e[t];break;case 11:case 15:this.$=e[t-1]+e[t];break;case 16:case 17:this.$=e[t-1]+"~"+e[t]+"~";break;case 18:n.addRelation(e[t]);break;case 19:e[t-1].title=n.cleanupLabel(e[t]),n.addRelation(e[t-1]);break;case 30:this.$=e[t].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=e[t].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(e[t-3],e[t-1]);break;case 34:n.addClassesToNamespace(e[t-4],e[t-1]);break;case 35:this.$=e[t],n.addNamespace(e[t]);break;case 36:this.$=[e[t]];break;case 37:this.$=[e[t-1]];break;case 38:e[t].unshift(e[t-2]),this.$=e[t];break;case 40:n.setCssClass(e[t-2],e[t]);break;case 41:n.addMembers(e[t-3],e[t-1]);break;case 42:n.setCssClass(e[t-5],e[t-3]),n.addMembers(e[t-5],e[t-1]);break;case 43:this.$=e[t],n.addClass(e[t]);break;case 44:this.$=e[t-1],n.addClass(e[t-1]),n.setClassLabel(e[t-1],e[t]);break;case 45:n.addAnnotation(e[t],e[t-2]);break;case 46:case 59:this.$=[e[t]];break;case 47:e[t].push(e[t-1]),this.$=e[t];break;case 48:break;case 49:n.addMember(e[t-1],n.cleanupLabel(e[t]));break;case 50:break;case 51:break;case 52:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 54:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 55:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 56:n.addNote(e[t],e[t-1]);break;case 57:n.addNote(e[t]);break;case 58:this.$=e[t-2],n.defineClass(e[t-1],e[t]);break;case 60:this.$=e[t-2].concat([e[t]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 66:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 67:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 68:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=e[t-2],n.setClickEvent(e[t-1],e[t]);break;case 77:case 83:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 78:this.$=e[t-2],n.setLink(e[t-1],e[t]);break;case 79:this.$=e[t-3],n.setLink(e[t-2],e[t-1],e[t]);break;case 80:this.$=e[t-3],n.setLink(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 81:this.$=e[t-4],n.setLink(e[t-3],e[t-2],e[t]),n.setTooltip(e[t-3],e[t-1]);break;case 84:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1],e[t]);break;case 85:this.$=e[t-4],n.setClickEvent(e[t-3],e[t-2],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 86:this.$=e[t-3],n.setLink(e[t-2],e[t]);break;case 87:this.$=e[t-4],n.setLink(e[t-3],e[t-1],e[t]);break;case 88:this.$=e[t-4],n.setLink(e[t-3],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 89:this.$=e[t-5],n.setLink(e[t-4],e[t-2],e[t]),n.setTooltip(e[t-4],e[t-1]);break;case 90:this.$=e[t-2],n.setCssStyle(e[t-1],e[t]);break;case 91:n.setCssClass(e[t-1],e[t]);break;case 92:this.$=[e[t]];break;case 93:e[t-2].push(e[t]),this.$=e[t-2];break;case 95:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(d,[2,18],{22:[1,50]}),s(d,[2,20]),s(d,[2,21]),s(d,[2,22]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),{34:[1,51]},{36:[1,52]},s(d,[2,32]),s(d,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:ee,67:te,68:se,69:ie,70:ae,71:Fe,72:Be}),{39:[1,65]},s(ne,[2,39],{39:[1,67],44:[1,66]}),s(d,[2,50]),s(d,[2,51]),{16:68,58:m,84:b,99:E,101:y},{16:39,18:69,19:40,58:m,84:b,99:E,101:y,102:D},{16:39,18:70,19:40,58:m,84:b,99:E,101:y,102:D},{16:39,18:71,19:40,58:m,84:b,99:E,101:y,102:D},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:m,84:b,99:E,101:y,102:D},{13:Pe,53:75},{56:77,58:[1,78]},s(d,[2,61]),s(d,[2,62]),s(d,[2,63]),s(d,[2,64]),s(P,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:m,84:b,99:E,101:y,102:D}),s(P,[2,14],{20:[1,82]}),{15:83,16:84,58:m,84:b,99:E,101:y},{16:39,18:85,19:40,58:m,84:b,99:E,101:y,102:D},s(re,[2,118]),s(re,[2,119]),s(re,[2,120]),s(re,[2,121]),s([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:i,35:a,37:u,42:l,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D},s(d,[2,19]),s(d,[2,30]),s(d,[2,31]),{13:[1,89],16:39,18:88,19:40,58:m,84:b,99:E,101:y,102:D},{51:90,64:56,65:57,66:ee,67:te,68:se,69:ie,70:ae,71:Fe,72:Be},s(d,[2,49]),{65:91,71:Fe,72:Be},s(ue,[2,68],{64:92,66:ee,67:te,68:se,69:ie,70:ae}),s(z,[2,69]),s(z,[2,70]),s(z,[2,71]),s(z,[2,72]),s(z,[2,73]),s(Me,[2,74]),s(Me,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:m,84:b,99:E,101:y},{45:97,49:_e},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:K,57:104,58:Y,80:Q,82:105,83:106,84:W,85:j,86:X,87:q,88:H,89:J},{58:[1,116]},{13:Pe,53:117},s(d,[2,57]),s(d,[2,123]),{22:K,57:118,58:Y,59:[1,119],80:Q,82:105,83:106,84:W,85:j,86:X,87:q,88:H,89:J},s(Re,[2,59]),{16:39,18:120,19:40,58:m,84:b,99:E,101:y,102:D},s(P,[2,15]),s(P,[2,16]),s(P,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:m,84:b,99:E,101:y},s(Se,[2,43],{11:123,12:[1,124]}),s(De,[2,7]),{9:[1,125]},s(le,[2,52]),{16:39,18:126,19:40,58:m,84:b,99:E,101:y,102:D},{13:[1,128],16:39,18:127,19:40,58:m,84:b,99:E,101:y,102:D},s(ue,[2,67],{64:129,66:ee,67:te,68:se,69:ie,70:ae}),s(ue,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},s(ne,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:_e},{16:39,18:136,19:40,58:m,84:b,99:E,101:y,102:D},s(d,[2,76],{13:[1,137]}),s(d,[2,78],{13:[1,139],75:[1,138]}),s(d,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},s(d,[2,90],{59:Ge}),s(Ue,[2,92],{83:144,22:K,58:Y,80:Q,84:W,85:j,86:X,87:q,88:H,89:J}),s(N,[2,94]),s(N,[2,96]),s(N,[2,97]),s(N,[2,98]),s(N,[2,99]),s(N,[2,100]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(d,[2,91]),s(d,[2,56]),s(d,[2,58],{59:Ge}),{58:[1,145]},s(P,[2,13]),{15:146,16:84,58:m,84:b,99:E,101:y},{39:[2,11]},s(Se,[2,44]),{13:[1,147]},{1:[2,4]},s(le,[2,54]),s(le,[2,53]),{16:39,18:148,19:40,58:m,84:b,99:E,101:y,102:D},s(ue,[2,65]),s(d,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:_e},s(ne,[2,41]),{41:[2,47]},s(d,[2,45]),s(d,[2,77]),s(d,[2,79]),s(d,[2,80],{75:[1,152]}),s(d,[2,83]),s(d,[2,84],{13:[1,153]}),s(d,[2,86],{13:[1,155],75:[1,154]}),{22:K,58:Y,80:Q,82:156,83:106,84:W,85:j,86:X,87:q,88:H,89:J},s(N,[2,95]),s(Re,[2,60]),{39:[2,10]},{14:[1,157]},s(le,[2,55]),s(d,[2,34]),{41:[2,38]},{41:[1,158]},s(d,[2,81]),s(d,[2,85]),s(d,[2,87]),s(d,[2,88],{75:[1,159]}),s(Ue,[2,93],{83:144,22:K,58:Y,80:Q,84:W,85:j,86:X,87:q,88:H,89:J}),s(Se,[2,8]),s(ne,[2,42]),s(d,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:f(function(c,h){if(h.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=h,p}},"parseError"),parse:f(function(c){var h=this,p=[0],n=[],C=[null],e=[],Z=this.table,t="",oe=0,ze=0,He=2,Ke=1,Je=e.slice.call(arguments,1),T=Object.create(this.lexer),O={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(O.yy[Le]=this.yy[Le]);T.setInput(c,O.yy),O.yy.lexer=T,O.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var xe=T.yylloc;e.push(xe);var Ze=T.options&&T.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(_){p.length=p.length-2*_,C.length=C.length-_,e.length=e.length-_}f($e,"popStack");function Ye(){var _;return _=n.pop()||T.lex()||Ke,typeof _!="number"&&(_ instanceof Array&&(n=_,_=n.pop()),_=h.symbols_[_]||_),_}f(Ye,"lex");for(var B,w,S,ve,M={},he,x,Qe,de;;){if(w=p[p.length-1],this.defaultActions[w]?S=this.defaultActions[w]:((B===null||typeof B>"u")&&(B=Ye()),S=Z[w]&&Z[w][B]),typeof S>"u"||!S.length||!S[0]){var Ie="";de=[];for(he in Z[w])this.terminals_[he]&&he>He&&de.push("'"+this.terminals_[he]+"'");T.showPosition?Ie="Parse error on line "+(oe+1)+`: +import{g as et}from"./chunk-E2GYISFI-DBdOi329.js";import{g as tt}from"./chunk-BFAMUDN2-DUbWdDRU.js";import{s as st}from"./chunk-SKB7J2MH-CncvyOyo.js";import{_ as f,l as Oe,c as F,p as it,r as at,u as we,d as $,b as nt,a as rt,s as ut,g as lt,q as ct,t as ot,k as v,z as ht,y as dt,i as pt,$ as R}from"./mermaid-vendor-DOoA-Fcm.js";var Ve=function(){var s=f(function(I,c,h,p){for(h=h||{},p=I.length;p--;h[I[p]]=c);return h},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],r=[1,42],o=[1,26],A=[1,24],g=[1,25],k=[1,32],L=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],Te=[1,30],ke=[1,31],b=[1,44],E=[1,46],y=[1,43],D=[1,47],De=[1,9],d=[1,8,9],ee=[1,58],te=[1,59],se=[1,60],ie=[1,61],ae=[1,62],Fe=[1,63],Be=[1,64],ne=[1,8,9,41],Pe=[1,76],P=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],re=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],ue=[13,58,84,99,101,102],z=[13,58,71,72,84,99,101,102],Me=[13,58,66,67,68,69,70,84,99,101,102],_e=[1,98],K=[1,115],Y=[1,107],Q=[1,113],W=[1,108],j=[1,109],X=[1,110],q=[1,111],H=[1,112],J=[1,114],Re=[22,58,59,80,84,85,86,87,88,89],Se=[1,8,9,39,41,44],le=[1,8,9,22],Ge=[1,143],Ue=[1,8,9,59],N=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ne={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:f(function(c,h,p,n,C,e,Z){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 12:case 14:this.$=e[t];break;case 10:case 13:this.$=e[t-2]+"."+e[t];break;case 11:case 15:this.$=e[t-1]+e[t];break;case 16:case 17:this.$=e[t-1]+"~"+e[t]+"~";break;case 18:n.addRelation(e[t]);break;case 19:e[t-1].title=n.cleanupLabel(e[t]),n.addRelation(e[t-1]);break;case 30:this.$=e[t].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=e[t].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(e[t-3],e[t-1]);break;case 34:n.addClassesToNamespace(e[t-4],e[t-1]);break;case 35:this.$=e[t],n.addNamespace(e[t]);break;case 36:this.$=[e[t]];break;case 37:this.$=[e[t-1]];break;case 38:e[t].unshift(e[t-2]),this.$=e[t];break;case 40:n.setCssClass(e[t-2],e[t]);break;case 41:n.addMembers(e[t-3],e[t-1]);break;case 42:n.setCssClass(e[t-5],e[t-3]),n.addMembers(e[t-5],e[t-1]);break;case 43:this.$=e[t],n.addClass(e[t]);break;case 44:this.$=e[t-1],n.addClass(e[t-1]),n.setClassLabel(e[t-1],e[t]);break;case 45:n.addAnnotation(e[t],e[t-2]);break;case 46:case 59:this.$=[e[t]];break;case 47:e[t].push(e[t-1]),this.$=e[t];break;case 48:break;case 49:n.addMember(e[t-1],n.cleanupLabel(e[t]));break;case 50:break;case 51:break;case 52:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 54:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 55:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 56:n.addNote(e[t],e[t-1]);break;case 57:n.addNote(e[t]);break;case 58:this.$=e[t-2],n.defineClass(e[t-1],e[t]);break;case 60:this.$=e[t-2].concat([e[t]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 66:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 67:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 68:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=e[t-2],n.setClickEvent(e[t-1],e[t]);break;case 77:case 83:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 78:this.$=e[t-2],n.setLink(e[t-1],e[t]);break;case 79:this.$=e[t-3],n.setLink(e[t-2],e[t-1],e[t]);break;case 80:this.$=e[t-3],n.setLink(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 81:this.$=e[t-4],n.setLink(e[t-3],e[t-2],e[t]),n.setTooltip(e[t-3],e[t-1]);break;case 84:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1],e[t]);break;case 85:this.$=e[t-4],n.setClickEvent(e[t-3],e[t-2],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 86:this.$=e[t-3],n.setLink(e[t-2],e[t]);break;case 87:this.$=e[t-4],n.setLink(e[t-3],e[t-1],e[t]);break;case 88:this.$=e[t-4],n.setLink(e[t-3],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 89:this.$=e[t-5],n.setLink(e[t-4],e[t-2],e[t]),n.setTooltip(e[t-4],e[t-1]);break;case 90:this.$=e[t-2],n.setCssStyle(e[t-1],e[t]);break;case 91:n.setCssClass(e[t-1],e[t]);break;case 92:this.$=[e[t]];break;case 93:e[t-2].push(e[t]),this.$=e[t-2];break;case 95:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(d,[2,18],{22:[1,50]}),s(d,[2,20]),s(d,[2,21]),s(d,[2,22]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),{34:[1,51]},{36:[1,52]},s(d,[2,32]),s(d,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:ee,67:te,68:se,69:ie,70:ae,71:Fe,72:Be}),{39:[1,65]},s(ne,[2,39],{39:[1,67],44:[1,66]}),s(d,[2,50]),s(d,[2,51]),{16:68,58:m,84:b,99:E,101:y},{16:39,18:69,19:40,58:m,84:b,99:E,101:y,102:D},{16:39,18:70,19:40,58:m,84:b,99:E,101:y,102:D},{16:39,18:71,19:40,58:m,84:b,99:E,101:y,102:D},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:m,84:b,99:E,101:y,102:D},{13:Pe,53:75},{56:77,58:[1,78]},s(d,[2,61]),s(d,[2,62]),s(d,[2,63]),s(d,[2,64]),s(P,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:m,84:b,99:E,101:y,102:D}),s(P,[2,14],{20:[1,82]}),{15:83,16:84,58:m,84:b,99:E,101:y},{16:39,18:85,19:40,58:m,84:b,99:E,101:y,102:D},s(re,[2,118]),s(re,[2,119]),s(re,[2,120]),s(re,[2,121]),s([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:i,35:a,37:u,42:l,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D},s(d,[2,19]),s(d,[2,30]),s(d,[2,31]),{13:[1,89],16:39,18:88,19:40,58:m,84:b,99:E,101:y,102:D},{51:90,64:56,65:57,66:ee,67:te,68:se,69:ie,70:ae,71:Fe,72:Be},s(d,[2,49]),{65:91,71:Fe,72:Be},s(ue,[2,68],{64:92,66:ee,67:te,68:se,69:ie,70:ae}),s(z,[2,69]),s(z,[2,70]),s(z,[2,71]),s(z,[2,72]),s(z,[2,73]),s(Me,[2,74]),s(Me,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:m,84:b,99:E,101:y},{45:97,49:_e},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:K,57:104,58:Y,80:Q,82:105,83:106,84:W,85:j,86:X,87:q,88:H,89:J},{58:[1,116]},{13:Pe,53:117},s(d,[2,57]),s(d,[2,123]),{22:K,57:118,58:Y,59:[1,119],80:Q,82:105,83:106,84:W,85:j,86:X,87:q,88:H,89:J},s(Re,[2,59]),{16:39,18:120,19:40,58:m,84:b,99:E,101:y,102:D},s(P,[2,15]),s(P,[2,16]),s(P,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:m,84:b,99:E,101:y},s(Se,[2,43],{11:123,12:[1,124]}),s(De,[2,7]),{9:[1,125]},s(le,[2,52]),{16:39,18:126,19:40,58:m,84:b,99:E,101:y,102:D},{13:[1,128],16:39,18:127,19:40,58:m,84:b,99:E,101:y,102:D},s(ue,[2,67],{64:129,66:ee,67:te,68:se,69:ie,70:ae}),s(ue,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},s(ne,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:_e},{16:39,18:136,19:40,58:m,84:b,99:E,101:y,102:D},s(d,[2,76],{13:[1,137]}),s(d,[2,78],{13:[1,139],75:[1,138]}),s(d,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},s(d,[2,90],{59:Ge}),s(Ue,[2,92],{83:144,22:K,58:Y,80:Q,84:W,85:j,86:X,87:q,88:H,89:J}),s(N,[2,94]),s(N,[2,96]),s(N,[2,97]),s(N,[2,98]),s(N,[2,99]),s(N,[2,100]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(d,[2,91]),s(d,[2,56]),s(d,[2,58],{59:Ge}),{58:[1,145]},s(P,[2,13]),{15:146,16:84,58:m,84:b,99:E,101:y},{39:[2,11]},s(Se,[2,44]),{13:[1,147]},{1:[2,4]},s(le,[2,54]),s(le,[2,53]),{16:39,18:148,19:40,58:m,84:b,99:E,101:y,102:D},s(ue,[2,65]),s(d,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:_e},s(ne,[2,41]),{41:[2,47]},s(d,[2,45]),s(d,[2,77]),s(d,[2,79]),s(d,[2,80],{75:[1,152]}),s(d,[2,83]),s(d,[2,84],{13:[1,153]}),s(d,[2,86],{13:[1,155],75:[1,154]}),{22:K,58:Y,80:Q,82:156,83:106,84:W,85:j,86:X,87:q,88:H,89:J},s(N,[2,95]),s(Re,[2,60]),{39:[2,10]},{14:[1,157]},s(le,[2,55]),s(d,[2,34]),{41:[2,38]},{41:[1,158]},s(d,[2,81]),s(d,[2,85]),s(d,[2,87]),s(d,[2,88],{75:[1,159]}),s(Ue,[2,93],{83:144,22:K,58:Y,80:Q,84:W,85:j,86:X,87:q,88:H,89:J}),s(Se,[2,8]),s(ne,[2,42]),s(d,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:f(function(c,h){if(h.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=h,p}},"parseError"),parse:f(function(c){var h=this,p=[0],n=[],C=[null],e=[],Z=this.table,t="",oe=0,ze=0,He=2,Ke=1,Je=e.slice.call(arguments,1),T=Object.create(this.lexer),O={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(O.yy[Le]=this.yy[Le]);T.setInput(c,O.yy),O.yy.lexer=T,O.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var xe=T.yylloc;e.push(xe);var Ze=T.options&&T.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(_){p.length=p.length-2*_,C.length=C.length-_,e.length=e.length-_}f($e,"popStack");function Ye(){var _;return _=n.pop()||T.lex()||Ke,typeof _!="number"&&(_ instanceof Array&&(n=_,_=n.pop()),_=h.symbols_[_]||_),_}f(Ye,"lex");for(var B,w,S,ve,M={},he,x,Qe,de;;){if(w=p[p.length-1],this.defaultActions[w]?S=this.defaultActions[w]:((B===null||typeof B>"u")&&(B=Ye()),S=Z[w]&&Z[w][B]),typeof S>"u"||!S.length||!S[0]){var Ie="";de=[];for(he in Z[w])this.terminals_[he]&&he>He&&de.push("'"+this.terminals_[he]+"'");T.showPosition?Ie="Parse error on line "+(oe+1)+`: `+T.showPosition()+` Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ie="Parse error on line "+(oe+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ie,{text:T.match,token:this.terminals_[B]||B,line:T.yylineno,loc:xe,expected:de})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+B);switch(S[0]){case 1:p.push(B),C.push(T.yytext),e.push(T.yylloc),p.push(S[1]),B=null,ze=T.yyleng,t=T.yytext,oe=T.yylineno,xe=T.yylloc;break;case 2:if(x=this.productions_[S[1]][1],M.$=C[C.length-x],M._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Ze&&(M._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),ve=this.performAction.apply(M,[t,ze,oe,O.yy,S[1],C,e].concat(Je)),typeof ve<"u")return ve;x&&(p=p.slice(0,-1*x*2),C=C.slice(0,-1*x),e=e.slice(0,-1*x)),p.push(this.productions_[S[1]][0]),C.push(M.$),e.push(M._$),Qe=Z[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},qe=function(){var I={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(c,h){return this.yy=h||this.yy||{},this._input=c,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:f(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var h=c.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:f(function(c){var h=c.length,p=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===n.length?this.yylloc.first_column:0)+n[n.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(c){this.unput(this.match.slice(c))},"less"),pastInput:f(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var c=this.pastInput(),h=new Array(c.length+1).join("-");return c+this.upcomingInput()+` `+h+"^"},"showPosition"),test_match:f(function(c,h){var p,n,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),n=c[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],p=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var e in C)this[e]=C[e];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,h,p,n;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),e=0;eh[0].length)){if(h=p,n=e,this.options.backtrack_lexer){if(c=this.test_match(p,C[e]),c!==!1)return c;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(c=this.test_match(h,C[n]),c!==!1?c:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:f(function(h,p,n,C){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return I}();Ne.lexer=qe;function ce(){this.yy={}}return f(ce,"Parser"),ce.prototype=Ne,Ne.Parser=ce,new ce}();Ve.parser=Ve;var bt=Ve,We=["#","+","~","-",""],G,je=(G=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const u=dt(i,F());this.parseMember(u)}getDisplayDetails(){let i=this.visibility+R(this.id);this.memberType==="method"&&(i+=`(${R(this.parameters.trim())})`,this.returnType&&(i+=" : "+R(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){const o=r[1]?r[1].trim():"";if(We.includes(o)&&(this.visibility=o),this.id=r[2],this.parameters=r[3]?r[3].trim():"",a=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",a===""){const A=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(A)&&(a=A,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const l=i.length,r=i.substring(0,1),o=i.substring(l-1);We.includes(r)&&(this.visibility=r),/[$*]/.exec(o)&&(a=o),this.id=i.substring(this.visibility===""?0:1,a===""?l:l-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const u=`${this.visibility?"\\"+this.visibility:""}${R(this.id)}${this.memberType==="method"?`(${R(this.parameters)})${this.returnType?" : "+R(this.returnType):""}`:""}`;this.text=u.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},f(G,"ClassMember"),G),pe="classId-",Xe=0,V=f(s=>v.sanitizeText(s,F()),"sanitizeText"),U,Et=(U=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=f(i=>{let a=$(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=$("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),$(i).select("svg").selectAll("g.node").on("mouseover",r=>{const o=$(r.currentTarget);if(o.attr("title")===null)return;const g=this.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(o.attr("title")).style("left",window.scrollX+g.left+(g.right-g.left)/2+"px").style("top",window.scrollY+g.top-14+document.body.scrollTop+"px"),a.html(a.html().replace(/<br\/>/g,"
")),o.classed("hover",!0)}).on("mouseout",r=>{a.transition().duration(500).style("opacity",0),$(r.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=at,this.getAccTitle=nt,this.setAccDescription=rt,this.getAccDescription=ut,this.setDiagramTitle=lt,this.getDiagramTitle=ct,this.getConfig=f(()=>F().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(i){const a=v.sanitizeText(i,F());let u="",l=a;if(a.indexOf("~")>0){const r=a.split("~");l=V(r[0]),u=V(r[1])}return{className:l,type:u}}setClassLabel(i,a){const u=v.sanitizeText(i,F());a&&(a=V(a));const{className:l}=this.splitClassNameAndType(u);this.classes.get(l).label=a,this.classes.get(l).text=`${a}${this.classes.get(l).type?`<${this.classes.get(l).type}>`:""}`}addClass(i){const a=v.sanitizeText(i,F()),{className:u,type:l}=this.splitClassNameAndType(a);if(this.classes.has(u))return;const r=v.sanitizeText(u,F());this.classes.set(r,{id:r,type:l,label:r,text:`${r}${l?`<${l}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:pe+r+"-"+Xe}),Xe++}addInterface(i,a){const u={id:`interface${this.interfaces.length}`,label:i,classId:a};this.interfaces.push(u)}lookUpDomId(i){const a=v.sanitizeText(i,F());if(this.classes.has(a))return this.classes.get(a).domId;throw new Error("Class not found: "+a)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",ot()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(i){Oe.debug("Adding relation: "+JSON.stringify(i));const a=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!a.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!a.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=v.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=v.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,a){const u=this.splitClassNameAndType(i).className;this.classes.get(u).annotations.push(a)}addMember(i,a){this.addClass(i);const u=this.splitClassNameAndType(i).className,l=this.classes.get(u);if(typeof a=="string"){const r=a.trim();r.startsWith("<<")&&r.endsWith(">>")?l.annotations.push(V(r.substring(2,r.length-2))):r.indexOf(")")>0?l.methods.push(new je(r,"method")):r&&l.members.push(new je(r,"attribute"))}}addMembers(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(u=>this.addMember(i,u)))}addNote(i,a){const u={id:`note${this.notes.length}`,class:a,text:i};this.notes.push(u)}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),V(i.trim())}setCssClass(i,a){i.split(",").forEach(u=>{let l=u;/\d/.exec(u[0])&&(l=pe+l);const r=this.classes.get(l);r&&(r.cssClasses+=" "+a)})}defineClass(i,a){for(const u of i){let l=this.styleClasses.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.styleClasses.set(u,l)),a&&a.forEach(r=>{if(/color/.exec(r)){const o=r.replace("fill","bgFill");l.textStyles.push(o)}l.styles.push(r)}),this.classes.forEach(r=>{r.cssClasses.includes(u)&&r.styles.push(...a.flatMap(o=>o.split(",")))})}}setTooltip(i,a){i.split(",").forEach(u=>{a!==void 0&&(this.classes.get(u).tooltip=V(a))})}getTooltip(i,a){return a&&this.namespaces.has(a)?this.namespaces.get(a).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,a,u){const l=F();i.split(",").forEach(r=>{let o=r;/\d/.exec(r[0])&&(o=pe+o);const A=this.classes.get(o);A&&(A.link=we.formatUrl(a,l),l.securityLevel==="sandbox"?A.linkTarget="_top":typeof u=="string"?A.linkTarget=V(u):A.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,a,u){i.split(",").forEach(l=>{this.setClickFunc(l,a,u),this.classes.get(l).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,a,u){const l=v.sanitizeText(i,F());if(F().securityLevel!=="loose"||a===void 0)return;const o=l;if(this.classes.has(o)){const A=this.lookUpDomId(o);let g=[];if(typeof u=="string"){g=u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{const k=document.querySelector(`[id="${A}"]`);k!==null&&k.addEventListener("click",()=>{we.runFunc(a,...g)},!1)})}}bindFunctions(i){this.functions.forEach(a=>{a(i)})}getDirection(){return this.direction}setDirection(i){this.direction=i}addNamespace(i){this.namespaces.has(i)||(this.namespaces.set(i,{id:i,classes:new Map,children:{},domId:pe+i+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,a){if(this.namespaces.has(i))for(const u of a){const{className:l}=this.splitClassNameAndType(u);this.classes.get(l).parent=i,this.namespaces.get(i).classes.set(l,this.classes.get(l))}}setCssStyle(i,a){const u=this.classes.get(i);if(!(!a||!u))for(const l of a)l.includes(",")?u.styles.push(...l.split(",")):u.styles.push(l)}getArrowMarker(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}getData(){var r;const i=[],a=[],u=F();for(const o of this.namespaces.keys()){const A=this.namespaces.get(o);if(A){const g={id:A.id,label:A.id,isGroup:!0,padding:u.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:u.look};i.push(g)}}for(const o of this.classes.keys()){const A=this.classes.get(o);if(A){const g=A;g.parentId=A.parent,g.look=u.look,i.push(g)}}let l=0;for(const o of this.notes){l++;const A={id:o.id,label:o.text,isGroup:!1,shape:"note",padding:u.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${u.themeVariables.noteBkgColor}`,`stroke: ${u.themeVariables.noteBorderColor}`],look:u.look};i.push(A);const g=((r=this.classes.get(o.class))==null?void 0:r.id)??"";if(g){const k={id:`edgeNote${l}`,start:o.id,end:g,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:u.look};a.push(k)}}for(const o of this.interfaces){const A={id:o.id,label:o.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:u.look};i.push(A)}l=0;for(const o of this.relations){l++;const A={id:ht(o.id1,o.id2,{prefix:"id",counter:l}),start:o.id1,end:o.id2,type:"normal",label:o.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(o.relation.type1),arrowTypeEnd:this.getArrowMarker(o.relation.type2),startLabelRight:o.relationTitle1==="none"?"":o.relationTitle1,endLabelLeft:o.relationTitle2==="none"?"":o.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:o.style||"",pattern:o.relation.lineType==1?"dashed":"solid",look:u.look};a.push(A)}return{nodes:i,edges:a,other:{},config:u,direction:this.getDirection()}}},f(U,"ClassDB"),U),pt=f(s=>`g.classGroup text { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:f(function(h,p,n,C){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return I}();Ne.lexer=qe;function ce(){this.yy={}}return f(ce,"Parser"),ce.prototype=Ne,Ne.Parser=ce,new ce}();Ve.parser=Ve;var Tt=Ve,We=["#","+","~","-",""],G,je=(G=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const u=pt(i,F());this.parseMember(u)}getDisplayDetails(){let i=this.visibility+R(this.id);this.memberType==="method"&&(i+=`(${R(this.parameters.trim())})`,this.returnType&&(i+=" : "+R(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){const o=r[1]?r[1].trim():"";if(We.includes(o)&&(this.visibility=o),this.id=r[2],this.parameters=r[3]?r[3].trim():"",a=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",a===""){const A=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(A)&&(a=A,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const l=i.length,r=i.substring(0,1),o=i.substring(l-1);We.includes(r)&&(this.visibility=r),/[$*]/.exec(o)&&(a=o),this.id=i.substring(this.visibility===""?0:1,a===""?l:l-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const u=`${this.visibility?"\\"+this.visibility:""}${R(this.id)}${this.memberType==="method"?`(${R(this.parameters)})${this.returnType?" : "+R(this.returnType):""}`:""}`;this.text=u.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},f(G,"ClassMember"),G),pe="classId-",Xe=0,V=f(s=>v.sanitizeText(s,F()),"sanitizeText"),U,kt=(U=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=f(i=>{let a=$(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=$("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),$(i).select("svg").selectAll("g.node").on("mouseover",r=>{const o=$(r.currentTarget);if(o.attr("title")===null)return;const g=this.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(o.attr("title")).style("left",window.scrollX+g.left+(g.right-g.left)/2+"px").style("top",window.scrollY+g.top-14+document.body.scrollTop+"px"),a.html(a.html().replace(/<br\/>/g,"
")),o.classed("hover",!0)}).on("mouseout",r=>{a.transition().duration(500).style("opacity",0),$(r.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=nt,this.getAccTitle=rt,this.setAccDescription=ut,this.getAccDescription=lt,this.setDiagramTitle=ct,this.getDiagramTitle=ot,this.getConfig=f(()=>F().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(i){const a=v.sanitizeText(i,F());let u="",l=a;if(a.indexOf("~")>0){const r=a.split("~");l=V(r[0]),u=V(r[1])}return{className:l,type:u}}setClassLabel(i,a){const u=v.sanitizeText(i,F());a&&(a=V(a));const{className:l}=this.splitClassNameAndType(u);this.classes.get(l).label=a,this.classes.get(l).text=`${a}${this.classes.get(l).type?`<${this.classes.get(l).type}>`:""}`}addClass(i){const a=v.sanitizeText(i,F()),{className:u,type:l}=this.splitClassNameAndType(a);if(this.classes.has(u))return;const r=v.sanitizeText(u,F());this.classes.set(r,{id:r,type:l,label:r,text:`${r}${l?`<${l}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:pe+r+"-"+Xe}),Xe++}addInterface(i,a){const u={id:`interface${this.interfaces.length}`,label:i,classId:a};this.interfaces.push(u)}lookUpDomId(i){const a=v.sanitizeText(i,F());if(this.classes.has(a))return this.classes.get(a).domId;throw new Error("Class not found: "+a)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",ht()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(i){Oe.debug("Adding relation: "+JSON.stringify(i));const a=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!a.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!a.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=v.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=v.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,a){const u=this.splitClassNameAndType(i).className;this.classes.get(u).annotations.push(a)}addMember(i,a){this.addClass(i);const u=this.splitClassNameAndType(i).className,l=this.classes.get(u);if(typeof a=="string"){const r=a.trim();r.startsWith("<<")&&r.endsWith(">>")?l.annotations.push(V(r.substring(2,r.length-2))):r.indexOf(")")>0?l.methods.push(new je(r,"method")):r&&l.members.push(new je(r,"attribute"))}}addMembers(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(u=>this.addMember(i,u)))}addNote(i,a){const u={id:`note${this.notes.length}`,class:a,text:i};this.notes.push(u)}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),V(i.trim())}setCssClass(i,a){i.split(",").forEach(u=>{let l=u;/\d/.exec(u[0])&&(l=pe+l);const r=this.classes.get(l);r&&(r.cssClasses+=" "+a)})}defineClass(i,a){for(const u of i){let l=this.styleClasses.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.styleClasses.set(u,l)),a&&a.forEach(r=>{if(/color/.exec(r)){const o=r.replace("fill","bgFill");l.textStyles.push(o)}l.styles.push(r)}),this.classes.forEach(r=>{r.cssClasses.includes(u)&&r.styles.push(...a.flatMap(o=>o.split(",")))})}}setTooltip(i,a){i.split(",").forEach(u=>{a!==void 0&&(this.classes.get(u).tooltip=V(a))})}getTooltip(i,a){return a&&this.namespaces.has(a)?this.namespaces.get(a).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,a,u){const l=F();i.split(",").forEach(r=>{let o=r;/\d/.exec(r[0])&&(o=pe+o);const A=this.classes.get(o);A&&(A.link=we.formatUrl(a,l),l.securityLevel==="sandbox"?A.linkTarget="_top":typeof u=="string"?A.linkTarget=V(u):A.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,a,u){i.split(",").forEach(l=>{this.setClickFunc(l,a,u),this.classes.get(l).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,a,u){const l=v.sanitizeText(i,F());if(F().securityLevel!=="loose"||a===void 0)return;const o=l;if(this.classes.has(o)){const A=this.lookUpDomId(o);let g=[];if(typeof u=="string"){g=u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{const k=document.querySelector(`[id="${A}"]`);k!==null&&k.addEventListener("click",()=>{we.runFunc(a,...g)},!1)})}}bindFunctions(i){this.functions.forEach(a=>{a(i)})}getDirection(){return this.direction}setDirection(i){this.direction=i}addNamespace(i){this.namespaces.has(i)||(this.namespaces.set(i,{id:i,classes:new Map,children:{},domId:pe+i+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,a){if(this.namespaces.has(i))for(const u of a){const{className:l}=this.splitClassNameAndType(u);this.classes.get(l).parent=i,this.namespaces.get(i).classes.set(l,this.classes.get(l))}}setCssStyle(i,a){const u=this.classes.get(i);if(!(!a||!u))for(const l of a)l.includes(",")?u.styles.push(...l.split(",")):u.styles.push(l)}getArrowMarker(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}getData(){var r;const i=[],a=[],u=F();for(const o of this.namespaces.keys()){const A=this.namespaces.get(o);if(A){const g={id:A.id,label:A.id,isGroup:!0,padding:u.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:u.look};i.push(g)}}for(const o of this.classes.keys()){const A=this.classes.get(o);if(A){const g=A;g.parentId=A.parent,g.look=u.look,i.push(g)}}let l=0;for(const o of this.notes){l++;const A={id:o.id,label:o.text,isGroup:!1,shape:"note",padding:u.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${u.themeVariables.noteBkgColor}`,`stroke: ${u.themeVariables.noteBorderColor}`],look:u.look};i.push(A);const g=((r=this.classes.get(o.class))==null?void 0:r.id)??"";if(g){const k={id:`edgeNote${l}`,start:o.id,end:g,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:u.look};a.push(k)}}for(const o of this.interfaces){const A={id:o.id,label:o.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:u.look};i.push(A)}l=0;for(const o of this.relations){l++;const A={id:dt(o.id1,o.id2,{prefix:"id",counter:l}),start:o.id1,end:o.id2,type:"normal",label:o.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(o.relation.type1),arrowTypeEnd:this.getArrowMarker(o.relation.type2),startLabelRight:o.relationTitle1==="none"?"":o.relationTitle1,endLabelLeft:o.relationTitle2==="none"?"":o.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:o.style||"",pattern:o.relation.lineType==1?"dashed":"solid",look:u.look};a.push(A)}return{nodes:i,edges:a,other:{},config:u,direction:this.getDirection()}}},f(U,"ClassDB"),U),At=f(s=>`g.classGroup text { fill: ${s.nodeBorder||s.classText}; stroke: none; font-family: ${s.fontFamily}; @@ -161,4 +161,5 @@ g.classGroup line { font-size: 18px; fill: ${s.textColor}; } -`,"getStyles"),yt=pt,At=f((s,i="TB")=>{if(!s.doc)return i;let a=i;for(const u of s.doc)u.stmt==="dir"&&(a=u.value);return a},"getDir"),ft=f(function(s,i){return i.db.getClasses()},"getClasses"),gt=f(async function(s,i,a,u){Oe.info("REF0:"),Oe.info("Drawing class diagram (v3)",i);const{securityLevel:l,state:r,layout:o}=F(),A=u.db.getData(),g=et(i,l);A.type=u.type,A.layoutAlgorithm=st(o),A.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,A.rankSpacing=(r==null?void 0:r.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=i,await it(A,g);const k=8;we.insertTitle(g,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,u.db.getDiagramTitle()),tt(g,k,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),Tt={getClasses:ft,draw:gt,getDir:At};export{Et as C,bt as a,Tt as c,yt as s}; + ${et()} +`,"getStyles"),Dt=At,ft=f((s,i="TB")=>{if(!s.doc)return i;let a=i;for(const u of s.doc)u.stmt==="dir"&&(a=u.value);return a},"getDir"),gt=f(function(s,i){return i.db.getClasses()},"getClasses"),Ct=f(async function(s,i,a,u){Oe.info("REF0:"),Oe.info("Drawing class diagram (v3)",i);const{securityLevel:l,state:r,layout:o}=F(),A=u.db.getData(),g=tt(i,l);A.type=u.type,A.layoutAlgorithm=it(o),A.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,A.rankSpacing=(r==null?void 0:r.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=i,await at(A,g);const k=8;we.insertTitle(g,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,u.db.getDiagramTitle()),st(g,k,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),Ft={getClasses:gt,draw:Ct,getDir:ft};export{kt as C,Tt as a,Ft as c,Dt as s}; diff --git a/lightrag/api/webui/assets/chunk-RZ5BOZE2-B615FLH4.js b/lightrag/api/webui/assets/chunk-RZ5BOZE2-B615FLH4.js deleted file mode 100644 index ef6235ae..00000000 --- a/lightrag/api/webui/assets/chunk-RZ5BOZE2-B615FLH4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,d as r,e as d,l as g}from"./mermaid-vendor-D0f_SE0h.js";var u=n((e,t)=>{let o;return t==="sandbox"&&(o=r("#i"+e)),(t==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${e}"]`)},"getDiagramElement"),b=n((e,t,o,i)=>{e.attr("class",o);const{width:a,height:s,x:h,y:x}=l(e,t);d(e,s,a,i);const c=w(h,x,a,s,t);e.attr("viewBox",c),g.debug(`viewBox configured: ${c} with padding: ${t}`)},"setupViewPortForSVG"),l=n((e,t)=>{var i;const o=((i=e.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+t*2,height:o.height+t*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=n((e,t,o,i,a)=>`${e-a} ${t-a} ${o} ${i}`,"createViewBox");export{u as g,b as s}; diff --git a/lightrag/api/webui/assets/chunk-SKB7J2MH-CncvyOyo.js b/lightrag/api/webui/assets/chunk-SKB7J2MH-CncvyOyo.js new file mode 100644 index 00000000..9bad9ca4 --- /dev/null +++ b/lightrag/api/webui/assets/chunk-SKB7J2MH-CncvyOyo.js @@ -0,0 +1 @@ +import{_ as a,e as w,l as x}from"./mermaid-vendor-DOoA-Fcm.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s}; diff --git a/lightrag/api/webui/assets/classDiagram-BGRH5UQR-B1ZwhQup.js b/lightrag/api/webui/assets/classDiagram-BGRH5UQR-B1ZwhQup.js new file mode 100644 index 00000000..e32226d5 --- /dev/null +++ b/lightrag/api/webui/assets/classDiagram-BGRH5UQR-B1ZwhQup.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-QEP2MXWD-iMxqHW1H.js";import{_ as i}from"./mermaid-vendor-DOoA-Fcm.js";import"./chunk-E2GYISFI-DBdOi329.js";import"./chunk-BFAMUDN2-DUbWdDRU.js";import"./chunk-SKB7J2MH-CncvyOyo.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";var c={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{c as diagram}; diff --git a/lightrag/api/webui/assets/classDiagram-GIVACNV2-DBTA8XwB.js b/lightrag/api/webui/assets/classDiagram-GIVACNV2-DBTA8XwB.js deleted file mode 100644 index 27c65696..00000000 --- a/lightrag/api/webui/assets/classDiagram-GIVACNV2-DBTA8XwB.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-B91iiasA.js";import{_ as i}from"./mermaid-vendor-D0f_SE0h.js";import"./chunk-RZ5BOZE2-B615FLH4.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/lightrag/api/webui/assets/classDiagram-v2-COTLJTTW-DBTA8XwB.js b/lightrag/api/webui/assets/classDiagram-v2-COTLJTTW-DBTA8XwB.js deleted file mode 100644 index 27c65696..00000000 --- a/lightrag/api/webui/assets/classDiagram-v2-COTLJTTW-DBTA8XwB.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-B91iiasA.js";import{_ as i}from"./mermaid-vendor-D0f_SE0h.js";import"./chunk-RZ5BOZE2-B615FLH4.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/lightrag/api/webui/assets/classDiagram-v2-O24JOBDK-B1ZwhQup.js b/lightrag/api/webui/assets/classDiagram-v2-O24JOBDK-B1ZwhQup.js new file mode 100644 index 00000000..e32226d5 --- /dev/null +++ b/lightrag/api/webui/assets/classDiagram-v2-O24JOBDK-B1ZwhQup.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-QEP2MXWD-iMxqHW1H.js";import{_ as i}from"./mermaid-vendor-DOoA-Fcm.js";import"./chunk-E2GYISFI-DBdOi329.js";import"./chunk-BFAMUDN2-DUbWdDRU.js";import"./chunk-SKB7J2MH-CncvyOyo.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";var c={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{c as diagram}; diff --git a/lightrag/api/webui/assets/clone-DMtoZDWc.js b/lightrag/api/webui/assets/clone-DMtoZDWc.js new file mode 100644 index 00000000..43b2c47c --- /dev/null +++ b/lightrag/api/webui/assets/clone-DMtoZDWc.js @@ -0,0 +1 @@ +import{b as r}from"./_baseUniq-DHoNBBvA.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/lightrag/api/webui/assets/clone-Dm5jEAXQ.js b/lightrag/api/webui/assets/clone-Dm5jEAXQ.js deleted file mode 100644 index 8b42b7f6..00000000 --- a/lightrag/api/webui/assets/clone-Dm5jEAXQ.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r}from"./_baseUniq-CtAZZJ8e.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js b/lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js deleted file mode 100644 index dc213bc6..00000000 --- a/lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js +++ /dev/null @@ -1,191 +0,0 @@ -function cs(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw i}}}}function Ll(t,e,r){return(e=Ol(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Vf(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=i.call(r)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){u=!0,n=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}function _f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gf(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(t,e){return Nf(t)||Vf(t,e)||Rs(t,e)||_f()}function Il(t){return Ff(t)||qf(t)||Rs(t)||Gf()}function Hf(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ol(t){var e=Hf(t,"string");return typeof e=="symbol"?e:e+""}function We(t){"@babel/helpers - typeof";return We=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(t)}function Rs(t,e){if(t){if(typeof t=="string")return cs(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cs(t,e):void 0}}var Ke=typeof window>"u"?null:window,so=Ke?Ke.navigator:null;Ke&&Ke.document;var Kf=We(""),Nl=We({}),$f=We(function(){}),Wf=typeof HTMLElement>"u"?"undefined":We(HTMLElement),Ca=function(e){return e&&e.instanceString&&_e(e.instanceString)?e.instanceString():null},fe=function(e){return e!=null&&We(e)==Kf},_e=function(e){return e!=null&&We(e)===$f},Le=function(e){return!bt(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},ke=function(e){return e!=null&&We(e)===Nl&&!Le(e)&&e.constructor===Object},Uf=function(e){return e!=null&&We(e)===Nl},ae=function(e){return e!=null&&We(e)===We(1)&&!isNaN(e)},Yf=function(e){return ae(e)&&Math.floor(e)===e},un=function(e){if(Wf!=="undefined")return e!=null&&e instanceof HTMLElement},bt=function(e){return Ta(e)||Fl(e)},Ta=function(e){return Ca(e)==="collection"&&e._private.single},Fl=function(e){return Ca(e)==="collection"&&!e._private.single},Ms=function(e){return Ca(e)==="core"},zl=function(e){return Ca(e)==="stylesheet"},Xf=function(e){return Ca(e)==="event"},tr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Zf=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Qf=function(e){return ke(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},Jf=function(e){return Uf(e)&&_e(e.then)},jf=function(){return so&&so.userAgent.match(/msie|trident|edge/i)},Vr=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},sc=function(e,r){return-1*Vl(e,r)},ge=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(g-=1),g<1/6?d+(y-d)*6*g:g<1/2?y:g<2/3?d+(y-d)*(2/3-g)*6:d}var f=new RegExp("^"+rc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}r=[o,l,u,s]}return r},lc=function(e){var r,a=new RegExp("^"+ec+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},vc=function(e){return fc[e.toLowerCase()]},_l=function(e){return(Le(e)?e:null)||vc(e)||oc(e)||lc(e)||uc(e)},fc={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Gl=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i=l||R<0||m&&L>=c}function S(){var P=e();if(x(P))return k(P);d=setTimeout(S,C(P))}function k(P){return d=void 0,b&&v?w(P):(v=f=void 0,h)}function B(){d!==void 0&&clearTimeout(d),g=0,v=y=f=d=void 0}function D(){return d===void 0?h:k(e())}function A(){var P=e(),R=x(P);if(v=arguments,f=this,y=P,R){if(d===void 0)return E(y);if(m)return clearTimeout(d),d=setTimeout(S,l),w(y)}return d===void 0&&(d=setTimeout(S,l)),h}return A.cancel=B,A.flush=D,A}return ei=s,ei}var xc=wc(),Pa=Sa(xc),ti=Ke?Ke.performance:null,$l=ti&&ti.now?function(){return ti.now()}:function(){return Date.now()},Ec=function(){if(Ke){if(Ke.requestAnimationFrame)return function(t){Ke.requestAnimationFrame(t)};if(Ke.mozRequestAnimationFrame)return function(t){Ke.mozRequestAnimationFrame(t)};if(Ke.webkitRequestAnimationFrame)return function(t){Ke.webkitRequestAnimationFrame(t)};if(Ke.msRequestAnimationFrame)return function(t){Ke.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t($l())},1e3/60)}}(),ln=function(e){return Ec(e)},$t=$l,Mr=9261,Wl=65599,sa=5381,Ul=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr,a=r,n;n=e.next(),!n.done;)a=a*Wl+n.value|0;return a},da=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr;return r*Wl+e|0},ha=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sa;return(r<<5)+r+e|0},Cc=function(e,r){return e*2097152+r},Xt=function(e){return e[0]*2097152+e[1]},za=function(e,r){return[da(e[0],r[0]),ha(e[1],r[1])]},Co=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===r&&e.splice(n,1)},Fs=function(e){e.splice(0,e.length)},Ac=function(e,r){for(var a=0;a"u"?"undefined":We(Set))!==Mc?Set:Lc,Cn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!Ms(e)){Ve("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Ve("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new $r,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Le(r.classes)?u=r.classes:fe(r.classes)&&(u=r.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(p,m,b,w,E){var C;if(b==null&&(b=0),E==null&&(E=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=p.length);bB;0<=B?k++:k--)S.push(k);return S}).apply(this).reverse(),x=[],w=0,E=C.length;wD;0<=D?++S:--S)A.push(s(p,b));return A},y=function(p,m,b,w){var E,C,x;for(w==null&&(w=a),E=p[b];b>m;){if(x=b-1>>1,C=p[x],w(E,C)<0){p[b]=C,b=x;continue}break}return p[b]=E},g=function(p,m,b){var w,E,C,x,S;for(b==null&&(b=a),E=p.length,S=m,C=p[m],w=2*m+1;w0;){var C=m.pop(),x=g(C),S=C.id();if(c[S]=x,x!==1/0)for(var k=C.neighborhood().intersect(d),B=0;B0)for(O.unshift(M);f[H];){var F=f[H];O.unshift(F.edge),O.unshift(F.node),_=F.node,H=_.id()}return o.spawn(O)}}}},Vc={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var E=0;E0;){if(E(),x++,w===v){for(var S=[],k=i,B=v,D=p[B];S.unshift(k),D!=null&&S.unshift(D),k=g[B],k!=null;)B=k.id(),D=p[B];return{found:!0,distance:f[w],path:this.spawn(S),steps:x}}h[w]=!0;for(var A=b._private.edges,P=0;PD&&(d[B]=D,m[B]=k,b[B]=E),!i){var A=k*v+S;!i&&d[A]>D&&(d[A]=D,m[A]=S,b[A]=E)}}}for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:s,de=b(se),ye=[],he=de;;){if(he==null)return r.spawn();var me=m(he),Ce=me.edge,Se=me.pred;if(ye.unshift(he[0]),he.same(ue)&&ye.length>0)break;Ce!=null&&ye.unshift(Ce),he=Se}return l.spawn(ye)},C=0;C=0;v--){var f=u[v],c=f[1],h=f[2];(r[c]===o&&r[h]===l||r[c]===l&&r[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*r.length);r=Yc(i,e,r),a--}return r},Xc={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/Uc);if(i<2){Ve("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},td=function(e){return Math.PI*e/180},qa=function(e,r){return Math.atan2(r,e)-Math.PI/2},zs=Math.log2||function(t){return Math.log(t)/Math.log(2)},ev=function(e){return e>0?1:e<0?-1:0},yr=function(e,r){return Math.sqrt(cr(e,r))},cr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},rd=function(e){for(var r=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},nd=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},id=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},sd=function(e,r,a){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},tv=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},od=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},Qa=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Ja=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=je(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Bo=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},qs=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},_r=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},ud=function(e,r){return _r(e,r.x,r.y)},rv=function(e,r){return _r(e,r.x1,r.y1)&&_r(e,r.x2,r.y2)},av=function(e,r,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?mr(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var y=a-v+u-o,g=n-f-o,p=a+v-u+o,m=g;if(d=Jt(e,r,a,n,y,g,p,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,E=b,C=n+f-u+o;if(d=Jt(e,r,a,n,b,w,E,C,!1),d.length>0)return d}if(c){var x=a-v+u-o,S=n+f+o,k=a+v-u+o,B=S;if(d=Jt(e,r,a,n,x,S,k,B,!1),d.length>0)return d}if(h){var D=a-v-o,A=n-f+u-o,P=D,R=n+f-u+o;if(d=Jt(e,r,a,n,D,A,P,R,!1),d.length>0)return d}var L;{var I=a-v+u,M=n-f+u;if(L=oa(e,r,a,n,I,M,u+o),L.length>0&&L[0]<=I&&L[1]<=M)return[L[0],L[1]]}{var O=a+v-u,_=n-f+u;if(L=oa(e,r,a,n,O,_,u+o),L.length>0&&L[0]>=O&&L[1]<=_)return[L[0],L[1]]}{var H=a+v-u,F=n+f-u;if(L=oa(e,r,a,n,H,F,u+o),L.length>0&&L[0]>=H&&L[1]>=F)return[L[0],L[1]]}{var G=a-v+u,U=n+f-u;if(L=oa(e,r,a,n,G,U,u+o),L.length>0&&L[0]<=G&&L[1]>=U)return[L[0],L[1]]}return[]},ld=function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=r&&r<=c+l},vd=function(e,r,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||rv.y2)},fd=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},cd=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,h=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},dd=function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,h=[];cd(u,v,f,c,h);for(var d=1e-7,y=[],g=0;g<6;g+=2)Math.abs(h[g+1])=0&&h[g]<=1&&y.push(h[g]);y.push(1),y.push(0);for(var p=-1,m,b,w,E=0;E=0?wu?(e-i)*(e-i)+(r-s)*(r-s):v-c},gt=function(e,r,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},Wt=function(e,r,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var g=cn(v,-u);y=fn(g)}else y=v;return gt(e,r,y)},gd=function(e,r,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&g<=1&&m.push(g),p>=0&&p<=1&&m.push(p),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+r;if(m.length>1){if(m[0]==m[1])return[b,w];var E=m[1]*l[0]+e,C=m[1]*l[1]+r;return[b,w,E,C]}else return[b,w]},ni=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Jt=function(e,r,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=r-s,d=n-r,y=l-s,g=c*h-y*v,p=f*h-d*v,m=y*f-c*d;if(m!==0){var b=g/m,w=p/m,E=.001,C=0-E,x=1+E;return C<=b&&b<=x&&C<=w&&w<=x?[e+b*f,r+b*d]:u?[e+b*f,r+b*d]:[]}else return g===0||p===0?ni(e,a,o)===o?[o,l]:ni(e,a,i)===i?[i,s]:ni(i,o,a)===a?[a,n]:[]:[]},ya=function(e,r,a,n,i,s,o,l){var u=[],v,f=new Array(a.length),c=!0;s==null&&(c=!1);var h;if(c){for(var d=0;d0){var y=cn(f,-l);h=fn(y)}else h=f}else h=a;for(var g,p,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-r,2),g=1;gv&&(v=w)},get:function(b){return u[b]}},c=0;c0?L=R.edgesTo(P)[0]:L=P.edgesTo(R)[0];var I=n(L);P=P.id(),x[P]>x[D]+I&&(x[P]=x[D]+I,S.nodes.indexOf(P)<0?S.push(P):S.updateItem(P),C[P]=0,E[P]=[]),x[P]==x[D]+I&&(C[P]=C[P]+C[D],E[P].push(D))}else for(var M=0;M0;){for(var F=w.pop(),G=0;G0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},Rd=function(e,r){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:Id,o=n,l,u,v=0;v=2?ea(e,r,a,0,Io,Od):ea(e,r,a,0,Lo)},squaredEuclidean:function(e,r,a){return ea(e,r,a,0,Io)},manhattan:function(e,r,a){return ea(e,r,a,0,Lo)},max:function(e,r,a){return ea(e,r,a,-1/0,Nd)}};Gr["squared-euclidean"]=Gr.squaredEuclidean;Gr.squaredeuclidean=Gr.squaredEuclidean;function Sn(t,e,r,a,n,i){var s;return _e(t)?s=t:s=Gr[t]||Gr.euclidean,e===0&&_e(t)?s(n,i):s(e,r,a,n,i)}var Fd=Ue({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),_s=function(e){return Fd(e)},dn=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](r)},u=a,v=r;return Sn(e,n.length,o,l,u,v)},ii=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;ua)return!1}return!0},Vd=function(e,r,a){for(var n=0;no&&(o=r[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=r[s],y=r[n[s]],g;i.mode==="dendrogram"?g={left:d,right:y,key:d.key}:g={value:d.value.concat(y.value),key:d.key},e[d.index]=g,e.splice(y.index,1),r[d.key]=g;for(var p=0;pa[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},Vo=function(e,r,a){for(var n=[],i=0;io&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=Vo(e,r,a),n},_o=function(e){for(var r=this.cy(),a=this.nodes(),n=Jd(e),i={},s=0;s=D?(A=D,D=R,P=L):R>A&&(A=R);for(var I=0;I0?1:0;x[k%n.minIterations*o+G]=U,F+=U}if(F>0&&(k>=n.minIterations-1||k==n.maxIterations-1)){for(var X=0,Z=0;Z1||C>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(S){S.isEdge()&&f[b].push(S.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(E){return f[b].push(E.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,E=[b],C,x,S;f[w].length;)C=f[w].shift(),x=c[C][0],S=c[C][1],w!=S?(f[S]=f[S].filter(function(k){return k!=C}),w=S):!i&&w!=x&&(f[x]=f[x].filter(function(k){return k!=C}),w=x),E.unshift(C),E.unshift(w);return E},y=[],g=[];for(g=d(v);g.length!=1;)f[g[0]].length==0?(y.unshift(s.getElementById(g.shift())),y.unshift(s.getElementById(g.shift()))):g=d(g.shift()).concat(g);y.unshift(s.getElementById(g.shift()));for(var p in f)if(f[p].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},_a=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,y=[],g=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(p){var m=p.connectedNodes().intersection(e);g.merge(p),m.forEach(function(b){var w=b.id(),E=b.connectedEdges().intersection(e);g.merge(b),r[w].cutVertex?g.merge(E.filter(function(C){return C.isLoop()})):g.merge(E)})}),i.push(g)},u=function(c,h,d){c===d&&(n+=1),r[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var g,p,m,b;y.forEach(function(w){g=w.source().id(),p=w.target().id(),m=g===h?p:g,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in r?r[h].low=Math.min(r[h].low,r[m].id):(u(c,m,h),r[h].low=Math.min(r[h].low,r[m].low),r[h].id<=r[m].low&&(r[h].cutVertex=!0,l(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in r||(n=0,u(c,c),r[c].cutVertex=n>1)}});var v=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},sh={hopcroftTarjanBiconnected:_a,htbc:_a,htb:_a,hopcroftTarjanBiconnectedComponents:_a},Ga=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var g=y.target().id();g!==u&&(g in r||o(g),r[g].explored||(r[u].low=Math.min(r[u].low,r[g].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),r[c].low=r[u].index,r[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},oh={tarjanStronglyConnected:Ga,tsc:Ga,tscc:Ga,tarjanStronglyConnectedComponents:Ga},vv={};[ga,qc,Vc,Gc,Kc,Wc,Xc,wd,Fr,zr,gs,Ld,Wd,Zd,ah,ih,sh,oh].forEach(function(t){ge(vv,t)});/*! -Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable -Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) -Licensed under The MIT License (http://opensource.org/licenses/MIT) -*/var fv=0,cv=1,dv=2,At=function(e){if(!(this instanceof At))return new At(e);this.id="Thenable/1.0.7",this.state=fv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};At.prototype={fulfill:function(e){return Go(this,cv,"fulfillValue",e)},reject:function(e){return Go(this,dv,"rejectReason",e)},then:function(e,r){var a=this,n=new At;return a.onFulfilled.push(Ko(e,n,"fulfill")),a.onRejected.push(Ko(r,n,"reject")),hv(a),n.proxy}};var Go=function(e,r,a,n){return e.state===fv&&(e.state=r,e[a]=n,hv(e)),e},hv=function(e){e.state===cv?Ho(e,"onFulfilled",e.fulfillValue):e.state===dv&&Ho(e,"onRejected",e.rejectReason)},Ho=function(e,r,a){if(e[r].length!==0){var n=e[r];e[r]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}return ki=e,ki}var Pi,du;function Dh(){if(du)return Pi;du=1;var t=Pn();function e(r,a){var n=this.__data__,i=t(n,r);return i<0?(++this.size,n.push([r,a])):n[i][1]=a,this}return Pi=e,Pi}var Bi,hu;function kh(){if(hu)return Bi;hu=1;var t=Eh(),e=Ch(),r=Th(),a=Sh(),n=Dh();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&a%1==0&&a0&&this.spawn(n).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){Le(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=r===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var a=this;if(r==null)r=250;else if(r===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},r),a}};ja.className=ja.classNames=ja.classes;var De={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:$e,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};De.variable="(?:[\\w-.]|(?:\\\\"+De.metaChar+"))+";De.className="(?:[\\w-]|(?:\\\\"+De.metaChar+"))+";De.value=De.string+"|"+De.number;De.id=De.variable;(function(){var t,e,r;for(t=De.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(De.comparatorOp+="|\\!"+e)})();var Me=function(){return{checks:[]}},oe={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},bs=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return sc(t.selector,e.selector)}),ng=function(){for(var t={},e,r=0;r0&&v.edgeCount>0)return Re("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Re("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Re("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},vg=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},r=function(v){return fe(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case oe.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case oe.DATA_COMPARE:{var y=v.field,g=v.operator;return"["+y+a(e(g))+r(h)+"]"}case oe.DATA_BOOL:{var p=v.operator,m=v.field;return"["+e(p)+m+"]"}case oe.DATA_EXIST:{var b=v.field;return"["+b+"]"}case oe.META_COMPARE:{var w=v.operator,E=v.field;return"[["+E+a(e(w))+r(h)+"]]"}case oe.STATE:return h;case oe.ID:return"#"+h;case oe.CLASS:return"."+h;case oe.PARENT:case oe.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case oe.ANCESTOR:case oe.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case oe.COMPOUND_SPLIT:{var C=i(v.left,f),x=i(v.subject,f),S=i(v.right,f);return C+(C.length>0?" ":"")+x+S}case oe.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),r){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return t}function Ev(t,e,r){if(r.isParent())for(var a=r._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return $s(this,t,e,Ev)};function Cv(t,e,r){if(r.isChild()){var a=r._private.parent;e.has(a.id())||t.push(a)}}Hr.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return $s(this,t,e,Cv)};function mg(t,e,r){Cv(t,e,r),Ev(t,e,r)}Hr.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return $s(this,t,e,mg)};Hr.ancestors=Hr.parents;var ma,Tv;ma=Tv={data:Ae.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Ae.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ae.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ae.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ae.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ae.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};ma.attr=ma.data;ma.removeAttr=ma.removeData;var bg=Tv,An={};function as(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var a=0,n=r[0],i=n._private.edges,s=0;se}),minIndegree:Sr("indegree",function(t,e){return te}),minOutdegree:Sr("outdegree",function(t,e){return te})});ge(An,{totalDegree:function(e){for(var r=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};r!==void 0?u.position(e,r+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,g=y&&y.length>0,p=g;g&&(y=y[0]);var m=p?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};Bt.modelPosition=Bt.point=Bt.position;Bt.modelPositions=Bt.points=Bt.positions;Bt.renderedPoint=Bt.renderedPosition;Bt.relativePoint=Bt.relativePosition;var wg=Sv,qr,lr;qr=lr={};lr.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),a=r.zoom(),n=r.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};lr.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var a=r._private;a.compoundBoundsClean=!1,a.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};lr.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(k,B,D){var A=0,P=0,R=B+D;return k>0&&R>0&&(A=B/R*k,P=D/R*k),{biasDiff:A,biasComplementDiff:P}}function d(k,B,D,A){if(D.units==="%")switch(A){case"width":return k>0?D.pfValue*k:0;case"height":return B>0?D.pfValue*B:0;case"average":return k>0&&B>0?D.pfValue*(k+B)/2:0;case"min":return k>0&&B>0?k>B?D.pfValue*B:D.pfValue*k:0;case"max":return k>0&&B>0?k>B?D.pfValue*k:D.pfValue*B:0;default:return 0}else return D.units==="px"?D.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var g=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(g=g*100/v.width.val);var p=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(p=p*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,g),w=b.biasDiff,E=b.biasComplementDiff,C=h(v.height.val-f.h,p,m),x=C.biasDiff,S=C.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+E)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+S)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},dr=function(e,r){return r==null?e:kt(e,r.x1,r.y1,r.x2,r.y2)},ta=function(e,r,a){return Et(e,r,a)},Ha=function(e,r,a){if(!r.cy().headless()){var n=r._private,i=n.rstyle,s=i.arrowWidth/2,o=r.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Qa(f,1),kt(e,f.x1,f.y1,f.x2,f.y2)}}},ns=function(e,r,a){if(!r.cy().headless()){var n;a?n=a+"-":n="";var i=r._private,s=i.rstyle,o=r.pstyle(n+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),v=ta(s,"labelWidth",a),f=ta(s,"labelHeight",a),c=ta(s,"labelX",a),h=ta(s,"labelY",a),d=r.pstyle(n+"text-margin-x").pfValue,y=r.pstyle(n+"text-margin-y").pfValue,g=r.isEdge(),p=r.pstyle(n+"text-rotation"),m=r.pstyle("text-outline-width").pfValue,b=r.pstyle("text-border-width").pfValue,w=b/2,E=r.pstyle("text-background-padding").pfValue,C=2,x=f,S=v,k=S/2,B=x/2,D,A,P,R;if(g)D=c-k,A=c+k,P=h-B,R=h+B;else{switch(l.value){case"left":D=c-S,A=c;break;case"center":D=c-k,A=c+k;break;case"right":D=c,A=c+S;break}switch(u.value){case"top":P=h-x,R=h;break;case"center":P=h-B,R=h+B;break;case"bottom":P=h,R=h+x;break}}var L=d-Math.max(m,w)-E-C,I=d+Math.max(m,w)+E+C,M=y-Math.max(m,w)-E-C,O=y+Math.max(m,w)+E+C;D+=L,A+=I,P+=M,R+=O;var _=a||"main",H=i.labelBounds,F=H[_]=H[_]||{};F.x1=D,F.y1=P,F.x2=A,F.y2=R,F.w=A-D,F.h=R-P,F.leftPad=L,F.rightPad=I,F.topPad=M,F.botPad=O;var G=g&&p.strValue==="autorotate",U=p.pfValue!=null&&p.pfValue!==0;if(G||U){var X=G?ta(i.rstyle,"labelAngle",a):p.pfValue,Z=Math.cos(X),Q=Math.sin(X),ee=(D+A)/2,te=(P+R)/2;if(!g){switch(l.value){case"left":ee=A;break;case"right":ee=D;break}switch(u.value){case"top":te=R;break;case"bottom":te=P;break}}var K=function(Be,se){return Be=Be-ee,se=se-te,{x:Be*Z-se*Q+ee,y:Be*Q+se*Z+te}},N=K(D,P),$=K(D,R),J=K(A,P),re=K(A,R);D=Math.min(N.x,$.x,J.x,re.x),A=Math.max(N.x,$.x,J.x,re.x),P=Math.min(N.y,$.y,J.y,re.y),R=Math.max(N.y,$.y,J.y,re.y)}var le=_+"Rot",xe=H[le]=H[le]||{};xe.x1=D,xe.y1=P,xe.x2=A,xe.y2=R,xe.w=A-D,xe.h=R-P,kt(e,D,P,A,R),kt(i.labelBounds.all,D,P,A,R)}return e}},xg=function(e,r){if(!r.cy().headless()){var a=r.pstyle("outline-opacity").value,n=r.pstyle("outline-width").value;if(a>0&&n>0){var i=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,o=n+i,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,v=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var c=e.h*u-e.h,h=e.w*l-e.w;if(Ja(e,[Math.ceil(c/2),Math.ceil(h/2)]),v!=0||f!==0){var d=sd(e,v,f);tv(e,d)}}}},Eg=function(e,r){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=pt(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,y,g=o.rstyle,p=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(Ie){return Ie.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,E=0;n&&r.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(E=e.pstyle("overlay-padding").value));var C=0,x=0;n&&r.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(x=e.pstyle("underlay-padding").value));var S=Math.max(E,x),k=0,B=0;if(n&&(k=e.pstyle("width").pfValue,B=k/2),l&&r.includeNodes){var D=e.position();d=D.x,y=D.y;var A=e.outerWidth(),P=A/2,R=e.outerHeight(),L=R/2;v=d-P,f=d+P,c=y-L,h=y+L,kt(s,v,c,f,h),n&&r.includeOutlines&&xg(s,e)}else if(u&&r.includeEdges)if(n&&!i){var I=e.pstyle("curve-style").strValue;if(v=Math.min(g.srcX,g.midX,g.tgtX),f=Math.max(g.srcX,g.midX,g.tgtX),c=Math.min(g.srcY,g.midY,g.tgtY),h=Math.max(g.srcY,g.midY,g.tgtY),v-=B,f+=B,c-=B,h+=B,kt(s,v,c,f,h),I==="haystack"){var M=g.haystackPts;if(M&&M.length===2){if(v=M[0].x,c=M[0].y,f=M[1].x,h=M[1].y,v>f){var O=v;v=f,f=O}if(c>h){var _=c;c=h,h=_}kt(s,v-B,c-B,f+B,h+B)}}else if(I==="bezier"||I==="unbundled-bezier"||I.endsWith("segments")||I.endsWith("taxi")){var H;switch(I){case"bezier":case"unbundled-bezier":H=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":H=g.linePts;break}if(H!=null)for(var F=0;Ff){var ee=v;v=f,f=ee}if(c>h){var te=c;c=h,h=te}v-=B,f+=B,c-=B,h+=B,kt(s,v,c,f,h)}if(n&&r.includeEdges&&u&&(Ha(s,e,"mid-source"),Ha(s,e,"mid-target"),Ha(s,e,"source"),Ha(s,e,"target")),n){var K=e.pstyle("ghost").value==="yes";if(K){var N=e.pstyle("ghost-offset-x").pfValue,$=e.pstyle("ghost-offset-y").pfValue;kt(s,s.x1+N,s.y1+$,s.x2+N,s.y2+$)}}var J=o.bodyBounds=o.bodyBounds||{};Bo(J,s),Ja(J,p),Qa(J,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,kt(s,v-S,c-S,f+S,h+S));var re=o.overlayBounds=o.overlayBounds||{};Bo(re,s),Ja(re,p),Qa(re,1);var le=o.labelBounds=o.labelBounds||{};le.all!=null?id(le.all):le.all=pt(),n&&r.includeLabels&&(r.includeMainLabels&&ns(s,e,null),u&&(r.includeSourceLabels&&ns(s,e,"source"),r.includeTargetLabels&&ns(s,e,"target")))}return s.x1=Ct(s.x1),s.y1=Ct(s.y1),s.x2=Ct(s.x2),s.y2=Ct(s.y2),s.w=Ct(s.x2-s.x1),s.h=Ct(s.y2-s.y1),s.w>0&&s.h>0&&b&&(Ja(s,p),Qa(s,1)),s},kv=function(e){var r=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:Fg,e=arguments.length>1?arguments[1]:void 0,r=0;r=0;o--)s(o);return this};sr.removeAllListeners=function(){return this.removeListener("*")};sr.emit=sr.trigger=function(t,e,r){var a=this.listeners,n=a.length;return this.emitting++,Le(e)||(e=[e]),zg(this,function(i,s){r!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],n=a.length);for(var o=function(){var v=a[l];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===Ng)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&Ac(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,a=e._private.data.id,n=r.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&fe(e)){var a=e;e=r.mutableElements().filter(a)}for(var n=0;n=0;r--){var a=this[r];e(a)&&this.unmergeAt(r)}return this},map:function(e,r){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,r){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":We(Symbol))!=e&&We(Symbol.iterator)!=e;r&&(hn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Ll({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(r?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,e)},style:function(e,r){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(ke(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(fe(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,n=r.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});ot.neighbourhood=ot.neighborhood;ot.closedNeighbourhood=ot.closedNeighborhood;ot.openNeighbourhood=ot.openNeighborhood;ge(ot,{source:Tt(function(e){var r=this[0],a;return r&&(a=r._private.source||r.cy().collection()),a&&e?a.filter(e):a},"source"),target:Tt(function(e){var r=this[0],a;return r&&(a=r._private.target||r.cy().collection()),a&&e?a.filter(e):a},"target"),sources:ju({attr:"source"}),targets:ju({attr:"target"})});function ju(t){return function(r){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});ot.componentsOf=ot.components;var nt=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ve("A collection must have a reference to the core");return}var i=new Kt,s=!1;if(!r)r=[];else if(r.length>0&&ke(r[0])&&!Ta(r[0])){s=!0;for(var o=[],l=new $r,u=0,v=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=r.cy(),n=a._private,i=[],s=[],o,l=0,u=r.length;l0){for(var _=o.length===r.length?r:new nt(a,o),H=0;H<_.length;H++){var F=_[H];F.isNode()||(F.parallelEdges().clearTraversalCache(),F.source().clearTraversalCache(),F.target().clearTraversalCache())}var G;n.hasCompoundNodes?G=a.collection().merge(_).merge(_.connectedNodes()).merge(_.parent()):G=_,G.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?_.emitAndNotify("add"):e&&_.emit("add")}return r};Fe.removed=function(){var t=this[0];return t&&t._private.removed};Fe.inside=function(){var t=this[0];return t&&!t._private.removed};Fe.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=[],n={},i=r._private.cy;function s(R){for(var L=R._private.edges,I=0;I0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var A=0;A0?A=R:D=R;while(Math.abs(P)>s&&++L=i?m(B,L):I===0?L:w(B,D,D+u)}var C=!1;function x(){C=!0,(t!==e||r!==a)&&b()}var S=function(D){return C||x(),t===e&&r===a?D:D===0?0:D===1?1:g(E(D),e,a)};S.getControlPoints=function(){return[{x:t,y:e},{x:r,y:a}]};var k="generateBezier("+[t,e,r,a]+")";return S.toString=function(){return k},S}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var Xg=function(){function t(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:t(s)}}function r(a,n){var i={dx:a.v,dv:t(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=r(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}}(),Ne=function(e,r,a,n){var i=Yg(e,r,a,n);return function(s,o,l){return s+(o-s)*i(l)}},tn={linear:function(e,r,a){return e+(r-e)*a},ease:Ne(.25,.1,.25,1),"ease-in":Ne(.42,0,1,1),"ease-out":Ne(0,0,.58,1),"ease-in-out":Ne(.42,0,.58,1),"ease-in-sine":Ne(.47,0,.745,.715),"ease-out-sine":Ne(.39,.575,.565,1),"ease-in-out-sine":Ne(.445,.05,.55,.95),"ease-in-quad":Ne(.55,.085,.68,.53),"ease-out-quad":Ne(.25,.46,.45,.94),"ease-in-out-quad":Ne(.455,.03,.515,.955),"ease-in-cubic":Ne(.55,.055,.675,.19),"ease-out-cubic":Ne(.215,.61,.355,1),"ease-in-out-cubic":Ne(.645,.045,.355,1),"ease-in-quart":Ne(.895,.03,.685,.22),"ease-out-quart":Ne(.165,.84,.44,1),"ease-in-out-quart":Ne(.77,0,.175,1),"ease-in-quint":Ne(.755,.05,.855,.06),"ease-out-quint":Ne(.23,1,.32,1),"ease-in-out-quint":Ne(.86,0,.07,1),"ease-in-expo":Ne(.95,.05,.795,.035),"ease-out-expo":Ne(.19,1,.22,1),"ease-in-out-expo":Ne(1,0,0,1),"ease-in-circ":Ne(.6,.04,.98,.335),"ease-out-circ":Ne(.075,.82,.165,1),"ease-in-out-circ":Ne(.785,.135,.15,.86),spring:function(e,r,a){if(a===0)return tn.linear;var n=Xg(e,r,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":Ne};function rl(t,e,r,a,n){if(a===1||e===r)return r;var i=n(e,r,a);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function al(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Dr(t,e,r,a,n){var i=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var s=al(t,n),o=al(e,n);if(ae(s)&&ae(o))return rl(i,s,o,r,a);if(Le(s)&&Le(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=tn[h].apply(null,d)):s.easingImpl=tn[h]}var y=s.easingImpl,g;if(s.duration===0?g=1:g=(r-l)/s.duration,s.applying&&(g=s.progress),g<0?g=0:g>1&&(g=1),s.delay==null){var p=s.startPosition,m=s.position;if(m&&n&&!t.locked()){var b={};aa(p.x,m.x)&&(b.x=Dr(p.x,m.x,g,y)),aa(p.y,m.y)&&(b.y=Dr(p.y,m.y,g,y)),t.position(b)}var w=s.startPan,E=s.pan,C=i.pan,x=E!=null&&a;x&&(aa(w.x,E.x)&&(C.x=Dr(w.x,E.x,g,y)),aa(w.y,E.y)&&(C.y=Dr(w.y,E.y,g,y)),t.emit("pan"));var S=s.startZoom,k=s.zoom,B=k!=null&&a;B&&(aa(S,k)&&(i.zoom=pa(i.minZoom,Dr(S,k,g,y),i.maxZoom)),t.emit("zoom")),(x||B)&&t.emit("viewport");var D=s.style;if(D&&D.length>0&&n){for(var A=0;A=0;x--){var S=C[x];S()}C.splice(0,C.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||Qg(v,b,t),Zg(v,b,t,f),w.applying&&(w.applying=!1),p(w.frames),w.step!=null&&w.step(t),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(a),e.emit("step")}var Jg={animate:Ae.animate(),animation:Ae.animation(),animated:Ae.animated(),clearQueue:Ae.clearQueue(),delay:Ae.delay(),delayAnimation:Ae.delayAnimation(),stop:Ae.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&ln(function(i){nl(i,e),r()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){nl(s,e)},a.beforeRenderPriorities.animations):r()}},jg={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&Ta(a.target)&&n.matches(a.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,a){return r.qualifier!=null?a.target:e}},Wa=function(e){return fe(e)?new nr(e):e},zv={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Rn(jg,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,a){return this.emitter().on(e,Wa(r),a),this},removeListener:function(e,r,a){return this.emitter().removeListener(e,Wa(r),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,a){return this.emitter().one(e,Wa(r),a),this},once:function(e,r,a){return this.emitter().one(e,Wa(r),a),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};Ae.eventAliasesOn(zv);var xs={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};xs.jpeg=xs.jpg;var rn={layout:function(e){var r=this;if(e==null){Ve("Layout options must be specified to make a layout");return}if(e.name==null){Ve("A `name` must be specified to make a layout");return}var a=e.name,n=r.extension("layout",a);if(n==null){Ve("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;fe(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var s=new n(ge({},e,{cy:r,eles:i}));return s}};rn.createLayout=rn.makeLayout=rn.layout;var ep={notify:function(e,r){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();r!=null&&n.merge(r);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?r.notify(a):r.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Es.invalidateDimensions=Es.resize;var an={collection:function(e,r){return fe(e)?this.$(e):bt(e)?e.collection():Le(e)?(r||(r={}),new nt(this,e,r.unique,r.removed)):new nt(this)},nodes:function(e){var r=this.$(function(a){return a.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(a){return a.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};an.elements=an.filter=an.$;var tt={},va="t",rp="f";tt.apply=function(t){for(var e=this,r=e._private,a=r.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var y=0;y1&&(w=1),o.color){var C=a.valueMin[0],x=a.valueMax[0],S=a.valueMin[1],k=a.valueMax[1],B=a.valueMin[2],D=a.valueMax[2],A=a.valueMin[3]==null?1:a.valueMin[3],P=a.valueMax[3]==null?1:a.valueMax[3],R=[Math.round(C+(x-C)*w),Math.round(S+(k-S)*w),Math.round(B+(D-B)*w),Math.round(A+(P-A)*w)];i={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(o.number){var L=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,L,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var I=a.field.split("."),M=f.data,O=0;O0&&i>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(b):b()}).then(function(){return t.animation({style:o,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1)};tt.checkTrigger=function(t,e,r,a,n,i){var s=this.properties[e],o=n(s);t.removed()||o!=null&&o(r,a,t)&&i(s)};tt.checkZOrderTrigger=function(t,e,r,a){var n=this;this.checkTrigger(t,e,r,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",t)})};tt.checkBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBounds},function(n){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};tt.checkConnectedEdgesBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBoundsOfConnectedEdges},function(n){t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};tt.checkParallelEdgesBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBoundsOfParallelEdges},function(n){t.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};tt.checkTriggers=function(t,e,r,a){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,a),this.checkBoundsTrigger(t,e,r,a),this.checkConnectedEdgesBoundsTrigger(t,e,r,a),this.checkParallelEdgesBoundsTrigger(t,e,r,a)};var Ra={};Ra.applyBypass=function(t,e,r,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Re("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new nr(f);if(c.invalid){Re("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var g=i.match(/^\s*$/);if(g)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Re("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=p[0];var m=p[1],b=p[2],w=e.properties[m];if(!w){Re("Skipping property: Invalid property name in: "+s),l();continue}var E=r.parse(m,b);if(!E){Re("Skipping property: Invalid property definition in: "+s),l();continue}y.push({name:m,val:b}),l()}if(d){o();break}r.selector(f);for(var C=0;C=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(r)return!1;var c=o.data;return{name:t,value:v,strValue:""+e,mapped:c,field:v[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(t,f[4]);if(!d||d.mapped)return!1;var y=this.parse(t,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return Re("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+d.strValue+"`"),this.parse(t,d.strValue);if(u.color){var g=d.value,p=y.value,m=g[0]===p[0]&&g[1]===p[1]&&g[2]===p[2]&&(g[3]===p[3]||(g[3]==null||g[3]===1)&&(p[3]==null||p[3]===1));if(m)return!1}return{name:t,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:r}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):Le(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],E=[],C=[],x="",S=!1,k=0;k0?" ":"")+B.strValue}return u.validate&&!u.validate(w,E)?null:u.singleEnum&&S?w.length===1&&fe(w[0])?{name:t,value:w[0],strValue:w[0],bypass:r}:null:{name:t,value:w,pfValue:C,strValue:x,bypass:r,units:E}}var D=function(){for(var K=0;Ku.max||u.strictMax&&e===u.max))return null;var I={name:t,value:e,strValue:""+e+(A||""),units:A,bypass:r};return u.unitless||A!=="px"&&A!=="em"?I.pfValue=e:I.pfValue=A==="px"||!A?e:this.getEmSizeInPixels()*e,(A==="ms"||A==="s")&&(I.pfValue=A==="ms"?e:1e3*e),(A==="deg"||A==="rad")&&(I.pfValue=A==="rad"?e:td(e)),A==="%"&&(I.pfValue=e/100),I}else if(u.propList){var M=[],O=""+e;if(O!=="none"){for(var _=O.split(/\s*,\s*|\s+/),H=0;H<_.length;H++){var F=_[H].trim();n.properties[F]?M.push(F):Re("`"+F+"` is not a valid property name")}if(M.length===0)return null}return{name:t,value:M,strValue:M.length===0?"none":M.join(" "),bypass:r}}else if(u.color){var G=_l(e);return G?{name:t,value:G,pfValue:G,strValue:"rgb("+G[0]+","+G[1]+","+G[2]+")",bypass:r}:null}else if(u.regex||u.regexes){if(u.enums){var U=D();if(U)return U}for(var X=u.regexes?u.regexes:[u.regex],Z=0;Z0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*r)/a.w,(o-2*r)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,a=r.pan,n=r.zoom,i,s,o=!1;if(r.zoomingEnabled||(o=!0),ae(e)?s=e:ke(e)&&(s=e.level,e.position!=null?i=Tn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;ae(u.x)&&(r.pan.x=u.x,o=!1),ae(u.y)&&(r.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(fe(e)){var a=e;e=this.mutableElements().filter(a)}else bt(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(i-r*(n.x1+n.x2))/2,y:(s-r*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,a=this;return e.sizeCache=e.sizeCache||(r?function(){var n=a.window().getComputedStyle(r),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/r,x2:(a.x2-e.x)/r,y1:(a.y1-e.y)/r,y2:(a.y2-e.y)/r};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};wr.centre=wr.center;wr.autolockNodes=wr.autolock;wr.autoungrabifyNodes=wr.autoungrabify;var wa={data:Ae.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ae.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ae.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ae.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};wa.attr=wa.data;wa.removeAttr=wa.removeData;var xa=function(e){var r=this;e=ge({},e);var a=e.container;a&&!un(a)&&un(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=r;var s=Ke!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=ge({name:s?"grid":"null"},o.layout),o.renderer=ge({name:s?"canvas":"null"},o.renderer);var l=function(d,y,g){return y!==void 0?y:g!==void 0?g:d},u=this._private={container:a,ready:!1,options:o,elements:new nt(this),listeners:[],aniEles:new nt(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:ae(o.zoom)?o.zoom:1,pan:{x:ke(o.pan)&&ae(o.pan.x)?o.pan.x:0,y:ke(o.pan)&&ae(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var g=d.some(Jf);if(g)return Wr.all(d).then(y);y(d)};u.styleEnabled&&r.setStyle([]);var f=ge({},o,o.renderer);r.initRenderer(f);var c=function(d,y,g){r.notifications(!1);var p=r.mutableElements();p.length>0&&p.remove(),d!=null&&(ke(d)||Le(d))&&r.add(d),r.one("layoutready",function(b){r.notifications(!0),r.emit(b),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",g),r.emit("done")});var m=ge({},r._private.options.layout);m.eles=r.elements(),r.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];u.styleEnabled&&r.style().append(d),c(y,function(){r.startAnimationLoop(),u.ready=!0,_e(o.ready)&&r.on("ready",o.ready);for(var g=0;g0,o=!!t.boundingBox,l=e.extent(),u=pt(o?t.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),v;if(bt(t.roots))v=t.roots;else if(Le(t.roots)){for(var f=[],c=0;c0;){var L=R(),I=B(L,A);if(I)L.outgoers().filter(function(se){return se.isNode()&&r.has(se)}).forEach(P);else if(I===null){Re("Detected double maximal shift for node `"+L.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var M=0;if(t.avoidOverlap)for(var O=0;O0&&m[0].length<=3?me/2:0),Se=2*Math.PI/m[ye].length*he;return ye===0&&m[0].length===1&&(Ce=1),{x:re.x+Ce*Math.cos(Se),y:re.y+Ce*Math.sin(Se)}}else{var j=m[ye].length,T=Math.max(j===1?0:o?(u.w-t.padding*2-le.w)/((t.grid?Ie:j)-1):(u.w-t.padding*2-le.w)/((t.grid?Ie:j)+1),M),q={x:re.x+(he+1-(j+1)/2)*T,y:re.y+(ye+1-(Q+1)/2)*xe};return q}};return r.nodes().layoutPositions(this,t,Be),this};var op={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Vv(t){this.options=ge({},op,t)}Vv.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var p=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(p*p+m*m));v=Math.max(b,v)}var w=function(C,x){var S=e.startAngle+x*u*(n?1:-1),k=v*Math.cos(S),B=v*Math.sin(S),D={x:o.x+k,y:o.y+B};return D};return a.nodes().layoutPositions(this,e,w),this};var up={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function _v(t){this.options=ge({},up,t)}_v.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=t.cy,n=e.eles,i=n.nodes().not(":parent"),s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var E=Math.abs(m[0].value-w.value);E>=g&&(m=[],p.push(m))}m.push(w)}var C=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=p.length>0&&p[0].length>1,S=Math.min(s.w,s.h)/2-C,k=S/(p.length+x?1:0);C=Math.min(C,k)}for(var B=0,D=0;D1&&e.avoidOverlap){var L=Math.cos(R)-Math.cos(0),I=Math.sin(R)-Math.sin(0),M=Math.sqrt(C*C/(L*L+I*I));B=Math.max(M,B)}A.r=B,B+=C}if(e.equidistant){for(var O=0,_=0,H=0;H=t.numIter||(gp(a,t),a.temperature=a.temperature*t.coolingFactor,a.temperature=t.animationThreshold&&i(),ln(v)}};v()}else{for(;u;)u=s(l),l++;ol(a,t),o()}return this};Nn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Nn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var vp=function(e,r,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=pt(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(S);for(var v=0;vn.count?0:n.graph},Gv=function(e,r,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var y=pn(e,o,l),g=pn(r,-1*o,-1*l),p=g.x-y.x,m=g.y-y.y,b=p*p+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+r.nodeRepulsion)/b,h=f*p/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),r.isLocked||(r.offsetX+=h,r.offsetY+=d)}},mp=function(e,r,a,n){if(a>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(n>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},pn=function(e,r,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/r,u=s/o,v={};return r===0&&0a?(v.x=n,v.y=i+s/2,v):0r&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/r,v):0=u)?(v.x=n+s*r/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*r/2/a,v.y=i-s/2),v)},bp=function(e,r){for(var a=0;aa){var g=r.gravity*h/y,p=r.gravity*d/y;c.offsetX+=g,c.offsetY+=p}}}}},xp=function(e,r){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*r/n};else var i={x:e,y:r};return i},Kv=function(e,r){var a=e.parentId;if(a!=null){var n=r.layoutNodes[r.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopp&&(d+=g+r.componentSpacing,h=0,y=0,g=0)}}},Tp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function $v(t){this.options=ge({},Tp,t)}$v.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(U){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(X){if(X==null)return Math.min(l,u);var Z=Math.min(l,u);Z==l?l=X:u=X},f=function(X){if(X==null)return Math.max(l,u);var Z=Math.max(l,u);Z==l?l=X:u=X},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;u*l=s?f(p+1):v(g+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(L=0,R++)},M={},O=0;O(L=hd(t,e,I[M],I[M+1],I[M+2],I[M+3])))return g(x,L),!0}else if(k.edgeType==="bezier"||k.edgeType==="multibezier"||k.edgeType==="self"||k.edgeType==="compound"){for(var I=k.allpts,M=0;M+5(L=dd(t,e,I[M],I[M+1],I[M+2],I[M+3],I[M+4],I[M+5])))return g(x,L),!0}for(var O=O||S.source,_=_||S.target,H=n.getArrowWidth(B,D),F=[{name:"source",x:k.arrowStartX,y:k.arrowStartY,angle:k.srcArrowAngle},{name:"target",x:k.arrowEndX,y:k.arrowEndY,angle:k.tgtArrowAngle},{name:"mid-source",x:k.midX,y:k.midY,angle:k.midsrcArrowAngle},{name:"mid-target",x:k.midX,y:k.midY,angle:k.midtgtArrowAngle}],M=0;M0&&(p(O),p(_))}function b(x,S,k){return Et(x,S,k)}function w(x,S){var k=x._private,B=c,D;S?D=S+"-":D="",x.boundingBox();var A=k.labelBounds[S||"main"],P=x.pstyle(D+"label").value,R=x.pstyle("text-events").strValue==="yes";if(!(!R||!P)){var L=b(k.rscratch,"labelX",S),I=b(k.rscratch,"labelY",S),M=b(k.rscratch,"labelAngle",S),O=x.pstyle(D+"text-margin-x").pfValue,_=x.pstyle(D+"text-margin-y").pfValue,H=A.x1-B-O,F=A.x2+B-O,G=A.y1-B-_,U=A.y2+B-_;if(M){var X=Math.cos(M),Z=Math.sin(M),Q=function(re,le){return re=re-L,le=le-I,{x:re*X-le*Z+L,y:re*Z+le*X+I}},ee=Q(H,G),te=Q(H,U),K=Q(F,G),N=Q(F,U),$=[ee.x+O,ee.y+_,K.x+O,K.y+_,N.x+O,N.y+_,te.x+O,te.y+_];if(gt(t,e,$))return g(x),!0}else if(_r(A,t,e))return g(x),!0}}for(var E=s.length-1;E>=0;E--){var C=s[E];C.isNode()?p(C)||w(C):m(C)||w(C)||w(C,"source")||w(C,"target")}return o};Er.getAllInBox=function(t,e,r,a){var n=this.getCachedZSortedEles().interactive,i=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,a),u=Math.max(e,a);t=s,r=o,e=l,a=u;for(var v=pt({x1:t,y1:e,x2:r,y2:a}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},Ap=function(e,r,a,n,i){if(e!==cl?dl(r,e,Ot):Bp(xt,Ot),dl(r,a,xt),vl=Ot.nx*xt.ny-Ot.ny*xt.nx,fl=Ot.nx*xt.nx-Ot.ny*-xt.ny,Gt=Math.asin(Math.max(-1,Math.min(1,vl))),Math.abs(Gt)<1e-6){Cs=r.x,Ts=r.y,hr=Pr=0;return}gr=1,nn=!1,fl<0?Gt<0?Gt=Math.PI+Gt:(Gt=Math.PI-Gt,gr=-1,nn=!0):Gt>0&&(gr=-1,nn=!0),r.radius!==void 0?Pr=r.radius:Pr=n,fr=Gt/2,Ua=Math.min(Ot.len/2,xt.len/2),i?(It=Math.abs(Math.cos(fr)*Pr/Math.sin(fr)),It>Ua?(It=Ua,hr=Math.abs(It*Math.sin(fr)/Math.cos(fr))):hr=Pr):(It=Math.min(Ua,Pr),hr=Math.abs(It*Math.sin(fr)/Math.cos(fr))),Ss=r.x+xt.nx*It,Ds=r.y+xt.ny*It,Cs=Ss-xt.ny*hr*gr,Ts=Ds+xt.nx*hr*gr,Xv=r.x+Ot.nx*It,Zv=r.y+Ot.ny*It,cl=r};function Qv(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Qs(t,e,r,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Ap(t,e,r,a,n),{cx:Cs,cy:Ts,radius:hr,startX:Xv,startY:Zv,stopX:Ss,stopY:Ds,startAngle:Ot.ang+Math.PI/2*gr,endAngle:xt.ang-Math.PI/2*gr,counterClockwise:nn})}var Ea=.01,Rp=Math.sqrt(2*Ea),lt={};lt.findMidptPtsEtc=function(t,e){var r=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(E,C,x,S){var k=S-C,B=x-E,D=Math.sqrt(B*B+k*k);return{x:-k/D,y:B/D}},v=t.pstyle("edge-distances").value;switch(v){case"node-position":i=r;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),c=je(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(t.target()[0],o),g=je(y,2),p=g[0],m=g[1],b={x1:h,y1:d,x2:p,y2:m};n=u(h,d,p,m),i=b}else Re("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};lt.findHaystackPoints=function(t){for(var e=0;e0?Math.max(Y-ie,0):Math.min(Y+ie,0)},P=A(B,S),R=A(D,k),L=!1;m===u?p=Math.abs(P)>Math.abs(R)?n:a:m===l||m===o?(p=a,L=!0):(m===i||m===s)&&(p=n,L=!0);var I=p===a,M=I?R:P,O=I?D:B,_=ev(O),H=!1;!(L&&(w||C))&&(m===o&&O<0||m===l&&O>0||m===i&&O>0||m===s&&O<0)&&(_*=-1,M=_*Math.abs(M),H=!0);var F;if(w){var G=E<0?1+E:E;F=G*M}else{var U=E<0?M:0;F=U+E*_}var X=function(Y){return Math.abs(Y)=Math.abs(M)},Z=X(F),Q=X(Math.abs(M)-Math.abs(F)),ee=Z||Q;if(ee&&!H)if(I){var te=Math.abs(O)<=c/2,K=Math.abs(B)<=h/2;if(te){var N=(v.x1+v.x2)/2,$=v.y1,J=v.y2;r.segpts=[N,$,N,J]}else if(K){var re=(v.y1+v.y2)/2,le=v.x1,xe=v.x2;r.segpts=[le,re,xe,re]}else r.segpts=[v.x1,v.y2]}else{var Ie=Math.abs(O)<=f/2,Be=Math.abs(D)<=d/2;if(Ie){var se=(v.y1+v.y2)/2,ue=v.x1,de=v.x2;r.segpts=[ue,se,de,se]}else if(Be){var ye=(v.x1+v.x2)/2,he=v.y1,me=v.y2;r.segpts=[ye,he,ye,me]}else r.segpts=[v.x2,v.y1]}else if(I){var Ce=v.y1+F+(g?c/2*_:0),Se=v.x1,j=v.x2;r.segpts=[Se,Ce,j,Ce]}else{var T=v.x1+F+(g?f/2*_:0),q=v.y1,W=v.y2;r.segpts=[T,q,T,W]}if(r.isRound){var z=t.pstyle("taxi-radius").value,V=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(z),r.isArcRadius=new Array(r.segpts.length/2).fill(V)}};lt.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!ae(r.startX)||!ae(r.startY),g=!ae(r.arrowStartX)||!ae(r.arrowStartY),p=!ae(r.endX)||!ae(r.endY),m=!ae(r.arrowEndX)||!ae(r.arrowEndY),b=3,w=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,E=b*w,C=yr({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),x=CO.poolIndex()){var _=M;M=O,O=_}var H=P.srcPos=M.position(),F=P.tgtPos=O.position(),G=P.srcW=M.outerWidth(),U=P.srcH=M.outerHeight(),X=P.tgtW=O.outerWidth(),Z=P.tgtH=O.outerHeight(),Q=P.srcShape=r.nodeShapes[e.getNodeShape(M)],ee=P.tgtShape=r.nodeShapes[e.getNodeShape(O)],te=P.srcCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,K=P.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,N=P.tgtRs=O._private.rscratch,$=P.srcRs=M._private.rscratch;P.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var J=0;J=Rp||(j=Math.sqrt(Math.max(Se*Se,Ea)+Math.max(Ce*Ce,Ea)));var T=P.vector={x:Se,y:Ce},q=P.vectorNorm={x:T.x/j,y:T.y/j},W={x:-q.y,y:q.x};P.nodesOverlap=!ae(j)||ee.checkPoint(se[0],se[1],0,X,Z,F.x,F.y,K,N)||Q.checkPoint(de[0],de[1],0,G,U,H.x,H.y,te,$),P.vectorNormInverse=W,R={nodesOverlap:P.nodesOverlap,dirCounts:P.dirCounts,calculatedIntersection:!0,hasBezier:P.hasBezier,hasUnbundled:P.hasUnbundled,eles:P.eles,srcPos:F,srcRs:N,tgtPos:H,tgtRs:$,srcW:X,srcH:Z,tgtW:G,tgtH:U,srcIntn:ye,tgtIntn:ue,srcShape:ee,tgtShape:Q,posPts:{x1:me.x2,y1:me.y2,x2:me.x1,y2:me.y1},intersectionPts:{x1:he.x2,y1:he.y2,x2:he.x1,y2:he.y1},vector:{x:-T.x,y:-T.y},vectorNorm:{x:-q.x,y:-q.y},vectorNormInverse:{x:-W.x,y:-W.y}}}var z=Be?R:P;le.nodesOverlap=z.nodesOverlap,le.srcIntn=z.srcIntn,le.tgtIntn=z.tgtIntn,le.isRound=xe.startsWith("round"),n&&(M.isParent()||M.isChild()||O.isParent()||O.isChild())&&(M.parents().anySame(O)||O.parents().anySame(M)||M.same(O)&&M.isParent())?e.findCompoundLoopPoints(re,z,J,Ie):M===O?e.findLoopPoints(re,z,J,Ie):xe.endsWith("segments")?e.findSegmentsPoints(re,z):xe.endsWith("taxi")?e.findTaxiPoints(re,z):xe==="straight"||!Ie&&P.eles.length%2===1&&J===Math.floor(P.eles.length/2)?e.findStraightEdgePoints(re):e.findBezierPoints(re,z,J,Ie,Be),e.findEndpoints(re),e.tryToCorrectInvalidPoints(re,z),e.checkForInvalidEdgeWarning(re),e.storeAllpts(re),e.storeEdgeProjections(re),e.calculateArrowAngles(re),e.recalculateEdgeLabelProjections(re),e.calculateLabelAngles(re)}},x=0;x0){var J=i,re=cr(J,Lr(r)),le=cr(J,Lr($)),xe=re;if(le2){var Ie=cr(J,{x:$[2],y:$[3]});Ie0){var W=s,z=cr(W,Lr(r)),V=cr(W,Lr(q)),ne=z;if(V2){var Y=cr(W,{x:q[2],y:q[3]});Y=d||x){g={cp:w,segment:C};break}}if(g)break}var S=g.cp,k=g.segment,B=(d-p)/k.length,D=k.t1-k.t0,A=h?k.t0+D*B:k.t1-D*B;A=pa(0,A,1),e=Nr(S.p0,S.p1,S.p2,A),c=Lp(S.p0,S.p1,S.p2,A);break}case"straight":case"segments":case"haystack":{for(var P=0,R,L,I,M,O=a.allpts.length,_=0;_+3=d));_+=2);var H=d-L,F=H/R;F=pa(0,F,1),e=ad(I,M,F),c=ef(I,M);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(t)}};zt.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};zt.applyPrefixedLabelDimensions=function(t,e){var r=t._private,a=this.getLabelText(t,e),n=rr(a,t._private.labelDimsKey);if(Et(r.rscratch,"prefixedLabelDimsKey",e)!==n){Ht(r.rscratch,"prefixedLabelDimsKey",e,n);var i=this.calculateLabelDimensions(t,a),s=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=Et(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),v=i.height/u,f=v*s,c=i.width,h=i.height+(u-1)*(s-1)*v;Ht(r.rstyle,"labelWidth",e,c),Ht(r.rscratch,"labelWidth",e,c),Ht(r.rstyle,"labelHeight",e,h),Ht(r.rscratch,"labelHeight",e,h),Ht(r.rscratch,"labelLineHeight",e,f)}};zt.getLabelText=function(t,e){var r=t._private,a=e?e+"-":"",n=t.pstyle(a+"label").strValue,i=t.pstyle("text-transform").value,s=function(U,X){return X?(Ht(r.rscratch,U,e,X),X):Et(r.rscratch,U,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` -`),f=t.pstyle("text-max-width").pfValue,c=t.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,g=0;gf){var E=p.matchAll(y),C="",x=0,S=Pt(E),k;try{for(S.s();!(k=S.n()).done;){var B=k.value,D=B[0],A=p.substring(x,B.index);x=B.index+D.length;var P=C.length===0?A:C+A+D,R=this.calculateLabelDimensions(t,P),L=R.width;L<=f?C+=A+D:(C&&d.push(C),C=A+D)}}catch(G){S.e(G)}finally{S.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` -`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var I=t.pstyle("text-max-width").pfValue,M="",O="…",_=!1;if(this.calculateLabelDimensions(t,n).widthI)break;M+=n[H],H===n.length-1&&(_=!0)}return _||(M+=O),M}return n};zt.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};zt.calculateLabelDimensions=function(t,e){var r=this,a=r.cy.window(),n=a.document,i=0,s=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("font-family").strValue,u=t.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var h=0,d=0,y=e.split(` -`),g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var vt=i(T);qe&&(t.hoverData.tapholdCancelled=!0);var ft=function(){var Lt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Lt.length===0?(Lt.push(pe[0]),Lt.push(pe[1])):(Lt[0]+=pe[0],Lt[1]+=pe[1])};W=!0,n(ve,["mousemove","vmousemove","tapdrag"],T,{x:Y[0],y:Y[1]});var Rt=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||z.emit({originalEvent:T,type:"boxstart",position:{x:Y[0],y:Y[1]}}),Ee[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(qe){var wt={originalEvent:T,type:"cxtdrag",position:{x:Y[0],y:Y[1]}};we?we.emit(wt):z.emit(wt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ve!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:Y[0],y:Y[1]}}),t.hoverData.cxtOver=ve,ve&&ve.emit({originalEvent:T,type:"cxtdragover",position:{x:Y[0],y:Y[1]}}))}}else if(t.hoverData.dragging){if(W=!0,z.panningEnabled()&&z.userPanningEnabled()){var Mt;if(t.hoverData.justStartedPan){var Vt=t.hoverData.mdownPos;Mt={x:(Y[0]-Vt[0])*V,y:(Y[1]-Vt[1])*V},t.hoverData.justStartedPan=!1}else Mt={x:pe[0]*V,y:pe[1]*V};z.panBy(Mt),z.emit("dragpan"),t.hoverData.dragged=!0}Y=t.projectIntoViewport(T.clientX,T.clientY)}else if(Ee[4]==1&&(we==null||we.pannable())){if(qe){if(!t.hoverData.dragging&&z.boxSelectionEnabled()&&(vt||!z.panningEnabled()||!z.userPanningEnabled()))Rt();else if(!t.hoverData.selecting&&z.panningEnabled()&&z.userPanningEnabled()){var _t=s(we,t.hoverData.downs);_t&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ee[4]=0,t.data.bgActivePosistion=Lr(ie),t.redrawHint("select",!0),t.redraw())}we&&we.pannable()&&we.active()&&we.unactivate()}}else{if(we&&we.pannable()&&we.active()&&we.unactivate(),(!we||!we.grabbed())&&ve!=be&&(be&&n(be,["mouseout","tapdragout"],T,{x:Y[0],y:Y[1]}),ve&&n(ve,["mouseover","tapdragover"],T,{x:Y[0],y:Y[1]}),t.hoverData.last=ve),we)if(qe){if(z.boxSelectionEnabled()&&vt)we&&we.grabbed()&&(p(Oe),we.emit("freeon"),Oe.emit("free"),t.dragData.didDrag&&(we.emit("dragfreeon"),Oe.emit("dragfree"))),Rt();else if(we&&we.grabbed()&&t.nodeIsDraggable(we)){var st=!t.dragData.didDrag;st&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||y(Oe,{inDragLayer:!0});var Qe={x:0,y:0};if(ae(pe[0])&&ae(pe[1])&&(Qe.x+=pe[0],Qe.y+=pe[1],st)){var ht=t.hoverData.dragDelta;ht&&ae(ht[0])&&ae(ht[1])&&(Qe.x+=ht[0],Qe.y+=ht[1])}t.hoverData.draggingEles=!0,Oe.silentShift(Qe).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else ft();W=!0}if(Ee[2]=Y[0],Ee[3]=Y[1],W)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var A,P,R;t.registerBinding(e,"mouseup",function(T){if(!(t.hoverData.which===1&&T.which!==1&&t.hoverData.capture)){var q=t.hoverData.capture;if(q){t.hoverData.capture=!1;var W=t.cy,z=t.projectIntoViewport(T.clientX,T.clientY),V=t.selection,ne=t.findNearestElement(z[0],z[1],!0,!1),Y=t.dragData.possibleDragElements,ie=t.hoverData.down,ce=i(T);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ie&&ie.unactivate(),t.hoverData.which===3){var Ee={originalEvent:T,type:"cxttapend",position:{x:z[0],y:z[1]}};if(ie?ie.emit(Ee):W.emit(Ee),!t.hoverData.cxtDragged){var ve={originalEvent:T,type:"cxttap",position:{x:z[0],y:z[1]}};ie?ie.emit(ve):W.emit(ve)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(ne,["mouseup","tapend","vmouseup"],T,{x:z[0],y:z[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(ie,["click","tap","vclick"],T,{x:z[0],y:z[1]}),P=!1,T.timeStamp-R<=W.multiClickDebounceTime()?(A&&clearTimeout(A),P=!0,R=null,n(ie,["dblclick","dbltap","vdblclick"],T,{x:z[0],y:z[1]})):(A=setTimeout(function(){P||n(ie,["oneclick","onetap","voneclick"],T,{x:z[0],y:z[1]})},W.multiClickDebounceTime()),R=T.timeStamp)),ie==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(T)&&(W.$(r).unselect(["tapunselect"]),Y.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Y=W.collection()),ne==ie&&!t.dragData.didDrag&&!t.hoverData.selecting&&ne!=null&&ne._private.selectable&&(t.hoverData.dragging||(W.selectionType()==="additive"||ce?ne.selected()?ne.unselect(["tapunselect"]):ne.select(["tapselect"]):ce||(W.$(r).unmerge(ne).unselect(["tapunselect"]),ne.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var be=W.collection(t.getAllInBox(V[0],V[1],V[2],V[3]));t.redrawHint("select",!0),be.length>0&&t.redrawHint("eles",!0),W.emit({type:"boxend",originalEvent:T,position:{x:z[0],y:z[1]}});var we=function(qe){return qe.selectable()&&!qe.selected()};W.selectionType()==="additive"||ce||W.$(r).unmerge(be).unselect(),be.emit("box").stdFilter(we).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!V[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var pe=ie&&ie.grabbed();p(Y),pe&&(ie.emit("freeon"),Y.emit("free"),t.dragData.didDrag&&(ie.emit("dragfreeon"),Y.emit("dragfree")))}}V[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var L=function(T){if(!t.scrollingPage){var q=t.cy,W=q.zoom(),z=q.pan(),V=t.projectIntoViewport(T.clientX,T.clientY),ne=[V[0]*W+z.x,V[1]*W+z.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||k()){T.preventDefault();return}if(q.panningEnabled()&&q.userPanningEnabled()&&q.zoomingEnabled()&&q.userZoomingEnabled()){T.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var Y;T.deltaY!=null?Y=T.deltaY/-250:T.wheelDeltaY!=null?Y=T.wheelDeltaY/1e3:Y=T.wheelDelta/1e3,Y=Y*t.wheelSensitivity;var ie=T.deltaMode===1;ie&&(Y*=33);var ce=q.zoom()*Math.pow(10,Y);T.type==="gesturechange"&&(ce=t.gestureStartZoom*T.scale),q.zoom({level:ce,renderedPosition:{x:ne[0],y:ne[1]}}),q.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",L,!0),t.registerBinding(e,"scroll",function(T){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(T){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||T.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(j){t.hasTouchStarted||L(j)},!0),t.registerBinding(t.container,"mouseout",function(T){var q=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseout",position:{x:q[0],y:q[1]}})},!1),t.registerBinding(t.container,"mouseover",function(T){var q=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseover",position:{x:q[0],y:q[1]}})},!1);var I,M,O,_,H,F,G,U,X,Z,Q,ee,te,K=function(T,q,W,z){return Math.sqrt((W-T)*(W-T)+(z-q)*(z-q))},N=function(T,q,W,z){return(W-T)*(W-T)+(z-q)*(z-q)},$;t.registerBinding(t.container,"touchstart",$=function(T){if(t.hasTouchStarted=!0,!!B(T)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var q=t.cy,W=t.touchData.now,z=t.touchData.earlier;if(T.touches[0]){var V=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);W[0]=V[0],W[1]=V[1]}if(T.touches[1]){var V=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);W[2]=V[0],W[3]=V[1]}if(T.touches[2]){var V=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);W[4]=V[0],W[5]=V[1]}if(T.touches[1]){t.touchData.singleTouchMoved=!0,p(t.dragData.touchDragEles);var ne=t.findContainerClientCoords();X=ne[0],Z=ne[1],Q=ne[2],ee=ne[3],I=T.touches[0].clientX-X,M=T.touches[0].clientY-Z,O=T.touches[1].clientX-X,_=T.touches[1].clientY-Z,te=0<=I&&I<=Q&&0<=O&&O<=Q&&0<=M&&M<=ee&&0<=_&&_<=ee;var Y=q.pan(),ie=q.zoom();H=K(I,M,O,_),F=N(I,M,O,_),G=[(I+O)/2,(M+_)/2],U=[(G[0]-Y.x)/ie,(G[1]-Y.y)/ie];var ce=200,Ee=ce*ce;if(F=1){for(var mt=t.touchData.startPosition=[null,null,null,null,null,null],He=0;He=t.touchTapThreshold2}if(q&&t.touchData.cxt){T.preventDefault();var mt=T.touches[0].clientX-X,He=T.touches[0].clientY-Z,Xe=T.touches[1].clientX-X,Ze=T.touches[1].clientY-Z,vt=N(mt,He,Xe,Ze),ft=vt/F,Rt=150,wt=Rt*Rt,Mt=1.5,Vt=Mt*Mt;if(ft>=Vt||vt>=wt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var _t={originalEvent:T,type:"cxttapend",position:{x:V[0],y:V[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(_t),t.touchData.start=null):z.emit(_t)}}if(q&&t.touchData.cxt){var _t={originalEvent:T,type:"cxtdrag",position:{x:V[0],y:V[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(_t):z.emit(_t),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var st=t.findNearestElement(V[0],V[1],!0,!0);(!t.touchData.cxtOver||st!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:V[0],y:V[1]}}),t.touchData.cxtOver=st,st&&st.emit({originalEvent:T,type:"cxtdragover",position:{x:V[0],y:V[1]}}))}else if(q&&T.touches[2]&&z.boxSelectionEnabled())T.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||z.emit({originalEvent:T,type:"boxstart",position:{x:V[0],y:V[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,W[4]=1,!W||W.length===0||W[0]===void 0?(W[0]=(V[0]+V[2]+V[4])/3,W[1]=(V[1]+V[3]+V[5])/3,W[2]=(V[0]+V[2]+V[4])/3+1,W[3]=(V[1]+V[3]+V[5])/3+1):(W[2]=(V[0]+V[2]+V[4])/3,W[3]=(V[1]+V[3]+V[5])/3),t.redrawHint("select",!0),t.redraw();else if(q&&T.touches[1]&&!t.touchData.didSelect&&z.zoomingEnabled()&&z.panningEnabled()&&z.userZoomingEnabled()&&z.userPanningEnabled()){T.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Qe=t.dragData.touchDragEles;if(Qe){t.redrawHint("drag",!0);for(var ht=0;ht0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var re;t.registerBinding(e,"touchcancel",re=function(T){var q=t.touchData.start;t.touchData.capture=!1,q&&q.unactivate()});var le,xe,Ie,Be;if(t.registerBinding(e,"touchend",le=function(T){var q=t.touchData.start,W=t.touchData.capture;if(W)T.touches.length===0&&(t.touchData.capture=!1),T.preventDefault();else return;var z=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var V=t.cy,ne=V.zoom(),Y=t.touchData.now,ie=t.touchData.earlier;if(T.touches[0]){var ce=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Y[0]=ce[0],Y[1]=ce[1]}if(T.touches[1]){var ce=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Y[2]=ce[0],Y[3]=ce[1]}if(T.touches[2]){var ce=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Y[4]=ce[0],Y[5]=ce[1]}q&&q.unactivate();var Ee;if(t.touchData.cxt){if(Ee={originalEvent:T,type:"cxttapend",position:{x:Y[0],y:Y[1]}},q?q.emit(Ee):V.emit(Ee),!t.touchData.cxtDragged){var ve={originalEvent:T,type:"cxttap",position:{x:Y[0],y:Y[1]}};q?q.emit(ve):V.emit(ve)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!T.touches[2]&&V.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var be=V.collection(t.getAllInBox(z[0],z[1],z[2],z[3]));z[0]=void 0,z[1]=void 0,z[2]=void 0,z[3]=void 0,z[4]=0,t.redrawHint("select",!0),V.emit({type:"boxend",originalEvent:T,position:{x:Y[0],y:Y[1]}});var we=function(wt){return wt.selectable()&&!wt.selected()};be.emit("box").stdFilter(we).select().emit("boxselect"),be.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(q!=null&&q.unactivate(),T.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var pe=t.dragData.touchDragEles;if(q!=null){var Oe=q._private.grabbed;p(pe),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Oe&&(q.emit("freeon"),pe.emit("free"),t.dragData.didDrag&&(q.emit("dragfreeon"),pe.emit("dragfree"))),n(q,["touchend","tapend","vmouseup","tapdragout"],T,{x:Y[0],y:Y[1]}),q.unactivate(),t.touchData.start=null}else{var qe=t.findNearestElement(Y[0],Y[1],!0,!0);n(qe,["touchend","tapend","vmouseup","tapdragout"],T,{x:Y[0],y:Y[1]})}var yt=t.touchData.startPosition[0]-Y[0],mt=yt*yt,He=t.touchData.startPosition[1]-Y[1],Xe=He*He,Ze=mt+Xe,vt=Ze*ne*ne;t.touchData.singleTouchMoved||(q||V.$(":selected").unselect(["tapunselect"]),n(q,["tap","vclick"],T,{x:Y[0],y:Y[1]}),xe=!1,T.timeStamp-Be<=V.multiClickDebounceTime()?(Ie&&clearTimeout(Ie),xe=!0,Be=null,n(q,["dbltap","vdblclick"],T,{x:Y[0],y:Y[1]})):(Ie=setTimeout(function(){xe||n(q,["onetap","voneclick"],T,{x:Y[0],y:Y[1]})},V.multiClickDebounceTime()),Be=T.timeStamp)),q!=null&&!t.dragData.didDrag&&q._private.selectable&&vt"u"){var se=[],ue=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},de=function(T){return{event:T,touch:ue(T)}},ye=function(T){se.push(de(T))},he=function(T){for(var q=0;q0)return G[0]}return null},d=Object.keys(c),y=0;y0?h:av(i,s,e,r,a,n,o,l)},checkPoint:function(e,r,a,n,i,s,o,l){l=l==="auto"?mr(n,i):l;var u=2*l;if(Wt(e,r,this.points,s,o,n,i-u,[0,-1],a)||Wt(e,r,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(gt(e,r,c)||pr(e,r,u,u,s+n/2-l,o+i/2-l,a)||pr(e,r,u,u,s-n/2+l,o+i/2-l,a))}}};Ut.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ct(3,0)),this.generateRoundPolygon("round-triangle",ct(3,0)),this.generatePolygon("rectangle",ct(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ct(5,0)),this.generateRoundPolygon("round-pentagon",ct(5,0)),this.generatePolygon("hexagon",ct(6,0)),this.generateRoundPolygon("round-hexagon",ct(6,0)),this.generatePolygon("heptagon",ct(7,0)),this.generateRoundPolygon("round-heptagon",ct(7,0)),this.generatePolygon("octagon",ct(8,0)),this.generateRoundPolygon("round-octagon",ct(8,0));var a=new Array(20);{var n=ds(5,0),i=ds(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*os)break;var E=e.deq(a,g,y);if(E.length>0)for(var C=0;C0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,g,y)&&i())},o=e.priority||Ns;n.beforeRender(s,o(a))}}}},Op=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vn;or(this,t),this.idsByKey=new Kt,this.keyForId=new Kt,this.cachesByLvl=new Kt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return ur(t,[{key:"getIdsFor",value:function(r){r==null&&Ve("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(r);return n||(n=new $r,a.set(r,n)),n}},{key:"addIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).add(a)}},{key:"deleteIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).delete(a)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);return n!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var a=this.cachesByLvl,n=this.lvls,i=a.get(r);return i||(i=new Kt,a.set(r,i),n.push(r)),i}},{key:"getCache",value:function(r,a){return this.getCachesAt(a).get(r)}},{key:"get",value:function(r,a){var n=this.getKey(r),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,a){var n=this.keyForId.get(r.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(r,a){return this.getCachesAt(a).has(r)}},{key:"has",value:function(r,a){var n=this.getKey(r);return this.hasCache(n,a)}},{key:"setCache",value:function(r,a,n){n.key=r,this.getCachesAt(a).set(r,n)}},{key:"set",value:function(r,a,n){var i=this.getKey(r);this.setCache(i,a,n),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,a){this.getCachesAt(a).delete(r)}},{key:"delete",value:function(r,a){var n=this.getKey(r);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(r){var a=this;this.lvls.forEach(function(n){return a.deleteCache(r,n)})}},{key:"invalidate",value:function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}])}(),yl=25,Ya=50,sn=-4,ks=3,of=7.99,Np=8,Fp=1024,zp=1024,qp=1024,Vp=.2,_p=.8,Gp=10,Hp=.15,Kp=.1,$p=.9,Wp=.9,Up=100,Yp=1,Or={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Xp=Ue({getKey:null,doesEleInvalidateKey:vn,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Xl,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),la=function(e,r){var a=this;a.renderer=e,a.onDequeues=[];var n=Xp(r);ge(a,n),a.lookup=new Op(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},Ye=la.prototype;Ye.reasons=Or;Ye.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Ye.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=r[t]=r[t]||[];return a};Ye.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Ba(function(r,a){return a.reqs-r.reqs});return e};Ye.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Ye.getElement=function(t,e,r,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(a==null&&(a=Math.ceil(zs(o*r))),a=of||a>ks)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,c))return null;var h=l.get(t,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=yl?d=yl:v<=Ya?d=Ya:d=Math.ceil(v/Ya)*Ya,v>qp||f>zp)return null;var y=i.getTextureQueue(d),g=y[y.length-2],p=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=y[y.length-1]),g||(g=p()),g.width-g.usedWidtha;D--)k=i.getElement(t,e,r,D,Or.downscale);B()}else return i.queueElement(t,C.level-1),C;else{var A;if(!b&&!w&&!E)for(var P=a-1;P>=sn;P--){var R=l.get(t,P);if(R){A=R;break}}if(m(A))return i.queueElement(t,a),A;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,t,e,c,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return h={x:g.usedWidth,texture:g,level:a,scale:u,width:f,height:v,scaledLabelShown:c},g.usedWidth+=Math.ceil(f+Np),g.eleCaches.push(h),l.set(t,a,h),i.checkTextureFullness(g),h};Ye.invalidateElements=function(t){for(var e=0;e=Vp*t.width&&this.retireTexture(t)};Ye.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>_p&&t.fullnessChecks>=Gp?ar(r,t):t.fullnessChecks++};Ye.retireTexture=function(t){var e=this,r=t.height,a=e.getTextureQueue(r),n=this.lookup;ar(a,t),t.retired=!0;for(var i=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,Fs(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ar(n,s),a.push(s),s}};Ye.queueElement=function(t,e){var r=this,a=r.getElementQueue(),n=r.getElementKeyToQueue(),i=this.getKey(t),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,a.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};a.push(o),n[i]=o}};Ye.dequeue=function(t){for(var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,Or.dequeue)}return n};Ye.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(t),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Os,r.updateItem(i),r.pop(),a[n]=null):i.eles.unmerge(t))};Ye.onDequeue=function(t){this.onDequeues.push(t)};Ye.offDequeue=function(t){ar(this.onDequeues,t)};Ye.setupDequeueing=sf.setupDequeueing({deqRedrawThreshold:Up,deqCost:Hp,deqAvgCost:Kp,deqNoDrawCost:$p,deqFastCost:Wp,deq:function(e,r,a){return e.dequeue(r,a)},onDeqd:function(e,r){for(var a=0;a=Qp||r>mn)return null}a.validateLayersElesOrdering(r,t);var l=a.layersByLevel,u=Math.pow(2,r),v=l[r]=l[r]||[],f,c=a.levelIsComplete(r,t),h,d=function(){var B=function(L){if(a.validateLayersElesOrdering(L,t),a.levelIsComplete(L,t))return h=l[L],!0},D=function(L){if(!h)for(var I=r+L;fa<=I&&I<=mn&&!B(I);I+=L);};D(1),D(-1);for(var A=v.length-1;A>=0;A--){var P=v[A];P.invalid&&ar(v,P)}};if(!c)d();else return v;var y=function(){if(!f){f=pt();for(var B=0;Bbl||P>bl)return null;var R=A*P;if(R>iy)return null;var L=a.makeLayer(f,r);if(D!=null){var I=v.indexOf(D)+1;v.splice(I,0,L)}else(B.insert===void 0||B.insert)&&v.unshift(L);return L};if(a.skipping&&!o)return null;for(var p=null,m=t.length/Zp,b=!o,w=0;w=m||!rv(p.bb,E.boundingBox()))&&(p=g({insert:!0,after:p}),!p))return null;h||b?a.queueLayer(p,E):a.drawEleInLayer(p,E,r,e),p.eles.push(E),x[r]=p}return h||(b?null:v)};it.getEleLevelForLayerLevel=function(t,e){return t};it.drawEleInLayer=function(t,e,r,a){var n=this,i=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=n.getEleLevelForLayerLevel(r,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,sy),i.setImgSmoothing(s,!0))};it.levelIsComplete=function(t,e){var r=this,a=r.layersByLevel[t];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};it.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var a=0;a0){e=!0;break}}return e};it.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=$t(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(a,n,i){e.invalidateLayer(a)}))};it.invalidateLayer=function(t){if(this.lastInvalidationTime=$t(),!t.invalid){var e=t.level,r=t.eles,a=this.layersByLevel[e];ar(a,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,g=e.pstyle("line-outline-color").value,p=u*v,m=u*v,b=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;f==="straight-triangle"?(s.eleStrokeStyle(t,e,L),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=h,t.lineCap=d,s.eleStrokeStyle(t,e,L),s.drawEdgePath(e,t,o.allpts,c),t.lineCap="butt")},w=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(t.lineWidth=h+y,t.lineCap=d,y>0)s.colorStrokeStyle(t,g[0],g[1],g[2],L);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,c),t.lineCap="butt")},E=function(){n&&s.drawEdgeOverlay(t,e)},C=function(){n&&s.drawEdgeUnderlay(t,e)},x=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(t,e,L)},S=function(){s.drawElementText(t,e,null,a)};t.lineJoin="round";var k=e.pstyle("ghost").value==="yes";if(k){var B=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,A=e.pstyle("ghost-opacity").value,P=p*A;t.translate(B,D),b(P),x(P),t.translate(-B,-D)}else w();C(),b(),x(),E(),S(),r&&t.translate(l.x1,l.y1)}};var vf=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,v[0],v[1],v[2],n),i.drawEdgePath(a,r,o.allpts,"solid")}}}};Yt.drawEdgeOverlay=vf("overlay");Yt.drawEdgeUnderlay=vf("underlay");Yt.drawEdgePath=function(t,e,r,a){var n=t._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,v=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;t.textAlign="center",t.textBaseline="bottom"}var h=!r,d;r&&(d=r,t.translate(-d.x1,-d.y1)),n==null?(s.drawText(t,e,null,h,i),e.isEdge()&&(s.drawText(t,e,"source",h,i),s.drawText(t,e,"target",h,i))):s.drawText(t,e,n,h,i),r&&t.translate(d.x1,d.y1)};Cr.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;t.font=a+" "+s+" "+n+" "+i,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,v[0],v[1],v[2],l)};function ls(t,e,r,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+a-i,r),t.quadraticCurveTo(e+a,r,e+a,r+i),t.lineTo(e+a,r+n-i),t.quadraticCurveTo(e+a,r+n,e+a-i,r+n),t.lineTo(e+i,r+n),t.quadraticCurveTo(e,r+n,e,r+n-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),s?t.stroke():t.fill()}Cr.getTextAngle=function(t,e){var r,a=t._private,n=a.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=Et(n,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};Cr.drawText=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Et(s,"labelX",r),u=Et(s,"labelY",r),v,f,c=this.getLabelText(e,r);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,n);var h=r?r+"-":"",d=Et(s,"labelWidth",r),y=Et(s,"labelHeight",r),g=e.pstyle(h+"text-margin-x").pfValue,p=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=g,u+=p;var E;switch(a?E=this.getTextAngle(e,r):E=0,E!==0&&(v=l,f=u,t.translate(v,f),t.rotate(E),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var C=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,S=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,B=e.pstyle("text-background-shape").strValue,D=B.indexOf("round")===0,A=2;if(C>0||S>0&&x>0){var P=l-k;switch(b){case"left":P-=d;break;case"center":P-=d/2;break}var R=u-y-k,L=d+2*k,I=y+2*k;if(C>0){var M=t.fillStyle,O=e.pstyle("text-background-color").value;t.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+C*o+")",D?ls(t,P,R,L,I,A):t.fillRect(P,R,L,I),t.fillStyle=M}if(S>0&&x>0){var _=t.strokeStyle,H=t.lineWidth,F=e.pstyle("text-border-color").value,G=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+x*o+")",t.lineWidth=S,t.setLineDash)switch(G){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=S/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(D?ls(t,P,R,L,I,A,"stroke"):t.strokeRect(P,R,L,I),G==="double"){var U=S/2;D?ls(t,P+U,R+U,L-U*2,I-U*2,A,"stroke"):t.strokeRect(P+U,R+U,L-U*2,I-U*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=H,t.strokeStyle=_}}var X=2*e.pstyle("text-outline-width").pfValue;if(X>0&&(t.lineWidth=X),e.pstyle("text-wrap").value==="wrap"){var Z=Et(s,"labelWrapCachedLines",r),Q=Et(s,"labelLineHeight",r),ee=d/2,te=this.getLabelJustification(e);switch(te==="auto"||(b==="left"?te==="left"?l+=-d:te==="center"&&(l+=-ee):b==="center"?te==="left"?l+=-ee:te==="right"&&(l+=ee):b==="right"&&(te==="center"?l+=ee:te==="right"&&(l+=d))),w){case"top":u-=(Z.length-1)*Q;break;case"center":case"bottom":u-=(Z.length-1)*Q;break}for(var K=0;K0&&t.strokeText(Z[K],l,u),t.fillText(Z[K],l,u),u+=Q}else X>0&&t.strokeText(c,l,u),t.fillText(c,l,u);E!==0&&(t.rotate(-E),t.translate(-v,-f))}}};var Qr={};Qr.drawNode=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!ae(f.x)||!ae(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,g=e.padding();o=e.width()+2*g,l=e.height()+2*g;var p;r&&(p=r,t.translate(-p.x1,-p.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),E=new Array(b.length),C=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:P;s.eleFillStyle(t,e,z)},K=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F;s.colorStrokeStyle(t,R[0],R[1],R[2],z)},N=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z;s.colorStrokeStyle(t,U[0],U[1],U[2],z)},$=function(z,V,ne,Y){var ie=s.nodePathCache=s.nodePathCache||[],ce=Yl(ne==="polygon"?ne+","+Y.join(","):ne,""+V,""+z,""+ee),Ee=ie[ce],ve,be=!1;return Ee!=null?(ve=Ee,be=!0,v.pathCache=ve):(ve=new Path2D,ie[ce]=v.pathCache=ve),{path:ve,cacheHit:be}},J=e.pstyle("shape").strValue,re=e.pstyle("shape-polygon-points").pfValue;if(h){t.translate(f.x,f.y);var le=$(o,l,J,re);d=le.path,y=le.cacheHit}var xe=function(){if(!y){var z=f;h&&(z={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||t,z.x,z.y,o,l,ee,v)}h?t.fill(d):t.fill()},Ie=function(){for(var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ne=u.backgrounding,Y=0,ie=0;ie0&&arguments[0]!==void 0?arguments[0]:!1,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(t,e,V),z&&(h||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ee,v)))},se=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,V=(D>0?D:-D)*z,ne=D>0?0:255;D!==0&&(s.colorFillStyle(t,ne,ne,ne,V),h?t.fill(d):t.fill())},ue=function(){if(A>0){if(t.lineWidth=A,t.lineCap=M,t.lineJoin=I,t.setLineDash)switch(L){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(_),t.lineDashOffset=H;break;case"solid":case"double":t.setLineDash([]);break}if(O!=="center"){if(t.save(),t.lineWidth*=2,O==="inside")h?t.clip(d):t.clip();else{var z=new Path2D;z.rect(-o/2-A,-l/2-A,o+2*A,l+2*A),z.addPath(d),t.clip(z,"evenodd")}h?t.stroke(d):t.stroke(),t.restore()}else h?t.stroke(d):t.stroke();if(L==="double"){t.lineWidth=A/3;var V=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",h?t.stroke(d):t.stroke(),t.globalCompositeOperation=V}t.setLineDash&&t.setLineDash([])}},de=function(){if(G>0){if(t.lineWidth=G,t.lineCap="butt",t.setLineDash)switch(X){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var z=f;h&&(z={x:0,y:0});var V=s.getNodeShape(e),ne=A;O==="inside"&&(ne=0),O==="outside"&&(ne*=2);var Y=(o+ne+(G+Q))/o,ie=(l+ne+(G+Q))/l,ce=o*Y,Ee=l*ie,ve=s.nodeShapes[V].points,be;if(h){var we=$(ce,Ee,V,ve);be=we.path}if(V==="ellipse")s.drawEllipsePath(be||t,z.x,z.y,ce,Ee);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(V)){var pe=0,Oe=0,qe=0;V==="round-diamond"?pe=(ne+Q+G)*1.4:V==="round-heptagon"?(pe=(ne+Q+G)*1.075,qe=-(ne/2+Q+G)/35):V==="round-hexagon"?pe=(ne+Q+G)*1.12:V==="round-pentagon"?(pe=(ne+Q+G)*1.13,qe=-(ne/2+Q+G)/15):V==="round-tag"?(pe=(ne+Q+G)*1.12,Oe=(ne/2+G+Q)*.07):V==="round-triangle"&&(pe=(ne+Q+G)*(Math.PI/2),qe=-(ne+Q/2+G)/Math.PI),pe!==0&&(Y=(o+pe)/o,ce=o*Y,["round-hexagon","round-tag"].includes(V)||(ie=(l+pe)/l,Ee=l*ie)),ee=ee==="auto"?iv(ce,Ee):ee;for(var yt=ce/2,mt=Ee/2,He=ee+(ne+G+Q)/2,Xe=new Array(ve.length/2),Ze=new Array(ve.length/2),vt=0;vt0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(r,v[0],v[1],v[2],u),o.nodeShapes[f].draw(r,n.x,n.y,i+l*2,s+l*2,c),r.fill()}}}};Qr.drawNodeOverlay=ff("overlay");Qr.drawNodeUnderlay=ff("underlay");Qr.hasPie=function(t){return t=t[0],t._private.hasPie};Qr.drawPie=function(t,e,r,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=a.x,o=a.y,l=e.width(),u=e.height(),v=Math.min(l,u)/2,f=0,c=this.usePaths();c&&(s=0,o=0),i.units==="%"?v=v*i.pfValue:i.pfValue!==void 0&&(v=i.pfValue/2);for(var h=1;h<=n.pieBackgroundN;h++){var d=e.pstyle("pie-"+h+"-background-size").value,y=e.pstyle("pie-"+h+"-background-color").value,g=e.pstyle("pie-"+h+"-background-opacity").value*r,p=d/100;p+f>1&&(p=1-f);var m=1.5*Math.PI+2*Math.PI*f,b=2*Math.PI*p,w=m+b;d===0||f>=1||f+p>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,v,m,w),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],g),t.fill(),f+=p)}};var dt={},yy=100;dt.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};dt.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var m=r.style(),b=r.zoom(),w=s!==void 0?s:b,E=r.pan(),C={x:E.x,y:E.y},x={zoom:b,pan:{x:E.x,y:E.y}},S=e.prevViewport,k=S===void 0||x.zoom!==S.zoom||x.pan.x!==S.pan.x||x.pan.y!==S.pan.y;!k&&!(y&&!d)&&(e.motionBlurPxRatio=1),o&&(C=o),w*=l,C.x*=l,C.y*=l;var B=e.getCachedZSortedEles();function D(K,N,$,J,re){var le=K.globalCompositeOperation;K.globalCompositeOperation="destination-out",e.colorFillStyle(K,255,255,255,e.motionBlurTransparency),K.fillRect(N,$,J,re),K.globalCompositeOperation=le}function A(K,N){var $,J,re,le;!e.clearingMotionBlur&&(K===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||K===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?($={x:E.x*h,y:E.y*h},J=b*h,re=e.canvasWidth*h,le=e.canvasHeight*h):($=C,J=w,re=e.canvasWidth,le=e.canvasHeight),K.setTransform(1,0,0,1,0,0),N==="motionBlur"?D(K,0,0,re,le):!a&&(N===void 0||N)&&K.clearRect(0,0,re,le),n||(K.translate($.x,$.y),K.scale(J,J)),o&&K.translate(o.x,o.y),s&&K.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var P=e.data.bufferContexts[e.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var x=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var R=u.contexts[e.NODE],L=e.textureCache.texture,x=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),c?D(R,0,0,x.width,x.height):R.clearRect(0,0,x.width,x.height);var I=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,I[0],I[1],I[2],M),R.fillRect(0,0,x.width,x.height);var b=r.zoom();A(R,!1),R.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l),R.drawImage(L,x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=r.extent(),_=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),H=e.hideEdgesOnViewport&&_,F=[];if(F[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,F[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),F[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,F[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||F[e.NODE]){var G=c&&!F[e.NODE]&&h!==1,R=a||(G?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),U=c&&!G?"motionBlur":void 0;A(R,U),H?e.drawCachedNodes(R,B.nondrag,l,O):e.drawLayeredElements(R,B.nondrag,l,O),e.debug&&e.drawDebugPoints(R,B.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||F[e.DRAG])){var G=c&&!F[e.DRAG]&&h!==1,R=a||(G?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);A(R,c&&!G?"motionBlur":void 0),H?e.drawCachedNodes(R,B.drag,l,O):e.drawCachedElements(R,B.drag,l,O),e.debug&&e.drawDebugPoints(R,B.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,A),c&&h!==1){var X=u.contexts[e.NODE],Z=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Q=u.contexts[e.DRAG],ee=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],te=function(N,$,J){N.setTransform(1,0,0,1,0,0),J||!p?N.clearRect(0,0,e.canvasWidth,e.canvasHeight):D(N,0,0,e.canvasWidth,e.canvasHeight);var re=h;N.drawImage($,0,0,e.canvasWidth*re,e.canvasHeight*re,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||F[e.NODE])&&(te(X,Z,F[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||F[e.DRAG])&&(te(Q,ee,F[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},yy)),a||r.emit("render")};var na;dt.drawSelectionRectangle=function(t,e){var r=this,a=r.cy,n=r.data,i=a.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=n.canvasNeedsRedraw,u=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var v=u||n.contexts[r.SELECT_BOX];if(e(v),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(n.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),h=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(h.x,h.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var d=r.lastRedrawTime;if(r.showFps&&d){d=Math.round(d);var y=Math.round(1e3/d),g="1 frame = "+d+" ms = "+y+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!na){var p=v.measureText(g);na=p.actualBoundingBoxAscent}v.fillText(g,0,na);var m=60;v.strokeRect(0,na+10,250,20),v.fillRect(0,na+10,250*Math.min(y/m,1),20)}o||(l[r.SELECT_BOX]=!1)}};function Cl(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(a));return a}function my(t,e,r){var a=Cl(t,t.VERTEX_SHADER,e),n=Cl(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,a),t.attachShader(i,n),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function by(t,e,r){r===void 0&&(r=e);var a=t.makeOffscreenCanvas(e,r),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function eo(t){var e=t.pixelRatio,r=t.cy.zoom(),a=t.cy.pan();return{zoom:r*e,pan:{x:a.x*e,y:a.y*e}}}function wy(t,e,r,a,n){var i=a*r+e.x,s=n*r+e.y;return s=Math.round(t.canvasHeight-s),[i,s]}function ia(t,e,r){var a=t[0]/255,n=t[1]/255,i=t[2]/255,s=e,o=r||new Array(4);return o[0]=a*s,o[1]=n*s,o[2]=i*s,o[3]=s,o}function Br(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function xy(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Ey(t,e){var r=t.createTexture();return r.buffer=function(a){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function cf(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function df(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Cy(t,e,r,a,n,i){switch(e){case t.FLOAT:return new Float32Array(r.buffer,i*a,n);case t.INT:return new Int32Array(r.buffer,i*a,n)}}function Ty(t,e,r,a){var n=cf(t,e),i=je(n,2),s=i[0],o=i[1],l=df(t,o,a),u=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),u}function Qt(t,e,r,a){var n=cf(t,r),i=je(n,3),s=i[0],o=i[1],l=i[2],u=df(t,o,e*s),v=s*l,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*v,t.DYNAMIC_DRAW),t.enableVertexAttribArray(a),o===t.FLOAT?t.vertexAttribPointer(a,s,o,!1,v,0):o===t.INT&&t.vertexAttribIPointer(a,s,o,v,0),t.vertexAttribDivisor(a,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;hs&&(o=s/a,l=a*o,u=n*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,a,n){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(a),v=u.scale,f=u.texW,c=u.texH,h=[null,null],d=function(b,w){if(n&&w){var E=w.context,C=b.x,x=b.row,S=C,k=l*x;E.save(),E.translate(S,k),E.scale(v,v),n(E,a),E.restore()}},y=function(){d(i.freePointer,i.canvas),h[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:c},h[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},g=function(){var b=i.scratch,w=i.canvas;b.clear(),d({x:0,row:0},b);var E=s-i.freePointer.x,C=f-E,x=l;{var S=i.freePointer.x,k=i.freePointer.row*l,B=E;w.context.drawImage(b,0,0,B,x,S,k,B,x),h[0]={x:S,y:k,w:B,h:c}}{var D=E,A=(i.freePointer.row+1)*l,P=C;w&&w.context.drawImage(b,D,0,P,x,0,A,P,x),h[1]={x:0,y:A,w:P,h:c}}i.freePointer.x=C,i.freePointer.row++},p=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)y();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(p(),y()):this.enableWrapping?g():(p(),y())}return this.keyToLocation.set(r,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var a=this.texSize,n=this.texRows,i=this.getScale(r),s=i.texW;return this.freePointer.x+s>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},n=a.forceRedraw,i=n===void 0?!1:n,s=a.filterEle,o=s===void 0?function(){return!0}:s,l=a.filterType,u=l===void 0?function(){return!0}:l,v=!1,f=!1,c=Pt(r),h;try{for(c.s();!(h=c.n()).done;){var d=h.value;if(o(d)){var y=Pt(this.renderTypes.values()),g;try{for(y.s();!(g=y.n()).done;){var p=g.value,m=p.type;if(u(m)){var b=p.getKey(d),w=this.collections.get(p.collection);if(i)w.markKeyForGC(b),f=!0;else{var E=p.getID?p.getID(d):d.id(),C=this._key(m,E),x=this.typeAndIdToKey.get(C);x!==void 0&&x!==b&&(this.typeAndIdToKey.delete(C),w.markKeyForGC(x),v=!0)}}}}catch(S){y.e(S)}finally{y.f()}}}}catch(S){c.e(S)}finally{c.f()}return f&&(this.gc(),v=!1),v}},{key:"gc",value:function(){var r=Pt(this.collections.values()),a;try{for(r.s();!(a=r.n()).done;){var n=a.value;n.gc()}}catch(i){r.e(i)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,a,n){var i=this.renderTypes.get(a),s=i.getKey(r);n||(n=i.getBoundingBox(r));var o=this.collections.get(i.collection),l=!1,u=o.draw(s,n,function(c){i.drawElement(c,r,n,!0,!0),l=!0});if(l){var v=i.getID?i.getID(r):r.id(),f=this._key(a,v);this.typeAndIdToKey.set(f,s)}return u}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r,a){if(this.batchAtlases.length===this.maxAtlasesPerBatch){var n=this.renderTypes.get(a),i=n.getKey(r),s=this.collections.get(n.collection),o=s.getAtlas(i);return!!o&&this.batchAtlases.includes(o)}return!0}},{key:"getAtlasIndexForBatch",value:function(r){var a=this.batchAtlases.indexOf(r);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(r),a=this.batchAtlases.length-1}return a}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,a){return a})}},{key:"getAtlasInfo",value:function(r,a){var n=this.renderTypes.get(a),i=n.getBoundingBox(r),s=this.getOrCreateAtlas(r,a,i),o=this.getAtlasIndexForBatch(s);if(o!==void 0){var l=n.getKey(r),u=s.getOffsets(l),v=je(u,2),f=v[0],c=v[1];return{index:o,tex1:f,tex2:c,bb:i}}}},{key:"setTransformMatrix",value:function(r,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=this.getRenderTypeOpts(n),l=o.getPadding?o.getPadding(r):0;if(i){var u=i.bb,v=i.tex1,f=i.tex2,c=v.w/(v.w+f.w);s||(c=1-c);var h=this.getAdjustedBB(u,l,s,c);this._applyTransformMatrix(a,h,o,r)}else{var d=o.getBoundingBox(r),y=this.getAdjustedBB(d,l,!0,1);this._applyTransformMatrix(a,y,o,r)}}},{key:"_applyTransformMatrix",value:function(r,a,n,i){var s,o;hf(r);var l=n.getRotation?n.getRotation(i):0;if(l!==0){var u=n.getRotationPoint(i),v=u.x,f=u.y;bn(r,r,[v,f]),gf(r,r,l);var c=n.getRotationOffset(i);s=c.x+a.xOffset,o=c.y}else s=a.x1,o=a.y1;bn(r,r,[s,o]),to(r,r,[a.w,a.h])}},{key:"getAdjustedBB",value:function(r,a,n,i){var s=r.x1,o=r.y1,l=r.w,u=r.h;a&&(s-=a,o-=a,l+=2*a,u+=2*a);var v=0,f=l*i;return n&&i<1?l=f:!n&&i<1&&(v=l-f,s+=v,l=f),{x1:s,y1:o,w:l,h:u,xOffset:v}}},{key:"getDebugInfo",value:function(){var r=[],a=Pt(this.collections),n;try{for(a.s();!(n=a.n()).done;){var i=je(n.value,2),s=i[0],o=i[1],l=o.getCounts(),u=l.keyCount,v=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return r}}])}(),Xa=0,Dl=1,kl=2,vs=3,Pl=4,Ly=function(){function t(e,r,a){or(this,t),this.r=e,this.gl=r,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=by,this.atlasManager=new My(e,a),this.program=this.createShaderProgram(ca.SCREEN),this.pickingProgram=this.createShaderProgram(ca.PICKING),this.vao=this.createVAO()}return ur(t,[{key:"addAtlasCollection",value:function(r,a){this.atlasManager.addAtlasCollection(r,a)}},{key:"addAtlasRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(r,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"createShaderProgram",value:function(r){var a=this.gl,n=`#version 300 es - precision highp float; - - uniform mat3 uPanZoomMatrix; - uniform int uAtlasSize; - - // instanced - in vec2 aPosition; - - in mat3 aTransform; - - // what are we rendering? - in int aVertType; - - // for picking - in vec4 aIndex; - - // For textures - in int aAtlasId; // which shader unit/atlas to use - in vec4 aTex; // x/y/w/h of texture in atlas - - // for edges - in vec4 aPointAPointB; - in vec4 aPointCPointD; - in float aLineWidth; - in vec4 aColor; - - out vec2 vTexCoord; - out vec4 vColor; - flat out int vAtlasId; - flat out vec4 vIndex; - flat out int vVertType; - - void main(void) { - int vid = gl_VertexID; - vec2 position = aPosition; - - if(aVertType == `.concat(Xa,`) { - float texX = aTex.x; - float texY = aTex.y; - float texW = aTex.z; - float texH = aTex.w; - - int vid = gl_VertexID; - - if(vid == 1 || vid == 2 || vid == 4) { - texX += texW; - } - if(vid == 2 || vid == 4 || vid == 5) { - texY += texH; - } - - float d = float(uAtlasSize); - vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - } - else if(aVertType == `).concat(Pl,`) { - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - vColor = aColor; - } - else if(aVertType == `).concat(Dl,`) { - vec2 source = aPointAPointB.xy; - vec2 target = aPointAPointB.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 xBasis = target - source; - vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); - vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y; - - gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); - vColor = aColor; - } - else if(aVertType == `).concat(kl,`) { - vec2 pointA = aPointAPointB.xy; - vec2 pointB = aPointAPointB.zw; - vec2 pointC = aPointCPointD.xy; - vec2 pointD = aPointCPointD.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 p0 = pointA; - vec2 p1 = pointB; - vec2 p2 = pointC; - vec2 pos = position; - if(position.x == 1.0) { - p0 = pointD; - p1 = pointC; - p2 = pointB; - pos = vec2(0.0, -position.y); - } - - vec2 p01 = p1 - p0; - vec2 p12 = p2 - p1; - vec2 p21 = p1 - p2; - - // Find the normal vector. - vec2 tangent = normalize(normalize(p12) + normalize(p01)); - vec2 normal = vec2(-tangent.y, tangent.x); - - // Find the vector perpendicular to p0 -> p1. - vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); - - // Determine the bend direction. - float sigma = sign(dot(p01 + p21, normal)); - float width = aLineWidth; - - if(sign(pos.y) == -sigma) { - // This is an intersecting vertex. Adjust the position so that there's no overlap. - vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } else { - // This is a non-intersecting vertex. Treat it like a mitre join. - vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } - - vColor = aColor; - } - else if(aVertType == `).concat(vs,` && vid < 3) { - // massage the first triangle into an edge arrow - if(vid == 0) - position = vec2(-0.15, -0.3); - if(vid == 1) - position = vec2( 0.0, 0.0); - if(vid == 2) - position = vec2( 0.15, -0.3); - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - vColor = aColor; - } - else { - gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space - } - - vAtlasId = aAtlasId; - vIndex = aIndex; - vVertType = aVertType; - } - `),i=this.atlasManager.getIndexArray(),s=`#version 300 es - precision highp float; - - // define texture unit for each node in the batch - `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` - `),` - - uniform vec4 uBGColor; - - in vec2 vTexCoord; - in vec4 vColor; - flat in int vAtlasId; - flat in vec4 vIndex; - flat in int vVertType; - - out vec4 outColor; - - void main(void) { - if(vVertType == `).concat(Xa,`) { - `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` - else `),` - } else if(vVertType == `).concat(vs,`) { - // blend arrow color with background (using premultiplied alpha) - outColor.rgb = vColor.rgb + (uBGColor.rgb * (1.0 - vColor.a)); - outColor.a = 1.0; // make opaque, masks out line under arrow - } else { - outColor = vColor; - } - - `).concat(r.picking?`if(outColor.a == 0.0) discard; - else outColor = vIndex;`:"",` - } - `),o=my(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:ca.SCREEN;this.panZoomMatrix=r,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.rectangleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.atlasManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"getTempMatrix",value:function(){return this.tempMatrix=this.tempMatrix||on()}},{key:"drawTexture",value:function(r,a,n){var i=this.atlasManager;if(r.visible()&&i.getRenderTypeOpts(n).isVisible(r)){i.canAddToCurrentBatch(r,n)||this.endBatch(),this.instanceCount+1>=this.maxInstances&&this.endBatch();var s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Xa;var o=this.indexBuffer.getView(s);Br(a,o);var l=i.getAtlasInfo(r,n),u=l.index,v=l.tex1,f=l.tex2;f.w>0&&this.wrappedCount++;for(var c=!0,h=0,d=[v,f];h=this.maxInstances&&this.endBatch()}}},{key:"drawSimpleRectangle",value:function(r,a,n){if(r.visible()){var i=this.atlasManager,s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Pl;var o=this.indexBuffer.getView(s);Br(a,o);var l=r.pstyle("background-color").value,u=r.pstyle("background-opacity").value,v=this.colorBuffer.getView(s);ia(l,u,v);var f=this.transformBuffer.getMatrixView(s);i.setTransformMatrix(r,f,n),this.rectangleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"drawEdgeArrow",value:function(r,a,n){if(r.visible()){var i=r._private.rscratch,s,o,l;if(n==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(n+"-arrow-shape").value;if(u!=="none"){var v=r.pstyle(n+"-arrow-color").value,f=r.pstyle("opacity").value,c=r.pstyle("line-opacity").value,h=f*c,d=r.pstyle("width").pfValue,y=r.pstyle("arrow-scale").value,g=this.r.getArrowWidth(d,y),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);hf(m),bn(m,m,[s,o]),to(m,m,[g,g]),gf(m,m,l),this.vertTypeBuffer.getView(p)[0]=vs;var b=this.indexBuffer.getView(p);Br(a,b);var w=this.colorBuffer.getView(p);ia(v,h,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,a){if(r.visible()){var n=this.getEdgePoints(r);if(n){var i=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=i*s;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=Dl;var f=this.indexBuffer.getView(v);Br(a,f);var c=this.colorBuffer.getView(v);ia(l,u,c);var h=this.lineWidthBuffer.getView(v);h[0]=o;var d=this.pointAPointBBuffer.getView(v);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}}}},{key:"getEdgePoints",value:function(r){var a=r._private.rscratch;if(!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))){var n=a.allpts;if(n.length==4)return n;var i=this.getNumSegments(r);return this.getCurveSegmentPoints(n,i)}}},{key:"getNumSegments",value:function(r){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"getCurveSegmentPoints",value:function(r,a){if(r.length==4)return r;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=r[0],n[1]=r[1];else if(i==a)n[i*2]=r[r.length-2],n[i*2+1]=r[r.length-1];else{var s=i/a;this.setCurvePoint(r,s,n,i*2)}return n}},{key:"setCurvePoint",value:function(r,a,n,i){if(r.length<=2)n[i]=r[0],n[i+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},{key:"getStyle",value:function(r,a){var n=a.pstyle("".concat(r,"-opacity")).value,i=a.pstyle("".concat(r,"-color")).value,s=a.pstyle("".concat(r,"-shape")).value;return{opacity:n,color:i,shape:s}}},{key:"getPadding",value:function(r,a){return a.pstyle("".concat(r,"-padding")).pfValue}},{key:"draw",value:function(r,a,n,i){if(this.isVisible(r,n)){var s=this.r,o=i.w,l=i.h,u=o/2,v=l/2,f=this.getStyle(r,n),c=f.shape,h=f.color,d=f.opacity;a.save(),a.fillStyle=Bl(h,d),c==="round-rectangle"||c==="roundrectangle"?s.drawRoundRectanglePath(a,u,v,o,l,"auto"):c==="ellipse"&&s.drawEllipsePath(a,u,v,o,l),a.fill(),a.restore()}}}])}(),pf={};pf.initWebgl=function(t,e){var r=this,a=r.data.contexts[r.WEBGL];t.bgColor=Oy(r),t.webglTexSize=Math.min(t.webglTexSize,a.getParameter(a.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=Dy(a),r.pickingFrameBuffer.needsDraw=!0;var n=function(u){return function(v){return r.getTextAngle(v,u)}},i=function(u){return function(v){var f=v.pstyle(u);return f&&f.value}};r.drawing=new Ly(r,a,t);var s=new Iy(r);r.drawing.addAtlasCollection("node",Sl({texRows:t.webglTexRowsNodes})),r.drawing.addAtlasCollection("label",Sl({texRows:t.webglTexRows})),r.drawing.addAtlasRenderType("node-body",Ar({collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement})),r.drawing.addAtlasRenderType("label",Ar({collection:"label",getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")})),r.drawing.addAtlasRenderType("node-overlay",Ar({collection:"node",getBoundingBox:e.getElementBox,getKey:function(u){return s.getStyleKey("overlay",u)},drawElement:function(u,v,f){return s.draw("overlay",u,v,f)},isVisible:function(u){return s.isVisible("overlay",u)},getPadding:function(u){return s.getPadding("overlay",u)}})),r.drawing.addAtlasRenderType("node-underlay",Ar({collection:"node",getBoundingBox:e.getElementBox,getKey:function(u){return s.getStyleKey("underlay",u)},drawElement:function(u,v,f){return s.draw("underlay",u,v,f)},isVisible:function(u){return s.isVisible("underlay",u)},getPadding:function(u){return s.getPadding("underlay",u)}})),r.drawing.addAtlasRenderType("edge-source-label",Ar({collection:"label",getKey:e.getSourceLabelKey,getBoundingBox:e.getSourceLabelBox,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")})),r.drawing.addAtlasRenderType("edge-target-label",Ar({collection:"label",getKey:e.getTargetLabelKey,getBoundingBox:e.getTargetLabelBox,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")}));var o=Pa(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(l,u){var v=!1;u&&u.length>0&&(v|=r.drawing.invalidate(u)),v&&o()}),Ny(r)};function Oy(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return _l(r)}function Ny(t){{var e=t.render;t.render=function(i){i=i||{};var s=t.cy;t.webgl&&(s.zoom()>of?(Fy(t),e.call(t,i)):(zy(t),mf(t,i,ca.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,l){return Ky(t,i,s)};{var a=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){a.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var n=t.notify;t.notify=function(i,s){n.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function Fy(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function zy(t){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function qy(t){var e=t.canvasWidth,r=t.canvasHeight,a=eo(t),n=a.pan,i=a.zoom,s=on();bn(s,s,[n.x,n.y]),to(s,s,[i,i]);var o=on();Py(o,e,r);var l=on();return ky(l,o,s),l}function yf(t,e){var r=t.canvasWidth,a=t.canvasHeight,n=eo(t),i=n.pan,s=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,a),e.translate(i.x,i.y),e.scale(s,s)}function Vy(t,e){t.drawSelectionRectangle(e,function(r){return yf(t,r)})}function _y(t){var e=t.data.contexts[t.NODE];e.save(),yf(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function Gy(t){var e=function(n,i,s){for(var o=n.atlasManager.getAtlasCollection(i),l=t.data.contexts[t.NODE],u=.125,v=o.atlases,f=0;f=0&&w.add(x)}return w}function Ky(t,e,r){var a=Hy(t,e,r),n=t.getCachedZSortedEles(),i,s,o=Pt(a),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,v=n[u];if(!i&&v.isNode()&&(i=v),!s&&v.isEdge()&&(s=v),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function $y(t){return t.pstyle("shape").value==="rectangle"&&t.pstyle("background-fill").value==="solid"&&t.pstyle("border-width").pfValue===0&&t.pstyle("background-image").strValue==="none"}function fs(t,e,r){var a=t.drawing;e+=1,r.isNode()?(a.drawTexture(r,e,"node-underlay"),$y(r)?a.drawSimpleRectangle(r,e,"node-body"):a.drawTexture(r,e,"node-body"),a.drawTexture(r,e,"label"),a.drawTexture(r,e,"node-overlay")):(a.drawEdgeLine(r,e),a.drawEdgeArrow(r,e,"source"),a.drawEdgeArrow(r,e,"target"),a.drawTexture(r,e,"label"),a.drawTexture(r,e,"edge-source-label"),a.drawTexture(r,e,"edge-target-label"))}function mf(t,e,r){var a;t.webglDebug&&(a=performance.now());var n=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&Vy(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=qy(t),l=t.getCachedZSortedEles();if(i=l.length,n.startFrame(o,r),r.screen){for(var u=0;u0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var y=e.pan(),g={x:y.x*u,y:y.y*u};u*=e.zoom(),h.translate(g.x,g.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-g.x,-g.y)}t.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=t.bg,h.rect(0,0,i,s),h.fill())}return c};function Wy(t,e){for(var r=atob(t),a=new ArrayBuffer(r.length),n=new Uint8Array(a),i=0;i"u"?"undefined":We(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var a=this.cy.window(),n=a.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[lf,qt,Yt,js,Cr,Qr,dt,pf,vr,Ia,xf].forEach(function(t){ge(Te,t)});var Xy=[{name:"null",impl:Yv},{name:"base",impl:nf},{name:"canvas",impl:Uy}],Zy=[{type:"layout",extensions:Pp},{type:"renderer",extensions:Xy}],Cf={},Tf={};function Sf(t,e,r){var a=r,n=function(S){Re("Can not register `"+e+"` for `"+t+"` since `"+S+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(xa.prototype[e])return n(e);xa.prototype[e]=r}else if(t==="collection"){if(nt.prototype[e])return n(e);nt.prototype[e]=r}else if(t==="layout"){for(var i=function(S){this.options=S,r.call(this,S),ke(this._private)||(this._private={}),this._private.cy=S.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(r.prototype),o=[],l=0;lr.length)&&(e=r.length);for(var t=0,a=Array(e);t=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function Zl(r,e,t){return(e=Ql(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ec(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function rc(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,s,o=[],l=!0,u=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(a=i.call(t)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){u=!0,n=v}finally{try{if(!l&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}function tc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ac(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rr(r,e){return Qf(r)||rc(r,e)||Xs(r,e)||tc()}function mn(r){return Jf(r)||ec(r)||Xs(r)||ac()}function nc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function Ql(r){var e=nc(r,"string");return typeof e=="symbol"?e:e+""}function ar(r){"@babel/helpers - typeof";return ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(r)}function Xs(r,e){if(r){if(typeof r=="string")return Bs(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Bs(r,e):void 0}}var er=typeof window>"u"?null:window,To=er?er.navigator:null;er&&er.document;var ic=ar(""),Jl=ar({}),sc=ar(function(){}),oc=typeof HTMLElement>"u"?"undefined":ar(HTMLElement),La=function(e){return e&&e.instanceString&&$e(e.instanceString)?e.instanceString():null},de=function(e){return e!=null&&ar(e)==ic},$e=function(e){return e!=null&&ar(e)===sc},ze=function(e){return!Dr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Re=function(e){return e!=null&&ar(e)===Jl&&!ze(e)&&e.constructor===Object},uc=function(e){return e!=null&&ar(e)===Jl},te=function(e){return e!=null&&ar(e)===ar(1)&&!isNaN(e)},lc=function(e){return te(e)&&Math.floor(e)===e},bn=function(e){if(oc!=="undefined")return e!=null&&e instanceof HTMLElement},Dr=function(e){return Ia(e)||jl(e)},Ia=function(e){return La(e)==="collection"&&e._private.single},jl=function(e){return La(e)==="collection"&&!e._private.single},Ys=function(e){return La(e)==="core"},ev=function(e){return La(e)==="stylesheet"},vc=function(e){return La(e)==="event"},ot=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},fc=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},cc=function(e){return Re(e)&&te(e.x1)&&te(e.x2)&&te(e.y1)&&te(e.y2)},dc=function(e){return uc(e)&&$e(e.then)},hc=function(){return To&&To.userAgent.match(/msie|trident|edge/i)},Zt=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;st?1:0},xc=function(e,t){return-1*tv(e,t)},pe=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(g-=1),g<1/6?d+(m-d)*6*g:g<1/2?m:g<2/3?d+(m-d)*(2/3-g)*6:d}var f=new RegExp("^"+yc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}t=[o,l,u,s]}return t},Tc=function(e){var t,a=new RegExp("^"+gc+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;t.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;t.push(u)}}return t},Sc=function(e){return kc[e.toLowerCase()]},av=function(e){return(ze(e)?e:null)||Sc(e)||Ec(e)||Tc(e)||Cc(e)},kc={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},nv=function(e){for(var t=e.map,a=e.keys,n=a.length,i=0;i=l||R<0||y&&M>=c}function T(){var B=e();if(x(B))return S(B);d=setTimeout(T,C(B))}function S(B){return d=void 0,b&&v?w(B):(v=f=void 0,h)}function P(){d!==void 0&&clearTimeout(d),g=0,v=m=f=d=void 0}function D(){return d===void 0?h:S(e())}function A(){var B=e(),R=x(B);if(v=arguments,f=this,m=B,R){if(d===void 0)return E(m);if(y)return clearTimeout(d),d=setTimeout(T,l),w(m)}return d===void 0&&(d=setTimeout(T,l)),h}return A.cancel=P,A.flush=D,A}return fi=s,fi}var Nc=Oc(),Fa=Oa(Nc),ci=er?er.performance:null,ov=ci&&ci.now?function(){return ci.now()}:function(){return Date.now()},zc=function(){if(er){if(er.requestAnimationFrame)return function(r){er.requestAnimationFrame(r)};if(er.mozRequestAnimationFrame)return function(r){er.mozRequestAnimationFrame(r)};if(er.webkitRequestAnimationFrame)return function(r){er.webkitRequestAnimationFrame(r)};if(er.msRequestAnimationFrame)return function(r){er.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(ov())},1e3/60)}}(),wn=function(e){return zc(e)},Yr=ov,Ct=9261,uv=65599,Gt=5381,lv=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ct,a=t,n;n=e.next(),!n.done;)a=a*uv+n.value|0;return a},Ca=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ct;return t*uv+e|0},Ta=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gt;return(t<<5)+t+e|0},Fc=function(e,t){return e*2097152+t},et=function(e){return e[0]*2097152+e[1]},Xa=function(e,t){return[Ca(e[0],t[0]),Ta(e[1],t[1])]},qo=function(e,t){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===t&&e.splice(n,1)},eo=function(e){e.splice(0,e.length)},$c=function(e,t){for(var a=0;a"u"?"undefined":ar(Set))!==Kc?Set:Xc,In=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!Ys(e)){We("An element must have a core reference and parameters set");return}var n=t.group;if(n==null&&(t.data&&t.data.source!=null&&t.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){We("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?n==="edges":!!t.pannable,active:!1,classes:new ra,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),t.renderedPosition){var s=t.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];ze(t.classes)?u=t.classes:de(t.classes)&&(u=t.classes.split(/\s+/));for(var v=0,f=u.length;vy?1:0},v=function(p,y,b,w,E){var C;if(b==null&&(b=0),E==null&&(E=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=p.length);bP;0<=P?S++:S--)T.push(S);return T}).apply(this).reverse(),x=[],w=0,E=C.length;wD;0<=D?++T:--T)A.push(s(p,b));return A},m=function(p,y,b,w){var E,C,x;for(w==null&&(w=a),E=p[b];b>y;){if(x=b-1>>1,C=p[x],w(E,C)<0){p[b]=C,b=x;continue}break}return p[b]=E},g=function(p,y,b){var w,E,C,x,T;for(b==null&&(b=a),E=p.length,T=y,C=p[y],w=2*y+1;w0;){var C=y.pop(),x=g(C),T=C.id();if(c[T]=x,x!==1/0)for(var S=C.neighborhood().intersect(d),P=0;P0)for(O.unshift(I);f[_];){var N=f[_];O.unshift(N.edge),O.unshift(N.node),F=N.node,_=F.id()}return o.spawn(O)}}}},rd={kruskal:function(e){e=e||function(b){return 1};for(var t=this.byGroup(),a=t.nodes,n=t.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var E=0;E0;){if(E(),x++,w===v){for(var T=[],S=i,P=v,D=p[P];T.unshift(S),D!=null&&T.unshift(D),S=g[P],S!=null;)P=S.id(),D=p[P];return{found:!0,distance:f[w],path:this.spawn(T),steps:x}}h[w]=!0;for(var A=b._private.edges,B=0;BD&&(d[P]=D,y[P]=S,b[P]=E),!i){var A=S*v+T;!i&&d[A]>D&&(d[A]=D,y[A]=T,b[A]=E)}}}for(var B=0;B1&&arguments[1]!==void 0?arguments[1]:s,he=b(oe),ye=[],me=he;;){if(me==null)return t.spawn();var we=y(me),xe=we.edge,Pe=we.pred;if(ye.unshift(me[0]),me.same(ve)&&ye.length>0)break;xe!=null&&ye.unshift(xe),me=Pe}return l.spawn(ye)},C=0;C=0;v--){var f=u[v],c=f[1],h=f[2];(t[c]===o&&t[h]===l||t[c]===l&&t[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*t.length);t=ld(i,e,t),a--}return t},vd={kargerStein:function(){var e=this,t=this.byGroup(),a=t.nodes,n=t.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/ud);if(i<2){We("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=t;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(t,a):(a0&&e.splice(0,t));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},pd=function(e){return Math.PI*e/180},Ya=function(e,t){return Math.atan2(t,e)-Math.PI/2},ro=Math.log2||function(r){return Math.log(r)/Math.log(2)},to=function(e){return e>0?1:e<0?-1:0},Dt=function(e,t){return Math.sqrt(xt(e,t))},xt=function(e,t){var a=t.x-e.x,n=t.y-e.y;return a*a+n*n},yd=function(e){for(var t=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},bd=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},wd=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},xd=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},pv=function(e,t,a){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},un=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ln=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(t.length===1)a=n=i=s=t[0];else if(t.length===2)a=i=t[0],s=n=t[1];else if(t.length===4){var o=rr(t,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Uo=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ao=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},Qt=function(e,t,a){return e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2},Ed=function(e,t){return Qt(e,t.x,t.y)},Cd=function(e,t){return Qt(e,t.x1,t.y1)&&Qt(e,t.x2,t.y2)},Td=(gi=Math.hypot)!==null&&gi!==void 0?gi:function(r,e){return Math.sqrt(r*r+e*e)};function Sd(r,e){if(r.length<3)throw new Error("Need at least 3 vertices");var t=function(T,S){return{x:T.x+S.x,y:T.y+S.y}},a=function(T,S){return{x:T.x-S.x,y:T.y-S.y}},n=function(T,S){return{x:T.x*S,y:T.y*S}},i=function(T,S){return T.x*S.y-T.y*S.x},s=function(T){var S=Td(T.x,T.y);return S===0?{x:0,y:0}:{x:T.x/S,y:T.y/S}},o=function(T){for(var S=0,P=0;P7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?lt(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var m=a-v+u-o,g=n-f-o,p=a+v-u+o,y=g;if(d=nt(e,t,a,n,m,g,p,y,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,E=b,C=n+f-u+o;if(d=nt(e,t,a,n,b,w,E,C,!1),d.length>0)return d}if(c){var x=a-v+u-o,T=n+f+o,S=a+v-u+o,P=T;if(d=nt(e,t,a,n,x,T,S,P,!1),d.length>0)return d}if(h){var D=a-v-o,A=n-f+u-o,B=D,R=n+f-u+o;if(d=nt(e,t,a,n,D,A,B,R,!1),d.length>0)return d}var M;{var L=a-v+u,I=n-f+u;if(M=ya(e,t,a,n,L,I,u+o),M.length>0&&M[0]<=L&&M[1]<=I)return[M[0],M[1]]}{var O=a+v-u,F=n-f+u;if(M=ya(e,t,a,n,O,F,u+o),M.length>0&&M[0]>=O&&M[1]<=F)return[M[0],M[1]]}{var _=a+v-u,N=n+f-u;if(M=ya(e,t,a,n,_,N,u+o),M.length>0&&M[0]>=_&&M[1]>=N)return[M[0],M[1]]}{var q=a-v+u,U=n+f-u;if(M=ya(e,t,a,n,q,U,u+o),M.length>0&&M[0]<=q&&M[1]>=U)return[M[0],M[1]]}return[]},Dd=function(e,t,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=t&&t<=c+l},Bd=function(e,t,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||tv.y2)},Pd=function(e,t,a,n){a-=n;var i=t*t-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-t+s)/o,u=(-t-s)/o;return[l,u]},Ad=function(e,t,a,n,i){var s=1e-5;e===0&&(e=s),t/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-t*t)/9,u=-(27*n)+t*(9*a-2*(t*t)),u/=54,o=l*l*l+u*u,i[1]=0,h=t/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},Rd=function(e,t,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*t+2*s*s+2*s*t-l*t,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*t-s*t,h=[];Ad(u,v,f,c,h);for(var d=1e-7,m=[],g=0;g<6;g+=2)Math.abs(h[g+1])=0&&h[g]<=1&&m.push(h[g]);m.push(1),m.push(0);for(var p=-1,y,b,w,E=0;E=0?wu?(e-i)*(e-i)+(t-s)*(t-s):v-c},Sr=function(e,t,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>t&&u++;else continue;return u%2!==0},Zr=function(e,t,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var g=Cn(v,-u);m=En(g)}else m=v;return Sr(e,t,m)},Ld=function(e,t,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&g<=1&&y.push(g),p>=0&&p<=1&&y.push(p),y.length===0)return[];var b=y[0]*l[0]+e,w=y[0]*l[1]+t;if(y.length>1){if(y[0]==y[1])return[b,w];var E=y[1]*l[0]+e,C=y[1]*l[1]+t;return[b,w,E,C]}else return[b,w]},pi=function(e,t,a){return t<=e&&e<=a||a<=e&&e<=t?e:e<=t&&t<=a||a<=t&&t<=e?t:a},nt=function(e,t,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=t-s,d=n-t,m=l-s,g=c*h-m*v,p=f*h-d*v,y=m*f-c*d;if(y!==0){var b=g/y,w=p/y,E=.001,C=0-E,x=1+E;return C<=b&&b<=x&&C<=w&&w<=x?[e+b*f,t+b*d]:u?[e+b*f,t+b*d]:[]}else return g===0||p===0?pi(e,a,o)===o?[o,l]:pi(e,a,i)===i?[i,s]:pi(i,o,a)===a?[a,n]:[]:[]},Od=function(e,t,a,n,i){var s=[],o=n/2,l=i/2,u=t,v=a;s.push({x:u+o*e[0],y:v+l*e[1]});for(var f=1;f0){var m=Cn(f,-l);h=En(m)}else h=f}else h=a;for(var g,p,y,b,w=0;w2){for(var d=[v[0],v[1]],m=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),g=1;gv&&(v=w)},get:function(b){return u[b]}},c=0;c0?M=R.edgesTo(B)[0]:M=B.edgesTo(R)[0];var L=n(M);B=B.id(),x[B]>x[D]+L&&(x[B]=x[D]+L,T.nodes.indexOf(B)<0?T.push(B):T.updateItem(B),C[B]=0,E[B]=[]),x[B]==x[D]+L&&(C[B]=C[B]+C[D],E[B].push(D))}else for(var I=0;I0;){for(var N=w.pop(),q=0;q0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},Qd=function(e,t){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:eh,o=n,l,u,v=0;v=2?va(e,t,a,0,Qo,rh):va(e,t,a,0,Zo)},squaredEuclidean:function(e,t,a){return va(e,t,a,0,Qo)},manhattan:function(e,t,a){return va(e,t,a,0,Zo)},max:function(e,t,a){return va(e,t,a,-1/0,th)}};Jt["squared-euclidean"]=Jt.squaredEuclidean;Jt.squaredeuclidean=Jt.squaredEuclidean;function Nn(r,e,t,a,n,i){var s;return $e(r)?s=r:s=Jt[r]||Jt.euclidean,e===0&&$e(r)?s(n,i):s(e,t,a,n,i)}var ah=cr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),io=function(e){return ah(e)},Tn=function(e,t,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](t)},u=a,v=t;return Nn(e,n.length,o,l,u,v)},yi=function(e,t,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(t),l=null,u=0;ua)return!1}return!0},sh=function(e,t,a){for(var n=0;no&&(o=t[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=t[s],m=t[n[s]],g;i.mode==="dendrogram"?g={left:d,right:m,key:d.key}:g={value:d.value.concat(m.value),key:d.key},e[d.index]=g,e.splice(m.index,1),t[d.key]=g;for(var p=0;pa[m.key][y.key]&&(l=a[m.key][y.key])):i.linkage==="max"?(l=a[d.key][y.key],a[d.key][y.key]0&&n.push(i);return n},au=function(e,t,a){for(var n=[],i=0;io&&(s=u,o=t[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=au(e,t,a),n},nu=function(e){for(var t=this.cy(),a=this.nodes(),n=mh(e),i={},s=0;s=D?(A=D,D=R,B=M):R>A&&(A=R);for(var L=0;L0?1:0;x[S%n.minIterations*o+q]=U,N+=U}if(N>0&&(S>=n.minIterations-1||S==n.maxIterations-1)){for(var X=0,j=0;j1||C>1)&&(o=!0),f[b]=[],y.outgoers().forEach(function(T){T.isEdge()&&f[b].push(T.id())})}else c[b]=[void 0,y.target().id()]}):s.forEach(function(y){var b=y.id();if(y.isNode()){var w=y.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],y.connectedEdges().forEach(function(E){return f[b].push(E.id())})}else c[b]=[y.source().id(),y.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,E=[b],C,x,T;f[w].length;)C=f[w].shift(),x=c[C][0],T=c[C][1],w!=T?(f[T]=f[T].filter(function(S){return S!=C}),w=T):!i&&w!=x&&(f[x]=f[x].filter(function(S){return S!=C}),w=x),E.unshift(C),E.unshift(w);return E},m=[],g=[];for(g=d(v);g.length!=1;)f[g[0]].length==0?(m.unshift(s.getElementById(g.shift())),m.unshift(s.getElementById(g.shift()))):g=d(g.shift()).concat(g);m.unshift(s.getElementById(g.shift()));for(var p in f)if(f[p].length)return h;return h.found=!0,h.trail=this.spawn(m,!0),h}},Qa=function(){var e=this,t={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,m=[],g=e.spawn();s[d].x!=c||s[d].y!=h;)m.push(s.pop().edge),d--;m.push(s.pop().edge),m.forEach(function(p){var y=p.connectedNodes().intersection(e);g.merge(p),y.forEach(function(b){var w=b.id(),E=b.connectedEdges().intersection(e);g.merge(b),t[w].cutVertex?g.merge(E.filter(function(C){return C.isLoop()})):g.merge(E)})}),i.push(g)},u=function(c,h,d){c===d&&(n+=1),t[h]={id:a,low:a++,cutVertex:!1};var m=e.getElementById(h).connectedEdges().intersection(e);if(m.size()===0)i.push(e.spawn(e.getElementById(h)));else{var g,p,y,b;m.forEach(function(w){g=w.source().id(),p=w.target().id(),y=g===h?p:g,y!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y,edge:w})),y in t?t[h].low=Math.min(t[h].low,t[y].id):(u(c,y,h),t[h].low=Math.min(t[h].low,t[y].low),t[h].id<=t[y].low&&(t[h].cutVertex=!0,l(h,y))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in t||(n=0,u(c,c),t[c].cutVertex=n>1)}});var v=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},kh={hopcroftTarjanBiconnected:Qa,htbc:Qa,htb:Qa,hopcroftTarjanBiconnectedComponents:Qa},Ja=function(){var e=this,t={},a=0,n=[],i=[],s=e.spawn(e),o=function(u){i.push(u),t[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(m){var g=m.target().id();g!==u&&(g in t||o(g),t[g].explored||(t[u].low=Math.min(t[u].low,t[g].low)))}),t[u].index===t[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),t[c].low=t[u].index,t[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in t||o(u)}}),{cut:s,components:n}},Dh={tarjanStronglyConnected:Ja,tsc:Ja,tscc:Ja,tarjanStronglyConnectedComponents:Ja},Tv={};[Sa,ed,rd,ad,id,od,vd,qd,Kt,Xt,Rs,jd,ch,ph,Ch,Sh,kh,Dh].forEach(function(r){pe(Tv,r)});/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/var Sv=0,kv=1,Dv=2,Nr=function(e){if(!(this instanceof Nr))return new Nr(e);this.id="Thenable/1.0.7",this.state=Sv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Nr.prototype={fulfill:function(e){return iu(this,kv,"fulfillValue",e)},reject:function(e){return iu(this,Dv,"rejectReason",e)},then:function(e,t){var a=this,n=new Nr;return a.onFulfilled.push(ou(e,n,"fulfill")),a.onRejected.push(ou(t,n,"reject")),Bv(a),n.proxy}};var iu=function(e,t,a,n){return e.state===Sv&&(e.state=t,e[a]=n,Bv(e)),e},Bv=function(e){e.state===kv?su(e,"onFulfilled",e.fulfillValue):e.state===Dv&&su(e,"onRejected",e.rejectReason)},su=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}return Vi=e,Vi}var qi,Au;function Uh(){if(Au)return qi;Au=1;var r=Vn();function e(t,a){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,a])):n[i][1]=a,this}return qi=e,qi}var _i,Ru;function Kh(){if(Ru)return _i;Ru=1;var r=Gh(),e=Hh(),t=Wh(),a=$h(),n=Uh();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&a%1==0&&a0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){ze(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=t===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var a=this;if(t==null)t=250;else if(t===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},t),a}};vn.className=vn.classNames=vn.classes;var Ae={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:tr,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Ae.variable="(?:[\\w-.]|(?:\\\\"+Ae.metaChar+"))+";Ae.className="(?:[\\w-]|(?:\\\\"+Ae.metaChar+"))+";Ae.value=Ae.string+"|"+Ae.number;Ae.id=Ae.variable;(function(){var r,e,t;for(r=Ae.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(Ae.comparatorOp+="|\\!"+e)})();var Ne=function(){return{checks:[]}},ie={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Os=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return xc(r.selector,e.selector)}),Tg=function(){for(var r={},e,t=0;t0&&v.edgeCount>0)return Ie("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Ie("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Ie("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Ag=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},t=function(v){return de(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case ie.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case ie.DATA_COMPARE:{var m=v.field,g=v.operator;return"["+m+a(e(g))+t(h)+"]"}case ie.DATA_BOOL:{var p=v.operator,y=v.field;return"["+e(p)+y+"]"}case ie.DATA_EXIST:{var b=v.field;return"["+b+"]"}case ie.META_COMPARE:{var w=v.operator,E=v.field;return"[["+E+a(e(w))+t(h)+"]]"}case ie.STATE:return h;case ie.ID:return"#"+h;case ie.CLASS:return"."+h;case ie.PARENT:case ie.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case ie.ANCESTOR:case ie.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case ie.COMPOUND_SPLIT:{var C=i(v.left,f),x=i(v.subject,f),T=i(v.right,f);return C+(C.length>0?" ":"")+x+T}case ie.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),t){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return r}function Nv(r,e,t){if(t.isParent())for(var a=t._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return lo(this,r,e,Nv)};function zv(r,e,t){if(t.isChild()){var a=t._private.parent;e.has(a.id())||r.push(a)}}jt.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return lo(this,r,e,zv)};function Fg(r,e,t){zv(r,e,t),Nv(r,e,t)}jt.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return lo(this,r,e,Fg)};jt.ancestors=jt.parents;var Ba,Fv;Ba=Fv={data:Le.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Le.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Le.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Le.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Le.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Le.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Ba.attr=Ba.data;Ba.removeAttr=Ba.removeData;var Vg=Fv,_n={};function gs(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var a=0,n=t[0],i=n._private.edges,s=0;se}),minIndegree:Ot("indegree",function(r,e){return re}),minOutdegree:Ot("outdegree",function(r,e){return re})});pe(_n,{totalDegree:function(e){for(var t=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};t!==void 0?u.position(e,t+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),m=o?a.parent():null,g=m&&m.length>0,p=g;g&&(m=m[0]);var y=p?m.position():{x:0,y:0};return i={x:d.x-y.x,y:d.y-y.y},e===void 0?i:i[e]}else if(!s)return;return this}};Or.modelPosition=Or.point=Or.position;Or.modelPositions=Or.points=Or.positions;Or.renderedPoint=Or.renderedPosition;Or.relativePoint=Or.relativePosition;var qg=Vv,Yt,gt;Yt=gt={};gt.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),a=t.zoom(),n=t.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};gt.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var a=t._private;a.compoundBoundsClean=!1,a.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};gt.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(S,P,D){var A=0,B=0,R=P+D;return S>0&&R>0&&(A=P/R*S,B=D/R*S),{biasDiff:A,biasComplementDiff:B}}function d(S,P,D,A){if(D.units==="%")switch(A){case"width":return S>0?D.pfValue*S:0;case"height":return P>0?D.pfValue*P:0;case"average":return S>0&&P>0?D.pfValue*(S+P)/2:0;case"min":return S>0&&P>0?S>P?D.pfValue*P:D.pfValue*S:0;case"max":return S>0&&P>0?S>P?D.pfValue*S:D.pfValue*P:0;default:return 0}else return D.units==="px"?D.pfValue:0}var m=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(m=m*100/v.width.val);var g=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(g=g*100/v.width.val);var p=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(p=p*100/v.height.val);var y=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(y=y*100/v.height.val);var b=h(v.width.val-f.w,m,g),w=b.biasDiff,E=b.biasComplementDiff,C=h(v.height.val-f.h,p,y),x=C.biasDiff,T=C.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+E)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+T)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},tt=function(e,t){return t==null?e:Ir(e,t.x1,t.y1,t.x2,t.y2)},fa=function(e,t,a){return Tr(e,t,a)},ja=function(e,t,a){if(!t.cy().headless()){var n=t._private,i=n.rstyle,s=i.arrowWidth/2,o=t.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,un(f,1),Ir(e,f.x1,f.y1,f.x2,f.y2)}}},ps=function(e,t,a){if(!t.cy().headless()){var n;a?n=a+"-":n="";var i=t._private,s=i.rstyle,o=t.pstyle(n+"label").strValue;if(o){var l=t.pstyle("text-halign"),u=t.pstyle("text-valign"),v=fa(s,"labelWidth",a),f=fa(s,"labelHeight",a),c=fa(s,"labelX",a),h=fa(s,"labelY",a),d=t.pstyle(n+"text-margin-x").pfValue,m=t.pstyle(n+"text-margin-y").pfValue,g=t.isEdge(),p=t.pstyle(n+"text-rotation"),y=t.pstyle("text-outline-width").pfValue,b=t.pstyle("text-border-width").pfValue,w=b/2,E=t.pstyle("text-background-padding").pfValue,C=2,x=f,T=v,S=T/2,P=x/2,D,A,B,R;if(g)D=c-S,A=c+S,B=h-P,R=h+P;else{switch(l.value){case"left":D=c-T,A=c;break;case"center":D=c-S,A=c+S;break;case"right":D=c,A=c+T;break}switch(u.value){case"top":B=h-x,R=h;break;case"center":B=h-P,R=h+P;break;case"bottom":B=h,R=h+x;break}}var M=d-Math.max(y,w)-E-C,L=d+Math.max(y,w)+E+C,I=m-Math.max(y,w)-E-C,O=m+Math.max(y,w)+E+C;D+=M,A+=L,B+=I,R+=O;var F=a||"main",_=i.labelBounds,N=_[F]=_[F]||{};N.x1=D,N.y1=B,N.x2=A,N.y2=R,N.w=A-D,N.h=R-B,N.leftPad=M,N.rightPad=L,N.topPad=I,N.botPad=O;var q=g&&p.strValue==="autorotate",U=p.pfValue!=null&&p.pfValue!==0;if(q||U){var X=q?fa(i.rstyle,"labelAngle",a):p.pfValue,j=Math.cos(X),J=Math.sin(X),re=(D+A)/2,ae=(B+R)/2;if(!g){switch(l.value){case"left":re=A;break;case"right":re=D;break}switch(u.value){case"top":ae=R;break;case"bottom":ae=B;break}}var Z=function(Be,oe){return Be=Be-re,oe=oe-ae,{x:Be*j-oe*J+re,y:Be*J+oe*j+ae}},z=Z(D,B),G=Z(D,R),H=Z(A,B),Q=Z(A,R);D=Math.min(z.x,G.x,H.x,Q.x),A=Math.max(z.x,G.x,H.x,Q.x),B=Math.min(z.y,G.y,H.y,Q.y),R=Math.max(z.y,G.y,H.y,Q.y)}var ne=F+"Rot",be=_[ne]=_[ne]||{};be.x1=D,be.y1=B,be.x2=A,be.y2=R,be.w=A-D,be.h=R-B,Ir(e,D,B,A,R),Ir(i.labelBounds.all,D,B,A,R)}return e}},sl=function(e,t){if(!t.cy().headless()){var a=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value,i=t.pstyle("outline-offset").value,s=n+i;_v(e,t,a,s,"outside",s/2)}},_v=function(e,t,a,n,i,s){if(!(a===0||n<=0||i==="inside")){var o=t.cy(),l=t.pstyle("shape").value,u=o.renderer().nodeShapes[l],v=t.position(),f=v.x,c=v.y,h=t.width(),d=t.height();if(u.hasMiterBounds){i==="center"&&(n/=2);var m=u.miterBounds(f,c,h,d,n);tt(e,m)}else s!=null&&s>0&&ln(e,[s,s,s,s])}},_g=function(e,t){if(!t.cy().headless()){var a=t.pstyle("border-opacity").value,n=t.pstyle("border-width").pfValue,i=t.pstyle("border-position").value;_v(e,t,a,n,i)}},Gg=function(e,t){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=wr(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,m,g=o.rstyle,p=l&&n?e.pstyle("bounds-expansion").pfValue:[0],y=function(Fe){return Fe.pstyle("display").value!=="none"},b=!n||y(e)&&(!u||y(e.source())&&y(e.target()));if(b){var w=0,E=0;n&&t.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(E=e.pstyle("overlay-padding").value));var C=0,x=0;n&&t.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(x=e.pstyle("underlay-padding").value));var T=Math.max(E,x),S=0,P=0;if(n&&(S=e.pstyle("width").pfValue,P=S/2),l&&t.includeNodes){var D=e.position();d=D.x,m=D.y;var A=e.outerWidth(),B=A/2,R=e.outerHeight(),M=R/2;v=d-B,f=d+B,c=m-M,h=m+M,Ir(s,v,c,f,h),n&&sl(s,e),n&&t.includeOutlines&&!i&&sl(s,e),n&&_g(s,e)}else if(u&&t.includeEdges)if(n&&!i){var L=e.pstyle("curve-style").strValue;if(v=Math.min(g.srcX,g.midX,g.tgtX),f=Math.max(g.srcX,g.midX,g.tgtX),c=Math.min(g.srcY,g.midY,g.tgtY),h=Math.max(g.srcY,g.midY,g.tgtY),v-=P,f+=P,c-=P,h+=P,Ir(s,v,c,f,h),L==="haystack"){var I=g.haystackPts;if(I&&I.length===2){if(v=I[0].x,c=I[0].y,f=I[1].x,h=I[1].y,v>f){var O=v;v=f,f=O}if(c>h){var F=c;c=h,h=F}Ir(s,v-P,c-P,f+P,h+P)}}else if(L==="bezier"||L==="unbundled-bezier"||at(L,"segments")||at(L,"taxi")){var _;switch(L){case"bezier":case"unbundled-bezier":_=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":_=g.linePts;break}if(_!=null)for(var N=0;N<_.length;N++){var q=_[N];v=q.x-P,f=q.x+P,c=q.y-P,h=q.y+P,Ir(s,v,c,f,h)}}}else{var U=e.source(),X=U.position(),j=e.target(),J=j.position();if(v=X.x,f=J.x,c=X.y,h=J.y,v>f){var re=v;v=f,f=re}if(c>h){var ae=c;c=h,h=ae}v-=P,f+=P,c-=P,h+=P,Ir(s,v,c,f,h)}if(n&&t.includeEdges&&u&&(ja(s,e,"mid-source"),ja(s,e,"mid-target"),ja(s,e,"source"),ja(s,e,"target")),n){var Z=e.pstyle("ghost").value==="yes";if(Z){var z=e.pstyle("ghost-offset-x").pfValue,G=e.pstyle("ghost-offset-y").pfValue;Ir(s,s.x1+z,s.y1+G,s.x2+z,s.y2+G)}}var H=o.bodyBounds=o.bodyBounds||{};Uo(H,s),ln(H,p),un(H,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,Ir(s,v-T,c-T,f+T,h+T));var Q=o.overlayBounds=o.overlayBounds||{};Uo(Q,s),ln(Q,p),un(Q,1);var ne=o.labelBounds=o.labelBounds||{};ne.all!=null?wd(ne.all):ne.all=wr(),n&&t.includeLabels&&(t.includeMainLabels&&ps(s,e,null),u&&(t.includeSourceLabels&&ps(s,e,"source"),t.includeTargetLabels&&ps(s,e,"target")))}return s.x1=Ar(s.x1),s.y1=Ar(s.y1),s.x2=Ar(s.x2),s.y2=Ar(s.y2),s.w=Ar(s.x2-s.x1),s.h=Ar(s.y2-s.y1),s.w>0&&s.h>0&&b&&(ln(s,p),un(s,1)),s},Gv=function(e){var t=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:ap,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;o--)s(o);return this};ct.removeAllListeners=function(){return this.removeListener("*")};ct.emit=ct.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,ze(e)||(e=[e]),np(this,function(i,s){t!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:t}],n=a.length);for(var o=function(){var v=a[l];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===tp)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&$c(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,a=e._private.data.id,n=t.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&de(e)){var a=e;e=t.mutableElements().filter(a)}for(var n=0;n=0;t--){var a=this[t];e(a)&&this.unmergeAt(t)}return this},map:function(e,t){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,t){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":ar(Symbol))!=e&&ar(Symbol.iterator)!=e;t&&(Sn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Zl({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(t?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var a=t.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=this[0];if(a)return t.style().getRenderedStyle(a,e)},style:function(e,t){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(Re(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(de(e))if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,t,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=!1,n=t.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});gr.neighbourhood=gr.neighborhood;gr.closedNeighbourhood=gr.closedNeighborhood;gr.openNeighbourhood=gr.openNeighborhood;pe(gr,{source:Rr(function(e){var t=this[0],a;return t&&(a=t._private.source||t.cy().collection()),a&&e?a.filter(e):a},"source"),target:Rr(function(e){var t=this[0],a;return t&&(a=t._private.target||t.cy().collection()),a&&e?a.filter(e):a},"target"),sources:yl({attr:"source"}),targets:yl({attr:"target"})});function yl(r){return function(t){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});gr.componentsOf=gr.components;var fr=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){We("A collection must have a reference to the core");return}var i=new Xr,s=!1;if(!t)t=[];else if(t.length>0&&Re(t[0])&&!Ia(t[0])){s=!0;for(var o=[],l=new ra,u=0,v=t.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=t.cy(),n=a._private,i=[],s=[],o,l=0,u=t.length;l0){for(var F=o.length===t.length?t:new fr(a,o),_=0;_0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=[],n={},i=t._private.cy;function s(R){for(var M=R._private.edges,L=0;L0&&(r?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var A=0;A0?A=R:D=R;while(Math.abs(B)>s&&++M=i?y(P,M):L===0?M:w(P,D,D+u)}var C=!1;function x(){C=!0,(r!==e||t!==a)&&b()}var T=function(D){return C||x(),r===e&&t===a?D:D===0?0:D===1?1:g(E(D),e,a)};T.getControlPoints=function(){return[{x:r,y:e},{x:t,y:a}]};var S="generateBezier("+[r,e,t,a]+")";return T.toString=function(){return S},T}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var gp=function(){function r(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:r(s)}}function t(a,n){var i={dx:a.v,dv:r(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=t(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(m){return l[m*(l.length-1)|0]}:u}}(),qe=function(e,t,a,n){var i=hp(e,t,a,n);return function(s,o,l){return s+(o-s)*i(l)}},cn={linear:function(e,t,a){return e+(t-e)*a},ease:qe(.25,.1,.25,1),"ease-in":qe(.42,0,1,1),"ease-out":qe(0,0,.58,1),"ease-in-out":qe(.42,0,.58,1),"ease-in-sine":qe(.47,0,.745,.715),"ease-out-sine":qe(.39,.575,.565,1),"ease-in-out-sine":qe(.445,.05,.55,.95),"ease-in-quad":qe(.55,.085,.68,.53),"ease-out-quad":qe(.25,.46,.45,.94),"ease-in-out-quad":qe(.455,.03,.515,.955),"ease-in-cubic":qe(.55,.055,.675,.19),"ease-out-cubic":qe(.215,.61,.355,1),"ease-in-out-cubic":qe(.645,.045,.355,1),"ease-in-quart":qe(.895,.03,.685,.22),"ease-out-quart":qe(.165,.84,.44,1),"ease-in-out-quart":qe(.77,0,.175,1),"ease-in-quint":qe(.755,.05,.855,.06),"ease-out-quint":qe(.23,1,.32,1),"ease-in-out-quint":qe(.86,0,.07,1),"ease-in-expo":qe(.95,.05,.795,.035),"ease-out-expo":qe(.19,1,.22,1),"ease-in-out-expo":qe(1,0,0,1),"ease-in-circ":qe(.6,.04,.98,.335),"ease-out-circ":qe(.075,.82,.165,1),"ease-in-out-circ":qe(.785,.135,.15,.86),spring:function(e,t,a){if(a===0)return cn.linear;var n=gp(e,t,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":qe};function wl(r,e,t,a,n){if(a===1||e===t)return t;var i=n(e,t,a);return r==null||((r.roundValue||r.color)&&(i=Math.round(i)),r.min!==void 0&&(i=Math.max(i,r.min)),r.max!==void 0&&(i=Math.min(i,r.max))),i}function xl(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Nt(r,e,t,a,n){var i=n!=null?n.type:null;t<0?t=0:t>1&&(t=1);var s=xl(r,n),o=xl(e,n);if(te(s)&&te(o))return wl(i,s,o,t,a);if(ze(s)&&ze(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=cn[h].apply(null,d)):s.easingImpl=cn[h]}var m=s.easingImpl,g;if(s.duration===0?g=1:g=(t-l)/s.duration,s.applying&&(g=s.progress),g<0?g=0:g>1&&(g=1),s.delay==null){var p=s.startPosition,y=s.position;if(y&&n&&!r.locked()){var b={};da(p.x,y.x)&&(b.x=Nt(p.x,y.x,g,m)),da(p.y,y.y)&&(b.y=Nt(p.y,y.y,g,m)),r.position(b)}var w=s.startPan,E=s.pan,C=i.pan,x=E!=null&&a;x&&(da(w.x,E.x)&&(C.x=Nt(w.x,E.x,g,m)),da(w.y,E.y)&&(C.y=Nt(w.y,E.y,g,m)),r.emit("pan"));var T=s.startZoom,S=s.zoom,P=S!=null&&a;P&&(da(T,S)&&(i.zoom=ka(i.minZoom,Nt(T,S,g,m),i.maxZoom)),r.emit("zoom")),(x||P)&&r.emit("viewport");var D=s.style;if(D&&D.length>0&&n){for(var A=0;A=0;x--){var T=C[x];T()}C.splice(0,C.length)},y=h.length-1;y>=0;y--){var b=h[y],w=b._private;if(w.stopped){h.splice(y,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||yp(v,b,r),pp(v,b,r,f),w.applying&&(w.applying=!1),p(w.frames),w.step!=null&&w.step(r),b.completed()&&(h.splice(y,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.completes)),m=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),m}for(var i=!1,s=0;s0?e.notify("draw",t):e.notify("draw")),t.unmerge(a),e.emit("step")}var mp={animate:Le.animate(),animation:Le.animation(),animated:Le.animated(),clearQueue:Le.clearQueue(),delay:Le.delay(),delayAnimation:Le.delayAnimation(),stop:Le.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&wn(function(i){El(i,e),t()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){El(s,e)},a.beforeRenderPriorities.animations):t()}},bp={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&Ia(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e}},tn=function(e){return de(e)?new vt(e):e},jv={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Gn(bp,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,a){return this.emitter().on(e,tn(t),a),this},removeListener:function(e,t,a){return this.emitter().removeListener(e,tn(t),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,a){return this.emitter().one(e,tn(t),a),this},once:function(e,t,a){return this.emitter().one(e,tn(t),a),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Le.eventAliasesOn(jv);var zs={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};zs.jpeg=zs.jpg;var dn={layout:function(e){var t=this;if(e==null){We("Layout options must be specified to make a layout");return}if(e.name==null){We("A `name` must be specified to make a layout");return}var a=e.name,n=t.extension("layout",a);if(n==null){We("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;de(e.eles)?i=t.$(e.eles):i=e.eles!=null?e.eles:t.$();var s=new n(pe({},e,{cy:t,eles:i}));return s}};dn.createLayout=dn.makeLayout=dn.layout;var wp={notify:function(e,t){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();t!=null&&n.merge(t);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?t.notify(a):t.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Fs.invalidateDimensions=Fs.resize;var hn={collection:function(e,t){return de(e)?this.$(e):Dr(e)?e.collection():ze(e)?(t||(t={}),new fr(this,e,t.unique,t.removed)):new fr(this)},nodes:function(e){var t=this.$(function(a){return a.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(a){return a.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};hn.elements=hn.filter=hn.$;var ur={},wa="t",Ep="f";ur.apply=function(r){for(var e=this,t=e._private,a=t.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var m=0;m1&&(w=1),o.color){var C=a.valueMin[0],x=a.valueMax[0],T=a.valueMin[1],S=a.valueMax[1],P=a.valueMin[2],D=a.valueMax[2],A=a.valueMin[3]==null?1:a.valueMin[3],B=a.valueMax[3]==null?1:a.valueMax[3],R=[Math.round(C+(x-C)*w),Math.round(T+(S-T)*w),Math.round(P+(D-P)*w),Math.round(A+(B-A)*w)];i={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(o.number){var M=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,M,a.bypass,c)}else return!1;if(!i)return m(),!1;i.mapping=a,a=i;break}case s.data:{for(var L=a.field.split("."),I=f.data,O=0;O0&&i>0){for(var o={},l=!1,u=0;u0?r.delayAnimation(s).play().promise().then(b):b()}).then(function(){return r.animation({style:o,duration:i,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1)};ur.checkTrigger=function(r,e,t,a,n,i){var s=this.properties[e],o=n(s);r.removed()||o!=null&&o(t,a,r)&&i(s)};ur.checkZOrderTrigger=function(r,e,t,a){var n=this;this.checkTrigger(r,e,t,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",r)})};ur.checkBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBounds},function(n){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})};ur.checkConnectedEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfConnectedEdges},function(n){r.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};ur.checkParallelEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfParallelEdges},function(n){r.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};ur.checkTriggers=function(r,e,t,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,a),this.checkBoundsTrigger(r,e,t,a),this.checkConnectedEdgesBoundsTrigger(r,e,t,a),this.checkParallelEdgesBoundsTrigger(r,e,t,a)};var _a={};_a.applyBypass=function(r,e,t,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Ie("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new vt(f);if(c.invalid){Ie("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var m=[];;){var g=i.match(/^\s*$/);if(g)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Ie("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=p[0];var y=p[1],b=p[2],w=e.properties[y];if(!w){Ie("Skipping property: Invalid property name in: "+s),l();continue}var E=t.parse(y,b);if(!E){Ie("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:y,val:b}),l()}if(d){o();break}t.selector(f);for(var C=0;C=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(t)return!1;var c=o.data;return{name:r,value:v,strValue:""+e,mapped:c,field:v[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(t||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(r,f[4]);if(!d||d.mapped)return!1;var m=this.parse(r,f[5]);if(!m||m.mapped)return!1;if(d.pfValue===m.pfValue||d.strValue===m.strValue)return Ie("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+d.strValue+"`"),this.parse(r,d.strValue);if(u.color){var g=d.value,p=m.value,y=g[0]===p[0]&&g[1]===p[1]&&g[2]===p[2]&&(g[3]===p[3]||(g[3]==null||g[3]===1)&&(p[3]==null||p[3]===1));if(y)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:m.value,bypass:t}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):ze(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],E=[],C=[],x="",T=!1,S=0;S0?" ":"")+P.strValue}return u.validate&&!u.validate(w,E)?null:u.singleEnum&&T?w.length===1&&de(w[0])?{name:r,value:w[0],strValue:w[0],bypass:t}:null:{name:r,value:w,pfValue:C,strValue:x,bypass:t,units:E}}var D=function(){for(var Z=0;Zu.max||u.strictMax&&e===u.max))return null;var L={name:r,value:e,strValue:""+e+(A||""),units:A,bypass:t};return u.unitless||A!=="px"&&A!=="em"?L.pfValue=e:L.pfValue=A==="px"||!A?e:this.getEmSizeInPixels()*e,(A==="ms"||A==="s")&&(L.pfValue=A==="ms"?e:1e3*e),(A==="deg"||A==="rad")&&(L.pfValue=A==="rad"?e:pd(e)),A==="%"&&(L.pfValue=e/100),L}else if(u.propList){var I=[],O=""+e;if(O!=="none"){for(var F=O.split(/\s*,\s*|\s+/),_=0;_0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*t)/a.w,(o-2*t)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,a=t.pan,n=t.zoom,i,s,o=!1;if(t.zoomingEnabled||(o=!0),te(e)?s=e:Re(e)&&(s=e.level,e.position!=null?i=On(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!t.panningEnabled&&(o=!0)),s=s>t.maxZoom?t.maxZoom:s,s=st.maxZoom||!t.zoomingEnabled?s=!0:(t.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;te(u.x)&&(t.pan.x=u.x,o=!1),te(u.y)&&(t.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(de(e)){var a=e;e=this.mutableElements().filter(a)}else Dr(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();t=t===void 0?this._private.zoom:t;var o={x:(i-t*(n.x1+n.x2))/2,y:(s-t*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,a=this;return e.sizeCache=e.sizeCache||(t?function(){var n=a.window().getComputedStyle(t),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:t.clientWidth-i("padding-left")-i("padding-right"),height:t.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/t,x2:(a.x2-e.x)/t,y1:(a.y1-e.y)/t,y2:(a.y2-e.y)/t};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Pt.centre=Pt.center;Pt.autolockNodes=Pt.autolock;Pt.autoungrabifyNodes=Pt.autoungrabify;var Aa={data:Le.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Le.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Le.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Le.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Aa.attr=Aa.data;Aa.removeAttr=Aa.removeData;var Ra=function(e){var t=this;e=pe({},e);var a=e.container;a&&!bn(a)&&bn(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=t;var s=er!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=pe({name:s?"grid":"null"},o.layout),o.renderer=pe({name:s?"canvas":"null"},o.renderer);var l=function(d,m,g){return m!==void 0?m:g!==void 0?g:d},u=this._private={container:a,ready:!1,options:o,elements:new fr(this),listeners:[],aniEles:new fr(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:te(o.zoom)?o.zoom:1,pan:{x:Re(o.pan)&&te(o.pan.x)?o.pan.x:0,y:Re(o.pan)&&te(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,m){var g=d.some(dc);if(g)return ta.all(d).then(m);m(d)};u.styleEnabled&&t.setStyle([]);var f=pe({},o,o.renderer);t.initRenderer(f);var c=function(d,m,g){t.notifications(!1);var p=t.mutableElements();p.length>0&&p.remove(),d!=null&&(Re(d)||ze(d))&&t.add(d),t.one("layoutready",function(b){t.notifications(!0),t.emit(b),t.one("load",m),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",g),t.emit("done")});var y=pe({},t._private.options.layout);y.eles=t.elements(),t.layout(y).run()};v([o.style,o.elements],function(h){var d=h[0],m=h[1];u.styleEnabled&&t.style().append(d),c(m,function(){t.startAnimationLoop(),u.ready=!0,$e(o.ready)&&t.on("ready",o.ready);for(var g=0;g0,o=!!r.boundingBox,l=e.extent(),u=wr(o?r.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),v;if(Dr(r.roots))v=r.roots;else if(ze(r.roots)){for(var f=[],c=0;c0;){var M=R(),L=P(M,A);if(L)M.outgoers().filter(function(oe){return oe.isNode()&&t.has(oe)}).forEach(B);else if(L===null){Ie("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(r.avoidOverlap)for(var O=0;O0&&y[0].length<=3?we/2:0),Pe=2*Math.PI/y[ye].length*me;return ye===0&&y[0].length===1&&(xe=1),{x:Q.x+xe*Math.cos(Pe),y:Q.y+xe*Math.sin(Pe)}}else{var Ve=y[ye].length,Xe=Math.max(Ve===1?0:o?(u.w-r.padding*2-ne.w)/((r.grid?Fe:Ve)-1):(u.w-r.padding*2-ne.w)/((r.grid?Fe:Ve)+1),I),Oe={x:Q.x+(me+1-(Ve+1)/2)*Xe,y:Q.y+(ye+1-(J+1)/2)*be};return Oe}};return t.nodes().layoutPositions(this,r,Be),this};var Dp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function rf(r){this.options=pe({},Dp,r)}rf.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=wr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var p=Math.cos(u)-Math.cos(0),y=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(p*p+y*y));v=Math.max(b,v)}var w=function(C,x){var T=e.startAngle+x*u*(n?1:-1),S=v*Math.cos(T),P=v*Math.sin(T),D={x:o.x+S,y:o.y+P};return D};return a.nodes().layoutPositions(this,e,w),this};var Bp={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function tf(r){this.options=pe({},Bp,r)}tf.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=r.cy,n=e.eles,i=n.nodes().not(":parent"),s=wr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var E=Math.abs(y[0].value-w.value);E>=g&&(y=[],p.push(y))}y.push(w)}var C=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=p.length>0&&p[0].length>1,T=Math.min(s.w,s.h)/2-C,S=T/(p.length+x?1:0);C=Math.min(C,S)}for(var P=0,D=0;D1&&e.avoidOverlap){var M=Math.cos(R)-Math.cos(0),L=Math.sin(R)-Math.sin(0),I=Math.sqrt(C*C/(M*M+L*L));P=Math.max(I,P)}A.r=P,P+=C}if(e.equidistant){for(var O=0,F=0,_=0;_=r.numIter||(Op(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature=r.animationThreshold&&i(),wn(v)}};v()}else{for(;u;)u=s(l),l++;Sl(a,r),o()}return this};Kn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Kn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Ap=function(e,t,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=wr(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(T);for(var v=0;vn.count?0:n.graph},af=function(e,t,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var m=Dn(e,o,l),g=Dn(t,-1*o,-1*l),p=g.x-m.x,y=g.y-m.y,b=p*p+y*y,c=Math.sqrt(b),f=(e.nodeRepulsion+t.nodeRepulsion)/b,h=f*p/c,d=f*y/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),t.isLocked||(t.offsetX+=h,t.offsetY+=d)}},Fp=function(e,t,a,n){if(a>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(n>0)var s=e.maxY-t.minY;else var s=t.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},Dn=function(e,t,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/t,u=s/o,v={};return t===0&&0a?(v.x=n,v.y=i+s/2,v):0t&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/t,v):0=u)?(v.x=n+s*t/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*t/2/a,v.y=i-s/2),v)},Vp=function(e,t){for(var a=0;aa){var g=t.gravity*h/m,p=t.gravity*d/m;c.offsetX+=g,c.offsetY+=p}}}}},_p=function(e,t){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*t/n};else var i={x:e,y:t};return i},sf=function(e,t){var a=e.parentId;if(a!=null){var n=t.layoutNodes[t.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopp&&(d+=g+t.componentSpacing,h=0,m=0,g=0)}}},Wp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function of(r){this.options=pe({},Wp,r)}of.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=wr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(U){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(X){if(X==null)return Math.min(l,u);var j=Math.min(l,u);j==l?l=X:u=X},f=function(X){if(X==null)return Math.max(l,u);var j=Math.max(l,u);j==l?l=X:u=X},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),m=f();(d-1)*m>=s?v(d-1):(m-1)*d>=s&&f(m-1)}else for(;u*l=s?f(p+1):v(g+1)}var y=i.w/u,b=i.h/l;if(e.condense&&(y=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(M=0,R++)},I={},O=0;O(M=Md(r,e,L[I],L[I+1],L[I+2],L[I+3])))return g(x,M),!0}else if(S.edgeType==="bezier"||S.edgeType==="multibezier"||S.edgeType==="self"||S.edgeType==="compound"){for(var L=S.allpts,I=0;I+5(M=Rd(r,e,L[I],L[I+1],L[I+2],L[I+3],L[I+4],L[I+5])))return g(x,M),!0}for(var O=O||T.source,F=F||T.target,_=n.getArrowWidth(P,D),N=[{name:"source",x:S.arrowStartX,y:S.arrowStartY,angle:S.srcArrowAngle},{name:"target",x:S.arrowEndX,y:S.arrowEndY,angle:S.tgtArrowAngle},{name:"mid-source",x:S.midX,y:S.midY,angle:S.midsrcArrowAngle},{name:"mid-target",x:S.midX,y:S.midY,angle:S.midtgtArrowAngle}],I=0;I0&&(p(O),p(F))}function b(x,T,S){return Tr(x,T,S)}function w(x,T){var S=x._private,P=c,D;T?D=T+"-":D="",x.boundingBox();var A=S.labelBounds[T||"main"],B=x.pstyle(D+"label").value,R=x.pstyle("text-events").strValue==="yes";if(!(!R||!B)){var M=b(S.rscratch,"labelX",T),L=b(S.rscratch,"labelY",T),I=b(S.rscratch,"labelAngle",T),O=x.pstyle(D+"text-margin-x").pfValue,F=x.pstyle(D+"text-margin-y").pfValue,_=A.x1-P-O,N=A.x2+P-O,q=A.y1-P-F,U=A.y2+P-F;if(I){var X=Math.cos(I),j=Math.sin(I),J=function(Q,ne){return Q=Q-M,ne=ne-L,{x:Q*X-ne*j+M,y:Q*j+ne*X+L}},re=J(_,q),ae=J(_,U),Z=J(N,q),z=J(N,U),G=[re.x+O,re.y+F,Z.x+O,Z.y+F,z.x+O,z.y+F,ae.x+O,ae.y+F];if(Sr(r,e,G))return g(x),!0}else if(Qt(A,r,e))return g(x),!0}}for(var E=s.length-1;E>=0;E--){var C=s[E];C.isNode()?p(C)||w(C):y(C)||w(C)||w(C,"source")||w(C,"target")}return o};Rt.getAllInBox=function(r,e,t,a){var n=this.getCachedZSortedEles().interactive,i=this.cy.zoom(),s=2/i,o=[],l=Math.min(r,t),u=Math.max(r,t),v=Math.min(e,a),f=Math.max(e,a);r=l,t=u,e=v,a=f;var c=wr({x1:r,y1:e,x2:t,y2:a});function h(B,R,M){return Tr(B,R,M)}function d(B,R){var M=B._private,L=s,I="";B.boundingBox();var O=M.labelBounds.main;if(!O)return null;var F=h(M.rscratch,"labelX",R),_=h(M.rscratch,"labelY",R),N=h(M.rscratch,"labelAngle",R),q=B.pstyle(I+"text-margin-x").pfValue,U=B.pstyle(I+"text-margin-y").pfValue,X=O.x1-L-q,j=O.x2+L-q,J=O.y1-L-U,re=O.y2+L-U;if(N){var ae=Math.cos(N),Z=Math.sin(N),z=function(H,Q){return H=H-F,Q=Q-_,{x:H*ae-Q*Z+F,y:H*Z+Q*ae+_}};return[z(X,J),z(j,J),z(j,re),z(X,re)]}else return[{x:X,y:J},{x:j,y:J},{x:j,y:re},{x:X,y:re}]}for(var m=0;m0?-(Math.PI-e.ang):Math.PI+e.ang},Zp=function(e,t,a,n,i){if(e!==Al?Rl(t,e,Vr):Yp(Pr,Vr),Rl(t,a,Pr),Bl=Vr.nx*Pr.ny-Vr.ny*Pr.nx,Pl=Vr.nx*Pr.nx-Vr.ny*-Pr.ny,Ur=Math.asin(Math.max(-1,Math.min(1,Bl))),Math.abs(Ur)<1e-6){Vs=t.x,qs=t.y,Et=Ft=0;return}Tt=1,gn=!1,Pl<0?Ur<0?Ur=Math.PI+Ur:(Ur=Math.PI-Ur,Tt=-1,gn=!0):Ur>0&&(Tt=-1,gn=!0),t.radius!==void 0?Ft=t.radius:Ft=n,bt=Ur/2,an=Math.min(Vr.len/2,Pr.len/2),i?(zr=Math.abs(Math.cos(bt)*Ft/Math.sin(bt)),zr>an?(zr=an,Et=Math.abs(zr*Math.sin(bt)/Math.cos(bt))):Et=Ft):(zr=Math.min(an,Ft),Et=Math.abs(zr*Math.sin(bt)/Math.cos(bt))),_s=t.x+Pr.nx*zr,Gs=t.y+Pr.ny*zr,Vs=_s-Pr.ny*Et*Tt,qs=Gs+Pr.nx*Et*Tt,ff=t.x+Vr.nx*zr,cf=t.y+Vr.ny*zr,Al=t};function df(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function po(r,e,t,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Zp(r,e,t,a,n),{cx:Vs,cy:qs,radius:Et,startX:ff,startY:cf,stopX:_s,stopY:Gs,startAngle:Vr.ang+Math.PI/2*Tt,endAngle:Pr.ang-Math.PI/2*Tt,counterClockwise:gn})}var Ma=.01,Qp=Math.sqrt(2*Ma),yr={};yr.findMidptPtsEtc=function(r,e){var t=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=r.pstyle("source-endpoint"),o=r.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(E,C,x,T){var S=T-C,P=x-E,D=Math.sqrt(P*P+S*S);return{x:-S/D,y:P/D}},v=r.pstyle("edge-distances").value;switch(v){case"node-position":i=t;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(r.source()[0],s),c=rr(f,2),h=c[0],d=c[1],m=this.manualEndptToPx(r.target()[0],o),g=rr(m,2),p=g[0],y=g[1],b={x1:h,y1:d,x2:p,y2:y};n=u(h,d,p,y),i=b}else Ie("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};yr.findHaystackPoints=function(r){for(var e=0;e0?Math.max(k-V,0):Math.min(k+V,0)},B=A(P,T),R=A(D,S),M=!1;y===u?p=Math.abs(B)>Math.abs(R)?n:a:y===l||y===o?(p=a,M=!0):(y===i||y===s)&&(p=n,M=!0);var L=p===a,I=L?R:B,O=L?D:P,F=to(O),_=!1;!(M&&(w||C))&&(y===o&&O<0||y===l&&O>0||y===i&&O>0||y===s&&O<0)&&(F*=-1,I=F*Math.abs(I),_=!0);var N;if(w){var q=E<0?1+E:E;N=q*I}else{var U=E<0?I:0;N=U+E*F}var X=function(k){return Math.abs(k)=Math.abs(I)},j=X(N),J=X(Math.abs(I)-Math.abs(N)),re=j||J;if(re&&!_)if(L){var ae=Math.abs(O)<=c/2,Z=Math.abs(P)<=h/2;if(ae){var z=(v.x1+v.x2)/2,G=v.y1,H=v.y2;t.segpts=[z,G,z,H]}else if(Z){var Q=(v.y1+v.y2)/2,ne=v.x1,be=v.x2;t.segpts=[ne,Q,be,Q]}else t.segpts=[v.x1,v.y2]}else{var Fe=Math.abs(O)<=f/2,Be=Math.abs(D)<=d/2;if(Fe){var oe=(v.y1+v.y2)/2,ve=v.x1,he=v.x2;t.segpts=[ve,oe,he,oe]}else if(Be){var ye=(v.x1+v.x2)/2,me=v.y1,we=v.y2;t.segpts=[ye,me,ye,we]}else t.segpts=[v.x2,v.y1]}else if(L){var xe=v.y1+N+(g?c/2*F:0),Pe=v.x1,Ve=v.x2;t.segpts=[Pe,xe,Ve,xe]}else{var Xe=v.x1+N+(g?f/2*F:0),Oe=v.y1,He=v.y2;t.segpts=[Xe,Oe,Xe,He]}if(t.isRound){var ke=r.pstyle("taxi-radius").value,ue=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(ke),t.isArcRadius=new Array(t.segpts.length/2).fill(ue)}};yr.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,m=!te(t.startX)||!te(t.startY),g=!te(t.arrowStartX)||!te(t.arrowStartY),p=!te(t.endX)||!te(t.endY),y=!te(t.arrowEndX)||!te(t.arrowEndY),b=3,w=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,E=b*w,C=Dt({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),x=CO.poolIndex()){var F=I;I=O,O=F}var _=B.srcPos=I.position(),N=B.tgtPos=O.position(),q=B.srcW=I.outerWidth(),U=B.srcH=I.outerHeight(),X=B.tgtW=O.outerWidth(),j=B.tgtH=O.outerHeight(),J=B.srcShape=t.nodeShapes[e.getNodeShape(I)],re=B.tgtShape=t.nodeShapes[e.getNodeShape(O)],ae=B.srcCornerRadius=I.pstyle("corner-radius").value==="auto"?"auto":I.pstyle("corner-radius").pfValue,Z=B.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,z=B.tgtRs=O._private.rscratch,G=B.srcRs=I._private.rscratch;B.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var H=0;H=Qp||(Ve=Math.sqrt(Math.max(Pe*Pe,Ma)+Math.max(xe*xe,Ma)));var Xe=B.vector={x:Pe,y:xe},Oe=B.vectorNorm={x:Xe.x/Ve,y:Xe.y/Ve},He={x:-Oe.y,y:Oe.x};B.nodesOverlap=!te(Ve)||re.checkPoint(oe[0],oe[1],0,X,j,N.x,N.y,Z,z)||J.checkPoint(he[0],he[1],0,q,U,_.x,_.y,ae,G),B.vectorNormInverse=He,R={nodesOverlap:B.nodesOverlap,dirCounts:B.dirCounts,calculatedIntersection:!0,hasBezier:B.hasBezier,hasUnbundled:B.hasUnbundled,eles:B.eles,srcPos:N,srcRs:z,tgtPos:_,tgtRs:G,srcW:X,srcH:j,tgtW:q,tgtH:U,srcIntn:ye,tgtIntn:ve,srcShape:re,tgtShape:J,posPts:{x1:we.x2,y1:we.y2,x2:we.x1,y2:we.y1},intersectionPts:{x1:me.x2,y1:me.y2,x2:me.x1,y2:me.y1},vector:{x:-Xe.x,y:-Xe.y},vectorNorm:{x:-Oe.x,y:-Oe.y},vectorNormInverse:{x:-He.x,y:-He.y}}}var ke=Be?R:B;ne.nodesOverlap=ke.nodesOverlap,ne.srcIntn=ke.srcIntn,ne.tgtIntn=ke.tgtIntn,ne.isRound=be.startsWith("round"),n&&(I.isParent()||I.isChild()||O.isParent()||O.isChild())&&(I.parents().anySame(O)||O.parents().anySame(I)||I.same(O)&&I.isParent())?e.findCompoundLoopPoints(Q,ke,H,Fe):I===O?e.findLoopPoints(Q,ke,H,Fe):be.endsWith("segments")?e.findSegmentsPoints(Q,ke):be.endsWith("taxi")?e.findTaxiPoints(Q,ke):be==="straight"||!Fe&&B.eles.length%2===1&&H===Math.floor(B.eles.length/2)?e.findStraightEdgePoints(Q):e.findBezierPoints(Q,ke,H,Fe,Be),e.findEndpoints(Q),e.tryToCorrectInvalidPoints(Q,ke),e.checkForInvalidEdgeWarning(Q),e.storeAllpts(Q),e.storeEdgeProjections(Q),e.calculateArrowAngles(Q),e.recalculateEdgeLabelProjections(Q),e.calculateLabelAngles(Q)}},x=0;x0){var oe=u,ve=xt(oe,Ht(s)),he=xt(oe,Ht(Be)),ye=ve;if(he2){var me=xt(oe,{x:Be[2],y:Be[3]});me0){var W=v,$=xt(W,Ht(s)),K=xt(W,Ht(V)),se=$;if(K<$&&(s=[V[0],V[1]],se=K),V.length>2){var ee=xt(W,{x:V[2],y:V[3]});ee=d||x){g={cp:w,segment:C};break}}if(g)break}var T=g.cp,S=g.segment,P=(d-p)/S.length,D=S.t1-S.t0,A=h?S.t0+D*P:S.t1-D*P;A=ka(0,A,1),e=Ut(T.p0,T.p1,T.p2,A),c=jp(T.p0,T.p1,T.p2,A);break}case"straight":case"segments":case"haystack":{for(var B=0,R,M,L,I,O=a.allpts.length,F=0;F+3=d));F+=2);var _=d-M,N=_/R;N=ka(0,N,1),e=md(L,I,N),c=pf(L,I);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(r)}};Gr.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Gr.applyPrefixedLabelDimensions=function(r,e){var t=r._private,a=this.getLabelText(r,e),n=kt(a,r._private.labelDimsKey);if(Tr(t.rscratch,"prefixedLabelDimsKey",e)!==n){Kr(t.rscratch,"prefixedLabelDimsKey",e,n);var i=this.calculateLabelDimensions(r,a),s=r.pstyle("line-height").pfValue,o=r.pstyle("text-wrap").strValue,l=Tr(t.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),v=i.height/u,f=v*s,c=i.width,h=i.height+(u-1)*(s-1)*v;Kr(t.rstyle,"labelWidth",e,c),Kr(t.rscratch,"labelWidth",e,c),Kr(t.rstyle,"labelHeight",e,h),Kr(t.rscratch,"labelHeight",e,h),Kr(t.rscratch,"labelLineHeight",e,f)}};Gr.getLabelText=function(r,e){var t=r._private,a=e?e+"-":"",n=r.pstyle(a+"label").strValue,i=r.pstyle("text-transform").value,s=function(U,X){return X?(Kr(t.rscratch,U,e,X),X):Tr(t.rscratch,U,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=r.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` +`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],m=/[\s\u200b]+|$/g,g=0;gf){var E=p.matchAll(m),C="",x=0,T=kr(E),S;try{for(T.s();!(S=T.n()).done;){var P=S.value,D=P[0],A=p.substring(x,P.index);x=P.index+D.length;var B=C.length===0?A:C+A+D,R=this.calculateLabelDimensions(r,B),M=R.width;M<=f?C+=A+D:(C&&d.push(C),C=A+D)}}catch(q){T.e(q)}finally{T.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` +`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var L=r.pstyle("text-max-width").pfValue,I="",O="…",F=!1;if(this.calculateLabelDimensions(r,n).widthL)break;I+=n[_],_===n.length-1&&(F=!0)}return F||(I+=O),I}return n};Gr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Gr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=0,s=r.pstyle("font-style").strValue,o=r.pstyle("font-size").pfValue,l=r.pstyle("font-family").strValue,u=r.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var h=0,d=0,m=e.split(` +`),g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=r.desktopTapThreshold2}var lr=i(k);Je&&(r.hoverData.tapholdCancelled=!0);var jr=function(){var Br=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Br.length===0?(Br.push(De[0]),Br.push(De[1])):(Br[0]+=De[0],Br[1]+=De[1])};W=!0,n(Te,["mousemove","vmousemove","tapdrag"],k,{x:ee[0],y:ee[1]});var Ze=function(Br){return{originalEvent:k,type:Br,position:{x:ee[0],y:ee[1]}}},Wr=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||$.emit(Ze("boxstart")),ge[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(Je){var $r=Ze("cxtdrag");ce?ce.emit($r):$.emit($r),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||Te!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(Ze("cxtdragout")),r.hoverData.cxtOver=Te,Te&&Te.emit(Ze("cxtdragover")))}}else if(r.hoverData.dragging){if(W=!0,$.panningEnabled()&&$.userPanningEnabled()){var Lt;if(r.hoverData.justStartedPan){var $a=r.hoverData.mdownPos;Lt={x:(ee[0]-$a[0])*K,y:(ee[1]-$a[1])*K},r.hoverData.justStartedPan=!1}else Lt={x:De[0]*K,y:De[1]*K};$.panBy(Lt),$.emit(Ze("dragpan")),r.hoverData.dragged=!0}ee=r.projectIntoViewport(k.clientX,k.clientY)}else if(ge[4]==1&&(ce==null||ce.pannable())){if(Je){if(!r.hoverData.dragging&&$.boxSelectionEnabled()&&(lr||!$.panningEnabled()||!$.userPanningEnabled()))Wr();else if(!r.hoverData.selecting&&$.panningEnabled()&&$.userPanningEnabled()){var mt=s(ce,r.hoverData.downs);mt&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,ge[4]=0,r.data.bgActivePosistion=Ht(fe),r.redrawHint("select",!0),r.redraw())}ce&&ce.pannable()&&ce.active()&&ce.unactivate()}}else{if(ce&&ce.pannable()&&ce.active()&&ce.unactivate(),(!ce||!ce.grabbed())&&Te!=Ee&&(Ee&&n(Ee,["mouseout","tapdragout"],k,{x:ee[0],y:ee[1]}),Te&&n(Te,["mouseover","tapdragover"],k,{x:ee[0],y:ee[1]}),r.hoverData.last=Te),ce)if(Je){if($.boxSelectionEnabled()&&lr)ce&&ce.grabbed()&&(p(Se),ce.emit(Ze("freeon")),Se.emit(Ze("free")),r.dragData.didDrag&&(ce.emit(Ze("dragfreeon")),Se.emit(Ze("dragfree")))),Wr();else if(ce&&ce.grabbed()&&r.nodeIsDraggable(ce)){var Er=!r.dragData.didDrag;Er&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||m(Se,{inDragLayer:!0});var hr={x:0,y:0};if(te(De[0])&&te(De[1])&&(hr.x+=De[0],hr.y+=De[1],Er)){var Cr=r.hoverData.dragDelta;Cr&&te(Cr[0])&&te(Cr[1])&&(hr.x+=Cr[0],hr.y+=Cr[1])}r.hoverData.draggingEles=!0,Se.silentShift(hr).emit(Ze("position")).emit(Ze("drag")),r.redrawHint("drag",!0),r.redraw()}}else jr();W=!0}if(ge[2]=ee[0],ge[3]=ee[1],W)return k.stopPropagation&&k.stopPropagation(),k.preventDefault&&k.preventDefault(),!1}},!1);var A,B,R;r.registerBinding(e,"mouseup",function(k){if(!(r.hoverData.which===1&&k.which!==1&&r.hoverData.capture)){var V=r.hoverData.capture;if(V){r.hoverData.capture=!1;var W=r.cy,$=r.projectIntoViewport(k.clientX,k.clientY),K=r.selection,se=r.findNearestElement($[0],$[1],!0,!1),ee=r.dragData.possibleDragElements,fe=r.hoverData.down,le=i(k);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,fe&&fe.unactivate();var ge=function(Ue){return{originalEvent:k,type:Ue,position:{x:$[0],y:$[1]}}};if(r.hoverData.which===3){var Te=ge("cxttapend");if(fe?fe.emit(Te):W.emit(Te),!r.hoverData.cxtDragged){var Ee=ge("cxttap");fe?fe.emit(Ee):W.emit(Ee)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(n(se,["mouseup","tapend","vmouseup"],k,{x:$[0],y:$[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(n(fe,["click","tap","vclick"],k,{x:$[0],y:$[1]}),B=!1,k.timeStamp-R<=W.multiClickDebounceTime()?(A&&clearTimeout(A),B=!0,R=null,n(fe,["dblclick","dbltap","vdblclick"],k,{x:$[0],y:$[1]})):(A=setTimeout(function(){B||n(fe,["oneclick","onetap","voneclick"],k,{x:$[0],y:$[1]})},W.multiClickDebounceTime()),R=k.timeStamp)),fe==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!i(k)&&(W.$(t).unselect(["tapunselect"]),ee.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=ee=W.collection()),se==fe&&!r.dragData.didDrag&&!r.hoverData.selecting&&se!=null&&se._private.selectable&&(r.hoverData.dragging||(W.selectionType()==="additive"||le?se.selected()?se.unselect(["tapunselect"]):se.select(["tapselect"]):le||(W.$(t).unmerge(se).unselect(["tapunselect"]),se.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var ce=W.collection(r.getAllInBox(K[0],K[1],K[2],K[3]));r.redrawHint("select",!0),ce.length>0&&r.redrawHint("eles",!0),W.emit(ge("boxend"));var De=function(Ue){return Ue.selectable()&&!Ue.selected()};W.selectionType()==="additive"||le||W.$(t).unmerge(ce).unselect(),ce.emit(ge("box")).stdFilter(De).select().emit(ge("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!K[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var Se=fe&&fe.grabbed();p(ee),Se&&(fe.emit(ge("freeon")),ee.emit(ge("free")),r.dragData.didDrag&&(fe.emit(ge("dragfreeon")),ee.emit(ge("dragfree"))))}}K[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var M=[],L=4,I,O=1e5,F=function(k,V){for(var W=0;W=L){var $=M;if(I=F($,5),!I){var K=Math.abs($[0]);I=_($)&&K>5}if(I)for(var se=0;se<$.length;se++)O=Math.min(Math.abs($[se]),O)}else M.push(W),V=!0;else I&&(O=Math.min(Math.abs(W),O));if(!r.scrollingPage){var ee=r.cy,fe=ee.zoom(),le=ee.pan(),ge=r.projectIntoViewport(k.clientX,k.clientY),Te=[ge[0]*fe+le.x,ge[1]*fe+le.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||S()){k.preventDefault();return}if(ee.panningEnabled()&&ee.userPanningEnabled()&&ee.zoomingEnabled()&&ee.userZoomingEnabled()){k.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var Ee;V&&Math.abs(W)>5&&(W=to(W)*5),Ee=W/-250,I&&(Ee/=O,Ee*=3),Ee=Ee*r.wheelSensitivity;var ce=k.deltaMode===1;ce&&(Ee*=33);var De=ee.zoom()*Math.pow(10,Ee);k.type==="gesturechange"&&(De=r.gestureStartZoom*k.scale),ee.zoom({level:De,renderedPosition:{x:Te[0],y:Te[1]}}),ee.emit({type:k.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:k,position:{x:ge[0],y:ge[1]}})}}};r.registerBinding(r.container,"wheel",N,!0),r.registerBinding(e,"scroll",function(k){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(k){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||k.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(Y){r.hasTouchStarted||N(Y)},!0),r.registerBinding(r.container,"mouseout",function(k){var V=r.projectIntoViewport(k.clientX,k.clientY);r.cy.emit({originalEvent:k,type:"mouseout",position:{x:V[0],y:V[1]}})},!1),r.registerBinding(r.container,"mouseover",function(k){var V=r.projectIntoViewport(k.clientX,k.clientY);r.cy.emit({originalEvent:k,type:"mouseover",position:{x:V[0],y:V[1]}})},!1);var q,U,X,j,J,re,ae,Z,z,G,H,Q,ne,be=function(k,V,W,$){return Math.sqrt((W-k)*(W-k)+($-V)*($-V))},Fe=function(k,V,W,$){return(W-k)*(W-k)+($-V)*($-V)},Be;r.registerBinding(r.container,"touchstart",Be=function(k){if(r.hasTouchStarted=!0,!!P(k)){b(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var V=r.cy,W=r.touchData.now,$=r.touchData.earlier;if(k.touches[0]){var K=r.projectIntoViewport(k.touches[0].clientX,k.touches[0].clientY);W[0]=K[0],W[1]=K[1]}if(k.touches[1]){var K=r.projectIntoViewport(k.touches[1].clientX,k.touches[1].clientY);W[2]=K[0],W[3]=K[1]}if(k.touches[2]){var K=r.projectIntoViewport(k.touches[2].clientX,k.touches[2].clientY);W[4]=K[0],W[5]=K[1]}var se=function(lr){return{originalEvent:k,type:lr,position:{x:W[0],y:W[1]}}};if(k.touches[1]){r.touchData.singleTouchMoved=!0,p(r.dragData.touchDragEles);var ee=r.findContainerClientCoords();z=ee[0],G=ee[1],H=ee[2],Q=ee[3],q=k.touches[0].clientX-z,U=k.touches[0].clientY-G,X=k.touches[1].clientX-z,j=k.touches[1].clientY-G,ne=0<=q&&q<=H&&0<=X&&X<=H&&0<=U&&U<=Q&&0<=j&&j<=Q;var fe=V.pan(),le=V.zoom();J=be(q,U,X,j),re=Fe(q,U,X,j),ae=[(q+X)/2,(U+j)/2],Z=[(ae[0]-fe.x)/le,(ae[1]-fe.y)/le];var ge=200,Te=ge*ge;if(re=1){for(var mr=r.touchData.startPosition=[null,null,null,null,null,null],Ye=0;Ye=r.touchTapThreshold2}if(V&&r.touchData.cxt){k.preventDefault();var Ye=k.touches[0].clientX-z,ir=k.touches[0].clientY-G,je=k.touches[1].clientX-z,lr=k.touches[1].clientY-G,jr=Fe(Ye,ir,je,lr),Ze=jr/re,Wr=150,$r=Wr*Wr,Lt=1.5,$a=Lt*Lt;if(Ze>=$a||jr>=$r){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var mt=le("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(mt),r.touchData.start=null):$.emit(mt)}}if(V&&r.touchData.cxt){var mt=le("cxtdrag");r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(mt):$.emit(mt),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var Er=r.findNearestElement(K[0],K[1],!0,!0);(!r.touchData.cxtOver||Er!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(le("cxtdragout")),r.touchData.cxtOver=Er,Er&&Er.emit(le("cxtdragover")))}else if(V&&k.touches[2]&&$.boxSelectionEnabled())k.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||$.emit(le("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,W[4]=1,!W||W.length===0||W[0]===void 0?(W[0]=(K[0]+K[2]+K[4])/3,W[1]=(K[1]+K[3]+K[5])/3,W[2]=(K[0]+K[2]+K[4])/3+1,W[3]=(K[1]+K[3]+K[5])/3+1):(W[2]=(K[0]+K[2]+K[4])/3,W[3]=(K[1]+K[3]+K[5])/3),r.redrawHint("select",!0),r.redraw();else if(V&&k.touches[1]&&!r.touchData.didSelect&&$.zoomingEnabled()&&$.panningEnabled()&&$.userZoomingEnabled()&&$.userPanningEnabled()){k.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var hr=r.dragData.touchDragEles;if(hr){r.redrawHint("drag",!0);for(var Cr=0;Cr0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var ve;r.registerBinding(e,"touchcancel",ve=function(k){var V=r.touchData.start;r.touchData.capture=!1,V&&V.unactivate()});var he,ye,me,we;if(r.registerBinding(e,"touchend",he=function(k){var V=r.touchData.start,W=r.touchData.capture;if(W)k.touches.length===0&&(r.touchData.capture=!1),k.preventDefault();else return;var $=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var K=r.cy,se=K.zoom(),ee=r.touchData.now,fe=r.touchData.earlier;if(k.touches[0]){var le=r.projectIntoViewport(k.touches[0].clientX,k.touches[0].clientY);ee[0]=le[0],ee[1]=le[1]}if(k.touches[1]){var le=r.projectIntoViewport(k.touches[1].clientX,k.touches[1].clientY);ee[2]=le[0],ee[3]=le[1]}if(k.touches[2]){var le=r.projectIntoViewport(k.touches[2].clientX,k.touches[2].clientY);ee[4]=le[0],ee[5]=le[1]}var ge=function($r){return{originalEvent:k,type:$r,position:{x:ee[0],y:ee[1]}}};V&&V.unactivate();var Te;if(r.touchData.cxt){if(Te=ge("cxttapend"),V?V.emit(Te):K.emit(Te),!r.touchData.cxtDragged){var Ee=ge("cxttap");V?V.emit(Ee):K.emit(Ee)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!k.touches[2]&&K.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var ce=K.collection(r.getAllInBox($[0],$[1],$[2],$[3]));$[0]=void 0,$[1]=void 0,$[2]=void 0,$[3]=void 0,$[4]=0,r.redrawHint("select",!0),K.emit(ge("boxend"));var De=function($r){return $r.selectable()&&!$r.selected()};ce.emit(ge("box")).stdFilter(De).select().emit(ge("boxselect")),ce.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(V!=null&&V.unactivate(),k.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!k.touches[1]){if(!k.touches[0]){if(!k.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Se=r.dragData.touchDragEles;if(V!=null){var Je=V._private.grabbed;p(Se),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Je&&(V.emit(ge("freeon")),Se.emit(ge("free")),r.dragData.didDrag&&(V.emit(ge("dragfreeon")),Se.emit(ge("dragfree")))),n(V,["touchend","tapend","vmouseup","tapdragout"],k,{x:ee[0],y:ee[1]}),V.unactivate(),r.touchData.start=null}else{var Ue=r.findNearestElement(ee[0],ee[1],!0,!0);n(Ue,["touchend","tapend","vmouseup","tapdragout"],k,{x:ee[0],y:ee[1]})}var mr=r.touchData.startPosition[0]-ee[0],Ye=mr*mr,ir=r.touchData.startPosition[1]-ee[1],je=ir*ir,lr=Ye+je,jr=lr*se*se;r.touchData.singleTouchMoved||(V||K.$(":selected").unselect(["tapunselect"]),n(V,["tap","vclick"],k,{x:ee[0],y:ee[1]}),ye=!1,k.timeStamp-we<=K.multiClickDebounceTime()?(me&&clearTimeout(me),ye=!0,we=null,n(V,["dbltap","vdblclick"],k,{x:ee[0],y:ee[1]})):(me=setTimeout(function(){ye||n(V,["onetap","voneclick"],k,{x:ee[0],y:ee[1]})},K.multiClickDebounceTime()),we=k.timeStamp)),V!=null&&!r.dragData.didDrag&&V._private.selectable&&jr"u"){var xe=[],Pe=function(k){return{clientX:k.clientX,clientY:k.clientY,force:1,identifier:k.pointerId,pageX:k.pageX,pageY:k.pageY,radiusX:k.width/2,radiusY:k.height/2,screenX:k.screenX,screenY:k.screenY,target:k.target}},Ve=function(k){return{event:k,touch:Pe(k)}},Xe=function(k){xe.push(Ve(k))},Oe=function(k){for(var V=0;V0)return q[0]}return null},d=Object.keys(c),m=0;m0?h:yv(i,s,e,t,a,n,o,l)},checkPoint:function(e,t,a,n,i,s,o,l){l=l==="auto"?lt(n,i):l;var u=2*l;if(Zr(e,t,this.points,s,o,n,i-u,[0,-1],a)||Zr(e,t,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(Sr(e,t,c)||St(e,t,u,u,s+n/2-l,o+i/2-l,a)||St(e,t,u,u,s-n/2+l,o+i/2-l,a))}}};Qr.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",br(3,0)),this.generateRoundPolygon("round-triangle",br(3,0)),this.generatePolygon("rectangle",br(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",br(5,0)),this.generateRoundPolygon("round-pentagon",br(5,0)),this.generatePolygon("hexagon",br(6,0)),this.generateRoundPolygon("round-hexagon",br(6,0)),this.generatePolygon("heptagon",br(7,0)),this.generateRoundPolygon("round-heptagon",br(7,0)),this.generatePolygon("octagon",br(8,0)),this.generateRoundPolygon("round-octagon",br(8,0));var a=new Array(20);{var n=Ps(5,0),i=Ps(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(y>=e.deqCost*h||y>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*bs)break;var E=e.deq(a,g,m);if(E.length>0)for(var C=0;C0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,g,m)&&i())},o=e.priority||js;n.beforeRender(s,o(a))}}}},ry=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xn;dt(this,r),this.idsByKey=new Xr,this.keyForId=new Xr,this.cachesByLvl=new Xr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return ht(r,[{key:"getIdsFor",value:function(t){t==null&&We("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new ra,a.set(t,n)),n}},{key:"addIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).add(a)}},{key:"deleteIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).delete(a)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);return n!==i}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var a=this.cachesByLvl,n=this.lvls,i=a.get(t);return i||(i=new Xr,a.set(t,i),n.push(t)),i}},{key:"getCache",value:function(t,a){return this.getCachesAt(a).get(t)}},{key:"get",value:function(t,a){var n=this.getKey(t),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(t),i}},{key:"getForCachedKey",value:function(t,a){var n=this.keyForId.get(t.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(t,a){return this.getCachesAt(a).has(t)}},{key:"has",value:function(t,a){var n=this.getKey(t);return this.hasCache(n,a)}},{key:"setCache",value:function(t,a,n){n.key=t,this.getCachesAt(a).set(t,n)}},{key:"set",value:function(t,a,n){var i=this.getKey(t);this.setCache(i,a,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,a){this.getCachesAt(a).delete(t)}},{key:"delete",value:function(t,a){var n=this.getKey(t);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(t){var a=this;this.lvls.forEach(function(n){return a.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(t);var i=this.doesEleInvalidateKey(t);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}])}(),Ol=25,nn=50,pn=-4,Hs=3,Ef=7.99,ty=8,ay=1024,ny=1024,iy=1024,sy=.2,oy=.8,uy=10,ly=.15,vy=.1,fy=.9,cy=.9,dy=100,hy=1,$t={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},gy=cr({getKey:null,doesEleInvalidateKey:xn,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:fv,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ba=function(e,t){var a=this;a.renderer=e,a.onDequeues=[];var n=gy(t);pe(a,n),a.lookup=new ry(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},nr=ba.prototype;nr.reasons=$t;nr.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};nr.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=t[r]=t[r]||[];return a};nr.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new Va(function(t,a){return a.reqs-t.reqs});return e};nr.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};nr.getElement=function(r,e,t,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!i.allowEdgeTxrCaching&&r.isEdge()||!i.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(ro(o*t))),a=Ef||a>Hs)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(r,u);if(!this.isVisible(r,c))return null;var h=l.get(r,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=Ol?d=Ol:v<=nn?d=nn:d=Math.ceil(v/nn)*nn,v>iy||f>ny)return null;var m=i.getTextureQueue(d),g=m[m.length-2],p=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=m[m.length-1]),g||(g=p()),g.width-g.usedWidtha;D--)S=i.getElement(r,e,t,D,$t.downscale);P()}else return i.queueElement(r,C.level-1),C;else{var A;if(!b&&!w&&!E)for(var B=a-1;B>=pn;B--){var R=l.get(r,B);if(R){A=R;break}}if(y(A))return i.queueElement(r,a),A;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,r,e,c,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return h={x:g.usedWidth,texture:g,level:a,scale:u,width:f,height:v,scaledLabelShown:c},g.usedWidth+=Math.ceil(f+ty),g.eleCaches.push(h),l.set(r,a,h),i.checkTextureFullness(g),h};nr.invalidateElements=function(r){for(var e=0;e=sy*r.width&&this.retireTexture(r)};nr.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>oy&&r.fullnessChecks>=uy?ut(t,r):r.fullnessChecks++};nr.retireTexture=function(r){var e=this,t=r.height,a=e.getTextureQueue(t),n=this.lookup;ut(a,r),r.retired=!0;for(var i=r.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,eo(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ut(n,s),a.push(s),s}};nr.queueElement=function(r,e){var t=this,a=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(r),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(r),s.reqs++,a.updateItem(s);else{var o={eles:r.spawn().merge(r),level:e,reqs:1,key:i};a.push(o),n[i]=o}};nr.dequeue=function(r){for(var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=t.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,r,o.level,$t.dequeue)}return n};nr.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(r),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Js,t.updateItem(i),t.pop(),a[n]=null):i.eles.unmerge(r))};nr.onDequeue=function(r){this.onDequeues.push(r)};nr.offDequeue=function(r){ut(this.onDequeues,r)};nr.setupDequeueing=xf.setupDequeueing({deqRedrawThreshold:dy,deqCost:ly,deqAvgCost:vy,deqNoDrawCost:fy,deqFastCost:cy,deq:function(e,t,a){return e.dequeue(t,a)},onDeqd:function(e,t){for(var a=0;a=yy||t>Pn)return null}a.validateLayersElesOrdering(t,r);var l=a.layersByLevel,u=Math.pow(2,t),v=l[t]=l[t]||[],f,c=a.levelIsComplete(t,r),h,d=function(){var P=function(M){if(a.validateLayersElesOrdering(M,r),a.levelIsComplete(M,r))return h=l[M],!0},D=function(M){if(!h)for(var L=t+M;xa<=L&&L<=Pn&&!P(L);L+=M);};D(1),D(-1);for(var A=v.length-1;A>=0;A--){var B=v[A];B.invalid&&ut(v,B)}};if(!c)d();else return v;var m=function(){if(!f){f=wr();for(var P=0;Pzl||B>zl)return null;var R=A*B;if(R>Sy)return null;var M=a.makeLayer(f,t);if(D!=null){var L=v.indexOf(D)+1;v.splice(L,0,M)}else(P.insert===void 0||P.insert)&&v.unshift(M);return M};if(a.skipping&&!o)return null;for(var p=null,y=r.length/py,b=!o,w=0;w=y||!Cd(p.bb,E.boundingBox()))&&(p=g({insert:!0,after:p}),!p))return null;h||b?a.queueLayer(p,E):a.drawEleInLayer(p,E,t,e),p.eles.push(E),x[t]=p}return h||(b?null:v)};dr.getEleLevelForLayerLevel=function(r,e){return r};dr.drawEleInLayer=function(r,e,t,a){var n=this,i=this.renderer,s=r.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(t=n.getEleLevelForLayerLevel(t,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,t,ky),i.setImgSmoothing(s,!0))};dr.levelIsComplete=function(r,e){var t=this,a=t.layersByLevel[r];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};dr.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var a=0;a0){e=!0;break}}return e};dr.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=Yr(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(a,n,i){e.invalidateLayer(a)}))};dr.invalidateLayer=function(r){if(this.lastInvalidationTime=Yr(),!r.invalid){var e=r.level,t=r.eles,a=this.layersByLevel[e];ut(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;t&&(l=t,r.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,m=e.pstyle("line-outline-width").value,g=e.pstyle("line-outline-color").value,p=u*v,y=u*v,b=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;f==="straight-triangle"?(s.eleStrokeStyle(r,e,M),s.drawEdgeTrianglePath(e,r,o.allpts)):(r.lineWidth=h,r.lineCap=d,s.eleStrokeStyle(r,e,M),s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},w=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(r.lineWidth=h+m,r.lineCap=d,m>0)s.colorStrokeStyle(r,g[0],g[1],g[2],M);else{r.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,r,o.allpts):(s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},E=function(){n&&s.drawEdgeOverlay(r,e)},C=function(){n&&s.drawEdgeUnderlay(r,e)},x=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;s.drawArrowheads(r,e,M)},T=function(){s.drawElementText(r,e,null,a)};r.lineJoin="round";var S=e.pstyle("ghost").value==="yes";if(S){var P=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,A=e.pstyle("ghost-opacity").value,B=p*A;r.translate(P,D),b(B),x(B),r.translate(-P,-D)}else w();C(),b(),x(),E(),T(),t&&r.translate(l.x1,l.y1)}};var Sf=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;t.lineWidth=u,o.edgeType==="self"&&!s?t.lineCap="butt":t.lineCap="round",i.colorStrokeStyle(t,v[0],v[1],v[2],n),i.drawEdgePath(a,t,o.allpts,"solid")}}}};Jr.drawEdgeOverlay=Sf("overlay");Jr.drawEdgeUnderlay=Sf("underlay");Jr.drawEdgePath=function(r,e,t,a){var n=r._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=r.pstyle("line-dash-pattern").pfValue,v=r.pstyle("line-dash-offset").pfValue;if(l){var f=t.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);r.textAlign=l,r.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,d;t&&(d=t,r.translate(-d.x1,-d.y1)),n==null?(s.drawText(r,e,null,h,i),e.isEdge()&&(s.drawText(r,e,"source",h,i),s.drawText(r,e,"target",h,i))):s.drawText(r,e,n,h,i),t&&r.translate(d.x1,d.y1)};Mt.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;r.font=a+" "+s+" "+n+" "+i,r.lineJoin="round",this.colorFillStyle(r,u[0],u[1],u[2],o),this.colorStrokeStyle(r,v[0],v[1],v[2],l)};function xs(r,e,t,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;r.beginPath(),r.moveTo(e+i,t),r.lineTo(e+a-i,t),r.quadraticCurveTo(e+a,t,e+a,t+i),r.lineTo(e+a,t+n-i),r.quadraticCurveTo(e+a,t+n,e+a-i,t+n),r.lineTo(e+i,t+n),r.quadraticCurveTo(e,t+n,e,t+n-i),r.lineTo(e,t+i),r.quadraticCurveTo(e,t,e+i,t),r.closePath(),s?r.stroke():r.fill()}Mt.getTextAngle=function(r,e){var t,a=r._private,n=a.rscratch,i=e?e+"-":"",s=r.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=Tr(n,"labelAngle",e);t=r.isEdge()?o:0}else s.strValue==="none"?t=0:t=s.pfValue;return t};Mt.drawText=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var l=Tr(s,"labelX",t),u=Tr(s,"labelY",t),v,f,c=this.getLabelText(e,t);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(r,e,n);var h=t?t+"-":"",d=Tr(s,"labelWidth",t),m=Tr(s,"labelHeight",t),g=e.pstyle(h+"text-margin-x").pfValue,p=e.pstyle(h+"text-margin-y").pfValue,y=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;y&&(b="center",w="center"),l+=g,u+=p;var E;switch(a?E=this.getTextAngle(e,t):E=0,E!==0&&(v=l,f=u,r.translate(v,f),r.rotate(E),l=0,u=0),w){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var C=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,T=e.pstyle("text-border-width").pfValue,S=e.pstyle("text-background-padding").pfValue,P=e.pstyle("text-background-shape").strValue,D=P.indexOf("round")===0,A=2;if(C>0||T>0&&x>0){var B=l-S;switch(b){case"left":B-=d;break;case"center":B-=d/2;break}var R=u-m-S,M=d+2*S,L=m+2*S;if(C>0){var I=r.fillStyle,O=e.pstyle("text-background-color").value;r.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+C*o+")",D?xs(r,B,R,M,L,A):r.fillRect(B,R,M,L),r.fillStyle=I}if(T>0&&x>0){var F=r.strokeStyle,_=r.lineWidth,N=e.pstyle("text-border-color").value,q=e.pstyle("text-border-style").value;if(r.strokeStyle="rgba("+N[0]+","+N[1]+","+N[2]+","+x*o+")",r.lineWidth=T,r.setLineDash)switch(q){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=T/4,r.setLineDash([]);break;case"solid":r.setLineDash([]);break}if(D?xs(r,B,R,M,L,A,"stroke"):r.strokeRect(B,R,M,L),q==="double"){var U=T/2;D?xs(r,B+U,R+U,M-U*2,L-U*2,A,"stroke"):r.strokeRect(B+U,R+U,M-U*2,L-U*2)}r.setLineDash&&r.setLineDash([]),r.lineWidth=_,r.strokeStyle=F}}var X=2*e.pstyle("text-outline-width").pfValue;if(X>0&&(r.lineWidth=X),e.pstyle("text-wrap").value==="wrap"){var j=Tr(s,"labelWrapCachedLines",t),J=Tr(s,"labelLineHeight",t),re=d/2,ae=this.getLabelJustification(e);switch(ae==="auto"||(b==="left"?ae==="left"?l+=-d:ae==="center"&&(l+=-re):b==="center"?ae==="left"?l+=-re:ae==="right"&&(l+=re):b==="right"&&(ae==="center"?l+=re:ae==="right"&&(l+=d))),w){case"top":u-=(j.length-1)*J;break;case"center":case"bottom":u-=(j.length-1)*J;break}for(var Z=0;Z0&&r.strokeText(j[Z],l,u),r.fillText(j[Z],l,u),u+=J}else X>0&&r.strokeText(c,l,u),r.fillText(c,l,u);E!==0&&(r.rotate(-E),r.translate(-v,-f))}}};var pt={};pt.drawNode=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!te(f.x)||!te(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,m=!1,g=e.padding();o=e.width()+2*g,l=e.height()+2*g;var p;t&&(p=t,r.translate(-p.x1,-p.y1));for(var y=e.pstyle("background-image"),b=y.value,w=new Array(b.length),E=new Array(b.length),C=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:B;s.eleFillStyle(r,e,ue)},Z=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:N;s.colorStrokeStyle(r,R[0],R[1],R[2],ue)},z=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j;s.colorStrokeStyle(r,U[0],U[1],U[2],ue)},G=function(ue,Y,k,V){var W=s.nodePathCache=s.nodePathCache||[],$=vv(k==="polygon"?k+","+V.join(","):k,""+Y,""+ue,""+re),K=W[$],se,ee=!1;return K!=null?(se=K,ee=!0,v.pathCache=se):(se=new Path2D,W[$]=v.pathCache=se),{path:se,cacheHit:ee}},H=e.pstyle("shape").strValue,Q=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var ne=G(o,l,H,Q);d=ne.path,m=ne.cacheHit}var be=function(){if(!m){var ue=f;h&&(ue={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||r,ue.x,ue.y,o,l,re,v)}h?r.fill(d):r.fill()},Fe=function(){for(var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=u.backgrounding,V=0,W=0;W0&&arguments[0]!==void 0?arguments[0]:!1,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(r,e,Y),ue&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,re,v)))},oe=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasStripe(e)&&(r.save(),h?r.clip(v.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,re,v),r.clip()),s.drawStripe(r,e,Y),r.restore(),ue&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,re,v)))},ve=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,Y=(D>0?D:-D)*ue,k=D>0?0:255;D!==0&&(s.colorFillStyle(r,k,k,k,Y),h?r.fill(d):r.fill())},he=function(){if(A>0){if(r.lineWidth=A,r.lineCap=I,r.lineJoin=L,r.setLineDash)switch(M){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(F),r.lineDashOffset=_;break;case"solid":case"double":r.setLineDash([]);break}if(O!=="center"){if(r.save(),r.lineWidth*=2,O==="inside")h?r.clip(d):r.clip();else{var ue=new Path2D;ue.rect(-o/2-A,-l/2-A,o+2*A,l+2*A),ue.addPath(d),r.clip(ue,"evenodd")}h?r.stroke(d):r.stroke(),r.restore()}else h?r.stroke(d):r.stroke();if(M==="double"){r.lineWidth=A/3;var Y=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(d):r.stroke(),r.globalCompositeOperation=Y}r.setLineDash&&r.setLineDash([])}},ye=function(){if(q>0){if(r.lineWidth=q,r.lineCap="butt",r.setLineDash)switch(X){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var ue=f;h&&(ue={x:0,y:0});var Y=s.getNodeShape(e),k=A;O==="inside"&&(k=0),O==="outside"&&(k*=2);var V=(o+k+(q+J))/o,W=(l+k+(q+J))/l,$=o*V,K=l*W,se=s.nodeShapes[Y].points,ee;if(h){var fe=G($,K,Y,se);ee=fe.path}if(Y==="ellipse")s.drawEllipsePath(ee||r,ue.x,ue.y,$,K);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(Y)){var le=0,ge=0,Te=0;Y==="round-diamond"?le=(k+J+q)*1.4:Y==="round-heptagon"?(le=(k+J+q)*1.075,Te=-(k/2+J+q)/35):Y==="round-hexagon"?le=(k+J+q)*1.12:Y==="round-pentagon"?(le=(k+J+q)*1.13,Te=-(k/2+J+q)/15):Y==="round-tag"?(le=(k+J+q)*1.12,ge=(k/2+q+J)*.07):Y==="round-triangle"&&(le=(k+J+q)*(Math.PI/2),Te=-(k+J/2+q)/Math.PI),le!==0&&(V=(o+le)/o,$=o*V,["round-hexagon","round-tag"].includes(Y)||(W=(l+le)/l,K=l*W)),re=re==="auto"?bv($,K):re;for(var Ee=$/2,ce=K/2,De=re+(k+q+J)/2,Se=new Array(se.length/2),Je=new Array(se.length/2),Ue=0;Ue0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(t,v[0],v[1],v[2],u),o.nodeShapes[f].draw(t,n.x,n.y,i+l*2,s+l*2,c),t.fill()}}}};pt.drawNodeOverlay=kf("overlay");pt.drawNodeUnderlay=kf("underlay");pt.hasPie=function(r){return r=r[0],r._private.hasPie};pt.hasStripe=function(r){return r=r[0],r._private.hasStripe};pt.drawPie=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,l=a.x,u=a.y,v=e.width(),f=e.height(),c=Math.min(v,f)/2,h,d=0,m=this.usePaths();if(m&&(l=0,u=0),i.units==="%"?c=c*i.pfValue:i.pfValue!==void 0&&(c=i.pfValue/2),s.units==="%"?h=c*s.pfValue:s.pfValue!==void 0&&(h=s.pfValue/2),!(h>=c))for(var g=1;g<=n.pieBackgroundN;g++){var p=e.pstyle("pie-"+g+"-background-size").value,y=e.pstyle("pie-"+g+"-background-color").value,b=e.pstyle("pie-"+g+"-background-opacity").value*t,w=p/100;w+d>1&&(w=1-d);var E=1.5*Math.PI+2*Math.PI*d;E+=o;var C=2*Math.PI*w,x=E+C;p===0||d>=1||d+w>1||(h===0?(r.beginPath(),r.moveTo(l,u),r.arc(l,u,c,E,x),r.closePath()):(r.beginPath(),r.arc(l,u,c,E,x),r.arc(l,u,h,x,E,!0),r.closePath()),this.colorFillStyle(r,y[0],y[1],y[2],b),r.fill(),d+=w)}};pt.drawStripe=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=a.x,s=a.y,o=e.width(),l=e.height(),u=0,v=this.usePaths();r.save();var f=e.pstyle("stripe-direction").value,c=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":r.rotate(-Math.PI/2);break}var h=o,d=l;c.units==="%"?(h=h*c.pfValue,d=d*c.pfValue):c.pfValue!==void 0&&(h=c.pfValue,d=c.pfValue),v&&(i=0,s=0),s-=h/2,i-=d/2;for(var m=1;m<=n.stripeBackgroundN;m++){var g=e.pstyle("stripe-"+m+"-background-size").value,p=e.pstyle("stripe-"+m+"-background-color").value,y=e.pstyle("stripe-"+m+"-background-opacity").value*t,b=g/100;b+u>1&&(b=1-u),!(g===0||u>=1||u+b>1)&&(r.beginPath(),r.rect(i,s+d*u,h,d*b),r.closePath(),this.colorFillStyle(r,p[0],p[1],p[2],y),r.fill(),u+=b)}r.restore()};var xr={},zy=100;xr.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};xr.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var y=t.style(),b=t.zoom(),w=s!==void 0?s:b,E=t.pan(),C={x:E.x,y:E.y},x={zoom:b,pan:{x:E.x,y:E.y}},T=e.prevViewport,S=T===void 0||x.zoom!==T.zoom||x.pan.x!==T.pan.x||x.pan.y!==T.pan.y;!S&&!(m&&!d)&&(e.motionBlurPxRatio=1),o&&(C=o),w*=l,C.x*=l,C.y*=l;var P=e.getCachedZSortedEles();function D(Z,z,G,H,Q){var ne=Z.globalCompositeOperation;Z.globalCompositeOperation="destination-out",e.colorFillStyle(Z,255,255,255,e.motionBlurTransparency),Z.fillRect(z,G,H,Q),Z.globalCompositeOperation=ne}function A(Z,z){var G,H,Q,ne;!e.clearingMotionBlur&&(Z===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||Z===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(G={x:E.x*h,y:E.y*h},H=b*h,Q=e.canvasWidth*h,ne=e.canvasHeight*h):(G=C,H=w,Q=e.canvasWidth,ne=e.canvasHeight),Z.setTransform(1,0,0,1,0,0),z==="motionBlur"?D(Z,0,0,Q,ne):!a&&(z===void 0||z)&&Z.clearRect(0,0,Q,ne),n||(Z.translate(G.x,G.y),Z.scale(H,H)),o&&Z.translate(o.x,o.y),s&&Z.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var B=e.data.bufferContexts[e.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var x=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var R=u.contexts[e.NODE],M=e.textureCache.texture,x=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),c?D(R,0,0,x.width,x.height):R.clearRect(0,0,x.width,x.height);var L=y.core("outside-texture-bg-color").value,I=y.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,L[0],L[1],L[2],I),R.fillRect(0,0,x.width,x.height);var b=t.zoom();A(R,!1),R.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l),R.drawImage(M,x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=t.extent(),F=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),_=e.hideEdgesOnViewport&&F,N=[];if(N[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,N[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),N[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,N[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||N[e.NODE]){var q=c&&!N[e.NODE]&&h!==1,R=a||(q?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),U=c&&!q?"motionBlur":void 0;A(R,U),_?e.drawCachedNodes(R,P.nondrag,l,O):e.drawLayeredElements(R,P.nondrag,l,O),e.debug&&e.drawDebugPoints(R,P.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||N[e.DRAG])){var q=c&&!N[e.DRAG]&&h!==1,R=a||(q?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);A(R,c&&!q?"motionBlur":void 0),_?e.drawCachedNodes(R,P.drag,l,O):e.drawCachedElements(R,P.drag,l,O),e.debug&&e.drawDebugPoints(R,P.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(r,A),c&&h!==1){var X=u.contexts[e.NODE],j=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],J=u.contexts[e.DRAG],re=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],ae=function(z,G,H){z.setTransform(1,0,0,1,0,0),H||!p?z.clearRect(0,0,e.canvasWidth,e.canvasHeight):D(z,0,0,e.canvasWidth,e.canvasHeight);var Q=h;z.drawImage(G,0,0,e.canvasWidth*Q,e.canvasHeight*Q,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||N[e.NODE])&&(ae(X,j,N[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||N[e.DRAG])&&(ae(J,re,N[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},zy)),a||t.emit("render")};var ha;xr.drawSelectionRectangle=function(r,e){var t=this,a=t.cy,n=t.data,i=a.style(),s=r.drawOnlyNodeLayer,o=r.drawAllLayers,l=n.canvasNeedsRedraw,u=r.forcedContext;if(t.showFps||!s&&l[t.SELECT_BOX]&&!o){var v=u||n.contexts[t.SELECT_BOX];if(e(v),t.selection[4]==1&&(t.hoverData.selecting||t.touchData.selecting)){var f=t.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(n.bgActivePosistion&&!t.hoverData.selecting){var f=t.cy.zoom(),h=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(h.x,h.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var d=t.lastRedrawTime;if(t.showFps&&d){d=Math.round(d);var m=Math.round(1e3/d),g="1 frame = "+d+" ms = "+m+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!ha){var p=v.measureText(g);ha=p.actualBoundingBoxAscent}v.fillText(g,0,ha);var y=60;v.strokeRect(0,ha+10,250,20),v.fillRect(0,ha+10,250*Math.min(m/y,1),20)}o||(l[t.SELECT_BOX]=!1)}};function _l(r,e,t){var a=r.createShader(e);if(r.shaderSource(a,t),r.compileShader(a),!r.getShaderParameter(a,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(a));return a}function Fy(r,e,t){var a=_l(r,r.VERTEX_SHADER,e),n=_l(r,r.FRAGMENT_SHADER,t),i=r.createProgram();if(r.attachShader(i,a),r.attachShader(i,n),r.linkProgram(i),!r.getProgramParameter(i,r.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function Vy(r,e,t){t===void 0&&(t=e);var a=r.makeOffscreenCanvas(e,t),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function bo(r){var e=r.pixelRatio,t=r.cy.zoom(),a=r.cy.pan();return{zoom:t*e,pan:{x:a.x*e,y:a.y*e}}}function qy(r){var e=r.pixelRatio,t=r.cy.zoom();return t*e}function _y(r,e,t,a,n){var i=a*t+e.x,s=n*t+e.y;return s=Math.round(r.canvasHeight-s),[i,s]}function Gy(r){return r.pstyle("background-fill").value!=="solid"||r.pstyle("background-image").strValue!=="none"?!1:r.pstyle("border-width").value===0||r.pstyle("border-opacity").value===0?!0:r.pstyle("border-style").value==="solid"}function Hy(r,e){if(r.length!==e.length)return!1;for(var t=0;t>0&255)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function Wy(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function $y(r,e){var t=r.createTexture();return t.buffer=function(a){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,a),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}function Df(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function Bf(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function Uy(r,e,t,a,n,i){switch(e){case r.FLOAT:return new Float32Array(t.buffer,i*a,n);case r.INT:return new Int32Array(t.buffer,i*a,n)}}function Ky(r,e,t,a){var n=Df(r,e),i=rr(n,2),s=i[0],o=i[1],l=Bf(r,o,a),u=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,u),r.bufferData(r.ARRAY_BUFFER,l,r.STATIC_DRAW),o===r.FLOAT?r.vertexAttribPointer(t,s,o,!1,0,0):o===r.INT&&r.vertexAttribIPointer(t,s,o,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null),u}function Fr(r,e,t,a){var n=Df(r,t),i=rr(n,3),s=i[0],o=i[1],l=i[2],u=Bf(r,o,e*s),v=s*l,f=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,f),r.bufferData(r.ARRAY_BUFFER,e*v,r.DYNAMIC_DRAW),r.enableVertexAttribArray(a),o===r.FLOAT?r.vertexAttribPointer(a,s,o,!1,v,0):o===r.INT&&r.vertexAttribIPointer(a,s,o,v,0),r.vertexAttribDivisor(a,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;hs&&(o=s/a,l=a*o,u=n*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(t,a,n){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(a),v=u.scale,f=u.texW,c=u.texH,h=function(b,w){if(n&&w){var E=w.context,C=b.x,x=b.row,T=C,S=l*x;E.save(),E.translate(T,S),E.scale(v,v),n(E,a),E.restore()}},d=[null,null],m=function(){h(i.freePointer,i.canvas),d[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:c},d[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},g=function(){var b=i.scratch,w=i.canvas;b.clear(),h({x:0,row:0},b);var E=s-i.freePointer.x,C=f-E,x=l;{var T=i.freePointer.x,S=i.freePointer.row*l,P=E;w.context.drawImage(b,0,0,P,x,T,S,P,x),d[0]={x:T,y:S,w:P,h:c}}{var D=E,A=(i.freePointer.row+1)*l,B=C;w&&w.context.drawImage(b,D,0,B,x,0,A,B,x),d[1]={x:0,y:A,w:B,h:c}}i.freePointer.x=C,i.freePointer.row++},p=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)m();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(p(),m()):this.enableWrapping?g():(p(),m())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(t){if(this.locked)return!1;var a=this.texSize,n=this.texRows,i=this.getScale(t),s=i.texW;return this.freePointer.x+s>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},i=n.forceRedraw,s=i===void 0?!1:i,o=n.filterEle,l=o===void 0?function(){return!0}:o,u=n.filterType,v=u===void 0?function(){return!0}:u,f=!1,c=!1,h=kr(t),d;try{for(h.s();!(d=h.n()).done;){var m=d.value;if(l(m)){var g=kr(this.renderTypes.values()),p;try{var y=function(){var w=p.value,E=w.type;if(v(E)){var C=a.collections.get(w.collection),x=w.getKey(m),T=Array.isArray(x)?x:[x];if(s)T.forEach(function(A){return C.markKeyForGC(A)}),c=!0;else{var S=w.getID?w.getID(m):m.id(),P=a._key(E,S),D=a.typeAndIdToKey.get(P);D!==void 0&&!Hy(T,D)&&(f=!0,a.typeAndIdToKey.delete(P),D.forEach(function(A){return C.markKeyForGC(A)}))}}};for(g.s();!(p=g.n()).done;)y()}catch(b){g.e(b)}finally{g.f()}}}}catch(b){h.e(b)}finally{h.f()}return c&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var t=kr(this.collections.values()),a;try{for(t.s();!(a=t.n()).done;){var n=a.value;n.gc()}}catch(i){t.e(i)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,a,n,i){var s=this.renderTypes.get(a),o=this.collections.get(s.collection),l=!1,u=o.draw(i,n,function(c){s.drawClipped?(c.save(),c.beginPath(),c.rect(0,0,n.w,n.h),c.clip(),s.drawElement(c,t,n,!0,!0),c.restore()):s.drawElement(c,t,n,!0,!0),l=!0});if(l){var v=s.getID?s.getID(t):t.id(),f=this._key(a,v);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(i):this.typeAndIdToKey.set(f,[i])}return u}},{key:"getAtlasInfo",value:function(t,a){var n=this,i=this.renderTypes.get(a),s=i.getKey(t),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=i.getBoundingBox(t,l),v=n.getOrCreateAtlas(t,a,u,l),f=v.getOffsets(l),c=rr(f,2),h=c[0],d=c[1];return{atlas:v,tex:h,tex1:h,tex2:d,bb:u}})}},{key:"getDebugInfo",value:function(){var t=[],a=kr(this.collections),n;try{for(a.s();!(n=a.n()).done;){var i=rr(n.value,2),s=i[0],o=i[1],l=o.getCounts(),u=l.keyCount,v=l.atlasCount;t.push({type:s,keyCount:u,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return t}}])}(),tm=function(){function r(e){dt(this,r),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return ht(r,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,a){return a})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(t):!0}},{key:"getAtlasIndexForBatch",value:function(t){var a=this.batchAtlases.indexOf(t);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),a=this.batchAtlases.length-1}return a}}])}(),am=` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,nm=` + float rectangleSD(vec2 p, vec2 b) { + vec2 d = abs(p)-b; + return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); + } +`,im=` + float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { + cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; + cr.x = (p.y > 0.0) ? cr.x : cr.y; + vec2 q = abs(p) - b + cr.x; + return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; + } +`,sm=` + float ellipseSD(vec2 p, vec2 ab) { + p = abs( p ); // symmetry + + // find root with Newton solver + vec2 q = ab*(p-ab); + float w = (q.x1.0) ? d : -d; + } +`,Ea={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},An={IGNORE:1,USE_BB:2},Cs=0,$l=1,Ul=2,Ts=3,qt=4,sn=5,ga=6,pa=7,om=function(){function r(e,t,a){dt(this,r),this.r=e,this.gl=t,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Vy,this.atlasManager=new rm(e,a),this.batchManager=new tm(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Ea.SCREEN),this.pickingProgram=this._createShaderProgram(Ea.PICKING),this.vao=this._createVAO()}return ht(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addTextureAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"addSimpleShapeRenderType",value:function(t,a){this.simpleShapeOptions.set(t,a)}},{key:"invalidate",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(t,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var a=this.gl,n=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; // a vertex from the unit square + + in mat3 aTransform; // used to transform verticies, eg into a bounding box + in int aVertType; // the type of thing we are rendering + + // the z-index that is output when using picking mode + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex; // x/y/w/h of texture in atlas + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in vec2 aLineWidth; // also used for node border width + + // simple shapes + in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] + in vec4 aColor; // also used for edges + in vec4 aBorderColor; // aLineWidth is used for border width + + // output values passed to the fragment shader + out vec2 vTexCoord; + out vec4 vColor; + out vec2 vPosition; + // flat values are not interpolated + flat out int vAtlasId; + flat out int vVertType; + flat out vec2 vTopRight; + flat out vec2 vBotLeft; + flat out vec4 vCornerRadius; + flat out vec4 vBorderColor; + flat out vec2 vBorderWidth; + flat out vec4 vIndex; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; // TODO make this a vec3, simplifies some code below + + if(aVertType == `.concat(Cs,`) { + float texX = aTex.x; // texture coordinates + float texY = aTex.y; + float texW = aTex.z; + float texH = aTex.w; + + if(vid == 1 || vid == 2 || vid == 4) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(qt," || aVertType == ").concat(pa,` + || aVertType == `).concat(sn," || aVertType == ").concat(ga,`) { // simple shapes + + // the bounding box is needed by the fragment shader + vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat + vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat + vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated + + // calculations are done in the fragment shader, just pass these along + vColor = aColor; + vCornerRadius = aCornerRadius; + vBorderColor = aBorderColor; + vBorderWidth = aLineWidth; + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat($l,`) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + // stretch the unit square into a long skinny rectangle + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == `).concat(Ul,`) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0, p1, p2, pos; + if(position.x == 0.0) { // The left side of the unit square + p0 = pointA; + p1 = pointB; + p2 = pointC; + pos = position; + } else { // The right side of the unit square, use same approach but flip the geometry upside down + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth[0]; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vColor = aColor; + } + else if(aVertType == `).concat(Ts,` && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vVertType = aVertType; + vIndex = aIndex; + } + `),i=this.batchManager.getIndexArray(),s=`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` + `),` + + uniform vec4 uBGColor; + uniform float uZoom; + + in vec2 vTexCoord; + in vec4 vColor; + in vec2 vPosition; // model coordinates + + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + flat in vec2 vTopRight; + flat in vec2 vBotLeft; + flat in vec4 vCornerRadius; + flat in vec4 vBorderColor; + flat in vec2 vBorderWidth; + + out vec4 outColor; + + `).concat(am,` + `).concat(nm,` + `).concat(im,` + `).concat(sm,` + + vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha + return vec4( + top.rgb + (bot.rgb * (1.0 - top.a)), + top.a + (bot.a * (1.0 - top.a)) + ); + } + + vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance + // scale to the zoom level so that borders don't look blurry when zoomed in + // note 1.5 is an aribitrary value chosen because it looks good + return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); + } + + void main(void) { + if(vVertType == `).concat(Cs,`) { + // look up the texel from the texture unit + `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` + else `),` + } + else if(vVertType == `).concat(Ts,`) { + // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; + outColor = blend(vColor, uBGColor); + outColor.a = 1.0; // make opaque, masks out line under arrow + } + else if(vVertType == `).concat(qt,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done + } + else if(vVertType == `).concat(qt," || vVertType == ").concat(pa,` + || vVertType == `).concat(sn," || vVertType == ").concat(ga,`) { // use SDF + + float outerBorder = vBorderWidth[0]; + float innerBorder = vBorderWidth[1]; + float borderPadding = outerBorder * 2.0; + float w = vTopRight.x - vBotLeft.x - borderPadding; + float h = vTopRight.y - vBotLeft.y - borderPadding; + vec2 b = vec2(w/2.0, h/2.0); // half width, half height + vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center + + float d; // signed distance + if(vVertType == `).concat(qt,`) { + d = rectangleSD(p, b); + } else if(vVertType == `).concat(pa,` && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == `).concat(pa,`) { + d = ellipseSD(p, b); + } else { + d = roundRectangleSD(p, b, vCornerRadius.wzyx); + } + + // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling + // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box + if(d > 0.0) { + if(d > outerBorder) { + discard; + } else { + outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); + } + } else { + if(d > innerBorder) { + vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; + vec4 innerBorderColor = blend(vBorderColor, vColor); + outColor = distInterp(innerBorderColor, outerColor, d); + } + else { + vec4 outerColor; + if(innerBorder == 0.0 && outerBorder == 0.0) { + outerColor = vec4(0); + } else if(innerBorder == 0.0) { + outerColor = vBorderColor; + } else { + outerColor = blend(vBorderColor, vColor); + } + outColor = distInterp(vColor, outerColor, d - innerBorder); + } + } + } + else { + outColor = vColor; + } + + `).concat(t.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `),o=Fy(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.aCornerRadius=a.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=a.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uZoom=a.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:Ea.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,a){return t.visible()?a&&a.isVisible?a.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(n);if(this._isVisible(t,o)){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(t);if(l===An.IGNORE)return;if(l==An.USE_BB){this.drawPickingRectangle(t,a,n);return}}var u=i.getAtlasInfo(t,n),v=kr(u),f;try{for(v.s();!(f=v.n()).done;){var c=f.value,h=c.atlas,d=c.tex1,m=c.tex2;s.canAddToCurrentBatch(h)||this.endBatch();for(var g=s.getAtlasIndexForBatch(h),p=0,y=[[d,!0],[m,!1]];p=this.maxInstances&&this.endBatch()}}}}catch(D){v.e(D)}finally{v.f()}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),i){var l=i.bb,u=i.tex1,v=i.tex2,f=u.w/(u.w+v.w);s||(f=1-f);var c=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(a,c,n,t)}else{var h=n.getBoundingBox(t),d=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(a,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var s,o;Hl(t);var l=n.getRotation?n.getRotation(i):0;if(l!==0){var u=n.getRotationPoint(i),v=u.x,f=u.y;yn(t,t,[v,f]),Wl(t,t,l);var c=n.getRotationOffset(i);s=c.x+(a.xOffset||0),o=c.y+(a.yOffset||0)}else s=a.x1,o=a.y1;yn(t,t,[s,o]),Ws(t,t,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(t,a,n,i){var s=t.x1,o=t.y1,l=t.w,u=t.h,v=t.yOffset;a&&(s-=a,o-=a,l+=2*a,u+=2*a);var f=0,c=l*i;return n&&i<1?l=c:!n&&i<1&&(f=l-c,s+=f,l=c),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:v}}},{key:"drawPickingRectangle",value:function(t,a,n){var i=this.atlasManager.getRenderTypeOpts(n),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=qt;var o=this.indexBuffer.getView(s);Vt(a,o);var l=this.colorBuffer.getView(s);wt([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,u,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(t,i)){var s=i.shapeProps,o=this._getVertTypeForShape(t,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(t)){this.drawTexture(t,a,n);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===sn||o===ga){var u=i.getBoundingBox(t),v=this._getCornerRadius(t,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=v,f[1]=v,f[2]=v,f[3]=v,o===ga&&(f[0]=0,f[2]=0)}var c=this.indexBuffer.getView(l);Vt(a,c);var h=t.pstyle(s.color).value,d=t.pstyle(s.opacity).value,m=this.colorBuffer.getView(l);wt(h,d,m);var g=this.lineWidthBuffer.getView(l);if(g[0]=0,g[1]=0,s.border){var p=t.pstyle("border-width").value;if(p>0){var y=t.pstyle("border-color").value,b=t.pstyle("border-opacity").value,w=this.borderColorBuffer.getView(l);wt(y,b,w);var E=t.pstyle("border-position").value;if(E==="inside")g[0]=0,g[1]=-p;else if(E==="outside")g[0]=p,g[1]=0;else{var C=p/2;g[0]=C,g[1]=-C}}}var x=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(t,x,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(t,a){var n=t.pstyle(a).value;switch(n){case"rectangle":return qt;case"ellipse":return pa;case"roundrectangle":case"round-rectangle":return sn;case"bottom-round-rectangle":return ga;default:return}}},{key:"_getCornerRadius",value:function(t,a,n){var i=n.w,s=n.h;if(t.pstyle(a).value==="auto")return lt(i,s);var o=t.pstyle(a).pfValue,l=i/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(t,a,n){if(t.visible()){var i=t._private.rscratch,s,o,l;if(n==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=t.pstyle(n+"-arrow-shape").value;if(u!=="none"){var v=t.pstyle(n+"-arrow-color").value,f=t.pstyle("opacity").value,c=t.pstyle("line-opacity").value,h=f*c,d=t.pstyle("width").pfValue,m=t.pstyle("arrow-scale").value,g=this.r.getArrowWidth(d,m),p=this.instanceCount,y=this.transformBuffer.getMatrixView(p);Hl(y),yn(y,y,[s,o]),Ws(y,y,[g,g]),Wl(y,y,l),this.vertTypeBuffer.getView(p)[0]=Ts;var b=this.indexBuffer.getView(p);Vt(a,b);var w=this.colorBuffer.getView(p);wt(v,h,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(t,a){if(t.visible()){var n=this._getEdgePoints(t);if(n){var i=t.pstyle("opacity").value,s=t.pstyle("line-opacity").value,o=t.pstyle("width").pfValue,l=t.pstyle("line-color").value,u=i*s;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=$l;var f=this.indexBuffer.getView(v);Vt(a,f);var c=this.colorBuffer.getView(v);wt(l,u,c);var h=this.lineWidthBuffer.getView(v);h[0]=o;var d=this.pointAPointBBuffer.getView(v);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var m=0;m=this.maxInstances&&this.endBatch()}}}}},{key:"_getEdgePoints",value:function(t){var a=t._private.rscratch;if(!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))){var n=a.allpts;if(n.length==4)return n;var i=this._getNumSegments(t);return this._getCurveSegmentPoints(n,i)}}},{key:"_getNumSegments",value:function(t){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,a){if(t.length==4)return t;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=t[0],n[1]=t[1];else if(i==a)n[i*2]=t[t.length-2],n[i*2+1]=t[t.length-1];else{var s=i/a;this._setCurvePoint(t,s,n,i*2)}return n}},{key:"_setCurvePoint",value:function(t,a,n,i){if(t.length<=2)n[i]=t[0],n[i+1]=t[1];else{for(var s=Array(t.length-2),o=0;o0}},o=function(f){var c=f.pstyle("text-events").strValue==="yes";return c?An.USE_BB:An.IGNORE},l=function(f){var c=f.position(),h=c.x,d=c.y,m=f.outerWidth(),g=f.outerHeight();return{w:m,h:g,x1:h-m/2,y1:d-g/2}};t.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),t.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),t.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),t.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:Gy,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),t.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),t.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),t.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:Ss(e.getLabelKey,null),getBoundingBox:ks(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),t.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:Ss(e.getSourceLabelKey,"source"),getBoundingBox:ks(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),t.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:Ss(e.getTargetLabelKey,"target"),getBoundingBox:ks(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var u=Fa(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(v,f){var c=!1;f&&f.length>0&&(c|=t.drawing.invalidate(f)),c&&u()}),lm(t)};function um(r){var e=r.cy.container(),t=e&&e.style&&e.style.backgroundColor||"white";return av(t)}function Af(r,e){var t=r._private.rscratch;return Tr(t,"labelWrapCachedLines",e)||[]}var Ss=function(e,t){return function(a){var n=e(a),i=Af(a,t);return i.length>1?i.map(function(s,o){return"".concat(n,"_").concat(o)}):n}},ks=function(e,t){return function(a,n){var i=e(a);if(typeof n=="string"){var s=n.indexOf("_");if(s>0){var o=Number(n.substring(s+1)),l=Af(a,t),u=i.h/l.length,v=u*o,f=i.y1+v;return{x1:i.x1,w:i.w,y1:f,h:u,yOffset:v}}}return i}};function lm(r){{var e=r.render;r.render=function(i){i=i||{};var s=r.cy;r.webgl&&(s.zoom()>Ef?(vm(r),e.call(r,i)):(fm(r),Mf(r,i,Ea.SCREEN)))}}{var t=r.matchCanvasSize;r.matchCanvasSize=function(i){t.call(r,i),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(i,s,o,l){return ym(r,i,s)};{var a=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){a.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var n=r.notify;r.notify=function(i,s){n.call(r,i,s),i==="viewport"||i==="bounds"?r.pickingFrameBuffer.needsDraw=!0:i==="background"&&r.drawing.invalidate(s,{type:"node-body"})}}}function vm(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function fm(r){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,r.canvasWidth,r.canvasHeight),a.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}function cm(r){var e=r.canvasWidth,t=r.canvasHeight,a=bo(r),n=a.pan,i=a.zoom,s=Es();yn(s,s,[n.x,n.y]),Ws(s,s,[i,i]);var o=Es();Qy(o,e,t);var l=Es();return Zy(l,o,s),l}function Rf(r,e){var t=r.canvasWidth,a=r.canvasHeight,n=bo(r),i=n.pan,s=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,a),e.translate(i.x,i.y),e.scale(s,s)}function dm(r,e){r.drawSelectionRectangle(e,function(t){return Rf(r,t)})}function hm(r){var e=r.data.contexts[r.NODE];e.save(),Rf(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function gm(r){var e=function(n,i,s){for(var o=n.atlasManager.getAtlasCollection(i),l=r.data.contexts[r.NODE],u=o.atlases,v=0;v=0&&w.add(x)}return w}function ym(r,e,t){var a=pm(r,e,t),n=r.getCachedZSortedEles(),i,s,o=kr(a),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,v=n[u];if(!i&&v.isNode()&&(i=v),!s&&v.isEdge()&&(s=v),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function Ds(r,e,t){var a=r.drawing;e+=1,t.isNode()?(a.drawNode(t,e,"node-underlay"),a.drawNode(t,e,"node-body"),a.drawTexture(t,e,"label"),a.drawNode(t,e,"node-overlay")):(a.drawEdgeLine(t,e),a.drawEdgeArrow(t,e,"source"),a.drawEdgeArrow(t,e,"target"),a.drawTexture(t,e,"label"),a.drawTexture(t,e,"edge-source-label"),a.drawTexture(t,e,"edge-target-label"))}function Mf(r,e,t){var a;r.webglDebug&&(a=performance.now());var n=r.drawing,i=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&dm(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var s=r.data.contexts[r.WEBGL];t.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=cm(r),l=r.getCachedZSortedEles();if(i=l.length,n.startFrame(o,t),t.screen){for(var u=0;u0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(r.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var m=e.pan(),g={x:m.x*u,y:m.y*u};u*=e.zoom(),h.translate(g.x,g.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-g.x,-g.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,i,s),h.fill())}return c};function mm(r,e){for(var t=atob(r),a=new ArrayBuffer(t.length),n=new Uint8Array(a),i=0;i"u"?"undefined":ar(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var a=this.cy.window(),n=a.document;t=n.createElement("canvas"),t.width=r,t.height=e}return t};[Tf,Hr,Jr,mo,Mt,pt,xr,Pf,yt,Wa,Of].forEach(function(r){pe(Ce,r)});var xm=[{name:"null",impl:vf},{name:"base",impl:wf},{name:"canvas",impl:bm}],Em=[{type:"layout",extensions:Xp},{type:"renderer",extensions:xm}],zf={},Ff={};function Vf(r,e,t){var a=t,n=function(T){Ie("Can not register `"+e+"` for `"+r+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(Ra.prototype[e])return n(e);Ra.prototype[e]=t}else if(r==="collection"){if(fr.prototype[e])return n(e);fr.prototype[e]=t}else if(r==="layout"){for(var i=function(T){this.options=T,t.call(this,T),Re(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(t.prototype),o=[],l=0;l{b.clear(),J.clear(),f.clear()},"clear"),O=p((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=p((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=p((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=p((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=p((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=p((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=p(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=p((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",E(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=p((e,t)=>{var c,a;if(i.warn("extractor - ",t,E(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",E(e)),G(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",E(v)),i.debug("Old graph after copy",E(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=p((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=p(e=>M(e,e.children()),"sortNodesByHierarchy"),j=p(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",E(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const w=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX +import{_ as p,an as F,ao as Y,ap as _,aq as H,l as i,c as V,ar as q,as as U,a9 as $,ae as z,aa as P,a8 as K,at as Q,au as W,av as Z}from"./mermaid-vendor-DOoA-Fcm.js";import{G as B}from"./graph-C9TLhZpq.js";import{l as I}from"./layout-CSejuzzT.js";import{i as x}from"./_baseUniq-DHoNBBvA.js";import{c as L}from"./clone-DMtoZDWc.js";import{m as A}from"./_basePickBy-enj1kD1i.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";function E(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return x(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return x(n)||(c.value=n),x(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return x(t.name)||(o.name=t.name),x(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=p(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=p((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=p((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=p((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const h=t.edge(l.v,l.w,l.name);i.info("Edge data",h,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,h,l.name),n.setEdge(l.v,l.w,h,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=p((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=p((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(h=>l.v===h.v&&l.w===h.w))},"findCommonEdges"),D=p((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=p(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=p((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",E(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=p((e,t)=>{var c,a;if(i.warn("extractor - ",t,E(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const h=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",E(e)),G(r,e,h,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:h}),i.warn("New graph after copy node: (",r,")",E(h)),i.debug("Old graph after copy",E(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=p((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=p(e=>M(e,e.children()),"sortNodesByHierarchy"),j=p(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",E(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const w=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,w.height,` -Parent cluster`,c.height),t.setNode(c.id,w),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,w))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:w,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:w+25,nodesep:m});const N=await j(g,s.graph,n,o,t.node(d),a),S=N.elem;U(s,S),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),$(S,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await q(g,t.node(d),{config:a,dir:r}))})),await p(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(E(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(E(t)));let y=0,{subGraphTitleTotalMargin:X}=z(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=X,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=X,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,N=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=N-m||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",m),await K(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=X/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=X/2);const w=t.node(d.v);var m=t.node(d.w);const N=Q(v,s,f,n,w,m,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(y=s.diff)}),i.warn("Returning from recursive render XAX",u,y),{elem:u,diff:y}},"recursiveRender"),pe=p(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const h=g.start,y=h+"---"+h+"---1",X=h+"---"+h+"---2",d=n.node(h);n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(y,d.parentId),n.setNode(X,{domId:X,id:X,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(X,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=h+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=h+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=h,m.toCluster=h),m.id=h+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(h,y,s,h+"-cyclic-special-0"),n.setEdge(y,X,w,h+"-cyclic-special-1"),n.setEdge(X,h,m,h+"-cyc0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await p(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(E(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(E(t)));let y=0,{subGraphTitleTotalMargin:X}=z(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=X,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=X,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,N=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=N-m||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",m),await K(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=X/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=X/2);const w=t.node(d.v);var m=t.node(d.w);const N=Q(h,s,f,n,w,m,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(y=s.diff)}),i.warn("Returning from recursive render XAX",u,y),{elem:u,diff:y}},"recursiveRender"),pe=p(async(e,t)=>{var a,r,u,l,h,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(h=e.config)==null?void 0:h.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const v=g.start,y=v+"---"+v+"---1",X=v+"---"+v+"---2",d=n.node(v);n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(y,d.parentId),n.setNode(X,{domId:X,id:X,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(X,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=v+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=v+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=v,m.toCluster=v),m.id=v+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(v,y,s,v+"-cyclic-special-0"),n.setEdge(y,X,w,v+"-cyclic-special-1"),n.setEdge(X,v,m,v+"-cycstructuredClone(Ce)),we=p(()=>{const n=Se,a=U();return K({...n.treemap,...a.treemap??{}})},"getConfig"),Le=p(()=>C.records.nodes,"getNodes"),$e=p((n,a)=>{const c=C.records;c.nodes.push(n),c.levels.set(n,a),a===0&&c.outerNodes.push(n),a===0&&!c.root&&(c.root=n)},"addNode"),Te=p(()=>({name:"",children:C.records.outerNodes}),"getRoot"),Fe=p((n,a)=>{const c=C.records.classes,r=c.get(n)??{id:n,styles:[],textStyles:[]};c.set(n,r);const i=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(s=>{ge(s)&&(r!=null&&r.textStyles?r.textStyles.push(s):r.textStyles=[s]),r!=null&&r.styles?r.styles.push(s):r.styles=[s]}),c.set(n,r)},"addClass"),ze=p(()=>C.records.classes,"getClasses"),Ne=p(n=>{var a;return((a=C.records.classes.get(n))==null?void 0:a.styles)??[]},"getStylesForClass"),ke=p(()=>{ye(),C.reset()},"clear"),D={getNodes:Le,addNode:$e,getRoot:Te,getConfig:we,clear:ke,setAccTitle:pe,getAccTitle:de,setDiagramTitle:ie,getDiagramTitle:ce,getAccDescription:oe,setAccDescription:ne,addClass:Fe,getClasses:ze,getStylesForClass:Ne};function J(n){if(!n.length)return[];const a=[],c=[];return n.forEach(r=>{const i={name:r.name,children:r.type==="Leaf"?void 0:[]};for(i.classSelector=r==null?void 0:r.classSelector,r!=null&&r.cssCompiledStyles&&(i.cssCompiledStyles=[r.cssCompiledStyles]),r.type==="Leaf"&&r.value!==void 0&&(i.value=r.value);c.length>0&&c[c.length-1].level>=r.level;)c.pop();if(c.length===0)a.push(i);else{const s=c[c.length-1].node;s.children?s.children.push(i):s.children=[i]}r.type!=="Leaf"&&c.push({node:i,level:r.level})}),a}p(J,"buildHierarchy");var Pe=p(n=>{xe(n,D);const a=[];for(const i of n.TreemapRows??[])i.$type==="ClassDefStatement"&&D.addClass(i.className??"",i.styleText??"");for(const i of n.TreemapRows??[]){const s=i.item;if(!s)continue;const S=i.indent?parseInt(i.indent):0,T=Ae(s),F=s.classSelector?D.getStylesForClass(s.classSelector):[],l=F.length>0?F.join(";"):void 0,z={level:S,name:T,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:l};a.push(z)}const c=J(a),r=p((i,s)=>{for(const S of i)D.addNode(S,s),S.children&&S.children.length>0&&r(S.children,s+1)},"addNodesRecursively");r(c,0)},"populate"),Ae=p(n=>n.name?String(n.name):"","getItemName"),Ve={parse:p(async n=>{try{const c=await ve("treemap",n);G.debug("Treemap AST:",c),Pe(c)}catch(a){throw G.error("Error parsing treemap:",a),a}},"parse")},We=10,$=10,M=25,Me=p((n,a,c,r)=>{const i=r.db,s=i.getConfig(),S=s.padding??We,T=i.getDiagramTitle(),F=i.getRoot(),{themeVariables:l}=U();if(!F)return;const z=T?30:0,N=he(a),O=s.nodeWidth?s.nodeWidth*$:960,X=s.nodeHeight?s.nodeHeight*$:500,R=O,Y=X+z;N.attr("viewBox",`0 0 ${R} ${Y}`),me(N,Y,R,s.useMaxWidth);let x;try{const e=s.valueFormat||",";if(e==="$0,0")x=p(t=>"$"+W(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),o=t?t[0]:"";x=p(h=>"$"+W(","+o)(h),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);x=p(o=>"$"+W(t||"")(o),"valueFormat")}else x=W(e)}catch(e){G.error("Error creating format function:",e),x=W(",")}const k=B().range(["transparent",l.cScale0,l.cScale1,l.cScale2,l.cScale3,l.cScale4,l.cScale5,l.cScale6,l.cScale7,l.cScale8,l.cScale9,l.cScale10,l.cScale11]),Q=B().range(["transparent",l.cScalePeer0,l.cScalePeer1,l.cScalePeer2,l.cScalePeer3,l.cScalePeer4,l.cScalePeer5,l.cScalePeer6,l.cScalePeer7,l.cScalePeer8,l.cScalePeer9,l.cScalePeer10,l.cScalePeer11]),E=B().range([l.cScaleLabel0,l.cScaleLabel1,l.cScaleLabel2,l.cScaleLabel3,l.cScaleLabel4,l.cScaleLabel5,l.cScaleLabel6,l.cScaleLabel7,l.cScaleLabel8,l.cScaleLabel9,l.cScaleLabel10,l.cScaleLabel11]);T&&N.append("text").attr("x",R/2).attr("y",z/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(T);const j=N.append("g").attr("transform",`translate(0, ${z})`).attr("class","treemapContainer"),Z=ue(F).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),q=fe().size([O,X]).paddingTop(e=>e.children&&e.children.length>0?M+$:0).paddingInner(S).paddingLeft(e=>e.children&&e.children.length>0?$:0).paddingRight(e=>e.children&&e.children.length>0?$:0).paddingBottom(e=>e.children&&e.children.length>0?$:0).round(!0)(Z),ee=q.descendants().filter(e=>e.children&&e.children.length>0),P=j.selectAll(".treemapSection").data(ee).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),P.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),P.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>k(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>Q(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),P.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+E(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=H(this),o=e.data.name;t.text(o);const h=e.x1-e.x0,f=6;let g;s.showValues!==!1&&e.value?g=h-10-30-10-f:g=h-f-6;const y=Math.max(15,g),d=t.node();if(d.getComputedTextLength()>y){const m="...";let u=o;for(;u.length>0;){if(u=o.substring(0,u.length-1),u.length===0){t.text(m),d.getComputedTextLength()>y&&t.text("");break}if(t.text(u+m),d.getComputedTextLength()<=y)break}}}),s.showValues!==!1&&P.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?x(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+E(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")});const te=q.leaves(),_=j.selectAll(".treemapLeafGroup").data(te).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);_.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr("stroke-width",3),_.append("clipPath").attr("id",(e,t)=>`clip-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),_.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+E(e.data.name)+";",o=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){const t=H(this),o=e.x1-e.x0,h=e.y1-e.y0,f=t.node(),g=4,w=o-2*g,y=h-2*g;if(w<10||y<10){t.style("display","none");return}let d=parseInt(t.style("font-size"),10);const b=8,m=28,u=.6,v=6,A=2;for(;f.getComputedTextLength()>w&&d>b;)d--,t.style("font-size",`${d}px`);let V=Math.max(v,Math.min(m,Math.round(d*u))),I=d+A+V;for(;I>y&&d>b&&(d--,V=Math.max(v,Math.min(m,Math.round(d*u))),!(Vw||d(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const o="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+E(t.data.name)+";",h=L({cssCompiledStyles:t.data.cssCompiledStyles});return o+h.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,o)=>`url(#clip-${a}-${o})`).text(t=>t.value?x(t.value):"").each(function(t){const o=H(this),h=this.parentNode;if(!h){o.style("display","none");return}const f=H(h).select(".treemapLabel");if(f.empty()||f.style("display")==="none"){o.style("display","none");return}const g=parseFloat(f.style("font-size")),w=28,y=.6,d=6,b=2,m=Math.max(d,Math.min(w,Math.round(g*y)));o.style("font-size",`${m}px`);const v=(t.y1-t.y0)/2+g/2+b;o.attr("y",v);const A=t.x1-t.x0,le=t.y1-t.y0-4,se=A-2*4;o.node().getComputedTextLength()>se||v+m>le||m{const a=K(_e,n);return` + .treemapNode.section { + stroke: ${a.sectionStrokeColor}; + stroke-width: ${a.sectionStrokeWidth}; + fill: ${a.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${a.leafStrokeColor}; + stroke-width: ${a.leafStrokeWidth}; + fill: ${a.leafFillColor}; + } + .treemapLabel { + fill: ${a.labelColor}; + font-size: ${a.labelFontSize}; + } + .treemapValue { + fill: ${a.valueColor}; + font-size: ${a.valueFontSize}; + } + .treemapTitle { + fill: ${a.titleColor}; + font-size: ${a.titleFontSize}; + } + `},"getStyles"),Re=He,at={parser:Ve,db:D,renderer:Ee,styles:Re};export{at as diagram}; diff --git a/lightrag/api/webui/assets/diagram-5UYTHUR4-BI5BPMV3.js b/lightrag/api/webui/assets/diagram-5UYTHUR4-BI5BPMV3.js new file mode 100644 index 00000000..dee2932f --- /dev/null +++ b/lightrag/api/webui/assets/diagram-5UYTHUR4-BI5BPMV3.js @@ -0,0 +1,24 @@ +import{p as y}from"./chunk-353BL4L5-Dc2iugoC.js";import{_ as l,s as B,g as S,t as z,q as F,a as P,b as E,F as v,K as W,e as T,z as D,G as _,H as A,l as w}from"./mermaid-vendor-DOoA-Fcm.js";import{p as N}from"./treemap-6Y5VK53G-DD2bKuQl.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";import"./_baseUniq-DHoNBBvA.js";import"./_basePickBy-enj1kD1i.js";import"./clone-DMtoZDWc.js";var x={packet:[]},m=structuredClone(x),L=A.packet,Y=l(()=>{const t=v({...L,..._().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),G=l(()=>m.packet,"getPacket"),H=l(t=>{t.length>0&&m.packet.push(t)},"pushWord"),I=l(()=>{D(),m=structuredClone(x)},"clear"),u={pushWord:H,getPacket:G,getConfig:Y,clear:I,setAccTitle:E,getAccTitle:P,setDiagramTitle:F,getDiagramTitle:z,getAccDescription:S,setAccDescription:B},K=1e4,M=l(t=>{y(t,u);let e=-1,o=[],i=1;const{bitsPerRow:s}=u.getConfig();for(let{start:a,end:r,bits:c,label:f}of t.blocks){if(a!==void 0&&r!==void 0&&r{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*o)return[t,void 0];const i=e*o-1,s=e*o;return[{start:t.start,end:i,label:t.label,bits:i-t.start},{start:s,end:t.end,label:t.label,bits:t.end-s}]},"getNextFittingBlock"),q={parse:l(async t=>{const e=await N("packet",t);w.debug(e),M(e)},"parse")},R=l((t,e,o,i)=>{const s=i.db,a=s.getConfig(),{rowHeight:r,paddingY:c,bitWidth:f,bitsPerRow:d}=a,p=s.getPacket(),n=s.getDiagramTitle(),k=r+c,g=k*(p.length+1)-(n?0:r),b=f*d+2,h=W(e);h.attr("viewbox",`0 0 ${b} ${g}`),T(h,g,b,a.useMaxWidth);for(const[C,$]of p.entries())U(h,$,C,a);h.append("text").text(n).attr("x",b/2).attr("y",g-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=l((t,e,o,{rowHeight:i,paddingX:s,paddingY:a,bitWidth:r,bitsPerRow:c,showBits:f})=>{const d=t.append("g"),p=o*(i+a)+a;for(const n of e){const k=n.start%c*r+1,g=(n.end-n.start+1)*r-s;if(d.append("rect").attr("x",k).attr("y",p).attr("width",g).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+g/2).attr("y",p+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!f)continue;const b=n.end===n.start,h=p-2;d.append("text").attr("x",k+(b?g/2:0)).attr("y",h).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",b?"middle":"start").text(n.start),b||d.append("text").attr("x",k+g).attr("y",h).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(n.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=l(({packet:t}={})=>{const e=v(j,t);return` + .packetByte { + font-size: ${e.byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `},"styles"),lt={parser:q,db:u,renderer:X,styles:J};export{lt as diagram}; diff --git a/lightrag/api/webui/assets/diagram-SSKATNLV-pBYsrik-.js b/lightrag/api/webui/assets/diagram-SSKATNLV-pBYsrik-.js deleted file mode 100644 index 7476bf1f..00000000 --- a/lightrag/api/webui/assets/diagram-SSKATNLV-pBYsrik-.js +++ /dev/null @@ -1,43 +0,0 @@ -import{p as k}from"./chunk-4BMEZGHF-CAhtCpmT.js";import{_ as l,s as R,g as F,t as I,q as _,a as E,b as D,K as G,z,F as y,G as C,H as P,l as H,Q as V}from"./mermaid-vendor-D0f_SE0h.js";import{p as W}from"./radar-MK3ICKWK-DOAXm8cx.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";import"./_baseUniq-CtAZZJ8e.js";import"./_basePickBy-D3PHsJjq.js";import"./clone-Dm5jEAXQ.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},g=structuredClone(w),B=P.radar,j=l(()=>y({...B,...C().radar}),"getConfig"),b=l(()=>g.axes,"getAxes"),q=l(()=>g.curves,"getCurves"),K=l(()=>g.options,"getOptions"),N=l(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Q=l(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:U(t.entries)}))},"setCurves"),U=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),X=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});g.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??h.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??h.ticks,max:((s=t.max)==null?void 0:s.value)??h.max,min:((o=t.min)==null?void 0:o.value)??h.min,graticule:((i=t.graticule)==null?void 0:i.value)??h.graticule}},"setOptions"),Y=l(()=>{z(),g=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:Q,setOptions:X,getConfig:j,clear:Y,setAccTitle:D,getAccTitle:E,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Z=l(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),J={parse:l(async a=>{const t=await W("radar",a);H.debug(t),Z(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=G(t),p=et(u,c),m=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,m,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const p=2*u*Math.PI/o-Math.PI/2,m=n*Math.cos(p),x=n*Math.sin(p);return`${m},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const p=d.entries.map((m,x)=>{const v=2*Math.PI*x/n-Math.PI/2,f=A(m,r,s,c),O=f*Math.cos(v),S=f*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r{const t=V(),e=C(),r=y(t,e.themeVariables),s=y(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return` - .radarTitle { - font-size: ${t.fontSize}; - color: ${t.titleColor}; - dominant-baseline: hanging; - text-anchor: middle; - } - .radarAxisLine { - stroke: ${e.axisColor}; - stroke-width: ${e.axisStrokeWidth}; - } - .radarAxisLabel { - dominant-baseline: middle; - text-anchor: middle; - font-size: ${e.axisLabelFontSize}px; - color: ${e.axisColor}; - } - .radarGraticule { - fill: ${e.graticuleColor}; - fill-opacity: ${e.graticuleOpacity}; - stroke: ${e.graticuleColor}; - stroke-width: ${e.graticuleStrokeWidth}; - } - .radarLegendText { - text-anchor: start; - font-size: ${e.legendFontSize}px; - dominant-baseline: hanging; - } - ${nt(t,e)} - `},"styles"),ft={parser:J,db:$,renderer:st,styles:it};export{ft as diagram}; diff --git a/lightrag/api/webui/assets/diagram-VNBRO52H-Bu64Jus9.js b/lightrag/api/webui/assets/diagram-VNBRO52H-Bu64Jus9.js deleted file mode 100644 index f975fccc..00000000 --- a/lightrag/api/webui/assets/diagram-VNBRO52H-Bu64Jus9.js +++ /dev/null @@ -1,24 +0,0 @@ -import{p as w}from"./chunk-4BMEZGHF-CAhtCpmT.js";import{_ as n,s as B,g as S,t as F,q as z,a as P,b as W,F as x,K as T,e as D,z as _,G as A,H as E,l as v}from"./mermaid-vendor-D0f_SE0h.js";import{p as N}from"./radar-MK3ICKWK-DOAXm8cx.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";import"./_baseUniq-CtAZZJ8e.js";import"./_basePickBy-D3PHsJjq.js";import"./clone-Dm5jEAXQ.js";var C={packet:[]},h=structuredClone(C),L=E.packet,Y=n(()=>{const t=x({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),G=n(()=>h.packet,"getPacket"),H=n(t=>{t.length>0&&h.packet.push(t)},"pushWord"),I=n(()=>{_(),h=structuredClone(C)},"clear"),m={pushWord:H,getPacket:G,getConfig:Y,clear:I,setAccTitle:W,getAccTitle:P,setDiagramTitle:z,getDiagramTitle:F,getAccDescription:S,setAccDescription:B},K=1e4,M=n(t=>{w(t,m);let e=-1,o=[],s=1;const{bitsPerRow:i}=m.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),q={parse:n(async t=>{const e=await N("packet",t);v.debug(e),M(e)},"parse")},R=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=T(e);f.attr("viewbox",`0 0 ${k} ${d}`),D(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())U(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=x(j,t);return` - .packetByte { - font-size: ${e.byteFontSize}; - } - .packetByte.start { - fill: ${e.startByteColor}; - } - .packetByte.end { - fill: ${e.endByteColor}; - } - .packetLabel { - fill: ${e.labelColor}; - font-size: ${e.labelFontSize}; - } - .packetTitle { - fill: ${e.titleColor}; - font-size: ${e.titleFontSize}; - } - .packetBlock { - stroke: ${e.blockStrokeColor}; - stroke-width: ${e.blockStrokeWidth}; - fill: ${e.blockFillColor}; - } - `},"styles"),it={parser:q,db:m,renderer:X,styles:J};export{it as diagram}; diff --git a/lightrag/api/webui/assets/diagram-ZTM2IBQH-DdeCcMoF.js b/lightrag/api/webui/assets/diagram-ZTM2IBQH-DdeCcMoF.js new file mode 100644 index 00000000..f468d52b --- /dev/null +++ b/lightrag/api/webui/assets/diagram-ZTM2IBQH-DdeCcMoF.js @@ -0,0 +1,43 @@ +import{p as k}from"./chunk-353BL4L5-Dc2iugoC.js";import{_ as l,s as R,g as F,t as I,q as _,a as E,b as D,K as G,z,F as y,G as C,H as P,l as H,Q as V}from"./mermaid-vendor-DOoA-Fcm.js";import{p as W}from"./treemap-6Y5VK53G-DD2bKuQl.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";import"./_baseUniq-DHoNBBvA.js";import"./_basePickBy-enj1kD1i.js";import"./clone-DMtoZDWc.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},g=structuredClone(w),B=P.radar,j=l(()=>y({...B,...C().radar}),"getConfig"),b=l(()=>g.axes,"getAxes"),q=l(()=>g.curves,"getCurves"),K=l(()=>g.options,"getOptions"),N=l(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Q=l(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:U(t.entries)}))},"setCurves"),U=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),X=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});g.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??h.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??h.ticks,max:((s=t.max)==null?void 0:s.value)??h.max,min:((o=t.min)==null?void 0:o.value)??h.min,graticule:((i=t.graticule)==null?void 0:i.value)??h.graticule}},"setOptions"),Y=l(()=>{z(),g=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:Q,setOptions:X,getConfig:j,clear:Y,setAccTitle:D,getAccTitle:E,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Z=l(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),J={parse:l(async a=>{const t=await W("radar",a);H.debug(t),Z(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=G(t),p=et(u,c),m=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,m,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const p=2*u*Math.PI/o-Math.PI/2,m=n*Math.cos(p),x=n*Math.sin(p);return`${m},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const p=d.entries.map((m,x)=>{const v=2*Math.PI*x/n-Math.PI/2,f=A(m,r,s,c),O=f*Math.cos(v),S=f*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r{const t=V(),e=C(),r=y(t,e.themeVariables),s=y(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${e.axisColor}; + stroke-width: ${e.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${e.axisLabelFontSize}px; + color: ${e.axisColor}; + } + .radarGraticule { + fill: ${e.graticuleColor}; + fill-opacity: ${e.graticuleOpacity}; + stroke: ${e.graticuleColor}; + stroke-width: ${e.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${e.legendFontSize}px; + dominant-baseline: hanging; + } + ${nt(t,e)} + `},"styles"),ft={parser:J,db:$,renderer:st,styles:it};export{ft as diagram}; diff --git a/lightrag/api/webui/assets/erDiagram-Q7BY3M3F-BTmP3B4h.js b/lightrag/api/webui/assets/erDiagram-R3QVA2FD-Pi_9scwm.js similarity index 59% rename from lightrag/api/webui/assets/erDiagram-Q7BY3M3F-BTmP3B4h.js rename to lightrag/api/webui/assets/erDiagram-R3QVA2FD-Pi_9scwm.js index 425a389e..897729ad 100644 --- a/lightrag/api/webui/assets/erDiagram-Q7BY3M3F-BTmP3B4h.js +++ b/lightrag/api/webui/assets/erDiagram-R3QVA2FD-Pi_9scwm.js @@ -1,4 +1,4 @@ -import{g as Dt,s as wt}from"./chunk-RZ5BOZE2-B615FLH4.js";import{_ as u,b as Vt,a as Lt,s as Mt,g as Bt,q as Ft,t as Yt,c as tt,l as D,z as Pt,y as zt,B as Gt,C as Kt,D as Zt,p as Ut,r as jt,d as Wt,u as Qt}from"./mermaid-vendor-D0f_SE0h.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";var dt=function(){var s=u(function(R,n,a,c){for(a=a||{},c=R.length;c--;a[R[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],h=[1,10],d=[1,11],o=[1,12],l=[1,13],f=[1,20],_=[1,21],E=[1,22],V=[1,23],Z=[1,24],S=[1,19],et=[1,25],U=[1,26],T=[1,18],L=[1,33],st=[1,34],it=[1,35],rt=[1,36],nt=[1,37],pt=[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],A=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],N=[1,58],P=[1,62],z=[1,64],j=[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],yt=[63,64,65,66,67],ft=[1,81],_t=[1,80],gt=[1,78],bt=[1,79],mt=[6,10,42,47],v=[6,10,13,41,42,47,48,49],W=[1,89],Q=[1,88],X=[1,87],G=[19,56],Et=[1,98],kt=[1,97],at=[19,56,58,60],ct={trace:u(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:u(function(n,a,c,r,p,t,K){var e=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:this.$=t[e].replace(/"/g,"");break;case 55:case 78:this.$=t[e];break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 62:case 63:case 66:this.$=t[e];break;case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 67:this.$=t[e].replace(/"/g,"");break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:L,64:st,65:it,66:rt,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(pt,[2,54]),s(pt,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:A},{16:44,40:O,41:A},{16:45,40:O,41:A},s(i,[2,4]),{11:46,40:S,50:T},{16:47,40:O,41:A},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:S,50:T},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:N,45:59,46:60,48:P,49:z},s(j,[2,37]),s(j,[2,38]),{16:65,40:O,41:A,42:N},{13:F,38:66,41:Y,42:N,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:N,63:L,64:st,65:it,66:rt,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:L,64:st,65:it,66:rt,67:nt},s(yt,[2,74]),s(yt,[2,75]),{6:ft,10:_t,39:77,42:gt,47:bt},{40:[1,82],41:[1,83]},s(mt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(v,[2,45]),s(v,[2,50]),s(v,[2,51]),s(v,[2,52]),s(v,[2,53]),s(i,[2,41],{42:N}),{6:ft,10:_t,39:85,42:gt,47:bt},{14:86,40:W,50:Q,70:X},{16:90,40:O,41:A},{11:91,40:S,50:T},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:Et,60:kt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(j,[2,39]),s(j,[2,40]),s(v,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:N},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:kt}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:A},s(mt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:Q,70:X},{16:112,40:O,41:A},{14:113,40:W,50:Q,70:X},s(i,[2,13]),s(G,[2,61]),{57:114,59:Et},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:N}),s(i,[2,11]),{13:[1,117],42:N},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:W,50:Q,70:X},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:u(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:u(function(n){var a=this,c=[0],r=[],p=[null],t=[],K=this.table,e="",H=0,St=0,It=2,Tt=1,xt=t.slice.call(arguments,1),y=Object.create(this.lexer),I={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(I.yy[lt]=this.yy[lt]);y.setInput(n,I.yy),I.yy.lexer=y,I.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var ot=y.yylloc;t.push(ot);var vt=y.options&&y.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(b){c.length=c.length-2*b,p.length=p.length-b,t.length=t.length-b}u(Ct,"popStack");function Ot(){var b;return b=r.pop()||y.lex()||Tt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}u(Ot,"lex");for(var g,x,m,ht,C={},J,k,At,$;;){if(x=c[c.length-1],this.defaultActions[x]?m=this.defaultActions[x]:((g===null||typeof g>"u")&&(g=Ot()),m=K[x]&&K[x][g]),typeof m>"u"||!m.length||!m[0]){var ut="";$=[];for(J in K[x])this.terminals_[J]&&J>It&&$.push("'"+this.terminals_[J]+"'");y.showPosition?ut="Parse error on line "+(H+1)+`: +import{g as Dt}from"./chunk-BFAMUDN2-DUbWdDRU.js";import{s as wt}from"./chunk-SKB7J2MH-CncvyOyo.js";import{_ as u,b as Vt,a as Lt,s as Mt,g as Bt,q as Ft,t as Yt,c as tt,l as D,z as Pt,y as zt,B as Gt,C as Kt,D as Zt,p as Ut,r as jt,d as Wt,u as Qt}from"./mermaid-vendor-DOoA-Fcm.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";var dt=function(){var s=u(function(R,n,a,c){for(a=a||{},c=R.length;c--;a[R[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],h=[1,10],d=[1,11],o=[1,12],l=[1,13],f=[1,20],_=[1,21],E=[1,22],V=[1,23],Z=[1,24],S=[1,19],et=[1,25],U=[1,26],T=[1,18],L=[1,33],st=[1,34],it=[1,35],rt=[1,36],nt=[1,37],pt=[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],A=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],N=[1,58],P=[1,62],z=[1,64],j=[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],yt=[63,64,65,66,67],ft=[1,81],_t=[1,80],gt=[1,78],bt=[1,79],mt=[6,10,42,47],v=[6,10,13,41,42,47,48,49],W=[1,89],Q=[1,88],X=[1,87],G=[19,56],Et=[1,98],kt=[1,97],at=[19,56,58,60],ct={trace:u(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:u(function(n,a,c,r,p,t,K){var e=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:this.$=t[e].replace(/"/g,"");break;case 55:case 78:this.$=t[e];break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 62:case 63:case 66:this.$=t[e];break;case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 67:this.$=t[e].replace(/"/g,"");break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:L,64:st,65:it,66:rt,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(pt,[2,54]),s(pt,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:A},{16:44,40:O,41:A},{16:45,40:O,41:A},s(i,[2,4]),{11:46,40:S,50:T},{16:47,40:O,41:A},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:S,50:T},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:N,45:59,46:60,48:P,49:z},s(j,[2,37]),s(j,[2,38]),{16:65,40:O,41:A,42:N},{13:F,38:66,41:Y,42:N,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:N,63:L,64:st,65:it,66:rt,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:L,64:st,65:it,66:rt,67:nt},s(yt,[2,74]),s(yt,[2,75]),{6:ft,10:_t,39:77,42:gt,47:bt},{40:[1,82],41:[1,83]},s(mt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(v,[2,45]),s(v,[2,50]),s(v,[2,51]),s(v,[2,52]),s(v,[2,53]),s(i,[2,41],{42:N}),{6:ft,10:_t,39:85,42:gt,47:bt},{14:86,40:W,50:Q,70:X},{16:90,40:O,41:A},{11:91,40:S,50:T},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:Et,60:kt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(j,[2,39]),s(j,[2,40]),s(v,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:N},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:kt}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:A},s(mt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:Q,70:X},{16:112,40:O,41:A},{14:113,40:W,50:Q,70:X},s(i,[2,13]),s(G,[2,61]),{57:114,59:Et},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:N}),s(i,[2,11]),{13:[1,117],42:N},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:W,50:Q,70:X},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:u(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:u(function(n){var a=this,c=[0],r=[],p=[null],t=[],K=this.table,e="",H=0,St=0,It=2,Tt=1,xt=t.slice.call(arguments,1),y=Object.create(this.lexer),I={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(I.yy[lt]=this.yy[lt]);y.setInput(n,I.yy),I.yy.lexer=y,I.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var ot=y.yylloc;t.push(ot);var vt=y.options&&y.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(b){c.length=c.length-2*b,p.length=p.length-b,t.length=t.length-b}u(Ct,"popStack");function Ot(){var b;return b=r.pop()||y.lex()||Tt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}u(Ot,"lex");for(var g,x,m,ht,C={},J,k,At,$;;){if(x=c[c.length-1],this.defaultActions[x]?m=this.defaultActions[x]:((g===null||typeof g>"u")&&(g=Ot()),m=K[x]&&K[x][g]),typeof m>"u"||!m.length||!m[0]){var ut="";$=[];for(J in K[x])this.terminals_[J]&&J>It&&$.push("'"+this.terminals_[J]+"'");y.showPosition?ut="Parse error on line "+(H+1)+`: `+y.showPosition()+` Expecting `+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":ut="Parse error on line "+(H+1)+": Unexpected "+(g==Tt?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(ut,{text:y.match,token:this.terminals_[g]||g,line:y.yylineno,loc:ot,expected:$})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+g);switch(m[0]){case 1:c.push(g),p.push(y.yytext),t.push(y.yylloc),c.push(m[1]),g=null,St=y.yyleng,e=y.yytext,H=y.yylineno,ot=y.yylloc;break;case 2:if(k=this.productions_[m[1]][1],C.$=p[p.length-k],C._$={first_line:t[t.length-(k||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(k||1)].first_column,last_column:t[t.length-1].last_column},vt&&(C._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(C,[e,St,H,I.yy,m[1],p,t].concat(xt)),typeof ht<"u")return ht;k&&(c=c.slice(0,-1*k*2),p=p.slice(0,-1*k),t=t.slice(0,-1*k)),c.push(this.productions_[m[1]][0]),p.push(C.$),t.push(C._$),At=K[c[c.length-2]][c[c.length-1]],c.push(At);break;case 3:return!0}}return!0},"parse")},Rt=function(){var R={EOF:1,parseError:u(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:u(function(n,a){return this.yy=a||this.yy||{},this._input=n,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:u(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:u(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=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),c.length-1&&(this.yylineno-=c.length-1);var p=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:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(n){this.unput(this.match.slice(n))},"less"),pastInput:u(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+` @@ -57,4 +57,4 @@ Expecting `+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":ut="Parse error o stroke: ${s.lineColor} !important; stroke-width: 1; } -`,"getStyles"),te=$t,le={parser:Xt,get db(){return new qt},renderer:Nt,styles:te};export{le as diagram}; +`,"getStyles"),te=$t,oe={parser:Xt,get db(){return new qt},renderer:Nt,styles:te};export{oe as diagram}; diff --git a/lightrag/api/webui/assets/feature-documents-oks3sUnM.js b/lightrag/api/webui/assets/feature-documents-C5UJveNV.js similarity index 99% rename from lightrag/api/webui/assets/feature-documents-oks3sUnM.js rename to lightrag/api/webui/assets/feature-documents-C5UJveNV.js index 7eb92ba7..a0ecff8d 100644 --- a/lightrag/api/webui/assets/feature-documents-oks3sUnM.js +++ b/lightrag/api/webui/assets/feature-documents-C5UJveNV.js @@ -1,4 +1,4 @@ -import{j as t,_ as oe,d as nt}from"./ui-vendor-CeCm8EER.js";import{r as l,g as Aa,R as ot}from"./react-vendor-DEwriMA6.js";import{c as A,C as Je,F as lt,a as Ve,b as Ta,u as te,s as rt,d as S,U as Xe,S as ct,e as _a,B as O,X as Ra,f as st,g as ae,D as fe,h as Ee,i as xe,j as ve,k as ge,l as he,m as pt,n as dt,E as mt,T as Ma,I as qa,o as Ia,p as oa,q as ut,r as ft,t as xt,A as vt,v as gt,w as ht,x as bt,y as Ie,z as Le,G as yt,H as jt,J as ua,K as fa,R as wt,L as kt,M as Dt,N as Be,O as Ue}from"./feature-graph-NODQb6qW.js";const La=l.forwardRef(({className:e,...a},n)=>t.jsx("div",{className:"relative w-full overflow-auto",children:t.jsx("table",{ref:n,className:A("w-full caption-bottom text-sm",e),...a})}));La.displayName="Table";const Ba=l.forwardRef(({className:e,...a},n)=>t.jsx("thead",{ref:n,className:A("[&_tr]:border-b",e),...a}));Ba.displayName="TableHeader";const Ua=l.forwardRef(({className:e,...a},n)=>t.jsx("tbody",{ref:n,className:A("[&_tr:last-child]:border-0",e),...a}));Ua.displayName="TableBody";const Pt=l.forwardRef(({className:e,...a},n)=>t.jsx("tfoot",{ref:n,className:A("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...a}));Pt.displayName="TableFooter";const Qe=l.forwardRef(({className:e,...a},n)=>t.jsx("tr",{ref:n,className:A("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...a}));Qe.displayName="TableRow";const Z=l.forwardRef(({className:e,...a},n)=>t.jsx("th",{ref:n,className:A("text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));Z.displayName="TableHead";const ee=l.forwardRef(({className:e,...a},n)=>t.jsx("td",{ref:n,className:A("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));ee.displayName="TableCell";const zt=l.forwardRef(({className:e,...a},n)=>t.jsx("caption",{ref:n,className:A("text-muted-foreground mt-4 text-sm",e),...a}));zt.displayName="TableCaption";function Nt({title:e,description:a,icon:n=lt,action:i,className:o,...r}){return t.jsxs(Je,{className:A("flex w-full flex-col items-center justify-center space-y-6 bg-transparent p-16",o),...r,children:[t.jsx("div",{className:"mr-4 shrink-0 rounded-full border border-dashed p-4",children:t.jsx(n,{className:"text-muted-foreground size-8","aria-hidden":"true"})}),t.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-center",children:[t.jsx(Ve,{children:e}),a?t.jsx(Ta,{children:a}):null]}),i||null]})}var $e={exports:{}},He,xa;function Ct(){if(xa)return He;xa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return He=e,He}var Ke,va;function Et(){if(va)return Ke;va=1;var e=Ct();function a(){}function n(){}return n.resetWarningCache=a,Ke=function(){function i(d,c,b,y,v,k){if(k!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}i.isRequired=i;function o(){return i}var r={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:a};return r.PropTypes=r,r},Ke}var ga;function St(){return ga||(ga=1,$e.exports=Et()()),$e.exports}var Ft=St();const z=Aa(Ft),Ot=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function se(e,a,n){const i=At(e),{webkitRelativePath:o}=e,r=typeof a=="string"?a:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof i.path!="string"&&ha(i,"path",r),ha(i,"relativePath",r),i}function At(e){const{name:a}=e;if(a&&a.lastIndexOf(".")!==-1&&!e.type){const i=a.split(".").pop().toLowerCase(),o=Ot.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function ha(e,a,n){Object.defineProperty(e,a,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Tt=[".DS_Store","Thumbs.db"];function _t(e){return oe(this,void 0,void 0,function*(){return ze(e)&&Rt(e.dataTransfer)?Lt(e.dataTransfer,e.type):Mt(e)?qt(e):Array.isArray(e)&&e.every(a=>"getFile"in a&&typeof a.getFile=="function")?It(e):[]})}function Rt(e){return ze(e)}function Mt(e){return ze(e)&&ze(e.target)}function ze(e){return typeof e=="object"&&e!==null}function qt(e){return Ze(e.target.files).map(a=>se(a))}function It(e){return oe(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>se(n))})}function Lt(e,a){return oe(this,void 0,void 0,function*(){if(e.items){const n=Ze(e.items).filter(o=>o.kind==="file");if(a!=="drop")return n;const i=yield Promise.all(n.map(Bt));return ba($a(i))}return ba(Ze(e.files).map(n=>se(n)))})}function ba(e){return e.filter(a=>Tt.indexOf(a.name)===-1)}function Ze(e){if(e===null)return[];const a=[];for(let n=0;n[...a,...Array.isArray(n)?$a(n):[n]],[])}function ya(e,a){return oe(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const r=yield e.getAsFileSystemHandle();if(r===null)throw new Error(`${e} is not a File`);if(r!==void 0){const d=yield r.getFile();return d.handle=r,se(d)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return se(i,(n=a==null?void 0:a.fullPath)!==null&&n!==void 0?n:void 0)})}function Ut(e){return oe(this,void 0,void 0,function*(){return e.isDirectory?Ha(e):$t(e)})}function Ha(e){const a=e.createReader();return new Promise((n,i)=>{const o=[];function r(){a.readEntries(d=>oe(this,void 0,void 0,function*(){if(d.length){const c=Promise.all(d.map(Ut));o.push(c),r()}else try{const c=yield Promise.all(o);n(c)}catch(c){i(c)}}),d=>{i(d)})}r()})}function $t(e){return oe(this,void 0,void 0,function*(){return new Promise((a,n)=>{e.file(i=>{const o=se(i,e.fullPath);a(o)},i=>{n(i)})})})}var De={},ja;function Ht(){return ja||(ja=1,De.__esModule=!0,De.default=function(e,a){if(e&&a){var n=Array.isArray(a)?a:a.split(",");if(n.length===0)return!0;var i=e.name||"",o=(e.type||"").toLowerCase(),r=o.replace(/\/.*$/,"");return n.some(function(d){var c=d.trim().toLowerCase();return c.charAt(0)==="."?i.toLowerCase().endsWith(c):c.endsWith("/*")?r===c.replace(/\/.*$/,""):o===c})}return!0}),De}var Kt=Ht();const We=Aa(Kt);function wa(e){return Yt(e)||Gt(e)||Wa(e)||Wt()}function Wt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +import{j as t,_ as oe,e as nt}from"./ui-vendor-DaJTMqwy.js";import{r as l,g as Aa,R as ot}from"./react-vendor-CgPb4pW_.js";import{c as A,C as Je,F as lt,a as Ve,b as Ta,u as te,s as rt,d as S,U as Xe,S as ct,e as _a,B as O,X as Ra,f as st,g as ae,D as fe,h as Ee,i as xe,j as ve,k as ge,l as he,m as pt,n as dt,E as mt,T as Ma,I as qa,o as Ia,p as oa,q as ut,r as ft,t as xt,A as vt,v as gt,w as ht,x as bt,y as Ie,z as Le,G as yt,H as jt,J as ua,K as fa,R as wt,L as kt,M as Dt,N as Be,O as Ue}from"./feature-graph-D68hhnYC.js";const La=l.forwardRef(({className:e,...a},n)=>t.jsx("div",{className:"relative w-full overflow-auto",children:t.jsx("table",{ref:n,className:A("w-full caption-bottom text-sm",e),...a})}));La.displayName="Table";const Ba=l.forwardRef(({className:e,...a},n)=>t.jsx("thead",{ref:n,className:A("[&_tr]:border-b",e),...a}));Ba.displayName="TableHeader";const Ua=l.forwardRef(({className:e,...a},n)=>t.jsx("tbody",{ref:n,className:A("[&_tr:last-child]:border-0",e),...a}));Ua.displayName="TableBody";const Pt=l.forwardRef(({className:e,...a},n)=>t.jsx("tfoot",{ref:n,className:A("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...a}));Pt.displayName="TableFooter";const Qe=l.forwardRef(({className:e,...a},n)=>t.jsx("tr",{ref:n,className:A("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...a}));Qe.displayName="TableRow";const Z=l.forwardRef(({className:e,...a},n)=>t.jsx("th",{ref:n,className:A("text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));Z.displayName="TableHead";const ee=l.forwardRef(({className:e,...a},n)=>t.jsx("td",{ref:n,className:A("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));ee.displayName="TableCell";const zt=l.forwardRef(({className:e,...a},n)=>t.jsx("caption",{ref:n,className:A("text-muted-foreground mt-4 text-sm",e),...a}));zt.displayName="TableCaption";function Nt({title:e,description:a,icon:n=lt,action:i,className:o,...r}){return t.jsxs(Je,{className:A("flex w-full flex-col items-center justify-center space-y-6 bg-transparent p-16",o),...r,children:[t.jsx("div",{className:"mr-4 shrink-0 rounded-full border border-dashed p-4",children:t.jsx(n,{className:"text-muted-foreground size-8","aria-hidden":"true"})}),t.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-center",children:[t.jsx(Ve,{children:e}),a?t.jsx(Ta,{children:a}):null]}),i||null]})}var $e={exports:{}},He,xa;function Ct(){if(xa)return He;xa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return He=e,He}var Ke,va;function Et(){if(va)return Ke;va=1;var e=Ct();function a(){}function n(){}return n.resetWarningCache=a,Ke=function(){function i(d,c,b,y,v,k){if(k!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}i.isRequired=i;function o(){return i}var r={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:a};return r.PropTypes=r,r},Ke}var ga;function St(){return ga||(ga=1,$e.exports=Et()()),$e.exports}var Ft=St();const z=Aa(Ft),Ot=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function se(e,a,n){const i=At(e),{webkitRelativePath:o}=e,r=typeof a=="string"?a:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof i.path!="string"&&ha(i,"path",r),ha(i,"relativePath",r),i}function At(e){const{name:a}=e;if(a&&a.lastIndexOf(".")!==-1&&!e.type){const i=a.split(".").pop().toLowerCase(),o=Ot.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function ha(e,a,n){Object.defineProperty(e,a,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Tt=[".DS_Store","Thumbs.db"];function _t(e){return oe(this,void 0,void 0,function*(){return ze(e)&&Rt(e.dataTransfer)?Lt(e.dataTransfer,e.type):Mt(e)?qt(e):Array.isArray(e)&&e.every(a=>"getFile"in a&&typeof a.getFile=="function")?It(e):[]})}function Rt(e){return ze(e)}function Mt(e){return ze(e)&&ze(e.target)}function ze(e){return typeof e=="object"&&e!==null}function qt(e){return Ze(e.target.files).map(a=>se(a))}function It(e){return oe(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>se(n))})}function Lt(e,a){return oe(this,void 0,void 0,function*(){if(e.items){const n=Ze(e.items).filter(o=>o.kind==="file");if(a!=="drop")return n;const i=yield Promise.all(n.map(Bt));return ba($a(i))}return ba(Ze(e.files).map(n=>se(n)))})}function ba(e){return e.filter(a=>Tt.indexOf(a.name)===-1)}function Ze(e){if(e===null)return[];const a=[];for(let n=0;n[...a,...Array.isArray(n)?$a(n):[n]],[])}function ya(e,a){return oe(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const r=yield e.getAsFileSystemHandle();if(r===null)throw new Error(`${e} is not a File`);if(r!==void 0){const d=yield r.getFile();return d.handle=r,se(d)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return se(i,(n=a==null?void 0:a.fullPath)!==null&&n!==void 0?n:void 0)})}function Ut(e){return oe(this,void 0,void 0,function*(){return e.isDirectory?Ha(e):$t(e)})}function Ha(e){const a=e.createReader();return new Promise((n,i)=>{const o=[];function r(){a.readEntries(d=>oe(this,void 0,void 0,function*(){if(d.length){const c=Promise.all(d.map(Ut));o.push(c),r()}else try{const c=yield Promise.all(o);n(c)}catch(c){i(c)}}),d=>{i(d)})}r()})}function $t(e){return oe(this,void 0,void 0,function*(){return new Promise((a,n)=>{e.file(i=>{const o=se(i,e.fullPath);a(o)},i=>{n(i)})})})}var De={},ja;function Ht(){return ja||(ja=1,De.__esModule=!0,De.default=function(e,a){if(e&&a){var n=Array.isArray(a)?a:a.split(",");if(n.length===0)return!0;var i=e.name||"",o=(e.type||"").toLowerCase(),r=o.replace(/\/.*$/,"");return n.some(function(d){var c=d.trim().toLowerCase();return c.charAt(0)==="."?i.toLowerCase().endsWith(c):c.endsWith("/*")?r===c.replace(/\/.*$/,""):o===c})}return!0}),De}var Kt=Ht();const We=Aa(Kt);function wa(e){return Yt(e)||Gt(e)||Wa(e)||Wt()}function Wt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yt(e){if(Array.isArray(e))return ea(e)}function ka(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Da(e){for(var a=1;ae.length)&&(a=e.length);for(var n=0,i=new Array(a);n0&&arguments[0]!==void 0?arguments[0]:"",n=a.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:Zt,message:"File type must be ".concat(i)}},Pa=function(a){return{code:ei,message:"File is larger than ".concat(a," ").concat(a===1?"byte":"bytes")}},za=function(a){return{code:ai,message:"File is smaller than ".concat(a," ").concat(a===1?"byte":"bytes")}},ni={code:ti,message:"Too many files"};function Ga(e,a){var n=e.type==="application/x-moz-file"||Qt(e,a);return[n,n?null:ii(a)]}function Ya(e,a,n){if(ne(e.size))if(ne(a)&&ne(n)){if(e.size>n)return[!1,Pa(n)];if(e.sizen)return[!1,Pa(n)]}return[!0,null]}function ne(e){return e!=null}function oi(e){var a=e.files,n=e.accept,i=e.minSize,o=e.maxSize,r=e.multiple,d=e.maxFiles,c=e.validator;return!r&&a.length>1||r&&d>=1&&a.length>d?!1:a.every(function(b){var y=Ga(b,n),v=ue(y,1),k=v[0],m=Ya(b,i,o),C=ue(m,1),g=C[0],L=c?c(b):null;return k&&g&&!L})}function Ne(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Pe(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(a){return a==="Files"||a==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Na(e){e.preventDefault()}function li(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function ri(e){return e.indexOf("Edge/")!==-1}function ci(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return li(e)||ri(e)}function V(){for(var e=arguments.length,a=new Array(e),n=0;n1?o-1:0),d=1;di.map(i=>d[i]); +var gi=Object.defineProperty;var pi=(e,t,r)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Me=(e,t,r)=>pi(e,typeof t!="symbol"?t+"":t,r);import{R as W,r as p,c as mi,g as He,d as vi}from"./react-vendor-CgPb4pW_.js";import{_ as aa,a as sa,f as rr,N as ia,b as la,c as ca,D as wn,d as Wt,F as yi,E as ua,e as bi,g as qn,h as wi,n as Wn,v as Be,i as da,j as fa,r as Xe,k as ha,y as ga,p as xi,l as _i,U as Yr,m as Si,o as Ei,S as ki}from"./graph-vendor-BC3frDkq.js";import{j as g,c as xn,P as _t,a as pa,D as Ci,C as Ti,b as Ri,R as Ai,u as Ve,d as ft,e as ma,f as ji,A as Ii,g as xe,h as ke,i as Ni,S as Li,O as _n,k as va,l as Sn,m as Pi,T as ya,n as ba,o as wa,p as zi,q as Di,r as xa,s as Oi,t as Gi,v as Rt,w as Fi,x as Mi,y as $i,z as ut,B as Hi,E as Bi}from"./ui-vendor-DaJTMqwy.js";import{t as Vi,c as _a,a as nr,b as Ui}from"./utils-vendor-elCzPYZl.js";function fe(...e){return Vi(_a(e))}function or(e){return e instanceof Error?e.message:`${e}`}function Xg(e,t){let r=0,n=null;return function(...a){const o=Date.now(),l=t-(o-r);l<=0?(n&&(clearTimeout(n),n=null),r=o,e.apply(this,a)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e.apply(this,a)},l))}}const En=e=>{const t=e;t.use={};for(const r of Object.keys(t.getState()))t.use[r]=()=>t(n=>n[r]);return t},Kr="",Yg="/webui/",Ne="ghost",qi="#B2EBF2",Wi="#000",Xi="#E2E2E2",Qr="#EEEEEE",Yi="#F57F17",Ki="#969696",Qi="#F57F17",Xn="#B2EBF2",Lt=50,Yn=100,dt=4,Jr=20,Kg=15,Kn="*",Qg={"text/plain":[".txt",".md",".html",".htm",".tex",".json",".xml",".yaml",".yml",".rtf",".odt",".epub",".csv",".log",".conf",".ini",".properties",".sql",".bat",".sh",".c",".cpp",".py",".java",".js",".ts",".swift",".go",".rb",".php",".css",".scss",".less"],"application/pdf":[".pdf"],"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"]},Jg={name:"LightRAG",github:"https://github.com/HKUDS/LightRAG"},Ji="modulepreload",Zi=function(e){return"/webui/"+e},Qn={},el=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=l(r.map(c=>{if(c=Zi(c),c in Qn)return;Qn[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":Ji,u||(h.as="script"),h.crossOrigin="",h.href=c,i&&h.setAttribute("nonce",i),document.head.appendChild(h),u)return new Promise((d,y)=>{h.addEventListener("load",d),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(l){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=l,window.dispatchEvent(s),!s.defaultPrevented)throw l}return a.then(l=>{for(const s of l||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};function Sa(e,t){let r;try{r=e()}catch{return}return{getItem:a=>{var o;const l=i=>i===null?null:JSON.parse(i,void 0),s=(o=r.getItem(a))!=null?o:null;return s instanceof Promise?s.then(l):l(s)},setItem:(a,o)=>r.setItem(a,JSON.stringify(o,void 0)),removeItem:a=>r.removeItem(a)}}const Zr=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Zr(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Zr(n)(r)}}}},tl=(e,t)=>(r,n,a)=>{let o={storage:Sa(()=>localStorage),partialize:b=>b,version:0,merge:(b,C)=>({...C,...b}),...t},l=!1;const s=new Set,i=new Set;let c=o.storage;if(!c)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...b)},n,a);const u=()=>{const b=o.partialize({...n()});return c.setItem(o.name,{state:b,version:o.version})},f=a.setState;a.setState=(b,C)=>{f(b,C),u()};const h=e((...b)=>{r(...b),u()},n,a);a.getInitialState=()=>h;let d;const y=()=>{var b,C;if(!c)return;l=!1,s.forEach(_=>{var A;return _((A=n())!=null?A:h)});const j=((C=o.onRehydrateStorage)==null?void 0:C.call(o,(b=n())!=null?b:h))||void 0;return Zr(c.getItem.bind(c))(o.name).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==o.version){if(o.migrate){const A=o.migrate(_.state,_.version);return A instanceof Promise?A.then(I=>[!0,I]):[!0,A]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,_.state];return[!1,void 0]}).then(_=>{var A;const[I,N]=_;if(d=o.merge(N,(A=n())!=null?A:h),r(d,!0),I)return u()}).then(()=>{j==null||j(d,void 0),d=n(),l=!0,i.forEach(_=>_(d))}).catch(_=>{j==null||j(void 0,_)})};return a.persist={setOptions:b=>{o={...o,...b},b.storage&&(c=b.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>l,onHydrate:b=>(s.add(b),()=>{s.delete(b)}),onFinishHydration:b=>(i.add(b),()=>{i.delete(b)})},o.skipHydration||y(),d||h},rl=tl,nl=nr()(rl(e=>({theme:"system",language:"en",showPropertyPanel:!0,showNodeSearchBar:!0,showLegend:!1,showNodeLabel:!0,enableNodeDrag:!0,showEdgeLabel:!1,enableHideUnselectedEdges:!0,enableEdgeEvents:!1,minEdgeSize:1,maxEdgeSize:1,graphQueryMaxDepth:3,graphMaxNodes:1e3,backendMaxGraphNodes:null,graphLayoutMaxIterations:15,queryLabel:Kn,enableHealthCheck:!0,apiKey:null,currentTab:"documents",showFileName:!1,retrievalHistory:[],querySettings:{mode:"global",response_type:"Multiple Paragraphs",top_k:10,chunk_top_k:5,chunk_rerank_top_k:5,max_entity_tokens:1e4,max_relation_tokens:1e4,max_total_tokens:32e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[],user_prompt:""},setTheme:t=>e({theme:t}),setLanguage:t=>{e({language:t}),el(async()=>{const{default:r}=await import("./utils-vendor-elCzPYZl.js").then(n=>n.d);return{default:r}},__vite__mapDeps([0,1])).then(({default:r})=>{r.language!==t&&r.changeLanguage(t)})},setGraphLayoutMaxIterations:t=>e({graphLayoutMaxIterations:t}),setQueryLabel:t=>e({queryLabel:t}),setGraphQueryMaxDepth:t=>e({graphQueryMaxDepth:t}),setGraphMaxNodes:(t,r=!1)=>{const n=Z.getState();if(n.graphMaxNodes!==t)if(r){const a=n.queryLabel;e({graphMaxNodes:t,queryLabel:""}),setTimeout(()=>{e({queryLabel:a})},300)}else e({graphMaxNodes:t})},setBackendMaxGraphNodes:t=>e({backendMaxGraphNodes:t}),setMinEdgeSize:t=>e({minEdgeSize:t}),setMaxEdgeSize:t=>e({maxEdgeSize:t}),setEnableHealthCheck:t=>e({enableHealthCheck:t}),setApiKey:t=>e({apiKey:t}),setCurrentTab:t=>e({currentTab:t}),setRetrievalHistory:t=>e({retrievalHistory:t}),updateQuerySettings:t=>e(r=>({querySettings:{...r.querySettings,...t}})),setShowFileName:t=>e({showFileName:t}),setShowLegend:t=>e({showLegend:t})}),{name:"settings-storage",storage:Sa(()=>localStorage),version:15,migrate:(e,t)=>(t<2&&(e.showEdgeLabel=!1),t<3&&(e.queryLabel=Kn),t<4&&(e.showPropertyPanel=!0,e.showNodeSearchBar=!0,e.showNodeLabel=!0,e.enableHealthCheck=!0,e.apiKey=null),t<5&&(e.currentTab="documents"),t<6&&(e.querySettings={mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:4e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[]},e.retrievalHistory=[]),t<7&&(e.graphQueryMaxDepth=3,e.graphLayoutMaxIterations=15),t<8&&(e.graphMinDegree=0,e.language="en"),t<9&&(e.showFileName=!1),t<10&&(delete e.graphMinDegree,e.graphMaxNodes=1e3),t<11&&(e.minEdgeSize=1,e.maxEdgeSize=1),t<12&&(e.retrievalHistory=[]),t<13&&e.querySettings&&(e.querySettings.user_prompt=""),t<14&&(e.backendMaxGraphNodes=null),t<15&&(e.querySettings={mode:"global",response_type:"Multiple Paragraphs",top_k:10,chunk_top_k:5,chunk_rerank_top_k:5,max_entity_tokens:1e4,max_relation_tokens:1e4,max_total_tokens:32e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[],user_prompt:""}),e)})),Z=En(nl);class ol{constructor(){Me(this,"nodes",[]);Me(this,"edges",[]);Me(this,"nodeIdMap",{});Me(this,"edgeIdMap",{});Me(this,"edgeDynamicIdMap",{});Me(this,"getNode",t=>{const r=this.nodeIdMap[t];if(r!==void 0)return this.nodes[r]});Me(this,"getEdge",(t,r=!0)=>{const n=r?this.edgeDynamicIdMap[t]:this.edgeIdMap[t];if(n!==void 0)return this.edges[n]});Me(this,"buildDynamicMap",()=>{this.edgeDynamicIdMap={};for(let t=0;t({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,moveToSelectedNode:!1,isFetching:!1,graphIsEmpty:!1,lastSuccessfulQueryLabel:"",graphDataFetchAttempted:!1,labelsFetchAttempted:!1,rawGraph:null,sigmaGraph:null,sigmaInstance:null,allDatabaseLabels:["*"],typeColorMap:new Map,searchEngine:null,setGraphIsEmpty:r=>e({graphIsEmpty:r}),setLastSuccessfulQueryLabel:r=>e({lastSuccessfulQueryLabel:r}),setIsFetching:r=>e({isFetching:r}),setSelectedNode:(r,n)=>e({selectedNode:r,moveToSelectedNode:n}),setFocusedNode:r=>e({focusedNode:r}),setSelectedEdge:r=>e({selectedEdge:r}),setFocusedEdge:r=>e({focusedEdge:r}),clearSelection:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null}),reset:()=>{e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,rawGraph:null,sigmaGraph:null,searchEngine:null,moveToSelectedNode:!1,graphIsEmpty:!1})},setRawGraph:r=>e({rawGraph:r}),setSigmaGraph:r=>{e({sigmaGraph:r})},setAllDatabaseLabels:r=>e({allDatabaseLabels:r}),fetchAllDatabaseLabels:async()=>{try{console.log("Fetching all database labels...");const r=await il();e({allDatabaseLabels:["*",...r]});return}catch(r){throw console.error("Failed to fetch all database labels:",r),e({allDatabaseLabels:["*"]}),r}},setMoveToSelectedNode:r=>e({moveToSelectedNode:r}),setSigmaInstance:r=>e({sigmaInstance:r}),setTypeColorMap:r=>e({typeColorMap:r}),setSearchEngine:r=>e({searchEngine:r}),resetSearchEngine:()=>e({searchEngine:null}),setGraphDataFetchAttempted:r=>e({graphDataFetchAttempted:r}),setLabelsFetchAttempted:r=>e({labelsFetchAttempted:r}),nodeToExpand:null,nodeToPrune:null,triggerNodeExpand:r=>e({nodeToExpand:r}),triggerNodePrune:r=>e({nodeToPrune:r}),graphDataVersion:0,incrementGraphDataVersion:()=>e(r=>({graphDataVersion:r.graphDataVersion+1})),updateNodeAndSelect:async(r,n,a,o)=>{const l=t(),{sigmaGraph:s,rawGraph:i}=l;if(!(!s||!i||!s.hasNode(r)))try{const c=s.getNodeAttributes(r);if(console.log("updateNodeAndSelect",r,n,a,o),r===n&&a==="entity_id"){s.addNode(o,{...c,label:o});const u=[];s.forEachEdge(r,(h,d,y,b)=>{const C=y===r?b:y,j=y===r,_=h,A=i.edgeDynamicIdMap[_],I=s.addEdge(j?o:C,j?C:o,d);A!==void 0&&u.push({originalDynamicId:_,newEdgeId:I,edgeIndex:A}),s.dropEdge(h)}),s.dropNode(r);const f=i.nodeIdMap[r];f!==void 0&&(i.nodes[f].id=o,i.nodes[f].labels=[o],i.nodes[f].properties.entity_id=o,delete i.nodeIdMap[r],i.nodeIdMap[o]=f),u.forEach(({originalDynamicId:h,newEdgeId:d,edgeIndex:y})=>{i.edges[y]&&(i.edges[y].source===r&&(i.edges[y].source=o),i.edges[y].target===r&&(i.edges[y].target=o),i.edges[y].dynamicId=d,delete i.edgeDynamicIdMap[h],i.edgeDynamicIdMap[d]=y)}),e({selectedNode:o,moveToSelectedNode:!0})}else{const u=i.nodeIdMap[String(r)];u!==void 0&&(i.nodes[u].properties[a]=o,a==="entity_id"&&(i.nodes[u].labels=[o],s.setNodeAttribute(String(r),"label",o))),e(f=>({graphDataVersion:f.graphDataVersion+1}))}}catch(c){throw console.error("Error updating node in graph:",c),new Error("Failed to update node in graph")}},updateEdgeAndSelect:async(r,n,a,o,l,s)=>{const i=t(),{sigmaGraph:c,rawGraph:u}=i;if(!(!c||!u))try{const f=u.edgeIdMap[String(r)];f!==void 0&&u.edges[f]&&(u.edges[f].properties[l]=s,n!==void 0&&l==="keywords"&&c.setEdgeAttribute(n,"label",s)),e(h=>({graphDataVersion:h.graphDataVersion+1})),e({selectedEdge:n})}catch(f){throw console.error(`Error updating edge ${a}->${o} in graph:`,f),new Error("Failed to update edge in graph")}}})),te=En(al);class sl{constructor(){Me(this,"navigate",null)}setNavigate(t){this.navigate=t}resetAllApplicationState(t=!1){console.log("Resetting all application state...");const r=te.getState(),n=r.sigmaInstance;r.reset(),r.setGraphDataFetchAttempted(!1),r.setLabelsFetchAttempted(!1),r.setSigmaInstance(null),r.setIsFetching(!1),kn.getState().clear(),t||Z.getState().setRetrievalHistory([]),sessionStorage.clear(),n&&(n.getGraph().clear(),n.kill(),te.getState().setSigmaInstance(null))}navigateToLogin(){if(!this.navigate){console.error("Navigation function not set");return}const t=Xt.getState().username;t&&localStorage.setItem("LIGHTRAG-PREVIOUS-USER",t),this.resetAllApplicationState(!0),Xt.getState().logout(),this.navigate("/login")}navigateToHome(){if(!this.navigate){console.error("Navigation function not set");return}this.navigate("/")}}const Ea=new sl,Zg="Invalid API Key",ep="API Key required",_e=Ui.create({baseURL:Kr,headers:{"Content-Type":"application/json"}});_e.interceptors.request.use(e=>{const t=Z.getState().apiKey,r=localStorage.getItem("LIGHTRAG-API-TOKEN");return r&&(e.headers.Authorization=`Bearer ${r}`),t&&(e.headers["X-API-Key"]=t),e});_e.interceptors.response.use(e=>e,e=>{var t,r,n,a;if(e.response){if(((t=e.response)==null?void 0:t.status)===401){if((n=(r=e.config)==null?void 0:r.url)!=null&&n.includes("/login"))throw e;return Ea.navigateToLogin(),Promise.reject(new Error("Authentication required"))}throw new Error(`${e.response.status} ${e.response.statusText} +${JSON.stringify(e.response.data)} +${(a=e.config)==null?void 0:a.url}`)}throw e});const ka=async(e,t,r)=>(await _e.get(`/graphs?label=${encodeURIComponent(e)}&max_depth=${t}&max_nodes=${r}`)).data,il=async()=>(await _e.get("/graph/label/list")).data,ll=async()=>{try{return(await _e.get("/health")).data}catch(e){return{status:"error",message:or(e)}}},tp=async()=>(await _e.get("/documents")).data,rp=async()=>(await _e.post("/documents/scan")).data,np=async e=>(await _e.post("/query",e)).data,op=async(e,t,r)=>{const n=Z.getState().apiKey,a=localStorage.getItem("LIGHTRAG-API-TOKEN"),o={"Content-Type":"application/json",Accept:"application/x-ndjson"};a&&(o.Authorization=`Bearer ${a}`),n&&(o["X-API-Key"]=n);try{const l=await fetch(`${Kr}/query/stream`,{method:"POST",headers:o,body:JSON.stringify(e)});if(!l.ok){if(l.status===401)throw Ea.navigateToLogin(),new Error("Authentication required");let u="Unknown error";try{u=await l.text()}catch{}const f=`${Kr}/query/stream`;throw new Error(`${l.status} ${l.statusText} +${JSON.stringify({error:u})} +${f}`)}if(!l.body)throw new Error("Response body is null");const s=l.body.getReader(),i=new TextDecoder;let c="";for(;;){const{done:u,value:f}=await s.read();if(u)break;c+=i.decode(f,{stream:!0});const h=c.split(` +`);c=h.pop()||"";for(const d of h)if(d.trim())try{const y=JSON.parse(d);y.response?t(y.response):y.error&&r&&r(y.error)}catch(y){console.error("Error parsing stream chunk:",d,y),r&&r(`Error parsing server response: ${d}`)}}if(c.trim())try{const u=JSON.parse(c);u.response?t(u.response):u.error&&r&&r(u.error)}catch(u){console.error("Error parsing final chunk:",c,u),r&&r(`Error parsing final server response: ${c}`)}}catch(l){const s=or(l);if(s==="Authentication required"){console.error("Authentication required for stream request"),r&&r("Authentication required");return}const i=s.match(/^(\d{3})\s/);if(i){const c=parseInt(i[1],10);let u=s;switch(c){case 403:u="You do not have permission to access this resource (403 Forbidden)",console.error("Permission denied for stream request:",s);break;case 404:u="The requested resource does not exist (404 Not Found)",console.error("Resource not found for stream request:",s);break;case 429:u="Too many requests, please try again later (429 Too Many Requests)",console.error("Rate limited for stream request:",s);break;case 500:case 502:case 503:case 504:u=`Server error, please try again later (${c})`,console.error("Server error for stream request:",s);break;default:console.error("Stream request failed with status code:",c,s)}r&&r(u);return}if(s.includes("NetworkError")||s.includes("Failed to fetch")||s.includes("Network request failed")){console.error("Network error for stream request:",s),r&&r("Network connection error, please check your internet connection");return}if(s.includes("Error parsing")||s.includes("SyntaxError")){console.error("JSON parsing error in stream:",s),r&&r("Error processing response data");return}console.error("Unhandled stream error:",s),r?r(s):console.error("No error handler provided for stream error:",s)}},ap=async(e,t)=>{const r=new FormData;return r.append("file",e),(await _e.post("/documents/upload",r,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t!==void 0?a=>{const o=Math.round(a.loaded*100/a.total);t(o)}:void 0})).data},sp=async()=>(await _e.delete("/documents")).data,ip=async e=>(await _e.post("/documents/clear_cache",{modes:e})).data,lp=async(e,t=!1)=>(await _e.delete("/documents/delete_document",{data:{doc_ids:e,delete_file:t}})).data,cp=async()=>{try{const e=await _e.get("/auth-status",{timeout:5e3,headers:{Accept:"application/json"}});if((e.headers["content-type"]||"").includes("text/html"))return console.warn("Received HTML response instead of JSON for auth-status endpoint"),{auth_configured:!0,auth_mode:"enabled"};if(e.data&&typeof e.data=="object"&&"auth_configured"in e.data&&typeof e.data.auth_configured=="boolean"){if(e.data.auth_configured)return e.data;if(e.data.access_token&&typeof e.data.access_token=="string")return e.data;console.warn("Auth not configured but no valid access token provided")}return console.warn("Received invalid auth status response:",e.data),{auth_configured:!0,auth_mode:"enabled"}}catch(e){return console.error("Failed to get auth status:",or(e)),{auth_configured:!0,auth_mode:"enabled"}}},up=async()=>(await _e.get("/documents/pipeline_status")).data,dp=async(e,t)=>{const r=new FormData;return r.append("username",e),r.append("password",t),(await _e.post("/login",r,{headers:{"Content-Type":"multipart/form-data"}})).data},cl=async(e,t,r=!1)=>(await _e.post("/graph/entity/edit",{entity_name:e,updated_data:t,allow_rename:r})).data,ul=async(e,t,r)=>(await _e.post("/graph/relation/edit",{source_id:e,target_id:t,updated_data:r})).data,dl=async e=>{try{return(await _e.get(`/graph/entity/exists?name=${encodeURIComponent(e)}`)).data.exists}catch(t){return console.error("Error checking entity name:",t),!1}},fl=nr()(e=>({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:null,pipelineBusy:!1,check:async()=>{var r;const t=await ll();if(t.status==="healthy"){if((t.core_version||t.api_version)&&Xt.getState().setVersion(t.core_version||null,t.api_version||null),("webui_title"in t||"webui_description"in t)&&Xt.getState().setCustomTitle("webui_title"in t?t.webui_title??null:null,"webui_description"in t?t.webui_description??null:null),(r=t.configuration)!=null&&r.max_graph_nodes){const n=parseInt(t.configuration.max_graph_nodes,10);!isNaN(n)&&n>0&&Z.getState().backendMaxGraphNodes!==n&&(Z.getState().setBackendMaxGraphNodes(n),Z.getState().graphMaxNodes>n&&Z.getState().setGraphMaxNodes(n,!0))}return e({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:t,pipelineBusy:t.pipeline_busy}),!0}return e({health:!1,message:t.message,messageTitle:"Backend Health Check Error!",lastCheckTime:Date.now(),status:null}),!1},clear:()=>{e({health:!0,message:null,messageTitle:null})},setErrorMessage:(t,r)=>{e({health:!1,message:t,messageTitle:r})},setPipelineBusy:t=>{e({pipelineBusy:t})}})),kn=En(fl),Ca=e=>{try{const t=e.split(".");return t.length!==3?{}:JSON.parse(atob(t[1]))}catch(t){return console.error("Error parsing token payload:",t),{}}},Ta=e=>Ca(e).sub||null,hl=e=>Ca(e).role==="guest",gl=()=>{const e=localStorage.getItem("LIGHTRAG-API-TOKEN"),t=localStorage.getItem("LIGHTRAG-CORE-VERSION"),r=localStorage.getItem("LIGHTRAG-API-VERSION"),n=localStorage.getItem("LIGHTRAG-WEBUI-TITLE"),a=localStorage.getItem("LIGHTRAG-WEBUI-DESCRIPTION"),o=e?Ta(e):null;return e?{isAuthenticated:!0,isGuestMode:hl(e),coreVersion:t,apiVersion:r,username:o,webuiTitle:n,webuiDescription:a}:{isAuthenticated:!1,isGuestMode:!1,coreVersion:t,apiVersion:r,username:null,webuiTitle:n,webuiDescription:a}},Xt=nr(e=>{const t=gl();return{isAuthenticated:t.isAuthenticated,isGuestMode:t.isGuestMode,coreVersion:t.coreVersion,apiVersion:t.apiVersion,username:t.username,webuiTitle:t.webuiTitle,webuiDescription:t.webuiDescription,login:(r,n=!1,a=null,o=null,l=null,s=null)=>{localStorage.setItem("LIGHTRAG-API-TOKEN",r),a&&localStorage.setItem("LIGHTRAG-CORE-VERSION",a),o&&localStorage.setItem("LIGHTRAG-API-VERSION",o),l?localStorage.setItem("LIGHTRAG-WEBUI-TITLE",l):localStorage.removeItem("LIGHTRAG-WEBUI-TITLE"),s?localStorage.setItem("LIGHTRAG-WEBUI-DESCRIPTION",s):localStorage.removeItem("LIGHTRAG-WEBUI-DESCRIPTION");const i=Ta(r);e({isAuthenticated:!0,isGuestMode:n,username:i,coreVersion:a,apiVersion:o,webuiTitle:l,webuiDescription:s})},logout:()=>{localStorage.removeItem("LIGHTRAG-API-TOKEN");const r=localStorage.getItem("LIGHTRAG-CORE-VERSION"),n=localStorage.getItem("LIGHTRAG-API-VERSION"),a=localStorage.getItem("LIGHTRAG-WEBUI-TITLE"),o=localStorage.getItem("LIGHTRAG-WEBUI-DESCRIPTION");e({isAuthenticated:!1,isGuestMode:!1,username:null,coreVersion:r,apiVersion:n,webuiTitle:a,webuiDescription:o})},setVersion:(r,n)=>{r&&localStorage.setItem("LIGHTRAG-CORE-VERSION",r),n&&localStorage.setItem("LIGHTRAG-API-VERSION",n),e({coreVersion:r,apiVersion:n})},setCustomTitle:(r,n)=>{r?localStorage.setItem("LIGHTRAG-WEBUI-TITLE",r):localStorage.removeItem("LIGHTRAG-WEBUI-TITLE"),n?localStorage.setItem("LIGHTRAG-WEBUI-DESCRIPTION",n):localStorage.removeItem("LIGHTRAG-WEBUI-DESCRIPTION"),e({webuiTitle:r,webuiDescription:n})}}});var pl=e=>{switch(e){case"success":return yl;case"info":return wl;case"warning":return bl;case"error":return xl;default:return null}},ml=Array(12).fill(0),vl=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},ml.map((r,n)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),yl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),bl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),wl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),xl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),_l=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Sl=()=>{let[e,t]=W.useState(document.hidden);return W.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},en=1,El=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:en++,o=this.toasts.find(s=>s.id===a),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(s=>s.id===a?(this.publish({...s,...e,id:a,title:r}),{...s,...e,id:a,dismissible:l,title:r}):s):this.addToast({title:r,...n,dismissible:l,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,o,l=n.then(async i=>{if(o=["resolve",i],W.isValidElement(i))a=!1,this.create({id:r,type:"default",message:i});else if(Cl(i)&&!i.ok){a=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:r,type:"error",message:c,description:u})}else if(t.success!==void 0){a=!1;let c=typeof t.success=="function"?await t.success(i):t.success,u=typeof t.description=="function"?await t.description(i):t.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async i=>{if(o=["reject",i],t.error!==void 0){a=!1;let c=typeof t.error=="function"?await t.error(i):t.error,u=typeof t.description=="function"?await t.description(i):t.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var i;a&&(this.dismiss(r),r=void 0),(i=t.finally)==null||i.call(t)}),s=()=>new Promise((i,c)=>l.then(()=>o[0]==="reject"?c(o[1]):i(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:s}:Object.assign(r,{unwrap:s})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||en++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ae=new El,kl=(e,t)=>{let r=(t==null?void 0:t.id)||en++;return Ae.addToast({title:e,...t,id:r}),r},Cl=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Tl=kl,Rl=()=>Ae.toasts,Al=()=>Ae.getActiveToasts(),rt=Object.assign(Tl,{success:Ae.success,info:Ae.info,warning:Ae.warning,error:Ae.error,custom:Ae.custom,message:Ae.message,promise:Ae.promise,dismiss:Ae.dismiss,loading:Ae.loading},{getHistory:Rl,getToasts:Al});function jl(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}jl(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function Pt(e){return e.label!==void 0}var Il=3,Nl="32px",Ll="16px",Jn=4e3,Pl=356,zl=14,Dl=20,Ol=200;function Fe(...e){return e.filter(Boolean).join(" ")}function Gl(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var Fl=e=>{var t,r,n,a,o,l,s,i,c,u,f;let{invert:h,toast:d,unstyled:y,interacting:b,setHeights:C,visibleToasts:j,heights:_,index:A,toasts:I,expanded:N,removeToast:z,defaultRichColors:m,closeButton:E,style:x,cancelButtonStyle:T,actionButtonStyle:R,className:O="",descriptionClassName:w="",duration:H,position:K,gap:D,loadingIcon:k,expandByDefault:S,classNames:B,icons:ae,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:v}=e,[P,V]=W.useState(null),[$,Q]=W.useState(null),[X,Y]=W.useState(!1),[se,ne]=W.useState(!1),[ie,F]=W.useState(!1),[J,q]=W.useState(!1),[U,L]=W.useState(!1),[oe,ue]=W.useState(0),[re,ee]=W.useState(0),G=W.useRef(d.duration||H||Jn),ge=W.useRef(null),pe=W.useRef(null),ye=A===0,we=A+1<=j,de=d.type,me=d.dismissible!==!1,Ie=d.className||"",Ce=d.descriptionClassName||"",Te=W.useMemo(()=>_.findIndex(ce=>ce.toastId===d.id)||0,[_,d.id]),Pe=W.useMemo(()=>{var ce;return(ce=d.closeButton)!=null?ce:E},[d.closeButton,E]),Ye=W.useMemo(()=>d.duration||H||Jn,[d.duration,H]),Ke=W.useRef(0),Re=W.useRef(0),it=W.useRef(0),ze=W.useRef(null),[ui,di]=K.split("-"),Vn=W.useMemo(()=>_.reduce((ce,he,ve)=>ve>=Te?ce:ce+he.height,0),[_,Te]),Un=Sl(),fi=d.invert||h,pr=de==="loading";Re.current=W.useMemo(()=>Te*D+Vn,[Te,Vn]),W.useEffect(()=>{G.current=Ye},[Ye]),W.useEffect(()=>{Y(!0)},[]),W.useEffect(()=>{let ce=pe.current;if(ce){let he=ce.getBoundingClientRect().height;return ee(he),C(ve=>[{toastId:d.id,height:he,position:d.position},...ve]),()=>C(ve=>ve.filter(De=>De.toastId!==d.id))}},[C,d.id]),W.useLayoutEffect(()=>{if(!X)return;let ce=pe.current,he=ce.style.height;ce.style.height="auto";let ve=ce.getBoundingClientRect().height;ce.style.height=he,ee(ve),C(De=>De.find(Oe=>Oe.toastId===d.id)?De.map(Oe=>Oe.toastId===d.id?{...Oe,height:ve}:Oe):[{toastId:d.id,height:ve,position:d.position},...De])},[X,d.title,d.description,C,d.id]);let Qe=W.useCallback(()=>{ne(!0),ue(Re.current),C(ce=>ce.filter(he=>he.toastId!==d.id)),setTimeout(()=>{z(d)},Ol)},[d,z,C,Re]);W.useEffect(()=>{if(d.promise&&de==="loading"||d.duration===1/0||d.type==="loading")return;let ce;return N||b||v&&Un?(()=>{if(it.current{var he;(he=d.onAutoClose)==null||he.call(d,d),Qe()},G.current)),()=>clearTimeout(ce)},[N,b,d,de,v,Un,Qe]),W.useEffect(()=>{d.delete&&Qe()},[Qe,d.delete]);function hi(){var ce,he,ve;return ae!=null&&ae.loading?W.createElement("div",{className:Fe(B==null?void 0:B.loader,(ce=d==null?void 0:d.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":de==="loading"},ae.loading):k?W.createElement("div",{className:Fe(B==null?void 0:B.loader,(he=d==null?void 0:d.classNames)==null?void 0:he.loader,"sonner-loader"),"data-visible":de==="loading"},k):W.createElement(vl,{className:Fe(B==null?void 0:B.loader,(ve=d==null?void 0:d.classNames)==null?void 0:ve.loader),visible:de==="loading"})}return W.createElement("li",{tabIndex:0,ref:pe,className:Fe(O,Ie,B==null?void 0:B.toast,(t=d==null?void 0:d.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[de],(r=d==null?void 0:d.classNames)==null?void 0:r[de]),"data-sonner-toast":"","data-rich-colors":(n=d.richColors)!=null?n:m,"data-styled":!(d.jsx||d.unstyled||y),"data-mounted":X,"data-promise":!!d.promise,"data-swiped":U,"data-removed":se,"data-visible":we,"data-y-position":ui,"data-x-position":di,"data-index":A,"data-front":ye,"data-swiping":ie,"data-dismissible":me,"data-type":de,"data-invert":fi,"data-swipe-out":J,"data-swipe-direction":$,"data-expanded":!!(N||S&&X),style:{"--index":A,"--toasts-before":A,"--z-index":I.length-A,"--offset":`${se?oe:Re.current}px`,"--initial-height":S?"auto":`${re}px`,...x,...d.style},onDragEnd:()=>{F(!1),V(null),ze.current=null},onPointerDown:ce=>{pr||!me||(ge.current=new Date,ue(Re.current),ce.target.setPointerCapture(ce.pointerId),ce.target.tagName!=="BUTTON"&&(F(!0),ze.current={x:ce.clientX,y:ce.clientY}))},onPointerUp:()=>{var ce,he,ve,De;if(J||!me)return;ze.current=null;let Oe=Number(((ce=pe.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Je=Number(((he=pe.current)==null?void 0:he.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),lt=new Date().getTime()-((ve=ge.current)==null?void 0:ve.getTime()),Ge=P==="x"?Oe:Je,Ze=Math.abs(Ge)/lt;if(Math.abs(Ge)>=Dl||Ze>.11){ue(Re.current),(De=d.onDismiss)==null||De.call(d,d),Q(P==="x"?Oe>0?"right":"left":Je>0?"down":"up"),Qe(),q(!0),L(!1);return}F(!1),V(null)},onPointerMove:ce=>{var he,ve,De,Oe;if(!ze.current||!me||((he=window.getSelection())==null?void 0:he.toString().length)>0)return;let Je=ce.clientY-ze.current.y,lt=ce.clientX-ze.current.x,Ge=(ve=e.swipeDirections)!=null?ve:Gl(K);!P&&(Math.abs(lt)>1||Math.abs(Je)>1)&&V(Math.abs(lt)>Math.abs(Je)?"x":"y");let Ze={x:0,y:0};P==="y"?(Ge.includes("top")||Ge.includes("bottom"))&&(Ge.includes("top")&&Je<0||Ge.includes("bottom")&&Je>0)&&(Ze.y=Je):P==="x"&&(Ge.includes("left")||Ge.includes("right"))&&(Ge.includes("left")&<<0||Ge.includes("right")&<>0)&&(Ze.x=lt),(Math.abs(Ze.x)>0||Math.abs(Ze.y)>0)&&L(!0),(De=pe.current)==null||De.style.setProperty("--swipe-amount-x",`${Ze.x}px`),(Oe=pe.current)==null||Oe.style.setProperty("--swipe-amount-y",`${Ze.y}px`)}},Pe&&!d.jsx?W.createElement("button",{"aria-label":M,"data-disabled":pr,"data-close-button":!0,onClick:pr||!me?()=>{}:()=>{var ce;Qe(),(ce=d.onDismiss)==null||ce.call(d,d)},className:Fe(B==null?void 0:B.closeButton,(a=d==null?void 0:d.classNames)==null?void 0:a.closeButton)},(o=ae==null?void 0:ae.close)!=null?o:_l):null,d.jsx||p.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:W.createElement(W.Fragment,null,de||d.icon||d.promise?W.createElement("div",{"data-icon":"",className:Fe(B==null?void 0:B.icon,(l=d==null?void 0:d.classNames)==null?void 0:l.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||hi():null,d.type!=="loading"?d.icon||(ae==null?void 0:ae[de])||pl(de):null):null,W.createElement("div",{"data-content":"",className:Fe(B==null?void 0:B.content,(s=d==null?void 0:d.classNames)==null?void 0:s.content)},W.createElement("div",{"data-title":"",className:Fe(B==null?void 0:B.title,(i=d==null?void 0:d.classNames)==null?void 0:i.title)},typeof d.title=="function"?d.title():d.title),d.description?W.createElement("div",{"data-description":"",className:Fe(w,Ce,B==null?void 0:B.description,(c=d==null?void 0:d.classNames)==null?void 0:c.description)},typeof d.description=="function"?d.description():d.description):null),p.isValidElement(d.cancel)?d.cancel:d.cancel&&Pt(d.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||T,onClick:ce=>{var he,ve;Pt(d.cancel)&&me&&((ve=(he=d.cancel).onClick)==null||ve.call(he,ce),Qe())},className:Fe(B==null?void 0:B.cancelButton,(u=d==null?void 0:d.classNames)==null?void 0:u.cancelButton)},d.cancel.label):null,p.isValidElement(d.action)?d.action:d.action&&Pt(d.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||R,onClick:ce=>{var he,ve;Pt(d.action)&&((ve=(he=d.action).onClick)==null||ve.call(he,ce),!ce.defaultPrevented&&Qe())},className:Fe(B==null?void 0:B.actionButton,(f=d==null?void 0:d.classNames)==null?void 0:f.actionButton)},d.action.label):null))};function Zn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ml(e,t){let r={};return[e,t].forEach((n,a)=>{let o=a===1,l=o?"--mobile-offset":"--offset",s=o?Ll:Nl;function i(c){["top","right","bottom","left"].forEach(u=>{r[`${l}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?i(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${l}-${c}`]=s:r[`${l}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):i(s)}),r}var fp=p.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:s,offset:i,mobileOffset:c,theme:u="light",richColors:f,duration:h,style:d,visibleToasts:y=Il,toastOptions:b,dir:C=Zn(),gap:j=zl,loadingIcon:_,icons:A,containerAriaLabel:I="Notifications",pauseWhenPageIsHidden:N}=e,[z,m]=W.useState([]),E=W.useMemo(()=>Array.from(new Set([n].concat(z.filter(v=>v.position).map(v=>v.position)))),[z,n]),[x,T]=W.useState([]),[R,O]=W.useState(!1),[w,H]=W.useState(!1),[K,D]=W.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=W.useRef(null),S=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=W.useRef(null),ae=W.useRef(!1),M=W.useCallback(v=>{m(P=>{var V;return(V=P.find($=>$.id===v.id))!=null&&V.delete||Ae.dismiss(v.id),P.filter(({id:$})=>$!==v.id)})},[]);return W.useEffect(()=>Ae.subscribe(v=>{if(v.dismiss){m(P=>P.map(V=>V.id===v.id?{...V,delete:!0}:V));return}setTimeout(()=>{mi.flushSync(()=>{m(P=>{let V=P.findIndex($=>$.id===v.id);return V!==-1?[...P.slice(0,V),{...P[V],...v},...P.slice(V+1)]:[v,...P]})})})}),[]),W.useEffect(()=>{if(u!=="system"){D(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let v=window.matchMedia("(prefers-color-scheme: dark)");try{v.addEventListener("change",({matches:P})=>{D(P?"dark":"light")})}catch{v.addListener(({matches:V})=>{try{D(V?"dark":"light")}catch($){console.error($)}})}},[u]),W.useEffect(()=>{z.length<=1&&O(!1)},[z]),W.useEffect(()=>{let v=P=>{var V,$;a.every(Q=>P[Q]||P.code===Q)&&(O(!0),(V=k.current)==null||V.focus()),P.code==="Escape"&&(document.activeElement===k.current||($=k.current)!=null&&$.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a]),W.useEffect(()=>{if(k.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,ae.current=!1)}},[k.current]),W.createElement("section",{ref:t,"aria-label":`${I} ${S}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((v,P)=>{var V;let[$,Q]=v.split("-");return z.length?W.createElement("ol",{key:v,dir:C==="auto"?Zn():C,tabIndex:-1,ref:k,className:s,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":$,"data-lifted":R&&z.length>1&&!o,"data-x-position":Q,style:{"--front-toast-height":`${((V=x[0])==null?void 0:V.height)||0}px`,"--width":`${Pl}px`,"--gap":`${j}px`,...d,...Ml(i,c)},onBlur:X=>{ae.current&&!X.currentTarget.contains(X.relatedTarget)&&(ae.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||ae.current||(ae.current=!0,B.current=X.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{w||O(!1)},onDragEnd:()=>O(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},z.filter(X=>!X.position&&P===0||X.position===v).map((X,Y)=>{var se,ne;return W.createElement(Fl,{key:X.id,icons:A,index:Y,toast:X,defaultRichColors:f,duration:(se=b==null?void 0:b.duration)!=null?se:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:y,closeButton:(ne=b==null?void 0:b.closeButton)!=null?ne:l,interacting:w,position:v,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,removeToast:M,toasts:z.filter(ie=>ie.position==X.position),heights:x.filter(ie=>ie.position==X.position),setHeights:T,expandByDefault:o,gap:j,loadingIcon:_,expanded:R,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const $l={theme:"system",setTheme:()=>null},Ra=p.createContext($l);function hp({children:e,...t}){const r=Z.use.theme(),n=Z.use.setTheme();p.useEffect(()=>{const o=window.document.documentElement;if(o.classList.remove("light","dark"),r==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)"),s=i=>{o.classList.remove("light","dark"),o.classList.add(i.matches?"dark":"light")};return o.classList.add(l.matches?"dark":"light"),l.addEventListener("change",s),()=>l.removeEventListener("change",s)}else o.classList.add(r)},[r]);const a={theme:r,setTheme:n};return g.jsx(Ra.Provider,{...t,value:a,children:e})}const Hl=(e,t,r,n)=>{var o,l,s,i;const a=[r,{code:t,...n||{}}];if((l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ht(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(i=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&i.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},eo={},tn=(e,t,r,n)=>{ht(r)&&eo[r]||(ht(r)&&(eo[r]=new Date),Hl(e,t,r,n))},Aa=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},rn=(e,t,r)=>{e.loadNamespaces(t,Aa(e,r))},to=(e,t,r,n)=>{if(ht(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rn(e,r,n);r.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,Aa(e,n))},Bl=(e,t,r={})=>!t.languages||!t.languages.length?(tn(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,a)=>{var o;if(((o=r.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e))return!1}}),ht=e=>typeof e=="string",Vl=e=>typeof e=="object"&&e!==null,Ul=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ql={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Wl=e=>ql[e],Xl=e=>e.replace(Ul,Wl);let nn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Xl};const Yl=(e={})=>{nn={...nn,...e}},Kl=()=>nn;let ja;const Ql=e=>{ja=e},Jl=()=>ja,gp={type:"3rdParty",init(e){Yl(e.options.react),Ql(e)}},Zl=p.createContext();class ec{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const tc=(e,t)=>{const r=p.useRef();return p.useEffect(()=>{r.current=e},[e,t]),r.current},Ia=(e,t,r,n)=>e.getFixedT(t,r,n),rc=(e,t,r,n)=>p.useCallback(Ia(e,t,r,n),[e,t,r,n]),Se=(e,t={})=>{var I,N,z,m;const{i18n:r}=t,{i18n:n,defaultNS:a}=p.useContext(Zl)||{},o=r||n||Jl();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new ec),!o){tn(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const E=(T,R)=>ht(R)?R:Vl(R)&&ht(R.defaultValue)?R.defaultValue:Array.isArray(T)?T[T.length-1]:T,x=[E,{},!1];return x.t=E,x.i18n={},x.ready=!1,x}(I=o.options.react)!=null&&I.wait&&tn(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const l={...Kl(),...o.options.react,...t},{useSuspense:s,keyPrefix:i}=l;let c=a||((N=o.options)==null?void 0:N.defaultNS);c=ht(c)?[c]:c||["translation"],(m=(z=o.reportNamespaces).addUsedNamespaces)==null||m.call(z,c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(E=>Bl(E,o,l)),f=rc(o,t.lng||null,l.nsMode==="fallback"?c:c[0],i),h=()=>f,d=()=>Ia(o,t.lng||null,l.nsMode==="fallback"?c:c[0],i),[y,b]=p.useState(h);let C=c.join();t.lng&&(C=`${t.lng}${C}`);const j=tc(C),_=p.useRef(!0);p.useEffect(()=>{const{bindI18n:E,bindI18nStore:x}=l;_.current=!0,!u&&!s&&(t.lng?to(o,t.lng,c,()=>{_.current&&b(d)}):rn(o,c,()=>{_.current&&b(d)})),u&&j&&j!==C&&_.current&&b(d);const T=()=>{_.current&&b(d)};return E&&(o==null||o.on(E,T)),x&&(o==null||o.store.on(x,T)),()=>{_.current=!1,o&&(E==null||E.split(" ").forEach(R=>o.off(R,T))),x&&o&&x.split(" ").forEach(R=>o.store.off(R,T))}},[o,C]),p.useEffect(()=>{_.current&&u&&b(h)},[o,i,u]);const A=[y,o,u];if(A.t=y,A.i18n=o,A.ready=u,u||!u&&!s)return A;throw new Promise(E=>{t.lng?to(o,t.lng,c,()=>E()):rn(o,c,()=>E())})},ro=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,no=_a,nc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return no(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(c=>{const u=r==null?void 0:r[c],f=o==null?void 0:o[c];if(u===null)return null;const h=ro(u)||ro(f);return a[c][h]}),s=r&&Object.entries(r).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),i=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(y=>{let[b,C]=y;return Array.isArray(C)?C.includes({...o,...s}[b]):{...o,...s}[b]===C})?[...c,f,h]:c},[]);return no(e,l,i,r==null?void 0:r.class,r==null?void 0:r.className)};var[ar,pp]=xn("Tooltip",[pa]),sr=pa(),Na="TooltipProvider",oc=700,on="tooltip.open",[ac,Cn]=ar(Na),La=e=>{const{__scopeTooltip:t,delayDuration:r=oc,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:o}=e,l=p.useRef(!0),s=p.useRef(!1),i=p.useRef(0);return p.useEffect(()=>{const c=i.current;return()=>window.clearTimeout(c)},[]),g.jsx(ac,{scope:t,isOpenDelayedRef:l,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(c=>{s.current=c},[]),disableHoverableContent:a,children:o})};La.displayName=Na;var At="Tooltip",[sc,ir]=ar(At),Pa=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:s}=e,i=Cn(At,e.__scopeTooltip),c=sr(t),[u,f]=p.useState(null),h=ft(),d=p.useRef(0),y=l??i.disableHoverableContent,b=s??i.delayDuration,C=p.useRef(!1),[j,_]=ma({prop:n,defaultProp:a??!1,onChange:m=>{m?(i.onOpen(),document.dispatchEvent(new CustomEvent(on))):i.onClose(),o==null||o(m)},caller:At}),A=p.useMemo(()=>j?C.current?"delayed-open":"instant-open":"closed",[j]),I=p.useCallback(()=>{window.clearTimeout(d.current),d.current=0,C.current=!1,_(!0)},[_]),N=p.useCallback(()=>{window.clearTimeout(d.current),d.current=0,_(!1)},[_]),z=p.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{C.current=!0,_(!0),d.current=0},b)},[b,_]);return p.useEffect(()=>()=>{d.current&&(window.clearTimeout(d.current),d.current=0)},[]),g.jsx(ji,{...c,children:g.jsx(sc,{scope:t,contentId:h,open:j,stateAttribute:A,trigger:u,onTriggerChange:f,onTriggerEnter:p.useCallback(()=>{i.isOpenDelayedRef.current?z():I()},[i.isOpenDelayedRef,z,I]),onTriggerLeave:p.useCallback(()=>{y?N():(window.clearTimeout(d.current),d.current=0)},[N,y]),onOpen:I,onClose:N,disableHoverableContent:y,children:r})})};Pa.displayName=At;var an="TooltipTrigger",za=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=ir(an,r),o=Cn(an,r),l=sr(r),s=p.useRef(null),i=Ve(t,s,a.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),f=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(Ii,{asChild:!0,...l,children:g.jsx(xe.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:i,onPointerMove:ke(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ke(e.onFocus,()=>{c.current||a.onOpen()}),onBlur:ke(e.onBlur,a.onClose),onClick:ke(e.onClick,a.onClose)})})});za.displayName=an;var ic="TooltipPortal",[mp,lc]=ar(ic,{forceMount:void 0}),wt="TooltipContent",Da=p.forwardRef((e,t)=>{const r=lc(wt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...o}=e,l=ir(wt,e.__scopeTooltip);return g.jsx(_t,{present:n||l.open,children:l.disableHoverableContent?g.jsx(Oa,{side:a,...o,ref:t}):g.jsx(cc,{side:a,...o,ref:t})})}),cc=p.forwardRef((e,t)=>{const r=ir(wt,e.__scopeTooltip),n=Cn(wt,e.__scopeTooltip),a=p.useRef(null),o=Ve(t,a),[l,s]=p.useState(null),{trigger:i,onClose:c}=r,u=a.current,{onPointerInTransitChange:f}=n,h=p.useCallback(()=>{s(null),f(!1)},[f]),d=p.useCallback((y,b)=>{const C=y.currentTarget,j={x:y.clientX,y:y.clientY},_=gc(j,C.getBoundingClientRect()),A=pc(j,_),I=mc(b.getBoundingClientRect()),N=yc([...A,...I]);s(N),f(!0)},[f]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(i&&u){const y=C=>d(C,u),b=C=>d(C,i);return i.addEventListener("pointerleave",y),u.addEventListener("pointerleave",b),()=>{i.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",b)}}},[i,u,d,h]),p.useEffect(()=>{if(l){const y=b=>{const C=b.target,j={x:b.clientX,y:b.clientY},_=(i==null?void 0:i.contains(C))||(u==null?void 0:u.contains(C)),A=!vc(j,l);_?h():A&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[i,u,l,c,h]),g.jsx(Oa,{...e,ref:o})}),[uc,dc]=ar(At,{isInside:!1}),fc=Ri("TooltipContent"),Oa=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...s}=e,i=ir(wt,r),c=sr(r),{onClose:u}=i;return p.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),p.useEffect(()=>{if(i.trigger){const f=h=>{const d=h.target;d!=null&&d.contains(i.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[i.trigger,u]),g.jsx(Ci,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:g.jsxs(Ti,{"data-state":i.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(fc,{children:n}),g.jsx(uc,{scope:r,isInside:!0,children:g.jsx(Ai,{id:i.contentId,role:"tooltip",children:a||n})})]})})});Da.displayName=wt;var Ga="TooltipArrow",hc=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=sr(r);return dc(Ga,r).isInside?null:g.jsx(Ni,{...a,...n,ref:t})});hc.displayName=Ga;function gc(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,a,o)){case o:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pc(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function mc(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function vc(e,t){const{x:r,y:n}=e;let a=!1;for(let o=0,l=t.length-1;on!=h>n&&r<(f-c)*(n-u)/(h-u)+c&&(a=!a)}return a}function yc(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),bc(t)}function bc(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const o=r[r.length-1],l=r[r.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var wc=La,xc=Pa,_c=za,Fa=Da;const Ma=wc,$a=xc,Ha=_c,Sc=e=>typeof e!="string"?e:g.jsx("div",{className:"relative top-0 pt-1 whitespace-pre-wrap break-words",children:e}),Tn=p.forwardRef(({className:e,side:t="left",align:r="start",children:n,...a},o)=>{const l=p.useRef(null);return p.useEffect(()=>{l.current&&(l.current.scrollTop=0)},[n]),g.jsx(Fa,{ref:o,side:t,align:r,className:fe("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-[60vh] overflow-y-auto whitespace-pre-wrap break-words rounded-md border px-3 py-2 text-sm shadow-md z-60",e),...a,children:typeof n=="string"?Sc(n):n})});Tn.displayName=Fa.displayName;const oo=nc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-8"}},defaultVariants:{variant:"default",size:"default"}}),be=p.forwardRef(({className:e,variant:t,tooltip:r,size:n,side:a="right",asChild:o=!1,...l},s)=>{const i=o?Li:"button";return r?g.jsx(Ma,{children:g.jsxs($a,{children:[g.jsx(Ha,{asChild:!0,children:g.jsx(i,{className:fe(oo({variant:t,size:n,className:e}),"cursor-pointer"),ref:s,...l})}),g.jsx(Tn,{side:a,children:r})]})}):g.jsx(i,{className:fe(oo({variant:t,size:n,className:e}),"cursor-pointer"),ref:s,...l})});be.displayName="Button";const Yt=p.forwardRef(({className:e,type:t,...r},n)=>g.jsx("input",{type:t,className:fe("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&::-webkit-inner-spin-button]:opacity-50 [&::-webkit-outer-spin-button]:opacity-50",e),ref:n,...r}));Yt.displayName="Input";/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ec=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ba=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var kc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cc=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:l,...s},i)=>p.createElement("svg",{ref:i,...kc,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ba("lucide",a),...s},[...l.map(([c,u])=>p.createElement(c,u)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const le=(e,t)=>{const r=p.forwardRef(({className:n,...a},o)=>p.createElement(Cc,{ref:o,iconNode:t,className:Ba(`lucide-${Ec(e)}`,n),...a}));return r.displayName=`${e}`,r};/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tc=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],vp=le("Activity",Tc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rc=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],yp=le("AlignCenter",Rc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ac=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],bp=le("AlignLeft",Ac);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jc=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],wp=le("AlignRight",jc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ic=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],xp=le("ArrowDown",Ic);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nc=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_p=le("ArrowUp",Nc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lc=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Pc=le("BookOpen",Lc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zc=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Va=le("Check",zc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sp=le("ChevronDown",Dc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oc=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ep=le("ChevronUp",Oc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gc=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Fc=le("ChevronsUpDown",Gc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],kp=le("CircleAlert",Mc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $c=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Cp=le("Copy",$c);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hc=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]],Tp=le("Eraser",Hc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bc=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Rp=le("FileText",Bc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vc=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Ap=le("Files",Vc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uc=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],jp=le("Filter",Uc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qc=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],Wc=le("Fullscreen",qc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xc=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],Yc=le("GitBranchPlus",Xc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kc=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Ip=le("Github",Kc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qc=[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],Jc=le("Grip",Qc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ua=le("LoaderCircle",Zc);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eu=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Np=le("Loader",eu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tu=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Lp=le("LogOut",tu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ru=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],nu=le("Maximize",ru);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ou=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],au=le("Minimize",ou);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const su=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],Pp=le("Palette",su);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iu=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],lu=le("Pause",iu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cu=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uu=le("Pencil",cu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const du=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],fu=le("Play",du);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hu=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],gu=le("RefreshCw",hu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pu=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],mu=le("RotateCcw",pu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vu=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],yu=le("RotateCw",vu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bu=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],wu=le("Scissors",bu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xu=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],_u=le("Search",xu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Su=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zp=le("Send",Su);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Eu=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ku=le("Settings",Eu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cu=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Dp=le("Trash",Cu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tu=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Op=le("TriangleAlert",Tu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ru=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],qa=le("Undo2",Ru);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Au=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Gp=le("Upload",Au);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ju=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Iu=le("X",ju);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nu=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Fp=le("Zap",Nu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lu=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Pu=le("ZoomIn",Lu);/** + * @license lucide-react v0.475.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zu=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Du=le("ZoomOut",zu),Ou=wa,Mp=zi,Gu=va,Wa=p.forwardRef(({className:e,...t},r)=>g.jsx(_n,{ref:r,className:fe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/30",e),...t}));Wa.displayName=_n.displayName;const Xa=p.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(Gu,{children:[g.jsx(Wa,{}),g.jsxs(Sn,{ref:n,className:fe("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...r,children:[t,g.jsxs(Pi,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[g.jsx(Iu,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xa.displayName=Sn.displayName;const Ya=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ya.displayName="DialogHeader";const Ka=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ka.displayName="DialogFooter";const Qa=p.forwardRef(({className:e,...t},r)=>g.jsx(ya,{ref:r,className:fe("text-lg leading-none font-semibold tracking-tight",e),...t}));Qa.displayName=ya.displayName;const Ja=p.forwardRef(({className:e,...t},r)=>g.jsx(ba,{ref:r,className:fe("text-muted-foreground text-sm",e),...t}));Ja.displayName=ba.displayName;const Rn=Oi,An=Gi,lr=p.forwardRef(({className:e,align:t="center",sideOffset:r=4,collisionPadding:n,sticky:a,avoidCollisions:o=!1,...l},s)=>g.jsx(Di,{children:g.jsx(xa,{ref:s,align:t,sideOffset:r,collisionPadding:n,sticky:a,avoidCollisions:o,className:fe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 rounded-md border p-4 shadow-md outline-none",e),...l})}));lr.displayName=xa.displayName;var Fu=` +precision mediump float; + +varying vec4 v_color; +varying float v_border; + +const float radius = 0.5; +const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); + +void main(void) { + vec2 m = gl_PointCoord - vec2(0.5, 0.5); + float dist = radius - length(m); + + // No antialiasing for picking mode: + #ifdef PICKING_MODE + if (dist > v_border) + gl_FragColor = v_color; + else + gl_FragColor = transparent; + + #else + float t = 0.0; + if (dist > v_border) + t = 1.0; + else if (dist > 0.0) + t = dist / v_border; + + gl_FragColor = mix(transparent, v_color, t); + #endif +} +`,Mu=Fu,$u=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_position; +attribute float a_size; + +uniform float u_sizeRatio; +uniform float u_pixelRatio; +uniform mat3 u_matrix; + +varying vec4 v_color; +varying float v_border; + +const float bias = 255.0 / 254.0; + +void main() { + gl_Position = vec4( + (u_matrix * vec3(a_position, 1)).xy, + 0, + 1 + ); + + // Multiply the point size twice: + // - x SCALING_RATIO to correct the canvas scaling + // - x 2 to correct the formulae + gl_PointSize = a_size / u_sizeRatio * u_pixelRatio * 2.0; + + v_border = (0.5 / a_size) * u_sizeRatio; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,Hu=$u,Za=WebGLRenderingContext,ao=Za.UNSIGNED_BYTE,so=Za.FLOAT,Bu=["u_sizeRatio","u_pixelRatio","u_matrix"],Vu=function(e){function t(){return la(this,t),ca(this,t,arguments)}return aa(t,e),sa(t,[{key:"getDefinition",value:function(){return{VERTICES:1,VERTEX_SHADER_SOURCE:Hu,FRAGMENT_SHADER_SOURCE:Mu,METHOD:WebGLRenderingContext.POINTS,UNIFORMS:Bu,ATTRIBUTES:[{name:"a_position",size:2,type:so},{name:"a_size",size:1,type:so},{name:"a_color",size:4,type:ao,normalized:!0},{name:"a_id",size:4,type:ao,normalized:!0}]}}},{key:"processVisibleItem",value:function(n,a,o){var l=this.array;l[a++]=o.x,l[a++]=o.y,l[a++]=o.size,l[a++]=rr(o.color),l[a++]=n}},{key:"setUniforms",value:function(n,a){var o=n.sizeRatio,l=n.pixelRatio,s=n.matrix,i=a.gl,c=a.uniformLocations,u=c.u_sizeRatio,f=c.u_pixelRatio,h=c.u_matrix;i.uniform1f(f,l),i.uniform1f(u,o),i.uniformMatrix3fv(h,!1,s)}}])}(ia),Uu=` +attribute vec4 a_id; +attribute vec4 a_color; +attribute vec2 a_normal; +attribute float a_normalCoef; +attribute vec2 a_positionStart; +attribute vec2 a_positionEnd; +attribute float a_positionCoef; +attribute float a_sourceRadius; +attribute float a_targetRadius; +attribute float a_sourceRadiusCoef; +attribute float a_targetRadiusCoef; + +uniform mat3 u_matrix; +uniform float u_zoomRatio; +uniform float u_sizeRatio; +uniform float u_pixelRatio; +uniform float u_correctionRatio; +uniform float u_minEdgeThickness; +uniform float u_lengthToThicknessRatio; +uniform float u_feather; + +varying vec4 v_color; +varying vec2 v_normal; +varying float v_thickness; +varying float v_feather; + +const float bias = 255.0 / 254.0; + +void main() { + float minThickness = u_minEdgeThickness; + + vec2 normal = a_normal * a_normalCoef; + vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; + + float normalLength = length(normal); + vec2 unitNormal = normal / normalLength; + + // These first computations are taken from edge.vert.glsl. Please read it to + // get better comments on what's happening: + float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); + float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; + + // Here, we move the point to leave space for the arrow heads: + // Source arrow head + float sourceRadius = a_sourceRadius * a_sourceRadiusCoef; + float sourceDirection = sign(sourceRadius); + float webGLSourceRadius = sourceDirection * sourceRadius * 2.0 * u_correctionRatio / u_sizeRatio; + float webGLSourceArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; + vec2 sourceCompensationVector = + vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x) + * (webGLSourceRadius + webGLSourceArrowHeadLength); + + // Target arrow head + float targetRadius = a_targetRadius * a_targetRadiusCoef; + float targetDirection = sign(targetRadius); + float webGLTargetRadius = targetDirection * targetRadius * 2.0 * u_correctionRatio / u_sizeRatio; + float webGLTargetArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; + vec2 targetCompensationVector = + vec2(-targetDirection * unitNormal.y, targetDirection * unitNormal.x) + * (webGLTargetRadius + webGLTargetArrowHeadLength); + + // Here is the proper position of the vertex + gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + sourceCompensationVector + targetCompensationVector, 1)).xy, 0, 1); + + v_thickness = webGLThickness / u_zoomRatio; + + v_normal = unitNormal; + + v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; + + #ifdef PICKING_MODE + // For picking mode, we use the ID as the color: + v_color = a_id; + #else + // For normal mode, we use the color: + v_color = a_color; + #endif + + v_color.a *= bias; +} +`,qu=Uu,es=WebGLRenderingContext,io=es.UNSIGNED_BYTE,qe=es.FLOAT,Wu=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],Xu={lengthToThicknessRatio:wn.lengthToThicknessRatio};function ts(e){var t=Wt(Wt({},Xu),{});return function(r){function n(){return la(this,n),ca(this,n,arguments)}return aa(n,r),sa(n,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:qu,FRAGMENT_SHADER_SOURCE:yi,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Wu,ATTRIBUTES:[{name:"a_positionStart",size:2,type:qe},{name:"a_positionEnd",size:2,type:qe},{name:"a_normal",size:2,type:qe},{name:"a_color",size:4,type:io,normalized:!0},{name:"a_id",size:4,type:io,normalized:!0},{name:"a_sourceRadius",size:1,type:qe},{name:"a_targetRadius",size:1,type:qe}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:qe},{name:"a_normalCoef",size:1,type:qe},{name:"a_sourceRadiusCoef",size:1,type:qe},{name:"a_targetRadiusCoef",size:1,type:qe}],CONSTANT_DATA:[[0,1,-1,0],[0,-1,1,0],[1,1,0,1],[1,1,0,1],[0,-1,1,0],[1,-1,0,-1]]}}},{key:"processVisibleItem",value:function(o,l,s,i,c){var u=c.size||1,f=s.x,h=s.y,d=i.x,y=i.y,b=rr(c.color),C=d-f,j=y-h,_=s.size||1,A=i.size||1,I=C*C+j*j,N=0,z=0;I&&(I=1/Math.sqrt(I),N=-j*I*u,z=C*I*u);var m=this.array;m[l++]=f,m[l++]=h,m[l++]=d,m[l++]=y,m[l++]=N,m[l++]=z,m[l++]=b,m[l++]=o,m[l++]=_,m[l++]=A}},{key:"setUniforms",value:function(o,l){var s=l.gl,i=l.uniformLocations,c=i.u_matrix,u=i.u_zoomRatio,f=i.u_feather,h=i.u_pixelRatio,d=i.u_correctionRatio,y=i.u_sizeRatio,b=i.u_minEdgeThickness,C=i.u_lengthToThicknessRatio;s.uniformMatrix3fv(c,!1,o.matrix),s.uniform1f(u,o.zoomRatio),s.uniform1f(y,o.sizeRatio),s.uniform1f(d,o.correctionRatio),s.uniform1f(h,o.pixelRatio),s.uniform1f(f,o.antiAliasingFeather),s.uniform1f(b,o.minEdgeThickness),s.uniform1f(C,t.lengthToThicknessRatio)}}])}(ua)}ts();function Yu(e){return bi([ts(),qn(e),qn(Wt(Wt({},e),{},{extremity:"source"}))])}Yu();function Ku(e){if(Array.isArray(e))return e}function Qu(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,l,s=[],i=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(i=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);i=!0);}catch(u){c=!0,a=u}finally{try{if(!i&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw a}}return s}}function sn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r v_radius) + gl_FragColor = transparent; + else { + gl_FragColor = v_color; + gl_FragColor.a *= bias; + } + #else + // Sizes: +`).concat(t.flatMap(function(a,o){var l=a.size;if("fill"in l)return[];l=l;var s="attribute"in l?"v_borderSize_".concat(o+1):Wn(l.value),i=(l.mode||ud)==="pixels"?"u_correctionRatio":"v_radius";return[" float borderSize_".concat(o+1," = ").concat(i," * ").concat(s,";")]}).join(` +`),` + // Now, let's split the remaining space between "fill" borders: + float fillBorderSize = (v_radius - (`).concat(t.flatMap(function(a,o){var l=a.size;return"fill"in l?[]:["borderSize_".concat(o+1)]}).join(" + "),") ) / ").concat(r,`; +`).concat(t.flatMap(function(a,o){var l=a.size;return"fill"in l?[" float borderSize_".concat(o+1," = fillBorderSize;")]:[]}).join(` +`),` + + // Finally, normalize all border sizes, to start from the full size and to end with the smallest: + float adjustedBorderSize_0 = v_radius; +`).concat(t.map(function(a,o){return" float adjustedBorderSize_".concat(o+1," = adjustedBorderSize_").concat(o," - borderSize_").concat(o+1,";")}).join(` +`),` + + // Colors: + vec4 borderColor_0 = transparent; +`).concat(t.map(function(a,o){var l=a.color,s=[];return"attribute"in l?s.push(" vec4 borderColor_".concat(o+1," = v_borderColor_").concat(o+1,";")):"transparent"in l?s.push(" vec4 borderColor_".concat(o+1," = vec4(0.0, 0.0, 0.0, 0.0);")):s.push(" vec4 borderColor_".concat(o+1," = u_borderColor_").concat(o+1,";")),s.push(" borderColor_".concat(o+1,".a *= bias;")),s.push(" if (borderSize_".concat(o+1," <= 1.0 * u_correctionRatio) { borderColor_").concat(o+1," = borderColor_").concat(o,"; }")),s.join(` +`)}).join(` +`),` + if (dist > adjustedBorderSize_0) { + gl_FragColor = borderColor_0; + } else `).concat(t.map(function(a,o){return"if (dist > adjustedBorderSize_".concat(o,` - aaBorder) { + gl_FragColor = mix(borderColor_`).concat(o+1,", borderColor_").concat(o,", (dist - adjustedBorderSize_").concat(o,` + aaBorder) / aaBorder); + } else if (dist > adjustedBorderSize_`).concat(o+1,`) { + gl_FragColor = borderColor_`).concat(o+1,`; + } else `)}).join(""),` { /* Nothing to add here */ } + #endif +} +`);return n}function gd(e){var t=e.borders,r=` +attribute vec2 a_position; +attribute float a_size; +attribute float a_angle; + +uniform mat3 u_matrix; +uniform float u_sizeRatio; +uniform float u_correctionRatio; + +varying vec2 v_diffVector; +varying float v_radius; + +#ifdef PICKING_MODE +attribute vec4 a_id; +varying vec4 v_color; +#else +`.concat(t.flatMap(function(n,a){var o=n.size;return"attribute"in o?["attribute float a_borderSize_".concat(a+1,";"),"varying float v_borderSize_".concat(a+1,";")]:[]}).join(` +`),` +`).concat(t.flatMap(function(n,a){var o=n.color;return"attribute"in o?["attribute vec4 a_borderColor_".concat(a+1,";"),"varying vec4 v_borderColor_".concat(a+1,";")]:[]}).join(` +`),` +#endif + +const float bias = 255.0 / 254.0; +const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); + +void main() { + float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; + vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); + vec2 position = a_position + diffVector; + gl_Position = vec4( + (u_matrix * vec3(position, 1)).xy, + 0, + 1 + ); + + v_radius = size / 2.0; + v_diffVector = diffVector; + + #ifdef PICKING_MODE + v_color = a_id; + #else +`).concat(t.flatMap(function(n,a){var o=n.size;return"attribute"in o?[" v_borderSize_".concat(a+1," = a_borderSize_").concat(a+1,";")]:[]}).join(` +`),` +`).concat(t.flatMap(function(n,a){var o=n.color;return"attribute"in o?[" v_borderColor_".concat(a+1," = a_borderColor_").concat(a+1,";")]:[]}).join(` +`),` + #endif +} +`);return r}var as=WebGLRenderingContext,uo=as.UNSIGNED_BYTE,zt=as.FLOAT;function pd(e){var t,r=co(co({},dd),{}),n=r.borders,a=r.drawLabel,o=r.drawHover,l=["u_sizeRatio","u_correctionRatio","u_matrix"].concat(mr(n.flatMap(function(s,i){var c=s.color;return"value"in c?["u_borderColor_".concat(i+1)]:[]})));return t=function(s){sd(i,s);function i(){var c;ed(this,i);for(var u=arguments.length,f=new Array(u),h=0;he.length)&&(t=e.length);for(var r=0,n=Array(t);rP){var V="…";for(b=b+V,v=o.measureText(b).width;v>P&&b.length>1;)b=b.slice(0,-2)+V,v=o.measureText(b).width;if(b.length<4)return}for(var $={},Q=0,X=b.length;Q{const r=Be(),{gotoNode:n}=da();return p.useEffect(()=>{const a=r.getGraph();if(t){if(e&&a.hasNode(e))try{a.setNodeAttribute(e,"highlighted",!0),n(e)}catch(o){console.error("Error focusing on node:",o)}else r.setCustomBBox(null),r.getCamera().animate({x:.5,y:.5,ratio:1},{duration:0});te.getState().setMoveToSelectedNode(!1)}else if(e&&a.hasNode(e))try{a.setNodeAttribute(e,"highlighted",!0)}catch(o){console.error("Error highlighting node:",o)}return()=>{if(e&&a.hasNode(e))try{a.setNodeAttribute(e,"highlighted",!1)}catch(o){console.error("Error cleaning up node highlight:",o)}}},[e,t,r,n]),null};function St(e,t){const r=Be(),n=p.useRef(t);return fa(n.current,t)||(n.current=t),{positions:p.useCallback(()=>n.current?e(r.getGraph(),n.current):{},[r,n,e]),assign:p.useCallback(()=>{n.current&&e.assign(r.getGraph(),n.current)},[r,n,e])}}function In(e,t){const r=Be(),[n,a]=p.useState(!1),[o,l]=p.useState(null),s=p.useRef(t);return fa(s.current,t)||(s.current=t),p.useEffect(()=>{a(!1);let i=null;return s.current&&(i=new e(r.getGraph(),s.current)),l(i),()=>{i!==null&&i.kill()}},[r,s,l,a,e]),{stop:p.useCallback(()=>{o&&(o.stop(),a(!1))},[o,a]),start:p.useCallback(()=>{o&&(o.start(),a(!0))},[o,a]),kill:p.useCallback(()=>{o&&o.kill(),a(!1)},[o,a]),isRunning:n}}var yr,go;function It(){if(go)return yr;go=1;function e(r){return!r||typeof r!="object"||typeof r=="function"||Array.isArray(r)||r instanceof Set||r instanceof Map||r instanceof RegExp||r instanceof Date}function t(r,n){r=r||{};var a={};for(var o in n){var l=r[o],s=n[o];if(!e(s)){a[o]=t(l,s);continue}l===void 0?a[o]=s:a[o]=l}return a}return yr=t,yr}var br,po;function Dd(){if(po)return br;po=1;function e(r){return function(n,a){return n+Math.floor(r()*(a-n+1))}}var t=e(Math.random);return t.createRandom=e,br=t,br}var wr,mo;function Od(){if(mo)return wr;mo=1;var e=Dd().createRandom;function t(n){var a=e(n);return function(o){for(var l=o.length,s=l-1,i=-1;++i0},a.prototype.addChild=function(m,E){this.children[m]=E,++this.countChildren},a.prototype.getChild=function(m){if(!this.children.hasOwnProperty(m)){var E=new a;this.children[m]=E,++this.countChildren}return this.children[m]},a.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var m=this;for(var E in m.children){var x=m.children[E];x.x+=m.x,x.y+=m.y,x.applyPositionToChildren()}}};function o(m,E,x){for(var T in E.children){var R=E.children[T];R.hasChildren()?o(m,R,x):x[R.id]={x:R.x,y:R.y}}}function l(m,E){var x=m.r-E.r,T=E.x-m.x,R=E.y-m.y;return x<0||x*x0&&x*x>T*T+R*R}function i(m,E){for(var x=0;xK?(R=(D+K-O)/(2*D),H=Math.sqrt(Math.max(0,K/D-R*R)),x.x=m.x-R*T-H*w,x.y=m.y-R*w+H*T):(R=(D+O-K)/(2*D),H=Math.sqrt(Math.max(0,O/D-R*R)),x.x=E.x+R*T-H*w,x.y=E.y+R*w+H*T)):(x.x=E.x+x.r,x.y=E.y)}function j(m,E){var x=m.r+E.r-1e-6,T=E.x-m.x,R=E.y-m.y;return x>0&&x*x>T*T+R*R}function _(m,E){var x=m.length;if(x===0)return 0;var T,R,O,w,H,K,D,k,S,B;if(T=m[0],T.x=0,T.y=0,x<=1)return T.r;if(R=m[1],T.x=-R.r,R.x=T.r,R.y=0,x<=2)return T.r+R.r;O=m[2],C(R,T,O),T=new a(null,null,null,null,T),R=new a(null,null,null,null,R),O=new a(null,null,null,null,O),T.next=O.previous=R,R.next=T.previous=O,O.next=R.previous=T;e:for(K=3;K"u"?a:c};typeof a=="function"&&(l=a);var s=function(c){return l(c[n])},i=function(){return l(void 0)};return typeof n=="string"?(o.fromAttributes=s,o.fromGraph=function(c,u){return s(c.getNodeAttributes(u))},o.fromEntry=function(c,u){return s(u)}):typeof n=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},o.fromGraph=function(c,u){return l(n(u,c.getNodeAttributes(u)))},o.fromEntry=function(c,u){return l(n(c,u))}):(o.fromAttributes=i,o.fromGraph=i,o.fromEntry=i),o}function r(n,a){var o={},l=function(c){return typeof c>"u"?a:c};typeof a=="function"&&(l=a);var s=function(c){return l(c[n])},i=function(){return l(void 0)};return typeof n=="string"?(o.fromAttributes=s,o.fromGraph=function(c,u){return s(c.getEdgeAttributes(u))},o.fromEntry=function(c,u){return s(u)},o.fromPartialEntry=o.fromEntry,o.fromMinimalEntry=o.fromEntry):typeof n=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},o.fromGraph=function(c,u){var f=c.extremities(u);return l(n(u,c.getEdgeAttributes(u),f[0],f[1],c.getNodeAttributes(f[0]),c.getNodeAttributes(f[1]),c.isUndirected(u)))},o.fromEntry=function(c,u,f,h,d,y,b){return l(n(c,u,f,h,d,y,b))},o.fromPartialEntry=function(c,u,f,h){return l(n(c,u,f,h))},o.fromMinimalEntry=function(c,u){return l(n(c,u))}):(o.fromAttributes=i,o.fromGraph=i,o.fromEntry=i,o.fromMinimalEntry=i),o}return Ct.createNodeValueGetter=t,Ct.createEdgeValueGetter=r,Ct.createEdgeWeightGetter=function(n){return r(n,e)},Ct}var Sr,wo;function hs(){if(wo)return Sr;wo=1;const{createNodeValueGetter:e,createEdgeValueGetter:t}=Nn();return Sr=function(n,a,o){const{nodeXAttribute:l,nodeYAttribute:s}=o,{attraction:i,repulsion:c,gravity:u,inertia:f,maxMove:h}=o.settings;let{shouldSkipNode:d,shouldSkipEdge:y,isNodeFixed:b}=o;b=e(b),d=e(d,!1),y=t(y,!1);const C=n.filterNodes((A,I)=>!d.fromEntry(A,I)),j=C.length;for(let A=0;A{if(N===z||d.fromEntry(N,m)||d.fromEntry(z,E)||y.fromEntry(A,I,N,z,m,E,x))return;const T=a[N],R=a[z],O=R.x-T.x,w=R.y-T.y,H=Math.sqrt(O*O+w*w)||1,K=i*H*O,D=i*H*w;T.dx+=K,T.dy+=D,R.dx-=K,R.dy-=D}),u)for(let A=0;Ah&&(N.dx*=h/z,N.dy*=h/z),b.fromGraph(n,I)?N.fixed=!0:(N.x+=N.dx,N.y+=N.dy,N.fixed=!1)}return{converged:_}},Sr}var Dt={},xo;function gs(){return xo||(xo=1,Dt.assignLayoutChanges=function(e,t,r){const{nodeXAttribute:n,nodeYAttribute:a}=r;e.updateEachNodeAttributes((o,l)=>{const s=t[o];return!s||s.fixed||(l[n]=s.x,l[a]=s.y),l},{attributes:["x","y"]})},Dt.collectLayoutChanges=function(e){const t={};for(const r in e){const n=e[r];t[r]={x:n.x,y:n.y}}return t}),Dt}var Er,_o;function ps(){return _o||(_o=1,Er={nodeXAttribute:"x",nodeYAttribute:"y",isNodeFixed:"fixed",shouldSkipNode:null,shouldSkipEdge:null,settings:{attraction:5e-4,repulsion:.1,gravity:1e-4,inertia:.6,maxMove:200}}),Er}var kr,So;function qd(){if(So)return kr;So=1;const e=Xe(),t=It(),r=hs(),n=gs(),a=ps();function o(s,i,c){if(!e(i))throw new Error("graphology-layout-force: the given graph is not a valid graphology instance.");typeof c=="number"?c={maxIterations:c}:c=c||{};const u=c.maxIterations;if(c=t(c,a),typeof u!="number"||u<=0)throw new Error("graphology-layout-force: you should provide a positive number of maximum iterations.");const f={};let h=null,d;for(d=0;dthis.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},Cr=o,Cr}var Kd=Yd();const Qd=He(Kd);function Jd(e={maxIterations:100}){return St(Xd,e)}function Zd(e={}){return In(Qd,e)}var Tr,ko;function ef(){if(ko)return Tr;ko=1;var e=0,t=1,r=2,n=3,a=4,o=5,l=6,s=7,i=8,c=9,u=0,f=1,h=2,d=0,y=1,b=2,C=3,j=4,_=5,A=6,I=7,N=8,z=3,m=10,E=3,x=9,T=10;return Tr=function(O,w,H){var K,D,k,S,B,ae,M,v,P,V,$=w.length,Q=H.length,X=O.adjustSizes,Y=O.barnesHutTheta*O.barnesHutTheta,se,ne,ie,F,J,q,U,L=[];for(k=0;k<$;k+=m)w[k+a]=w[k+r],w[k+o]=w[k+n],w[k+r]=0,w[k+n]=0;if(O.outboundAttractionDistribution){for(se=0,k=0;k<$;k+=m)se+=w[k+l];se/=$/m}if(O.barnesHutOptimize){var oe=1/0,ue=-1/0,re=1/0,ee=-1/0,G,ge,pe;for(k=0;k<$;k+=m)oe=Math.min(oe,w[k+e]),ue=Math.max(ue,w[k+e]),re=Math.min(re,w[k+t]),ee=Math.max(ee,w[k+t]);var ye=ue-oe,we=ee-re;for(ye>we?(re-=(ye-we)/2,ee=re+ye):(oe-=(we-ye)/2,ue=oe+we),L[0+d]=-1,L[0+y]=(oe+ue)/2,L[0+b]=(re+ee)/2,L[0+C]=Math.max(ue-oe,ee-re),L[0+j]=-1,L[0+_]=-1,L[0+A]=0,L[0+I]=0,L[0+N]=0,K=1,k=0;k<$;k+=m)for(D=0,pe=z;;)if(L[D+_]>=0){w[k+e]=0)if(q=Math.pow(w[k+e]-L[D+I],2)+Math.pow(w[k+t]-L[D+N],2),V=L[D+C],4*V*V/q0?(U=ne*w[k+l]*L[D+A]/q,w[k+r]+=ie*U,w[k+n]+=F*U):q<0&&(U=-ne*w[k+l]*L[D+A]/Math.sqrt(q),w[k+r]+=ie*U,w[k+n]+=F*U):q>0&&(U=ne*w[k+l]*L[D+A]/q,w[k+r]+=ie*U,w[k+n]+=F*U),D=L[D+j],D<0)break;continue}else{D=L[D+_];continue}else{if(ae=L[D+d],ae>=0&&ae!==k&&(ie=w[k+e]-w[ae+e],F=w[k+t]-w[ae+t],q=ie*ie+F*F,X===!0?q>0?(U=ne*w[k+l]*w[ae+l]/q,w[k+r]+=ie*U,w[k+n]+=F*U):q<0&&(U=-ne*w[k+l]*w[ae+l]/Math.sqrt(q),w[k+r]+=ie*U,w[k+n]+=F*U):q>0&&(U=ne*w[k+l]*w[ae+l]/q,w[k+r]+=ie*U,w[k+n]+=F*U)),D=L[D+j],D<0)break;continue}else for(ne=O.scalingRatio,S=0;S<$;S+=m)for(B=0;B0?(U=ne*w[S+l]*w[B+l]/q/q,w[S+r]+=ie*U,w[S+n]+=F*U,w[B+r]-=ie*U,w[B+n]-=F*U):q<0&&(U=100*ne*w[S+l]*w[B+l],w[S+r]+=ie*U,w[S+n]+=F*U,w[B+r]-=ie*U,w[B+n]-=F*U)):(q=Math.sqrt(ie*ie+F*F),q>0&&(U=ne*w[S+l]*w[B+l]/q/q,w[S+r]+=ie*U,w[S+n]+=F*U,w[B+r]-=ie*U,w[B+n]-=F*U));for(P=O.gravity/O.scalingRatio,ne=O.scalingRatio,k=0;k<$;k+=m)U=0,ie=w[k+e],F=w[k+t],q=Math.sqrt(Math.pow(ie,2)+Math.pow(F,2)),O.strongGravityMode?q>0&&(U=ne*w[k+l]*P):q>0&&(U=ne*w[k+l]*P/q),w[k+r]-=ie*U,w[k+n]-=F*U;for(ne=1*(O.outboundAttractionDistribution?se:1),M=0;M0&&(U=-ne*J*Math.log(1+q)/q/w[S+l]):q>0&&(U=-ne*J*Math.log(1+q)/q):O.outboundAttractionDistribution?q>0&&(U=-ne*J/w[S+l]):q>0&&(U=-ne*J)):(q=Math.sqrt(Math.pow(ie,2)+Math.pow(F,2)),O.linLogMode?O.outboundAttractionDistribution?q>0&&(U=-ne*J*Math.log(1+q)/q/w[S+l]):q>0&&(U=-ne*J*Math.log(1+q)/q):O.outboundAttractionDistribution?(q=1,U=-ne*J/w[S+l]):(q=1,U=-ne*J)),q>0&&(w[S+r]+=ie*U,w[S+n]+=F*U,w[B+r]-=ie*U,w[B+n]-=F*U);var de,me,Ie,Ce,Te,Pe;if(X===!0)for(k=0;k<$;k+=m)w[k+c]!==1&&(de=Math.sqrt(Math.pow(w[k+r],2)+Math.pow(w[k+n],2)),de>T&&(w[k+r]=w[k+r]*T/de,w[k+n]=w[k+n]*T/de),me=w[k+l]*Math.sqrt((w[k+a]-w[k+r])*(w[k+a]-w[k+r])+(w[k+o]-w[k+n])*(w[k+o]-w[k+n])),Ie=Math.sqrt((w[k+a]+w[k+r])*(w[k+a]+w[k+r])+(w[k+o]+w[k+n])*(w[k+o]+w[k+n]))/2,Ce=.1*Math.log(1+Ie)/(1+Math.sqrt(me)),Te=w[k+e]+w[k+r]*(Ce/O.slowDown),w[k+e]=Te,Pe=w[k+t]+w[k+n]*(Ce/O.slowDown),w[k+t]=Pe);else for(k=0;k<$;k+=m)w[k+c]!==1&&(me=w[k+l]*Math.sqrt((w[k+a]-w[k+r])*(w[k+a]-w[k+r])+(w[k+o]-w[k+n])*(w[k+o]-w[k+n])),Ie=Math.sqrt((w[k+a]+w[k+r])*(w[k+a]+w[k+r])+(w[k+o]+w[k+n])*(w[k+o]+w[k+n]))/2,Ce=w[k+s]*Math.log(1+Ie)/(1+Math.sqrt(me)),w[k+s]=Math.min(1,Math.sqrt(Ce*(Math.pow(w[k+r],2)+Math.pow(w[k+n],2))/(1+Math.sqrt(me)))),Te=w[k+e]+w[k+r]*(Ce/O.slowDown),w[k+e]=Te,Pe=w[k+t]+w[k+n]*(Ce/O.slowDown),w[k+t]=Pe);return{}},Tr}var We={},Co;function ms(){if(Co)return We;Co=1;var e=10,t=3;return We.assign=function(r){r=r||{};var n=Array.prototype.slice.call(arguments).slice(1),a,o,l;for(a=0,l=n.length;a=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in r&&typeof r.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in r&&!(typeof r.gravity=="number"&&r.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in r&&!(typeof r.slowDown=="number"||r.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in r&&typeof r.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in r&&!(typeof r.barnesHutTheta=="number"&&r.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},We.graphToByteArrays=function(r,n){var a=r.order,o=r.size,l={},s,i=new Float32Array(a*e),c=new Float32Array(o*t);return s=0,r.forEachNode(function(u,f){l[u]=s,i[s]=f.x,i[s+1]=f.y,i[s+2]=0,i[s+3]=0,i[s+4]=0,i[s+5]=0,i[s+6]=1,i[s+7]=1,i[s+8]=f.size||1,i[s+9]=f.fixed?1:0,s+=e}),s=0,r.forEachEdge(function(u,f,h,d,y,b,C){var j=l[h],_=l[d],A=n(u,f,h,d,y,b,C);i[j+6]+=A,i[_+6]+=A,c[s]=j,c[s+1]=_,c[s+2]=A,s+=t}),{nodes:i,edges:c}},We.assignLayoutChanges=function(r,n,a){var o=0;r.updateEachNodeAttributes(function(l,s){return s.x=n[o],s.y=n[o+1],o+=e,a?a(l,s):s})},We.readGraphPositions=function(r,n){var a=0;r.forEachNode(function(o,l){n[a]=l.x,n[a+1]=l.y,a+=e})},We.collectLayoutChanges=function(r,n,a){for(var o=r.nodes(),l={},s=0,i=0,c=n.length;s2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(c)}}var s=o.bind(null,!1);return s.assign=o.bind(null,!0),s.inferSettings=l,Ar=s,Ar}var rf=tf();const nf=He(rf);var jr,Ao;function of(){return Ao||(Ao=1,jr=function(){var t,r,n={};(function(){var o=0,l=1,s=2,i=3,c=4,u=5,f=6,h=7,d=8,y=9,b=0,C=1,j=2,_=0,A=1,I=2,N=3,z=4,m=5,E=6,x=7,T=8,R=3,O=10,w=3,H=9,K=10;n.exports=function(k,S,B){var ae,M,v,P,V,$,Q,X,Y,se,ne=S.length,ie=B.length,F=k.adjustSizes,J=k.barnesHutTheta*k.barnesHutTheta,q,U,L,oe,ue,re,ee,G=[];for(v=0;vTe?(ye-=(Ce-Te)/2,we=ye+Ce):(ge-=(Te-Ce)/2,pe=ge+Te),G[0+_]=-1,G[0+A]=(ge+pe)/2,G[0+I]=(ye+we)/2,G[0+N]=Math.max(pe-ge,we-ye),G[0+z]=-1,G[0+m]=-1,G[0+E]=0,G[0+x]=0,G[0+T]=0,ae=1,v=0;v=0){S[v+o]=0)if(re=Math.pow(S[v+o]-G[M+x],2)+Math.pow(S[v+l]-G[M+T],2),se=G[M+N],4*se*se/re0?(ee=U*S[v+f]*G[M+E]/re,S[v+s]+=L*ee,S[v+i]+=oe*ee):re<0&&(ee=-U*S[v+f]*G[M+E]/Math.sqrt(re),S[v+s]+=L*ee,S[v+i]+=oe*ee):re>0&&(ee=U*S[v+f]*G[M+E]/re,S[v+s]+=L*ee,S[v+i]+=oe*ee),M=G[M+z],M<0)break;continue}else{M=G[M+m];continue}else{if($=G[M+_],$>=0&&$!==v&&(L=S[v+o]-S[$+o],oe=S[v+l]-S[$+l],re=L*L+oe*oe,F===!0?re>0?(ee=U*S[v+f]*S[$+f]/re,S[v+s]+=L*ee,S[v+i]+=oe*ee):re<0&&(ee=-U*S[v+f]*S[$+f]/Math.sqrt(re),S[v+s]+=L*ee,S[v+i]+=oe*ee):re>0&&(ee=U*S[v+f]*S[$+f]/re,S[v+s]+=L*ee,S[v+i]+=oe*ee)),M=G[M+z],M<0)break;continue}else for(U=k.scalingRatio,P=0;P0?(ee=U*S[P+f]*S[V+f]/re/re,S[P+s]+=L*ee,S[P+i]+=oe*ee,S[V+s]-=L*ee,S[V+i]-=oe*ee):re<0&&(ee=100*U*S[P+f]*S[V+f],S[P+s]+=L*ee,S[P+i]+=oe*ee,S[V+s]-=L*ee,S[V+i]-=oe*ee)):(re=Math.sqrt(L*L+oe*oe),re>0&&(ee=U*S[P+f]*S[V+f]/re/re,S[P+s]+=L*ee,S[P+i]+=oe*ee,S[V+s]-=L*ee,S[V+i]-=oe*ee));for(Y=k.gravity/k.scalingRatio,U=k.scalingRatio,v=0;v0&&(ee=U*S[v+f]*Y):re>0&&(ee=U*S[v+f]*Y/re),S[v+s]-=L*ee,S[v+i]-=oe*ee;for(U=1*(k.outboundAttractionDistribution?q:1),Q=0;Q0&&(ee=-U*ue*Math.log(1+re)/re/S[P+f]):re>0&&(ee=-U*ue*Math.log(1+re)/re):k.outboundAttractionDistribution?re>0&&(ee=-U*ue/S[P+f]):re>0&&(ee=-U*ue)):(re=Math.sqrt(Math.pow(L,2)+Math.pow(oe,2)),k.linLogMode?k.outboundAttractionDistribution?re>0&&(ee=-U*ue*Math.log(1+re)/re/S[P+f]):re>0&&(ee=-U*ue*Math.log(1+re)/re):k.outboundAttractionDistribution?(re=1,ee=-U*ue/S[P+f]):(re=1,ee=-U*ue)),re>0&&(S[P+s]+=L*ee,S[P+i]+=oe*ee,S[V+s]-=L*ee,S[V+i]-=oe*ee);var Pe,Ye,Ke,Re,it,ze;if(F===!0)for(v=0;vK&&(S[v+s]=S[v+s]*K/Pe,S[v+i]=S[v+i]*K/Pe),Ye=S[v+f]*Math.sqrt((S[v+c]-S[v+s])*(S[v+c]-S[v+s])+(S[v+u]-S[v+i])*(S[v+u]-S[v+i])),Ke=Math.sqrt((S[v+c]+S[v+s])*(S[v+c]+S[v+s])+(S[v+u]+S[v+i])*(S[v+u]+S[v+i]))/2,Re=.1*Math.log(1+Ke)/(1+Math.sqrt(Ye)),it=S[v+o]+S[v+s]*(Re/k.slowDown),S[v+o]=it,ze=S[v+l]+S[v+i]*(Re/k.slowDown),S[v+l]=ze);else for(v=0;v1&&ie.has(ee))&&(S>1&&ie.add(ee),U=i[J+e],oe=i[J+t],re=i[J+r],G=U-q,ge=oe-L,pe=Math.sqrt(G*G+ge*ge),ye=pe0?(m[J]+=G/pe*(1+ue),E[J]+=ge/pe*(1+ue)):(m[J]+=w*o(),E[J]+=H*o())));for(y=0,b=0;y1&&U.has(ye))&&(v>1&&U.add(ye),re=h[oe+a],G=h[oe+o],pe=h[oe+l],we=re-ue,de=G-ee,me=Math.sqrt(we*we+de*de),Ie=me0?(R[oe]+=we/me*(1+ge),O[oe]+=de/me*(1+ge)):(R[oe]+=k*c(),O[oe]+=S*c())));for(_=0,A=0;_=0;)f=fn(e,t,r,n,c+1,o+1,l),f>u&&(c===a?f*=Go:Af.test(e.charAt(c-1))?(f*=kf,d=e.slice(a,c-1).match(jf),d&&a>0&&(f*=Math.pow(Fr,d.length))):If.test(e.charAt(c-1))?(f*=Ef,y=e.slice(a,c-1).match(xs),y&&a>0&&(f*=Math.pow(Fr,y.length))):(f*=Cf,a>0&&(f*=Math.pow(Fr,c-a))),e.charAt(c)!==t.charAt(o)&&(f*=Tf)),(ff&&(f=h*Gr)),f>u&&(u=f),c=r.indexOf(i,c+1);return l[s]=u,u}function Fo(e){return e.toLowerCase().replace(xs," ")}function Nf(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,fn(e,t,Fo(e),Fo(t),0,0,{})}var Tt='[cmdk-group=""]',Mr='[cmdk-group-items=""]',Lf='[cmdk-group-heading=""]',_s='[cmdk-item=""]',Mo=`${_s}:not([aria-disabled="true"])`,hn="cmdk-item-select",vt="data-value",Pf=(e,t,r)=>Nf(e,t,r),Ss=p.createContext(void 0),Nt=()=>p.useContext(Ss),Es=p.createContext(void 0),Ln=()=>p.useContext(Es),ks=p.createContext(void 0),Cs=p.forwardRef((e,t)=>{let r=yt(()=>{var v,P;return{search:"",value:(P=(v=e.value)!=null?v:e.defaultValue)!=null?P:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=yt(()=>new Set),a=yt(()=>new Map),o=yt(()=>new Map),l=yt(()=>new Set),s=Ts(e),{label:i,children:c,value:u,onValueChange:f,filter:h,shouldFilter:d,loop:y,disablePointerSelection:b=!1,vimBindings:C=!0,...j}=e,_=ft(),A=ft(),I=ft(),N=p.useRef(null),z=Uf();gt(()=>{if(u!==void 0){let v=u.trim();r.current.value=v,m.emit()}},[u]),gt(()=>{z(6,w)},[]);let m=p.useMemo(()=>({subscribe:v=>(l.current.add(v),()=>l.current.delete(v)),snapshot:()=>r.current,setState:(v,P,V)=>{var $,Q,X,Y;if(!Object.is(r.current[v],P)){if(r.current[v]=P,v==="search")O(),T(),z(1,R);else if(v==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let se=document.getElementById(I);se?se.focus():($=document.getElementById(_))==null||$.focus()}if(z(7,()=>{var se;r.current.selectedItemId=(se=H())==null?void 0:se.id,m.emit()}),V||z(5,w),((Q=s.current)==null?void 0:Q.value)!==void 0){let se=P??"";(Y=(X=s.current).onValueChange)==null||Y.call(X,se);return}}m.emit()}},emit:()=>{l.current.forEach(v=>v())}}),[]),E=p.useMemo(()=>({value:(v,P,V)=>{var $;P!==(($=o.current.get(v))==null?void 0:$.value)&&(o.current.set(v,{value:P,keywords:V}),r.current.filtered.items.set(v,x(P,V)),z(2,()=>{T(),m.emit()}))},item:(v,P)=>(n.current.add(v),P&&(a.current.has(P)?a.current.get(P).add(v):a.current.set(P,new Set([v]))),z(3,()=>{O(),T(),r.current.value||R(),m.emit()}),()=>{o.current.delete(v),n.current.delete(v),r.current.filtered.items.delete(v);let V=H();z(4,()=>{O(),(V==null?void 0:V.getAttribute("id"))===v&&R(),m.emit()})}),group:v=>(a.current.has(v)||a.current.set(v,new Set),()=>{o.current.delete(v),a.current.delete(v)}),filter:()=>s.current.shouldFilter,label:i||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:_,inputId:I,labelId:A,listInnerRef:N}),[]);function x(v,P){var V,$;let Q=($=(V=s.current)==null?void 0:V.filter)!=null?$:Pf;return v?Q(v,r.current.search,P):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let v=r.current.filtered.items,P=[];r.current.filtered.groups.forEach($=>{let Q=a.current.get($),X=0;Q.forEach(Y=>{let se=v.get(Y);X=Math.max(se,X)}),P.push([$,X])});let V=N.current;K().sort(($,Q)=>{var X,Y;let se=$.getAttribute("id"),ne=Q.getAttribute("id");return((X=v.get(ne))!=null?X:0)-((Y=v.get(se))!=null?Y:0)}).forEach($=>{let Q=$.closest(Mr);Q?Q.appendChild($.parentElement===Q?$:$.closest(`${Mr} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${Mr} > *`))}),P.sort(($,Q)=>Q[1]-$[1]).forEach($=>{var Q;let X=(Q=N.current)==null?void 0:Q.querySelector(`${Tt}[${vt}="${encodeURIComponent($[0])}"]`);X==null||X.parentElement.appendChild(X)})}function R(){let v=K().find(V=>V.getAttribute("aria-disabled")!=="true"),P=v==null?void 0:v.getAttribute(vt);m.setState("value",P||void 0)}function O(){var v,P,V,$;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let Q=0;for(let X of n.current){let Y=(P=(v=o.current.get(X))==null?void 0:v.value)!=null?P:"",se=($=(V=o.current.get(X))==null?void 0:V.keywords)!=null?$:[],ne=x(Y,se);r.current.filtered.items.set(X,ne),ne>0&&Q++}for(let[X,Y]of a.current)for(let se of Y)if(r.current.filtered.items.get(se)>0){r.current.filtered.groups.add(X);break}r.current.filtered.count=Q}function w(){var v,P,V;let $=H();$&&(((v=$.parentElement)==null?void 0:v.firstChild)===$&&((V=(P=$.closest(Tt))==null?void 0:P.querySelector(Lf))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function H(){var v;return(v=N.current)==null?void 0:v.querySelector(`${_s}[aria-selected="true"]`)}function K(){var v;return Array.from(((v=N.current)==null?void 0:v.querySelectorAll(Mo))||[])}function D(v){let P=K()[v];P&&m.setState("value",P.getAttribute(vt))}function k(v){var P;let V=H(),$=K(),Q=$.findIndex(Y=>Y===V),X=$[Q+v];(P=s.current)!=null&&P.loop&&(X=Q+v<0?$[$.length-1]:Q+v===$.length?$[0]:$[Q+v]),X&&m.setState("value",X.getAttribute(vt))}function S(v){let P=H(),V=P==null?void 0:P.closest(Tt),$;for(;V&&!$;)V=v>0?Bf(V,Tt):Vf(V,Tt),$=V==null?void 0:V.querySelector(Mo);$?m.setState("value",$.getAttribute(vt)):k(v)}let B=()=>D(K().length-1),ae=v=>{v.preventDefault(),v.metaKey?B():v.altKey?S(1):k(1)},M=v=>{v.preventDefault(),v.metaKey?D(0):v.altKey?S(-1):k(-1)};return p.createElement(xe.div,{ref:t,tabIndex:-1,...j,"cmdk-root":"",onKeyDown:v=>{var P;(P=j.onKeyDown)==null||P.call(j,v);let V=v.nativeEvent.isComposing||v.keyCode===229;if(!(v.defaultPrevented||V))switch(v.key){case"n":case"j":{C&&v.ctrlKey&&ae(v);break}case"ArrowDown":{ae(v);break}case"p":case"k":{C&&v.ctrlKey&&M(v);break}case"ArrowUp":{M(v);break}case"Home":{v.preventDefault(),D(0);break}case"End":{v.preventDefault(),B();break}case"Enter":{v.preventDefault();let $=H();if($){let Q=new Event(hn);$.dispatchEvent(Q)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Wf},i),cr(e,v=>p.createElement(Es.Provider,{value:m},p.createElement(Ss.Provider,{value:E},v))))}),zf=p.forwardRef((e,t)=>{var r,n;let a=ft(),o=p.useRef(null),l=p.useContext(ks),s=Nt(),i=Ts(e),c=(n=(r=i.current)==null?void 0:r.forceMount)!=null?n:l==null?void 0:l.forceMount;gt(()=>{if(!c)return s.item(a,l==null?void 0:l.id)},[c]);let u=Rs(a,o,[e.value,e.children,o],e.keywords),f=Ln(),h=st(z=>z.value&&z.value===u.current),d=st(z=>c||s.filter()===!1?!0:z.search?z.filtered.items.get(a)>0:!0);p.useEffect(()=>{let z=o.current;if(!(!z||e.disabled))return z.addEventListener(hn,y),()=>z.removeEventListener(hn,y)},[d,e.onSelect,e.disabled]);function y(){var z,m;b(),(m=(z=i.current).onSelect)==null||m.call(z,u.current)}function b(){f.setState("value",u.current,!0)}if(!d)return null;let{disabled:C,value:j,onSelect:_,forceMount:A,keywords:I,...N}=e;return p.createElement(xe.div,{ref:Rt(o,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!C,"aria-selected":!!h,"data-disabled":!!C,"data-selected":!!h,onPointerMove:C||s.getDisablePointerSelection()?void 0:b,onClick:C?void 0:y},e.children)}),Df=p.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,l=ft(),s=p.useRef(null),i=p.useRef(null),c=ft(),u=Nt(),f=st(d=>a||u.filter()===!1?!0:d.search?d.filtered.groups.has(l):!0);gt(()=>u.group(l),[]),Rs(l,s,[e.value,e.heading,i]);let h=p.useMemo(()=>({id:l,forceMount:a}),[a]);return p.createElement(xe.div,{ref:Rt(s,t),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&p.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),cr(e,d=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},p.createElement(ks.Provider,{value:h},d))))}),Of=p.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=p.useRef(null),o=st(l=>!l.search);return!r&&!o?null:p.createElement(xe.div,{ref:Rt(a,t),...n,"cmdk-separator":"",role:"separator"})}),Gf=p.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=Ln(),l=st(c=>c.search),s=st(c=>c.selectedItemId),i=Nt();return p.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),p.createElement(xe.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,"aria-activedescendant":s,id:i.inputId,type:"text",value:a?e.value:l,onChange:c=>{a||o.setState("search",c.target.value),r==null||r(c.target.value)}})}),Ff=p.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=p.useRef(null),l=p.useRef(null),s=st(c=>c.selectedItemId),i=Nt();return p.useEffect(()=>{if(l.current&&o.current){let c=l.current,u=o.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let d=c.offsetHeight;u.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),p.createElement(xe.div,{ref:Rt(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:i.listId},cr(e,c=>p.createElement("div",{ref:Rt(l,i.listInnerRef),"cmdk-list-sizer":""},c)))}),Mf=p.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:l,...s}=e;return p.createElement(wa,{open:r,onOpenChange:n},p.createElement(va,{container:l},p.createElement(_n,{"cmdk-overlay":"",className:a}),p.createElement(Sn,{"aria-label":e.label,"cmdk-dialog":"",className:o},p.createElement(Cs,{ref:t,...s}))))}),$f=p.forwardRef((e,t)=>st(r=>r.filtered.count===0)?p.createElement(xe.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Hf=p.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return p.createElement(xe.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},cr(e,l=>p.createElement("div",{"aria-hidden":!0},l)))}),je=Object.assign(Cs,{List:Ff,Item:zf,Input:Gf,Group:Df,Separator:Of,Dialog:Mf,Empty:$f,Loading:Hf});function Bf(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Vf(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Ts(e){let t=p.useRef(e);return gt(()=>{t.current=e}),t}var gt=typeof window>"u"?p.useEffect:p.useLayoutEffect;function yt(e){let t=p.useRef();return t.current===void 0&&(t.current=e()),t}function st(e){let t=Ln(),r=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,r,r)}function Rs(e,t,r,n=[]){let a=p.useRef(),o=Nt();return gt(()=>{var l;let s=(()=>{var c;for(let u of r){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():a.current}})(),i=n.map(c=>c.trim());o.value(e,s,i),(l=t.current)==null||l.setAttribute(vt,s),a.current=s}),a}var Uf=()=>{let[e,t]=p.useState(),r=yt(()=>new Map);return gt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function qf(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function cr({asChild:e,children:t},r){return e&&p.isValidElement(t)?p.cloneElement(qf(t),{ref:t.ref},r(t.props.children)):r(t)}var Wf={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ur=p.forwardRef(({className:e,...t},r)=>g.jsx(je,{ref:r,className:fe("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));ur.displayName=je.displayName;const Pn=p.forwardRef(({className:e,...t},r)=>g.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[g.jsx(_u,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),g.jsx(je.Input,{ref:r,className:fe("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Pn.displayName=je.Input.displayName;const dr=p.forwardRef(({className:e,...t},r)=>g.jsx(je.List,{ref:r,className:fe("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));dr.displayName=je.List.displayName;const zn=p.forwardRef((e,t)=>g.jsx(je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));zn.displayName=je.Empty.displayName;const Et=p.forwardRef(({className:e,...t},r)=>g.jsx(je.Group,{ref:r,className:fe("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t}));Et.displayName=je.Group.displayName;const Xf=p.forwardRef(({className:e,...t},r)=>g.jsx(je.Separator,{ref:r,className:fe("bg-border -mx-1 h-px",e),...t}));Xf.displayName=je.Separator.displayName;const kt=p.forwardRef(({className:e,...t},r)=>g.jsx(je.Item,{ref:r,className:fe("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));kt.displayName=je.Item.displayName;const Yf=({layout:e,autoRunFor:t,mainLayout:r})=>{const n=Be(),[a,o]=p.useState(!1),l=p.useRef(null),{t:s}=Se(),i=p.useCallback(()=>{if(n)try{const u=n.getGraph();if(!u||u.order===0)return;const f=r.positions();ha(u,f,{duration:300})}catch(u){console.error("Error updating positions:",u),l.current&&(window.clearInterval(l.current),l.current=null,o(!1))}},[n,r]),c=p.useCallback(()=>{if(a){console.log("Stopping layout animation"),l.current&&(window.clearInterval(l.current),l.current=null);try{typeof e.kill=="function"?(e.kill(),console.log("Layout algorithm killed")):typeof e.stop=="function"&&(e.stop(),console.log("Layout algorithm stopped"))}catch(u){console.error("Error stopping layout algorithm:",u)}o(!1)}else console.log("Starting layout animation"),i(),l.current=window.setInterval(()=>{i()},200),o(!0),setTimeout(()=>{if(l.current){console.log("Auto-stopping layout animation after 3 seconds"),window.clearInterval(l.current),l.current=null,o(!1);try{typeof e.kill=="function"?e.kill():typeof e.stop=="function"&&e.stop()}catch(u){console.error("Error stopping layout algorithm:",u)}}},3e3)},[a,e,i]);return p.useEffect(()=>{if(!n){console.log("No sigma instance available");return}let u=null;return t!==void 0&&t>-1&&n.getGraph().order>0&&(console.log("Auto-starting layout animation"),i(),l.current=window.setInterval(()=>{i()},200),o(!0),t>0&&(u=window.setTimeout(()=>{console.log("Auto-stopping layout animation after timeout"),l.current&&(window.clearInterval(l.current),l.current=null),o(!1)},t))),()=>{l.current&&(window.clearInterval(l.current),l.current=null),u&&window.clearTimeout(u),o(!1)}},[t,n,i]),g.jsx(be,{size:"icon",onClick:c,tooltip:s(a?"graphPanel.sideBar.layoutsControl.stopAnimation":"graphPanel.sideBar.layoutsControl.startAnimation"),variant:Ne,children:a?g.jsx(lu,{}):g.jsx(fu,{})})},Kf=()=>{const e=Be(),{t}=Se(),[r,n]=p.useState("Circular"),[a,o]=p.useState(!1),l=Z.use.graphLayoutMaxIterations(),s=Ud(),i=$d(),c=Sf(),u=yf({maxIterations:l,settings:{margin:5,expansion:1.1,gridSize:1,ratio:1,speed:3}}),f=Jd({maxIterations:l,settings:{attraction:3e-4,repulsion:.02,gravity:.02,inertia:.4,maxMove:100}}),h=ys({iterations:l}),d=bf(),y=Zd(),b=cf(),C=p.useMemo(()=>({Circular:{layout:s},Circlepack:{layout:i},Random:{layout:c},Noverlaps:{layout:u,worker:d},"Force Directed":{layout:f,worker:y},"Force Atlas":{layout:h,worker:b}}),[i,s,f,h,u,c,y,d,b]),j=p.useCallback(_=>{console.debug("Running layout:",_);const{positions:A}=C[_].layout;try{const I=e.getGraph();if(!I){console.error("No graph available");return}const N=A();console.log("Positions calculated, animating nodes"),ha(I,N,{duration:400}),n(_)}catch(I){console.error("Error running layout:",I)}},[C,e]);return g.jsxs("div",{children:[g.jsx("div",{children:C[r]&&"worker"in C[r]&&g.jsx(Yf,{layout:C[r].worker,mainLayout:C[r].layout})}),g.jsx("div",{children:g.jsxs(Rn,{open:a,onOpenChange:o,children:[g.jsx(An,{asChild:!0,children:g.jsx(be,{size:"icon",variant:Ne,onClick:()=>o(_=>!_),tooltip:t("graphPanel.sideBar.layoutsControl.layoutGraph"),children:g.jsx(Jc,{})})}),g.jsx(lr,{side:"right",align:"start",sideOffset:8,collisionPadding:5,sticky:"always",className:"p-1 min-w-auto",children:g.jsx(ur,{children:g.jsx(dr,{children:g.jsx(Et,{children:Object.keys(C).map(_=>g.jsx(kt,{onSelect:()=>{j(_)},className:"cursor-pointer text-xs",children:t(`graphPanel.sideBar.layoutsControl.layouts.${_}`)},_))})})})})]})})]})},Qf=()=>{const e=p.useContext(Ra);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Ot=e=>!!(e.type.startsWith("mouse")&&e.buttons!==0),Jf=({disableHoverEffect:e})=>{const t=Be(),r=ga(),n=xi(),a=Z.use.graphLayoutMaxIterations(),{assign:o}=ys({iterations:a}),{theme:l}=Qf(),s=Z.use.enableHideUnselectedEdges(),i=Z.use.enableEdgeEvents(),c=Z.use.showEdgeLabel(),u=Z.use.showNodeLabel(),f=Z.use.minEdgeSize(),h=Z.use.maxEdgeSize(),d=te.use.selectedNode(),y=te.use.focusedNode(),b=te.use.selectedEdge(),C=te.use.focusedEdge(),j=te.use.sigmaGraph();return p.useEffect(()=>{if(j&&t){try{typeof t.setGraph=="function"?(t.setGraph(j),console.log("Binding graph to sigma instance")):(t.graph=j,console.warn("Simgma missing setGraph function, set graph property directly"))}catch(_){console.error("Error setting graph on sigma instance:",_)}o(),console.log("Initial layout applied to graph")}},[t,j,o,a]),p.useEffect(()=>{t&&(te.getState().sigmaInstance||(console.log("Setting sigma instance from GraphControl"),te.getState().setSigmaInstance(t)))},[t]),p.useEffect(()=>{const{setFocusedNode:_,setSelectedNode:A,setFocusedEdge:I,setSelectedEdge:N,clearSelection:z}=te.getState(),m={enterNode:E=>{Ot(E.event.original)||t.getGraph().hasNode(E.node)&&_(E.node)},leaveNode:E=>{Ot(E.event.original)||_(null)},clickNode:E=>{t.getGraph().hasNode(E.node)&&(A(E.node),N(null))},clickStage:()=>z()};i&&(m.clickEdge=E=>{N(E.edge),A(null)},m.enterEdge=E=>{Ot(E.event.original)||I(E.edge)},m.leaveEdge=E=>{Ot(E.event.original)||I(null)}),r(m)},[r,i]),p.useEffect(()=>{if(t&&j){const _=t.getGraph();let A=Number.MAX_SAFE_INTEGER,I=0;_.forEachEdge(z=>{const m=_.getEdgeAttribute(z,"originalWeight")||1;typeof m=="number"&&(A=Math.min(A,m),I=Math.max(I,m))});const N=I-A;if(N>0){const z=h-f;_.forEachEdge(m=>{const E=_.getEdgeAttribute(m,"originalWeight")||1;if(typeof E=="number"){const x=f+z*Math.pow((E-A)/N,.5);_.setEdgeAttribute(m,"size",x)}})}else _.forEachEdge(z=>{_.setEdgeAttribute(z,"size",f)});t.refresh()}},[t,j,f,h]),p.useEffect(()=>{const _=l==="dark",A=_?qi:void 0,I=_?Ki:void 0;n({enableEdgeEvents:i,renderEdgeLabels:c,renderLabels:u,nodeReducer:(N,z)=>{const m=t.getGraph(),E={...z,highlighted:z.highlighted||!1,labelColor:A};if(!e){E.highlighted=!1;const x=y||d,T=C||b;if(x&&m.hasNode(x))try{(N===x||m.neighbors(x).includes(N))&&(E.highlighted=!0,N===d&&(E.borderColor=Yi))}catch(R){console.error("Error in nodeReducer:",R)}else if(T&&m.hasEdge(T))m.extremities(T).includes(N)&&(E.highlighted=!0,E.size=3);else return E;E.highlighted?_&&(E.labelColor=Wi):E.color=Xi}return E},edgeReducer:(N,z)=>{const m=t.getGraph(),E={...z,hidden:!1,labelColor:A,color:I};if(!e){const x=y||d;if(x&&m.hasNode(x))try{s?m.extremities(N).includes(x)||(E.hidden=!0):m.extremities(N).includes(x)&&(E.color=Xn)}catch(T){console.error("Error in edgeReducer:",T)}else{const T=b&&m.hasEdge(b)?b:null,R=C&&m.hasEdge(C)?C:null;(T||R)&&(N===T?E.color=Qi:N===R?E.color=Xn:s&&(E.hidden=!0))}}return E}})},[d,y,b,C,n,t,e,l,s,i,c,u]),null},Zf=()=>{const{zoomIn:e,zoomOut:t,reset:r}=da({duration:200,factor:1.5}),n=Be(),{t:a}=Se(),o=p.useCallback(()=>e(),[e]),l=p.useCallback(()=>t(),[t]),s=p.useCallback(()=>{if(n)try{n.setCustomBBox(null),n.refresh();const u=n.getGraph();if(!(u!=null&&u.order)||u.nodes().length===0){r();return}n.getCamera().animate({x:.5,y:.5,ratio:1.1},{duration:1e3})}catch(u){console.error("Error resetting zoom:",u),r()}},[n,r]),i=p.useCallback(()=>{if(!n)return;const u=n.getCamera(),h=u.angle+Math.PI/8;u.animate({angle:h},{duration:200})},[n]),c=p.useCallback(()=>{if(!n)return;const u=n.getCamera(),h=u.angle-Math.PI/8;u.animate({angle:h},{duration:200})},[n]);return g.jsxs(g.Fragment,{children:[g.jsx(be,{variant:Ne,onClick:i,tooltip:a("graphPanel.sideBar.zoomControl.rotateCamera"),size:"icon",children:g.jsx(yu,{})}),g.jsx(be,{variant:Ne,onClick:c,tooltip:a("graphPanel.sideBar.zoomControl.rotateCameraCounterClockwise"),size:"icon",children:g.jsx(mu,{})}),g.jsx(be,{variant:Ne,onClick:s,tooltip:a("graphPanel.sideBar.zoomControl.resetZoom"),size:"icon",children:g.jsx(Wc,{})}),g.jsx(be,{variant:Ne,onClick:o,tooltip:a("graphPanel.sideBar.zoomControl.zoomIn"),size:"icon",children:g.jsx(Pu,{})}),g.jsx(be,{variant:Ne,onClick:l,tooltip:a("graphPanel.sideBar.zoomControl.zoomOut"),size:"icon",children:g.jsx(Du,{})})]})},eh=()=>{const{isFullScreen:e,toggle:t}=_i(),{t:r}=Se();return g.jsx(g.Fragment,{children:e?g.jsx(be,{variant:Ne,onClick:t,tooltip:r("graphPanel.sideBar.fullScreenControl.windowed"),size:"icon",children:g.jsx(au,{})}):g.jsx(be,{variant:Ne,onClick:t,tooltip:r("graphPanel.sideBar.fullScreenControl.fullScreen"),size:"icon",children:g.jsx(nu,{})})})};var fr="Checkbox",[th,$p]=xn(fr),[rh,Dn]=th(fr);function nh(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:o,form:l,name:s,onCheckedChange:i,required:c,value:u="on",internal_do_not_use_render:f}=e,[h,d]=ma({prop:r,defaultProp:a??!1,onChange:i,caller:fr}),[y,b]=p.useState(null),[C,j]=p.useState(null),_=p.useRef(!1),A=y?!!l||!!y.closest("form"):!0,I={checked:h,disabled:o,setChecked:d,control:y,setControl:b,name:s,form:l,value:u,hasConsumerStoppedPropagationRef:_,required:c,defaultChecked:ot(a)?!1:a,isFormControl:A,bubbleInput:C,setBubbleInput:j};return g.jsx(rh,{scope:t,...I,children:oh(f)?f(I):n})}var As="CheckboxTrigger",js=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:o,value:l,disabled:s,checked:i,required:c,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:d,bubbleInput:y}=Dn(As,e),b=Ve(a,u),C=p.useRef(i);return p.useEffect(()=>{const j=o==null?void 0:o.form;if(j){const _=()=>f(C.current);return j.addEventListener("reset",_),()=>j.removeEventListener("reset",_)}},[o,f]),g.jsx(xe.button,{type:"button",role:"checkbox","aria-checked":ot(i)?"mixed":i,"aria-required":c,"data-state":zs(i),"data-disabled":s?"":void 0,disabled:s,value:l,...n,ref:b,onKeyDown:ke(t,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:ke(r,j=>{f(_=>ot(_)?!0:!_),y&&d&&(h.current=j.isPropagationStopped(),h.current||j.stopPropagation())})})});js.displayName=As;var On=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:o,required:l,disabled:s,value:i,onCheckedChange:c,form:u,...f}=e;return g.jsx(nh,{__scopeCheckbox:r,checked:a,defaultChecked:o,disabled:s,required:l,onCheckedChange:c,name:n,form:u,value:i,internal_do_not_use_render:({isFormControl:h})=>g.jsxs(g.Fragment,{children:[g.jsx(js,{...f,ref:t,__scopeCheckbox:r}),h&&g.jsx(Ps,{__scopeCheckbox:r})]})})});On.displayName=fr;var Is="CheckboxIndicator",Ns=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,o=Dn(Is,r);return g.jsx(_t,{present:n||ot(o.checked)||o.checked===!0,children:g.jsx(xe.span,{"data-state":zs(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Ns.displayName=Is;var Ls="CheckboxBubbleInput",Ps=p.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:l,required:s,disabled:i,name:c,value:u,form:f,bubbleInput:h,setBubbleInput:d}=Dn(Ls,e),y=Ve(r,d),b=Fi(o),C=Mi(n);p.useEffect(()=>{const _=h;if(!_)return;const A=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(A,"checked").set,z=!a.current;if(b!==o&&N){const m=new Event("click",{bubbles:z});_.indeterminate=ot(o),N.call(_,ot(o)?!1:o),_.dispatchEvent(m)}},[h,b,o,a]);const j=p.useRef(ot(o)?!1:o);return g.jsx(xe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??j.current,required:s,disabled:i,name:c,value:u,form:f,...t,tabIndex:-1,ref:y,style:{...t.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ps.displayName=Ls;function oh(e){return typeof e=="function"}function ot(e){return e==="indeterminate"}function zs(e){return ot(e)?"indeterminate":e?"checked":"unchecked"}const Ds=p.forwardRef(({className:e,...t},r)=>g.jsx(On,{ref:r,className:fe("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-muted data-[state=checked]:text-muted-foreground h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:g.jsx(Ns,{className:fe("flex items-center justify-center text-current"),children:g.jsx(Va,{className:"h-4 w-4"})})}));Ds.displayName=On.displayName;var ah="Separator",$o="horizontal",sh=["horizontal","vertical"],Os=p.forwardRef((e,t)=>{const{decorative:r,orientation:n=$o,...a}=e,o=ih(n)?n:$o,s=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return g.jsx(xe.div,{"data-orientation":o,...s,...a,ref:t})});Os.displayName=ah;function ih(e){return sh.includes(e)}var Gs=Os;const bt=p.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>g.jsx(Gs,{ref:a,decorative:r,orientation:t,className:fe("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));bt.displayName=Gs.displayName;const tt=({checked:e,onCheckedChange:t,label:r})=>{const n=`checkbox-${r.toLowerCase().replace(/\s+/g,"-")}`;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ds,{id:n,checked:e,onCheckedChange:t}),g.jsx("label",{htmlFor:n,className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:r})]})},$r=({value:e,onEditFinished:t,label:r,min:n,max:a,defaultValue:o})=>{const{t:l}=Se(),[s,i]=p.useState(e),c=`input-${r.toLowerCase().replace(/\s+/g,"-")}`;p.useEffect(()=>{i(e)},[e]);const u=p.useCallback(d=>{const y=d.target.value.trim();if(y.length===0){i(null);return}const b=Number.parseInt(y);if(!isNaN(b)&&b!==s){if(n!==void 0&&ba)return;i(b)}},[s,n,a]),f=p.useCallback(()=>{s!==null&&e!==s&&t(s)},[e,s,t]),h=p.useCallback(()=>{o!==void 0&&e!==o&&(i(o),t(o))},[o,e,t]);return g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("label",{htmlFor:c,className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:r}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(Yt,{id:c,type:"number",value:s===null?"":s,onChange:u,className:"h-6 w-full min-w-0 pr-1",min:n,max:a,onBlur:f,onKeyDown:d=>{d.key==="Enter"&&f()}}),o!==void 0&&g.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:h,type:"button",title:l("graphPanel.sideBar.settings.resetToDefault"),children:g.jsx(qa,{className:"h-3.5 w-3.5"})})]})]})};function lh(){const[e,t]=p.useState(!1),r=Z.use.showPropertyPanel(),n=Z.use.showNodeSearchBar(),a=Z.use.showNodeLabel(),o=Z.use.enableEdgeEvents(),l=Z.use.enableNodeDrag(),s=Z.use.enableHideUnselectedEdges(),i=Z.use.showEdgeLabel(),c=Z.use.minEdgeSize(),u=Z.use.maxEdgeSize(),f=Z.use.graphQueryMaxDepth(),h=Z.use.graphMaxNodes(),d=Z.use.backendMaxGraphNodes(),y=Z.use.graphLayoutMaxIterations(),b=Z.use.enableHealthCheck(),C=p.useCallback(()=>Z.setState(w=>({enableNodeDrag:!w.enableNodeDrag})),[]),j=p.useCallback(()=>Z.setState(w=>({enableEdgeEvents:!w.enableEdgeEvents})),[]),_=p.useCallback(()=>Z.setState(w=>({enableHideUnselectedEdges:!w.enableHideUnselectedEdges})),[]),A=p.useCallback(()=>Z.setState(w=>({showEdgeLabel:!w.showEdgeLabel})),[]),I=p.useCallback(()=>Z.setState(w=>({showPropertyPanel:!w.showPropertyPanel})),[]),N=p.useCallback(()=>Z.setState(w=>({showNodeSearchBar:!w.showNodeSearchBar})),[]),z=p.useCallback(()=>Z.setState(w=>({showNodeLabel:!w.showNodeLabel})),[]),m=p.useCallback(()=>Z.setState(w=>({enableHealthCheck:!w.enableHealthCheck})),[]),E=p.useCallback(w=>{if(w<1)return;Z.setState({graphQueryMaxDepth:w});const H=Z.getState().queryLabel;Z.getState().setQueryLabel(""),setTimeout(()=>{Z.getState().setQueryLabel(H)},300)},[]),x=p.useCallback(w=>{const H=d||1e3;w<1||w>H||Z.getState().setGraphMaxNodes(w,!0)},[d]),T=p.useCallback(w=>{w<1||Z.setState({graphLayoutMaxIterations:w})},[]),{t:R}=Se(),O=()=>t(!1);return g.jsx(g.Fragment,{children:g.jsxs(Rn,{open:e,onOpenChange:t,children:[g.jsx(An,{asChild:!0,children:g.jsx(be,{variant:Ne,tooltip:R("graphPanel.sideBar.settings.settings"),size:"icon",children:g.jsx(ku,{})})}),g.jsx(lr,{side:"right",align:"end",sideOffset:8,collisionPadding:5,className:"p-2 max-w-[200px]",onCloseAutoFocus:w=>w.preventDefault(),children:g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(tt,{checked:b,onCheckedChange:m,label:R("graphPanel.sideBar.settings.healthCheck")}),g.jsx(bt,{}),g.jsx(tt,{checked:r,onCheckedChange:I,label:R("graphPanel.sideBar.settings.showPropertyPanel")}),g.jsx(tt,{checked:n,onCheckedChange:N,label:R("graphPanel.sideBar.settings.showSearchBar")}),g.jsx(bt,{}),g.jsx(tt,{checked:a,onCheckedChange:z,label:R("graphPanel.sideBar.settings.showNodeLabel")}),g.jsx(tt,{checked:l,onCheckedChange:C,label:R("graphPanel.sideBar.settings.nodeDraggable")}),g.jsx(bt,{}),g.jsx(tt,{checked:i,onCheckedChange:A,label:R("graphPanel.sideBar.settings.showEdgeLabel")}),g.jsx(tt,{checked:s,onCheckedChange:_,label:R("graphPanel.sideBar.settings.hideUnselectedEdges")}),g.jsx(tt,{checked:o,onCheckedChange:j,label:R("graphPanel.sideBar.settings.edgeEvents")}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("label",{htmlFor:"edge-size-min",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:R("graphPanel.sideBar.settings.edgeSizeRange")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Yt,{id:"edge-size-min",type:"number",value:c,onChange:w=>{const H=Number(w.target.value);!isNaN(H)&&H>=1&&H<=u&&Z.setState({minEdgeSize:H})},className:"h-6 w-16 min-w-0 pr-1",min:1,max:Math.min(u,10)}),g.jsx("span",{children:"-"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(Yt,{id:"edge-size-max",type:"number",value:u,onChange:w=>{const H=Number(w.target.value);!isNaN(H)&&H>=c&&H>=1&&H<=10&&Z.setState({maxEdgeSize:H})},className:"h-6 w-16 min-w-0 pr-1",min:c,max:10}),g.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:()=>Z.setState({minEdgeSize:1,maxEdgeSize:5}),type:"button",title:R("graphPanel.sideBar.settings.resetToDefault"),children:g.jsx(qa,{className:"h-3.5 w-3.5"})})]})]})]}),g.jsx(bt,{}),g.jsx($r,{label:R("graphPanel.sideBar.settings.maxQueryDepth"),min:1,value:f,defaultValue:3,onEditFinished:E}),g.jsx($r,{label:`${R("graphPanel.sideBar.settings.maxNodes")} (≤ ${d||1e3})`,min:1,max:d||1e3,value:h,defaultValue:d||1e3,onEditFinished:x}),g.jsx($r,{label:R("graphPanel.sideBar.settings.maxLayoutIterations"),min:1,max:30,value:y,defaultValue:15,onEditFinished:T}),g.jsx(bt,{}),g.jsx(be,{onClick:O,variant:"outline",size:"sm",className:"ml-auto px-4",children:R("graphPanel.sideBar.settings.save")})]})})]})})}const ch="ENTRIES",Fs="KEYS",Ms="VALUES",Ee="";class Hr{constructor(t,r){const n=t._tree,a=Array.from(n.keys());this.set=t,this._type=r,this._path=a.length>0?[{node:n,keys:a}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:r}=pt(this._path);if(pt(r)===Ee)return{done:!1,value:this.result()};const n=t.get(pt(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=pt(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>pt(t)).filter(t=>t!==Ee).join("")}value(){return pt(this._path).node.get(Ee)}result(){switch(this._type){case Ms:return this.value();case Fs:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const pt=e=>e[e.length-1],uh=(e,t,r)=>{const n=new Map;if(t===void 0)return n;const a=t.length+1,o=a+r,l=new Uint8Array(o*a).fill(r+1);for(let s=0;s{const i=o*l;e:for(const c of e.keys())if(c===Ee){const u=a[i-1];u<=r&&n.set(s,[e.get(c),u])}else{let u=o;for(let f=0;fr)continue e}$s(e.get(c),t,r,n,a,u,l,s+c)}};class nt{constructor(t=new Map,r=""){this._size=void 0,this._tree=t,this._prefix=r}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[r,n]=Zt(this._tree,t.slice(this._prefix.length));if(r===void 0){const[a,o]=Gn(n);for(const l of a.keys())if(l!==Ee&&l.startsWith(o)){const s=new Map;return s.set(l.slice(o.length),a.get(l)),new nt(s,t)}}return new nt(r,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,dh(this._tree,t)}entries(){return new Hr(this,ch)}forEach(t){for(const[r,n]of this)t(r,n,this)}fuzzyGet(t,r){return uh(this._tree,t,r)}get(t){const r=gn(this._tree,t);return r!==void 0?r.get(Ee):void 0}has(t){const r=gn(this._tree,t);return r!==void 0&&r.has(Ee)}keys(){return new Hr(this,Fs)}set(t,r){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,Br(this._tree,t).set(Ee,r),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,r){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=Br(this._tree,t);return n.set(Ee,r(n.get(Ee))),this}fetch(t,r){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=Br(this._tree,t);let a=n.get(Ee);return a===void 0&&n.set(Ee,a=r()),a}values(){return new Hr(this,Ms)}[Symbol.iterator](){return this.entries()}static from(t){const r=new nt;for(const[n,a]of t)r.set(n,a);return r}static fromObject(t){return nt.from(Object.entries(t))}}const Zt=(e,t,r=[])=>{if(t.length===0||e==null)return[e,r];for(const n of e.keys())if(n!==Ee&&t.startsWith(n))return r.push([e,n]),Zt(e.get(n),t.slice(n.length),r);return r.push([e,t]),Zt(void 0,"",r)},gn=(e,t)=>{if(t.length===0||e==null)return e;for(const r of e.keys())if(r!==Ee&&t.startsWith(r))return gn(e.get(r),t.slice(r.length))},Br=(e,t)=>{const r=t.length;e:for(let n=0;e&&n{const[r,n]=Zt(e,t);if(r!==void 0){if(r.delete(Ee),r.size===0)Hs(n);else if(r.size===1){const[a,o]=r.entries().next().value;Bs(n,a,o)}}},Hs=e=>{if(e.length===0)return;const[t,r]=Gn(e);if(t.delete(r),t.size===0)Hs(e.slice(0,-1));else if(t.size===1){const[n,a]=t.entries().next().value;n!==Ee&&Bs(e.slice(0,-1),n,a)}},Bs=(e,t,r)=>{if(e.length===0)return;const[n,a]=Gn(e);n.set(a+t,r),n.delete(a)},Gn=e=>e[e.length-1],Fn="or",Vs="and",fh="and_not";class at{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const r=t.autoVacuum==null||t.autoVacuum===!0?qr:t.autoVacuum;this._options={...Ur,...t,autoVacuum:r,searchOptions:{...Ho,...t.searchOptions||{}},autoSuggestOptions:{...vh,...t.autoSuggestOptions||{}}},this._index=new nt,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=mn,this.addFields(this._options.fields)}add(t){const{extractField:r,tokenize:n,processTerm:a,fields:o,idField:l}=this._options,s=r(t,l);if(s==null)throw new Error(`MiniSearch: document does not have ID field "${l}"`);if(this._idToShortId.has(s))throw new Error(`MiniSearch: duplicate ID ${s}`);const i=this.addDocumentId(s);this.saveStoredFields(i,t);for(const c of o){const u=r(t,c);if(u==null)continue;const f=n(u.toString(),c),h=this._fieldIds[c],d=new Set(f).size;this.addFieldLength(i,h,this._documentCount-1,d);for(const y of f){const b=a(y,c);if(Array.isArray(b))for(const C of b)this.addTerm(h,i,C);else b&&this.addTerm(h,i,b)}}}addAll(t){for(const r of t)this.add(r)}addAllAsync(t,r={}){const{chunkSize:n=10}=r,a={chunk:[],promise:Promise.resolve()},{chunk:o,promise:l}=t.reduce(({chunk:s,promise:i},c,u)=>(s.push(c),(u+1)%n===0?{chunk:[],promise:i.then(()=>new Promise(f=>setTimeout(f,0))).then(()=>this.addAll(s))}:{chunk:s,promise:i}),a);return l.then(()=>this.addAll(o))}remove(t){const{tokenize:r,processTerm:n,extractField:a,fields:o,idField:l}=this._options,s=a(t,l);if(s==null)throw new Error(`MiniSearch: document does not have ID field "${l}"`);const i=this._idToShortId.get(s);if(i==null)throw new Error(`MiniSearch: cannot remove document with ID ${s}: it is not in the index`);for(const c of o){const u=a(t,c);if(u==null)continue;const f=r(u.toString(),c),h=this._fieldIds[c],d=new Set(f).size;this.removeFieldLength(i,h,this._documentCount,d);for(const y of f){const b=n(y,c);if(Array.isArray(b))for(const C of b)this.removeTerm(h,i,C);else b&&this.removeTerm(h,i,b)}}this._storedFields.delete(i),this._documentIds.delete(i),this._idToShortId.delete(s),this._fieldLength.delete(i),this._documentCount-=1}removeAll(t){if(t)for(const r of t)this.remove(r);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new nt,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const r=this._idToShortId.get(t);if(r==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach((n,a)=>{this.removeFieldLength(r,a,this._documentCount,n)}),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:r,batchSize:n,batchWait:a}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:a},{minDirtCount:r,minDirtFactor:t})}discardAll(t){const r=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of t)this.discard(n)}finally{this._options.autoVacuum=r}this.maybeAutoVacuum()}replace(t){const{idField:r,extractField:n}=this._options,a=n(t,r);this.discard(a),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,r){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&r,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=mn,this.performVacuuming(t,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(r)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,r){const n=this._dirtCount;if(this.vacuumConditionsMet(r)){const a=t.batchSize||pn.batchSize,o=t.batchWait||pn.batchWait;let l=1;for(const[s,i]of this._index){for(const[c,u]of i)for(const[f]of u)this._documentIds.has(f)||(u.size<=1?i.delete(c):u.delete(f));this._index.get(s).size===0&&this._index.delete(s),l%a===0&&await new Promise(c=>setTimeout(c,o)),l+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:r,minDirtFactor:n}=t;return r=r||qr.minDirtCount,n=n||qr.minDirtFactor,this.dirtCount>=r&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const r=this._idToShortId.get(t);if(r!=null)return this._storedFields.get(r)}search(t,r={}){const{searchOptions:n}=this._options,a={...n,...r},o=this.executeQuery(t,r),l=[];for(const[s,{score:i,terms:c,match:u}]of o){const f=c.length||1,h={id:this._documentIds.get(s),score:i*f,terms:Object.keys(u),queryTerms:c,match:u};Object.assign(h,this._storedFields.get(s)),(a.filter==null||a.filter(h))&&l.push(h)}return t===at.wildcard&&a.boostDocument==null||l.sort(Vo),l}autoSuggest(t,r={}){r={...this._options.autoSuggestOptions,...r};const n=new Map;for(const{score:o,terms:l}of this.search(t,r)){const s=l.join(" "),i=n.get(s);i!=null?(i.score+=o,i.count+=1):n.set(s,{score:o,terms:l,count:1})}const a=[];for(const[o,{score:l,terms:s,count:i}]of n)a.push({suggestion:o,terms:s,score:l/i});return a.sort(Vo),a}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,r){if(r==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),r)}static async loadJSONAsync(t,r){if(r==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),r)}static getDefault(t){if(Ur.hasOwnProperty(t))return Vr(Ur,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,r){const{index:n,documentIds:a,fieldLength:o,storedFields:l,serializationVersion:s}=t,i=this.instantiateMiniSearch(t,r);i._documentIds=Gt(a),i._fieldLength=Gt(o),i._storedFields=Gt(l);for(const[c,u]of i._documentIds)i._idToShortId.set(u,c);for(const[c,u]of n){const f=new Map;for(const h of Object.keys(u)){let d=u[h];s===1&&(d=d.ds),f.set(parseInt(h,10),Gt(d))}i._index.set(c,f)}return i}static async loadJSAsync(t,r){const{index:n,documentIds:a,fieldLength:o,storedFields:l,serializationVersion:s}=t,i=this.instantiateMiniSearch(t,r);i._documentIds=await Ft(a),i._fieldLength=await Ft(o),i._storedFields=await Ft(l);for(const[u,f]of i._documentIds)i._idToShortId.set(f,u);let c=0;for(const[u,f]of n){const h=new Map;for(const d of Object.keys(f)){let y=f[d];s===1&&(y=y.ds),h.set(parseInt(d,10),await Ft(y))}++c%1e3===0&&await Us(0),i._index.set(u,h)}return i}static instantiateMiniSearch(t,r){const{documentCount:n,nextId:a,fieldIds:o,averageFieldLength:l,dirtCount:s,serializationVersion:i}=t;if(i!==1&&i!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new at(r);return c._documentCount=n,c._nextId=a,c._idToShortId=new Map,c._fieldIds=o,c._avgFieldLength=l,c._dirtCount=s||0,c._index=new nt,c}executeQuery(t,r={}){if(t===at.wildcard)return this.executeWildcardQuery(r);if(typeof t!="string"){const h={...r,...t,queries:void 0},d=t.queries.map(y=>this.executeQuery(y,h));return this.combineResults(d,h.combineWith)}const{tokenize:n,processTerm:a,searchOptions:o}=this._options,l={tokenize:n,processTerm:a,...o,...r},{tokenize:s,processTerm:i}=l,f=s(t).flatMap(h=>i(h)).filter(h=>!!h).map(mh(l)).map(h=>this.executeQuerySpec(h,l));return this.combineResults(f,l.combineWith)}executeQuerySpec(t,r){const n={...this._options.searchOptions,...r},a=(n.fields||this._options.fields).reduce((b,C)=>({...b,[C]:Vr(n.boost,C)||1}),{}),{boostDocument:o,weights:l,maxFuzzy:s,bm25:i}=n,{fuzzy:c,prefix:u}={...Ho.weights,...l},f=this._index.get(t.term),h=this.termResults(t.term,t.term,1,t.termBoost,f,a,o,i);let d,y;if(t.prefix&&(d=this._index.atPrefix(t.term)),t.fuzzy){const b=t.fuzzy===!0?.2:t.fuzzy,C=b<1?Math.min(s,Math.round(t.term.length*b)):b;C&&(y=this._index.fuzzyGet(t.term,C))}if(d)for(const[b,C]of d){const j=b.length-t.term.length;if(!j)continue;y==null||y.delete(b);const _=u*b.length/(b.length+.3*j);this.termResults(t.term,b,_,t.termBoost,C,a,o,i,h)}if(y)for(const b of y.keys()){const[C,j]=y.get(b);if(!j)continue;const _=c*b.length/(b.length+j);this.termResults(t.term,b,_,t.termBoost,C,a,o,i,h)}return h}executeWildcardQuery(t){const r=new Map,n={...this._options.searchOptions,...t};for(const[a,o]of this._documentIds){const l=n.boostDocument?n.boostDocument(o,"",this._storedFields.get(a)):1;r.set(a,{score:l,terms:[],match:{}})}return r}combineResults(t,r=Fn){if(t.length===0)return new Map;const n=r.toLowerCase(),a=hh[n];if(!a)throw new Error(`Invalid combination operator: ${r}`);return t.reduce(a)||new Map}toJSON(){const t=[];for(const[r,n]of this._index){const a={};for(const[o,l]of n)a[o]=Object.fromEntries(l);t.push([r,a])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,r,n,a,o,l,s,i,c=new Map){if(o==null)return c;for(const u of Object.keys(l)){const f=l[u],h=this._fieldIds[u],d=o.get(h);if(d==null)continue;let y=d.size;const b=this._avgFieldLength[h];for(const C of d.keys()){if(!this._documentIds.has(C)){this.removeTerm(h,C,r),y-=1;continue}const j=s?s(this._documentIds.get(C),r,this._storedFields.get(C)):1;if(!j)continue;const _=d.get(C),A=this._fieldLength.get(C)[h],I=ph(_,y,this._documentCount,A,b,i),N=n*a*f*j*I,z=c.get(C);if(z){z.score+=N,yh(z.terms,t);const m=Vr(z.match,r);m?m.push(u):z.match[r]=[u]}else c.set(C,{score:N,terms:[t],match:{[r]:[u]}})}}return c}addTerm(t,r,n){const a=this._index.fetch(n,Uo);let o=a.get(t);if(o==null)o=new Map,o.set(r,1),a.set(t,o);else{const l=o.get(r);o.set(r,(l||0)+1)}}removeTerm(t,r,n){if(!this._index.has(n)){this.warnDocumentChanged(r,t,n);return}const a=this._index.fetch(n,Uo),o=a.get(t);o==null||o.get(r)==null?this.warnDocumentChanged(r,t,n):o.get(r)<=1?o.size<=1?a.delete(t):o.delete(r):o.set(r,o.get(r)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(t,r,n){for(const a of Object.keys(this._fieldIds))if(this._fieldIds[a]===r){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${n}" was not present in field "${a}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const r=this._nextId;return this._idToShortId.set(t,r),this._documentIds.set(r,t),this._documentCount+=1,this._nextId+=1,r}addFields(t){for(let r=0;rObject.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,hh={[Fn]:(e,t)=>{for(const r of t.keys()){const n=e.get(r);if(n==null)e.set(r,t.get(r));else{const{score:a,terms:o,match:l}=t.get(r);n.score=n.score+a,n.match=Object.assign(n.match,l),Bo(n.terms,o)}}return e},[Vs]:(e,t)=>{const r=new Map;for(const n of t.keys()){const a=e.get(n);if(a==null)continue;const{score:o,terms:l,match:s}=t.get(n);Bo(a.terms,l),r.set(n,{score:a.score+o,terms:a.terms,match:Object.assign(a.match,s)})}return r},[fh]:(e,t)=>{for(const r of t.keys())e.delete(r);return e}},gh={k:1.2,b:.7,d:.5},ph=(e,t,r,n,a,o)=>{const{k:l,b:s,d:i}=o;return Math.log(1+(r-t+.5)/(t+.5))*(i+e*(l+1)/(e+l*(1-s+s*n/a)))},mh=e=>(t,r,n)=>{const a=typeof e.fuzzy=="function"?e.fuzzy(t,r,n):e.fuzzy||!1,o=typeof e.prefix=="function"?e.prefix(t,r,n):e.prefix===!0,l=typeof e.boostTerm=="function"?e.boostTerm(t,r,n):1;return{term:t,fuzzy:a,prefix:o,termBoost:l}},Ur={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(bh),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},Ho={combineWith:Fn,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:gh},vh={combineWith:Vs,prefix:(e,t,r)=>t===r.length-1},pn={batchSize:1e3,batchWait:10},mn={minDirtFactor:.1,minDirtCount:20},qr={...pn,...mn},yh=(e,t)=>{e.includes(t)||e.push(t)},Bo=(e,t)=>{for(const r of t)e.includes(r)||e.push(r)},Vo=({score:e},{score:t})=>t-e,Uo=()=>new Map,Gt=e=>{const t=new Map;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]);return t},Ft=async e=>{const t=new Map;let r=0;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]),++r%1e3===0&&await Us(0);return t},Us=e=>new Promise(t=>setTimeout(t,e)),bh=/[\n\r\p{Z}\p{P}]+/u;function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);rW.createElement("div",{className:"node"},W.createElement("span",{className:"render "+(r?"circle":"disc"),style:{backgroundColor:t||"#000"}}),W.createElement("span",{className:`label ${r?"text-muted":""} ${e?"":"text-italic"}`},e||n.no_label||"No label")),Rh=({id:e,labels:t})=>{const r=Be(),n=p.useMemo(()=>{const a=r.getGraph().getNodeAttributes(e),o=r.getSetting("nodeReducer");return Object.assign(Object.assign({color:r.getSetting("defaultNodeColor")},a),o?o(e,a):{})},[r,e]);return W.createElement(yn,Object.assign({},n,{labels:t}))},Ah=({label:e,color:t,source:r,target:n,hidden:a,directed:o,labels:l={}})=>W.createElement("div",{className:"edge"},W.createElement(yn,Object.assign({},r,{labels:l})),W.createElement("div",{className:"body"},W.createElement("div",{className:"render"},W.createElement("span",{className:a?"dotted":"dash",style:{borderColor:t||"#000"}})," ",o&&W.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),W.createElement("span",{className:`label ${a?"text-muted":""} ${e?"":"fst-italic"}`},e||l.no_label||"No label")),W.createElement(yn,Object.assign({},n,{labels:l}))),jh=({id:e,labels:t})=>{const r=Be(),n=p.useMemo(()=>{const a=r.getGraph().getEdgeAttributes(e),o=r.getSetting("nodeReducer"),l=r.getSetting("edgeReducer"),s=r.getGraph().getNodeAttributes(r.getGraph().source(e)),i=r.getGraph().getNodeAttributes(r.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:r.getSetting("defaultEdgeColor"),directed:r.getGraph().isDirected(e)},a),l?l(e,a):{}),{source:Object.assign(Object.assign({color:r.getSetting("defaultNodeColor")},s),o?o(e,s):{}),target:Object.assign(Object.assign({color:r.getSetting("defaultNodeColor")},i),o?o(e,i):{})})},[r,e]);return W.createElement(Ah,Object.assign({},n,{labels:t}))};function qs(e,t){const[r,n]=p.useState(e);return p.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r}function Ih({fetcher:e,preload:t,filterFn:r,renderOption:n,getOptionValue:a,notFound:o,loadingSkeleton:l,label:s,placeholder:i="Select...",value:c,onChange:u,onFocus:f,disabled:h=!1,className:d,noResultsMessage:y}){const[b,C]=p.useState(!1),[j,_]=p.useState(!1),[A,I]=p.useState([]),[N,z]=p.useState(!1),[m,E]=p.useState(null),[x,T]=p.useState(""),R=qs(x,t?0:150),O=p.useRef(null);p.useEffect(()=>{C(!0)},[]),p.useEffect(()=>{const k=S=>{O.current&&!O.current.contains(S.target)&&j&&_(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[j]);const w=p.useCallback(async k=>{try{z(!0),E(null);const S=await e(k);I(S)}catch(S){E(S instanceof Error?S.message:"Failed to fetch options")}finally{z(!1)}},[e]);p.useEffect(()=>{b&&(t?R&&I(k=>k.filter(S=>r?r(S,R):!0)):w(R))},[b,R,t,r,w]),p.useEffect(()=>{!b||!c||w(c)},[b,c,w]);const H=p.useCallback(k=>{u(k),requestAnimationFrame(()=>{const S=document.activeElement;S==null||S.blur(),_(!1)})},[u]),K=p.useCallback(()=>{_(!0),w(x)},[x,w]),D=p.useCallback(k=>{k.target.closest(".cmd-item")&&k.preventDefault()},[]);return g.jsx("div",{ref:O,className:fe(h&&"cursor-not-allowed opacity-50",d),onMouseDown:D,children:g.jsxs(ur,{shouldFilter:!1,className:"bg-transparent",children:[g.jsxs("div",{children:[g.jsx(Pn,{placeholder:i,value:x,className:"max-h-8",onFocus:K,onValueChange:k=>{T(k),j||_(!0)}}),N&&g.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:g.jsx(Ua,{className:"h-4 w-4 animate-spin"})})]}),g.jsxs(dr,{hidden:!j,children:[m&&g.jsx("div",{className:"text-destructive p-4 text-center",children:m}),N&&A.length===0&&(l||g.jsx(Nh,{})),!N&&!m&&A.length===0&&(o||g.jsx(zn,{children:y??`No ${s.toLowerCase()} found.`})),g.jsx(Et,{children:A.map((k,S)=>g.jsxs(W.Fragment,{children:[g.jsx(kt,{value:a(k),onSelect:H,onMouseMove:()=>f(a(k)),className:"truncate cmd-item",children:n(k)},a(k)+`${S}`),S!==A.length-1&&g.jsx("div",{className:"bg-foreground/10 h-[1px]"},`divider-${S}`)]},a(k)+`-fragment-${S}`))})]})]})})}function Nh(){return g.jsx(Et,{children:g.jsx(kt,{disabled:!0,children:g.jsxs("div",{className:"flex w-full items-center gap-2",children:[g.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),g.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[g.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),g.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const Wr="__message_item",Lh=({id:e})=>{const t=te.use.sigmaGraph();return t!=null&&t.hasNode(e)?g.jsx(Rh,{id:e}):null};function Ph(e){return g.jsxs("div",{children:[e.type==="nodes"&&g.jsx(Lh,{id:e.id}),e.type==="edges"&&g.jsx(jh,{id:e.id}),e.type==="message"&&g.jsx("div",{children:e.message})]})}const zh=({onChange:e,onFocus:t,value:r})=>{const{t:n}=Se(),a=te.use.sigmaGraph(),o=te.use.searchEngine();p.useEffect(()=>{a&&te.getState().resetSearchEngine()},[a]),p.useEffect(()=>{if(!a||a.nodes().length===0||o)return;const s=new at({idField:"id",fields:["label"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),i=a.nodes().map(c=>({id:c,label:a.getNodeAttribute(c,"label")}));s.addAll(i),te.getState().setSearchEngine(s)},[a,o]);const l=p.useCallback(async s=>{if(t&&t(null),!a||!o)return[];if(a.nodes().length===0)return[];if(!s)return a.nodes().filter(u=>a.hasNode(u)).slice(0,Lt).map(u=>({id:u,type:"nodes"}));let i=o.search(s).filter(c=>a.hasNode(c.id)).map(c=>({id:c.id,type:"nodes"}));if(i.length<5){const c=new Set(i.map(f=>f.id)),u=a.nodes().filter(f=>{if(c.has(f))return!1;const h=a.getNodeAttribute(f,"label");return h&&typeof h=="string"&&!h.toLowerCase().startsWith(s.toLowerCase())&&h.toLowerCase().includes(s.toLowerCase())}).map(f=>({id:f,type:"nodes"}));i=[...i,...u]}return i.length<=Lt?i:[...i.slice(0,Lt),{type:"message",id:Wr,message:n("graphPanel.search.message",{count:i.length-Lt})}]},[a,o,t,n]);return g.jsx(Ih,{className:"bg-background/60 w-24 rounded-xl border-1 opacity-60 backdrop-blur-lg transition-all hover:w-fit hover:opacity-100",fetcher:l,renderOption:Ph,getOptionValue:s=>s.id,value:r&&r.type!=="message"?r.id:null,onChange:s=>{s!==Wr&&e(s?{id:s,type:"nodes"}:null)},onFocus:s=>{s!==Wr&&t&&t(s?{id:s,type:"nodes"}:null)},label:"item",placeholder:n("graphPanel.search.placeholder")})},Dh=({...e})=>g.jsx(zh,{...e});function Oh({fetcher:e,preload:t,filterFn:r,renderOption:n,getOptionValue:a,getDisplayValue:o,notFound:l,loadingSkeleton:s,label:i,placeholder:c="Select...",value:u,onChange:f,disabled:h=!1,className:d,triggerClassName:y,searchInputClassName:b,noResultsMessage:C,triggerTooltip:j,clearable:_=!0}){const[A,I]=p.useState(!1),[N,z]=p.useState(!1),[m,E]=p.useState([]),[x,T]=p.useState(!1),[R,O]=p.useState(null),[w,H]=p.useState(u),[K,D]=p.useState(null),[k,S]=p.useState(""),B=qs(k,t?0:150),[ae,M]=p.useState([]),[v,P]=p.useState(null);p.useEffect(()=>{I(!0),H(u)},[u]),p.useEffect(()=>{u&&(!m.length||!K)?P(g.jsx("div",{children:u})):K&&P(null)},[u,m.length,K]),p.useEffect(()=>{if(u&&m.length>0){const $=m.find(Q=>a(Q)===u);$&&D($)}},[u,m,a]),p.useEffect(()=>{A||(async()=>{try{T(!0),O(null);const Q=await e(u);M(Q),E(Q)}catch(Q){O(Q instanceof Error?Q.message:"Failed to fetch options")}finally{T(!1)}})()},[A,e,u]),p.useEffect(()=>{const $=async()=>{try{T(!0),O(null);const Q=await e(B);M(Q),E(Q)}catch(Q){O(Q instanceof Error?Q.message:"Failed to fetch options")}finally{T(!1)}};A&&t?t&&E(B?ae.filter(Q=>r?r(Q,B):!0):ae):$()},[e,B,A,t,r]);const V=p.useCallback($=>{const Q=_&&$===w?"":$;H(Q),D(m.find(X=>a(X)===Q)||null),f(Q),z(!1)},[w,f,_,m,a]);return g.jsxs(Rn,{open:N,onOpenChange:z,children:[g.jsx(An,{asChild:!0,children:g.jsxs(be,{variant:"outline",role:"combobox","aria-expanded":N,className:fe("justify-between",h&&"cursor-not-allowed opacity-50",y),disabled:h,tooltip:j,side:"bottom",children:[u==="*"?g.jsx("div",{children:"*"}):K?o(K):v||c,g.jsx(Fc,{className:"opacity-50",size:10})]})}),g.jsx(lr,{className:fe("p-0",d),onCloseAutoFocus:$=>$.preventDefault(),align:"start",sideOffset:8,collisionPadding:5,children:g.jsxs(ur,{shouldFilter:!1,children:[g.jsxs("div",{className:"relative w-full border-b",children:[g.jsx(Pn,{placeholder:`Search ${i.toLowerCase()}...`,value:k,onValueChange:$=>{S($)},className:b}),x&&m.length>0&&g.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:g.jsx(Ua,{className:"h-4 w-4 animate-spin"})})]}),g.jsxs(dr,{children:[R&&g.jsx("div",{className:"text-destructive p-4 text-center",children:R}),x&&m.length===0&&(s||g.jsx(Gh,{})),!x&&!R&&m.length===0&&(l||g.jsx(zn,{children:C??`No ${i.toLowerCase()} found.`})),g.jsx(Et,{children:m.map($=>g.jsxs(kt,{value:a($),onSelect:V,className:"truncate",children:[n($),g.jsx(Va,{className:fe("ml-auto h-3 w-3",w===a($)?"opacity-100":"opacity-0")})]},a($)))})]})]})})]})}function Gh(){return g.jsx(Et,{children:g.jsx(kt,{disabled:!0,children:g.jsxs("div",{className:"flex w-full items-center gap-2",children:[g.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),g.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[g.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),g.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const Fh=()=>{const{t:e}=Se(),t=Z.use.queryLabel(),r=te.use.allDatabaseLabels(),n=te.use.labelsFetchAttempted(),a=p.useCallback(()=>{const s=new at({idField:"id",fields:["value"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),i=r.map((c,u)=>({id:u,value:c}));return s.addAll(i),{labels:r,searchEngine:s}},[r]),o=p.useCallback(async s=>{const{labels:i,searchEngine:c}=a();let u=i;if(s&&(u=c.search(s).map(f=>i[f.id]),u.length<15)){const f=new Set(u),h=i.filter(d=>f.has(d)?!1:d&&typeof d=="string"&&!d.toLowerCase().startsWith(s.toLowerCase())&&d.toLowerCase().includes(s.toLowerCase()));u=[...u,...h]}return u.length<=Yn?u:[...u.slice(0,Yn),"..."]},[a]);p.useEffect(()=>{n&&(r.length>1?t&&t!=="*"&&!r.includes(t)?(console.log(`Label "${t}" not in available labels, setting to "*"`),Z.getState().setQueryLabel("*")):console.log(`Label "${t}" is valid`):t&&r.length<=1&&t&&t!=="*"&&(console.log("Available labels list is empty, setting label to empty"),Z.getState().setQueryLabel("")),te.getState().setLabelsFetchAttempted(!1))},[r,t,n]);const l=p.useCallback(()=>{te.getState().setLabelsFetchAttempted(!1),te.getState().setGraphDataFetchAttempted(!1),te.getState().setLastSuccessfulQueryLabel("");const s=Z.getState().queryLabel;s?(Z.getState().setQueryLabel(""),setTimeout(()=>{Z.getState().setQueryLabel(s)},0)):Z.getState().setQueryLabel("*")},[]);return g.jsxs("div",{className:"flex items-center",children:[g.jsx(be,{size:"icon",variant:Ne,onClick:l,tooltip:e("graphPanel.graphLabels.refreshTooltip"),className:"mr-2",children:g.jsx(gu,{className:"h-4 w-4"})}),g.jsx(Oh,{className:"min-w-[300px]",triggerClassName:"max-h-8",searchInputClassName:"max-h-8",triggerTooltip:e("graphPanel.graphLabels.selectTooltip"),fetcher:o,renderOption:s=>g.jsx("div",{children:s}),getOptionValue:s=>s,getDisplayValue:s=>g.jsx("div",{children:s}),notFound:g.jsx("div",{className:"py-6 text-center text-sm",children:"No labels found"}),label:e("graphPanel.graphLabels.label"),placeholder:e("graphPanel.graphLabels.placeholder"),value:t!==null?t:"*",onChange:s=>{const i=Z.getState().queryLabel;s==="..."&&(s="*"),s===i&&s!=="*"&&(s="*"),te.getState().setGraphDataFetchAttempted(!1),Z.getState().setQueryLabel(s)},clearable:!1})]})},Ws=({text:e,className:t,tooltipClassName:r,tooltip:n,side:a,onClick:o})=>n?g.jsx(Ma,{delayDuration:200,children:g.jsxs($a,{children:[g.jsx(Ha,{asChild:!0,children:g.jsx("label",{className:fe(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e})}),g.jsx(Tn,{side:a,className:r,children:n})]})}):g.jsx("label",{className:fe(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e});var Mt={exports:{}},Mh=Mt.exports,Wo;function $h(){return Wo||(Wo=1,function(e){(function(t,r,n){function a(i){var c=this,u=s();c.next=function(){var f=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=f-(c.c=f|0)},c.c=1,c.s0=u(" "),c.s1=u(" "),c.s2=u(" "),c.s0-=u(i),c.s0<0&&(c.s0+=1),c.s1-=u(i),c.s1<0&&(c.s1+=1),c.s2-=u(i),c.s2<0&&(c.s2+=1),u=null}function o(i,c){return c.c=i.c,c.s0=i.s0,c.s1=i.s1,c.s2=i.s2,c}function l(i,c){var u=new a(i),f=c&&c.state,h=u.next;return h.int32=function(){return u.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,f&&(typeof f=="object"&&o(f,u),h.state=function(){return o(u,{})}),h}function s(){var i=4022871197,c=function(u){u=String(u);for(var f=0;f>>0,h-=i,h*=i,i=h>>>0,h-=i,i+=h*4294967296}return(i>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=l:this.alea=l})(Mh,e)}(Mt)),Mt.exports}var $t={exports:{}},Hh=$t.exports,Xo;function Bh(){return Xo||(Xo=1,function(e){(function(t,r,n){function a(s){var i=this,c="";i.x=0,i.y=0,i.z=0,i.w=0,i.next=function(){var f=i.x^i.x<<11;return i.x=i.y,i.y=i.z,i.z=i.w,i.w^=i.w>>>19^f^f>>>8},s===(s|0)?i.x=s:c+=s;for(var u=0;u>>0)/4294967296};return f.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,y=(h+d)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(typeof u=="object"&&o(u,c),f.state=function(){return o(c,{})}),f}r&&r.exports?r.exports=l:this.xor128=l})(Hh,e)}($t)),$t.exports}var Ht={exports:{}},Vh=Ht.exports,Yo;function Uh(){return Yo||(Yo=1,function(e){(function(t,r,n){function a(s){var i=this,c="";i.next=function(){var f=i.x^i.x>>>2;return i.x=i.y,i.y=i.z,i.z=i.w,i.w=i.v,(i.d=i.d+362437|0)+(i.v=i.v^i.v<<4^(f^f<<1))|0},i.x=0,i.y=0,i.z=0,i.w=0,i.v=0,s===(s|0)?i.x=s:c+=s;for(var u=0;u>>4),i.next()}function o(s,i){return i.x=s.x,i.y=s.y,i.z=s.z,i.w=s.w,i.v=s.v,i.d=s.d,i}function l(s,i){var c=new a(s),u=i&&i.state,f=function(){return(c.next()>>>0)/4294967296};return f.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,y=(h+d)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(typeof u=="object"&&o(u,c),f.state=function(){return o(c,{})}),f}r&&r.exports?r.exports=l:this.xorwow=l})(Vh,e)}(Ht)),Ht.exports}var Bt={exports:{}},qh=Bt.exports,Ko;function Wh(){return Ko||(Ko=1,function(e){(function(t,r,n){function a(s){var i=this;i.next=function(){var u=i.x,f=i.i,h,d;return h=u[f],h^=h>>>7,d=h^h<<24,h=u[f+1&7],d^=h^h>>>10,h=u[f+3&7],d^=h^h>>>3,h=u[f+4&7],d^=h^h<<7,h=u[f+7&7],h=h^h<<13,d^=h^h<<9,u[f]=d,i.i=f+1&7,d};function c(u,f){var h,d=[];if(f===(f|0))d[0]=f;else for(f=""+f,h=0;h0;--h)u.next()}c(i,s)}function o(s,i){return i.x=s.x.slice(),i.i=s.i,i}function l(s,i){s==null&&(s=+new Date);var c=new a(s),u=i&&i.state,f=function(){return(c.next()>>>0)/4294967296};return f.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,y=(h+d)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(u.x&&o(u,c),f.state=function(){return o(c,{})}),f}r&&r.exports?r.exports=l:this.xorshift7=l})(qh,e)}(Bt)),Bt.exports}var Vt={exports:{}},Xh=Vt.exports,Qo;function Yh(){return Qo||(Qo=1,function(e){(function(t,r,n){function a(s){var i=this;i.next=function(){var u=i.w,f=i.X,h=i.i,d,y;return i.w=u=u+1640531527|0,y=f[h+34&127],d=f[h=h+1&127],y^=y<<13,d^=d<<17,y^=y>>>15,d^=d>>>12,y=f[h]=y^d,i.i=h,y+(u^u>>>16)|0};function c(u,f){var h,d,y,b,C,j=[],_=128;for(f===(f|0)?(d=f,f=null):(f=f+"\0",d=0,_=Math.max(_,f.length)),y=0,b=-32;b<_;++b)f&&(d^=f.charCodeAt((b+32)%f.length)),b===0&&(C=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,b>=0&&(C=C+1640531527|0,h=j[b&127]^=d+C,y=h==0?y+1:0);for(y>=128&&(j[(f&&f.length||0)&127]=-1),y=127,b=4*128;b>0;--b)d=j[y+34&127],h=j[y=y+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,j[y]=d^h;u.w=C,u.X=j,u.i=y}c(i,s)}function o(s,i){return i.i=s.i,i.w=s.w,i.X=s.X.slice(),i}function l(s,i){s==null&&(s=+new Date);var c=new a(s),u=i&&i.state,f=function(){return(c.next()>>>0)/4294967296};return f.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,y=(h+d)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(u.X&&o(u,c),f.state=function(){return o(c,{})}),f}r&&r.exports?r.exports=l:this.xor4096=l})(Xh,e)}(Vt)),Vt.exports}var Ut={exports:{}},Kh=Ut.exports,Jo;function Qh(){return Jo||(Jo=1,function(e){(function(t,r,n){function a(s){var i=this,c="";i.next=function(){var f=i.b,h=i.c,d=i.d,y=i.a;return f=f<<25^f>>>7^h,h=h-d|0,d=d<<24^d>>>8^y,y=y-f|0,i.b=f=f<<20^f>>>12^h,i.c=h=h-d|0,i.d=d<<16^h>>>16^y,i.a=y-f|0},i.a=0,i.b=0,i.c=-1640531527,i.d=1367130551,s===Math.floor(s)?(i.a=s/4294967296|0,i.b=s|0):c+=s;for(var u=0;u>>0)/4294967296};return f.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,y=(h+d)/(1<<21);while(y===0);return y},f.int32=c.next,f.quick=f,u&&(typeof u=="object"&&o(u,c),f.state=function(){return o(c,{})}),f}r&&r.exports?r.exports=l:this.tychei=l})(Kh,e)}(Ut)),Ut.exports}var qt={exports:{}};const Jh={},Zh=Object.freeze(Object.defineProperty({__proto__:null,default:Jh},Symbol.toStringTag,{value:"Module"})),eg=vi(Zh);var tg=qt.exports,Zo;function rg(){return Zo||(Zo=1,function(e){(function(t,r,n){var a=256,o=6,l=52,s="random",i=n.pow(a,o),c=n.pow(2,l),u=c*2,f=a-1,h;function d(I,N,z){var m=[];N=N==!0?{entropy:!0}:N||{};var E=j(C(N.entropy?[I,A(r)]:I??_(),3),m),x=new y(m),T=function(){for(var R=x.g(o),O=i,w=0;R=u;)R/=2,O/=2,w>>>=1;return(R+w)/O};return T.int32=function(){return x.g(4)|0},T.quick=function(){return x.g(4)/4294967296},T.double=T,j(A(x.S),r),(N.pass||z||function(R,O,w,H){return H&&(H.S&&b(H,x),R.state=function(){return b(x,{})}),w?(n[s]=R,O):R})(T,E,"global"in N?N.global:this==n,N.state)}function y(I){var N,z=I.length,m=this,E=0,x=m.i=m.j=0,T=m.S=[];for(z||(I=[z++]);E{const t="#5D6D7E",r=e?e.toLowerCase():"unknown",n=te.getState().typeColorMap;if(n.has(r))return n.get(r)||t;const a=ag[r];if(a){const c=ta[a],u=new Map(n);return u.set(r,c),te.setState({typeColorMap:u}),c}const o=new Set(Array.from(n.entries()).filter(([,c])=>!Object.values(ta).includes(c)).map(([,c])=>c)),s=sg.find(c=>!o.has(c))||t,i=new Map(n);return i.set(r,s),te.setState({typeColorMap:i}),s},ig=e=>{if(!e)return console.log("Graph validation failed: graph is null"),!1;if(!Array.isArray(e.nodes)||!Array.isArray(e.edges))return console.log("Graph validation failed: nodes or edges is not an array"),!1;if(e.nodes.length===0)return console.log("Graph validation failed: nodes array is empty"),!1;for(const t of e.nodes)if(!t.id||!t.labels||!t.properties)return console.log("Graph validation failed: invalid node structure"),!1;for(const t of e.edges)if(!t.id||!t.source||!t.target)return console.log("Graph validation failed: invalid edge structure"),!1;for(const t of e.edges){const r=e.getNode(t.source),n=e.getNode(t.target);if(r==null||n==null)return console.log("Graph validation failed: edge references non-existent node"),!1}return console.log("Graph validation passed"),!0},lg=async(e,t,r)=>{let n=null;if(!te.getState().lastSuccessfulQueryLabel){console.log("Last successful queryLabel is empty");try{await te.getState().fetchAllDatabaseLabels()}catch(s){console.error("Failed to fetch all database labels:",s)}}te.getState().setLabelsFetchAttempted(!0);const o=e||"*";try{console.log(`Fetching graph label: ${o}, depth: ${t}, nodes: ${r}`),n=await ka(o,t,r)}catch(s){return kn.getState().setErrorMessage(or(s),"Query Graphs Error!"),null}let l=null;if(n){const s={},i={};for(let h=0;h0){const h=Jr-dt;for(const d of n.nodes)d.size=Math.round(dt+h*Math.pow((d.degree-c)/f,.5))}l=new ol,l.nodes=n.nodes,l.edges=n.edges,l.nodeIdMap=s,l.edgeIdMap=i,ig(l)||(l=null,console.warn("Invalid graph data")),console.log("Graph data loaded")}return{rawGraph:l,is_truncated:n.is_truncated}},cg=e=>{var s,i;const t=Z.getState().minEdgeSize,r=Z.getState().maxEdgeSize;if(!e||!e.nodes.length)return console.log("No graph data available, skipping sigma graph creation"),null;const n=new Yr;for(const c of(e==null?void 0:e.nodes)??[]){bn(c.id+Date.now().toString(),{global:!0});const u=Math.random(),f=Math.random();n.addNode(c.id,{label:c.labels.join(", "),color:c.color,x:u,y:f,size:c.size,borderColor:Qr,borderSize:.2})}for(const c of(e==null?void 0:e.edges)??[]){const u=((s=c.properties)==null?void 0:s.weight)!==void 0?Number(c.properties.weight):1;c.dynamicId=n.addEdge(c.source,c.target,{label:((i=c.properties)==null?void 0:i.keywords)||void 0,size:u,originalWeight:u,type:"curvedNoArrow"})}let a=Number.MAX_SAFE_INTEGER,o=0;n.forEachEdge(c=>{const u=n.getEdgeAttribute(c,"originalWeight")||1;a=Math.min(a,u),o=Math.max(o,u)});const l=o-a;if(l>0){const c=r-t;n.forEachEdge(u=>{const f=n.getEdgeAttribute(u,"originalWeight")||1,h=t+c*Math.pow((f-a)/l,.5);n.setEdgeAttribute(u,"size",h)})}else n.forEachEdge(c=>{n.setEdgeAttribute(c,"size",t)});return n},ug=()=>{const{t:e}=Se(),t=Z.use.queryLabel(),r=te.use.rawGraph(),n=te.use.sigmaGraph(),a=Z.use.graphQueryMaxDepth(),o=Z.use.graphMaxNodes(),l=te.use.isFetching(),s=te.use.nodeToExpand(),i=te.use.nodeToPrune(),c=p.useRef(!1),u=p.useRef(!1),f=p.useRef(!1),h=p.useCallback(j=>(r==null?void 0:r.getNode(j))||null,[r]),d=p.useCallback((j,_=!0)=>(r==null?void 0:r.getEdge(j,_))||null,[r]),y=p.useRef(!1);p.useEffect(()=>{if(!t&&(r!==null||n!==null)){const j=te.getState();j.reset(),j.setGraphDataFetchAttempted(!1),j.setLabelsFetchAttempted(!1),c.current=!1,u.current=!1}},[t,r,n]),p.useEffect(()=>{if(!y.current&&!(!t&&f.current)&&!l&&!te.getState().graphDataFetchAttempted){y.current=!0,te.getState().setGraphDataFetchAttempted(!0);const j=te.getState();j.setIsFetching(!0),j.clearSelection(),j.sigmaGraph&&j.sigmaGraph.forEachNode(z=>{var m;(m=j.sigmaGraph)==null||m.setNodeAttribute(z,"highlighted",!1)}),console.log("Preparing graph data...");const _=t,A=a,I=o;let N;_?N=lg(_,A,I):(console.log("Query label is empty, show empty graph"),N=Promise.resolve({rawGraph:null,is_truncated:!1})),N.then(z=>{const m=te.getState(),E=z==null?void 0:z.rawGraph;if(E&&E.nodes&&E.nodes.forEach(x=>{var R;const T=(R=x.properties)==null?void 0:R.entity_type;x.color=ra(T)}),z!=null&&z.is_truncated&&rt.info(e("graphPanel.dataIsTruncated","Graph data is truncated to Max Nodes")),m.reset(),!E||!E.nodes||E.nodes.length===0){const x=new Yr;x.addNode("empty-graph-node",{label:e("graphPanel.emptyGraph"),color:"#5D6D7E",x:.5,y:.5,size:15,borderColor:Qr,borderSize:.2}),m.setSigmaGraph(x),m.setRawGraph(null),m.setGraphIsEmpty(!0);const T=kn.getState().message,R=T&&T.includes("Authentication required");!R&&_&&Z.getState().setQueryLabel(""),R?console.log("Keep queryLabel for post-login reload"):m.setLastSuccessfulQueryLabel(""),console.log(`Graph data is empty, created graph with empty graph node. Auth error: ${R}`)}else{const x=cg(E);E.buildDynamicMap(),m.setSigmaGraph(x),m.setRawGraph(E),m.setGraphIsEmpty(!1),m.setLastSuccessfulQueryLabel(_),m.setMoveToSelectedNode(!0)}c.current=!0,u.current=!0,y.current=!1,m.setIsFetching(!1),(!E||!E.nodes||E.nodes.length===0)&&!_&&(f.current=!0)}).catch(z=>{console.error("Error fetching graph data:",z);const m=te.getState();m.setIsFetching(!1),c.current=!1,y.current=!1,m.setGraphDataFetchAttempted(!1),m.setLastSuccessfulQueryLabel("")})}},[t,a,o,l,e]),p.useEffect(()=>{s&&((async _=>{var A,I,N,z,m,E;if(!(!_||!n||!r))try{const x=r.getNode(_);if(!x){console.error("Node not found:",_);return}const T=x.labels[0];if(!T){console.error("Node has no label:",_);return}const R=await ka(T,2,1e3);if(!R||!R.nodes||!R.edges){console.error("Failed to fetch extended graph");return}const O=[];for(const F of R.nodes){bn(F.id,{global:!0});const J=(A=F.properties)==null?void 0:A.entity_type,q=ra(J);O.push({id:F.id,labels:F.labels,properties:F.properties,size:10,x:Math.random(),y:Math.random(),color:q,degree:0})}const w=[];for(const F of R.edges)w.push({id:F.id,source:F.source,target:F.target,type:F.type,properties:F.properties,dynamicId:""});const H={};n.forEachNode(F=>{H[F]={x:n.getNodeAttribute(F,"x"),y:n.getNodeAttribute(F,"y")}});const K=new Set(n.nodes()),D=new Set,k=new Set,S=1;let B=0,ae=Number.MAX_SAFE_INTEGER,M=0;n.forEachNode(F=>{const J=n.degree(F);B=Math.max(B,J)}),n.forEachEdge(F=>{const J=n.getEdgeAttribute(F,"originalWeight")||1;ae=Math.min(ae,J),M=Math.max(M,J)});for(const F of O){if(K.has(F.id))continue;w.some(q=>q.source===_&&q.target===F.id||q.target===_&&q.source===F.id)&&D.add(F.id)}const v=new Map,P=new Map,V=new Set;for(const F of w){const J=K.has(F.source)||D.has(F.source),q=K.has(F.target)||D.has(F.target);J&&q?(k.add(F.id),D.has(F.source)?v.set(F.source,(v.get(F.source)||0)+1):K.has(F.source)&&P.set(F.source,(P.get(F.source)||0)+1),D.has(F.target)?v.set(F.target,(v.get(F.target)||0)+1):K.has(F.target)&&P.set(F.target,(P.get(F.target)||0)+1)):(n.hasNode(F.source)?V.add(F.source):D.has(F.source)&&(V.add(F.source),v.set(F.source,(v.get(F.source)||0)+1)),n.hasNode(F.target)?V.add(F.target):D.has(F.target)&&(V.add(F.target),v.set(F.target,(v.get(F.target)||0)+1)))}const $=(F,J,q,U)=>{const L=U-q||1,oe=Jr-dt;for(const ue of J)if(F.hasNode(ue)){let re=F.degree(ue);re+=1;const ee=Math.min(re,U+1),G=Math.round(dt+oe*Math.pow((ee-q)/L,.5));F.setNodeAttribute(ue,"size",G)}},Q=(F,J,q)=>{const U=Z.getState().minEdgeSize,L=Z.getState().maxEdgeSize,oe=q-J||1,ue=L-U;F.forEachEdge(re=>{const ee=F.getEdgeAttribute(re,"originalWeight")||1,G=U+ue*Math.pow((ee-J)/oe,.5);F.setEdgeAttribute(re,"size",G)})};if(D.size===0){$(n,V,S,B),rt.info(e("graphPanel.propertiesView.node.noNewNodes"));return}for(const[,F]of v.entries())B=Math.max(B,F);for(const[F,J]of P.entries()){const U=n.degree(F)+J;B=Math.max(B,U)}const X=B-S||1,Y=Jr-dt,se=((I=te.getState().sigmaInstance)==null?void 0:I.getCamera().ratio)||1,ne=Math.max(Math.sqrt(x.size)*4,Math.sqrt(D.size)*3)/se;bn(Date.now().toString(),{global:!0});const ie=Math.random()*2*Math.PI;console.log("nodeSize:",x.size,"nodesToAdd:",D.size),console.log("cameraRatio:",Math.round(se*100)/100,"spreadFactor:",Math.round(ne*100)/100);for(const F of D){const J=O.find(ee=>ee.id===F),q=v.get(F)||0,U=Math.min(q,B+1),L=Math.round(dt+Y*Math.pow((U-S)/X,.5)),oe=2*Math.PI*(Array.from(D).indexOf(F)/D.size),ue=((N=H[F])==null?void 0:N.x)||H[x.id].x+Math.cos(ie+oe)*ne,re=((z=H[F])==null?void 0:z.y)||H[x.id].y+Math.sin(ie+oe)*ne;n.addNode(F,{label:J.labels.join(", "),color:J.color,x:ue,y:re,size:L,borderColor:Qr,borderSize:.2}),r.getNode(F)||(J.size=L,J.x=ue,J.y=re,J.degree=q,r.nodes.push(J),r.nodeIdMap[F]=r.nodes.length-1)}for(const F of k){const J=w.find(U=>U.id===F);if(n.hasEdge(J.source,J.target))continue;const q=((m=J.properties)==null?void 0:m.weight)!==void 0?Number(J.properties.weight):1;ae=Math.min(ae,q),M=Math.max(M,q),J.dynamicId=n.addEdge(J.source,J.target,{label:((E=J.properties)==null?void 0:E.keywords)||void 0,size:q,originalWeight:q,type:"curvedNoArrow"}),r.getEdge(J.id,!1)?console.error("Edge already exists in rawGraph:",J.id):(r.edges.push(J),r.edgeIdMap[J.id]=r.edges.length-1,r.edgeDynamicIdMap[J.dynamicId]=r.edges.length-1)}if(r.buildDynamicMap(),te.getState().resetSearchEngine(),$(n,V,S,B),Q(n,ae,M),n.hasNode(_)){const F=n.degree(_),J=Math.min(F,B+1),q=Math.round(dt+Y*Math.pow((J-S)/X,.5));n.setNodeAttribute(_,"size",q),x.size=q,x.degree=F}}catch(x){console.error("Error expanding node:",x)}})(s),window.setTimeout(()=>{te.getState().triggerNodeExpand(null)},0))},[s,n,r,e]);const b=p.useCallback((j,_)=>{const A=new Set([j]);return _.forEachNode(I=>{if(I===j)return;const N=_.neighbors(I);N.length===1&&N[0]===j&&A.add(I)}),A},[]);return p.useEffect(()=>{i&&((_=>{if(!(!_||!n||!r))try{const A=te.getState();if(!n.hasNode(_)){console.error("Node not found:",_);return}const I=b(_,n);if(I.size===n.nodes().length){rt.error(e("graphPanel.propertiesView.node.deleteAllNodesError"));return}A.clearSelection();for(const N of I){n.dropNode(N);const z=r.nodeIdMap[N];if(z!==void 0){const m=r.edges.filter(E=>E.source===N||E.target===N);for(const E of m){const x=r.edgeIdMap[E.id];if(x!==void 0){r.edges.splice(x,1);for(const[T,R]of Object.entries(r.edgeIdMap))R>x&&(r.edgeIdMap[T]=R-1);delete r.edgeIdMap[E.id],delete r.edgeDynamicIdMap[E.dynamicId]}}r.nodes.splice(z,1);for(const[E,x]of Object.entries(r.nodeIdMap))x>z&&(r.nodeIdMap[E]=x-1);delete r.nodeIdMap[N]}}r.buildDynamicMap(),te.getState().resetSearchEngine(),I.size>1&&rt.info(e("graphPanel.propertiesView.node.nodesRemoved",{count:I.size}))}catch(A){console.error("Error pruning node:",A)}})(i),window.setTimeout(()=>{te.getState().triggerNodePrune(null)},0))},[i,n,r,b,e]),{lightrageGraph:p.useCallback(()=>{if(n)return n;console.log("Creating new Sigma graph instance");const j=new Yr;return te.getState().setSigmaGraph(j),j},[n]),getNode:h,getEdge:d}},dg=({name:e})=>{const{t}=Se(),r=n=>{const a=`graphPanel.propertiesView.node.propertyNames.${n}`,o=t(a);return o===a?n:o};return g.jsx("span",{className:"text-primary/60 tracking-wide whitespace-nowrap",children:r(e)})},fg=({onClick:e})=>g.jsx("div",{children:g.jsx(uu,{className:"h-3 w-3 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:e})}),hg=({value:e,onClick:t,tooltip:r})=>g.jsx("div",{className:"flex items-center gap-1 overflow-hidden",children:g.jsx(Ws,{className:"hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis whitespace-nowrap",tooltipClassName:"max-w-80 -translate-x-15",text:e,tooltip:r||(typeof e=="string"?e:JSON.stringify(e,null,2)),side:"left",onClick:t})}),gg=({isOpen:e,onClose:t,onSave:r,propertyName:n,initialValue:a,isSubmitting:o=!1})=>{const{t:l}=Se(),[s,i]=p.useState(""),[c,u]=p.useState(null);p.useEffect(()=>{e&&i(a)},[e,a]);const f=y=>{const b=`graphPanel.propertiesView.node.propertyNames.${y}`,C=l(b);return C===b?y:C},h=y=>{switch(y){case"description":return{className:"max-h-[50vh] min-h-[10em] resize-y",style:{height:"70vh",minHeight:"20em",resize:"vertical"}};case"entity_id":return{rows:2,className:"",style:{}};case"keywords":return{rows:4,className:"",style:{}};default:return{rows:5,className:"",style:{}}}},d=async()=>{if(s.trim()!==""){u(null);try{await r(s),t()}catch(y){console.error("Save error:",y),u(typeof y=="object"&&y!==null&&y.message||l("common.saveFailed"))}}};return g.jsx(Ou,{open:e,onOpenChange:y=>!y&&t(),children:g.jsxs(Xa,{className:"sm:max-w-md",children:[g.jsxs(Ya,{children:[g.jsx(Qa,{children:l("graphPanel.propertiesView.editProperty",{property:f(n)})}),g.jsx(Ja,{children:l("graphPanel.propertiesView.editPropertyDescription")})]}),c&&g.jsx("div",{className:"bg-destructive/15 text-destructive px-4 py-2 rounded-md text-sm mt-2",children:c}),g.jsx("div",{className:"grid gap-4 py-4",children:(()=>{const y=h(n);return n==="description"?g.jsx("textarea",{value:s,onChange:b=>i(b.target.value),className:`border-input focus-visible:ring-ring flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${y.className}`,style:y.style,disabled:o}):g.jsx("textarea",{value:s,onChange:b=>i(b.target.value),rows:y.rows,className:`border-input focus-visible:ring-ring flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${y.className}`,disabled:o})})()}),g.jsxs(Ka,{children:[g.jsx(be,{type:"button",variant:"outline",onClick:t,disabled:o,children:l("common.cancel")}),g.jsx(be,{type:"button",onClick:d,disabled:o,children:o?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"mr-2",children:g.jsxs("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),l("common.saving")]}):l("common.save")})]})]})})},pg=({name:e,value:t,onClick:r,nodeId:n,edgeId:a,entityId:o,dynamicId:l,entityType:s,sourceId:i,targetId:c,onValueChange:u,isEditable:f=!1,tooltip:h})=>{const{t:d}=Se(),[y,b]=p.useState(!1),[C,j]=p.useState(!1),[_,A]=p.useState(t);p.useEffect(()=>{A(t)},[t]);const I=()=>{f&&!y&&b(!0)},N=()=>{b(!1)},z=async m=>{if(C||m===String(_)){b(!1);return}j(!0);try{if(s==="node"&&o&&n){let E={[e]:m};if(e==="entity_id"){if(await dl(m)){rt.error(d("graphPanel.propertiesView.errors.duplicateName"));return}E={entity_name:m}}await cl(o,E,!0);try{await te.getState().updateNodeAndSelect(n,o,e,m)}catch(x){throw console.error("Error updating node in graph:",x),new Error("Failed to update node in graph")}rt.success(d("graphPanel.propertiesView.success.entityUpdated"))}else if(s==="edge"&&i&&c&&a&&l){const E={[e]:m};await ul(i,c,E);try{await te.getState().updateEdgeAndSelect(a,l,i,c,e,m)}catch(x){throw console.error(`Error updating edge ${i}->${c} in graph:`,x),new Error("Failed to update edge in graph")}rt.success(d("graphPanel.propertiesView.success.relationUpdated"))}b(!1),A(m),u==null||u(m)}catch(E){console.error("Error updating property:",E),rt.error(d("graphPanel.propertiesView.errors.updateFailed"))}finally{j(!1)}};return g.jsxs("div",{className:"flex items-center gap-1 overflow-hidden",children:[g.jsx(dg,{name:e}),g.jsx(fg,{onClick:I}),":",g.jsx(hg,{value:_,onClick:r,tooltip:h||(typeof _=="string"?_:JSON.stringify(_,null,2))}),g.jsx(gg,{isOpen:y,onClose:N,onSave:z,propertyName:e,initialValue:String(_),isSubmitting:C})]})},mg=()=>{const{getNode:e,getEdge:t}=ug(),r=te.use.selectedNode(),n=te.use.focusedNode(),a=te.use.selectedEdge(),o=te.use.focusedEdge(),l=te.use.graphDataVersion(),[s,i]=p.useState(null),[c,u]=p.useState(null);return p.useEffect(()=>{let f=null,h=null;n?(f="node",h=e(n)):r?(f="node",h=e(r)):o?(f="edge",h=t(o,!0)):a&&(f="edge",h=t(a,!0)),h?(f=="node"?i(vg(h)):i(yg(h)),u(f)):(i(null),u(null))},[n,r,o,a,l,i,u,e,t]),s?g.jsx("div",{className:"bg-background/80 max-w-xs rounded-lg border-2 p-2 text-xs backdrop-blur-lg",children:c=="node"?g.jsx(bg,{node:s}):g.jsx(wg,{edge:s})}):g.jsx(g.Fragment,{})},vg=e=>{const t=te.getState(),r=[];if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasNode(e.id))return console.warn("Node not found in sigmaGraph:",e.id),{...e,relationships:[]};const n=t.sigmaGraph.edges(e.id);for(const a of n){if(!t.sigmaGraph.hasEdge(a))continue;const o=t.rawGraph.getEdge(a,!0);if(o){const s=e.id===o.source?o.target:o.source;if(!t.sigmaGraph.hasNode(s))continue;const i=t.rawGraph.getNode(s);i&&r.push({type:"Neighbour",id:s,label:i.properties.entity_id?i.properties.entity_id:i.labels.join(", ")})}}}catch(n){console.error("Error refining node properties:",n)}return{...e,relationships:r}},yg=e=>{const t=te.getState();let r,n;if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasEdge(e.dynamicId))return console.warn("Edge not found in sigmaGraph:",e.id,"dynamicId:",e.dynamicId),{...e,sourceNode:void 0,targetNode:void 0};t.sigmaGraph.hasNode(e.source)&&(r=t.rawGraph.getNode(e.source)),t.sigmaGraph.hasNode(e.target)&&(n=t.rawGraph.getNode(e.target))}catch(a){console.error("Error refining edge properties:",a)}return{...e,sourceNode:r,targetNode:n}},$e=({name:e,value:t,onClick:r,tooltip:n,nodeId:a,edgeId:o,dynamicId:l,entityId:s,entityType:i,sourceId:c,targetId:u,isEditable:f=!1})=>{const{t:h}=Se(),d=y=>{const b=`graphPanel.propertiesView.node.propertyNames.${y}`,C=h(b);return C===b?y:C};return f&&(e==="description"||e==="entity_id"||e==="keywords")?g.jsx(pg,{name:e,value:t,onClick:r,nodeId:a,entityId:s,edgeId:o,dynamicId:l,entityType:i,sourceId:c,targetId:u,isEditable:!0,tooltip:n||(typeof t=="string"?t:JSON.stringify(t,null,2))}):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-primary/60 tracking-wide whitespace-nowrap",children:d(e)}),":",g.jsx(Ws,{className:"hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis",tooltipClassName:"max-w-80 -translate-x-13",text:t,tooltip:n||(typeof t=="string"?t:JSON.stringify(t,null,2)),side:"left",onClick:r})]})},bg=({node:e})=>{const{t}=Se(),r=()=>{te.getState().triggerNodeExpand(e.id)},n=()=>{te.getState().triggerNodePrune(e.id)};return g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-blue-700",children:t("graphPanel.propertiesView.node.title")}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx(be,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:r,tooltip:t("graphPanel.propertiesView.node.expandNode"),children:g.jsx(Yc,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),g.jsx(be,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:n,tooltip:t("graphPanel.propertiesView.node.pruneNode"),children:g.jsx(wu,{className:"h-4 w-4 text-gray-900 dark:text-gray-300"})})]})]}),g.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[g.jsx($e,{name:t("graphPanel.propertiesView.node.id"),value:String(e.id)}),g.jsx($e,{name:t("graphPanel.propertiesView.node.labels"),value:e.labels.join(", "),onClick:()=>{te.getState().setSelectedNode(e.id,!0)}}),g.jsx($e,{name:t("graphPanel.propertiesView.node.degree"),value:e.degree})]}),g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.node.properties")}),g.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(a=>a==="created_at"?null:g.jsx($e,{name:a,value:e.properties[a],nodeId:String(e.id),entityId:e.properties.entity_id,entityType:"node",isEditable:a==="description"||a==="entity_id"},a))}),e.relationships.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-emerald-700",children:t("graphPanel.propertiesView.node.relationships")}),g.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:e.relationships.map(({type:a,id:o,label:l})=>g.jsx($e,{name:a,value:l,onClick:()=>{te.getState().setSelectedNode(o,!0)}},o))})]})]})},wg=({edge:e})=>{const{t}=Se();return g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-violet-700",children:t("graphPanel.propertiesView.edge.title")}),g.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[g.jsx($e,{name:t("graphPanel.propertiesView.edge.id"),value:e.id}),e.type&&g.jsx($e,{name:t("graphPanel.propertiesView.edge.type"),value:e.type}),g.jsx($e,{name:t("graphPanel.propertiesView.edge.source"),value:e.sourceNode?e.sourceNode.labels.join(", "):e.source,onClick:()=>{te.getState().setSelectedNode(e.source,!0)}}),g.jsx($e,{name:t("graphPanel.propertiesView.edge.target"),value:e.targetNode?e.targetNode.labels.join(", "):e.target,onClick:()=>{te.getState().setSelectedNode(e.target,!0)}})]}),g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.edge.properties")}),g.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(r=>{var n,a;return r==="created_at"?null:g.jsx($e,{name:r,value:e.properties[r],edgeId:String(e.id),dynamicId:String(e.dynamicId),entityType:"edge",sourceId:((n=e.sourceNode)==null?void 0:n.properties.entity_id)||e.source,targetId:((a=e.targetNode)==null?void 0:a.properties.entity_id)||e.target,isEditable:r==="description"||r==="keywords"},r)})})]})},xg=()=>{const{t:e}=Se(),t=Z.use.graphQueryMaxDepth(),r=Z.use.graphMaxNodes();return g.jsxs("div",{className:"absolute bottom-4 left-[calc(1rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400",children:[g.jsxs("div",{children:[e("graphPanel.sideBar.settings.depth"),": ",t]}),g.jsxs("div",{children:[e("graphPanel.sideBar.settings.max"),": ",r]})]})},Xs=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("bg-card text-card-foreground rounded-xl border shadow",e),...t}));Xs.displayName="Card";const _g=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("flex flex-col space-y-1.5 p-6",e),...t}));_g.displayName="CardHeader";const Sg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("leading-none font-semibold tracking-tight",e),...t}));Sg.displayName="CardTitle";const Eg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("text-muted-foreground text-sm",e),...t}));Eg.displayName="CardDescription";const kg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("p-6 pt-0",e),...t}));kg.displayName="CardContent";const Cg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("flex items-center p-6 pt-0",e),...t}));Cg.displayName="CardFooter";function Tg(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var Mn="ScrollArea",[Ys,Up]=xn(Mn),[Rg,Le]=Ys(Mn),Ks=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:o=600,...l}=e,[s,i]=p.useState(null),[c,u]=p.useState(null),[f,h]=p.useState(null),[d,y]=p.useState(null),[b,C]=p.useState(null),[j,_]=p.useState(0),[A,I]=p.useState(0),[N,z]=p.useState(!1),[m,E]=p.useState(!1),x=Ve(t,R=>i(R)),T=$i(a);return g.jsx(Rg,{scope:r,type:n,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:f,onContentChange:h,scrollbarX:d,onScrollbarXChange:y,scrollbarXEnabled:N,onScrollbarXEnabledChange:z,scrollbarY:b,onScrollbarYChange:C,scrollbarYEnabled:m,onScrollbarYEnabledChange:E,onCornerWidthChange:_,onCornerHeightChange:I,children:g.jsx(xe.div,{dir:T,...l,ref:x,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":A+"px",...e.style}})})});Ks.displayName=Mn;var Qs="ScrollAreaViewport",Js=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:a,...o}=e,l=Le(Qs,r),s=p.useRef(null),i=Ve(t,s,l.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),g.jsx(xe.div,{"data-radix-scroll-area-viewport":"",...o,ref:i,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Js.displayName=Qs;var Ue="ScrollAreaScrollbar",$n=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Le(Ue,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,s=e.orientation==="horizontal";return p.useEffect(()=>(s?o(!0):l(!0),()=>{s?o(!1):l(!1)}),[s,o,l]),a.type==="hover"?g.jsx(Ag,{...n,ref:t,forceMount:r}):a.type==="scroll"?g.jsx(jg,{...n,ref:t,forceMount:r}):a.type==="auto"?g.jsx(Zs,{...n,ref:t,forceMount:r}):a.type==="always"?g.jsx(Hn,{...n,ref:t}):null});$n.displayName=Ue;var Ag=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Le(Ue,e.__scopeScrollArea),[o,l]=p.useState(!1);return p.useEffect(()=>{const s=a.scrollArea;let i=0;if(s){const c=()=>{window.clearTimeout(i),l(!0)},u=()=>{i=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(i),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),g.jsx(_t,{present:r||o,children:g.jsx(Zs,{"data-state":o?"visible":"hidden",...n,ref:t})})}),jg=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Le(Ue,e.__scopeScrollArea),o=e.orientation==="horizontal",l=gr(()=>i("SCROLL_END"),100),[s,i]=Tg("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>i("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,a.scrollHideDelay,i]),p.useEffect(()=>{const c=a.viewport,u=o?"scrollLeft":"scrollTop";if(c){let f=c[u];const h=()=>{const d=c[u];f!==d&&(i("SCROLL"),l()),f=d};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,o,i,l]),g.jsx(_t,{present:r||s!=="hidden",children:g.jsx(Hn,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>i("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>i("POINTER_LEAVE"))})})}),Zs=p.forwardRef((e,t)=>{const r=Le(Ue,e.__scopeScrollArea),{forceMount:n,...a}=e,[o,l]=p.useState(!1),s=e.orientation==="horizontal",i=gr(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,a=Le(Ue,e.__scopeScrollArea),o=p.useRef(null),l=p.useRef(0),[s,i]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=oi(s.viewport,s.content),u={...n,sizes:s,onSizesChange:i,hasThumb:c>0&&c<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:h=>l.current=h};function f(h,d){return Dg(h,l.current,s,d)}return r==="horizontal"?g.jsx(Ig,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const h=a.viewport.scrollLeft,d=na(h,s,a.dir);o.current.style.transform=`translate3d(${d}px, 0, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollLeft=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollLeft=f(h,a.dir))}}):r==="vertical"?g.jsx(Ng,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const h=a.viewport.scrollTop,d=na(h,s);o.current.style.transform=`translate3d(0, ${d}px, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollTop=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollTop=f(h))}}):null}),Ig=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,o=Le(Ue,e.__scopeScrollArea),[l,s]=p.useState(),i=p.useRef(null),c=Ve(t,i,o.onScrollbarXChange);return p.useEffect(()=>{i.current&&s(getComputedStyle(i.current))},[i]),g.jsx(ti,{"data-orientation":"horizontal",...a,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hr(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+u.deltaX;e.onWheelScroll(h),si(h,f)&&u.preventDefault()}},onResize:()=>{i.current&&o.viewport&&l&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:i.current.clientWidth,paddingStart:tr(l.paddingLeft),paddingEnd:tr(l.paddingRight)}})}})}),Ng=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,o=Le(Ue,e.__scopeScrollArea),[l,s]=p.useState(),i=p.useRef(null),c=Ve(t,i,o.onScrollbarYChange);return p.useEffect(()=>{i.current&&s(getComputedStyle(i.current))},[i]),g.jsx(ti,{"data-orientation":"vertical",...a,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hr(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(o.viewport){const h=o.viewport.scrollTop+u.deltaY;e.onWheelScroll(h),si(h,f)&&u.preventDefault()}},onResize:()=>{i.current&&o.viewport&&l&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:i.current.clientHeight,paddingStart:tr(l.paddingTop),paddingEnd:tr(l.paddingBottom)}})}})}),[Lg,ei]=Ys(Ue),ti=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:i,onDragScroll:c,onWheelScroll:u,onResize:f,...h}=e,d=Le(Ue,r),[y,b]=p.useState(null),C=Ve(t,x=>b(x)),j=p.useRef(null),_=p.useRef(""),A=d.viewport,I=n.content-n.viewport,N=ut(u),z=ut(i),m=gr(f,10);function E(x){if(j.current){const T=x.clientX-j.current.left,R=x.clientY-j.current.top;c({x:T,y:R})}}return p.useEffect(()=>{const x=T=>{const R=T.target;(y==null?void 0:y.contains(R))&&N(T,I)};return document.addEventListener("wheel",x,{passive:!1}),()=>document.removeEventListener("wheel",x,{passive:!1})},[A,y,I,N]),p.useEffect(z,[n,z]),xt(y,m),xt(d.content,m),g.jsx(Lg,{scope:r,scrollbar:y,hasThumb:a,onThumbChange:ut(o),onThumbPointerUp:ut(l),onThumbPositionChange:z,onThumbPointerDown:ut(s),children:g.jsx(xe.div,{...h,ref:C,style:{position:"absolute",...h.style},onPointerDown:ke(e.onPointerDown,x=>{x.button===0&&(x.target.setPointerCapture(x.pointerId),j.current=y.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",d.viewport&&(d.viewport.style.scrollBehavior="auto"),E(x))}),onPointerMove:ke(e.onPointerMove,E),onPointerUp:ke(e.onPointerUp,x=>{const T=x.target;T.hasPointerCapture(x.pointerId)&&T.releasePointerCapture(x.pointerId),document.body.style.webkitUserSelect=_.current,d.viewport&&(d.viewport.style.scrollBehavior=""),j.current=null})})})}),er="ScrollAreaThumb",ri=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=ei(er,e.__scopeScrollArea);return g.jsx(_t,{present:r||a.hasThumb,children:g.jsx(Pg,{ref:t,...n})})}),Pg=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,o=Le(er,r),l=ei(er,r),{onThumbPositionChange:s}=l,i=Ve(t,f=>l.onThumbChange(f)),c=p.useRef(void 0),u=gr(()=>{c.current&&(c.current(),c.current=void 0)},100);return p.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(u(),!c.current){const d=Og(f,s);c.current=d,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,u,s]),g.jsx(xe.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:i,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ke(e.onPointerDownCapture,f=>{const d=f.target.getBoundingClientRect(),y=f.clientX-d.left,b=f.clientY-d.top;l.onThumbPointerDown({x:y,y:b})}),onPointerUp:ke(e.onPointerUp,l.onThumbPointerUp)})});ri.displayName=er;var Bn="ScrollAreaCorner",ni=p.forwardRef((e,t)=>{const r=Le(Bn,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?g.jsx(zg,{...e,ref:t}):null});ni.displayName=Bn;var zg=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=Le(Bn,r),[o,l]=p.useState(0),[s,i]=p.useState(0),c=!!(o&&s);return xt(a.scrollbarX,()=>{var f;const u=((f=a.scrollbarX)==null?void 0:f.offsetHeight)||0;a.onCornerHeightChange(u),i(u)}),xt(a.scrollbarY,()=>{var f;const u=((f=a.scrollbarY)==null?void 0:f.offsetWidth)||0;a.onCornerWidthChange(u),l(u)}),c?g.jsx(xe.div,{...n,ref:t,style:{width:o,height:s,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function tr(e){return e?parseInt(e,10):0}function oi(e,t){const r=e/t;return isNaN(r)?0:r}function hr(e){const t=oi(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Dg(e,t,r,n="ltr"){const a=hr(r),o=a/2,l=t||o,s=a-l,i=r.scrollbar.paddingStart+l,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,f=n==="ltr"?[0,u]:[u*-1,0];return ai([i,c],f)(e)}function na(e,t,r="ltr"){const n=hr(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,s=o-n,i=r==="ltr"?[0,l]:[l*-1,0],c=Bi(e,i);return ai([0,l],[0,s])(c)}function ai(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function si(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},l=r.left!==o.left,s=r.top!==o.top;(l||s)&&t(),r=o,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function gr(e,t){const r=ut(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function xt(e,t){const r=ut(t);Hi(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var ii=Ks,Gg=Js,Fg=ni;const li=p.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(ii,{ref:n,className:fe("relative overflow-hidden",e),...r,children:[g.jsx(Gg,{className:"h-full w-full rounded-[inherit]",children:t}),g.jsx(ci,{}),g.jsx(Fg,{})]}));li.displayName=ii.displayName;const ci=p.forwardRef(({className:e,orientation:t="vertical",...r},n)=>g.jsx($n,{ref:n,orientation:t,className:fe("flex touch-none transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:g.jsx(ri,{className:"bg-border relative flex-1 rounded-full"})}));ci.displayName=$n.displayName;const Mg=({className:e})=>{const{t}=Se(),r=te.use.typeColorMap();return!r||r.size===0?null:g.jsxs(Xs,{className:`p-2 max-w-xs ${e}`,children:[g.jsx("h3",{className:"text-sm font-medium mb-2",children:t("graphPanel.legend")}),g.jsx(li,{className:"max-h-80",children:g.jsx("div",{className:"flex flex-col gap-1",children:Array.from(r.entries()).map(([n,a])=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-4 h-4 rounded-full",style:{backgroundColor:a}}),g.jsx("span",{className:"text-xs truncate",title:n,children:t(`graphPanel.nodeTypes.${n.toLowerCase()}`,n)})]},n))})})]})},$g=()=>{const{t:e}=Se(),t=Z.use.showLegend(),r=Z.use.setShowLegend(),n=p.useCallback(()=>{r(!t)},[t,r]);return g.jsx(be,{variant:Ne,onClick:n,tooltip:e("graphPanel.sideBar.legendControl.toggleLegend"),size:"icon",children:g.jsx(Pc,{})})},oa={allowInvalidContainer:!0,defaultNodeType:"default",defaultEdgeType:"curvedNoArrow",renderEdgeLabels:!1,edgeProgramClasses:{arrow:Ei,curvedArrow:Pd,curvedNoArrow:Ld},nodeProgramClasses:{default:md,circel:Si,point:Vu},labelGridCellSize:60,labelRenderedSizeThreshold:12,enableEdgeEvents:!0,labelColor:{color:"#000",attribute:"labelColor"},edgeLabelColor:{color:"#000",attribute:"labelColor"},edgeLabelSize:8,labelSize:12},Hg=()=>{const e=ga(),t=Be(),[r,n]=p.useState(null);return p.useEffect(()=>{e({downNode:a=>{n(a.node),t.getGraph().setNodeAttribute(a.node,"highlighted",!0)},mousemovebody:a=>{if(!r)return;const o=t.viewportToGraph(a);t.getGraph().setNodeAttribute(r,"x",o.x),t.getGraph().setNodeAttribute(r,"y",o.y),a.preventSigmaDefault(),a.original.preventDefault(),a.original.stopPropagation()},mouseup:()=>{r&&(n(null),t.getGraph().removeNodeAttribute(r,"highlighted"))},mousedown:a=>{a.original.buttons!==0&&!t.getCustomBBox()&&t.setCustomBBox(t.getBBox())}})},[e,t,r]),null},qp=()=>{const[e,t]=p.useState(oa),r=p.useRef(null),n=te.use.selectedNode(),a=te.use.focusedNode(),o=te.use.moveToSelectedNode(),l=te.use.isFetching(),s=Z.use.showPropertyPanel(),i=Z.use.showNodeSearchBar(),c=Z.use.enableNodeDrag(),u=Z.use.showLegend();p.useEffect(()=>{t(oa),console.log("Initialized sigma settings")},[]),p.useEffect(()=>()=>{const b=te.getState().sigmaInstance;if(b)try{b.kill(),te.getState().setSigmaInstance(null),console.log("Cleared sigma instance on Graphviewer unmount")}catch(C){console.error("Error cleaning up sigma instance:",C)}},[]);const f=p.useCallback(b=>{b===null?te.getState().setFocusedNode(null):b.type==="nodes"&&te.getState().setFocusedNode(b.id)},[]),h=p.useCallback(b=>{b===null?te.getState().setSelectedNode(null):b.type==="nodes"&&te.getState().setSelectedNode(b.id,!0)},[]),d=p.useMemo(()=>a??n,[a,n]),y=p.useMemo(()=>n?{type:"nodes",id:n}:null,[n]);return g.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[g.jsxs(ki,{settings:e,className:"!bg-background !size-full overflow-hidden",ref:r,children:[g.jsx(Jf,{}),c&&g.jsx(Hg,{}),g.jsx(zd,{node:d,move:o}),g.jsxs("div",{className:"absolute top-2 left-2 flex items-start gap-2",children:[g.jsx(Fh,{}),i&&g.jsx(Dh,{value:y,onFocus:f,onChange:h})]}),g.jsxs("div",{className:"bg-background/60 absolute bottom-2 left-2 flex flex-col rounded-xl border-2 backdrop-blur-lg",children:[g.jsx(Kf,{}),g.jsx(Zf,{}),g.jsx(eh,{}),g.jsx($g,{}),g.jsx(lh,{})]}),s&&g.jsx("div",{className:"absolute top-2 right-2",children:g.jsx(mg,{})}),u&&g.jsx("div",{className:"absolute bottom-10 right-2",children:g.jsx(Mg,{className:"bg-background/60 backdrop-blur-lg"})}),g.jsx(xg,{})]}),l&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/80 z-10",children:g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"}),g.jsx("p",{children:"Loading Graph Data..."})]})})]})};export{Qf as $,bp as A,be as B,Xs as C,Ou as D,Tp as E,Ap as F,tp as G,rp as H,Yt as I,_g as J,kg as K,vp as L,jp as M,_p as N,xp as O,Sp as P,Ep as Q,gu as R,li as S,Op as T,Gp as U,Va as V,Ma as W,Iu as X,$a as Y,Ha as Z,Tn as _,Sg as a,Cp as a0,Np as a1,el as a2,op as a3,np as a4,Xg as a5,qs as a6,zp as a7,qo as a8,Hp as a9,Vp as aa,Bp as ab,oo as ac,Zg as ad,ep as ae,Rn as af,An as ag,Pp as ah,lr as ai,Xt as aj,Yg as ak,Fp as al,Jg as am,Ip as an,Lp as ao,Ea as ap,Kr as aq,Kg as ar,hp as as,qp as at,cp as au,dp as av,fp as aw,gp as ax,Eg as b,fe as c,rt as d,Rp as e,ap as f,or as g,Mp as h,Xa as i,Ya as j,Qa as k,Ja as l,sp as m,ip as n,Ds as o,Ka as p,lp as q,Dp as r,Qg as s,kp as t,Se as u,yp as v,wp as w,up as x,kn as y,Z as z}; diff --git a/lightrag/api/webui/assets/feature-graph-NODQb6qW.js b/lightrag/api/webui/assets/feature-graph-NODQb6qW.js deleted file mode 100644 index be23288d..00000000 --- a/lightrag/api/webui/assets/feature-graph-NODQb6qW.js +++ /dev/null @@ -1,709 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/utils-vendor-BysuhMZA.js","assets/react-vendor-DEwriMA6.js"])))=>i.map(i=>d[i]); -var di=Object.defineProperty;var fi=(e,t,r)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Me=(e,t,r)=>fi(e,typeof t!="symbol"?t+"":t,r);import{R as W,r as p,c as hi,g as He,d as gi,e as pi}from"./react-vendor-DEwriMA6.js";import{_ as aa,a as sa,f as er,N as ia,b as la,c as ca,D as bn,d as Ut,F as mi,E as ua,e as vi,g as Un,h as yi,n as qn,v as Be,i as da,j as fa,r as We,k as ha,y as ga,p as bi,l as wi,U as Yr,m as xi,o as Si,S as _i}from"./graph-vendor-B-X5JegA.js";import{j as g,c as wn,P as St,a as pa,D as Ei,C as Ci,S as ki,R as Ti,u as Xe,b as ft,d as ma,e as Ri,A as Ai,f as Ee,g as Ce,h as ji,i as Ni,O as xn,k as va,l as Sn,m as Ii,T as ya,n as ba,o as wa,p as Li,q as Pi,r as xa,s as zi,t as Di,v as Oi,w as Gi,x as Fi,y as ct,z as Mi,B as $i}from"./ui-vendor-CeCm8EER.js";import{t as Hi,c as Sa,a as tr,b as Bi}from"./utils-vendor-BysuhMZA.js";function fe(...e){return Hi(Sa(e))}function rr(e){return e instanceof Error?e.message:`${e}`}function Hg(e,t){let r=0,n=null;return function(...a){const o=Date.now(),l=t-(o-r);l<=0?(n&&(clearTimeout(n),n=null),r=o,e.apply(this,a)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e.apply(this,a)},l))}}const _n=e=>{const t=e;t.use={};for(const r of Object.keys(t.getState()))t.use[r]=()=>t(n=>n[r]);return t},Kr="",Bg="/webui/",Ie="ghost",Vi="#B2EBF2",Ui="#000",qi="#E2E2E2",Qr="#EEEEEE",Wi="#F57F17",Xi="#969696",Yi="#F57F17",Wn="#B2EBF2",Nt=50,Xn=100,ut=4,Jr=20,Vg=15,Yn="*",Ug={"text/plain":[".txt",".md",".html",".htm",".tex",".json",".xml",".yaml",".yml",".rtf",".odt",".epub",".csv",".log",".conf",".ini",".properties",".sql",".bat",".sh",".c",".cpp",".py",".java",".js",".ts",".swift",".go",".rb",".php",".css",".scss",".less"],"application/pdf":[".pdf"],"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"]},qg={name:"LightRAG",github:"https://github.com/HKUDS/LightRAG"},Ki="modulepreload",Qi=function(e){return"/webui/"+e},Kn={},Ji=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),i=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=Promise.allSettled(r.map(s=>{if(s=Qi(s),s in Kn)return;Kn[s]=!0;const c=s.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Ki,c||(d.as="script"),d.crossOrigin="",d.href=s,i&&d.setAttribute("nonce",i),document.head.appendChild(d),c)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})}))}function o(l){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=l,window.dispatchEvent(i),!i.defaultPrevented)throw l}return a.then(l=>{for(const i of l||[])i.status==="rejected"&&o(i.reason);return t().catch(o)})};function _a(e,t){let r;try{r=e()}catch{return}return{getItem:a=>{var o;const l=s=>s===null?null:JSON.parse(s,void 0),i=(o=r.getItem(a))!=null?o:null;return i instanceof Promise?i.then(l):l(i)},setItem:(a,o)=>r.setItem(a,JSON.stringify(o,void 0)),removeItem:a=>r.removeItem(a)}}const Zr=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Zr(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Zr(n)(r)}}}},Zi=(e,t)=>(r,n,a)=>{let o={storage:_a(()=>localStorage),partialize:y=>y,version:0,merge:(y,k)=>({...k,...y}),...t},l=!1;const i=new Set,s=new Set;let c=o.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...y)},n,a);const u=()=>{const y=o.partialize({...n()});return c.setItem(o.name,{state:y,version:o.version})},d=a.setState;a.setState=(y,k)=>{d(y,k),u()};const h=e((...y)=>{r(...y),u()},n,a);a.getInitialState=()=>h;let f;const b=()=>{var y,k;if(!c)return;l=!1,i.forEach(E=>{var j;return E((j=n())!=null?j:h)});const I=((k=o.onRehydrateStorage)==null?void 0:k.call(o,(y=n())!=null?y:h))||void 0;return Zr(c.getItem.bind(c))(o.name).then(E=>{if(E)if(typeof E.version=="number"&&E.version!==o.version){if(o.migrate){const j=o.migrate(E.state,E.version);return j instanceof Promise?j.then(A=>[!0,A]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,E.state];return[!1,void 0]}).then(E=>{var j;const[A,N]=E;if(f=o.merge(N,(j=n())!=null?j:h),r(f,!0),A)return u()}).then(()=>{I==null||I(f,void 0),f=n(),l=!0,s.forEach(E=>E(f))}).catch(E=>{I==null||I(void 0,E)})};return a.persist={setOptions:y=>{o={...o,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>b(),hasHydrated:()=>l,onHydrate:y=>(i.add(y),()=>{i.delete(y)}),onFinishHydration:y=>(s.add(y),()=>{s.delete(y)})},o.skipHydration||b(),f||h},el=Zi,tl=tr()(el(e=>({theme:"system",language:"en",showPropertyPanel:!0,showNodeSearchBar:!0,showLegend:!1,showNodeLabel:!0,enableNodeDrag:!0,showEdgeLabel:!1,enableHideUnselectedEdges:!0,enableEdgeEvents:!1,minEdgeSize:1,maxEdgeSize:1,graphQueryMaxDepth:3,graphMaxNodes:1e3,backendMaxGraphNodes:null,graphLayoutMaxIterations:15,queryLabel:Yn,enableHealthCheck:!0,apiKey:null,currentTab:"documents",showFileName:!1,retrievalHistory:[],querySettings:{mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:6e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[],user_prompt:""},setTheme:t=>e({theme:t}),setLanguage:t=>{e({language:t}),Ji(async()=>{const{default:r}=await import("./utils-vendor-BysuhMZA.js").then(n=>n.d);return{default:r}},__vite__mapDeps([0,1])).then(({default:r})=>{r.language!==t&&r.changeLanguage(t)})},setGraphLayoutMaxIterations:t=>e({graphLayoutMaxIterations:t}),setQueryLabel:t=>e({queryLabel:t}),setGraphQueryMaxDepth:t=>e({graphQueryMaxDepth:t}),setGraphMaxNodes:(t,r=!1)=>{const n=Z.getState();if(n.graphMaxNodes!==t)if(r){const a=n.queryLabel;e({graphMaxNodes:t,queryLabel:""}),setTimeout(()=>{e({queryLabel:a})},300)}else e({graphMaxNodes:t})},setBackendMaxGraphNodes:t=>e({backendMaxGraphNodes:t}),setMinEdgeSize:t=>e({minEdgeSize:t}),setMaxEdgeSize:t=>e({maxEdgeSize:t}),setEnableHealthCheck:t=>e({enableHealthCheck:t}),setApiKey:t=>e({apiKey:t}),setCurrentTab:t=>e({currentTab:t}),setRetrievalHistory:t=>e({retrievalHistory:t}),updateQuerySettings:t=>e(r=>({querySettings:{...r.querySettings,...t}})),setShowFileName:t=>e({showFileName:t}),setShowLegend:t=>e({showLegend:t})}),{name:"settings-storage",storage:_a(()=>localStorage),version:14,migrate:(e,t)=>(t<2&&(e.showEdgeLabel=!1),t<3&&(e.queryLabel=Yn),t<4&&(e.showPropertyPanel=!0,e.showNodeSearchBar=!0,e.showNodeLabel=!0,e.enableHealthCheck=!0,e.apiKey=null),t<5&&(e.currentTab="documents"),t<6&&(e.querySettings={mode:"global",response_type:"Multiple Paragraphs",top_k:10,max_token_for_text_unit:4e3,max_token_for_global_context:4e3,max_token_for_local_context:4e3,only_need_context:!1,only_need_prompt:!1,stream:!0,history_turns:3,hl_keywords:[],ll_keywords:[]},e.retrievalHistory=[]),t<7&&(e.graphQueryMaxDepth=3,e.graphLayoutMaxIterations=15),t<8&&(e.graphMinDegree=0,e.language="en"),t<9&&(e.showFileName=!1),t<10&&(delete e.graphMinDegree,e.graphMaxNodes=1e3),t<11&&(e.minEdgeSize=1,e.maxEdgeSize=1),t<12&&(e.retrievalHistory=[]),t<13&&e.querySettings&&(e.querySettings.user_prompt=""),t<14&&(e.backendMaxGraphNodes=null),e)})),Z=_n(tl);class rl{constructor(){Me(this,"nodes",[]);Me(this,"edges",[]);Me(this,"nodeIdMap",{});Me(this,"edgeIdMap",{});Me(this,"edgeDynamicIdMap",{});Me(this,"getNode",t=>{const r=this.nodeIdMap[t];if(r!==void 0)return this.nodes[r]});Me(this,"getEdge",(t,r=!0)=>{const n=r?this.edgeDynamicIdMap[t]:this.edgeIdMap[t];if(n!==void 0)return this.edges[n]});Me(this,"buildDynamicMap",()=>{this.edgeDynamicIdMap={};for(let t=0;t({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,moveToSelectedNode:!1,isFetching:!1,graphIsEmpty:!1,lastSuccessfulQueryLabel:"",graphDataFetchAttempted:!1,labelsFetchAttempted:!1,rawGraph:null,sigmaGraph:null,sigmaInstance:null,allDatabaseLabels:["*"],typeColorMap:new Map,searchEngine:null,setGraphIsEmpty:r=>e({graphIsEmpty:r}),setLastSuccessfulQueryLabel:r=>e({lastSuccessfulQueryLabel:r}),setIsFetching:r=>e({isFetching:r}),setSelectedNode:(r,n)=>e({selectedNode:r,moveToSelectedNode:n}),setFocusedNode:r=>e({focusedNode:r}),setSelectedEdge:r=>e({selectedEdge:r}),setFocusedEdge:r=>e({focusedEdge:r}),clearSelection:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null}),reset:()=>{e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,rawGraph:null,sigmaGraph:null,searchEngine:null,moveToSelectedNode:!1,graphIsEmpty:!1})},setRawGraph:r=>e({rawGraph:r}),setSigmaGraph:r=>{e({sigmaGraph:r})},setAllDatabaseLabels:r=>e({allDatabaseLabels:r}),fetchAllDatabaseLabels:async()=>{try{console.log("Fetching all database labels...");const r=await al();e({allDatabaseLabels:["*",...r]});return}catch(r){throw console.error("Failed to fetch all database labels:",r),e({allDatabaseLabels:["*"]}),r}},setMoveToSelectedNode:r=>e({moveToSelectedNode:r}),setSigmaInstance:r=>e({sigmaInstance:r}),setTypeColorMap:r=>e({typeColorMap:r}),setSearchEngine:r=>e({searchEngine:r}),resetSearchEngine:()=>e({searchEngine:null}),setGraphDataFetchAttempted:r=>e({graphDataFetchAttempted:r}),setLabelsFetchAttempted:r=>e({labelsFetchAttempted:r}),nodeToExpand:null,nodeToPrune:null,triggerNodeExpand:r=>e({nodeToExpand:r}),triggerNodePrune:r=>e({nodeToPrune:r}),graphDataVersion:0,incrementGraphDataVersion:()=>e(r=>({graphDataVersion:r.graphDataVersion+1})),updateNodeAndSelect:async(r,n,a,o)=>{const l=t(),{sigmaGraph:i,rawGraph:s}=l;if(!(!i||!s||!i.hasNode(r)))try{const c=i.getNodeAttributes(r);if(console.log("updateNodeAndSelect",r,n,a,o),r===n&&a==="entity_id"){i.addNode(o,{...c,label:o});const u=[];i.forEachEdge(r,(h,f,b,y)=>{const k=b===r?y:b,I=b===r,E=h,j=s.edgeDynamicIdMap[E],A=i.addEdge(I?o:k,I?k:o,f);j!==void 0&&u.push({originalDynamicId:E,newEdgeId:A,edgeIndex:j}),i.dropEdge(h)}),i.dropNode(r);const d=s.nodeIdMap[r];d!==void 0&&(s.nodes[d].id=o,s.nodes[d].labels=[o],s.nodes[d].properties.entity_id=o,delete s.nodeIdMap[r],s.nodeIdMap[o]=d),u.forEach(({originalDynamicId:h,newEdgeId:f,edgeIndex:b})=>{s.edges[b]&&(s.edges[b].source===r&&(s.edges[b].source=o),s.edges[b].target===r&&(s.edges[b].target=o),s.edges[b].dynamicId=f,delete s.edgeDynamicIdMap[h],s.edgeDynamicIdMap[f]=b)}),e({selectedNode:o,moveToSelectedNode:!0})}else{const u=s.nodeIdMap[String(r)];u!==void 0&&(s.nodes[u].properties[a]=o,a==="entity_id"&&(s.nodes[u].labels=[o],i.setNodeAttribute(String(r),"label",o))),e(d=>({graphDataVersion:d.graphDataVersion+1}))}}catch(c){throw console.error("Error updating node in graph:",c),new Error("Failed to update node in graph")}},updateEdgeAndSelect:async(r,n,a,o,l,i)=>{const s=t(),{sigmaGraph:c,rawGraph:u}=s;if(!(!c||!u))try{const d=u.edgeIdMap[String(r)];d!==void 0&&u.edges[d]&&(u.edges[d].properties[l]=i,n!==void 0&&l==="keywords"&&c.setEdgeAttribute(n,"label",i)),e(h=>({graphDataVersion:h.graphDataVersion+1})),e({selectedEdge:n})}catch(d){throw console.error(`Error updating edge ${a}->${o} in graph:`,d),new Error("Failed to update edge in graph")}}})),te=_n(nl);class ol{constructor(){Me(this,"navigate",null)}setNavigate(t){this.navigate=t}resetAllApplicationState(t=!1){console.log("Resetting all application state...");const r=te.getState(),n=r.sigmaInstance;r.reset(),r.setGraphDataFetchAttempted(!1),r.setLabelsFetchAttempted(!1),r.setSigmaInstance(null),r.setIsFetching(!1),En.getState().clear(),t||Z.getState().setRetrievalHistory([]),sessionStorage.clear(),n&&(n.getGraph().clear(),n.kill(),te.getState().setSigmaInstance(null))}navigateToLogin(){if(!this.navigate){console.error("Navigation function not set");return}const t=qt.getState().username;t&&localStorage.setItem("LIGHTRAG-PREVIOUS-USER",t),this.resetAllApplicationState(!0),qt.getState().logout(),this.navigate("/login")}navigateToHome(){if(!this.navigate){console.error("Navigation function not set");return}this.navigate("/")}}const Ea=new ol,Wg="Invalid API Key",Xg="API Key required",xe=Bi.create({baseURL:Kr,headers:{"Content-Type":"application/json"}});xe.interceptors.request.use(e=>{const t=Z.getState().apiKey,r=localStorage.getItem("LIGHTRAG-API-TOKEN");return r&&(e.headers.Authorization=`Bearer ${r}`),t&&(e.headers["X-API-Key"]=t),e});xe.interceptors.response.use(e=>e,e=>{var t,r,n,a;if(e.response){if(((t=e.response)==null?void 0:t.status)===401){if((n=(r=e.config)==null?void 0:r.url)!=null&&n.includes("/login"))throw e;return Ea.navigateToLogin(),Promise.reject(new Error("Authentication required"))}throw new Error(`${e.response.status} ${e.response.statusText} -${JSON.stringify(e.response.data)} -${(a=e.config)==null?void 0:a.url}`)}throw e});const Ca=async(e,t,r)=>(await xe.get(`/graphs?label=${encodeURIComponent(e)}&max_depth=${t}&max_nodes=${r}`)).data,al=async()=>(await xe.get("/graph/label/list")).data,sl=async()=>{try{return(await xe.get("/health")).data}catch(e){return{status:"error",message:rr(e)}}},Yg=async()=>(await xe.get("/documents")).data,Kg=async()=>(await xe.post("/documents/scan")).data,Qg=async e=>(await xe.post("/query",e)).data,Jg=async(e,t,r)=>{const n=Z.getState().apiKey,a=localStorage.getItem("LIGHTRAG-API-TOKEN"),o={"Content-Type":"application/json",Accept:"application/x-ndjson"};a&&(o.Authorization=`Bearer ${a}`),n&&(o["X-API-Key"]=n);try{const l=await fetch(`${Kr}/query/stream`,{method:"POST",headers:o,body:JSON.stringify(e)});if(!l.ok){if(l.status===401)throw Ea.navigateToLogin(),new Error("Authentication required");let u="Unknown error";try{u=await l.text()}catch{}const d=`${Kr}/query/stream`;throw new Error(`${l.status} ${l.statusText} -${JSON.stringify({error:u})} -${d}`)}if(!l.body)throw new Error("Response body is null");const i=l.body.getReader(),s=new TextDecoder;let c="";for(;;){const{done:u,value:d}=await i.read();if(u)break;c+=s.decode(d,{stream:!0});const h=c.split(` -`);c=h.pop()||"";for(const f of h)if(f.trim())try{const b=JSON.parse(f);b.response?t(b.response):b.error&&r&&r(b.error)}catch(b){console.error("Error parsing stream chunk:",f,b),r&&r(`Error parsing server response: ${f}`)}}if(c.trim())try{const u=JSON.parse(c);u.response?t(u.response):u.error&&r&&r(u.error)}catch(u){console.error("Error parsing final chunk:",c,u),r&&r(`Error parsing final server response: ${c}`)}}catch(l){const i=rr(l);if(i==="Authentication required"){console.error("Authentication required for stream request"),r&&r("Authentication required");return}const s=i.match(/^(\d{3})\s/);if(s){const c=parseInt(s[1],10);let u=i;switch(c){case 403:u="You do not have permission to access this resource (403 Forbidden)",console.error("Permission denied for stream request:",i);break;case 404:u="The requested resource does not exist (404 Not Found)",console.error("Resource not found for stream request:",i);break;case 429:u="Too many requests, please try again later (429 Too Many Requests)",console.error("Rate limited for stream request:",i);break;case 500:case 502:case 503:case 504:u=`Server error, please try again later (${c})`,console.error("Server error for stream request:",i);break;default:console.error("Stream request failed with status code:",c,i)}r&&r(u);return}if(i.includes("NetworkError")||i.includes("Failed to fetch")||i.includes("Network request failed")){console.error("Network error for stream request:",i),r&&r("Network connection error, please check your internet connection");return}if(i.includes("Error parsing")||i.includes("SyntaxError")){console.error("JSON parsing error in stream:",i),r&&r("Error processing response data");return}console.error("Unhandled stream error:",i),r?r(i):console.error("No error handler provided for stream error:",i)}},Zg=async(e,t)=>{const r=new FormData;return r.append("file",e),(await xe.post("/documents/upload",r,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t!==void 0?a=>{const o=Math.round(a.loaded*100/a.total);t(o)}:void 0})).data},ep=async()=>(await xe.delete("/documents")).data,tp=async e=>(await xe.post("/documents/clear_cache",{modes:e})).data,rp=async(e,t=!1)=>(await xe.delete("/documents/delete_document",{data:{doc_ids:e,delete_file:t}})).data,np=async()=>{try{const e=await xe.get("/auth-status",{timeout:5e3,headers:{Accept:"application/json"}});if((e.headers["content-type"]||"").includes("text/html"))return console.warn("Received HTML response instead of JSON for auth-status endpoint"),{auth_configured:!0,auth_mode:"enabled"};if(e.data&&typeof e.data=="object"&&"auth_configured"in e.data&&typeof e.data.auth_configured=="boolean"){if(e.data.auth_configured)return e.data;if(e.data.access_token&&typeof e.data.access_token=="string")return e.data;console.warn("Auth not configured but no valid access token provided")}return console.warn("Received invalid auth status response:",e.data),{auth_configured:!0,auth_mode:"enabled"}}catch(e){return console.error("Failed to get auth status:",rr(e)),{auth_configured:!0,auth_mode:"enabled"}}},op=async()=>(await xe.get("/documents/pipeline_status")).data,ap=async(e,t)=>{const r=new FormData;return r.append("username",e),r.append("password",t),(await xe.post("/login",r,{headers:{"Content-Type":"multipart/form-data"}})).data},il=async(e,t,r=!1)=>(await xe.post("/graph/entity/edit",{entity_name:e,updated_data:t,allow_rename:r})).data,ll=async(e,t,r)=>(await xe.post("/graph/relation/edit",{source_id:e,target_id:t,updated_data:r})).data,cl=async e=>{try{return(await xe.get(`/graph/entity/exists?name=${encodeURIComponent(e)}`)).data.exists}catch(t){return console.error("Error checking entity name:",t),!1}},ul=tr()(e=>({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:null,pipelineBusy:!1,check:async()=>{var r;const t=await sl();if(t.status==="healthy"){if((t.core_version||t.api_version)&&qt.getState().setVersion(t.core_version||null,t.api_version||null),("webui_title"in t||"webui_description"in t)&&qt.getState().setCustomTitle("webui_title"in t?t.webui_title??null:null,"webui_description"in t?t.webui_description??null:null),(r=t.configuration)!=null&&r.max_graph_nodes){const n=parseInt(t.configuration.max_graph_nodes,10);!isNaN(n)&&n>0&&Z.getState().backendMaxGraphNodes!==n&&(Z.getState().setBackendMaxGraphNodes(n),Z.getState().graphMaxNodes>n&&Z.getState().setGraphMaxNodes(n,!0))}return e({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:t,pipelineBusy:t.pipeline_busy}),!0}return e({health:!1,message:t.message,messageTitle:"Backend Health Check Error!",lastCheckTime:Date.now(),status:null}),!1},clear:()=>{e({health:!0,message:null,messageTitle:null})},setErrorMessage:(t,r)=>{e({health:!1,message:t,messageTitle:r})},setPipelineBusy:t=>{e({pipelineBusy:t})}})),En=_n(ul),ka=e=>{try{const t=e.split(".");return t.length!==3?{}:JSON.parse(atob(t[1]))}catch(t){return console.error("Error parsing token payload:",t),{}}},Ta=e=>ka(e).sub||null,dl=e=>ka(e).role==="guest",fl=()=>{const e=localStorage.getItem("LIGHTRAG-API-TOKEN"),t=localStorage.getItem("LIGHTRAG-CORE-VERSION"),r=localStorage.getItem("LIGHTRAG-API-VERSION"),n=localStorage.getItem("LIGHTRAG-WEBUI-TITLE"),a=localStorage.getItem("LIGHTRAG-WEBUI-DESCRIPTION"),o=e?Ta(e):null;return e?{isAuthenticated:!0,isGuestMode:dl(e),coreVersion:t,apiVersion:r,username:o,webuiTitle:n,webuiDescription:a}:{isAuthenticated:!1,isGuestMode:!1,coreVersion:t,apiVersion:r,username:null,webuiTitle:n,webuiDescription:a}},qt=tr(e=>{const t=fl();return{isAuthenticated:t.isAuthenticated,isGuestMode:t.isGuestMode,coreVersion:t.coreVersion,apiVersion:t.apiVersion,username:t.username,webuiTitle:t.webuiTitle,webuiDescription:t.webuiDescription,login:(r,n=!1,a=null,o=null,l=null,i=null)=>{localStorage.setItem("LIGHTRAG-API-TOKEN",r),a&&localStorage.setItem("LIGHTRAG-CORE-VERSION",a),o&&localStorage.setItem("LIGHTRAG-API-VERSION",o),l?localStorage.setItem("LIGHTRAG-WEBUI-TITLE",l):localStorage.removeItem("LIGHTRAG-WEBUI-TITLE"),i?localStorage.setItem("LIGHTRAG-WEBUI-DESCRIPTION",i):localStorage.removeItem("LIGHTRAG-WEBUI-DESCRIPTION");const s=Ta(r);e({isAuthenticated:!0,isGuestMode:n,username:s,coreVersion:a,apiVersion:o,webuiTitle:l,webuiDescription:i})},logout:()=>{localStorage.removeItem("LIGHTRAG-API-TOKEN");const r=localStorage.getItem("LIGHTRAG-CORE-VERSION"),n=localStorage.getItem("LIGHTRAG-API-VERSION"),a=localStorage.getItem("LIGHTRAG-WEBUI-TITLE"),o=localStorage.getItem("LIGHTRAG-WEBUI-DESCRIPTION");e({isAuthenticated:!1,isGuestMode:!1,username:null,coreVersion:r,apiVersion:n,webuiTitle:a,webuiDescription:o})},setVersion:(r,n)=>{r&&localStorage.setItem("LIGHTRAG-CORE-VERSION",r),n&&localStorage.setItem("LIGHTRAG-API-VERSION",n),e({coreVersion:r,apiVersion:n})},setCustomTitle:(r,n)=>{r?localStorage.setItem("LIGHTRAG-WEBUI-TITLE",r):localStorage.removeItem("LIGHTRAG-WEBUI-TITLE"),n?localStorage.setItem("LIGHTRAG-WEBUI-DESCRIPTION",n):localStorage.removeItem("LIGHTRAG-WEBUI-DESCRIPTION"),e({webuiTitle:r,webuiDescription:n})}}});var hl=e=>{switch(e){case"success":return ml;case"info":return yl;case"warning":return vl;case"error":return bl;default:return null}},gl=Array(12).fill(0),pl=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},gl.map((r,n)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),ml=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),vl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),yl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),bl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),wl=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xl=()=>{let[e,t]=W.useState(document.hidden);return W.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},en=1,Sl=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:en++,o=this.toasts.find(i=>i.id===a),l=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(i=>i.id===a?(this.publish({...i,...e,id:a,title:r}),{...i,...e,id:a,dismissible:l,title:r}):i):this.addToast({title:r,...n,dismissible:l,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,o,l=n.then(async s=>{if(o=["resolve",s],W.isValidElement(s))a=!1,this.create({id:r,type:"default",message:s});else if(El(s)&&!s.ok){a=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${s.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${s.status}`):t.description;this.create({id:r,type:"error",message:c,description:u})}else if(t.success!==void 0){a=!1;let c=typeof t.success=="function"?await t.success(s):t.success,u=typeof t.description=="function"?await t.description(s):t.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async s=>{if(o=["reject",s],t.error!==void 0){a=!1;let c=typeof t.error=="function"?await t.error(s):t.error,u=typeof t.description=="function"?await t.description(s):t.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var s;a&&(this.dismiss(r),r=void 0),(s=t.finally)==null||s.call(t)}),i=()=>new Promise((s,c)=>l.then(()=>o[0]==="reject"?c(o[1]):s(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:i}:Object.assign(r,{unwrap:i})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||en++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ae=new Sl,_l=(e,t)=>{let r=(t==null?void 0:t.id)||en++;return Ae.addToast({title:e,...t,id:r}),r},El=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Cl=_l,kl=()=>Ae.toasts,Tl=()=>Ae.getActiveToasts(),rt=Object.assign(Cl,{success:Ae.success,info:Ae.info,warning:Ae.warning,error:Ae.error,custom:Ae.custom,message:Ae.message,promise:Ae.promise,dismiss:Ae.dismiss,loading:Ae.loading},{getHistory:kl,getToasts:Tl});function Rl(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Rl(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function It(e){return e.label!==void 0}var Al=3,jl="32px",Nl="16px",Qn=4e3,Il=356,Ll=14,Pl=20,zl=200;function Fe(...e){return e.filter(Boolean).join(" ")}function Dl(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var Ol=e=>{var t,r,n,a,o,l,i,s,c,u,d;let{invert:h,toast:f,unstyled:b,interacting:y,setHeights:k,visibleToasts:I,heights:E,index:j,toasts:A,expanded:N,removeToast:z,defaultRichColors:m,closeButton:_,style:x,cancelButtonStyle:T,actionButtonStyle:R,className:O="",descriptionClassName:w="",duration:H,position:K,gap:D,loadingIcon:C,expandByDefault:S,classNames:B,icons:ae,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:v}=e,[P,V]=W.useState(null),[$,J]=W.useState(null),[X,Y]=W.useState(!1),[ie,ne]=W.useState(!1),[se,F]=W.useState(!1),[Q,q]=W.useState(!1),[U,L]=W.useState(!1),[oe,ue]=W.useState(0),[re,ee]=W.useState(0),G=W.useRef(f.duration||H||Qn),ge=W.useRef(null),pe=W.useRef(null),ye=j===0,we=j+1<=I,de=f.type,me=f.dismissible!==!1,Ne=f.className||"",ke=f.descriptionClassName||"",Te=W.useMemo(()=>E.findIndex(ce=>ce.toastId===f.id)||0,[E,f.id]),Pe=W.useMemo(()=>{var ce;return(ce=f.closeButton)!=null?ce:_},[f.closeButton,_]),Ye=W.useMemo(()=>f.duration||H||Qn,[f.duration,H]),Ke=W.useRef(0),Re=W.useRef(0),st=W.useRef(0),ze=W.useRef(null),[ii,li]=K.split("-"),Bn=W.useMemo(()=>E.reduce((ce,he,ve)=>ve>=Te?ce:ce+he.height,0),[E,Te]),Vn=xl(),ci=f.invert||h,hr=de==="loading";Re.current=W.useMemo(()=>Te*D+Bn,[Te,Bn]),W.useEffect(()=>{G.current=Ye},[Ye]),W.useEffect(()=>{Y(!0)},[]),W.useEffect(()=>{let ce=pe.current;if(ce){let he=ce.getBoundingClientRect().height;return ee(he),k(ve=>[{toastId:f.id,height:he,position:f.position},...ve]),()=>k(ve=>ve.filter(De=>De.toastId!==f.id))}},[k,f.id]),W.useLayoutEffect(()=>{if(!X)return;let ce=pe.current,he=ce.style.height;ce.style.height="auto";let ve=ce.getBoundingClientRect().height;ce.style.height=he,ee(ve),k(De=>De.find(Oe=>Oe.toastId===f.id)?De.map(Oe=>Oe.toastId===f.id?{...Oe,height:ve}:Oe):[{toastId:f.id,height:ve,position:f.position},...De])},[X,f.title,f.description,k,f.id]);let Qe=W.useCallback(()=>{ne(!0),ue(Re.current),k(ce=>ce.filter(he=>he.toastId!==f.id)),setTimeout(()=>{z(f)},zl)},[f,z,k,Re]);W.useEffect(()=>{if(f.promise&&de==="loading"||f.duration===1/0||f.type==="loading")return;let ce;return N||y||v&&Vn?(()=>{if(st.current{var he;(he=f.onAutoClose)==null||he.call(f,f),Qe()},G.current)),()=>clearTimeout(ce)},[N,y,f,de,v,Vn,Qe]),W.useEffect(()=>{f.delete&&Qe()},[Qe,f.delete]);function ui(){var ce,he,ve;return ae!=null&&ae.loading?W.createElement("div",{className:Fe(B==null?void 0:B.loader,(ce=f==null?void 0:f.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":de==="loading"},ae.loading):C?W.createElement("div",{className:Fe(B==null?void 0:B.loader,(he=f==null?void 0:f.classNames)==null?void 0:he.loader,"sonner-loader"),"data-visible":de==="loading"},C):W.createElement(pl,{className:Fe(B==null?void 0:B.loader,(ve=f==null?void 0:f.classNames)==null?void 0:ve.loader),visible:de==="loading"})}return W.createElement("li",{tabIndex:0,ref:pe,className:Fe(O,Ne,B==null?void 0:B.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[de],(r=f==null?void 0:f.classNames)==null?void 0:r[de]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:m,"data-styled":!(f.jsx||f.unstyled||b),"data-mounted":X,"data-promise":!!f.promise,"data-swiped":U,"data-removed":ie,"data-visible":we,"data-y-position":ii,"data-x-position":li,"data-index":j,"data-front":ye,"data-swiping":se,"data-dismissible":me,"data-type":de,"data-invert":ci,"data-swipe-out":Q,"data-swipe-direction":$,"data-expanded":!!(N||S&&X),style:{"--index":j,"--toasts-before":j,"--z-index":A.length-j,"--offset":`${ie?oe:Re.current}px`,"--initial-height":S?"auto":`${re}px`,...x,...f.style},onDragEnd:()=>{F(!1),V(null),ze.current=null},onPointerDown:ce=>{hr||!me||(ge.current=new Date,ue(Re.current),ce.target.setPointerCapture(ce.pointerId),ce.target.tagName!=="BUTTON"&&(F(!0),ze.current={x:ce.clientX,y:ce.clientY}))},onPointerUp:()=>{var ce,he,ve,De;if(Q||!me)return;ze.current=null;let Oe=Number(((ce=pe.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Je=Number(((he=pe.current)==null?void 0:he.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),it=new Date().getTime()-((ve=ge.current)==null?void 0:ve.getTime()),Ge=P==="x"?Oe:Je,Ze=Math.abs(Ge)/it;if(Math.abs(Ge)>=Pl||Ze>.11){ue(Re.current),(De=f.onDismiss)==null||De.call(f,f),J(P==="x"?Oe>0?"right":"left":Je>0?"down":"up"),Qe(),q(!0),L(!1);return}F(!1),V(null)},onPointerMove:ce=>{var he,ve,De,Oe;if(!ze.current||!me||((he=window.getSelection())==null?void 0:he.toString().length)>0)return;let Je=ce.clientY-ze.current.y,it=ce.clientX-ze.current.x,Ge=(ve=e.swipeDirections)!=null?ve:Dl(K);!P&&(Math.abs(it)>1||Math.abs(Je)>1)&&V(Math.abs(it)>Math.abs(Je)?"x":"y");let Ze={x:0,y:0};P==="y"?(Ge.includes("top")||Ge.includes("bottom"))&&(Ge.includes("top")&&Je<0||Ge.includes("bottom")&&Je>0)&&(Ze.y=Je):P==="x"&&(Ge.includes("left")||Ge.includes("right"))&&(Ge.includes("left")&&it<0||Ge.includes("right")&&it>0)&&(Ze.x=it),(Math.abs(Ze.x)>0||Math.abs(Ze.y)>0)&&L(!0),(De=pe.current)==null||De.style.setProperty("--swipe-amount-x",`${Ze.x}px`),(Oe=pe.current)==null||Oe.style.setProperty("--swipe-amount-y",`${Ze.y}px`)}},Pe&&!f.jsx?W.createElement("button",{"aria-label":M,"data-disabled":hr,"data-close-button":!0,onClick:hr||!me?()=>{}:()=>{var ce;Qe(),(ce=f.onDismiss)==null||ce.call(f,f)},className:Fe(B==null?void 0:B.closeButton,(a=f==null?void 0:f.classNames)==null?void 0:a.closeButton)},(o=ae==null?void 0:ae.close)!=null?o:wl):null,f.jsx||p.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:W.createElement(W.Fragment,null,de||f.icon||f.promise?W.createElement("div",{"data-icon":"",className:Fe(B==null?void 0:B.icon,(l=f==null?void 0:f.classNames)==null?void 0:l.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ui():null,f.type!=="loading"?f.icon||(ae==null?void 0:ae[de])||hl(de):null):null,W.createElement("div",{"data-content":"",className:Fe(B==null?void 0:B.content,(i=f==null?void 0:f.classNames)==null?void 0:i.content)},W.createElement("div",{"data-title":"",className:Fe(B==null?void 0:B.title,(s=f==null?void 0:f.classNames)==null?void 0:s.title)},typeof f.title=="function"?f.title():f.title),f.description?W.createElement("div",{"data-description":"",className:Fe(w,ke,B==null?void 0:B.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),p.isValidElement(f.cancel)?f.cancel:f.cancel&&It(f.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:ce=>{var he,ve;It(f.cancel)&&me&&((ve=(he=f.cancel).onClick)==null||ve.call(he,ce),Qe())},className:Fe(B==null?void 0:B.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,p.isValidElement(f.action)?f.action:f.action&&It(f.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||R,onClick:ce=>{var he,ve;It(f.action)&&((ve=(he=f.action).onClick)==null||ve.call(he,ce),!ce.defaultPrevented&&Qe())},className:Fe(B==null?void 0:B.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function Jn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Gl(e,t){let r={};return[e,t].forEach((n,a)=>{let o=a===1,l=o?"--mobile-offset":"--offset",i=o?Nl:jl;function s(c){["top","right","bottom","left"].forEach(u=>{r[`${l}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?s(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${l}-${c}`]=i:r[`${l}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):s(i)}),r}var sp=p.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:i,offset:s,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:f,visibleToasts:b=Al,toastOptions:y,dir:k=Jn(),gap:I=Ll,loadingIcon:E,icons:j,containerAriaLabel:A="Notifications",pauseWhenPageIsHidden:N}=e,[z,m]=W.useState([]),_=W.useMemo(()=>Array.from(new Set([n].concat(z.filter(v=>v.position).map(v=>v.position)))),[z,n]),[x,T]=W.useState([]),[R,O]=W.useState(!1),[w,H]=W.useState(!1),[K,D]=W.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),C=W.useRef(null),S=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=W.useRef(null),ae=W.useRef(!1),M=W.useCallback(v=>{m(P=>{var V;return(V=P.find($=>$.id===v.id))!=null&&V.delete||Ae.dismiss(v.id),P.filter(({id:$})=>$!==v.id)})},[]);return W.useEffect(()=>Ae.subscribe(v=>{if(v.dismiss){m(P=>P.map(V=>V.id===v.id?{...V,delete:!0}:V));return}setTimeout(()=>{hi.flushSync(()=>{m(P=>{let V=P.findIndex($=>$.id===v.id);return V!==-1?[...P.slice(0,V),{...P[V],...v},...P.slice(V+1)]:[v,...P]})})})}),[]),W.useEffect(()=>{if(u!=="system"){D(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let v=window.matchMedia("(prefers-color-scheme: dark)");try{v.addEventListener("change",({matches:P})=>{D(P?"dark":"light")})}catch{v.addListener(({matches:V})=>{try{D(V?"dark":"light")}catch($){console.error($)}})}},[u]),W.useEffect(()=>{z.length<=1&&O(!1)},[z]),W.useEffect(()=>{let v=P=>{var V,$;a.every(J=>P[J]||P.code===J)&&(O(!0),(V=C.current)==null||V.focus()),P.code==="Escape"&&(document.activeElement===C.current||($=C.current)!=null&&$.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a]),W.useEffect(()=>{if(C.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,ae.current=!1)}},[C.current]),W.createElement("section",{ref:t,"aria-label":`${A} ${S}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((v,P)=>{var V;let[$,J]=v.split("-");return z.length?W.createElement("ol",{key:v,dir:k==="auto"?Jn():k,tabIndex:-1,ref:C,className:i,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":$,"data-lifted":R&&z.length>1&&!o,"data-x-position":J,style:{"--front-toast-height":`${((V=x[0])==null?void 0:V.height)||0}px`,"--width":`${Il}px`,"--gap":`${I}px`,...f,...Gl(s,c)},onBlur:X=>{ae.current&&!X.currentTarget.contains(X.relatedTarget)&&(ae.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||ae.current||(ae.current=!0,B.current=X.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{w||O(!1)},onDragEnd:()=>O(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},z.filter(X=>!X.position&&P===0||X.position===v).map((X,Y)=>{var ie,ne;return W.createElement(Ol,{key:X.id,icons:j,index:Y,toast:X,defaultRichColors:d,duration:(ie=y==null?void 0:y.duration)!=null?ie:h,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:r,visibleToasts:b,closeButton:(ne=y==null?void 0:y.closeButton)!=null?ne:l,interacting:w,position:v,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:M,toasts:z.filter(se=>se.position==X.position),heights:x.filter(se=>se.position==X.position),setHeights:T,expandByDefault:o,gap:I,loadingIcon:E,expanded:R,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const Fl={theme:"system",setTheme:()=>null},Ra=p.createContext(Fl);function ip({children:e,...t}){const r=Z.use.theme(),n=Z.use.setTheme();p.useEffect(()=>{const o=window.document.documentElement;if(o.classList.remove("light","dark"),r==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)"),i=s=>{o.classList.remove("light","dark"),o.classList.add(s.matches?"dark":"light")};return o.classList.add(l.matches?"dark":"light"),l.addEventListener("change",i),()=>l.removeEventListener("change",i)}else o.classList.add(r)},[r]);const a={theme:r,setTheme:n};return g.jsx(Ra.Provider,{...t,value:a,children:e})}const Ml=(e,t,r,n)=>{var o,l,i,s;const a=[r,{code:t,...n||{}}];if((l=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&l.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);ht(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(s=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&s.warn?e.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},Zn={},tn=(e,t,r,n)=>{ht(r)&&Zn[r]||(ht(r)&&(Zn[r]=new Date),Ml(e,t,r,n))},Aa=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},rn=(e,t,r)=>{e.loadNamespaces(t,Aa(e,r))},eo=(e,t,r,n)=>{if(ht(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rn(e,r,n);r.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,Aa(e,n))},$l=(e,t,r={})=>!t.languages||!t.languages.length?(tn(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,a)=>{var o;if(((o=r.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e))return!1}}),ht=e=>typeof e=="string",Hl=e=>typeof e=="object"&&e!==null,Bl=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Vl={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ul=e=>Vl[e],ql=e=>e.replace(Bl,Ul);let nn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ql};const Wl=(e={})=>{nn={...nn,...e}},Xl=()=>nn;let ja;const Yl=e=>{ja=e},Kl=()=>ja,lp={type:"3rdParty",init(e){Wl(e.options.react),Yl(e)}},Ql=p.createContext();class Jl{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Zl=(e,t)=>{const r=p.useRef();return p.useEffect(()=>{r.current=e},[e,t]),r.current},Na=(e,t,r,n)=>e.getFixedT(t,r,n),ec=(e,t,r,n)=>p.useCallback(Na(e,t,r,n),[e,t,r,n]),Se=(e,t={})=>{var A,N,z,m;const{i18n:r}=t,{i18n:n,defaultNS:a}=p.useContext(Ql)||{},o=r||n||Kl();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Jl),!o){tn(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const _=(T,R)=>ht(R)?R:Hl(R)&&ht(R.defaultValue)?R.defaultValue:Array.isArray(T)?T[T.length-1]:T,x=[_,{},!1];return x.t=_,x.i18n={},x.ready=!1,x}(A=o.options.react)!=null&&A.wait&&tn(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const l={...Xl(),...o.options.react,...t},{useSuspense:i,keyPrefix:s}=l;let c=a||((N=o.options)==null?void 0:N.defaultNS);c=ht(c)?[c]:c||["translation"],(m=(z=o.reportNamespaces).addUsedNamespaces)==null||m.call(z,c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(_=>$l(_,o,l)),d=ec(o,t.lng||null,l.nsMode==="fallback"?c:c[0],s),h=()=>d,f=()=>Na(o,t.lng||null,l.nsMode==="fallback"?c:c[0],s),[b,y]=p.useState(h);let k=c.join();t.lng&&(k=`${t.lng}${k}`);const I=Zl(k),E=p.useRef(!0);p.useEffect(()=>{const{bindI18n:_,bindI18nStore:x}=l;E.current=!0,!u&&!i&&(t.lng?eo(o,t.lng,c,()=>{E.current&&y(f)}):rn(o,c,()=>{E.current&&y(f)})),u&&I&&I!==k&&E.current&&y(f);const T=()=>{E.current&&y(f)};return _&&(o==null||o.on(_,T)),x&&(o==null||o.store.on(x,T)),()=>{E.current=!1,o&&(_==null||_.split(" ").forEach(R=>o.off(R,T))),x&&o&&x.split(" ").forEach(R=>o.store.off(R,T))}},[o,k]),p.useEffect(()=>{E.current&&u&&y(h)},[o,s,u]);const j=[b,o,u];if(j.t=b,j.i18n=o,j.ready=u,u||!u&&!i)return j;throw new Promise(_=>{t.lng?eo(o,t.lng,c,()=>_()):rn(o,c,()=>_())})},to=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ro=Sa,tc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ro(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(c=>{const u=r==null?void 0:r[c],d=o==null?void 0:o[c];if(u===null)return null;const h=to(u)||to(d);return a[c][h]}),i=r&&Object.entries(r).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),s=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(b=>{let[y,k]=b;return Array.isArray(k)?k.includes({...o,...i}[y]):{...o,...i}[y]===k})?[...c,d,h]:c},[]);return ro(e,l,s,r==null?void 0:r.class,r==null?void 0:r.className)};var[nr,cp]=wn("Tooltip",[pa]),or=pa(),Ia="TooltipProvider",rc=700,on="tooltip.open",[nc,Cn]=nr(Ia),La=e=>{const{__scopeTooltip:t,delayDuration:r=rc,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:o}=e,[l,i]=p.useState(!0),s=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),g.jsx(nc,{scope:t,isOpenDelayed:l,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),i(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(u=>{s.current=u},[]),disableHoverableContent:a,children:o})};La.displayName=Ia;var ar="Tooltip",[oc,sr]=nr(ar),Pa=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:l,delayDuration:i}=e,s=Cn(ar,e.__scopeTooltip),c=or(t),[u,d]=p.useState(null),h=ft(),f=p.useRef(0),b=l??s.disableHoverableContent,y=i??s.delayDuration,k=p.useRef(!1),[I=!1,E]=ma({prop:n,defaultProp:a,onChange:m=>{m?(s.onOpen(),document.dispatchEvent(new CustomEvent(on))):s.onClose(),o==null||o(m)}}),j=p.useMemo(()=>I?k.current?"delayed-open":"instant-open":"closed",[I]),A=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,k.current=!1,E(!0)},[E]),N=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,E(!1)},[E]),z=p.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{k.current=!0,E(!0),f.current=0},y)},[y,E]);return p.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),g.jsx(Ri,{...c,children:g.jsx(oc,{scope:t,contentId:h,open:I,stateAttribute:j,trigger:u,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{s.isOpenDelayed?z():A()},[s.isOpenDelayed,z,A]),onTriggerLeave:p.useCallback(()=>{b?N():(window.clearTimeout(f.current),f.current=0)},[N,b]),onOpen:A,onClose:N,disableHoverableContent:b,children:r})})};Pa.displayName=ar;var an="TooltipTrigger",za=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=sr(an,r),o=Cn(an,r),l=or(r),i=p.useRef(null),s=Xe(t,i,a.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),d=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(Ai,{asChild:!0,...l,children:g.jsx(Ee.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:s,onPointerMove:Ce(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ce(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:Ce(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ce(e.onFocus,()=>{c.current||a.onOpen()}),onBlur:Ce(e.onBlur,a.onClose),onClick:Ce(e.onClick,a.onClose)})})});za.displayName=an;var ac="TooltipPortal",[up,sc]=nr(ac,{forceMount:void 0}),wt="TooltipContent",Da=p.forwardRef((e,t)=>{const r=sc(wt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...o}=e,l=sr(wt,e.__scopeTooltip);return g.jsx(St,{present:n||l.open,children:l.disableHoverableContent?g.jsx(Oa,{side:a,...o,ref:t}):g.jsx(ic,{side:a,...o,ref:t})})}),ic=p.forwardRef((e,t)=>{const r=sr(wt,e.__scopeTooltip),n=Cn(wt,e.__scopeTooltip),a=p.useRef(null),o=Xe(t,a),[l,i]=p.useState(null),{trigger:s,onClose:c}=r,u=a.current,{onPointerInTransitChange:d}=n,h=p.useCallback(()=>{i(null),d(!1)},[d]),f=p.useCallback((b,y)=>{const k=b.currentTarget,I={x:b.clientX,y:b.clientY},E=dc(I,k.getBoundingClientRect()),j=fc(I,E),A=hc(y.getBoundingClientRect()),N=pc([...j,...A]);i(N),d(!0)},[d]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(s&&u){const b=k=>f(k,u),y=k=>f(k,s);return s.addEventListener("pointerleave",b),u.addEventListener("pointerleave",y),()=>{s.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",y)}}},[s,u,f,h]),p.useEffect(()=>{if(l){const b=y=>{const k=y.target,I={x:y.clientX,y:y.clientY},E=(s==null?void 0:s.contains(k))||(u==null?void 0:u.contains(k)),j=!gc(I,l);E?h():j&&(h(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[s,u,l,c,h]),g.jsx(Oa,{...e,ref:o})}),[lc,cc]=nr(ar,{isInside:!1}),Oa=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...i}=e,s=sr(wt,r),c=or(r),{onClose:u}=s;return p.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),p.useEffect(()=>{if(s.trigger){const d=h=>{const f=h.target;f!=null&&f.contains(s.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,u]),g.jsx(Ei,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:g.jsxs(Ci,{"data-state":s.stateAttribute,...c,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(ki,{children:n}),g.jsx(lc,{scope:r,isInside:!0,children:g.jsx(Ti,{id:s.contentId,role:"tooltip",children:a||n})})]})})});Da.displayName=wt;var Ga="TooltipArrow",uc=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=or(r);return cc(Ga,r).isInside?null:g.jsx(ji,{...a,...n,ref:t})});uc.displayName=Ga;function dc(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,a,o)){case o:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function fc(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function hc(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function gc(e,t){const{x:r,y:n}=e;let a=!1;for(let o=0,l=t.length-1;on!=u>n&&r<(c-i)*(n-s)/(u-s)+i&&(a=!a)}return a}function pc(e){const t=e.slice();return t.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),mc(t)}function mc(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const o=r[r.length-1],l=r[r.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var vc=La,yc=Pa,bc=za,Fa=Da;const Ma=vc,$a=yc,Ha=bc,wc=e=>typeof e!="string"?e:g.jsx("div",{className:"relative top-0 pt-1 whitespace-pre-wrap break-words",children:e}),kn=p.forwardRef(({className:e,side:t="left",align:r="start",children:n,...a},o)=>{const l=p.useRef(null);return p.useEffect(()=>{l.current&&(l.current.scrollTop=0)},[n]),g.jsx(Fa,{ref:o,side:t,align:r,className:fe("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-[60vh] overflow-y-auto whitespace-pre-wrap break-words rounded-md border px-3 py-2 text-sm shadow-md z-60",e),...a,children:typeof n=="string"?wc(n):n})});kn.displayName=Fa.displayName;const no=tc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-8"}},defaultVariants:{variant:"default",size:"default"}}),be=p.forwardRef(({className:e,variant:t,tooltip:r,size:n,side:a="right",asChild:o=!1,...l},i)=>{const s=o?Ni:"button";return r?g.jsx(Ma,{children:g.jsxs($a,{children:[g.jsx(Ha,{asChild:!0,children:g.jsx(s,{className:fe(no({variant:t,size:n,className:e}),"cursor-pointer"),ref:i,...l})}),g.jsx(kn,{side:a,children:r})]})}):g.jsx(s,{className:fe(no({variant:t,size:n,className:e}),"cursor-pointer"),ref:i,...l})});be.displayName="Button";const Wt=p.forwardRef(({className:e,type:t,...r},n)=>g.jsx("input",{type:t,className:fe("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&::-webkit-inner-spin-button]:opacity-50 [&::-webkit-outer-spin-button]:opacity-50",e),ref:n,...r}));Wt.displayName="Input";/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ba=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var Sc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _c=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:l,...i},s)=>p.createElement("svg",{ref:s,...Sc,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ba("lucide",a),...i},[...l.map(([c,u])=>p.createElement(c,u)),...Array.isArray(o)?o:[o]]));/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const le=(e,t)=>{const r=p.forwardRef(({className:n,...a},o)=>p.createElement(_c,{ref:o,iconNode:t,className:Ba(`lucide-${xc(e)}`,n),...a}));return r.displayName=`${e}`,r};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ec=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],dp=le("Activity",Ec);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cc=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],fp=le("AlignCenter",Cc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kc=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],hp=le("AlignLeft",kc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tc=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],gp=le("AlignRight",Tc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rc=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],pp=le("ArrowDown",Rc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ac=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],mp=le("ArrowUp",Ac);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jc=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Nc=le("BookOpen",jc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ic=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Va=le("Check",Ic);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],vp=le("ChevronDown",Lc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pc=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],yp=le("ChevronUp",Pc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zc=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Dc=le("ChevronsUpDown",zc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Oc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bp=le("CircleAlert",Oc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gc=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],wp=le("Copy",Gc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fc=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]],xp=le("Eraser",Fc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mc=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Sp=le("FileText",Mc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $c=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],_p=le("Files",$c);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hc=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Ep=le("Filter",Hc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bc=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],Vc=le("Fullscreen",Bc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Uc=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],qc=le("GitBranchPlus",Uc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wc=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Cp=le("Github",Wc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xc=[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],Yc=le("Grip",Xc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ua=le("LoaderCircle",Kc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qc=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],kp=le("Loader",Qc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jc=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Tp=le("LogOut",Jc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zc=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],eu=le("Maximize",Zc);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tu=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],ru=le("Minimize",tu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nu=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],Rp=le("Palette",nu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ou=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],au=le("Pause",ou);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const su=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],iu=le("Pencil",su);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lu=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],cu=le("Play",lu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uu=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],du=le("RefreshCw",uu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fu=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],hu=le("RotateCcw",fu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gu=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],pu=le("RotateCw",gu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mu=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],vu=le("Scissors",mu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yu=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],bu=le("Search",yu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wu=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Ap=le("Send",wu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xu=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Su=le("Settings",xu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _u=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],jp=le("Trash",_u);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Eu=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Np=le("TriangleAlert",Eu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cu=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],qa=le("Undo2",Cu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ku=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Ip=le("Upload",ku);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tu=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ru=le("X",Tu);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Au=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Lp=le("Zap",Au);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ju=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Nu=le("ZoomIn",ju);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Iu=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Lu=le("ZoomOut",Iu),Pu=wa,Pp=Li,zu=va,Wa=p.forwardRef(({className:e,...t},r)=>g.jsx(xn,{ref:r,className:fe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/30",e),...t}));Wa.displayName=xn.displayName;const Xa=p.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(zu,{children:[g.jsx(Wa,{}),g.jsxs(Sn,{ref:n,className:fe("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...r,children:[t,g.jsxs(Ii,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[g.jsx(Ru,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xa.displayName=Sn.displayName;const Ya=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ya.displayName="DialogHeader";const Ka=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ka.displayName="DialogFooter";const Qa=p.forwardRef(({className:e,...t},r)=>g.jsx(ya,{ref:r,className:fe("text-lg leading-none font-semibold tracking-tight",e),...t}));Qa.displayName=ya.displayName;const Ja=p.forwardRef(({className:e,...t},r)=>g.jsx(ba,{ref:r,className:fe("text-muted-foreground text-sm",e),...t}));Ja.displayName=ba.displayName;const Tn=zi,Rn=Di,ir=p.forwardRef(({className:e,align:t="center",sideOffset:r=4,collisionPadding:n,sticky:a,avoidCollisions:o=!1,...l},i)=>g.jsx(Pi,{children:g.jsx(xa,{ref:i,align:t,sideOffset:r,collisionPadding:n,sticky:a,avoidCollisions:o,className:fe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 rounded-md border p-4 shadow-md outline-none",e),...l})}));ir.displayName=xa.displayName;var Du=` -precision mediump float; - -varying vec4 v_color; -varying float v_border; - -const float radius = 0.5; -const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); - -void main(void) { - vec2 m = gl_PointCoord - vec2(0.5, 0.5); - float dist = radius - length(m); - - // No antialiasing for picking mode: - #ifdef PICKING_MODE - if (dist > v_border) - gl_FragColor = v_color; - else - gl_FragColor = transparent; - - #else - float t = 0.0; - if (dist > v_border) - t = 1.0; - else if (dist > 0.0) - t = dist / v_border; - - gl_FragColor = mix(transparent, v_color, t); - #endif -} -`,Ou=Du,Gu=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_position; -attribute float a_size; - -uniform float u_sizeRatio; -uniform float u_pixelRatio; -uniform mat3 u_matrix; - -varying vec4 v_color; -varying float v_border; - -const float bias = 255.0 / 254.0; - -void main() { - gl_Position = vec4( - (u_matrix * vec3(a_position, 1)).xy, - 0, - 1 - ); - - // Multiply the point size twice: - // - x SCALING_RATIO to correct the canvas scaling - // - x 2 to correct the formulae - gl_PointSize = a_size / u_sizeRatio * u_pixelRatio * 2.0; - - v_border = (0.5 / a_size) * u_sizeRatio; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,Fu=Gu,Za=WebGLRenderingContext,oo=Za.UNSIGNED_BYTE,ao=Za.FLOAT,Mu=["u_sizeRatio","u_pixelRatio","u_matrix"],$u=function(e){function t(){return la(this,t),ca(this,t,arguments)}return aa(t,e),sa(t,[{key:"getDefinition",value:function(){return{VERTICES:1,VERTEX_SHADER_SOURCE:Fu,FRAGMENT_SHADER_SOURCE:Ou,METHOD:WebGLRenderingContext.POINTS,UNIFORMS:Mu,ATTRIBUTES:[{name:"a_position",size:2,type:ao},{name:"a_size",size:1,type:ao},{name:"a_color",size:4,type:oo,normalized:!0},{name:"a_id",size:4,type:oo,normalized:!0}]}}},{key:"processVisibleItem",value:function(n,a,o){var l=this.array;l[a++]=o.x,l[a++]=o.y,l[a++]=o.size,l[a++]=er(o.color),l[a++]=n}},{key:"setUniforms",value:function(n,a){var o=n.sizeRatio,l=n.pixelRatio,i=n.matrix,s=a.gl,c=a.uniformLocations,u=c.u_sizeRatio,d=c.u_pixelRatio,h=c.u_matrix;s.uniform1f(d,l),s.uniform1f(u,o),s.uniformMatrix3fv(h,!1,i)}}])}(ia),Hu=` -attribute vec4 a_id; -attribute vec4 a_color; -attribute vec2 a_normal; -attribute float a_normalCoef; -attribute vec2 a_positionStart; -attribute vec2 a_positionEnd; -attribute float a_positionCoef; -attribute float a_sourceRadius; -attribute float a_targetRadius; -attribute float a_sourceRadiusCoef; -attribute float a_targetRadiusCoef; - -uniform mat3 u_matrix; -uniform float u_zoomRatio; -uniform float u_sizeRatio; -uniform float u_pixelRatio; -uniform float u_correctionRatio; -uniform float u_minEdgeThickness; -uniform float u_lengthToThicknessRatio; -uniform float u_feather; - -varying vec4 v_color; -varying vec2 v_normal; -varying float v_thickness; -varying float v_feather; - -const float bias = 255.0 / 254.0; - -void main() { - float minThickness = u_minEdgeThickness; - - vec2 normal = a_normal * a_normalCoef; - vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef; - - float normalLength = length(normal); - vec2 unitNormal = normal / normalLength; - - // These first computations are taken from edge.vert.glsl. Please read it to - // get better comments on what's happening: - float pixelsThickness = max(normalLength, minThickness * u_sizeRatio); - float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio; - - // Here, we move the point to leave space for the arrow heads: - // Source arrow head - float sourceRadius = a_sourceRadius * a_sourceRadiusCoef; - float sourceDirection = sign(sourceRadius); - float webGLSourceRadius = sourceDirection * sourceRadius * 2.0 * u_correctionRatio / u_sizeRatio; - float webGLSourceArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; - vec2 sourceCompensationVector = - vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x) - * (webGLSourceRadius + webGLSourceArrowHeadLength); - - // Target arrow head - float targetRadius = a_targetRadius * a_targetRadiusCoef; - float targetDirection = sign(targetRadius); - float webGLTargetRadius = targetDirection * targetRadius * 2.0 * u_correctionRatio / u_sizeRatio; - float webGLTargetArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0; - vec2 targetCompensationVector = - vec2(-targetDirection * unitNormal.y, targetDirection * unitNormal.x) - * (webGLTargetRadius + webGLTargetArrowHeadLength); - - // Here is the proper position of the vertex - gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + sourceCompensationVector + targetCompensationVector, 1)).xy, 0, 1); - - v_thickness = webGLThickness / u_zoomRatio; - - v_normal = unitNormal; - - v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0; - - #ifdef PICKING_MODE - // For picking mode, we use the ID as the color: - v_color = a_id; - #else - // For normal mode, we use the color: - v_color = a_color; - #endif - - v_color.a *= bias; -} -`,Bu=Hu,es=WebGLRenderingContext,so=es.UNSIGNED_BYTE,Ue=es.FLOAT,Vu=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],Uu={lengthToThicknessRatio:bn.lengthToThicknessRatio};function ts(e){var t=Ut(Ut({},Uu),{});return function(r){function n(){return la(this,n),ca(this,n,arguments)}return aa(n,r),sa(n,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Bu,FRAGMENT_SHADER_SOURCE:mi,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Vu,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Ue},{name:"a_positionEnd",size:2,type:Ue},{name:"a_normal",size:2,type:Ue},{name:"a_color",size:4,type:so,normalized:!0},{name:"a_id",size:4,type:so,normalized:!0},{name:"a_sourceRadius",size:1,type:Ue},{name:"a_targetRadius",size:1,type:Ue}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Ue},{name:"a_normalCoef",size:1,type:Ue},{name:"a_sourceRadiusCoef",size:1,type:Ue},{name:"a_targetRadiusCoef",size:1,type:Ue}],CONSTANT_DATA:[[0,1,-1,0],[0,-1,1,0],[1,1,0,1],[1,1,0,1],[0,-1,1,0],[1,-1,0,-1]]}}},{key:"processVisibleItem",value:function(o,l,i,s,c){var u=c.size||1,d=i.x,h=i.y,f=s.x,b=s.y,y=er(c.color),k=f-d,I=b-h,E=i.size||1,j=s.size||1,A=k*k+I*I,N=0,z=0;A&&(A=1/Math.sqrt(A),N=-I*A*u,z=k*A*u);var m=this.array;m[l++]=d,m[l++]=h,m[l++]=f,m[l++]=b,m[l++]=N,m[l++]=z,m[l++]=y,m[l++]=o,m[l++]=E,m[l++]=j}},{key:"setUniforms",value:function(o,l){var i=l.gl,s=l.uniformLocations,c=s.u_matrix,u=s.u_zoomRatio,d=s.u_feather,h=s.u_pixelRatio,f=s.u_correctionRatio,b=s.u_sizeRatio,y=s.u_minEdgeThickness,k=s.u_lengthToThicknessRatio;i.uniformMatrix3fv(c,!1,o.matrix),i.uniform1f(u,o.zoomRatio),i.uniform1f(b,o.sizeRatio),i.uniform1f(f,o.correctionRatio),i.uniform1f(h,o.pixelRatio),i.uniform1f(d,o.antiAliasingFeather),i.uniform1f(y,o.minEdgeThickness),i.uniform1f(k,t.lengthToThicknessRatio)}}])}(ua)}ts();function qu(e){return vi([ts(),Un(e),Un(Ut(Ut({},e),{},{extremity:"source"}))])}qu();function Wu(e){if(Array.isArray(e))return e}function Xu(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,l,i=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(s=(n=o.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(u){c=!0,a=u}finally{try{if(!s&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw a}}return i}}function sn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r v_radius) - gl_FragColor = transparent; - else { - gl_FragColor = v_color; - gl_FragColor.a *= bias; - } - #else - // Sizes: -`).concat(t.flatMap(function(a,o){var l=a.size;if("fill"in l)return[];l=l;var i="attribute"in l?"v_borderSize_".concat(o+1):qn(l.value),s=(l.mode||id)==="pixels"?"u_correctionRatio":"v_radius";return[" float borderSize_".concat(o+1," = ").concat(s," * ").concat(i,";")]}).join(` -`),` - // Now, let's split the remaining space between "fill" borders: - float fillBorderSize = (v_radius - (`).concat(t.flatMap(function(a,o){var l=a.size;return"fill"in l?[]:["borderSize_".concat(o+1)]}).join(" + "),") ) / ").concat(r,`; -`).concat(t.flatMap(function(a,o){var l=a.size;return"fill"in l?[" float borderSize_".concat(o+1," = fillBorderSize;")]:[]}).join(` -`),` - - // Finally, normalize all border sizes, to start from the full size and to end with the smallest: - float adjustedBorderSize_0 = v_radius; -`).concat(t.map(function(a,o){return" float adjustedBorderSize_".concat(o+1," = adjustedBorderSize_").concat(o," - borderSize_").concat(o+1,";")}).join(` -`),` - - // Colors: - vec4 borderColor_0 = transparent; -`).concat(t.map(function(a,o){var l=a.color,i=[];return"attribute"in l?i.push(" vec4 borderColor_".concat(o+1," = v_borderColor_").concat(o+1,";")):"transparent"in l?i.push(" vec4 borderColor_".concat(o+1," = vec4(0.0, 0.0, 0.0, 0.0);")):i.push(" vec4 borderColor_".concat(o+1," = u_borderColor_").concat(o+1,";")),i.push(" borderColor_".concat(o+1,".a *= bias;")),i.push(" if (borderSize_".concat(o+1," <= 1.0 * u_correctionRatio) { borderColor_").concat(o+1," = borderColor_").concat(o,"; }")),i.join(` -`)}).join(` -`),` - if (dist > adjustedBorderSize_0) { - gl_FragColor = borderColor_0; - } else `).concat(t.map(function(a,o){return"if (dist > adjustedBorderSize_".concat(o,` - aaBorder) { - gl_FragColor = mix(borderColor_`).concat(o+1,", borderColor_").concat(o,", (dist - adjustedBorderSize_").concat(o,` + aaBorder) / aaBorder); - } else if (dist > adjustedBorderSize_`).concat(o+1,`) { - gl_FragColor = borderColor_`).concat(o+1,`; - } else `)}).join(""),` { /* Nothing to add here */ } - #endif -} -`);return n}function dd(e){var t=e.borders,r=` -attribute vec2 a_position; -attribute float a_size; -attribute float a_angle; - -uniform mat3 u_matrix; -uniform float u_sizeRatio; -uniform float u_correctionRatio; - -varying vec2 v_diffVector; -varying float v_radius; - -#ifdef PICKING_MODE -attribute vec4 a_id; -varying vec4 v_color; -#else -`.concat(t.flatMap(function(n,a){var o=n.size;return"attribute"in o?["attribute float a_borderSize_".concat(a+1,";"),"varying float v_borderSize_".concat(a+1,";")]:[]}).join(` -`),` -`).concat(t.flatMap(function(n,a){var o=n.color;return"attribute"in o?["attribute vec4 a_borderColor_".concat(a+1,";"),"varying vec4 v_borderColor_".concat(a+1,";")]:[]}).join(` -`),` -#endif - -const float bias = 255.0 / 254.0; -const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); - -void main() { - float size = a_size * u_correctionRatio / u_sizeRatio * 4.0; - vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle)); - vec2 position = a_position + diffVector; - gl_Position = vec4( - (u_matrix * vec3(position, 1)).xy, - 0, - 1 - ); - - v_radius = size / 2.0; - v_diffVector = diffVector; - - #ifdef PICKING_MODE - v_color = a_id; - #else -`).concat(t.flatMap(function(n,a){var o=n.size;return"attribute"in o?[" v_borderSize_".concat(a+1," = a_borderSize_").concat(a+1,";")]:[]}).join(` -`),` -`).concat(t.flatMap(function(n,a){var o=n.color;return"attribute"in o?[" v_borderColor_".concat(a+1," = a_borderColor_").concat(a+1,";")]:[]}).join(` -`),` - #endif -} -`);return r}var as=WebGLRenderingContext,co=as.UNSIGNED_BYTE,Lt=as.FLOAT;function fd(e){var t,r=lo(lo({},ld),{}),n=r.borders,a=r.drawLabel,o=r.drawHover,l=["u_sizeRatio","u_correctionRatio","u_matrix"].concat(gr(n.flatMap(function(i,s){var c=i.color;return"value"in c?["u_borderColor_".concat(s+1)]:[]})));return t=function(i){nd(s,i);function s(){var c;Qu(this,s);for(var u=arguments.length,d=new Array(u),h=0;he.length)&&(t=e.length);for(var r=0,n=Array(t);rP){var V="…";for(y=y+V,v=o.measureText(y).width;v>P&&y.length>1;)y=y.slice(0,-2)+V,v=o.measureText(y).width;if(y.length<4)return}for(var $={},J=0,X=y.length;J{const r=Be(),{gotoNode:n}=da();return p.useEffect(()=>{const a=r.getGraph();if(t){if(e&&a.hasNode(e))try{a.setNodeAttribute(e,"highlighted",!0),n(e)}catch(o){console.error("Error focusing on node:",o)}else r.setCustomBBox(null),r.getCamera().animate({x:.5,y:.5,ratio:1},{duration:0});te.getState().setMoveToSelectedNode(!1)}else if(e&&a.hasNode(e))try{a.setNodeAttribute(e,"highlighted",!0)}catch(o){console.error("Error highlighting node:",o)}return()=>{if(e&&a.hasNode(e))try{a.setNodeAttribute(e,"highlighted",!1)}catch(o){console.error("Error cleaning up node highlight:",o)}}},[e,t,r,n]),null};function _t(e,t){const r=Be(),n=p.useRef(t);return fa(n.current,t)||(n.current=t),{positions:p.useCallback(()=>n.current?e(r.getGraph(),n.current):{},[r,n,e]),assign:p.useCallback(()=>{n.current&&e.assign(r.getGraph(),n.current)},[r,n,e])}}function jn(e,t){const r=Be(),[n,a]=p.useState(!1),[o,l]=p.useState(null),i=p.useRef(t);return fa(i.current,t)||(i.current=t),p.useEffect(()=>{a(!1);let s=null;return i.current&&(s=new e(r.getGraph(),i.current)),l(s),()=>{s!==null&&s.kill()}},[r,i,l,a,e]),{stop:p.useCallback(()=>{o&&(o.stop(),a(!1))},[o,a]),start:p.useCallback(()=>{o&&(o.start(),a(!0))},[o,a]),kill:p.useCallback(()=>{o&&o.kill(),a(!1)},[o,a]),isRunning:n}}var mr,ho;function At(){if(ho)return mr;ho=1;function e(r){return!r||typeof r!="object"||typeof r=="function"||Array.isArray(r)||r instanceof Set||r instanceof Map||r instanceof RegExp||r instanceof Date}function t(r,n){r=r||{};var a={};for(var o in n){var l=r[o],i=n[o];if(!e(i)){a[o]=t(l,i);continue}l===void 0?a[o]=i:a[o]=l}return a}return mr=t,mr}var vr,go;function Ld(){if(go)return vr;go=1;function e(r){return function(n,a){return n+Math.floor(r()*(a-n+1))}}var t=e(Math.random);return t.createRandom=e,vr=t,vr}var yr,po;function Pd(){if(po)return yr;po=1;var e=Ld().createRandom;function t(n){var a=e(n);return function(o){for(var l=o.length,i=l-1,s=-1;++s0},a.prototype.addChild=function(m,_){this.children[m]=_,++this.countChildren},a.prototype.getChild=function(m){if(!this.children.hasOwnProperty(m)){var _=new a;this.children[m]=_,++this.countChildren}return this.children[m]},a.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var m=this;for(var _ in m.children){var x=m.children[_];x.x+=m.x,x.y+=m.y,x.applyPositionToChildren()}}};function o(m,_,x){for(var T in _.children){var R=_.children[T];R.hasChildren()?o(m,R,x):x[R.id]={x:R.x,y:R.y}}}function l(m,_){var x=m.r-_.r,T=_.x-m.x,R=_.y-m.y;return x<0||x*x0&&x*x>T*T+R*R}function s(m,_){for(var x=0;x<_.length;++x)if(!i(m,_[x]))return!1;return!0}function c(m){return new a(null,m.x,m.y,m.r)}function u(m,_){var x=m.x,T=m.y,R=m.r,O=_.x,w=_.y,H=_.r,K=O-x,D=w-T,C=H-R,S=Math.sqrt(K*K+D*D);return new a(null,(x+O+K/S*C)/2,(T+w+D/S*C)/2,(S+R+H)/2)}function d(m,_,x){var T=m.x,R=m.y,O=m.r,w=_.x,H=_.y,K=_.r,D=x.x,C=x.y,S=x.r,B=T-w,ae=T-D,M=R-H,v=R-C,P=K-O,V=S-O,$=T*T+R*R-O*O,J=$-w*w-H*H+K*K,X=$-D*D-C*C+S*S,Y=ae*M-B*v,ie=(M*X-v*J)/(Y*2)-T,ne=(v*P-M*V)/Y,se=(ae*J-B*X)/(Y*2)-R,F=(B*V-ae*P)/Y,Q=ne*ne+F*F-1,q=2*(O+ie*ne+se*F),U=ie*ie+se*se-O*O,L=-(Q?(q+Math.sqrt(q*q-4*Q*U))/(2*Q):U/q);return new a(null,T+ie+ne*L,R+se+F*L,L)}function h(m){switch(m.length){case 1:return c(m[0]);case 2:return u(m[0],m[1]);case 3:return d(m[0],m[1],m[2]);default:throw new Error("graphology-layout/circlepack: Invalid basis length "+m.length)}}function f(m,_){var x,T;if(s(_,m))return[_];for(x=0;xK?(R=(D+K-O)/(2*D),H=Math.sqrt(Math.max(0,K/D-R*R)),x.x=m.x-R*T-H*w,x.y=m.y-R*w+H*T):(R=(D+O-K)/(2*D),H=Math.sqrt(Math.max(0,O/D-R*R)),x.x=_.x+R*T-H*w,x.y=_.y+R*w+H*T)):(x.x=_.x+x.r,x.y=_.y)}function I(m,_){var x=m.r+_.r-1e-6,T=_.x-m.x,R=_.y-m.y;return x>0&&x*x>T*T+R*R}function E(m,_){var x=m.length;if(x===0)return 0;var T,R,O,w,H,K,D,C,S,B;if(T=m[0],T.x=0,T.y=0,x<=1)return T.r;if(R=m[1],T.x=-R.r,R.x=T.r,R.y=0,x<=2)return T.r+R.r;O=m[2],k(R,T,O),T=new a(null,null,null,null,T),R=new a(null,null,null,null,R),O=new a(null,null,null,null,O),T.next=O.previous=R,R.next=T.previous=O,O.next=R.previous=T;e:for(K=3;K"u"?a:c};typeof a=="function"&&(l=a);var i=function(c){return l(c[n])},s=function(){return l(void 0)};return typeof n=="string"?(o.fromAttributes=i,o.fromGraph=function(c,u){return i(c.getNodeAttributes(u))},o.fromEntry=function(c,u){return i(u)}):typeof n=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},o.fromGraph=function(c,u){return l(n(u,c.getNodeAttributes(u)))},o.fromEntry=function(c,u){return l(n(c,u))}):(o.fromAttributes=s,o.fromGraph=s,o.fromEntry=s),o}function r(n,a){var o={},l=function(c){return typeof c>"u"?a:c};typeof a=="function"&&(l=a);var i=function(c){return l(c[n])},s=function(){return l(void 0)};return typeof n=="string"?(o.fromAttributes=i,o.fromGraph=function(c,u){return i(c.getEdgeAttributes(u))},o.fromEntry=function(c,u){return i(u)},o.fromPartialEntry=o.fromEntry,o.fromMinimalEntry=o.fromEntry):typeof n=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},o.fromGraph=function(c,u){var d=c.extremities(u);return l(n(u,c.getEdgeAttributes(u),d[0],d[1],c.getNodeAttributes(d[0]),c.getNodeAttributes(d[1]),c.isUndirected(u)))},o.fromEntry=function(c,u,d,h,f,b,y){return l(n(c,u,d,h,f,b,y))},o.fromPartialEntry=function(c,u,d,h){return l(n(c,u,d,h))},o.fromMinimalEntry=function(c,u){return l(n(c,u))}):(o.fromAttributes=s,o.fromGraph=s,o.fromEntry=s,o.fromMinimalEntry=s),o}return kt.createNodeValueGetter=t,kt.createEdgeValueGetter=r,kt.createEdgeWeightGetter=function(n){return r(n,e)},kt}var xr,bo;function hs(){if(bo)return xr;bo=1;const{createNodeValueGetter:e,createEdgeValueGetter:t}=Nn();return xr=function(n,a,o){const{nodeXAttribute:l,nodeYAttribute:i}=o,{attraction:s,repulsion:c,gravity:u,inertia:d,maxMove:h}=o.settings;let{shouldSkipNode:f,shouldSkipEdge:b,isNodeFixed:y}=o;y=e(y),f=e(f,!1),b=t(b,!1);const k=n.filterNodes((j,A)=>!f.fromEntry(j,A)),I=k.length;for(let j=0;j{if(N===z||f.fromEntry(N,m)||f.fromEntry(z,_)||b.fromEntry(j,A,N,z,m,_,x))return;const T=a[N],R=a[z],O=R.x-T.x,w=R.y-T.y,H=Math.sqrt(O*O+w*w)||1,K=s*H*O,D=s*H*w;T.dx+=K,T.dy+=D,R.dx-=K,R.dy-=D}),u)for(let j=0;jh&&(N.dx*=h/z,N.dy*=h/z),y.fromGraph(n,A)?N.fixed=!0:(N.x+=N.dx,N.y+=N.dy,N.fixed=!1)}return{converged:E}},xr}var Pt={},wo;function gs(){return wo||(wo=1,Pt.assignLayoutChanges=function(e,t,r){const{nodeXAttribute:n,nodeYAttribute:a}=r;e.updateEachNodeAttributes((o,l)=>{const i=t[o];return!i||i.fixed||(l[n]=i.x,l[a]=i.y),l},{attributes:["x","y"]})},Pt.collectLayoutChanges=function(e){const t={};for(const r in e){const n=e[r];t[r]={x:n.x,y:n.y}}return t}),Pt}var Sr,xo;function ps(){return xo||(xo=1,Sr={nodeXAttribute:"x",nodeYAttribute:"y",isNodeFixed:"fixed",shouldSkipNode:null,shouldSkipEdge:null,settings:{attraction:5e-4,repulsion:.1,gravity:1e-4,inertia:.6,maxMove:200}}),Sr}var _r,So;function Bd(){if(So)return _r;So=1;const e=We(),t=At(),r=hs(),n=gs(),a=ps();function o(i,s,c){if(!e(s))throw new Error("graphology-layout-force: the given graph is not a valid graphology instance.");typeof c=="number"?c={maxIterations:c}:c=c||{};const u=c.maxIterations;if(c=t(c,a),typeof u!="number"||u<=0)throw new Error("graphology-layout-force: you should provide a positive number of maximum iterations.");const d={};let h=null,f;for(f=0;fthis.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},Er=o,Er}var Wd=qd();const Xd=He(Wd);function Yd(e={maxIterations:100}){return _t(Ud,e)}function Kd(e={}){return jn(Xd,e)}var Cr,Eo;function Qd(){if(Eo)return Cr;Eo=1;var e=0,t=1,r=2,n=3,a=4,o=5,l=6,i=7,s=8,c=9,u=0,d=1,h=2,f=0,b=1,y=2,k=3,I=4,E=5,j=6,A=7,N=8,z=3,m=10,_=3,x=9,T=10;return Cr=function(O,w,H){var K,D,C,S,B,ae,M,v,P,V,$=w.length,J=H.length,X=O.adjustSizes,Y=O.barnesHutTheta*O.barnesHutTheta,ie,ne,se,F,Q,q,U,L=[];for(C=0;C<$;C+=m)w[C+a]=w[C+r],w[C+o]=w[C+n],w[C+r]=0,w[C+n]=0;if(O.outboundAttractionDistribution){for(ie=0,C=0;C<$;C+=m)ie+=w[C+l];ie/=$/m}if(O.barnesHutOptimize){var oe=1/0,ue=-1/0,re=1/0,ee=-1/0,G,ge,pe;for(C=0;C<$;C+=m)oe=Math.min(oe,w[C+e]),ue=Math.max(ue,w[C+e]),re=Math.min(re,w[C+t]),ee=Math.max(ee,w[C+t]);var ye=ue-oe,we=ee-re;for(ye>we?(re-=(ye-we)/2,ee=re+ye):(oe-=(we-ye)/2,ue=oe+we),L[0+f]=-1,L[0+b]=(oe+ue)/2,L[0+y]=(re+ee)/2,L[0+k]=Math.max(ue-oe,ee-re),L[0+I]=-1,L[0+E]=-1,L[0+j]=0,L[0+A]=0,L[0+N]=0,K=1,C=0;C<$;C+=m)for(D=0,pe=z;;)if(L[D+E]>=0){w[C+e]=0)if(q=Math.pow(w[C+e]-L[D+A],2)+Math.pow(w[C+t]-L[D+N],2),V=L[D+k],4*V*V/q0?(U=ne*w[C+l]*L[D+j]/q,w[C+r]+=se*U,w[C+n]+=F*U):q<0&&(U=-ne*w[C+l]*L[D+j]/Math.sqrt(q),w[C+r]+=se*U,w[C+n]+=F*U):q>0&&(U=ne*w[C+l]*L[D+j]/q,w[C+r]+=se*U,w[C+n]+=F*U),D=L[D+I],D<0)break;continue}else{D=L[D+E];continue}else{if(ae=L[D+f],ae>=0&&ae!==C&&(se=w[C+e]-w[ae+e],F=w[C+t]-w[ae+t],q=se*se+F*F,X===!0?q>0?(U=ne*w[C+l]*w[ae+l]/q,w[C+r]+=se*U,w[C+n]+=F*U):q<0&&(U=-ne*w[C+l]*w[ae+l]/Math.sqrt(q),w[C+r]+=se*U,w[C+n]+=F*U):q>0&&(U=ne*w[C+l]*w[ae+l]/q,w[C+r]+=se*U,w[C+n]+=F*U)),D=L[D+I],D<0)break;continue}else for(ne=O.scalingRatio,S=0;S<$;S+=m)for(B=0;B0?(U=ne*w[S+l]*w[B+l]/q/q,w[S+r]+=se*U,w[S+n]+=F*U,w[B+r]-=se*U,w[B+n]-=F*U):q<0&&(U=100*ne*w[S+l]*w[B+l],w[S+r]+=se*U,w[S+n]+=F*U,w[B+r]-=se*U,w[B+n]-=F*U)):(q=Math.sqrt(se*se+F*F),q>0&&(U=ne*w[S+l]*w[B+l]/q/q,w[S+r]+=se*U,w[S+n]+=F*U,w[B+r]-=se*U,w[B+n]-=F*U));for(P=O.gravity/O.scalingRatio,ne=O.scalingRatio,C=0;C<$;C+=m)U=0,se=w[C+e],F=w[C+t],q=Math.sqrt(Math.pow(se,2)+Math.pow(F,2)),O.strongGravityMode?q>0&&(U=ne*w[C+l]*P):q>0&&(U=ne*w[C+l]*P/q),w[C+r]-=se*U,w[C+n]-=F*U;for(ne=1*(O.outboundAttractionDistribution?ie:1),M=0;M0&&(U=-ne*Q*Math.log(1+q)/q/w[S+l]):q>0&&(U=-ne*Q*Math.log(1+q)/q):O.outboundAttractionDistribution?q>0&&(U=-ne*Q/w[S+l]):q>0&&(U=-ne*Q)):(q=Math.sqrt(Math.pow(se,2)+Math.pow(F,2)),O.linLogMode?O.outboundAttractionDistribution?q>0&&(U=-ne*Q*Math.log(1+q)/q/w[S+l]):q>0&&(U=-ne*Q*Math.log(1+q)/q):O.outboundAttractionDistribution?(q=1,U=-ne*Q/w[S+l]):(q=1,U=-ne*Q)),q>0&&(w[S+r]+=se*U,w[S+n]+=F*U,w[B+r]-=se*U,w[B+n]-=F*U);var de,me,Ne,ke,Te,Pe;if(X===!0)for(C=0;C<$;C+=m)w[C+c]!==1&&(de=Math.sqrt(Math.pow(w[C+r],2)+Math.pow(w[C+n],2)),de>T&&(w[C+r]=w[C+r]*T/de,w[C+n]=w[C+n]*T/de),me=w[C+l]*Math.sqrt((w[C+a]-w[C+r])*(w[C+a]-w[C+r])+(w[C+o]-w[C+n])*(w[C+o]-w[C+n])),Ne=Math.sqrt((w[C+a]+w[C+r])*(w[C+a]+w[C+r])+(w[C+o]+w[C+n])*(w[C+o]+w[C+n]))/2,ke=.1*Math.log(1+Ne)/(1+Math.sqrt(me)),Te=w[C+e]+w[C+r]*(ke/O.slowDown),w[C+e]=Te,Pe=w[C+t]+w[C+n]*(ke/O.slowDown),w[C+t]=Pe);else for(C=0;C<$;C+=m)w[C+c]!==1&&(me=w[C+l]*Math.sqrt((w[C+a]-w[C+r])*(w[C+a]-w[C+r])+(w[C+o]-w[C+n])*(w[C+o]-w[C+n])),Ne=Math.sqrt((w[C+a]+w[C+r])*(w[C+a]+w[C+r])+(w[C+o]+w[C+n])*(w[C+o]+w[C+n]))/2,ke=w[C+i]*Math.log(1+Ne)/(1+Math.sqrt(me)),w[C+i]=Math.min(1,Math.sqrt(ke*(Math.pow(w[C+r],2)+Math.pow(w[C+n],2))/(1+Math.sqrt(me)))),Te=w[C+e]+w[C+r]*(ke/O.slowDown),w[C+e]=Te,Pe=w[C+t]+w[C+n]*(ke/O.slowDown),w[C+t]=Pe);return{}},Cr}var qe={},Co;function ms(){if(Co)return qe;Co=1;var e=10,t=3;return qe.assign=function(r){r=r||{};var n=Array.prototype.slice.call(arguments).slice(1),a,o,l;for(a=0,l=n.length;a=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in r&&typeof r.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in r&&!(typeof r.gravity=="number"&&r.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in r&&!(typeof r.slowDown=="number"||r.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in r&&typeof r.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in r&&!(typeof r.barnesHutTheta=="number"&&r.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},qe.graphToByteArrays=function(r,n){var a=r.order,o=r.size,l={},i,s=new Float32Array(a*e),c=new Float32Array(o*t);return i=0,r.forEachNode(function(u,d){l[u]=i,s[i]=d.x,s[i+1]=d.y,s[i+2]=0,s[i+3]=0,s[i+4]=0,s[i+5]=0,s[i+6]=1,s[i+7]=1,s[i+8]=d.size||1,s[i+9]=d.fixed?1:0,i+=e}),i=0,r.forEachEdge(function(u,d,h,f,b,y,k){var I=l[h],E=l[f],j=n(u,d,h,f,b,y,k);s[I+6]+=j,s[E+6]+=j,c[i]=I,c[i+1]=E,c[i+2]=j,i+=t}),{nodes:s,edges:c}},qe.assignLayoutChanges=function(r,n,a){var o=0;r.updateEachNodeAttributes(function(l,i){return i.x=n[o],i.y=n[o+1],o+=e,a?a(l,i):i})},qe.readGraphPositions=function(r,n){var a=0;r.forEachNode(function(o,l){n[a]=l.x,n[a+1]=l.y,a+=e})},qe.collectLayoutChanges=function(r,n,a){for(var o=r.nodes(),l={},i=0,s=0,c=n.length;i2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(c)}}var i=o.bind(null,!1);return i.assign=o.bind(null,!0),i.inferSettings=l,Tr=i,Tr}var Zd=Jd();const ef=He(Zd);var Rr,Ro;function tf(){return Ro||(Ro=1,Rr=function(){var t,r,n={};(function(){var o=0,l=1,i=2,s=3,c=4,u=5,d=6,h=7,f=8,b=9,y=0,k=1,I=2,E=0,j=1,A=2,N=3,z=4,m=5,_=6,x=7,T=8,R=3,O=10,w=3,H=9,K=10;n.exports=function(C,S,B){var ae,M,v,P,V,$,J,X,Y,ie,ne=S.length,se=B.length,F=C.adjustSizes,Q=C.barnesHutTheta*C.barnesHutTheta,q,U,L,oe,ue,re,ee,G=[];for(v=0;vTe?(ye-=(ke-Te)/2,we=ye+ke):(ge-=(Te-ke)/2,pe=ge+Te),G[0+E]=-1,G[0+j]=(ge+pe)/2,G[0+A]=(ye+we)/2,G[0+N]=Math.max(pe-ge,we-ye),G[0+z]=-1,G[0+m]=-1,G[0+_]=0,G[0+x]=0,G[0+T]=0,ae=1,v=0;v=0){S[v+o]=0)if(re=Math.pow(S[v+o]-G[M+x],2)+Math.pow(S[v+l]-G[M+T],2),ie=G[M+N],4*ie*ie/re0?(ee=U*S[v+d]*G[M+_]/re,S[v+i]+=L*ee,S[v+s]+=oe*ee):re<0&&(ee=-U*S[v+d]*G[M+_]/Math.sqrt(re),S[v+i]+=L*ee,S[v+s]+=oe*ee):re>0&&(ee=U*S[v+d]*G[M+_]/re,S[v+i]+=L*ee,S[v+s]+=oe*ee),M=G[M+z],M<0)break;continue}else{M=G[M+m];continue}else{if($=G[M+E],$>=0&&$!==v&&(L=S[v+o]-S[$+o],oe=S[v+l]-S[$+l],re=L*L+oe*oe,F===!0?re>0?(ee=U*S[v+d]*S[$+d]/re,S[v+i]+=L*ee,S[v+s]+=oe*ee):re<0&&(ee=-U*S[v+d]*S[$+d]/Math.sqrt(re),S[v+i]+=L*ee,S[v+s]+=oe*ee):re>0&&(ee=U*S[v+d]*S[$+d]/re,S[v+i]+=L*ee,S[v+s]+=oe*ee)),M=G[M+z],M<0)break;continue}else for(U=C.scalingRatio,P=0;P0?(ee=U*S[P+d]*S[V+d]/re/re,S[P+i]+=L*ee,S[P+s]+=oe*ee,S[V+i]-=L*ee,S[V+s]-=oe*ee):re<0&&(ee=100*U*S[P+d]*S[V+d],S[P+i]+=L*ee,S[P+s]+=oe*ee,S[V+i]-=L*ee,S[V+s]-=oe*ee)):(re=Math.sqrt(L*L+oe*oe),re>0&&(ee=U*S[P+d]*S[V+d]/re/re,S[P+i]+=L*ee,S[P+s]+=oe*ee,S[V+i]-=L*ee,S[V+s]-=oe*ee));for(Y=C.gravity/C.scalingRatio,U=C.scalingRatio,v=0;v0&&(ee=U*S[v+d]*Y):re>0&&(ee=U*S[v+d]*Y/re),S[v+i]-=L*ee,S[v+s]-=oe*ee;for(U=1*(C.outboundAttractionDistribution?q:1),J=0;J0&&(ee=-U*ue*Math.log(1+re)/re/S[P+d]):re>0&&(ee=-U*ue*Math.log(1+re)/re):C.outboundAttractionDistribution?re>0&&(ee=-U*ue/S[P+d]):re>0&&(ee=-U*ue)):(re=Math.sqrt(Math.pow(L,2)+Math.pow(oe,2)),C.linLogMode?C.outboundAttractionDistribution?re>0&&(ee=-U*ue*Math.log(1+re)/re/S[P+d]):re>0&&(ee=-U*ue*Math.log(1+re)/re):C.outboundAttractionDistribution?(re=1,ee=-U*ue/S[P+d]):(re=1,ee=-U*ue)),re>0&&(S[P+i]+=L*ee,S[P+s]+=oe*ee,S[V+i]-=L*ee,S[V+s]-=oe*ee);var Pe,Ye,Ke,Re,st,ze;if(F===!0)for(v=0;vK&&(S[v+i]=S[v+i]*K/Pe,S[v+s]=S[v+s]*K/Pe),Ye=S[v+d]*Math.sqrt((S[v+c]-S[v+i])*(S[v+c]-S[v+i])+(S[v+u]-S[v+s])*(S[v+u]-S[v+s])),Ke=Math.sqrt((S[v+c]+S[v+i])*(S[v+c]+S[v+i])+(S[v+u]+S[v+s])*(S[v+u]+S[v+s]))/2,Re=.1*Math.log(1+Ke)/(1+Math.sqrt(Ye)),st=S[v+o]+S[v+i]*(Re/C.slowDown),S[v+o]=st,ze=S[v+l]+S[v+s]*(Re/C.slowDown),S[v+l]=ze);else for(v=0;v1&&se.has(ee))&&(S>1&&se.add(ee),U=s[Q+e],oe=s[Q+t],re=s[Q+r],G=U-q,ge=oe-L,pe=Math.sqrt(G*G+ge*ge),ye=pe0?(m[Q]+=G/pe*(1+ue),_[Q]+=ge/pe*(1+ue)):(m[Q]+=w*o(),_[Q]+=H*o())));for(b=0,y=0;b1&&U.has(ye))&&(v>1&&U.add(ye),re=h[oe+a],G=h[oe+o],pe=h[oe+l],we=re-ue,de=G-ee,me=Math.sqrt(we*we+de*de),Ne=me0?(R[oe]+=we/me*(1+ge),O[oe]+=de/me*(1+ge)):(R[oe]+=C*c(),O[oe]+=S*c())));for(E=0,j=0;E=0;)d=fn(e,t,r,n,c+1,o+1,l),d>u&&(c===a?d*=Oo:kf.test(e.charAt(c-1))?(d*=Sf,f=e.slice(a,c-1).match(Tf),f&&a>0&&(d*=Math.pow(Or,f.length))):Rf.test(e.charAt(c-1))?(d*=xf,b=e.slice(a,c-1).match(xs),b&&a>0&&(d*=Math.pow(Or,b.length))):(d*=_f,a>0&&(d*=Math.pow(Or,c-a))),e.charAt(c)!==t.charAt(o)&&(d*=Ef)),(dd&&(d=h*Dr)),d>u&&(u=d),c=r.indexOf(s,c+1);return l[i]=u,u}function Go(e){return e.toLowerCase().replace(xs," ")}function Af(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,fn(e,t,Go(e),Go(t),0,0,{})}var Gr={exports:{}},Fr={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Fo;function jf(){if(Fo)return Fr;Fo=1;var e=gi();function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function i(d,h){var f=h(),b=n({inst:{value:f,getSnapshot:h}}),y=b[0].inst,k=b[1];return o(function(){y.value=f,y.getSnapshot=h,s(y)&&k({inst:y})},[d,f,h]),a(function(){return s(y)&&k({inst:y}),d(function(){s(y)&&k({inst:y})})},[d]),l(f),f}function s(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!r(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:i;return Fr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Fr}var Mo;function Nf(){return Mo||(Mo=1,Gr.exports=jf()),Gr.exports}var If=Nf(),Tt='[cmdk-group=""]',Mr='[cmdk-group-items=""]',Lf='[cmdk-group-heading=""]',In='[cmdk-item=""]',$o=`${In}:not([aria-disabled="true"])`,hn="cmdk-item-select",dt="data-value",Pf=(e,t,r)=>Af(e,t,r),Ss=p.createContext(void 0),jt=()=>p.useContext(Ss),_s=p.createContext(void 0),Ln=()=>p.useContext(_s),Es=p.createContext(void 0),Cs=p.forwardRef((e,t)=>{let r=yt(()=>{var v,P;return{search:"",value:(P=(v=e.value)!=null?v:e.defaultValue)!=null?P:"",filtered:{count:0,items:new Map,groups:new Set}}}),n=yt(()=>new Set),a=yt(()=>new Map),o=yt(()=>new Map),l=yt(()=>new Set),i=ks(e),{label:s,children:c,value:u,onValueChange:d,filter:h,shouldFilter:f,loop:b,disablePointerSelection:y=!1,vimBindings:k=!0,...I}=e,E=ft(),j=ft(),A=ft(),N=p.useRef(null),z=Uf();gt(()=>{if(u!==void 0){let v=u.trim();r.current.value=v,m.emit()}},[u]),gt(()=>{z(6,w)},[]);let m=p.useMemo(()=>({subscribe:v=>(l.current.add(v),()=>l.current.delete(v)),snapshot:()=>r.current,setState:(v,P,V)=>{var $,J,X;if(!Object.is(r.current[v],P)){if(r.current[v]=P,v==="search")O(),T(),z(1,R);else if(v==="value"&&(V||z(5,w),(($=i.current)==null?void 0:$.value)!==void 0)){let Y=P??"";(X=(J=i.current).onValueChange)==null||X.call(J,Y);return}m.emit()}},emit:()=>{l.current.forEach(v=>v())}}),[]),_=p.useMemo(()=>({value:(v,P,V)=>{var $;P!==(($=o.current.get(v))==null?void 0:$.value)&&(o.current.set(v,{value:P,keywords:V}),r.current.filtered.items.set(v,x(P,V)),z(2,()=>{T(),m.emit()}))},item:(v,P)=>(n.current.add(v),P&&(a.current.has(P)?a.current.get(P).add(v):a.current.set(P,new Set([v]))),z(3,()=>{O(),T(),r.current.value||R(),m.emit()}),()=>{o.current.delete(v),n.current.delete(v),r.current.filtered.items.delete(v);let V=H();z(4,()=>{O(),(V==null?void 0:V.getAttribute("id"))===v&&R(),m.emit()})}),group:v=>(a.current.has(v)||a.current.set(v,new Set),()=>{o.current.delete(v),a.current.delete(v)}),filter:()=>i.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:E,inputId:A,labelId:j,listInnerRef:N}),[]);function x(v,P){var V,$;let J=($=(V=i.current)==null?void 0:V.filter)!=null?$:Pf;return v?J(v,r.current.search,P):0}function T(){if(!r.current.search||i.current.shouldFilter===!1)return;let v=r.current.filtered.items,P=[];r.current.filtered.groups.forEach($=>{let J=a.current.get($),X=0;J.forEach(Y=>{let ie=v.get(Y);X=Math.max(ie,X)}),P.push([$,X])});let V=N.current;K().sort(($,J)=>{var X,Y;let ie=$.getAttribute("id"),ne=J.getAttribute("id");return((X=v.get(ne))!=null?X:0)-((Y=v.get(ie))!=null?Y:0)}).forEach($=>{let J=$.closest(Mr);J?J.appendChild($.parentElement===J?$:$.closest(`${Mr} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${Mr} > *`))}),P.sort(($,J)=>J[1]-$[1]).forEach($=>{var J;let X=(J=N.current)==null?void 0:J.querySelector(`${Tt}[${dt}="${encodeURIComponent($[0])}"]`);X==null||X.parentElement.appendChild(X)})}function R(){let v=K().find(V=>V.getAttribute("aria-disabled")!=="true"),P=v==null?void 0:v.getAttribute(dt);m.setState("value",P||void 0)}function O(){var v,P,V,$;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let J=0;for(let X of n.current){let Y=(P=(v=o.current.get(X))==null?void 0:v.value)!=null?P:"",ie=($=(V=o.current.get(X))==null?void 0:V.keywords)!=null?$:[],ne=x(Y,ie);r.current.filtered.items.set(X,ne),ne>0&&J++}for(let[X,Y]of a.current)for(let ie of Y)if(r.current.filtered.items.get(ie)>0){r.current.filtered.groups.add(X);break}r.current.filtered.count=J}function w(){var v,P,V;let $=H();$&&(((v=$.parentElement)==null?void 0:v.firstChild)===$&&((V=(P=$.closest(Tt))==null?void 0:P.querySelector(Lf))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function H(){var v;return(v=N.current)==null?void 0:v.querySelector(`${In}[aria-selected="true"]`)}function K(){var v;return Array.from(((v=N.current)==null?void 0:v.querySelectorAll($o))||[])}function D(v){let P=K()[v];P&&m.setState("value",P.getAttribute(dt))}function C(v){var P;let V=H(),$=K(),J=$.findIndex(Y=>Y===V),X=$[J+v];(P=i.current)!=null&&P.loop&&(X=J+v<0?$[$.length-1]:J+v===$.length?$[0]:$[J+v]),X&&m.setState("value",X.getAttribute(dt))}function S(v){let P=H(),V=P==null?void 0:P.closest(Tt),$;for(;V&&!$;)V=v>0?Bf(V,Tt):Vf(V,Tt),$=V==null?void 0:V.querySelector($o);$?m.setState("value",$.getAttribute(dt)):C(v)}let B=()=>D(K().length-1),ae=v=>{v.preventDefault(),v.metaKey?B():v.altKey?S(1):C(1)},M=v=>{v.preventDefault(),v.metaKey?D(0):v.altKey?S(-1):C(-1)};return p.createElement(Ee.div,{ref:t,tabIndex:-1,...I,"cmdk-root":"",onKeyDown:v=>{var P;if((P=I.onKeyDown)==null||P.call(I,v),!v.defaultPrevented)switch(v.key){case"n":case"j":{k&&v.ctrlKey&&ae(v);break}case"ArrowDown":{ae(v);break}case"p":case"k":{k&&v.ctrlKey&&M(v);break}case"ArrowUp":{M(v);break}case"Home":{v.preventDefault(),D(0);break}case"End":{v.preventDefault(),B();break}case"Enter":if(!v.nativeEvent.isComposing&&v.keyCode!==229){v.preventDefault();let V=H();if(V){let $=new Event(hn);V.dispatchEvent($)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:Wf},s),lr(e,v=>p.createElement(_s.Provider,{value:m},p.createElement(Ss.Provider,{value:_},v))))}),zf=p.forwardRef((e,t)=>{var r,n;let a=ft(),o=p.useRef(null),l=p.useContext(Es),i=jt(),s=ks(e),c=(n=(r=s.current)==null?void 0:r.forceMount)!=null?n:l==null?void 0:l.forceMount;gt(()=>{if(!c)return i.item(a,l==null?void 0:l.id)},[c]);let u=Ts(a,o,[e.value,e.children,o],e.keywords),d=Ln(),h=pt(z=>z.value&&z.value===u.current),f=pt(z=>c||i.filter()===!1?!0:z.search?z.filtered.items.get(a)>0:!0);p.useEffect(()=>{let z=o.current;if(!(!z||e.disabled))return z.addEventListener(hn,b),()=>z.removeEventListener(hn,b)},[f,e.onSelect,e.disabled]);function b(){var z,m;y(),(m=(z=s.current).onSelect)==null||m.call(z,u.current)}function y(){d.setState("value",u.current,!0)}if(!f)return null;let{disabled:k,value:I,onSelect:E,forceMount:j,keywords:A,...N}=e;return p.createElement(Ee.div,{ref:Rt([o,t]),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!h,"data-disabled":!!k,"data-selected":!!h,onPointerMove:k||i.getDisablePointerSelection()?void 0:y,onClick:k?void 0:b},e.children)}),Df=p.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,l=ft(),i=p.useRef(null),s=p.useRef(null),c=ft(),u=jt(),d=pt(f=>a||u.filter()===!1?!0:f.search?f.filtered.groups.has(l):!0);gt(()=>u.group(l),[]),Ts(l,i,[e.value,e.heading,s]);let h=p.useMemo(()=>({id:l,forceMount:a}),[a]);return p.createElement(Ee.div,{ref:Rt([i,t]),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&p.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),lr(e,f=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},p.createElement(Es.Provider,{value:h},f))))}),Of=p.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=p.useRef(null),o=pt(l=>!l.search);return!r&&!o?null:p.createElement(Ee.div,{ref:Rt([a,t]),...n,"cmdk-separator":"",role:"separator"})}),Gf=p.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=Ln(),l=pt(u=>u.search),i=pt(u=>u.value),s=jt(),c=p.useMemo(()=>{var u;let d=(u=s.listInnerRef.current)==null?void 0:u.querySelector(`${In}[${dt}="${encodeURIComponent(i)}"]`);return d==null?void 0:d.getAttribute("id")},[]);return p.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),p.createElement(Ee.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":c,id:s.inputId,type:"text",value:a?e.value:l,onChange:u=>{a||o.setState("search",u.target.value),r==null||r(u.target.value)}})}),Ff=p.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=p.useRef(null),l=p.useRef(null),i=jt();return p.useEffect(()=>{if(l.current&&o.current){let s=l.current,c=o.current,u,d=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let h=s.offsetHeight;c.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(s),()=>{cancelAnimationFrame(u),d.unobserve(s)}}},[]),p.createElement(Ee.div,{ref:Rt([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":n,id:i.listId},lr(e,s=>p.createElement("div",{ref:Rt([l,i.listInnerRef]),"cmdk-list-sizer":""},s)))}),Mf=p.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:l,...i}=e;return p.createElement(wa,{open:r,onOpenChange:n},p.createElement(va,{container:l},p.createElement(xn,{"cmdk-overlay":"",className:a}),p.createElement(Sn,{"aria-label":e.label,"cmdk-dialog":"",className:o},p.createElement(Cs,{ref:t,...i}))))}),$f=p.forwardRef((e,t)=>pt(r=>r.filtered.count===0)?p.createElement(Ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Hf=p.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return p.createElement(Ee.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},lr(e,l=>p.createElement("div",{"aria-hidden":!0},l)))}),je=Object.assign(Cs,{List:Ff,Item:zf,Input:Gf,Group:Df,Separator:Of,Dialog:Mf,Empty:$f,Loading:Hf});function Bf(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Vf(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ks(e){let t=p.useRef(e);return gt(()=>{t.current=e}),t}var gt=typeof window>"u"?p.useEffect:p.useLayoutEffect;function yt(e){let t=p.useRef();return t.current===void 0&&(t.current=e()),t}function Rt(e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}function pt(e){let t=Ln(),r=()=>e(t.snapshot());return If.useSyncExternalStore(t.subscribe,r,r)}function Ts(e,t,r,n=[]){let a=p.useRef(),o=jt();return gt(()=>{var l;let i=(()=>{var c;for(let u of r){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():a.current}})(),s=n.map(c=>c.trim());o.value(e,i,s),(l=t.current)==null||l.setAttribute(dt,i),a.current=i}),a}var Uf=()=>{let[e,t]=p.useState(),r=yt(()=>new Map);return gt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function qf(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lr({asChild:e,children:t},r){return e&&p.isValidElement(t)?p.cloneElement(qf(t),{ref:t.ref},r(t.props.children)):r(t)}var Wf={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const cr=p.forwardRef(({className:e,...t},r)=>g.jsx(je,{ref:r,className:fe("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));cr.displayName=je.displayName;const Pn=p.forwardRef(({className:e,...t},r)=>g.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[g.jsx(bu,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),g.jsx(je.Input,{ref:r,className:fe("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Pn.displayName=je.Input.displayName;const ur=p.forwardRef(({className:e,...t},r)=>g.jsx(je.List,{ref:r,className:fe("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));ur.displayName=je.List.displayName;const zn=p.forwardRef((e,t)=>g.jsx(je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));zn.displayName=je.Empty.displayName;const Et=p.forwardRef(({className:e,...t},r)=>g.jsx(je.Group,{ref:r,className:fe("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t}));Et.displayName=je.Group.displayName;const Xf=p.forwardRef(({className:e,...t},r)=>g.jsx(je.Separator,{ref:r,className:fe("bg-border -mx-1 h-px",e),...t}));Xf.displayName=je.Separator.displayName;const Ct=p.forwardRef(({className:e,...t},r)=>g.jsx(je.Item,{ref:r,className:fe("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Ct.displayName=je.Item.displayName;const Yf=({layout:e,autoRunFor:t,mainLayout:r})=>{const n=Be(),[a,o]=p.useState(!1),l=p.useRef(null),{t:i}=Se(),s=p.useCallback(()=>{if(n)try{const u=n.getGraph();if(!u||u.order===0)return;const d=r.positions();ha(u,d,{duration:300})}catch(u){console.error("Error updating positions:",u),l.current&&(window.clearInterval(l.current),l.current=null,o(!1))}},[n,r]),c=p.useCallback(()=>{if(a){console.log("Stopping layout animation"),l.current&&(window.clearInterval(l.current),l.current=null);try{typeof e.kill=="function"?(e.kill(),console.log("Layout algorithm killed")):typeof e.stop=="function"&&(e.stop(),console.log("Layout algorithm stopped"))}catch(u){console.error("Error stopping layout algorithm:",u)}o(!1)}else console.log("Starting layout animation"),s(),l.current=window.setInterval(()=>{s()},200),o(!0),setTimeout(()=>{if(l.current){console.log("Auto-stopping layout animation after 3 seconds"),window.clearInterval(l.current),l.current=null,o(!1);try{typeof e.kill=="function"?e.kill():typeof e.stop=="function"&&e.stop()}catch(u){console.error("Error stopping layout algorithm:",u)}}},3e3)},[a,e,s]);return p.useEffect(()=>{if(!n){console.log("No sigma instance available");return}let u=null;return t!==void 0&&t>-1&&n.getGraph().order>0&&(console.log("Auto-starting layout animation"),s(),l.current=window.setInterval(()=>{s()},200),o(!0),t>0&&(u=window.setTimeout(()=>{console.log("Auto-stopping layout animation after timeout"),l.current&&(window.clearInterval(l.current),l.current=null),o(!1)},t))),()=>{l.current&&(window.clearInterval(l.current),l.current=null),u&&window.clearTimeout(u),o(!1)}},[t,n,s]),g.jsx(be,{size:"icon",onClick:c,tooltip:i(a?"graphPanel.sideBar.layoutsControl.stopAnimation":"graphPanel.sideBar.layoutsControl.startAnimation"),variant:Ie,children:a?g.jsx(au,{}):g.jsx(cu,{})})},Kf=()=>{const e=Be(),{t}=Se(),[r,n]=p.useState("Circular"),[a,o]=p.useState(!1),l=Z.use.graphLayoutMaxIterations(),i=Hd(),s=Gd(),c=wf(),u=pf({maxIterations:l,settings:{margin:5,expansion:1.1,gridSize:1,ratio:1,speed:3}}),d=Yd({maxIterations:l,settings:{attraction:3e-4,repulsion:.02,gravity:.02,inertia:.4,maxMove:100}}),h=ys({iterations:l}),f=mf(),b=Kd(),y=af(),k=p.useMemo(()=>({Circular:{layout:i},Circlepack:{layout:s},Random:{layout:c},Noverlaps:{layout:u,worker:f},"Force Directed":{layout:d,worker:b},"Force Atlas":{layout:h,worker:y}}),[s,i,d,h,u,c,b,f,y]),I=p.useCallback(E=>{console.debug("Running layout:",E);const{positions:j}=k[E].layout;try{const A=e.getGraph();if(!A){console.error("No graph available");return}const N=j();console.log("Positions calculated, animating nodes"),ha(A,N,{duration:400}),n(E)}catch(A){console.error("Error running layout:",A)}},[k,e]);return g.jsxs("div",{children:[g.jsx("div",{children:k[r]&&"worker"in k[r]&&g.jsx(Yf,{layout:k[r].worker,mainLayout:k[r].layout})}),g.jsx("div",{children:g.jsxs(Tn,{open:a,onOpenChange:o,children:[g.jsx(Rn,{asChild:!0,children:g.jsx(be,{size:"icon",variant:Ie,onClick:()=>o(E=>!E),tooltip:t("graphPanel.sideBar.layoutsControl.layoutGraph"),children:g.jsx(Yc,{})})}),g.jsx(ir,{side:"right",align:"start",sideOffset:8,collisionPadding:5,sticky:"always",className:"p-1 min-w-auto",children:g.jsx(cr,{children:g.jsx(ur,{children:g.jsx(Et,{children:Object.keys(k).map(E=>g.jsx(Ct,{onSelect:()=>{I(E)},className:"cursor-pointer text-xs",children:t(`graphPanel.sideBar.layoutsControl.layouts.${E}`)},E))})})})})]})})]})},Qf=()=>{const e=p.useContext(Ra);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},zt=e=>!!(e.type.startsWith("mouse")&&e.buttons!==0),Jf=({disableHoverEffect:e})=>{const t=Be(),r=ga(),n=bi(),a=Z.use.graphLayoutMaxIterations(),{assign:o}=ys({iterations:a}),{theme:l}=Qf(),i=Z.use.enableHideUnselectedEdges(),s=Z.use.enableEdgeEvents(),c=Z.use.showEdgeLabel(),u=Z.use.showNodeLabel(),d=Z.use.minEdgeSize(),h=Z.use.maxEdgeSize(),f=te.use.selectedNode(),b=te.use.focusedNode(),y=te.use.selectedEdge(),k=te.use.focusedEdge(),I=te.use.sigmaGraph();return p.useEffect(()=>{if(I&&t){try{typeof t.setGraph=="function"?(t.setGraph(I),console.log("Binding graph to sigma instance")):(t.graph=I,console.warn("Simgma missing setGraph function, set graph property directly"))}catch(E){console.error("Error setting graph on sigma instance:",E)}o(),console.log("Initial layout applied to graph")}},[t,I,o,a]),p.useEffect(()=>{t&&(te.getState().sigmaInstance||(console.log("Setting sigma instance from GraphControl"),te.getState().setSigmaInstance(t)))},[t]),p.useEffect(()=>{const{setFocusedNode:E,setSelectedNode:j,setFocusedEdge:A,setSelectedEdge:N,clearSelection:z}=te.getState(),m={enterNode:_=>{zt(_.event.original)||t.getGraph().hasNode(_.node)&&E(_.node)},leaveNode:_=>{zt(_.event.original)||E(null)},clickNode:_=>{t.getGraph().hasNode(_.node)&&(j(_.node),N(null))},clickStage:()=>z()};s&&(m.clickEdge=_=>{N(_.edge),j(null)},m.enterEdge=_=>{zt(_.event.original)||A(_.edge)},m.leaveEdge=_=>{zt(_.event.original)||A(null)}),r(m)},[r,s]),p.useEffect(()=>{if(t&&I){const E=t.getGraph();let j=Number.MAX_SAFE_INTEGER,A=0;E.forEachEdge(z=>{const m=E.getEdgeAttribute(z,"originalWeight")||1;typeof m=="number"&&(j=Math.min(j,m),A=Math.max(A,m))});const N=A-j;if(N>0){const z=h-d;E.forEachEdge(m=>{const _=E.getEdgeAttribute(m,"originalWeight")||1;if(typeof _=="number"){const x=d+z*Math.pow((_-j)/N,.5);E.setEdgeAttribute(m,"size",x)}})}else E.forEachEdge(z=>{E.setEdgeAttribute(z,"size",d)});t.refresh()}},[t,I,d,h]),p.useEffect(()=>{const E=l==="dark",j=E?Vi:void 0,A=E?Xi:void 0;n({enableEdgeEvents:s,renderEdgeLabels:c,renderLabels:u,nodeReducer:(N,z)=>{const m=t.getGraph(),_={...z,highlighted:z.highlighted||!1,labelColor:j};if(!e){_.highlighted=!1;const x=b||f,T=k||y;if(x&&m.hasNode(x))try{(N===x||m.neighbors(x).includes(N))&&(_.highlighted=!0,N===f&&(_.borderColor=Wi))}catch(R){console.error("Error in nodeReducer:",R)}else if(T&&m.hasEdge(T))m.extremities(T).includes(N)&&(_.highlighted=!0,_.size=3);else return _;_.highlighted?E&&(_.labelColor=Ui):_.color=qi}return _},edgeReducer:(N,z)=>{const m=t.getGraph(),_={...z,hidden:!1,labelColor:j,color:A};if(!e){const x=b||f;if(x&&m.hasNode(x))try{i?m.extremities(N).includes(x)||(_.hidden=!0):m.extremities(N).includes(x)&&(_.color=Wn)}catch(T){console.error("Error in edgeReducer:",T)}else{const T=y&&m.hasEdge(y)?y:null,R=k&&m.hasEdge(k)?k:null;(T||R)&&(N===T?_.color=Yi:N===R?_.color=Wn:i&&(_.hidden=!0))}}return _}})},[f,b,y,k,n,t,e,l,i,s,c,u]),null},Zf=()=>{const{zoomIn:e,zoomOut:t,reset:r}=da({duration:200,factor:1.5}),n=Be(),{t:a}=Se(),o=p.useCallback(()=>e(),[e]),l=p.useCallback(()=>t(),[t]),i=p.useCallback(()=>{if(n)try{n.setCustomBBox(null),n.refresh();const u=n.getGraph();if(!(u!=null&&u.order)||u.nodes().length===0){r();return}n.getCamera().animate({x:.5,y:.5,ratio:1.1},{duration:1e3})}catch(u){console.error("Error resetting zoom:",u),r()}},[n,r]),s=p.useCallback(()=>{if(!n)return;const u=n.getCamera(),h=u.angle+Math.PI/8;u.animate({angle:h},{duration:200})},[n]),c=p.useCallback(()=>{if(!n)return;const u=n.getCamera(),h=u.angle-Math.PI/8;u.animate({angle:h},{duration:200})},[n]);return g.jsxs(g.Fragment,{children:[g.jsx(be,{variant:Ie,onClick:s,tooltip:a("graphPanel.sideBar.zoomControl.rotateCamera"),size:"icon",children:g.jsx(pu,{})}),g.jsx(be,{variant:Ie,onClick:c,tooltip:a("graphPanel.sideBar.zoomControl.rotateCameraCounterClockwise"),size:"icon",children:g.jsx(hu,{})}),g.jsx(be,{variant:Ie,onClick:i,tooltip:a("graphPanel.sideBar.zoomControl.resetZoom"),size:"icon",children:g.jsx(Vc,{})}),g.jsx(be,{variant:Ie,onClick:o,tooltip:a("graphPanel.sideBar.zoomControl.zoomIn"),size:"icon",children:g.jsx(Nu,{})}),g.jsx(be,{variant:Ie,onClick:l,tooltip:a("graphPanel.sideBar.zoomControl.zoomOut"),size:"icon",children:g.jsx(Lu,{})})]})},eh=()=>{const{isFullScreen:e,toggle:t}=wi(),{t:r}=Se();return g.jsx(g.Fragment,{children:e?g.jsx(be,{variant:Ie,onClick:t,tooltip:r("graphPanel.sideBar.fullScreenControl.windowed"),size:"icon",children:g.jsx(ru,{})}):g.jsx(be,{variant:Ie,onClick:t,tooltip:r("graphPanel.sideBar.fullScreenControl.fullScreen"),size:"icon",children:g.jsx(eu,{})})})};var Dn="Checkbox",[th,zp]=wn(Dn),[rh,nh]=th(Dn),Rs=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:o,required:l,disabled:i,value:s="on",onCheckedChange:c,form:u,...d}=e,[h,f]=p.useState(null),b=Xe(t,A=>f(A)),y=p.useRef(!1),k=h?u||!!h.closest("form"):!0,[I=!1,E]=ma({prop:a,defaultProp:o,onChange:c}),j=p.useRef(I);return p.useEffect(()=>{const A=h==null?void 0:h.form;if(A){const N=()=>E(j.current);return A.addEventListener("reset",N),()=>A.removeEventListener("reset",N)}},[h,E]),g.jsxs(rh,{scope:r,state:I,disabled:i,children:[g.jsx(Ee.button,{type:"button",role:"checkbox","aria-checked":ot(I)?"mixed":I,"aria-required":l,"data-state":Ns(I),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:b,onKeyDown:Ce(e.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:Ce(e.onClick,A=>{E(N=>ot(N)?!0:!N),k&&(y.current=A.isPropagationStopped(),y.current||A.stopPropagation())})}),k&&g.jsx(oh,{control:h,bubbles:!y.current,name:n,value:s,checked:I,required:l,disabled:i,form:u,style:{transform:"translateX(-100%)"},defaultChecked:ot(o)?!1:o})]})});Rs.displayName=Dn;var As="CheckboxIndicator",js=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,o=nh(As,r);return g.jsx(St,{present:n||ot(o.state)||o.state===!0,children:g.jsx(Ee.span,{"data-state":Ns(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});js.displayName=As;var oh=e=>{const{control:t,checked:r,bubbles:n=!0,defaultChecked:a,...o}=e,l=p.useRef(null),i=Oi(r),s=Gi(t);p.useEffect(()=>{const u=l.current,d=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(d,"checked").set;if(i!==r&&f){const b=new Event("click",{bubbles:n});u.indeterminate=ot(r),f.call(u,ot(r)?!1:r),u.dispatchEvent(b)}},[i,r,n]);const c=p.useRef(ot(r)?!1:r);return g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:l,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ot(e){return e==="indeterminate"}function Ns(e){return ot(e)?"indeterminate":e?"checked":"unchecked"}var Is=Rs,ah=js;const Ls=p.forwardRef(({className:e,...t},r)=>g.jsx(Is,{ref:r,className:fe("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-muted data-[state=checked]:text-muted-foreground h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:g.jsx(ah,{className:fe("flex items-center justify-center text-current"),children:g.jsx(Va,{className:"h-4 w-4"})})}));Ls.displayName=Is.displayName;var sh="Separator",Ho="horizontal",ih=["horizontal","vertical"],Ps=p.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ho,...a}=e,o=lh(n)?n:Ho,i=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return g.jsx(Ee.div,{"data-orientation":o,...i,...a,ref:t})});Ps.displayName=sh;function lh(e){return ih.includes(e)}var zs=Ps;const bt=p.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>g.jsx(zs,{ref:a,decorative:r,orientation:t,className:fe("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));bt.displayName=zs.displayName;const tt=({checked:e,onCheckedChange:t,label:r})=>{const n=`checkbox-${r.toLowerCase().replace(/\s+/g,"-")}`;return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ls,{id:n,checked:e,onCheckedChange:t}),g.jsx("label",{htmlFor:n,className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:r})]})},$r=({value:e,onEditFinished:t,label:r,min:n,max:a,defaultValue:o})=>{const{t:l}=Se(),[i,s]=p.useState(e),c=`input-${r.toLowerCase().replace(/\s+/g,"-")}`;p.useEffect(()=>{s(e)},[e]);const u=p.useCallback(f=>{const b=f.target.value.trim();if(b.length===0){s(null);return}const y=Number.parseInt(b);if(!isNaN(y)&&y!==i){if(n!==void 0&&ya)return;s(y)}},[i,n,a]),d=p.useCallback(()=>{i!==null&&e!==i&&t(i)},[e,i,t]),h=p.useCallback(()=>{o!==void 0&&e!==o&&(s(o),t(o))},[o,e,t]);return g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("label",{htmlFor:c,className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:r}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(Wt,{id:c,type:"number",value:i===null?"":i,onChange:u,className:"h-6 w-full min-w-0 pr-1",min:n,max:a,onBlur:d,onKeyDown:f=>{f.key==="Enter"&&d()}}),o!==void 0&&g.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:h,type:"button",title:l("graphPanel.sideBar.settings.resetToDefault"),children:g.jsx(qa,{className:"h-3.5 w-3.5"})})]})]})};function ch(){const[e,t]=p.useState(!1),r=Z.use.showPropertyPanel(),n=Z.use.showNodeSearchBar(),a=Z.use.showNodeLabel(),o=Z.use.enableEdgeEvents(),l=Z.use.enableNodeDrag(),i=Z.use.enableHideUnselectedEdges(),s=Z.use.showEdgeLabel(),c=Z.use.minEdgeSize(),u=Z.use.maxEdgeSize(),d=Z.use.graphQueryMaxDepth(),h=Z.use.graphMaxNodes(),f=Z.use.backendMaxGraphNodes(),b=Z.use.graphLayoutMaxIterations(),y=Z.use.enableHealthCheck(),k=p.useCallback(()=>Z.setState(w=>({enableNodeDrag:!w.enableNodeDrag})),[]),I=p.useCallback(()=>Z.setState(w=>({enableEdgeEvents:!w.enableEdgeEvents})),[]),E=p.useCallback(()=>Z.setState(w=>({enableHideUnselectedEdges:!w.enableHideUnselectedEdges})),[]),j=p.useCallback(()=>Z.setState(w=>({showEdgeLabel:!w.showEdgeLabel})),[]),A=p.useCallback(()=>Z.setState(w=>({showPropertyPanel:!w.showPropertyPanel})),[]),N=p.useCallback(()=>Z.setState(w=>({showNodeSearchBar:!w.showNodeSearchBar})),[]),z=p.useCallback(()=>Z.setState(w=>({showNodeLabel:!w.showNodeLabel})),[]),m=p.useCallback(()=>Z.setState(w=>({enableHealthCheck:!w.enableHealthCheck})),[]),_=p.useCallback(w=>{if(w<1)return;Z.setState({graphQueryMaxDepth:w});const H=Z.getState().queryLabel;Z.getState().setQueryLabel(""),setTimeout(()=>{Z.getState().setQueryLabel(H)},300)},[]),x=p.useCallback(w=>{const H=f||1e3;w<1||w>H||Z.getState().setGraphMaxNodes(w,!0)},[f]),T=p.useCallback(w=>{w<1||Z.setState({graphLayoutMaxIterations:w})},[]),{t:R}=Se(),O=()=>t(!1);return g.jsx(g.Fragment,{children:g.jsxs(Tn,{open:e,onOpenChange:t,children:[g.jsx(Rn,{asChild:!0,children:g.jsx(be,{variant:Ie,tooltip:R("graphPanel.sideBar.settings.settings"),size:"icon",children:g.jsx(Su,{})})}),g.jsx(ir,{side:"right",align:"end",sideOffset:8,collisionPadding:5,className:"p-2 max-w-[200px]",onCloseAutoFocus:w=>w.preventDefault(),children:g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(tt,{checked:y,onCheckedChange:m,label:R("graphPanel.sideBar.settings.healthCheck")}),g.jsx(bt,{}),g.jsx(tt,{checked:r,onCheckedChange:A,label:R("graphPanel.sideBar.settings.showPropertyPanel")}),g.jsx(tt,{checked:n,onCheckedChange:N,label:R("graphPanel.sideBar.settings.showSearchBar")}),g.jsx(bt,{}),g.jsx(tt,{checked:a,onCheckedChange:z,label:R("graphPanel.sideBar.settings.showNodeLabel")}),g.jsx(tt,{checked:l,onCheckedChange:k,label:R("graphPanel.sideBar.settings.nodeDraggable")}),g.jsx(bt,{}),g.jsx(tt,{checked:s,onCheckedChange:j,label:R("graphPanel.sideBar.settings.showEdgeLabel")}),g.jsx(tt,{checked:i,onCheckedChange:E,label:R("graphPanel.sideBar.settings.hideUnselectedEdges")}),g.jsx(tt,{checked:o,onCheckedChange:I,label:R("graphPanel.sideBar.settings.edgeEvents")}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("label",{htmlFor:"edge-size-min",className:"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:R("graphPanel.sideBar.settings.edgeSizeRange")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Wt,{id:"edge-size-min",type:"number",value:c,onChange:w=>{const H=Number(w.target.value);!isNaN(H)&&H>=1&&H<=u&&Z.setState({minEdgeSize:H})},className:"h-6 w-16 min-w-0 pr-1",min:1,max:Math.min(u,10)}),g.jsx("span",{children:"-"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(Wt,{id:"edge-size-max",type:"number",value:u,onChange:w=>{const H=Number(w.target.value);!isNaN(H)&&H>=c&&H>=1&&H<=10&&Z.setState({maxEdgeSize:H})},className:"h-6 w-16 min-w-0 pr-1",min:c,max:10}),g.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 hover:bg-muted text-muted-foreground hover:text-foreground",onClick:()=>Z.setState({minEdgeSize:1,maxEdgeSize:5}),type:"button",title:R("graphPanel.sideBar.settings.resetToDefault"),children:g.jsx(qa,{className:"h-3.5 w-3.5"})})]})]})]}),g.jsx(bt,{}),g.jsx($r,{label:R("graphPanel.sideBar.settings.maxQueryDepth"),min:1,value:d,defaultValue:3,onEditFinished:_}),g.jsx($r,{label:`${R("graphPanel.sideBar.settings.maxNodes")} (≤ ${f||1e3})`,min:1,max:f||1e3,value:h,defaultValue:f||1e3,onEditFinished:x}),g.jsx($r,{label:R("graphPanel.sideBar.settings.maxLayoutIterations"),min:1,max:30,value:b,defaultValue:15,onEditFinished:T}),g.jsx(bt,{}),g.jsx(be,{onClick:O,variant:"outline",size:"sm",className:"ml-auto px-4",children:R("graphPanel.sideBar.settings.save")})]})})]})})}const uh="ENTRIES",Ds="KEYS",Os="VALUES",_e="";class Hr{constructor(t,r){const n=t._tree,a=Array.from(n.keys());this.set=t,this._type=r,this._path=a.length>0?[{node:n,keys:a}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:r}=mt(this._path);if(mt(r)===_e)return{done:!1,value:this.result()};const n=t.get(mt(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=mt(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>mt(t)).filter(t=>t!==_e).join("")}value(){return mt(this._path).node.get(_e)}result(){switch(this._type){case Os:return this.value();case Ds:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const mt=e=>e[e.length-1],dh=(e,t,r)=>{const n=new Map;if(t===void 0)return n;const a=t.length+1,o=a+r,l=new Uint8Array(o*a).fill(r+1);for(let i=0;i{const s=o*l;e:for(const c of e.keys())if(c===_e){const u=a[s-1];u<=r&&n.set(i,[e.get(c),u])}else{let u=o;for(let d=0;dr)continue e}Gs(e.get(c),t,r,n,a,u,l,i+c)}};class nt{constructor(t=new Map,r=""){this._size=void 0,this._tree=t,this._prefix=r}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[r,n]=Qt(this._tree,t.slice(this._prefix.length));if(r===void 0){const[a,o]=On(n);for(const l of a.keys())if(l!==_e&&l.startsWith(o)){const i=new Map;return i.set(l.slice(o.length),a.get(l)),new nt(i,t)}}return new nt(r,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,fh(this._tree,t)}entries(){return new Hr(this,uh)}forEach(t){for(const[r,n]of this)t(r,n,this)}fuzzyGet(t,r){return dh(this._tree,t,r)}get(t){const r=gn(this._tree,t);return r!==void 0?r.get(_e):void 0}has(t){const r=gn(this._tree,t);return r!==void 0&&r.has(_e)}keys(){return new Hr(this,Ds)}set(t,r){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,Br(this._tree,t).set(_e,r),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,r){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=Br(this._tree,t);return n.set(_e,r(n.get(_e))),this}fetch(t,r){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=Br(this._tree,t);let a=n.get(_e);return a===void 0&&n.set(_e,a=r()),a}values(){return new Hr(this,Os)}[Symbol.iterator](){return this.entries()}static from(t){const r=new nt;for(const[n,a]of t)r.set(n,a);return r}static fromObject(t){return nt.from(Object.entries(t))}}const Qt=(e,t,r=[])=>{if(t.length===0||e==null)return[e,r];for(const n of e.keys())if(n!==_e&&t.startsWith(n))return r.push([e,n]),Qt(e.get(n),t.slice(n.length),r);return r.push([e,t]),Qt(void 0,"",r)},gn=(e,t)=>{if(t.length===0||e==null)return e;for(const r of e.keys())if(r!==_e&&t.startsWith(r))return gn(e.get(r),t.slice(r.length))},Br=(e,t)=>{const r=t.length;e:for(let n=0;e&&n{const[r,n]=Qt(e,t);if(r!==void 0){if(r.delete(_e),r.size===0)Fs(n);else if(r.size===1){const[a,o]=r.entries().next().value;Ms(n,a,o)}}},Fs=e=>{if(e.length===0)return;const[t,r]=On(e);if(t.delete(r),t.size===0)Fs(e.slice(0,-1));else if(t.size===1){const[n,a]=t.entries().next().value;n!==_e&&Ms(e.slice(0,-1),n,a)}},Ms=(e,t,r)=>{if(e.length===0)return;const[n,a]=On(e);n.set(a+t,r),n.delete(a)},On=e=>e[e.length-1],Gn="or",$s="and",hh="and_not";class at{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const r=t.autoVacuum==null||t.autoVacuum===!0?qr:t.autoVacuum;this._options={...Ur,...t,autoVacuum:r,searchOptions:{...Bo,...t.searchOptions||{}},autoSuggestOptions:{...yh,...t.autoSuggestOptions||{}}},this._index=new nt,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=mn,this.addFields(this._options.fields)}add(t){const{extractField:r,tokenize:n,processTerm:a,fields:o,idField:l}=this._options,i=r(t,l);if(i==null)throw new Error(`MiniSearch: document does not have ID field "${l}"`);if(this._idToShortId.has(i))throw new Error(`MiniSearch: duplicate ID ${i}`);const s=this.addDocumentId(i);this.saveStoredFields(s,t);for(const c of o){const u=r(t,c);if(u==null)continue;const d=n(u.toString(),c),h=this._fieldIds[c],f=new Set(d).size;this.addFieldLength(s,h,this._documentCount-1,f);for(const b of d){const y=a(b,c);if(Array.isArray(y))for(const k of y)this.addTerm(h,s,k);else y&&this.addTerm(h,s,y)}}}addAll(t){for(const r of t)this.add(r)}addAllAsync(t,r={}){const{chunkSize:n=10}=r,a={chunk:[],promise:Promise.resolve()},{chunk:o,promise:l}=t.reduce(({chunk:i,promise:s},c,u)=>(i.push(c),(u+1)%n===0?{chunk:[],promise:s.then(()=>new Promise(d=>setTimeout(d,0))).then(()=>this.addAll(i))}:{chunk:i,promise:s}),a);return l.then(()=>this.addAll(o))}remove(t){const{tokenize:r,processTerm:n,extractField:a,fields:o,idField:l}=this._options,i=a(t,l);if(i==null)throw new Error(`MiniSearch: document does not have ID field "${l}"`);const s=this._idToShortId.get(i);if(s==null)throw new Error(`MiniSearch: cannot remove document with ID ${i}: it is not in the index`);for(const c of o){const u=a(t,c);if(u==null)continue;const d=r(u.toString(),c),h=this._fieldIds[c],f=new Set(d).size;this.removeFieldLength(s,h,this._documentCount,f);for(const b of d){const y=n(b,c);if(Array.isArray(y))for(const k of y)this.removeTerm(h,s,k);else y&&this.removeTerm(h,s,y)}}this._storedFields.delete(s),this._documentIds.delete(s),this._idToShortId.delete(i),this._fieldLength.delete(s),this._documentCount-=1}removeAll(t){if(t)for(const r of t)this.remove(r);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new nt,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const r=this._idToShortId.get(t);if(r==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach((n,a)=>{this.removeFieldLength(r,a,this._documentCount,n)}),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:r,batchSize:n,batchWait:a}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:a},{minDirtCount:r,minDirtFactor:t})}discardAll(t){const r=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of t)this.discard(n)}finally{this._options.autoVacuum=r}this.maybeAutoVacuum()}replace(t){const{idField:r,extractField:n}=this._options,a=n(t,r);this.discard(a),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,r){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&r,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=mn,this.performVacuuming(t,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(r)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,r){const n=this._dirtCount;if(this.vacuumConditionsMet(r)){const a=t.batchSize||pn.batchSize,o=t.batchWait||pn.batchWait;let l=1;for(const[i,s]of this._index){for(const[c,u]of s)for(const[d]of u)this._documentIds.has(d)||(u.size<=1?s.delete(c):u.delete(d));this._index.get(i).size===0&&this._index.delete(i),l%a===0&&await new Promise(c=>setTimeout(c,o)),l+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:r,minDirtFactor:n}=t;return r=r||qr.minDirtCount,n=n||qr.minDirtFactor,this.dirtCount>=r&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const r=this._idToShortId.get(t);if(r!=null)return this._storedFields.get(r)}search(t,r={}){const{searchOptions:n}=this._options,a={...n,...r},o=this.executeQuery(t,r),l=[];for(const[i,{score:s,terms:c,match:u}]of o){const d=c.length||1,h={id:this._documentIds.get(i),score:s*d,terms:Object.keys(u),queryTerms:c,match:u};Object.assign(h,this._storedFields.get(i)),(a.filter==null||a.filter(h))&&l.push(h)}return t===at.wildcard&&a.boostDocument==null||l.sort(Uo),l}autoSuggest(t,r={}){r={...this._options.autoSuggestOptions,...r};const n=new Map;for(const{score:o,terms:l}of this.search(t,r)){const i=l.join(" "),s=n.get(i);s!=null?(s.score+=o,s.count+=1):n.set(i,{score:o,terms:l,count:1})}const a=[];for(const[o,{score:l,terms:i,count:s}]of n)a.push({suggestion:o,terms:i,score:l/s});return a.sort(Uo),a}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,r){if(r==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),r)}static async loadJSONAsync(t,r){if(r==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),r)}static getDefault(t){if(Ur.hasOwnProperty(t))return Vr(Ur,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,r){const{index:n,documentIds:a,fieldLength:o,storedFields:l,serializationVersion:i}=t,s=this.instantiateMiniSearch(t,r);s._documentIds=Dt(a),s._fieldLength=Dt(o),s._storedFields=Dt(l);for(const[c,u]of s._documentIds)s._idToShortId.set(u,c);for(const[c,u]of n){const d=new Map;for(const h of Object.keys(u)){let f=u[h];i===1&&(f=f.ds),d.set(parseInt(h,10),Dt(f))}s._index.set(c,d)}return s}static async loadJSAsync(t,r){const{index:n,documentIds:a,fieldLength:o,storedFields:l,serializationVersion:i}=t,s=this.instantiateMiniSearch(t,r);s._documentIds=await Ot(a),s._fieldLength=await Ot(o),s._storedFields=await Ot(l);for(const[u,d]of s._documentIds)s._idToShortId.set(d,u);let c=0;for(const[u,d]of n){const h=new Map;for(const f of Object.keys(d)){let b=d[f];i===1&&(b=b.ds),h.set(parseInt(f,10),await Ot(b))}++c%1e3===0&&await Hs(0),s._index.set(u,h)}return s}static instantiateMiniSearch(t,r){const{documentCount:n,nextId:a,fieldIds:o,averageFieldLength:l,dirtCount:i,serializationVersion:s}=t;if(s!==1&&s!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new at(r);return c._documentCount=n,c._nextId=a,c._idToShortId=new Map,c._fieldIds=o,c._avgFieldLength=l,c._dirtCount=i||0,c._index=new nt,c}executeQuery(t,r={}){if(t===at.wildcard)return this.executeWildcardQuery(r);if(typeof t!="string"){const h={...r,...t,queries:void 0},f=t.queries.map(b=>this.executeQuery(b,h));return this.combineResults(f,h.combineWith)}const{tokenize:n,processTerm:a,searchOptions:o}=this._options,l={tokenize:n,processTerm:a,...o,...r},{tokenize:i,processTerm:s}=l,d=i(t).flatMap(h=>s(h)).filter(h=>!!h).map(vh(l)).map(h=>this.executeQuerySpec(h,l));return this.combineResults(d,l.combineWith)}executeQuerySpec(t,r){const n={...this._options.searchOptions,...r},a=(n.fields||this._options.fields).reduce((y,k)=>({...y,[k]:Vr(n.boost,k)||1}),{}),{boostDocument:o,weights:l,maxFuzzy:i,bm25:s}=n,{fuzzy:c,prefix:u}={...Bo.weights,...l},d=this._index.get(t.term),h=this.termResults(t.term,t.term,1,t.termBoost,d,a,o,s);let f,b;if(t.prefix&&(f=this._index.atPrefix(t.term)),t.fuzzy){const y=t.fuzzy===!0?.2:t.fuzzy,k=y<1?Math.min(i,Math.round(t.term.length*y)):y;k&&(b=this._index.fuzzyGet(t.term,k))}if(f)for(const[y,k]of f){const I=y.length-t.term.length;if(!I)continue;b==null||b.delete(y);const E=u*y.length/(y.length+.3*I);this.termResults(t.term,y,E,t.termBoost,k,a,o,s,h)}if(b)for(const y of b.keys()){const[k,I]=b.get(y);if(!I)continue;const E=c*y.length/(y.length+I);this.termResults(t.term,y,E,t.termBoost,k,a,o,s,h)}return h}executeWildcardQuery(t){const r=new Map,n={...this._options.searchOptions,...t};for(const[a,o]of this._documentIds){const l=n.boostDocument?n.boostDocument(o,"",this._storedFields.get(a)):1;r.set(a,{score:l,terms:[],match:{}})}return r}combineResults(t,r=Gn){if(t.length===0)return new Map;const n=r.toLowerCase(),a=gh[n];if(!a)throw new Error(`Invalid combination operator: ${r}`);return t.reduce(a)||new Map}toJSON(){const t=[];for(const[r,n]of this._index){const a={};for(const[o,l]of n)a[o]=Object.fromEntries(l);t.push([r,a])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,r,n,a,o,l,i,s,c=new Map){if(o==null)return c;for(const u of Object.keys(l)){const d=l[u],h=this._fieldIds[u],f=o.get(h);if(f==null)continue;let b=f.size;const y=this._avgFieldLength[h];for(const k of f.keys()){if(!this._documentIds.has(k)){this.removeTerm(h,k,r),b-=1;continue}const I=i?i(this._documentIds.get(k),r,this._storedFields.get(k)):1;if(!I)continue;const E=f.get(k),j=this._fieldLength.get(k)[h],A=mh(E,b,this._documentCount,j,y,s),N=n*a*d*I*A,z=c.get(k);if(z){z.score+=N,bh(z.terms,t);const m=Vr(z.match,r);m?m.push(u):z.match[r]=[u]}else c.set(k,{score:N,terms:[t],match:{[r]:[u]}})}}return c}addTerm(t,r,n){const a=this._index.fetch(n,qo);let o=a.get(t);if(o==null)o=new Map,o.set(r,1),a.set(t,o);else{const l=o.get(r);o.set(r,(l||0)+1)}}removeTerm(t,r,n){if(!this._index.has(n)){this.warnDocumentChanged(r,t,n);return}const a=this._index.fetch(n,qo),o=a.get(t);o==null||o.get(r)==null?this.warnDocumentChanged(r,t,n):o.get(r)<=1?o.size<=1?a.delete(t):o.delete(r):o.set(r,o.get(r)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(t,r,n){for(const a of Object.keys(this._fieldIds))if(this._fieldIds[a]===r){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${n}" was not present in field "${a}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const r=this._nextId;return this._idToShortId.set(t,r),this._documentIds.set(r,t),this._documentCount+=1,this._nextId+=1,r}addFields(t){for(let r=0;rObject.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,gh={[Gn]:(e,t)=>{for(const r of t.keys()){const n=e.get(r);if(n==null)e.set(r,t.get(r));else{const{score:a,terms:o,match:l}=t.get(r);n.score=n.score+a,n.match=Object.assign(n.match,l),Vo(n.terms,o)}}return e},[$s]:(e,t)=>{const r=new Map;for(const n of t.keys()){const a=e.get(n);if(a==null)continue;const{score:o,terms:l,match:i}=t.get(n);Vo(a.terms,l),r.set(n,{score:a.score+o,terms:a.terms,match:Object.assign(a.match,i)})}return r},[hh]:(e,t)=>{for(const r of t.keys())e.delete(r);return e}},ph={k:1.2,b:.7,d:.5},mh=(e,t,r,n,a,o)=>{const{k:l,b:i,d:s}=o;return Math.log(1+(r-t+.5)/(t+.5))*(s+e*(l+1)/(e+l*(1-i+i*n/a)))},vh=e=>(t,r,n)=>{const a=typeof e.fuzzy=="function"?e.fuzzy(t,r,n):e.fuzzy||!1,o=typeof e.prefix=="function"?e.prefix(t,r,n):e.prefix===!0,l=typeof e.boostTerm=="function"?e.boostTerm(t,r,n):1;return{term:t,fuzzy:a,prefix:o,termBoost:l}},Ur={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(wh),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},Bo={combineWith:Gn,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:ph},yh={combineWith:$s,prefix:(e,t,r)=>t===r.length-1},pn={batchSize:1e3,batchWait:10},mn={minDirtFactor:.1,minDirtCount:20},qr={...pn,...mn},bh=(e,t)=>{e.includes(t)||e.push(t)},Vo=(e,t)=>{for(const r of t)e.includes(r)||e.push(r)},Uo=({score:e},{score:t})=>t-e,qo=()=>new Map,Dt=e=>{const t=new Map;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]);return t},Ot=async e=>{const t=new Map;let r=0;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]),++r%1e3===0&&await Hs(0);return t},Hs=e=>new Promise(t=>setTimeout(t,e)),wh=/[\n\r\p{Z}\p{P}]+/u,xh={index:new at({fields:[]})};p.createContext(xh);const vn=({label:e,color:t,hidden:r,labels:n={}})=>W.createElement("div",{className:"node"},W.createElement("span",{className:"render "+(r?"circle":"disc"),style:{backgroundColor:t||"#000"}}),W.createElement("span",{className:`label ${r?"text-muted":""} ${e?"":"text-italic"}`},e||n.no_label||"No label")),Sh=({id:e,labels:t})=>{const r=Be(),n=p.useMemo(()=>{const a=r.getGraph().getNodeAttributes(e),o=r.getSetting("nodeReducer");return Object.assign(Object.assign({color:r.getSetting("defaultNodeColor")},a),o?o(e,a):{})},[r,e]);return W.createElement(vn,Object.assign({},n,{labels:t}))},_h=({label:e,color:t,source:r,target:n,hidden:a,directed:o,labels:l={}})=>W.createElement("div",{className:"edge"},W.createElement(vn,Object.assign({},r,{labels:l})),W.createElement("div",{className:"body"},W.createElement("div",{className:"render"},W.createElement("span",{className:a?"dotted":"dash",style:{borderColor:t||"#000"}})," ",o&&W.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),W.createElement("span",{className:`label ${a?"text-muted":""} ${e?"":"fst-italic"}`},e||l.no_label||"No label")),W.createElement(vn,Object.assign({},n,{labels:l}))),Eh=({id:e,labels:t})=>{const r=Be(),n=p.useMemo(()=>{const a=r.getGraph().getEdgeAttributes(e),o=r.getSetting("nodeReducer"),l=r.getSetting("edgeReducer"),i=r.getGraph().getNodeAttributes(r.getGraph().source(e)),s=r.getGraph().getNodeAttributes(r.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:r.getSetting("defaultEdgeColor"),directed:r.getGraph().isDirected(e)},a),l?l(e,a):{}),{source:Object.assign(Object.assign({color:r.getSetting("defaultNodeColor")},i),o?o(e,i):{}),target:Object.assign(Object.assign({color:r.getSetting("defaultNodeColor")},s),o?o(e,s):{})})},[r,e]);return W.createElement(_h,Object.assign({},n,{labels:t}))};function Bs(e,t){const[r,n]=p.useState(e);return p.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r}function Ch({fetcher:e,preload:t,filterFn:r,renderOption:n,getOptionValue:a,notFound:o,loadingSkeleton:l,label:i,placeholder:s="Select...",value:c,onChange:u,onFocus:d,disabled:h=!1,className:f,noResultsMessage:b}){const[y,k]=p.useState(!1),[I,E]=p.useState(!1),[j,A]=p.useState([]),[N,z]=p.useState(!1),[m,_]=p.useState(null),[x,T]=p.useState(""),R=Bs(x,t?0:150),O=p.useRef(null);p.useEffect(()=>{k(!0)},[]),p.useEffect(()=>{const C=S=>{O.current&&!O.current.contains(S.target)&&I&&E(!1)};return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[I]);const w=p.useCallback(async C=>{try{z(!0),_(null);const S=await e(C);A(S)}catch(S){_(S instanceof Error?S.message:"Failed to fetch options")}finally{z(!1)}},[e]);p.useEffect(()=>{y&&(t?R&&A(C=>C.filter(S=>r?r(S,R):!0)):w(R))},[y,R,t,r,w]),p.useEffect(()=>{!y||!c||w(c)},[y,c,w]);const H=p.useCallback(C=>{u(C),requestAnimationFrame(()=>{const S=document.activeElement;S==null||S.blur(),E(!1)})},[u]),K=p.useCallback(()=>{E(!0),w(x)},[x,w]),D=p.useCallback(C=>{C.target.closest(".cmd-item")&&C.preventDefault()},[]);return g.jsx("div",{ref:O,className:fe(h&&"cursor-not-allowed opacity-50",f),onMouseDown:D,children:g.jsxs(cr,{shouldFilter:!1,className:"bg-transparent",children:[g.jsxs("div",{children:[g.jsx(Pn,{placeholder:s,value:x,className:"max-h-8",onFocus:K,onValueChange:C=>{T(C),I||E(!0)}}),N&&g.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:g.jsx(Ua,{className:"h-4 w-4 animate-spin"})})]}),g.jsxs(ur,{hidden:!I,children:[m&&g.jsx("div",{className:"text-destructive p-4 text-center",children:m}),N&&j.length===0&&(l||g.jsx(kh,{})),!N&&!m&&j.length===0&&(o||g.jsx(zn,{children:b??`No ${i.toLowerCase()} found.`})),g.jsx(Et,{children:j.map((C,S)=>g.jsxs(W.Fragment,{children:[g.jsx(Ct,{value:a(C),onSelect:H,onMouseMove:()=>d(a(C)),className:"truncate cmd-item",children:n(C)},a(C)+`${S}`),S!==j.length-1&&g.jsx("div",{className:"bg-foreground/10 h-[1px]"},`divider-${S}`)]},a(C)+`-fragment-${S}`))})]})]})})}function kh(){return g.jsx(Et,{children:g.jsx(Ct,{disabled:!0,children:g.jsxs("div",{className:"flex w-full items-center gap-2",children:[g.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),g.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[g.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),g.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const Wr="__message_item",Th=({id:e})=>{const t=te.use.sigmaGraph();return t!=null&&t.hasNode(e)?g.jsx(Sh,{id:e}):null};function Rh(e){return g.jsxs("div",{children:[e.type==="nodes"&&g.jsx(Th,{id:e.id}),e.type==="edges"&&g.jsx(Eh,{id:e.id}),e.type==="message"&&g.jsx("div",{children:e.message})]})}const Ah=({onChange:e,onFocus:t,value:r})=>{const{t:n}=Se(),a=te.use.sigmaGraph(),o=te.use.searchEngine();p.useEffect(()=>{a&&te.getState().resetSearchEngine()},[a]),p.useEffect(()=>{if(!a||a.nodes().length===0||o)return;const i=new at({idField:"id",fields:["label"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),s=a.nodes().map(c=>({id:c,label:a.getNodeAttribute(c,"label")}));i.addAll(s),te.getState().setSearchEngine(i)},[a,o]);const l=p.useCallback(async i=>{if(t&&t(null),!a||!o)return[];if(a.nodes().length===0)return[];if(!i)return a.nodes().filter(u=>a.hasNode(u)).slice(0,Nt).map(u=>({id:u,type:"nodes"}));let s=o.search(i).filter(c=>a.hasNode(c.id)).map(c=>({id:c.id,type:"nodes"}));if(s.length<5){const c=new Set(s.map(d=>d.id)),u=a.nodes().filter(d=>{if(c.has(d))return!1;const h=a.getNodeAttribute(d,"label");return h&&typeof h=="string"&&!h.toLowerCase().startsWith(i.toLowerCase())&&h.toLowerCase().includes(i.toLowerCase())}).map(d=>({id:d,type:"nodes"}));s=[...s,...u]}return s.length<=Nt?s:[...s.slice(0,Nt),{type:"message",id:Wr,message:n("graphPanel.search.message",{count:s.length-Nt})}]},[a,o,t,n]);return g.jsx(Ch,{className:"bg-background/60 w-24 rounded-xl border-1 opacity-60 backdrop-blur-lg transition-all hover:w-fit hover:opacity-100",fetcher:l,renderOption:Rh,getOptionValue:i=>i.id,value:r&&r.type!=="message"?r.id:null,onChange:i=>{i!==Wr&&e(i?{id:i,type:"nodes"}:null)},onFocus:i=>{i!==Wr&&t&&t(i?{id:i,type:"nodes"}:null)},label:"item",placeholder:n("graphPanel.search.placeholder")})},jh=({...e})=>g.jsx(Ah,{...e});function Nh({fetcher:e,preload:t,filterFn:r,renderOption:n,getOptionValue:a,getDisplayValue:o,notFound:l,loadingSkeleton:i,label:s,placeholder:c="Select...",value:u,onChange:d,disabled:h=!1,className:f,triggerClassName:b,searchInputClassName:y,noResultsMessage:k,triggerTooltip:I,clearable:E=!0}){const[j,A]=p.useState(!1),[N,z]=p.useState(!1),[m,_]=p.useState([]),[x,T]=p.useState(!1),[R,O]=p.useState(null),[w,H]=p.useState(u),[K,D]=p.useState(null),[C,S]=p.useState(""),B=Bs(C,t?0:150),[ae,M]=p.useState([]),[v,P]=p.useState(null);p.useEffect(()=>{A(!0),H(u)},[u]),p.useEffect(()=>{u&&(!m.length||!K)?P(g.jsx("div",{children:u})):K&&P(null)},[u,m.length,K]),p.useEffect(()=>{if(u&&m.length>0){const $=m.find(J=>a(J)===u);$&&D($)}},[u,m,a]),p.useEffect(()=>{j||(async()=>{try{T(!0),O(null);const J=await e(u);M(J),_(J)}catch(J){O(J instanceof Error?J.message:"Failed to fetch options")}finally{T(!1)}})()},[j,e,u]),p.useEffect(()=>{const $=async()=>{try{T(!0),O(null);const J=await e(B);M(J),_(J)}catch(J){O(J instanceof Error?J.message:"Failed to fetch options")}finally{T(!1)}};j&&t?t&&_(B?ae.filter(J=>r?r(J,B):!0):ae):$()},[e,B,j,t,r]);const V=p.useCallback($=>{const J=E&&$===w?"":$;H(J),D(m.find(X=>a(X)===J)||null),d(J),z(!1)},[w,d,E,m,a]);return g.jsxs(Tn,{open:N,onOpenChange:z,children:[g.jsx(Rn,{asChild:!0,children:g.jsxs(be,{variant:"outline",role:"combobox","aria-expanded":N,className:fe("justify-between",h&&"cursor-not-allowed opacity-50",b),disabled:h,tooltip:I,side:"bottom",children:[u==="*"?g.jsx("div",{children:"*"}):K?o(K):v||c,g.jsx(Dc,{className:"opacity-50",size:10})]})}),g.jsx(ir,{className:fe("p-0",f),onCloseAutoFocus:$=>$.preventDefault(),align:"start",sideOffset:8,collisionPadding:5,children:g.jsxs(cr,{shouldFilter:!1,children:[g.jsxs("div",{className:"relative w-full border-b",children:[g.jsx(Pn,{placeholder:`Search ${s.toLowerCase()}...`,value:C,onValueChange:$=>{S($)},className:y}),x&&m.length>0&&g.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:g.jsx(Ua,{className:"h-4 w-4 animate-spin"})})]}),g.jsxs(ur,{children:[R&&g.jsx("div",{className:"text-destructive p-4 text-center",children:R}),x&&m.length===0&&(i||g.jsx(Ih,{})),!x&&!R&&m.length===0&&(l||g.jsx(zn,{children:k??`No ${s.toLowerCase()} found.`})),g.jsx(Et,{children:m.map($=>g.jsxs(Ct,{value:a($),onSelect:V,className:"truncate",children:[n($),g.jsx(Va,{className:fe("ml-auto h-3 w-3",w===a($)?"opacity-100":"opacity-0")})]},a($)))})]})]})})]})}function Ih(){return g.jsx(Et,{children:g.jsx(Ct,{disabled:!0,children:g.jsxs("div",{className:"flex w-full items-center gap-2",children:[g.jsx("div",{className:"bg-muted h-6 w-6 animate-pulse rounded-full"}),g.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[g.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),g.jsx("div",{className:"bg-muted h-3 w-16 animate-pulse rounded"})]})]})})})}const Lh=()=>{const{t:e}=Se(),t=Z.use.queryLabel(),r=te.use.allDatabaseLabels(),n=te.use.labelsFetchAttempted(),a=p.useCallback(()=>{const i=new at({idField:"id",fields:["value"],searchOptions:{prefix:!0,fuzzy:.2,boost:{label:2}}}),s=r.map((c,u)=>({id:u,value:c}));return i.addAll(s),{labels:r,searchEngine:i}},[r]),o=p.useCallback(async i=>{const{labels:s,searchEngine:c}=a();let u=s;if(i&&(u=c.search(i).map(d=>s[d.id]),u.length<15)){const d=new Set(u),h=s.filter(f=>d.has(f)?!1:f&&typeof f=="string"&&!f.toLowerCase().startsWith(i.toLowerCase())&&f.toLowerCase().includes(i.toLowerCase()));u=[...u,...h]}return u.length<=Xn?u:[...u.slice(0,Xn),"..."]},[a]);p.useEffect(()=>{n&&(r.length>1?t&&t!=="*"&&!r.includes(t)?(console.log(`Label "${t}" not in available labels, setting to "*"`),Z.getState().setQueryLabel("*")):console.log(`Label "${t}" is valid`):t&&r.length<=1&&t&&t!=="*"&&(console.log("Available labels list is empty, setting label to empty"),Z.getState().setQueryLabel("")),te.getState().setLabelsFetchAttempted(!1))},[r,t,n]);const l=p.useCallback(()=>{te.getState().setLabelsFetchAttempted(!1),te.getState().setGraphDataFetchAttempted(!1),te.getState().setLastSuccessfulQueryLabel("");const i=Z.getState().queryLabel;i?(Z.getState().setQueryLabel(""),setTimeout(()=>{Z.getState().setQueryLabel(i)},0)):Z.getState().setQueryLabel("*")},[]);return g.jsxs("div",{className:"flex items-center",children:[g.jsx(be,{size:"icon",variant:Ie,onClick:l,tooltip:e("graphPanel.graphLabels.refreshTooltip"),className:"mr-2",children:g.jsx(du,{className:"h-4 w-4"})}),g.jsx(Nh,{className:"min-w-[300px]",triggerClassName:"max-h-8",searchInputClassName:"max-h-8",triggerTooltip:e("graphPanel.graphLabels.selectTooltip"),fetcher:o,renderOption:i=>g.jsx("div",{children:i}),getOptionValue:i=>i,getDisplayValue:i=>g.jsx("div",{children:i}),notFound:g.jsx("div",{className:"py-6 text-center text-sm",children:"No labels found"}),label:e("graphPanel.graphLabels.label"),placeholder:e("graphPanel.graphLabels.placeholder"),value:t!==null?t:"*",onChange:i=>{const s=Z.getState().queryLabel;i==="..."&&(i="*"),i===s&&i!=="*"&&(i="*"),te.getState().setGraphDataFetchAttempted(!1),Z.getState().setQueryLabel(i)},clearable:!1})]})},Vs=({text:e,className:t,tooltipClassName:r,tooltip:n,side:a,onClick:o})=>n?g.jsx(Ma,{delayDuration:200,children:g.jsxs($a,{children:[g.jsx(Ha,{asChild:!0,children:g.jsx("label",{className:fe(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e})}),g.jsx(kn,{side:a,className:r,children:n})]})}):g.jsx("label",{className:fe(t,o!==void 0?"cursor-pointer":void 0),onClick:o,children:e});var Gt={exports:{}},Ph=Gt.exports,Wo;function zh(){return Wo||(Wo=1,function(e){(function(t,r,n){function a(s){var c=this,u=i();c.next=function(){var d=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=d-(c.c=d|0)},c.c=1,c.s0=u(" "),c.s1=u(" "),c.s2=u(" "),c.s0-=u(s),c.s0<0&&(c.s0+=1),c.s1-=u(s),c.s1<0&&(c.s1+=1),c.s2-=u(s),c.s2<0&&(c.s2+=1),u=null}function o(s,c){return c.c=s.c,c.s0=s.s0,c.s1=s.s1,c.s2=s.s2,c}function l(s,c){var u=new a(s),d=c&&c.state,h=u.next;return h.int32=function(){return u.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,d&&(typeof d=="object"&&o(d,u),h.state=function(){return o(u,{})}),h}function i(){var s=4022871197,c=function(u){u=String(u);for(var d=0;d>>0,h-=s,h*=s,s=h>>>0,h-=s,s+=h*4294967296}return(s>>>0)*23283064365386963e-26};return c}r&&r.exports?r.exports=l:this.alea=l})(Ph,e)}(Gt)),Gt.exports}var Ft={exports:{}},Dh=Ft.exports,Xo;function Oh(){return Xo||(Xo=1,function(e){(function(t,r,n){function a(i){var s=this,c="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var d=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^d^d>>>8},i===(i|0)?s.x=i:c+=i;for(var u=0;u>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,b=(h+f)/(1<<21);while(b===0);return b},d.int32=c.next,d.quick=d,u&&(typeof u=="object"&&o(u,c),d.state=function(){return o(c,{})}),d}r&&r.exports?r.exports=l:this.xor128=l})(Dh,e)}(Ft)),Ft.exports}var Mt={exports:{}},Gh=Mt.exports,Yo;function Fh(){return Yo||(Yo=1,function(e){(function(t,r,n){function a(i){var s=this,c="";s.next=function(){var d=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(d^d<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,i===(i|0)?s.x=i:c+=i;for(var u=0;u>>4),s.next()}function o(i,s){return s.x=i.x,s.y=i.y,s.z=i.z,s.w=i.w,s.v=i.v,s.d=i.d,s}function l(i,s){var c=new a(i),u=s&&s.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,b=(h+f)/(1<<21);while(b===0);return b},d.int32=c.next,d.quick=d,u&&(typeof u=="object"&&o(u,c),d.state=function(){return o(c,{})}),d}r&&r.exports?r.exports=l:this.xorwow=l})(Gh,e)}(Mt)),Mt.exports}var $t={exports:{}},Mh=$t.exports,Ko;function $h(){return Ko||(Ko=1,function(e){(function(t,r,n){function a(i){var s=this;s.next=function(){var u=s.x,d=s.i,h,f;return h=u[d],h^=h>>>7,f=h^h<<24,h=u[d+1&7],f^=h^h>>>10,h=u[d+3&7],f^=h^h>>>3,h=u[d+4&7],f^=h^h<<7,h=u[d+7&7],h=h^h<<13,f^=h^h<<9,u[d]=f,s.i=d+1&7,f};function c(u,d){var h,f=[];if(d===(d|0))f[0]=d;else for(d=""+d,h=0;h0;--h)u.next()}c(s,i)}function o(i,s){return s.x=i.x.slice(),s.i=i.i,s}function l(i,s){i==null&&(i=+new Date);var c=new a(i),u=s&&s.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,b=(h+f)/(1<<21);while(b===0);return b},d.int32=c.next,d.quick=d,u&&(u.x&&o(u,c),d.state=function(){return o(c,{})}),d}r&&r.exports?r.exports=l:this.xorshift7=l})(Mh,e)}($t)),$t.exports}var Ht={exports:{}},Hh=Ht.exports,Qo;function Bh(){return Qo||(Qo=1,function(e){(function(t,r,n){function a(i){var s=this;s.next=function(){var u=s.w,d=s.X,h=s.i,f,b;return s.w=u=u+1640531527|0,b=d[h+34&127],f=d[h=h+1&127],b^=b<<13,f^=f<<17,b^=b>>>15,f^=f>>>12,b=d[h]=b^f,s.i=h,b+(u^u>>>16)|0};function c(u,d){var h,f,b,y,k,I=[],E=128;for(d===(d|0)?(f=d,d=null):(d=d+"\0",f=0,E=Math.max(E,d.length)),b=0,y=-32;y>>15,f^=f<<4,f^=f>>>13,y>=0&&(k=k+1640531527|0,h=I[y&127]^=f+k,b=h==0?b+1:0);for(b>=128&&(I[(d&&d.length||0)&127]=-1),b=127,y=4*128;y>0;--y)f=I[b+34&127],h=I[b=b+1&127],f^=f<<13,h^=h<<17,f^=f>>>15,h^=h>>>12,I[b]=f^h;u.w=k,u.X=I,u.i=b}c(s,i)}function o(i,s){return s.i=i.i,s.w=i.w,s.X=i.X.slice(),s}function l(i,s){i==null&&(i=+new Date);var c=new a(i),u=s&&s.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,b=(h+f)/(1<<21);while(b===0);return b},d.int32=c.next,d.quick=d,u&&(u.X&&o(u,c),d.state=function(){return o(c,{})}),d}r&&r.exports?r.exports=l:this.xor4096=l})(Hh,e)}(Ht)),Ht.exports}var Bt={exports:{}},Vh=Bt.exports,Jo;function Uh(){return Jo||(Jo=1,function(e){(function(t,r,n){function a(i){var s=this,c="";s.next=function(){var d=s.b,h=s.c,f=s.d,b=s.a;return d=d<<25^d>>>7^h,h=h-f|0,f=f<<24^f>>>8^b,b=b-d|0,s.b=d=d<<20^d>>>12^h,s.c=h=h-f|0,s.d=f<<16^h>>>16^b,s.a=b-d|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,i===Math.floor(i)?(s.a=i/4294967296|0,s.b=i|0):c+=i;for(var u=0;u>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,b=(h+f)/(1<<21);while(b===0);return b},d.int32=c.next,d.quick=d,u&&(typeof u=="object"&&o(u,c),d.state=function(){return o(c,{})}),d}r&&r.exports?r.exports=l:this.tychei=l})(Vh,e)}(Bt)),Bt.exports}var Vt={exports:{}};const qh={},Wh=Object.freeze(Object.defineProperty({__proto__:null,default:qh},Symbol.toStringTag,{value:"Module"})),Xh=pi(Wh);var Yh=Vt.exports,Zo;function Kh(){return Zo||(Zo=1,function(e){(function(t,r,n){var a=256,o=6,l=52,i="random",s=n.pow(a,o),c=n.pow(2,l),u=c*2,d=a-1,h;function f(A,N,z){var m=[];N=N==!0?{entropy:!0}:N||{};var _=I(k(N.entropy?[A,j(r)]:A??E(),3),m),x=new b(m),T=function(){for(var R=x.g(o),O=s,w=0;R=u;)R/=2,O/=2,w>>>=1;return(R+w)/O};return T.int32=function(){return x.g(4)|0},T.quick=function(){return x.g(4)/4294967296},T.double=T,I(j(x.S),r),(N.pass||z||function(R,O,w,H){return H&&(H.S&&y(H,x),R.state=function(){return y(x,{})}),w?(n[i]=R,O):R})(T,_,"global"in N?N.global:this==n,N.state)}function b(A){var N,z=A.length,m=this,_=0,x=m.i=m.j=0,T=m.S=[];for(z||(A=[z++]);_{const t="#5D6D7E",r=e?e.toLowerCase():"unknown",n=te.getState().typeColorMap;if(n.has(r))return n.get(r)||t;const a=Zh[r];if(a){const c=ta[a],u=new Map(n);return u.set(r,c),te.setState({typeColorMap:u}),c}const o=new Set(Array.from(n.entries()).filter(([,c])=>!Object.values(ta).includes(c)).map(([,c])=>c)),i=eg.find(c=>!o.has(c))||t,s=new Map(n);return s.set(r,i),te.setState({typeColorMap:s}),i},tg=e=>{if(!e)return console.log("Graph validation failed: graph is null"),!1;if(!Array.isArray(e.nodes)||!Array.isArray(e.edges))return console.log("Graph validation failed: nodes or edges is not an array"),!1;if(e.nodes.length===0)return console.log("Graph validation failed: nodes array is empty"),!1;for(const t of e.nodes)if(!t.id||!t.labels||!t.properties)return console.log("Graph validation failed: invalid node structure"),!1;for(const t of e.edges)if(!t.id||!t.source||!t.target)return console.log("Graph validation failed: invalid edge structure"),!1;for(const t of e.edges){const r=e.getNode(t.source),n=e.getNode(t.target);if(r==null||n==null)return console.log("Graph validation failed: edge references non-existent node"),!1}return console.log("Graph validation passed"),!0},rg=async(e,t,r)=>{let n=null;if(!te.getState().lastSuccessfulQueryLabel){console.log("Last successful queryLabel is empty");try{await te.getState().fetchAllDatabaseLabels()}catch(i){console.error("Failed to fetch all database labels:",i)}}te.getState().setLabelsFetchAttempted(!0);const o=e||"*";try{console.log(`Fetching graph label: ${o}, depth: ${t}, nodes: ${r}`),n=await Ca(o,t,r)}catch(i){return En.getState().setErrorMessage(rr(i),"Query Graphs Error!"),null}let l=null;if(n){const i={},s={};for(let h=0;h0){const h=Jr-ut;for(const f of n.nodes)f.size=Math.round(ut+h*Math.pow((f.degree-c)/d,.5))}l=new rl,l.nodes=n.nodes,l.edges=n.edges,l.nodeIdMap=i,l.edgeIdMap=s,tg(l)||(l=null,console.warn("Invalid graph data")),console.log("Graph data loaded")}return{rawGraph:l,is_truncated:n.is_truncated}},ng=e=>{var i,s;const t=Z.getState().minEdgeSize,r=Z.getState().maxEdgeSize;if(!e||!e.nodes.length)return console.log("No graph data available, skipping sigma graph creation"),null;const n=new Yr;for(const c of(e==null?void 0:e.nodes)??[]){yn(c.id+Date.now().toString(),{global:!0});const u=Math.random(),d=Math.random();n.addNode(c.id,{label:c.labels.join(", "),color:c.color,x:u,y:d,size:c.size,borderColor:Qr,borderSize:.2})}for(const c of(e==null?void 0:e.edges)??[]){const u=((i=c.properties)==null?void 0:i.weight)!==void 0?Number(c.properties.weight):1;c.dynamicId=n.addEdge(c.source,c.target,{label:((s=c.properties)==null?void 0:s.keywords)||void 0,size:u,originalWeight:u,type:"curvedNoArrow"})}let a=Number.MAX_SAFE_INTEGER,o=0;n.forEachEdge(c=>{const u=n.getEdgeAttribute(c,"originalWeight")||1;a=Math.min(a,u),o=Math.max(o,u)});const l=o-a;if(l>0){const c=r-t;n.forEachEdge(u=>{const d=n.getEdgeAttribute(u,"originalWeight")||1,h=t+c*Math.pow((d-a)/l,.5);n.setEdgeAttribute(u,"size",h)})}else n.forEachEdge(c=>{n.setEdgeAttribute(c,"size",t)});return n},og=()=>{const{t:e}=Se(),t=Z.use.queryLabel(),r=te.use.rawGraph(),n=te.use.sigmaGraph(),a=Z.use.graphQueryMaxDepth(),o=Z.use.graphMaxNodes(),l=te.use.isFetching(),i=te.use.nodeToExpand(),s=te.use.nodeToPrune(),c=p.useRef(!1),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(I=>(r==null?void 0:r.getNode(I))||null,[r]),f=p.useCallback((I,E=!0)=>(r==null?void 0:r.getEdge(I,E))||null,[r]),b=p.useRef(!1);p.useEffect(()=>{if(!t&&(r!==null||n!==null)){const I=te.getState();I.reset(),I.setGraphDataFetchAttempted(!1),I.setLabelsFetchAttempted(!1),c.current=!1,u.current=!1}},[t,r,n]),p.useEffect(()=>{if(!b.current&&!(!t&&d.current)&&!l&&!te.getState().graphDataFetchAttempted){b.current=!0,te.getState().setGraphDataFetchAttempted(!0);const I=te.getState();I.setIsFetching(!0),I.clearSelection(),I.sigmaGraph&&I.sigmaGraph.forEachNode(z=>{var m;(m=I.sigmaGraph)==null||m.setNodeAttribute(z,"highlighted",!1)}),console.log("Preparing graph data...");const E=t,j=a,A=o;let N;E?N=rg(E,j,A):(console.log("Query label is empty, show empty graph"),N=Promise.resolve({rawGraph:null,is_truncated:!1})),N.then(z=>{const m=te.getState(),_=z==null?void 0:z.rawGraph;if(_&&_.nodes&&_.nodes.forEach(x=>{var R;const T=(R=x.properties)==null?void 0:R.entity_type;x.color=ra(T)}),z!=null&&z.is_truncated&&rt.info(e("graphPanel.dataIsTruncated","Graph data is truncated to Max Nodes")),m.reset(),!_||!_.nodes||_.nodes.length===0){const x=new Yr;x.addNode("empty-graph-node",{label:e("graphPanel.emptyGraph"),color:"#5D6D7E",x:.5,y:.5,size:15,borderColor:Qr,borderSize:.2}),m.setSigmaGraph(x),m.setRawGraph(null),m.setGraphIsEmpty(!0);const T=En.getState().message,R=T&&T.includes("Authentication required");!R&&E&&Z.getState().setQueryLabel(""),R?console.log("Keep queryLabel for post-login reload"):m.setLastSuccessfulQueryLabel(""),console.log(`Graph data is empty, created graph with empty graph node. Auth error: ${R}`)}else{const x=ng(_);_.buildDynamicMap(),m.setSigmaGraph(x),m.setRawGraph(_),m.setGraphIsEmpty(!1),m.setLastSuccessfulQueryLabel(E),m.setMoveToSelectedNode(!0)}c.current=!0,u.current=!0,b.current=!1,m.setIsFetching(!1),(!_||!_.nodes||_.nodes.length===0)&&!E&&(d.current=!0)}).catch(z=>{console.error("Error fetching graph data:",z);const m=te.getState();m.setIsFetching(!1),c.current=!1,b.current=!1,m.setGraphDataFetchAttempted(!1),m.setLastSuccessfulQueryLabel("")})}},[t,a,o,l,e]),p.useEffect(()=>{i&&((async E=>{var j,A,N,z,m,_;if(!(!E||!n||!r))try{const x=r.getNode(E);if(!x){console.error("Node not found:",E);return}const T=x.labels[0];if(!T){console.error("Node has no label:",E);return}const R=await Ca(T,2,1e3);if(!R||!R.nodes||!R.edges){console.error("Failed to fetch extended graph");return}const O=[];for(const F of R.nodes){yn(F.id,{global:!0});const Q=(j=F.properties)==null?void 0:j.entity_type,q=ra(Q);O.push({id:F.id,labels:F.labels,properties:F.properties,size:10,x:Math.random(),y:Math.random(),color:q,degree:0})}const w=[];for(const F of R.edges)w.push({id:F.id,source:F.source,target:F.target,type:F.type,properties:F.properties,dynamicId:""});const H={};n.forEachNode(F=>{H[F]={x:n.getNodeAttribute(F,"x"),y:n.getNodeAttribute(F,"y")}});const K=new Set(n.nodes()),D=new Set,C=new Set,S=1;let B=0,ae=Number.MAX_SAFE_INTEGER,M=0;n.forEachNode(F=>{const Q=n.degree(F);B=Math.max(B,Q)}),n.forEachEdge(F=>{const Q=n.getEdgeAttribute(F,"originalWeight")||1;ae=Math.min(ae,Q),M=Math.max(M,Q)});for(const F of O){if(K.has(F.id))continue;w.some(q=>q.source===E&&q.target===F.id||q.target===E&&q.source===F.id)&&D.add(F.id)}const v=new Map,P=new Map,V=new Set;for(const F of w){const Q=K.has(F.source)||D.has(F.source),q=K.has(F.target)||D.has(F.target);Q&&q?(C.add(F.id),D.has(F.source)?v.set(F.source,(v.get(F.source)||0)+1):K.has(F.source)&&P.set(F.source,(P.get(F.source)||0)+1),D.has(F.target)?v.set(F.target,(v.get(F.target)||0)+1):K.has(F.target)&&P.set(F.target,(P.get(F.target)||0)+1)):(n.hasNode(F.source)?V.add(F.source):D.has(F.source)&&(V.add(F.source),v.set(F.source,(v.get(F.source)||0)+1)),n.hasNode(F.target)?V.add(F.target):D.has(F.target)&&(V.add(F.target),v.set(F.target,(v.get(F.target)||0)+1)))}const $=(F,Q,q,U)=>{const L=U-q||1,oe=Jr-ut;for(const ue of Q)if(F.hasNode(ue)){let re=F.degree(ue);re+=1;const ee=Math.min(re,U+1),G=Math.round(ut+oe*Math.pow((ee-q)/L,.5));F.setNodeAttribute(ue,"size",G)}},J=(F,Q,q)=>{const U=Z.getState().minEdgeSize,L=Z.getState().maxEdgeSize,oe=q-Q||1,ue=L-U;F.forEachEdge(re=>{const ee=F.getEdgeAttribute(re,"originalWeight")||1,G=U+ue*Math.pow((ee-Q)/oe,.5);F.setEdgeAttribute(re,"size",G)})};if(D.size===0){$(n,V,S,B),rt.info(e("graphPanel.propertiesView.node.noNewNodes"));return}for(const[,F]of v.entries())B=Math.max(B,F);for(const[F,Q]of P.entries()){const U=n.degree(F)+Q;B=Math.max(B,U)}const X=B-S||1,Y=Jr-ut,ie=((A=te.getState().sigmaInstance)==null?void 0:A.getCamera().ratio)||1,ne=Math.max(Math.sqrt(x.size)*4,Math.sqrt(D.size)*3)/ie;yn(Date.now().toString(),{global:!0});const se=Math.random()*2*Math.PI;console.log("nodeSize:",x.size,"nodesToAdd:",D.size),console.log("cameraRatio:",Math.round(ie*100)/100,"spreadFactor:",Math.round(ne*100)/100);for(const F of D){const Q=O.find(ee=>ee.id===F),q=v.get(F)||0,U=Math.min(q,B+1),L=Math.round(ut+Y*Math.pow((U-S)/X,.5)),oe=2*Math.PI*(Array.from(D).indexOf(F)/D.size),ue=((N=H[F])==null?void 0:N.x)||H[x.id].x+Math.cos(se+oe)*ne,re=((z=H[F])==null?void 0:z.y)||H[x.id].y+Math.sin(se+oe)*ne;n.addNode(F,{label:Q.labels.join(", "),color:Q.color,x:ue,y:re,size:L,borderColor:Qr,borderSize:.2}),r.getNode(F)||(Q.size=L,Q.x=ue,Q.y=re,Q.degree=q,r.nodes.push(Q),r.nodeIdMap[F]=r.nodes.length-1)}for(const F of C){const Q=w.find(U=>U.id===F);if(n.hasEdge(Q.source,Q.target))continue;const q=((m=Q.properties)==null?void 0:m.weight)!==void 0?Number(Q.properties.weight):1;ae=Math.min(ae,q),M=Math.max(M,q),Q.dynamicId=n.addEdge(Q.source,Q.target,{label:((_=Q.properties)==null?void 0:_.keywords)||void 0,size:q,originalWeight:q,type:"curvedNoArrow"}),r.getEdge(Q.id,!1)?console.error("Edge already exists in rawGraph:",Q.id):(r.edges.push(Q),r.edgeIdMap[Q.id]=r.edges.length-1,r.edgeDynamicIdMap[Q.dynamicId]=r.edges.length-1)}if(r.buildDynamicMap(),te.getState().resetSearchEngine(),$(n,V,S,B),J(n,ae,M),n.hasNode(E)){const F=n.degree(E),Q=Math.min(F,B+1),q=Math.round(ut+Y*Math.pow((Q-S)/X,.5));n.setNodeAttribute(E,"size",q),x.size=q,x.degree=F}}catch(x){console.error("Error expanding node:",x)}})(i),window.setTimeout(()=>{te.getState().triggerNodeExpand(null)},0))},[i,n,r,e]);const y=p.useCallback((I,E)=>{const j=new Set([I]);return E.forEachNode(A=>{if(A===I)return;const N=E.neighbors(A);N.length===1&&N[0]===I&&j.add(A)}),j},[]);return p.useEffect(()=>{s&&((E=>{if(!(!E||!n||!r))try{const j=te.getState();if(!n.hasNode(E)){console.error("Node not found:",E);return}const A=y(E,n);if(A.size===n.nodes().length){rt.error(e("graphPanel.propertiesView.node.deleteAllNodesError"));return}j.clearSelection();for(const N of A){n.dropNode(N);const z=r.nodeIdMap[N];if(z!==void 0){const m=r.edges.filter(_=>_.source===N||_.target===N);for(const _ of m){const x=r.edgeIdMap[_.id];if(x!==void 0){r.edges.splice(x,1);for(const[T,R]of Object.entries(r.edgeIdMap))R>x&&(r.edgeIdMap[T]=R-1);delete r.edgeIdMap[_.id],delete r.edgeDynamicIdMap[_.dynamicId]}}r.nodes.splice(z,1);for(const[_,x]of Object.entries(r.nodeIdMap))x>z&&(r.nodeIdMap[_]=x-1);delete r.nodeIdMap[N]}}r.buildDynamicMap(),te.getState().resetSearchEngine(),A.size>1&&rt.info(e("graphPanel.propertiesView.node.nodesRemoved",{count:A.size}))}catch(j){console.error("Error pruning node:",j)}})(s),window.setTimeout(()=>{te.getState().triggerNodePrune(null)},0))},[s,n,r,y,e]),{lightrageGraph:p.useCallback(()=>{if(n)return n;console.log("Creating new Sigma graph instance");const I=new Yr;return te.getState().setSigmaGraph(I),I},[n]),getNode:h,getEdge:f}},ag=({name:e})=>{const{t}=Se(),r=n=>{const a=`graphPanel.propertiesView.node.propertyNames.${n}`,o=t(a);return o===a?n:o};return g.jsx("span",{className:"text-primary/60 tracking-wide whitespace-nowrap",children:r(e)})},sg=({onClick:e})=>g.jsx("div",{children:g.jsx(iu,{className:"h-3 w-3 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:e})}),ig=({value:e,onClick:t,tooltip:r})=>g.jsx("div",{className:"flex items-center gap-1 overflow-hidden",children:g.jsx(Vs,{className:"hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis whitespace-nowrap",tooltipClassName:"max-w-80 -translate-x-15",text:e,tooltip:r||(typeof e=="string"?e:JSON.stringify(e,null,2)),side:"left",onClick:t})}),lg=({isOpen:e,onClose:t,onSave:r,propertyName:n,initialValue:a,isSubmitting:o=!1})=>{const{t:l}=Se(),[i,s]=p.useState(""),[c,u]=p.useState(null);p.useEffect(()=>{e&&s(a)},[e,a]);const d=b=>{const y=`graphPanel.propertiesView.node.propertyNames.${b}`,k=l(y);return k===y?b:k},h=b=>{switch(b){case"description":return{className:"max-h-[50vh] min-h-[10em] resize-y",style:{height:"70vh",minHeight:"20em",resize:"vertical"}};case"entity_id":return{rows:2,className:"",style:{}};case"keywords":return{rows:4,className:"",style:{}};default:return{rows:5,className:"",style:{}}}},f=async()=>{if(i.trim()!==""){u(null);try{await r(i),t()}catch(b){console.error("Save error:",b),u(typeof b=="object"&&b!==null&&b.message||l("common.saveFailed"))}}};return g.jsx(Pu,{open:e,onOpenChange:b=>!b&&t(),children:g.jsxs(Xa,{className:"sm:max-w-md",children:[g.jsxs(Ya,{children:[g.jsx(Qa,{children:l("graphPanel.propertiesView.editProperty",{property:d(n)})}),g.jsx(Ja,{children:l("graphPanel.propertiesView.editPropertyDescription")})]}),c&&g.jsx("div",{className:"bg-destructive/15 text-destructive px-4 py-2 rounded-md text-sm mt-2",children:c}),g.jsx("div",{className:"grid gap-4 py-4",children:(()=>{const b=h(n);return n==="description"?g.jsx("textarea",{value:i,onChange:y=>s(y.target.value),className:`border-input focus-visible:ring-ring flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${b.className}`,style:b.style,disabled:o}):g.jsx("textarea",{value:i,onChange:y=>s(y.target.value),rows:b.rows,className:`border-input focus-visible:ring-ring flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${b.className}`,disabled:o})})()}),g.jsxs(Ka,{children:[g.jsx(be,{type:"button",variant:"outline",onClick:t,disabled:o,children:l("common.cancel")}),g.jsx(be,{type:"button",onClick:f,disabled:o,children:o?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"mr-2",children:g.jsxs("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),l("common.saving")]}):l("common.save")})]})]})})},cg=({name:e,value:t,onClick:r,nodeId:n,edgeId:a,entityId:o,dynamicId:l,entityType:i,sourceId:s,targetId:c,onValueChange:u,isEditable:d=!1,tooltip:h})=>{const{t:f}=Se(),[b,y]=p.useState(!1),[k,I]=p.useState(!1),[E,j]=p.useState(t);p.useEffect(()=>{j(t)},[t]);const A=()=>{d&&!b&&y(!0)},N=()=>{y(!1)},z=async m=>{if(k||m===String(E)){y(!1);return}I(!0);try{if(i==="node"&&o&&n){let _={[e]:m};if(e==="entity_id"){if(await cl(m)){rt.error(f("graphPanel.propertiesView.errors.duplicateName"));return}_={entity_name:m}}await il(o,_,!0);try{await te.getState().updateNodeAndSelect(n,o,e,m)}catch(x){throw console.error("Error updating node in graph:",x),new Error("Failed to update node in graph")}rt.success(f("graphPanel.propertiesView.success.entityUpdated"))}else if(i==="edge"&&s&&c&&a&&l){const _={[e]:m};await ll(s,c,_);try{await te.getState().updateEdgeAndSelect(a,l,s,c,e,m)}catch(x){throw console.error(`Error updating edge ${s}->${c} in graph:`,x),new Error("Failed to update edge in graph")}rt.success(f("graphPanel.propertiesView.success.relationUpdated"))}y(!1),j(m),u==null||u(m)}catch(_){console.error("Error updating property:",_),rt.error(f("graphPanel.propertiesView.errors.updateFailed"))}finally{I(!1)}};return g.jsxs("div",{className:"flex items-center gap-1 overflow-hidden",children:[g.jsx(ag,{name:e}),g.jsx(sg,{onClick:A}),":",g.jsx(ig,{value:E,onClick:r,tooltip:h||(typeof E=="string"?E:JSON.stringify(E,null,2))}),g.jsx(lg,{isOpen:b,onClose:N,onSave:z,propertyName:e,initialValue:String(E),isSubmitting:k})]})},ug=()=>{const{getNode:e,getEdge:t}=og(),r=te.use.selectedNode(),n=te.use.focusedNode(),a=te.use.selectedEdge(),o=te.use.focusedEdge(),l=te.use.graphDataVersion(),[i,s]=p.useState(null),[c,u]=p.useState(null);return p.useEffect(()=>{let d=null,h=null;n?(d="node",h=e(n)):r?(d="node",h=e(r)):o?(d="edge",h=t(o,!0)):a&&(d="edge",h=t(a,!0)),h?(d=="node"?s(dg(h)):s(fg(h)),u(d)):(s(null),u(null))},[n,r,o,a,l,s,u,e,t]),i?g.jsx("div",{className:"bg-background/80 max-w-xs rounded-lg border-2 p-2 text-xs backdrop-blur-lg",children:c=="node"?g.jsx(hg,{node:i}):g.jsx(gg,{edge:i})}):g.jsx(g.Fragment,{})},dg=e=>{const t=te.getState(),r=[];if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasNode(e.id))return console.warn("Node not found in sigmaGraph:",e.id),{...e,relationships:[]};const n=t.sigmaGraph.edges(e.id);for(const a of n){if(!t.sigmaGraph.hasEdge(a))continue;const o=t.rawGraph.getEdge(a,!0);if(o){const i=e.id===o.source?o.target:o.source;if(!t.sigmaGraph.hasNode(i))continue;const s=t.rawGraph.getNode(i);s&&r.push({type:"Neighbour",id:i,label:s.properties.entity_id?s.properties.entity_id:s.labels.join(", ")})}}}catch(n){console.error("Error refining node properties:",n)}return{...e,relationships:r}},fg=e=>{const t=te.getState();let r,n;if(t.sigmaGraph&&t.rawGraph)try{if(!t.sigmaGraph.hasEdge(e.dynamicId))return console.warn("Edge not found in sigmaGraph:",e.id,"dynamicId:",e.dynamicId),{...e,sourceNode:void 0,targetNode:void 0};t.sigmaGraph.hasNode(e.source)&&(r=t.rawGraph.getNode(e.source)),t.sigmaGraph.hasNode(e.target)&&(n=t.rawGraph.getNode(e.target))}catch(a){console.error("Error refining edge properties:",a)}return{...e,sourceNode:r,targetNode:n}},$e=({name:e,value:t,onClick:r,tooltip:n,nodeId:a,edgeId:o,dynamicId:l,entityId:i,entityType:s,sourceId:c,targetId:u,isEditable:d=!1})=>{const{t:h}=Se(),f=b=>{const y=`graphPanel.propertiesView.node.propertyNames.${b}`,k=h(y);return k===y?b:k};return d&&(e==="description"||e==="entity_id"||e==="keywords")?g.jsx(cg,{name:e,value:t,onClick:r,nodeId:a,entityId:i,edgeId:o,dynamicId:l,entityType:s,sourceId:c,targetId:u,isEditable:!0,tooltip:n||(typeof t=="string"?t:JSON.stringify(t,null,2))}):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-primary/60 tracking-wide whitespace-nowrap",children:f(e)}),":",g.jsx(Vs,{className:"hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis",tooltipClassName:"max-w-80 -translate-x-13",text:t,tooltip:n||(typeof t=="string"?t:JSON.stringify(t,null,2)),side:"left",onClick:r})]})},hg=({node:e})=>{const{t}=Se(),r=()=>{te.getState().triggerNodeExpand(e.id)},n=()=>{te.getState().triggerNodePrune(e.id)};return g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-blue-700",children:t("graphPanel.propertiesView.node.title")}),g.jsxs("div",{className:"flex gap-3",children:[g.jsx(be,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:r,tooltip:t("graphPanel.propertiesView.node.expandNode"),children:g.jsx(qc,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),g.jsx(be,{size:"icon",variant:"ghost",className:"h-7 w-7 border border-gray-400 hover:bg-gray-200 dark:border-gray-600 dark:hover:bg-gray-700",onClick:n,tooltip:t("graphPanel.propertiesView.node.pruneNode"),children:g.jsx(vu,{className:"h-4 w-4 text-gray-900 dark:text-gray-300"})})]})]}),g.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[g.jsx($e,{name:t("graphPanel.propertiesView.node.id"),value:String(e.id)}),g.jsx($e,{name:t("graphPanel.propertiesView.node.labels"),value:e.labels.join(", "),onClick:()=>{te.getState().setSelectedNode(e.id,!0)}}),g.jsx($e,{name:t("graphPanel.propertiesView.node.degree"),value:e.degree})]}),g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.node.properties")}),g.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(a=>a==="created_at"?null:g.jsx($e,{name:a,value:e.properties[a],nodeId:String(e.id),entityId:e.properties.entity_id,entityType:"node",isEditable:a==="description"||a==="entity_id"},a))}),e.relationships.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-emerald-700",children:t("graphPanel.propertiesView.node.relationships")}),g.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:e.relationships.map(({type:a,id:o,label:l})=>g.jsx($e,{name:a,value:l,onClick:()=>{te.getState().setSelectedNode(o,!0)}},o))})]})]})},gg=({edge:e})=>{const{t}=Se();return g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-violet-700",children:t("graphPanel.propertiesView.edge.title")}),g.jsxs("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:[g.jsx($e,{name:t("graphPanel.propertiesView.edge.id"),value:e.id}),e.type&&g.jsx($e,{name:t("graphPanel.propertiesView.edge.type"),value:e.type}),g.jsx($e,{name:t("graphPanel.propertiesView.edge.source"),value:e.sourceNode?e.sourceNode.labels.join(", "):e.source,onClick:()=>{te.getState().setSelectedNode(e.source,!0)}}),g.jsx($e,{name:t("graphPanel.propertiesView.edge.target"),value:e.targetNode?e.targetNode.labels.join(", "):e.target,onClick:()=>{te.getState().setSelectedNode(e.target,!0)}})]}),g.jsx("h3",{className:"text-md pl-1 font-bold tracking-wide text-amber-700",children:t("graphPanel.propertiesView.edge.properties")}),g.jsx("div",{className:"bg-primary/5 max-h-96 overflow-auto rounded p-1",children:Object.keys(e.properties).sort().map(r=>{var n,a;return r==="created_at"?null:g.jsx($e,{name:r,value:e.properties[r],edgeId:String(e.id),dynamicId:String(e.dynamicId),entityType:"edge",sourceId:((n=e.sourceNode)==null?void 0:n.properties.entity_id)||e.source,targetId:((a=e.targetNode)==null?void 0:a.properties.entity_id)||e.target,isEditable:r==="description"||r==="keywords"},r)})})]})},pg=()=>{const{t:e}=Se(),t=Z.use.graphQueryMaxDepth(),r=Z.use.graphMaxNodes();return g.jsxs("div",{className:"absolute bottom-4 left-[calc(1rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400",children:[g.jsxs("div",{children:[e("graphPanel.sideBar.settings.depth"),": ",t]}),g.jsxs("div",{children:[e("graphPanel.sideBar.settings.max"),": ",r]})]})},Us=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("bg-card text-card-foreground rounded-xl border shadow",e),...t}));Us.displayName="Card";const mg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("flex flex-col space-y-1.5 p-6",e),...t}));mg.displayName="CardHeader";const vg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("leading-none font-semibold tracking-tight",e),...t}));vg.displayName="CardTitle";const yg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("text-muted-foreground text-sm",e),...t}));yg.displayName="CardDescription";const bg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("p-6 pt-0",e),...t}));bg.displayName="CardContent";const wg=p.forwardRef(({className:e,...t},r)=>g.jsx("div",{ref:r,className:fe("flex items-center p-6 pt-0",e),...t}));wg.displayName="CardFooter";function xg(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var Fn="ScrollArea",[qs,Dp]=wn(Fn),[Sg,Le]=qs(Fn),Ws=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:o=600,...l}=e,[i,s]=p.useState(null),[c,u]=p.useState(null),[d,h]=p.useState(null),[f,b]=p.useState(null),[y,k]=p.useState(null),[I,E]=p.useState(0),[j,A]=p.useState(0),[N,z]=p.useState(!1),[m,_]=p.useState(!1),x=Xe(t,R=>s(R)),T=Fi(a);return g.jsx(Sg,{scope:r,type:n,dir:T,scrollHideDelay:o,scrollArea:i,viewport:c,onViewportChange:u,content:d,onContentChange:h,scrollbarX:f,onScrollbarXChange:b,scrollbarXEnabled:N,onScrollbarXEnabledChange:z,scrollbarY:y,onScrollbarYChange:k,scrollbarYEnabled:m,onScrollbarYEnabledChange:_,onCornerWidthChange:E,onCornerHeightChange:A,children:g.jsx(Ee.div,{dir:T,...l,ref:x,style:{position:"relative","--radix-scroll-area-corner-width":I+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});Ws.displayName=Fn;var Xs="ScrollAreaViewport",Ys=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:a,...o}=e,l=Le(Xs,r),i=p.useRef(null),s=Xe(t,i,l.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),g.jsx(Ee.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Ys.displayName=Xs;var Ve="ScrollAreaScrollbar",Mn=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Le(Ve,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,i=e.orientation==="horizontal";return p.useEffect(()=>(i?o(!0):l(!0),()=>{i?o(!1):l(!1)}),[i,o,l]),a.type==="hover"?g.jsx(_g,{...n,ref:t,forceMount:r}):a.type==="scroll"?g.jsx(Eg,{...n,ref:t,forceMount:r}):a.type==="auto"?g.jsx(Ks,{...n,ref:t,forceMount:r}):a.type==="always"?g.jsx($n,{...n,ref:t}):null});Mn.displayName=Ve;var _g=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Le(Ve,e.__scopeScrollArea),[o,l]=p.useState(!1);return p.useEffect(()=>{const i=a.scrollArea;let s=0;if(i){const c=()=>{window.clearTimeout(s),l(!0)},u=()=>{s=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return i.addEventListener("pointerenter",c),i.addEventListener("pointerleave",u),()=>{window.clearTimeout(s),i.removeEventListener("pointerenter",c),i.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),g.jsx(St,{present:r||o,children:g.jsx(Ks,{"data-state":o?"visible":"hidden",...n,ref:t})})}),Eg=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Le(Ve,e.__scopeScrollArea),o=e.orientation==="horizontal",l=fr(()=>s("SCROLL_END"),100),[i,s]=xg("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(i==="idle"){const c=window.setTimeout(()=>s("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(c)}},[i,a.scrollHideDelay,s]),p.useEffect(()=>{const c=a.viewport,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const h=()=>{const f=c[u];d!==f&&(s("SCROLL"),l()),d=f};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,o,s,l]),g.jsx(St,{present:r||i!=="hidden",children:g.jsx($n,{"data-state":i==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Ce(e.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:Ce(e.onPointerLeave,()=>s("POINTER_LEAVE"))})})}),Ks=p.forwardRef((e,t)=>{const r=Le(Ve,e.__scopeScrollArea),{forceMount:n,...a}=e,[o,l]=p.useState(!1),i=e.orientation==="horizontal",s=fr(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,a=Le(Ve,e.__scopeScrollArea),o=p.useRef(null),l=p.useRef(0),[i,s]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=ti(i.viewport,i.content),u={...n,sizes:i,onSizesChange:s,hasThumb:c>0&&c<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:h=>l.current=h};function d(h,f){return jg(h,l.current,i,f)}return r==="horizontal"?g.jsx(Cg,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const h=a.viewport.scrollLeft,f=na(h,i,a.dir);o.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollLeft=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollLeft=d(h,a.dir))}}):r==="vertical"?g.jsx(kg,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const h=a.viewport.scrollTop,f=na(h,i);o.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollTop=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollTop=d(h))}}):null}),Cg=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,o=Le(Ve,e.__scopeScrollArea),[l,i]=p.useState(),s=p.useRef(null),c=Xe(t,s,o.onScrollbarXChange);return p.useEffect(()=>{s.current&&i(getComputedStyle(s.current))},[s]),g.jsx(Js,{"data-orientation":"horizontal",...a,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":dr(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+u.deltaX;e.onWheelScroll(h),ni(h,d)&&u.preventDefault()}},onResize:()=>{s.current&&o.viewport&&l&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:Zt(l.paddingLeft),paddingEnd:Zt(l.paddingRight)}})}})}),kg=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,o=Le(Ve,e.__scopeScrollArea),[l,i]=p.useState(),s=p.useRef(null),c=Xe(t,s,o.onScrollbarYChange);return p.useEffect(()=>{s.current&&i(getComputedStyle(s.current))},[s]),g.jsx(Js,{"data-orientation":"vertical",...a,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":dr(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(o.viewport){const h=o.viewport.scrollTop+u.deltaY;e.onWheelScroll(h),ni(h,d)&&u.preventDefault()}},onResize:()=>{s.current&&o.viewport&&l&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:Zt(l.paddingTop),paddingEnd:Zt(l.paddingBottom)}})}})}),[Tg,Qs]=qs(Ve),Js=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:i,onThumbPositionChange:s,onDragScroll:c,onWheelScroll:u,onResize:d,...h}=e,f=Le(Ve,r),[b,y]=p.useState(null),k=Xe(t,x=>y(x)),I=p.useRef(null),E=p.useRef(""),j=f.viewport,A=n.content-n.viewport,N=ct(u),z=ct(s),m=fr(d,10);function _(x){if(I.current){const T=x.clientX-I.current.left,R=x.clientY-I.current.top;c({x:T,y:R})}}return p.useEffect(()=>{const x=T=>{const R=T.target;(b==null?void 0:b.contains(R))&&N(T,A)};return document.addEventListener("wheel",x,{passive:!1}),()=>document.removeEventListener("wheel",x,{passive:!1})},[j,b,A,N]),p.useEffect(z,[n,z]),xt(b,m),xt(f.content,m),g.jsx(Tg,{scope:r,scrollbar:b,hasThumb:a,onThumbChange:ct(o),onThumbPointerUp:ct(l),onThumbPositionChange:z,onThumbPointerDown:ct(i),children:g.jsx(Ee.div,{...h,ref:k,style:{position:"absolute",...h.style},onPointerDown:Ce(e.onPointerDown,x=>{x.button===0&&(x.target.setPointerCapture(x.pointerId),I.current=b.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(x))}),onPointerMove:Ce(e.onPointerMove,_),onPointerUp:Ce(e.onPointerUp,x=>{const T=x.target;T.hasPointerCapture(x.pointerId)&&T.releasePointerCapture(x.pointerId),document.body.style.webkitUserSelect=E.current,f.viewport&&(f.viewport.style.scrollBehavior=""),I.current=null})})})}),Jt="ScrollAreaThumb",Zs=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Qs(Jt,e.__scopeScrollArea);return g.jsx(St,{present:r||a.hasThumb,children:g.jsx(Rg,{ref:t,...n})})}),Rg=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,o=Le(Jt,r),l=Qs(Jt,r),{onThumbPositionChange:i}=l,s=Xe(t,d=>l.onThumbChange(d)),c=p.useRef(void 0),u=fr(()=>{c.current&&(c.current(),c.current=void 0)},100);return p.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(u(),!c.current){const f=Ng(d,i);c.current=f,i()}};return i(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,u,i]),g.jsx(Ee.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ce(e.onPointerDownCapture,d=>{const f=d.target.getBoundingClientRect(),b=d.clientX-f.left,y=d.clientY-f.top;l.onThumbPointerDown({x:b,y})}),onPointerUp:Ce(e.onPointerUp,l.onThumbPointerUp)})});Zs.displayName=Jt;var Hn="ScrollAreaCorner",ei=p.forwardRef((e,t)=>{const r=Le(Hn,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?g.jsx(Ag,{...e,ref:t}):null});ei.displayName=Hn;var Ag=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=Le(Hn,r),[o,l]=p.useState(0),[i,s]=p.useState(0),c=!!(o&&i);return xt(a.scrollbarX,()=>{var d;const u=((d=a.scrollbarX)==null?void 0:d.offsetHeight)||0;a.onCornerHeightChange(u),s(u)}),xt(a.scrollbarY,()=>{var d;const u=((d=a.scrollbarY)==null?void 0:d.offsetWidth)||0;a.onCornerWidthChange(u),l(u)}),c?g.jsx(Ee.div,{...n,ref:t,style:{width:o,height:i,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Zt(e){return e?parseInt(e,10):0}function ti(e,t){const r=e/t;return isNaN(r)?0:r}function dr(e){const t=ti(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function jg(e,t,r,n="ltr"){const a=dr(r),o=a/2,l=t||o,i=a-l,s=r.scrollbar.paddingStart+l,c=r.scrollbar.size-r.scrollbar.paddingEnd-i,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return ri([s,c],d)(e)}function na(e,t,r="ltr"){const n=dr(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,i=o-n,s=r==="ltr"?[0,l]:[l*-1,0],c=$i(e,s);return ri([0,l],[0,i])(c)}function ri(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function ni(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},l=r.left!==o.left,i=r.top!==o.top;(l||i)&&t(),r=o,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function fr(e,t){const r=ct(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function xt(e,t){const r=ct(t);Mi(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var oi=Ws,Ig=Ys,Lg=ei;const ai=p.forwardRef(({className:e,children:t,...r},n)=>g.jsxs(oi,{ref:n,className:fe("relative overflow-hidden",e),...r,children:[g.jsx(Ig,{className:"h-full w-full rounded-[inherit]",children:t}),g.jsx(si,{}),g.jsx(Lg,{})]}));ai.displayName=oi.displayName;const si=p.forwardRef(({className:e,orientation:t="vertical",...r},n)=>g.jsx(Mn,{ref:n,orientation:t,className:fe("flex touch-none transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:g.jsx(Zs,{className:"bg-border relative flex-1 rounded-full"})}));si.displayName=Mn.displayName;const Pg=({className:e})=>{const{t}=Se(),r=te.use.typeColorMap();return!r||r.size===0?null:g.jsxs(Us,{className:`p-2 max-w-xs ${e}`,children:[g.jsx("h3",{className:"text-sm font-medium mb-2",children:t("graphPanel.legend")}),g.jsx(ai,{className:"max-h-80",children:g.jsx("div",{className:"flex flex-col gap-1",children:Array.from(r.entries()).map(([n,a])=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-4 h-4 rounded-full",style:{backgroundColor:a}}),g.jsx("span",{className:"text-xs truncate",title:n,children:t(`graphPanel.nodeTypes.${n.toLowerCase()}`,n)})]},n))})})]})},zg=()=>{const{t:e}=Se(),t=Z.use.showLegend(),r=Z.use.setShowLegend(),n=p.useCallback(()=>{r(!t)},[t,r]);return g.jsx(be,{variant:Ie,onClick:n,tooltip:e("graphPanel.sideBar.legendControl.toggleLegend"),size:"icon",children:g.jsx(Nc,{})})},oa={allowInvalidContainer:!0,defaultNodeType:"default",defaultEdgeType:"curvedNoArrow",renderEdgeLabels:!1,edgeProgramClasses:{arrow:Si,curvedArrow:Nd,curvedNoArrow:jd},nodeProgramClasses:{default:hd,circel:xi,point:$u},labelGridCellSize:60,labelRenderedSizeThreshold:12,enableEdgeEvents:!0,labelColor:{color:"#000",attribute:"labelColor"},edgeLabelColor:{color:"#000",attribute:"labelColor"},edgeLabelSize:8,labelSize:12},Dg=()=>{const e=ga(),t=Be(),[r,n]=p.useState(null);return p.useEffect(()=>{e({downNode:a=>{n(a.node),t.getGraph().setNodeAttribute(a.node,"highlighted",!0)},mousemovebody:a=>{if(!r)return;const o=t.viewportToGraph(a);t.getGraph().setNodeAttribute(r,"x",o.x),t.getGraph().setNodeAttribute(r,"y",o.y),a.preventSigmaDefault(),a.original.preventDefault(),a.original.stopPropagation()},mouseup:()=>{r&&(n(null),t.getGraph().removeNodeAttribute(r,"highlighted"))},mousedown:a=>{a.original.buttons!==0&&!t.getCustomBBox()&&t.setCustomBBox(t.getBBox())}})},[e,t,r]),null},Op=()=>{const[e,t]=p.useState(oa),r=p.useRef(null),n=te.use.selectedNode(),a=te.use.focusedNode(),o=te.use.moveToSelectedNode(),l=te.use.isFetching(),i=Z.use.showPropertyPanel(),s=Z.use.showNodeSearchBar(),c=Z.use.enableNodeDrag(),u=Z.use.showLegend();p.useEffect(()=>{t(oa),console.log("Initialized sigma settings")},[]),p.useEffect(()=>()=>{const y=te.getState().sigmaInstance;if(y)try{y.kill(),te.getState().setSigmaInstance(null),console.log("Cleared sigma instance on Graphviewer unmount")}catch(k){console.error("Error cleaning up sigma instance:",k)}},[]);const d=p.useCallback(y=>{y===null?te.getState().setFocusedNode(null):y.type==="nodes"&&te.getState().setFocusedNode(y.id)},[]),h=p.useCallback(y=>{y===null?te.getState().setSelectedNode(null):y.type==="nodes"&&te.getState().setSelectedNode(y.id,!0)},[]),f=p.useMemo(()=>a??n,[a,n]),b=p.useMemo(()=>n?{type:"nodes",id:n}:null,[n]);return g.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[g.jsxs(_i,{settings:e,className:"!bg-background !size-full overflow-hidden",ref:r,children:[g.jsx(Jf,{}),c&&g.jsx(Dg,{}),g.jsx(Id,{node:f,move:o}),g.jsxs("div",{className:"absolute top-2 left-2 flex items-start gap-2",children:[g.jsx(Lh,{}),s&&g.jsx(jh,{value:b,onFocus:d,onChange:h})]}),g.jsxs("div",{className:"bg-background/60 absolute bottom-2 left-2 flex flex-col rounded-xl border-2 backdrop-blur-lg",children:[g.jsx(Kf,{}),g.jsx(Zf,{}),g.jsx(eh,{}),g.jsx(zg,{}),g.jsx(ch,{})]}),i&&g.jsx("div",{className:"absolute top-2 right-2",children:g.jsx(ug,{})}),u&&g.jsx("div",{className:"absolute bottom-10 right-2",children:g.jsx(Pg,{className:"bg-background/60 backdrop-blur-lg"})}),g.jsx(pg,{})]}),l&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/80 z-10",children:g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"}),g.jsx("p",{children:"Loading Graph Data..."})]})})]})};export{Qf as $,hp as A,be as B,Us as C,Pu as D,xp as E,_p as F,Yg as G,Kg as H,Wt as I,mg as J,bg as K,dp as L,Ep as M,mp as N,pp as O,vp as P,yp as Q,du as R,ai as S,Np as T,Ip as U,Va as V,Ma as W,Ru as X,$a as Y,Ha as Z,kn as _,vg as a,wp as a0,kp as a1,Ji as a2,Jg as a3,Qg as a4,Hg as a5,Bs as a6,Ap as a7,no as a8,Wg as a9,Xg as aa,Tn as ab,Rn as ac,Rp as ad,ir as ae,qt as af,Bg as ag,Lp as ah,qg as ai,Cp as aj,Tp as ak,Ea as al,Kr as am,Vg as an,ip as ao,Op as ap,np as aq,ap as ar,sp as as,lp as at,yg as b,fe as c,rt as d,Sp as e,Zg as f,rr as g,Pp as h,Xa as i,Ya as j,Qa as k,Ja as l,ep as m,tp as n,Ls as o,Ka as p,rp as q,jp as r,Ug as s,bp as t,Se as u,fp as v,gp as w,op as x,En as y,Z as z}; diff --git a/lightrag/api/webui/assets/feature-retrieval-D7g3nMgj.js b/lightrag/api/webui/assets/feature-retrieval-D7g3nMgj.js new file mode 100644 index 00000000..fffdd962 --- /dev/null +++ b/lightrag/api/webui/assets/feature-retrieval-D7g3nMgj.js @@ -0,0 +1,10 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BKeDSElW.js","assets/markdown-vendor-7kCcHxQn.js","assets/ui-vendor-DaJTMqwy.js","assets/react-vendor-CgPb4pW_.js","assets/feature-graph-D68hhnYC.js","assets/graph-vendor-BC3frDkq.js","assets/utils-vendor-elCzPYZl.js","assets/feature-graph-BipNuM18.css","assets/katex-B1t2RQs_.css"])))=>i.map(i=>d[i]); +import{j as o,F as Qo,I as br,G as Go,H as Jo,J as pr,K as Yo,V as fr,L as Xo,M as Zo,N as hr,Q as mr,U as $o,W as kr,X as yr,Y as wr}from"./ui-vendor-DaJTMqwy.js";import{c as O,P as er,Q as Sr,V as xr,u as Ke,z as q,C as vr,J as zr,a as Mr,b as Ar,K as Cr,W as y,Y as w,Z as S,_ as x,I as T,o as Y,$ as or,B as Ie,a0 as Hr,a1 as jr,a2 as Qe,a3 as Tr,a4 as Or,g as Wr,a5 as Fr,a6 as Rr,E as Br,a7 as Dr}from"./feature-graph-D68hhnYC.js";import{r as c}from"./react-vendor-CgPb4pW_.js";import{m as Ge}from"./mermaid-vendor-DOoA-Fcm.js";import{h as Je,M as _r,r as Pr,a as qr,b as Nr}from"./markdown-vendor-7kCcHxQn.js";const Ye=kr,Xe=wr,Ze=yr,Ue=c.forwardRef(({className:e,children:r,...a},n)=>o.jsxs(Qo,{ref:n,className:O("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[r,o.jsx(br,{asChild:!0,children:o.jsx(er,{className:"h-4 w-4 opacity-50"})})]}));Ue.displayName=Qo.displayName;const rr=c.forwardRef(({className:e,...r},a)=>o.jsx(Go,{ref:a,className:O("flex cursor-default items-center justify-center py-1",e),...r,children:o.jsx(Sr,{className:"h-4 w-4"})}));rr.displayName=Go.displayName;const nr=c.forwardRef(({className:e,...r},a)=>o.jsx(Jo,{ref:a,className:O("flex cursor-default items-center justify-center py-1",e),...r,children:o.jsx(er,{className:"h-4 w-4"})}));nr.displayName=Jo.displayName;const Ve=c.forwardRef(({className:e,children:r,position:a="popper",...n},l)=>o.jsx(pr,{children:o.jsxs(Yo,{ref:l,className:O("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[o.jsx(rr,{}),o.jsx(fr,{className:O("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),o.jsx(nr,{})]})}));Ve.displayName=Yo.displayName;const Er=c.forwardRef(({className:e,...r},a)=>o.jsx(Xo,{ref:a,className:O("py-1.5 pr-2 pl-8 text-sm font-semibold",e),...r}));Er.displayName=Xo.displayName;const H=c.forwardRef(({className:e,children:r,...a},n)=>o.jsxs(Zo,{ref:n,className:O("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(hr,{children:o.jsx(xr,{className:"h-4 w-4"})})}),o.jsx(mr,{children:r})]}));H.displayName=Zo.displayName;const Lr=c.forwardRef(({className:e,...r},a)=>o.jsx($o,{ref:a,className:O("bg-muted -mx-1 my-1 h-px",e),...r}));Lr.displayName=$o.displayName;function Ir(){const{t:e}=Ke(),r=q(n=>n.querySettings),a=c.useCallback((n,l)=>{q.getState().updateQuerySettings({[n]:l})},[]);return o.jsxs(vr,{className:"flex shrink-0 flex-col min-w-[220px]",children:[o.jsxs(zr,{className:"px-4 pt-4 pb-2",children:[o.jsx(Mr,{children:e("retrievePanel.querySettings.parametersTitle")}),o.jsx(Ar,{className:"sr-only",children:e("retrievePanel.querySettings.parametersDescription")})]}),o.jsx(Cr,{className:"m-0 flex grow flex-col p-0 text-xs",children:o.jsx("div",{className:"relative size-full",children:o.jsxs("div",{className:"absolute inset-0 flex flex-col gap-2 overflow-auto px-2",children:[o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"query_mode_select",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.queryMode")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.queryModeTooltip")})})]})}),o.jsxs(Ye,{value:r.mode,onValueChange:n=>a("mode",n),children:[o.jsx(Ue,{id:"query_mode_select",className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:o.jsx(Ze,{})}),o.jsx(Ve,{children:o.jsxs(Xe,{children:[o.jsx(H,{value:"naive",children:e("retrievePanel.querySettings.queryModeOptions.naive")}),o.jsx(H,{value:"local",children:e("retrievePanel.querySettings.queryModeOptions.local")}),o.jsx(H,{value:"global",children:e("retrievePanel.querySettings.queryModeOptions.global")}),o.jsx(H,{value:"hybrid",children:e("retrievePanel.querySettings.queryModeOptions.hybrid")}),o.jsx(H,{value:"mix",children:e("retrievePanel.querySettings.queryModeOptions.mix")}),o.jsx(H,{value:"bypass",children:e("retrievePanel.querySettings.queryModeOptions.bypass")})]})})]})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"response_format_select",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.responseFormat")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.responseFormatTooltip")})})]})}),o.jsxs(Ye,{value:r.response_type,onValueChange:n=>a("response_type",n),children:[o.jsx(Ue,{id:"response_format_select",className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:o.jsx(Ze,{})}),o.jsx(Ve,{children:o.jsxs(Xe,{children:[o.jsx(H,{value:"Multiple Paragraphs",children:e("retrievePanel.querySettings.responseFormatOptions.multipleParagraphs")}),o.jsx(H,{value:"Single Paragraph",children:e("retrievePanel.querySettings.responseFormatOptions.singleParagraph")}),o.jsx(H,{value:"Bullet Points",children:e("retrievePanel.querySettings.responseFormatOptions.bulletPoints")})]})})]})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"top_k",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.topK")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.topKTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"top_k",type:"number",value:r.top_k??"",onChange:n=>{const l=n.target.value;a("top_k",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("top_k",1)},min:1,placeholder:e("retrievePanel.querySettings.topKPlaceholder")})})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"chunk_top_k",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.chunkTopK")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.chunkTopKTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"chunk_top_k",type:"number",value:r.chunk_top_k??"",onChange:n=>{const l=n.target.value;a("chunk_top_k",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("chunk_top_k",1)},min:1,placeholder:e("retrievePanel.querySettings.chunkTopKPlaceholder")})})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"chunk_rerank_top_k",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.chunkRerankTopK")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.chunkRerankTopKTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"chunk_rerank_top_k",type:"number",value:r.chunk_rerank_top_k??"",onChange:n=>{const l=n.target.value;a("chunk_rerank_top_k",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("chunk_rerank_top_k",1)},min:1,placeholder:e("retrievePanel.querySettings.chunkRerankTopKPlaceholder")})})]}),o.jsxs(o.Fragment,{children:[o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"max_entity_tokens",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.maxEntityTokens")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.maxEntityTokensTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"max_entity_tokens",type:"number",value:r.max_entity_tokens??"",onChange:n=>{const l=n.target.value;a("max_entity_tokens",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("max_entity_tokens",1)},min:1,placeholder:e("retrievePanel.querySettings.maxEntityTokens")})})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"max_relation_tokens",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.maxRelationTokens")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.maxRelationTokensTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"max_relation_tokens",type:"number",value:r.max_relation_tokens??"",onChange:n=>{const l=n.target.value;a("max_relation_tokens",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("max_relation_tokens",1)},min:1,placeholder:e("retrievePanel.querySettings.maxRelationTokens")})})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"max_total_tokens",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.maxTotalTokens")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.maxTotalTokensTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"max_total_tokens",type:"number",value:r.max_total_tokens??"",onChange:n=>{const l=n.target.value;a("max_total_tokens",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("max_total_tokens",1)},min:1,placeholder:e("retrievePanel.querySettings.maxTotalTokens")})})]})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"history_turns",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.historyTurns")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.historyTurnsTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"history_turns",type:"number",value:r.history_turns??"",onChange:n=>{const l=n.target.value;a("history_turns",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("history_turns",0)},min:0,placeholder:e("retrievePanel.querySettings.historyTurnsPlaceholder"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"user_prompt",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.userPrompt")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.userPromptTooltip")})})]})}),o.jsx("div",{children:o.jsx(T,{id:"user_prompt",value:r.user_prompt,onChange:n=>a("user_prompt",n.target.value),placeholder:e("retrievePanel.querySettings.userPromptPlaceholder"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"only_need_context",className:"flex-1 ml-1 cursor-help",children:e("retrievePanel.querySettings.onlyNeedContext")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.onlyNeedContextTooltip")})})]})}),o.jsx(Y,{className:"mr-1 cursor-pointer",id:"only_need_context",checked:r.only_need_context,onCheckedChange:n=>a("only_need_context",n)})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"only_need_prompt",className:"flex-1 ml-1 cursor-help",children:e("retrievePanel.querySettings.onlyNeedPrompt")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.onlyNeedPromptTooltip")})})]})}),o.jsx(Y,{className:"mr-1 cursor-pointer",id:"only_need_prompt",checked:r.only_need_prompt,onCheckedChange:n=>a("only_need_prompt",n)})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(y,{children:o.jsxs(w,{children:[o.jsx(S,{asChild:!0,children:o.jsx("label",{htmlFor:"stream",className:"flex-1 ml-1 cursor-help",children:e("retrievePanel.querySettings.streamResponse")})}),o.jsx(x,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.streamResponseTooltip")})})]})}),o.jsx(Y,{className:"mr-1 cursor-pointer",id:"stream",checked:r.stream,onCheckedChange:n=>a("stream",n)})]})]})]})})})]})}var X={},Z={exports:{}},$e;function Ur(){return $e||($e=1,function(e){function r(a){return a&&a.__esModule?a:{default:a}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(Z)),Z.exports}var $={},eo;function Vr(){return eo||(eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}}($)),$}var ee={},oo;function Kr(){return oo||(oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(30, 20%, 25%)",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:".3em solid hsl(30, 20%, 40%)",borderRadius:".5em",boxShadow:"1px 1px .5em black inset"},':not(pre) > code[class*="language-"]':{background:"hsl(30, 20%, 25%)",padding:".15em .2em .05em",borderRadius:".3em",border:".13em solid hsl(30, 20%, 40%)",boxShadow:"1px 1px .3em -.1em black inset",whiteSpace:"normal"},comment:{color:"hsl(30, 20%, 50%)"},prolog:{color:"hsl(30, 20%, 50%)"},doctype:{color:"hsl(30, 20%, 50%)"},cdata:{color:"hsl(30, 20%, 50%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},property:{color:"hsl(350, 40%, 70%)"},tag:{color:"hsl(350, 40%, 70%)"},boolean:{color:"hsl(350, 40%, 70%)"},number:{color:"hsl(350, 40%, 70%)"},constant:{color:"hsl(350, 40%, 70%)"},symbol:{color:"hsl(350, 40%, 70%)"},selector:{color:"hsl(75, 70%, 60%)"},"attr-name":{color:"hsl(75, 70%, 60%)"},string:{color:"hsl(75, 70%, 60%)"},char:{color:"hsl(75, 70%, 60%)"},builtin:{color:"hsl(75, 70%, 60%)"},inserted:{color:"hsl(75, 70%, 60%)"},operator:{color:"hsl(40, 90%, 60%)"},entity:{color:"hsl(40, 90%, 60%)",cursor:"help"},url:{color:"hsl(40, 90%, 60%)"},".language-css .token.string":{color:"hsl(40, 90%, 60%)"},".style .token.string":{color:"hsl(40, 90%, 60%)"},variable:{color:"hsl(40, 90%, 60%)"},atrule:{color:"hsl(350, 40%, 70%)"},"attr-value":{color:"hsl(350, 40%, 70%)"},keyword:{color:"hsl(350, 40%, 70%)"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"}}}(ee)),ee}var oe={},ro;function Qr(){return ro||(ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"black",color:"white",boxShadow:"-.3em 0 0 .3em black, .3em 0 0 .3em black"},'pre[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:".4em .8em",margin:".5em 0",overflow:"auto",background:`url('data:image/svg+xml;charset=utf-8,%0D%0A%0D%0A%0D%0A<%2Fsvg>')`,backgroundSize:"1em 1em"},':not(pre) > code[class*="language-"]':{padding:".2em",borderRadius:".3em",boxShadow:"none",whiteSpace:"normal"},comment:{color:"#aaa"},prolog:{color:"#aaa"},doctype:{color:"#aaa"},cdata:{color:"#aaa"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#0cf"},tag:{color:"#0cf"},boolean:{color:"#0cf"},number:{color:"#0cf"},constant:{color:"#0cf"},symbol:{color:"#0cf"},selector:{color:"yellow"},"attr-name":{color:"yellow"},string:{color:"yellow"},char:{color:"yellow"},builtin:{color:"yellow"},operator:{color:"yellowgreen"},entity:{color:"yellowgreen",cursor:"help"},url:{color:"yellowgreen"},".language-css .token.string":{color:"yellowgreen"},variable:{color:"yellowgreen"},inserted:{color:"yellowgreen"},atrule:{color:"deeppink"},"attr-value":{color:"deeppink"},keyword:{color:"deeppink"},regex:{color:"orange"},important:{color:"orange",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"},"pre.diff-highlight.diff-highlight > code .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre.diff-highlight.diff-highlight > code .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"}}}(oe)),oe}var re={},no;function Gr(){return no||(no=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#272822",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#272822",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8292a2"},prolog:{color:"#8292a2"},doctype:{color:"#8292a2"},cdata:{color:"#8292a2"},punctuation:{color:"#f8f8f2"},namespace:{Opacity:".7"},property:{color:"#f92672"},tag:{color:"#f92672"},constant:{color:"#f92672"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},boolean:{color:"#ae81ff"},number:{color:"#ae81ff"},selector:{color:"#a6e22e"},"attr-name":{color:"#a6e22e"},string:{color:"#a6e22e"},char:{color:"#a6e22e"},builtin:{color:"#a6e22e"},inserted:{color:"#a6e22e"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#e6db74"},"attr-value":{color:"#e6db74"},function:{color:"#e6db74"},"class-name":{color:"#e6db74"},keyword:{color:"#66d9ef"},regex:{color:"#fd971f"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(re)),re}var ne={},ao;function Jr(){return ao||(ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",backgroundColor:"#fdf6e3"},'pre[class*="language-"]::-moz-selection':{background:"#073642"},'pre[class*="language-"] ::-moz-selection':{background:"#073642"},'code[class*="language-"]::-moz-selection':{background:"#073642"},'code[class*="language-"] ::-moz-selection':{background:"#073642"},'pre[class*="language-"]::selection':{background:"#073642"},'pre[class*="language-"] ::selection':{background:"#073642"},'code[class*="language-"]::selection':{background:"#073642"},'code[class*="language-"] ::selection':{background:"#073642"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdf6e3",padding:".1em",borderRadius:".3em"},comment:{color:"#93a1a1"},prolog:{color:"#93a1a1"},doctype:{color:"#93a1a1"},cdata:{color:"#93a1a1"},punctuation:{color:"#586e75"},namespace:{Opacity:".7"},property:{color:"#268bd2"},tag:{color:"#268bd2"},boolean:{color:"#268bd2"},number:{color:"#268bd2"},constant:{color:"#268bd2"},symbol:{color:"#268bd2"},deleted:{color:"#268bd2"},selector:{color:"#2aa198"},"attr-name":{color:"#2aa198"},string:{color:"#2aa198"},char:{color:"#2aa198"},builtin:{color:"#2aa198"},url:{color:"#2aa198"},inserted:{color:"#2aa198"},entity:{color:"#657b83",background:"#eee8d5",cursor:"help"},atrule:{color:"#859900"},"attr-value":{color:"#859900"},keyword:{color:"#859900"},function:{color:"#b58900"},"class-name":{color:"#b58900"},regex:{color:"#cb4b16"},important:{color:"#cb4b16",fontWeight:"bold"},variable:{color:"#cb4b16"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(ne)),ne}var ae={},lo;function Yr(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ccc",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ccc",background:"#2d2d2d",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},':not(pre) > code[class*="language-"]':{background:"#2d2d2d",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#999"},"block-comment":{color:"#999"},prolog:{color:"#999"},doctype:{color:"#999"},cdata:{color:"#999"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},deleted:{color:"#e2777a"},"function-name":{color:"#6196cc"},boolean:{color:"#f08d49"},number:{color:"#f08d49"},function:{color:"#f08d49"},property:{color:"#f8c555"},"class-name":{color:"#f8c555"},constant:{color:"#f8c555"},symbol:{color:"#f8c555"},selector:{color:"#cc99cd"},important:{color:"#cc99cd",fontWeight:"bold"},atrule:{color:"#cc99cd"},keyword:{color:"#cc99cd"},builtin:{color:"#cc99cd"},string:{color:"#7ec699"},char:{color:"#7ec699"},"attr-value":{color:"#7ec699"},regex:{color:"#7ec699"},variable:{color:"#7ec699"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(ae)),ae}var le={},to;function Xr(){return to||(to=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(0, 0%, 8%)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",borderRadius:".5em",border:".3em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .5em black inset",margin:".5em 0",overflow:"auto",padding:"1em"},':not(pre) > code[class*="language-"]':{background:"hsl(0, 0%, 8%)",borderRadius:".3em",border:".13em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .3em -.1em black inset",padding:".15em .2em .05em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"]::selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},comment:{color:"hsl(0, 0%, 47%)"},prolog:{color:"hsl(0, 0%, 47%)"},doctype:{color:"hsl(0, 0%, 47%)"},cdata:{color:"hsl(0, 0%, 47%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},tag:{color:"hsl(14, 58%, 55%)"},boolean:{color:"hsl(14, 58%, 55%)"},number:{color:"hsl(14, 58%, 55%)"},deleted:{color:"hsl(14, 58%, 55%)"},keyword:{color:"hsl(53, 89%, 79%)"},property:{color:"hsl(53, 89%, 79%)"},selector:{color:"hsl(53, 89%, 79%)"},constant:{color:"hsl(53, 89%, 79%)"},symbol:{color:"hsl(53, 89%, 79%)"},builtin:{color:"hsl(53, 89%, 79%)"},"attr-name":{color:"hsl(76, 21%, 52%)"},"attr-value":{color:"hsl(76, 21%, 52%)"},string:{color:"hsl(76, 21%, 52%)"},char:{color:"hsl(76, 21%, 52%)"},operator:{color:"hsl(76, 21%, 52%)"},entity:{color:"hsl(76, 21%, 52%)",cursor:"help"},url:{color:"hsl(76, 21%, 52%)"},".language-css .token.string":{color:"hsl(76, 21%, 52%)"},".style .token.string":{color:"hsl(76, 21%, 52%)"},variable:{color:"hsl(76, 21%, 52%)"},inserted:{color:"hsl(76, 21%, 52%)"},atrule:{color:"hsl(218, 22%, 55%)"},regex:{color:"hsl(42, 75%, 65%)"},important:{color:"hsl(42, 75%, 65%)",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},".language-markup .token.tag":{color:"hsl(33, 33%, 52%)"},".language-markup .token.attr-name":{color:"hsl(33, 33%, 52%)"},".language-markup .token.punctuation":{color:"hsl(33, 33%, 52%)"},"":{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0))",borderBottom:"1px dashed hsl(0, 0%, 33%)",borderTop:"1px dashed hsl(0, 0%, 33%)",marginTop:"0.75em",zIndex:"0"},".line-highlight.line-highlight:before":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"}}}(le)),le}var te={},co;function Zr(){return co||(co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(te)),te}var ce={},io;function $r(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2b2b2b",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#d4d0ab"},prolog:{color:"#d4d0ab"},doctype:{color:"#d4d0ab"},cdata:{color:"#d4d0ab"},punctuation:{color:"#fefefe"},property:{color:"#ffa07a"},tag:{color:"#ffa07a"},constant:{color:"#ffa07a"},symbol:{color:"#ffa07a"},deleted:{color:"#ffa07a"},boolean:{color:"#00e0e0"},number:{color:"#00e0e0"},selector:{color:"#abe338"},"attr-name":{color:"#abe338"},string:{color:"#abe338"},char:{color:"#abe338"},builtin:{color:"#abe338"},inserted:{color:"#abe338"},operator:{color:"#00e0e0"},entity:{color:"#00e0e0",cursor:"help"},url:{color:"#00e0e0"},".language-css .token.string":{color:"#00e0e0"},".style .token.string":{color:"#00e0e0"},variable:{color:"#00e0e0"},atrule:{color:"#ffd700"},"attr-value":{color:"#ffd700"},function:{color:"#ffd700"},keyword:{color:"#00e0e0"},regex:{color:"#ffd700"},important:{color:"#ffd700",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(ce)),ce}var ie={},so;function en(){return so||(so=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{Opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(ie)),ie}var se={},uo;function on(){return uo||(uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#898ea4"},prolog:{color:"#898ea4"},doctype:{color:"#898ea4"},cdata:{color:"#898ea4"},punctuation:{color:"#5e6687"},namespace:{Opacity:".7"},operator:{color:"#c76b29"},boolean:{color:"#c76b29"},number:{color:"#c76b29"},property:{color:"#c08b30"},tag:{color:"#3d8fd1"},string:{color:"#22a2c9"},selector:{color:"#6679cc"},"attr-name":{color:"#c76b29"},entity:{color:"#22a2c9",cursor:"help"},url:{color:"#22a2c9"},".language-css .token.string":{color:"#22a2c9"},".style .token.string":{color:"#22a2c9"},"attr-value":{color:"#ac9739"},keyword:{color:"#ac9739"},control:{color:"#ac9739"},directive:{color:"#ac9739"},unit:{color:"#ac9739"},statement:{color:"#22a2c9"},regex:{color:"#22a2c9"},atrule:{color:"#22a2c9"},placeholder:{color:"#3d8fd1"},variable:{color:"#3d8fd1"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #202746",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c94922"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:"0.4em solid #c94922",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#dfe2f1"},".line-numbers .line-numbers-rows > span:before":{color:"#979db4"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0))"}}}(se)),se}var de={},go;function rn(){return go||(go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"none",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"#222",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"15px",margin:"1em 0",overflow:"auto",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},'pre[class*="language-"] code':{float:"left",padding:"0 15px 0 0"},':not(pre) > code[class*="language-"]':{background:"#222",padding:"5px 10px",lineHeight:"1",MozBorderRadius:"3px",WebkitBorderRadius:"3px",borderRadius:"3px"},comment:{color:"#797979"},prolog:{color:"#797979"},doctype:{color:"#797979"},cdata:{color:"#797979"},selector:{color:"#fff"},operator:{color:"#fff"},punctuation:{color:"#fff"},namespace:{Opacity:".7"},tag:{color:"#ffd893"},boolean:{color:"#ffd893"},atrule:{color:"#B0C975"},"attr-value":{color:"#B0C975"},hex:{color:"#B0C975"},string:{color:"#B0C975"},property:{color:"#c27628"},entity:{color:"#c27628",cursor:"help"},url:{color:"#c27628"},"attr-name":{color:"#c27628"},keyword:{color:"#c27628"},regex:{color:"#9B71C6"},function:{color:"#e5a638"},constant:{color:"#e5a638"},variable:{color:"#fdfba8"},number:{color:"#8799B0"},important:{color:"#E45734"},deliminator:{color:"#E45734"},".line-highlight.line-highlight":{background:"rgba(255, 255, 255, .2)"},".line-highlight.line-highlight:before":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-highlight.line-highlight[data-end]:after":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-numbers .line-numbers-rows > span":{borderRight:"3px #d9d336 solid"}}}(de)),de}var ue={},bo;function nn(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#111b27",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#111b27",background:"#e3eaf2",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'code[class*="language-"]::-moz-selection':{background:"#8da1b9"},'code[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"]::selection':{background:"#8da1b9"},'pre[class*="language-"] ::selection':{background:"#8da1b9"},'code[class*="language-"]::selection':{background:"#8da1b9"},'code[class*="language-"] ::selection':{background:"#8da1b9"},':not(pre) > code[class*="language-"]':{background:"#e3eaf2",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#3c526d"},prolog:{color:"#3c526d"},doctype:{color:"#3c526d"},cdata:{color:"#3c526d"},punctuation:{color:"#111b27"},"delimiter.important":{color:"#006d6d",fontWeight:"inherit"},"selector.parent":{color:"#006d6d"},tag:{color:"#006d6d"},"tag.punctuation":{color:"#006d6d"},"attr-name":{color:"#755f00"},boolean:{color:"#755f00"},"boolean.important":{color:"#755f00"},number:{color:"#755f00"},constant:{color:"#755f00"},"selector.attribute":{color:"#755f00"},"class-name":{color:"#005a8e"},key:{color:"#005a8e"},parameter:{color:"#005a8e"},property:{color:"#005a8e"},"property-access":{color:"#005a8e"},variable:{color:"#005a8e"},"attr-value":{color:"#116b00"},inserted:{color:"#116b00"},color:{color:"#116b00"},"selector.value":{color:"#116b00"},string:{color:"#116b00"},"string.url-link":{color:"#116b00"},builtin:{color:"#af00af"},"keyword-array":{color:"#af00af"},package:{color:"#af00af"},regex:{color:"#af00af"},function:{color:"#7c00aa"},"selector.class":{color:"#7c00aa"},"selector.id":{color:"#7c00aa"},"atrule.rule":{color:"#a04900"},combinator:{color:"#a04900"},keyword:{color:"#a04900"},operator:{color:"#a04900"},"pseudo-class":{color:"#a04900"},"pseudo-element":{color:"#a04900"},selector:{color:"#a04900"},unit:{color:"#a04900"},deleted:{color:"#c22f2e"},important:{color:"#c22f2e",fontWeight:"bold"},"keyword-this":{color:"#005a8e",fontWeight:"bold"},this:{color:"#005a8e",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#af00af"},".language-markdown .token.code":{color:"#006d6d"},".language-markdown .token.hr.punctuation":{color:"#005a8e"},".language-markdown .token.url > .token.content":{color:"#116b00"},".language-markdown .token.url-link":{color:"#755f00"},".language-markdown .token.list.punctuation":{color:"#af00af"},".language-markdown .token.table-header":{color:"#111b27"},".language-json .token.operator":{color:"#111b27"},".language-scss .token.variable":{color:"#006d6d"},"token.tab:not(:empty):before":{color:"#3c526d"},"token.cr:before":{color:"#3c526d"},"token.lf:before":{color:"#3c526d"},"token.space:before":{color:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#e3eaf2",background:"#3c526d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #8da1b92f 70%, #8da1b925)"},".line-highlight.line-highlight:before":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#3c526d1f"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #8da1b97a",background:"#d0dae77a"},".line-numbers .line-numbers-rows > span:before":{color:"#3c526dda"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#7c00aa"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},".command-line .command-line-prompt":{borderRight:"1px solid #8da1b97a"},".command-line .command-line-prompt > span:before":{color:"#3c526dda"}}}(ue)),ue}var ge={},po;function an(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#e3eaf2",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#e3eaf2",background:"#111b27",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#3c526d"},'pre[class*="language-"] ::-moz-selection':{background:"#3c526d"},'code[class*="language-"]::-moz-selection':{background:"#3c526d"},'code[class*="language-"] ::-moz-selection':{background:"#3c526d"},'pre[class*="language-"]::selection':{background:"#3c526d"},'pre[class*="language-"] ::selection':{background:"#3c526d"},'code[class*="language-"]::selection':{background:"#3c526d"},'code[class*="language-"] ::selection':{background:"#3c526d"},':not(pre) > code[class*="language-"]':{background:"#111b27",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#8da1b9"},prolog:{color:"#8da1b9"},doctype:{color:"#8da1b9"},cdata:{color:"#8da1b9"},punctuation:{color:"#e3eaf2"},"delimiter.important":{color:"#66cccc",fontWeight:"inherit"},"selector.parent":{color:"#66cccc"},tag:{color:"#66cccc"},"tag.punctuation":{color:"#66cccc"},"attr-name":{color:"#e6d37a"},boolean:{color:"#e6d37a"},"boolean.important":{color:"#e6d37a"},number:{color:"#e6d37a"},constant:{color:"#e6d37a"},"selector.attribute":{color:"#e6d37a"},"class-name":{color:"#6cb8e6"},key:{color:"#6cb8e6"},parameter:{color:"#6cb8e6"},property:{color:"#6cb8e6"},"property-access":{color:"#6cb8e6"},variable:{color:"#6cb8e6"},"attr-value":{color:"#91d076"},inserted:{color:"#91d076"},color:{color:"#91d076"},"selector.value":{color:"#91d076"},string:{color:"#91d076"},"string.url-link":{color:"#91d076"},builtin:{color:"#f4adf4"},"keyword-array":{color:"#f4adf4"},package:{color:"#f4adf4"},regex:{color:"#f4adf4"},function:{color:"#c699e3"},"selector.class":{color:"#c699e3"},"selector.id":{color:"#c699e3"},"atrule.rule":{color:"#e9ae7e"},combinator:{color:"#e9ae7e"},keyword:{color:"#e9ae7e"},operator:{color:"#e9ae7e"},"pseudo-class":{color:"#e9ae7e"},"pseudo-element":{color:"#e9ae7e"},selector:{color:"#e9ae7e"},unit:{color:"#e9ae7e"},deleted:{color:"#cd6660"},important:{color:"#cd6660",fontWeight:"bold"},"keyword-this":{color:"#6cb8e6",fontWeight:"bold"},this:{color:"#6cb8e6",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#f4adf4"},".language-markdown .token.code":{color:"#66cccc"},".language-markdown .token.hr.punctuation":{color:"#6cb8e6"},".language-markdown .token.url .token.content":{color:"#91d076"},".language-markdown .token.url-link":{color:"#e6d37a"},".language-markdown .token.list.punctuation":{color:"#f4adf4"},".language-markdown .token.table-header":{color:"#e3eaf2"},".language-json .token.operator":{color:"#e3eaf2"},".language-scss .token.variable":{color:"#66cccc"},"token.tab:not(:empty):before":{color:"#8da1b9"},"token.cr:before":{color:"#8da1b9"},"token.lf:before":{color:"#8da1b9"},"token.space:before":{color:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#111b27",background:"#8da1b9"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #3c526d5f 70%, #3c526d55)"},".line-highlight.line-highlight:before":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#8da1b918"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #0b121b",background:"#0b121b7a"},".line-numbers .line-numbers-rows > span:before":{color:"#8da1b9da"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#c699e3"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},".command-line .command-line-prompt":{borderRight:"1px solid #0b121b"},".command-line .command-line-prompt > span:before":{color:"#8da1b9da"}}}(ge)),ge}var be={},fo;function ln(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local",margin:".5em 0",padding:"0 1em"},'pre[class*="language-"] > code':{display:"block"},':not(pre) > code[class*="language-"]':{position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"}}}(be)),be}var pe={},ho;function tn(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}}(pe)),pe}var fe={},mo;function cn(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#282a36",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#282a36",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#6272a4"},prolog:{color:"#6272a4"},doctype:{color:"#6272a4"},cdata:{color:"#6272a4"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#ff79c6"},tag:{color:"#ff79c6"},constant:{color:"#ff79c6"},symbol:{color:"#ff79c6"},deleted:{color:"#ff79c6"},boolean:{color:"#bd93f9"},number:{color:"#bd93f9"},selector:{color:"#50fa7b"},"attr-name":{color:"#50fa7b"},string:{color:"#50fa7b"},char:{color:"#50fa7b"},builtin:{color:"#50fa7b"},inserted:{color:"#50fa7b"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#f1fa8c"},"attr-value":{color:"#f1fa8c"},function:{color:"#f1fa8c"},"class-name":{color:"#f1fa8c"},keyword:{color:"#8be9fd"},regex:{color:"#ffb86c"},important:{color:"#ffb86c",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(fe)),fe}var he={},ko;function sn(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6c6783"},prolog:{color:"#6c6783"},doctype:{color:"#6c6783"},cdata:{color:"#6c6783"},punctuation:{color:"#6c6783"},namespace:{Opacity:".7"},tag:{color:"#e09142"},operator:{color:"#e09142"},number:{color:"#e09142"},property:{color:"#9a86fd"},function:{color:"#9a86fd"},"tag-id":{color:"#eeebff"},selector:{color:"#eeebff"},"atrule-id":{color:"#eeebff"},"code.language-javascript":{color:"#c4b9fe"},"attr-name":{color:"#c4b9fe"},"code.language-css":{color:"#ffcc99"},"code.language-scss":{color:"#ffcc99"},boolean:{color:"#ffcc99"},string:{color:"#ffcc99"},entity:{color:"#ffcc99",cursor:"help"},url:{color:"#ffcc99"},".language-css .token.string":{color:"#ffcc99"},".language-scss .token.string":{color:"#ffcc99"},".style .token.string":{color:"#ffcc99"},"attr-value":{color:"#ffcc99"},keyword:{color:"#ffcc99"},control:{color:"#ffcc99"},directive:{color:"#ffcc99"},unit:{color:"#ffcc99"},statement:{color:"#ffcc99"},regex:{color:"#ffcc99"},atrule:{color:"#ffcc99"},placeholder:{color:"#ffcc99"},variable:{color:"#ffcc99"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #eeebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c4b9fe"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #8a75f5",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c2937"},".line-numbers .line-numbers-rows > span:before":{color:"#3c3949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0))"}}}(he)),he}var me={},yo;function dn(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6a5f58"},prolog:{color:"#6a5f58"},doctype:{color:"#6a5f58"},cdata:{color:"#6a5f58"},punctuation:{color:"#6a5f58"},namespace:{Opacity:".7"},tag:{color:"#bfa05a"},operator:{color:"#bfa05a"},number:{color:"#bfa05a"},property:{color:"#88786d"},function:{color:"#88786d"},"tag-id":{color:"#fff3eb"},selector:{color:"#fff3eb"},"atrule-id":{color:"#fff3eb"},"code.language-javascript":{color:"#a48774"},"attr-name":{color:"#a48774"},"code.language-css":{color:"#fcc440"},"code.language-scss":{color:"#fcc440"},boolean:{color:"#fcc440"},string:{color:"#fcc440"},entity:{color:"#fcc440",cursor:"help"},url:{color:"#fcc440"},".language-css .token.string":{color:"#fcc440"},".language-scss .token.string":{color:"#fcc440"},".style .token.string":{color:"#fcc440"},"attr-value":{color:"#fcc440"},keyword:{color:"#fcc440"},control:{color:"#fcc440"},directive:{color:"#fcc440"},unit:{color:"#fcc440"},statement:{color:"#fcc440"},regex:{color:"#fcc440"},atrule:{color:"#fcc440"},placeholder:{color:"#fcc440"},variable:{color:"#fcc440"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #fff3eb",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#a48774"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #816d5f",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#35302b"},".line-numbers .line-numbers-rows > span:before":{color:"#46403d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0))"}}}(me)),me}var ke={},wo;function un(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#535f53"},prolog:{color:"#535f53"},doctype:{color:"#535f53"},cdata:{color:"#535f53"},punctuation:{color:"#535f53"},namespace:{Opacity:".7"},tag:{color:"#a2b34d"},operator:{color:"#a2b34d"},number:{color:"#a2b34d"},property:{color:"#687d68"},function:{color:"#687d68"},"tag-id":{color:"#f0fff0"},selector:{color:"#f0fff0"},"atrule-id":{color:"#f0fff0"},"code.language-javascript":{color:"#b3d6b3"},"attr-name":{color:"#b3d6b3"},"code.language-css":{color:"#e5fb79"},"code.language-scss":{color:"#e5fb79"},boolean:{color:"#e5fb79"},string:{color:"#e5fb79"},entity:{color:"#e5fb79",cursor:"help"},url:{color:"#e5fb79"},".language-css .token.string":{color:"#e5fb79"},".language-scss .token.string":{color:"#e5fb79"},".style .token.string":{color:"#e5fb79"},"attr-value":{color:"#e5fb79"},keyword:{color:"#e5fb79"},control:{color:"#e5fb79"},directive:{color:"#e5fb79"},unit:{color:"#e5fb79"},statement:{color:"#e5fb79"},regex:{color:"#e5fb79"},atrule:{color:"#e5fb79"},placeholder:{color:"#e5fb79"},variable:{color:"#e5fb79"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #f0fff0",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#b3d6b3"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #5c705c",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c302c"},".line-numbers .line-numbers-rows > span:before":{color:"#3b423b"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0))"}}}(ke)),ke}var ye={},So;function gn(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#b6ad9a"},prolog:{color:"#b6ad9a"},doctype:{color:"#b6ad9a"},cdata:{color:"#b6ad9a"},punctuation:{color:"#b6ad9a"},namespace:{Opacity:".7"},tag:{color:"#063289"},operator:{color:"#063289"},number:{color:"#063289"},property:{color:"#b29762"},function:{color:"#b29762"},"tag-id":{color:"#2d2006"},selector:{color:"#2d2006"},"atrule-id":{color:"#2d2006"},"code.language-javascript":{color:"#896724"},"attr-name":{color:"#896724"},"code.language-css":{color:"#728fcb"},"code.language-scss":{color:"#728fcb"},boolean:{color:"#728fcb"},string:{color:"#728fcb"},entity:{color:"#728fcb",cursor:"help"},url:{color:"#728fcb"},".language-css .token.string":{color:"#728fcb"},".language-scss .token.string":{color:"#728fcb"},".style .token.string":{color:"#728fcb"},"attr-value":{color:"#728fcb"},keyword:{color:"#728fcb"},control:{color:"#728fcb"},directive:{color:"#728fcb"},unit:{color:"#728fcb"},statement:{color:"#728fcb"},regex:{color:"#728fcb"},atrule:{color:"#728fcb"},placeholder:{color:"#93abdc"},variable:{color:"#93abdc"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #2d2006",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#896724"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #896724",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#ece8de"},".line-numbers .line-numbers-rows > span:before":{color:"#cdc4b1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0))"}}}(ye)),ye}var we={},xo;function bn(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#4a5f78"},prolog:{color:"#4a5f78"},doctype:{color:"#4a5f78"},cdata:{color:"#4a5f78"},punctuation:{color:"#4a5f78"},namespace:{Opacity:".7"},tag:{color:"#0aa370"},operator:{color:"#0aa370"},number:{color:"#0aa370"},property:{color:"#57718e"},function:{color:"#57718e"},"tag-id":{color:"#ebf4ff"},selector:{color:"#ebf4ff"},"atrule-id":{color:"#ebf4ff"},"code.language-javascript":{color:"#7eb6f6"},"attr-name":{color:"#7eb6f6"},"code.language-css":{color:"#47ebb4"},"code.language-scss":{color:"#47ebb4"},boolean:{color:"#47ebb4"},string:{color:"#47ebb4"},entity:{color:"#47ebb4",cursor:"help"},url:{color:"#47ebb4"},".language-css .token.string":{color:"#47ebb4"},".language-scss .token.string":{color:"#47ebb4"},".style .token.string":{color:"#47ebb4"},"attr-value":{color:"#47ebb4"},keyword:{color:"#47ebb4"},control:{color:"#47ebb4"},directive:{color:"#47ebb4"},unit:{color:"#47ebb4"},statement:{color:"#47ebb4"},regex:{color:"#47ebb4"},atrule:{color:"#47ebb4"},placeholder:{color:"#47ebb4"},variable:{color:"#47ebb4"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebf4ff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#7eb6f6"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #34659d",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#1f2932"},".line-numbers .line-numbers-rows > span:before":{color:"#2c3847"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0))"}}}(we)),we}var Se={},vo;function pn(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#5b5b76"},prolog:{color:"#5b5b76"},doctype:{color:"#5b5b76"},cdata:{color:"#5b5b76"},punctuation:{color:"#5b5b76"},namespace:{Opacity:".7"},tag:{color:"#dd672c"},operator:{color:"#dd672c"},number:{color:"#dd672c"},property:{color:"#767693"},function:{color:"#767693"},"tag-id":{color:"#ebebff"},selector:{color:"#ebebff"},"atrule-id":{color:"#ebebff"},"code.language-javascript":{color:"#aaaaca"},"attr-name":{color:"#aaaaca"},"code.language-css":{color:"#fe8c52"},"code.language-scss":{color:"#fe8c52"},boolean:{color:"#fe8c52"},string:{color:"#fe8c52"},entity:{color:"#fe8c52",cursor:"help"},url:{color:"#fe8c52"},".language-css .token.string":{color:"#fe8c52"},".language-scss .token.string":{color:"#fe8c52"},".style .token.string":{color:"#fe8c52"},"attr-value":{color:"#fe8c52"},keyword:{color:"#fe8c52"},control:{color:"#fe8c52"},directive:{color:"#fe8c52"},unit:{color:"#fe8c52"},statement:{color:"#fe8c52"},regex:{color:"#fe8c52"},atrule:{color:"#fe8c52"},placeholder:{color:"#fe8c52"},variable:{color:"#fe8c52"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#aaaaca"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #7676f4",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#262631"},".line-numbers .line-numbers-rows > span:before":{color:"#393949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0))"}}}(Se)),Se}var xe={},zo;function fn(){return zo||(zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"]::selection':{background:"#b3d4fc"},'pre[class*="language-"] ::selection':{background:"#b3d4fc"},'code[class*="language-"]::selection':{background:"#b3d4fc"},'code[class*="language-"] ::selection':{background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#999988",fontStyle:"italic"},prolog:{color:"#999988",fontStyle:"italic"},doctype:{color:"#999988",fontStyle:"italic"},cdata:{color:"#999988",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#e3116c"},"attr-value":{color:"#e3116c"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},entity:{color:"#36acaa"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},property:{color:"#36acaa"},regex:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#00a4db"},keyword:{color:"#00a4db"},"attr-name":{color:"#00a4db"},".language-autohotkey .token.selector":{color:"#00a4db"},function:{color:"#9a050f",fontWeight:"bold"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},tag:{color:"#00009f"},selector:{color:"#00009f"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(xe)),xe}var ve={},Mo;function hn(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#1d2021"},'pre[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},':not(pre) > code[class*="language-"]':{background:"#1d2021",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#a89984"},prolog:{color:"#a89984"},cdata:{color:"#a89984"},delimiter:{color:"#fb4934"},boolean:{color:"#fb4934"},keyword:{color:"#fb4934"},selector:{color:"#fb4934"},important:{color:"#fb4934"},atrule:{color:"#fb4934"},operator:{color:"#a89984"},punctuation:{color:"#a89984"},"attr-name":{color:"#a89984"},tag:{color:"#fabd2f"},"tag.punctuation":{color:"#fabd2f"},doctype:{color:"#fabd2f"},builtin:{color:"#fabd2f"},entity:{color:"#d3869b"},number:{color:"#d3869b"},symbol:{color:"#d3869b"},property:{color:"#fb4934"},constant:{color:"#fb4934"},variable:{color:"#fb4934"},string:{color:"#b8bb26"},char:{color:"#b8bb26"},"attr-value":{color:"#a89984"},"attr-value.punctuation":{color:"#a89984"},url:{color:"#b8bb26",textDecoration:"underline"},function:{color:"#fabd2f"},regex:{background:"#b8bb26"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#a89984"},deleted:{background:"#fb4934"}}}(ve)),ve}var ze={},Ao;function mn(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#f9f5d7"},'pre[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},':not(pre) > code[class*="language-"]':{background:"#f9f5d7",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#7c6f64"},prolog:{color:"#7c6f64"},cdata:{color:"#7c6f64"},delimiter:{color:"#9d0006"},boolean:{color:"#9d0006"},keyword:{color:"#9d0006"},selector:{color:"#9d0006"},important:{color:"#9d0006"},atrule:{color:"#9d0006"},operator:{color:"#7c6f64"},punctuation:{color:"#7c6f64"},"attr-name":{color:"#7c6f64"},tag:{color:"#b57614"},"tag.punctuation":{color:"#b57614"},doctype:{color:"#b57614"},builtin:{color:"#b57614"},entity:{color:"#8f3f71"},number:{color:"#8f3f71"},symbol:{color:"#8f3f71"},property:{color:"#9d0006"},constant:{color:"#9d0006"},variable:{color:"#9d0006"},string:{color:"#797403"},char:{color:"#797403"},"attr-value":{color:"#7c6f64"},"attr-value.punctuation":{color:"#7c6f64"},url:{color:"#797403",textDecoration:"underline"},function:{color:"#b57614"},regex:{background:"#797403"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#7c6f64"},deleted:{background:"#9d0006"}}}(ze)),ze}var Me={},Co;function kn(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},"pre[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",border:"1px solid #2a4555",borderRadius:"5px",padding:"1.5em 1em",margin:"1em 0",overflow:"auto"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},":not(pre) > code[class*='language-']":{color:"#f0f6f6",background:"#2a4555",padding:"0.2em 0.3em",borderRadius:"0.2em",boxDecorationBreak:"clone"},comment:{color:"#446e69"},prolog:{color:"#446e69"},doctype:{color:"#446e69"},cdata:{color:"#446e69"},punctuation:{color:"#d6b007"},property:{color:"#d6e7ff"},tag:{color:"#d6e7ff"},boolean:{color:"#d6e7ff"},number:{color:"#d6e7ff"},constant:{color:"#d6e7ff"},symbol:{color:"#d6e7ff"},deleted:{color:"#d6e7ff"},selector:{color:"#e60067"},"attr-name":{color:"#e60067"},builtin:{color:"#e60067"},inserted:{color:"#e60067"},string:{color:"#49c6ec"},char:{color:"#49c6ec"},operator:{color:"#ec8e01",background:"transparent"},entity:{color:"#ec8e01",background:"transparent"},url:{color:"#ec8e01",background:"transparent"},".language-css .token.string":{color:"#ec8e01",background:"transparent"},".style .token.string":{color:"#ec8e01",background:"transparent"},atrule:{color:"#0fe468"},"attr-value":{color:"#0fe468"},keyword:{color:"#0fe468"},function:{color:"#78f3e9"},"class-name":{color:"#78f3e9"},regex:{color:"#d6e7ff"},important:{color:"#d6e7ff"},variable:{color:"#d6e7ff"}}}(Me)),Me}var Ae={},Ho;function yn(){return Ho||(Ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8"},'pre[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#797379"},prolog:{color:"#797379"},doctype:{color:"#797379"},cdata:{color:"#797379"},punctuation:{color:"#b9b5b8"},".namespace":{Opacity:".7"},null:{color:"#fd8b19"},operator:{color:"#fd8b19"},boolean:{color:"#fd8b19"},number:{color:"#fd8b19"},property:{color:"#fdcc59"},tag:{color:"#1290bf"},string:{color:"#149b93"},selector:{color:"#c85e7c"},"attr-name":{color:"#fd8b19"},entity:{color:"#149b93",cursor:"help"},url:{color:"#149b93"},".language-css .token.string":{color:"#149b93"},".style .token.string":{color:"#149b93"},"attr-value":{color:"#8fc13e"},keyword:{color:"#8fc13e"},control:{color:"#8fc13e"},directive:{color:"#8fc13e"},unit:{color:"#8fc13e"},statement:{color:"#149b93"},regex:{color:"#149b93"},atrule:{color:"#149b93"},placeholder:{color:"#1290bf"},variable:{color:"#1290bf"},important:{color:"#dd464c",fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid red",OutlineOffset:".4em"}}}(Ae)),Ae}var Ce={},jo;function wn(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#263E52",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#263E52",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#5c98cd"},prolog:{color:"#5c98cd"},doctype:{color:"#5c98cd"},cdata:{color:"#5c98cd"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#F05E5D"},tag:{color:"#F05E5D"},constant:{color:"#F05E5D"},symbol:{color:"#F05E5D"},deleted:{color:"#F05E5D"},boolean:{color:"#BC94F9"},number:{color:"#BC94F9"},selector:{color:"#FCFCD6"},"attr-name":{color:"#FCFCD6"},string:{color:"#FCFCD6"},char:{color:"#FCFCD6"},builtin:{color:"#FCFCD6"},inserted:{color:"#FCFCD6"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#66D8EF"},"attr-value":{color:"#66D8EF"},function:{color:"#66D8EF"},"class-name":{color:"#66D8EF"},keyword:{color:"#6EB26E"},regex:{color:"#F05E5D"},important:{color:"#F05E5D",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Ce)),Ce}var He={},To;function Sn(){return To||(To=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#a5e844"},attribute:{color:"#a5e844"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},comment:{color:"#616161"},constant:{color:"#c792ea"},deleted:{color:"#ff6666"},doctype:{color:"#616161"},entity:{color:"#ff6666"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#616161"},property:{color:"#80cbc4"},"pseudo-class":{color:"#a5e844"},"pseudo-element":{color:"#a5e844"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#ff6666"},string:{color:"#a5e844"},symbol:{color:"#c792ea"},tag:{color:"#ff6666"},unit:{color:"#fd9170"},url:{color:"#ff6666"},variable:{color:"#ff6666"}}}(He)),He}var je={},Oo;function xn(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}}(je)),je}var Te={},Wo;function vn(){return Wo||(Wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#c3e88d"},attribute:{color:"#c3e88d"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},color:{color:"#f2ff00"},comment:{color:"#546e7a"},constant:{color:"#c792ea"},deleted:{color:"#f07178"},doctype:{color:"#546e7a"},entity:{color:"#f07178"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea",fontStyle:"italic"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#546e7a"},property:{color:"#80cbc4"},"pseudo-class":{color:"#c3e88d"},"pseudo-element":{color:"#c3e88d"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#f07178"},string:{color:"#c3e88d"},symbol:{color:"#c792ea"},tag:{color:"#f07178"},unit:{color:"#f07178"},url:{color:"#fd9170"},variable:{color:"#f07178"}}}(Te)),Te}var Oe={},Fo;function zn(){return Fo||(Fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#d6deeb",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#011627"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},':not(pre) > code[class*="language-"]':{color:"white",background:"#011627",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(130, 170, 255)"},function:{color:"rgb(130, 170, 255)"},builtin:{color:"rgb(130, 170, 255)"},char:{color:"rgb(130, 170, 255)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Oe)),Oe}var We={},Ro;function Mn(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2E3440",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2E3440",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#636f88"},prolog:{color:"#636f88"},doctype:{color:"#636f88"},cdata:{color:"#636f88"},punctuation:{color:"#81A1C1"},".namespace":{Opacity:".7"},property:{color:"#81A1C1"},tag:{color:"#81A1C1"},constant:{color:"#81A1C1"},symbol:{color:"#81A1C1"},deleted:{color:"#81A1C1"},number:{color:"#B48EAD"},boolean:{color:"#81A1C1"},selector:{color:"#A3BE8C"},"attr-name":{color:"#A3BE8C"},string:{color:"#A3BE8C"},char:{color:"#A3BE8C"},builtin:{color:"#A3BE8C"},inserted:{color:"#A3BE8C"},operator:{color:"#81A1C1"},entity:{color:"#81A1C1",cursor:"help"},url:{color:"#81A1C1"},".language-css .token.string":{color:"#81A1C1"},".style .token.string":{color:"#81A1C1"},variable:{color:"#81A1C1"},atrule:{color:"#88C0D0"},"attr-value":{color:"#88C0D0"},function:{color:"#88C0D0"},"class-name":{color:"#88C0D0"},keyword:{color:"#81A1C1"},regex:{color:"#EBCB8B"},important:{color:"#EBCB8B",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(We)),We}var Fe={},Bo;function An(){return Bo||(Bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}}}(Fe)),Fe}var Re={},Do;function Cn(){return Do||(Do=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}}(Re)),Re}var Be={},_o;function Hn(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#dccf8f",textShadow:"0"},'pre[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#DCCF8F",textShadow:"0",borderRadius:"5px",border:"1px solid #000",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"12px",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{borderRadius:"5px",border:"1px solid #000",color:"#DCCF8F",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"2px 6px"},namespace:{Opacity:".7"},comment:{color:"#586e75",fontStyle:"italic"},prolog:{color:"#586e75",fontStyle:"italic"},doctype:{color:"#586e75",fontStyle:"italic"},cdata:{color:"#586e75",fontStyle:"italic"},number:{color:"#b89859"},string:{color:"#468966"},char:{color:"#468966"},builtin:{color:"#468966"},inserted:{color:"#468966"},"attr-name":{color:"#b89859"},operator:{color:"#dccf8f"},entity:{color:"#dccf8f",cursor:"help"},url:{color:"#dccf8f"},".language-css .token.string":{color:"#dccf8f"},".style .token.string":{color:"#dccf8f"},selector:{color:"#859900"},regex:{color:"#859900"},atrule:{color:"#cb4b16"},keyword:{color:"#cb4b16"},"attr-value":{color:"#468966"},function:{color:"#b58900"},variable:{color:"#b58900"},placeholder:{color:"#b58900"},property:{color:"#b89859"},tag:{color:"#ffb03b"},boolean:{color:"#b89859"},constant:{color:"#b89859"},symbol:{color:"#b89859"},important:{color:"#dc322f"},statement:{color:"#dc322f"},deleted:{color:"#dc322f"},punctuation:{color:"#dccf8f"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Be)),Be}var De={},Po;function jn(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245"},"pre[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245",padding:"2em",margin:"0.5em 0",overflow:"auto",background:"#1e1e3f"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},":not(pre) > code[class*='language-']":{background:"#1e1e3f",padding:"0.1em",borderRadius:"0.3em"},"":{fontWeight:"400"},comment:{color:"#b362ff"},prolog:{color:"#b362ff"},cdata:{color:"#b362ff"},delimiter:{color:"#ff9d00"},keyword:{color:"#ff9d00"},selector:{color:"#ff9d00"},important:{color:"#ff9d00"},atrule:{color:"#ff9d00"},operator:{color:"rgb(255, 180, 84)",background:"none"},"attr-name":{color:"rgb(255, 180, 84)"},punctuation:{color:"#ffffff"},boolean:{color:"rgb(255, 98, 140)"},tag:{color:"rgb(255, 157, 0)"},"tag.punctuation":{color:"rgb(255, 157, 0)"},doctype:{color:"rgb(255, 157, 0)"},builtin:{color:"rgb(255, 157, 0)"},entity:{color:"#6897bb",background:"none"},symbol:{color:"#6897bb"},number:{color:"#ff628c"},property:{color:"#ff628c"},constant:{color:"#ff628c"},variable:{color:"#ff628c"},string:{color:"#a5ff90"},char:{color:"#a5ff90"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline",background:"none"},function:{color:"rgb(250, 208, 0)"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#00ff00"},deleted:{background:"#ff000d"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"},"class-name":{color:"#fb94ff"},".language-css .token.string":{background:"none"},".style .token.string":{background:"none"},".line-highlight.line-highlight":{marginTop:"36px",background:"linear-gradient(to right, rgba(179, 98, 255, 0.17), transparent)"},".line-highlight.line-highlight:before":{content:"''"},".line-highlight.line-highlight[data-end]:after":{content:"''"}}}(De)),De}var _e={},qo;function Tn(){return qo||(qo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#002b36"},':not(pre) > code[class*="language-"]':{background:"#002b36",padding:".1em",borderRadius:".3em"},comment:{color:"#586e75"},prolog:{color:"#586e75"},doctype:{color:"#586e75"},cdata:{color:"#586e75"},punctuation:{color:"#93a1a1"},".namespace":{Opacity:".7"},property:{color:"#268bd2"},keyword:{color:"#268bd2"},tag:{color:"#268bd2"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#b58900"},constant:{color:"#b58900"},symbol:{color:"#dc322f"},deleted:{color:"#dc322f"},number:{color:"#859900"},selector:{color:"#859900"},"attr-name":{color:"#859900"},string:{color:"#859900"},char:{color:"#859900"},builtin:{color:"#859900"},inserted:{color:"#859900"},variable:{color:"#268bd2"},operator:{color:"#EDEDED"},function:{color:"#268bd2"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"}}}(_e)),_e}var Pe={},No;function On(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)"},':not(pre) > code[class*="language-"]':{backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8e8e8e"},"block-comment":{color:"#8e8e8e"},prolog:{color:"#8e8e8e"},doctype:{color:"#8e8e8e"},cdata:{color:"#8e8e8e"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},number:{color:"#e2777a"},unit:{color:"#e2777a"},hexcode:{color:"#e2777a"},deleted:{color:"#e2777a"},property:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},selector:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},"function-name":{color:"#6196cc"},boolean:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"selector.id":{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},function:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"class-name":{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"},constant:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},symbol:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},important:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575",fontWeight:"bold"},atrule:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},keyword:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},"selector.class":{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},builtin:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},string:{color:"#f87c32"},char:{color:"#f87c32"},"attr-value":{color:"#f87c32"},regex:{color:"#f87c32"},variable:{color:"#f87c32"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(Pe)),Pe}var qe={},Eo;function Wn(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"]::selection':{background:"#C1DEF1"},'pre[class*="language-"] ::selection':{background:"#C1DEF1"},'code[class*="language-"]::selection':{background:"#C1DEF1"},'code[class*="language-"] ::selection':{background:"#C1DEF1"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#008000",fontStyle:"italic"},prolog:{color:"#008000",fontStyle:"italic"},doctype:{color:"#008000",fontStyle:"italic"},cdata:{color:"#008000",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#A31515"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#0000ff"},keyword:{color:"#0000ff"},"attr-value":{color:"#0000ff"},".language-autohotkey .token.selector":{color:"#0000ff"},".language-json .token.boolean":{color:"#0000ff"},".language-json .token.number":{color:"#0000ff"},'code[class*="language-css"]':{color:"#0000ff"},function:{color:"#393A34"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},selector:{color:"#800000"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"class-name":{color:"#2B91AF"},".language-json .token.property":{color:"#2B91AF"},tag:{color:"#800000"},"attr-name":{color:"#ff0000"},property:{color:"#ff0000"},regex:{color:"#ff0000"},entity:{color:"#ff0000"},"directive.tag.tag":{background:"#ffff00",color:"#393A34"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#a5a5a5"},".line-numbers .line-numbers-rows > span:before":{color:"#2B91AF"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0))"}}}(qe)),qe}var Ne={},Lo;function Fn(){return Lo||(Lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}}}(Ne)),Ne}var Ee={},Io;function Rn(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none"},'pre[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none",background:"#2a2a2a",padding:"15px",borderRadius:"4px",border:"1px solid #e1e1e8",overflow:"auto",position:"relative"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{background:"#2a2a2a",padding:"0.15em 0.2em 0.05em",borderRadius:".3em",border:"0.13em solid #7a6652",boxShadow:"1px 1px 0.3em -0.1em #000 inset"},'pre[class*="language-"] code':{whiteSpace:"pre",display:"block"},namespace:{Opacity:".7"},comment:{color:"#6f705e"},prolog:{color:"#6f705e"},doctype:{color:"#6f705e"},cdata:{color:"#6f705e"},operator:{color:"#a77afe"},boolean:{color:"#a77afe"},number:{color:"#a77afe"},"attr-name":{color:"#e6d06c"},string:{color:"#e6d06c"},entity:{color:"#e6d06c",cursor:"help"},url:{color:"#e6d06c"},".language-css .token.string":{color:"#e6d06c"},".style .token.string":{color:"#e6d06c"},selector:{color:"#a6e22d"},inserted:{color:"#a6e22d"},atrule:{color:"#ef3b7d"},"attr-value":{color:"#ef3b7d"},keyword:{color:"#ef3b7d"},important:{color:"#ef3b7d",fontWeight:"bold"},deleted:{color:"#ef3b7d"},regex:{color:"#76d9e6"},statement:{color:"#76d9e6",fontWeight:"bold"},placeholder:{color:"#fff"},variable:{color:"#fff"},bold:{fontWeight:"bold"},punctuation:{color:"#bebec5"},italic:{fontStyle:"italic"},"code.language-markup":{color:"#f9f9f9"},"code.language-markup .token.tag":{color:"#ef3b7d"},"code.language-markup .token.attr-name":{color:"#a6e22d"},"code.language-markup .token.attr-value":{color:"#e6d06c"},"code.language-markup .token.style":{color:"#76d9e6"},"code.language-markup .token.script":{color:"#76d9e6"},"code.language-markup .token.script .token.keyword":{color:"#76d9e6"},".line-highlight.line-highlight":{padding:"0",background:"rgba(255, 255, 255, 0.08)"},".line-highlight.line-highlight:before":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"},".line-highlight.line-highlight[data-end]:after":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"}}}(Ee)),Ee}var Le={},Uo;function Bn(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#22da17",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"5px 0"},'pre[class*="language-"]':{color:"white",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"0.5em 0",background:"#0a143c",padding:"1em",overflow:"auto"},'pre[class*="language-"] *':{fontFamily:"monospace"},':not(pre) > code[class*="language-"]':{color:"white",background:"#0a143c",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(34 183 199)"},function:{color:"rgb(34 183 199)"},builtin:{color:"rgb(34 183 199)"},char:{color:"rgb(34 183 199)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Le)),Le}var Vo;function Dn(){return Vo||(Vo=1,function(e){var r=Ur();Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"a11yDark",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"atomDark",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,"cb",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"coldarkCold",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"coldarkDark",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"coy",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"coyWithoutShadows",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"darcula",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"dark",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"dracula",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"duotoneDark",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"duotoneEarth",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"duotoneForest",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"duotoneLight",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"duotoneSea",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"duotoneSpace",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"funky",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ghcolors",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"gruvboxDark",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"gruvboxLight",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"holiTheme",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"hopscotch",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(e,"lucario",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"materialDark",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,"materialLight",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"materialOceanic",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(e,"nightOwl",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"nord",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"okaidia",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"oneDark",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"oneLight",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"pojoaque",{enumerable:!0,get:function(){return lr.default}}),Object.defineProperty(e,"prism",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"shadesOfPurple",{enumerable:!0,get:function(){return tr.default}}),Object.defineProperty(e,"solarizedDarkAtom",{enumerable:!0,get:function(){return cr.default}}),Object.defineProperty(e,"solarizedlight",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"synthwave84",{enumerable:!0,get:function(){return ir.default}}),Object.defineProperty(e,"tomorrow",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"twilight",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"vs",{enumerable:!0,get:function(){return sr.default}}),Object.defineProperty(e,"vscDarkPlus",{enumerable:!0,get:function(){return dr.default}}),Object.defineProperty(e,"xonokai",{enumerable:!0,get:function(){return ur.default}}),Object.defineProperty(e,"zTouch",{enumerable:!0,get:function(){return gr.default}});var a=r(Vr()),n=r(Kr()),l=r(Qr()),m=r(Gr()),i=r(Jr()),v=r(Yr()),j=r(Xr()),h=r(Zr()),W=r($r()),k=r(en()),z=r(on()),C=r(rn()),F=r(nn()),g=r(an()),f=r(ln()),B=r(tn()),M=r(cn()),d=r(sn()),u=r(dn()),b=r(un()),s=r(gn()),D=r(bn()),U=r(pn()),A=r(fn()),N=r(hn()),_=r(mn()),E=r(kn()),V=r(yn()),p=r(wn()),R=r(Sn()),G=r(xn()),K=r(vn()),L=r(zn()),J=r(Mn()),I=r(An()),P=r(Cn()),lr=r(Hn()),tr=r(jn()),cr=r(Tn()),ir=r(On()),sr=r(Wn()),dr=r(Fn()),ur=r(Rn()),gr=r(Bn())}(X)),X}var Q=Dn();const _n=({message:e})=>{const{t:r}=Ke(),{theme:a}=or(),[n,l]=c.useState(null);c.useEffect(()=>{(async()=>{try{const[{default:v}]=await Promise.all([Qe(()=>import("./index-BKeDSElW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),Qe(()=>Promise.resolve({}),__vite__mapDeps([8]))]);l(()=>v)}catch(v){console.error("Failed to load KaTeX:",v)}})()},[]);const m=c.useCallback(async()=>{if(e.content)try{await navigator.clipboard.writeText(e.content)}catch(i){console.error(r("chat.copyError"),i)}},[e,r]);return o.jsxs("div",{className:`${e.role==="user"?"max-w-[80%] bg-primary text-primary-foreground":e.isError?"w-[95%] bg-red-100 text-red-600 dark:bg-red-950 dark:text-red-400":"w-[95%] bg-muted"} rounded-lg px-4 py-2`,children:[o.jsxs("div",{className:"relative",children:[o.jsx(_r,{className:"prose dark:prose-invert max-w-none text-sm break-words prose-headings:mt-4 prose-headings:mb-2 prose-p:my-2 prose-ul:my-2 prose-ol:my-2 prose-li:my-1 [&_.katex]:text-current [&_.katex-display]:my-4 [&_.katex-display]:overflow-x-auto",remarkPlugins:[qr,Nr],rehypePlugins:[...n?[[n,{errorColor:a==="dark"?"#ef4444":"#dc2626",throwOnError:!1,displayMode:!1}]]:[],Pr],skipHtml:!1,components:c.useMemo(()=>({code:i=>o.jsx(ar,{...i,renderAsDiagram:e.mermaidRendered??!1}),p:({children:i})=>o.jsx("p",{className:"my-2",children:i}),h1:({children:i})=>o.jsx("h1",{className:"text-xl font-bold mt-4 mb-2",children:i}),h2:({children:i})=>o.jsx("h2",{className:"text-lg font-bold mt-4 mb-2",children:i}),h3:({children:i})=>o.jsx("h3",{className:"text-base font-bold mt-3 mb-2",children:i}),h4:({children:i})=>o.jsx("h4",{className:"text-base font-semibold mt-3 mb-2",children:i}),ul:({children:i})=>o.jsx("ul",{className:"list-disc pl-5 my-2",children:i}),ol:({children:i})=>o.jsx("ol",{className:"list-decimal pl-5 my-2",children:i}),li:({children:i})=>o.jsx("li",{className:"my-1",children:i})}),[e.mermaidRendered]),children:e.content}),e.role==="assistant"&&e.content&&e.content.length>0&&o.jsxs(Ie,{onClick:m,className:"absolute right-0 bottom-0 size-6 rounded-md opacity-20 transition-opacity hover:opacity-100",tooltip:r("retrievePanel.chatMessage.copyTooltip"),variant:"default",size:"icon",children:[o.jsx(Hr,{className:"size-4"})," "]})]}),e.content===""&&o.jsx(jr,{className:"animate-spin duration-2000"})," "]})},Pn=e=>{if(!e||!e.children)return!1;const r=e.children.filter(a=>a.type==="text").map(a=>a.value).join("");return!r.includes(` +`)||r.length<40},qn=(e,r)=>!r||e!=="json"?!1:r.length>5e3,ar=c.memo(({className:e,children:r,node:a,renderAsDiagram:n=!1,...l})=>{const{theme:m}=or(),[i,v]=c.useState(!1),j=e==null?void 0:e.match(/language-(\w+)/),h=j?j[1]:void 0,W=Pn(a),k=c.useRef(null),z=c.useRef(null),C=String(r||"").replace(/\n$/,""),F=qn(h,C);return c.useEffect(()=>{if(n&&!i&&h==="mermaid"&&k.current){const g=k.current;z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{if(g&&!i)try{Ge.initialize({startOnLoad:!1,theme:m==="dark"?"dark":"default",securityLevel:"loose"}),g.innerHTML='
';const f=String(r).replace(/\n$/,"").trim();if(!(f.length>10&&(f.startsWith("graph")||f.startsWith("sequenceDiagram")||f.startsWith("classDiagram")||f.startsWith("stateDiagram")||f.startsWith("gantt")||f.startsWith("pie")||f.startsWith("flowchart")||f.startsWith("erDiagram")))){console.log("Mermaid content might be incomplete, skipping render attempt:",f);return}const M=f.split(` +`).map(u=>{const b=u.trim();if(b.startsWith("subgraph")){const s=b.split(" ");if(s.length>1)return`subgraph "${s.slice(1).join(" ").replace(/["']/g,"")}"`}return b}).filter(u=>!u.trim().startsWith("linkStyle")).join(` +`),d=`mermaid-${Date.now()}`;Ge.render(d,M).then(({svg:u,bindFunctions:b})=>{if(k.current===g&&!i){if(g.innerHTML=u,v(!0),b)try{b(g)}catch(s){console.error("Mermaid bindFunctions error:",s),g.innerHTML+='

Diagram interactions might be limited.

'}}else k.current!==g&&console.log("Mermaid container changed before rendering completed.")}).catch(u=>{if(console.error("Mermaid rendering promise error (debounced):",u),console.error("Failed content (debounced):",M),k.current===g){const b=u instanceof Error?u.message:String(u),s=document.createElement("pre");s.className="text-red-500 text-xs whitespace-pre-wrap break-words",s.textContent=`Mermaid diagram error: ${b} + +Content: +${M}`,g.innerHTML="",g.appendChild(s)}})}catch(f){if(console.error("Mermaid synchronous error (debounced):",f),console.error("Failed content (debounced):",String(r)),k.current===g){const B=f instanceof Error?f.message:String(f),M=document.createElement("pre");M.className="text-red-500 text-xs whitespace-pre-wrap break-words",M.textContent=`Mermaid diagram setup error: ${B}`,g.innerHTML="",g.appendChild(M)}}},300)}return()=>{z.current&&clearTimeout(z.current)}},[n,i,h,r,m]),F?o.jsx("pre",{className:"whitespace-pre-wrap break-words bg-muted p-4 rounded-md overflow-x-auto text-sm font-mono",children:C}):h==="mermaid"&&!n?o.jsx(Je,{style:m==="dark"?Q.oneDark:Q.oneLight,PreTag:"div",language:"text",...l,children:C}):h==="mermaid"?o.jsx("div",{className:"mermaid-diagram-container my-4 overflow-x-auto",ref:k}):W?o.jsx("code",{className:O(e,"mx-1 rounded-sm bg-muted px-1 py-0.5 font-mono text-sm"),...l,children:r}):o.jsx(Je,{style:m==="dark"?Q.oneDark:Q.oneLight,PreTag:"div",language:h,...l,children:C})});ar.displayName="CodeHighlight";const Ko=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`id-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;function Vn(){const{t:e}=Ke(),[r,a]=c.useState(()=>{try{return(q.getState().retrievalHistory||[]).map((u,b)=>{try{const s=u;return{...u,id:s.id||`hist-${Date.now()}-${b}`,mermaidRendered:s.mermaidRendered??!0}}catch(s){return console.error("Error processing message:",s),{role:"system",content:"Error loading message",id:`error-${Date.now()}-${b}`,isError:!0,mermaidRendered:!0}}})}catch(d){return console.error("Error loading history:",d),[]}}),[n,l]=c.useState(""),[m,i]=c.useState(!1),[v,j]=c.useState(""),h=c.useRef(!0),W=c.useRef(!1),k=c.useRef(!1),z=c.useRef(!1),C=c.useRef(null),F=c.useRef(null),g=c.useCallback(()=>{k.current=!0,requestAnimationFrame(()=>{C.current&&C.current.scrollIntoView({behavior:"auto"})})},[]),f=c.useCallback(async d=>{if(d.preventDefault(),!n.trim()||m)return;const u=["naive","local","global","hybrid","mix","bypass"],b=n.match(/^\/(\w+)\s+(.+)/);let s,D=n;if(/^\/\S+/.test(n)&&!b){j(e("retrievePanel.retrieval.queryModePrefixInvalid"));return}if(b){const p=b[1],R=b[2];if(!u.includes(p)){j(e("retrievePanel.retrieval.queryModeError",{modes:"naive, local, global, hybrid, mix, bypass"}));return}s=p,D=R}j("");const U={id:Ko(),content:n,role:"user"},A={id:Ko(),content:"",role:"assistant",mermaidRendered:!1},N=[...r];a([...N,U,A]),h.current=!0,z.current=!0,setTimeout(()=>{g()},0),l(""),i(!0);const _=(p,R)=>{A.content+=p;const G=/```mermaid\s+([\s\S]+?)```/g;let K=!1,L;for(;(L=G.exec(A.content))!==null;)if(L[1]&&L[1].trim().length>10){K=!0;break}A.mermaidRendered=K,a(J=>{const I=[...J],P=I[I.length-1];return P.role==="assistant"&&(P.content=A.content,P.isError=R,P.mermaidRendered=A.mermaidRendered),I}),h.current&&setTimeout(()=>{g()},30)},E=q.getState(),V={...E.querySettings,query:D,conversation_history:N.filter(p=>p.isError!==!0).slice(-(E.querySettings.history_turns||0)*2).map(p=>({role:p.role,content:p.content})),...s?{mode:s}:{}};try{if(E.querySettings.stream){let p="";await Tr(V,_,R=>{p+=R}),p&&(A.content&&(p=A.content+` +`+p),_(p,!0))}else{const p=await Or(V);_(p.response)}}catch(p){_(`${e("retrievePanel.retrieval.error")} +${Wr(p)}`,!0)}finally{i(!1),z.current=!1,q.getState().setRetrievalHistory([...N,U,A])}},[n,m,r,a,e,g]);c.useEffect(()=>{const d=F.current;if(!d)return;const u=s=>{Math.abs(s.deltaY)>10&&!W.current&&(h.current=!1)},b=Fr(()=>{if(k.current){k.current=!1;return}const s=F.current;s&&(s.scrollHeight-s.scrollTop-s.clientHeight<20?h.current=!0:!W.current&&!z.current&&(h.current=!1))},30);return d.addEventListener("wheel",u),d.addEventListener("scroll",b),()=>{d.removeEventListener("wheel",u),d.removeEventListener("scroll",b)}},[]),c.useEffect(()=>{const d=document.querySelector("form");if(!d)return;const u=()=>{W.current=!0,setTimeout(()=>{W.current=!1},500)};return d.addEventListener("mousedown",u),()=>{d.removeEventListener("mousedown",u)}},[]);const B=Rr(r,150);c.useEffect(()=>{h.current&&g()},[B,g]);const M=c.useCallback(()=>{a([]),q.getState().setRetrievalHistory([])},[a]);return o.jsxs("div",{className:"flex size-full gap-2 px-2 pb-12 overflow-hidden",children:[o.jsxs("div",{className:"flex grow flex-col gap-4",children:[o.jsx("div",{className:"relative grow",children:o.jsx("div",{ref:F,className:"bg-primary-foreground/60 absolute inset-0 flex flex-col overflow-auto rounded-lg border p-2",onClick:()=>{h.current&&(h.current=!1)},children:o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[r.length===0?o.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center text-lg",children:e("retrievePanel.retrieval.startPrompt")}):r.map(d=>o.jsx("div",{className:`flex ${d.role==="user"?"justify-end":"justify-start"}`,children:o.jsx(_n,{message:d})},d.id)),o.jsx("div",{ref:C,className:"pb-1"})]})})}),o.jsxs("form",{onSubmit:f,className:"flex shrink-0 items-center gap-2",children:[o.jsxs(Ie,{type:"button",variant:"outline",onClick:M,disabled:m,size:"sm",children:[o.jsx(Br,{}),e("retrievePanel.retrieval.clear")]}),o.jsxs("div",{className:"flex-1 relative",children:[o.jsx("label",{htmlFor:"query-input",className:"sr-only",children:e("retrievePanel.retrieval.placeholder")}),o.jsx(T,{id:"query-input",className:"w-full",value:n,onChange:d=>{l(d.target.value),v&&j("")},placeholder:e("retrievePanel.retrieval.placeholder"),disabled:m}),v&&o.jsx("div",{className:"absolute left-0 top-full mt-1 text-xs text-red-500",children:v})]}),o.jsxs(Ie,{type:"submit",variant:"default",disabled:m,size:"sm",children:[o.jsx(Dr,{}),e("retrievePanel.retrieval.send")]})]})]}),o.jsx(Ir,{})]})}export{Vn as R,Ye as S,Ue as a,Ze as b,Ve as c,H as d}; diff --git a/lightrag/api/webui/assets/feature-retrieval-DalFy9WB.js b/lightrag/api/webui/assets/feature-retrieval-DalFy9WB.js deleted file mode 100644 index 1b8ba068..00000000 --- a/lightrag/api/webui/assets/feature-retrieval-DalFy9WB.js +++ /dev/null @@ -1,10 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-1Hy45NwC.js","assets/markdown-vendor-DmIvJdn7.js","assets/ui-vendor-CeCm8EER.js","assets/react-vendor-DEwriMA6.js","assets/katex-B1t2RQs_.css"])))=>i.map(i=>d[i]); -import{j as o,E as Qo,I as br,F as Go,G as Jo,H as pr,J as Yo,V as fr,L as Xo,K as Zo,M as hr,N as mr,Q as $o,U as kr,W as yr,X as wr}from"./ui-vendor-CeCm8EER.js";import{c as T,P as er,Q as Sr,V as xr,u as Ke,z as q,C as vr,J as zr,a as Mr,b as Ar,K as Cr,W as v,Y as z,Z as M,_ as A,I as R,o as Y,$ as or,B as Ue,a0 as Hr,a1 as jr,a2 as Qe,a3 as Tr,a4 as Or,g as Wr,a5 as Fr,a6 as Rr,E as Br,a7 as Dr}from"./feature-graph-NODQb6qW.js";import{r as c}from"./react-vendor-DEwriMA6.js";import{m as Ge}from"./mermaid-vendor-D0f_SE0h.js";import{h as Je,M as _r,r as Pr,a as qr,b as Nr}from"./markdown-vendor-DmIvJdn7.js";const Ye=kr,Xe=wr,Ze=yr,Ie=c.forwardRef(({className:e,children:r,...a},n)=>o.jsxs(Qo,{ref:n,className:T("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[r,o.jsx(br,{asChild:!0,children:o.jsx(er,{className:"h-4 w-4 opacity-50"})})]}));Ie.displayName=Qo.displayName;const rr=c.forwardRef(({className:e,...r},a)=>o.jsx(Go,{ref:a,className:T("flex cursor-default items-center justify-center py-1",e),...r,children:o.jsx(Sr,{className:"h-4 w-4"})}));rr.displayName=Go.displayName;const nr=c.forwardRef(({className:e,...r},a)=>o.jsx(Jo,{ref:a,className:T("flex cursor-default items-center justify-center py-1",e),...r,children:o.jsx(er,{className:"h-4 w-4"})}));nr.displayName=Jo.displayName;const Ve=c.forwardRef(({className:e,children:r,position:a="popper",...n},l)=>o.jsx(pr,{children:o.jsxs(Yo,{ref:l,className:T("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[o.jsx(rr,{}),o.jsx(fr,{className:T("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),o.jsx(nr,{})]})}));Ve.displayName=Yo.displayName;const Lr=c.forwardRef(({className:e,...r},a)=>o.jsx(Xo,{ref:a,className:T("py-1.5 pr-2 pl-8 text-sm font-semibold",e),...r}));Lr.displayName=Xo.displayName;const H=c.forwardRef(({className:e,children:r,...a},n)=>o.jsxs(Zo,{ref:n,className:T("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(hr,{children:o.jsx(xr,{className:"h-4 w-4"})})}),o.jsx(mr,{children:r})]}));H.displayName=Zo.displayName;const Er=c.forwardRef(({className:e,...r},a)=>o.jsx($o,{ref:a,className:T("bg-muted -mx-1 my-1 h-px",e),...r}));Er.displayName=$o.displayName;function Ur(){const{t:e}=Ke(),r=q(n=>n.querySettings),a=c.useCallback((n,l)=>{q.getState().updateQuerySettings({[n]:l})},[]);return o.jsxs(vr,{className:"flex shrink-0 flex-col min-w-[220px]",children:[o.jsxs(zr,{className:"px-4 pt-4 pb-2",children:[o.jsx(Mr,{children:e("retrievePanel.querySettings.parametersTitle")}),o.jsx(Ar,{className:"sr-only",children:e("retrievePanel.querySettings.parametersDescription")})]}),o.jsx(Cr,{className:"m-0 flex grow flex-col p-0 text-xs",children:o.jsx("div",{className:"relative size-full",children:o.jsxs("div",{className:"absolute inset-0 flex flex-col gap-2 overflow-auto px-2",children:[o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"query_mode_select",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.queryMode")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.queryModeTooltip")})})]})}),o.jsxs(Ye,{value:r.mode,onValueChange:n=>a("mode",n),children:[o.jsx(Ie,{id:"query_mode_select",className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:o.jsx(Ze,{})}),o.jsx(Ve,{children:o.jsxs(Xe,{children:[o.jsx(H,{value:"naive",children:e("retrievePanel.querySettings.queryModeOptions.naive")}),o.jsx(H,{value:"local",children:e("retrievePanel.querySettings.queryModeOptions.local")}),o.jsx(H,{value:"global",children:e("retrievePanel.querySettings.queryModeOptions.global")}),o.jsx(H,{value:"hybrid",children:e("retrievePanel.querySettings.queryModeOptions.hybrid")}),o.jsx(H,{value:"mix",children:e("retrievePanel.querySettings.queryModeOptions.mix")}),o.jsx(H,{value:"bypass",children:e("retrievePanel.querySettings.queryModeOptions.bypass")})]})})]})]}),o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"response_format_select",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.responseFormat")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.responseFormatTooltip")})})]})}),o.jsxs(Ye,{value:r.response_type,onValueChange:n=>a("response_type",n),children:[o.jsx(Ie,{id:"response_format_select",className:"hover:bg-primary/5 h-9 cursor-pointer focus:ring-0 focus:ring-offset-0 focus:outline-0 active:right-0",children:o.jsx(Ze,{})}),o.jsx(Ve,{children:o.jsxs(Xe,{children:[o.jsx(H,{value:"Multiple Paragraphs",children:e("retrievePanel.querySettings.responseFormatOptions.multipleParagraphs")}),o.jsx(H,{value:"Single Paragraph",children:e("retrievePanel.querySettings.responseFormatOptions.singleParagraph")}),o.jsx(H,{value:"Bullet Points",children:e("retrievePanel.querySettings.responseFormatOptions.bulletPoints")})]})})]})]}),o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"top_k",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.topK")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.topKTooltip")})})]})}),o.jsx("div",{children:o.jsx(R,{id:"top_k",type:"number",value:r.top_k??"",onChange:n=>{const l=n.target.value;a("top_k",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("top_k",1)},min:1,placeholder:e("retrievePanel.querySettings.topKPlaceholder"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"max_token_for_text_unit",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.maxTokensTextUnit")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.maxTokensTextUnitTooltip")})})]})}),o.jsx("div",{children:o.jsx(R,{id:"max_token_for_text_unit",type:"number",value:r.max_token_for_text_unit??"",onChange:n=>{const l=n.target.value;a("max_token_for_text_unit",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("max_token_for_text_unit",1e4)},min:1,placeholder:e("retrievePanel.querySettings.maxTokensTextUnit"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"max_token_for_global_context",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.maxTokensGlobalContext")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.maxTokensGlobalContextTooltip")})})]})}),o.jsx("div",{children:o.jsx(R,{id:"max_token_for_global_context",type:"number",value:r.max_token_for_global_context??"",onChange:n=>{const l=n.target.value;a("max_token_for_global_context",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("max_token_for_global_context",4e3)},min:1,placeholder:e("retrievePanel.querySettings.maxTokensGlobalContext"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"max_token_for_local_context",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.maxTokensLocalContext")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.maxTokensLocalContextTooltip")})})]})}),o.jsx("div",{children:o.jsx(R,{id:"max_token_for_local_context",type:"number",value:r.max_token_for_local_context??"",onChange:n=>{const l=n.target.value;a("max_token_for_local_context",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("max_token_for_local_context",4e3)},min:1,placeholder:e("retrievePanel.querySettings.maxTokensLocalContext"),className:"h-9"})})]})]}),o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"history_turns",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.historyTurns")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.historyTurnsTooltip")})})]})}),o.jsx("div",{children:o.jsx(R,{id:"history_turns",type:"number",value:r.history_turns??"",onChange:n=>{const l=n.target.value;a("history_turns",l===""?"":parseInt(l)||0)},onBlur:n=>{const l=n.target.value;(l===""||isNaN(parseInt(l)))&&a("history_turns",0)},min:0,placeholder:e("retrievePanel.querySettings.historyTurnsPlaceholder"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"user_prompt",className:"ml-1 cursor-help",children:e("retrievePanel.querySettings.userPrompt")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.userPromptTooltip")})})]})}),o.jsx("div",{children:o.jsx(R,{id:"user_prompt",value:r.user_prompt,onChange:n=>a("user_prompt",n.target.value),placeholder:e("retrievePanel.querySettings.userPromptPlaceholder"),className:"h-9"})})]}),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"only_need_context",className:"flex-1 ml-1 cursor-help",children:e("retrievePanel.querySettings.onlyNeedContext")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.onlyNeedContextTooltip")})})]})}),o.jsx(Y,{className:"mr-1 cursor-pointer",id:"only_need_context",checked:r.only_need_context,onCheckedChange:n=>a("only_need_context",n)})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"only_need_prompt",className:"flex-1 ml-1 cursor-help",children:e("retrievePanel.querySettings.onlyNeedPrompt")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.onlyNeedPromptTooltip")})})]})}),o.jsx(Y,{className:"mr-1 cursor-pointer",id:"only_need_prompt",checked:r.only_need_prompt,onCheckedChange:n=>a("only_need_prompt",n)})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(v,{children:o.jsxs(z,{children:[o.jsx(M,{asChild:!0,children:o.jsx("label",{htmlFor:"stream",className:"flex-1 ml-1 cursor-help",children:e("retrievePanel.querySettings.streamResponse")})}),o.jsx(A,{side:"left",children:o.jsx("p",{children:e("retrievePanel.querySettings.streamResponseTooltip")})})]})}),o.jsx(Y,{className:"mr-1 cursor-pointer",id:"stream",checked:r.stream,onCheckedChange:n=>a("stream",n)})]})]})]})})})]})}var X={},Z={exports:{}},$e;function Ir(){return $e||($e=1,function(e){function r(a){return a&&a.__esModule?a:{default:a}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(Z)),Z.exports}var $={},eo;function Vr(){return eo||(eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}}($)),$}var ee={},oo;function Kr(){return oo||(oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(30, 20%, 25%)",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:".3em solid hsl(30, 20%, 40%)",borderRadius:".5em",boxShadow:"1px 1px .5em black inset"},':not(pre) > code[class*="language-"]':{background:"hsl(30, 20%, 25%)",padding:".15em .2em .05em",borderRadius:".3em",border:".13em solid hsl(30, 20%, 40%)",boxShadow:"1px 1px .3em -.1em black inset",whiteSpace:"normal"},comment:{color:"hsl(30, 20%, 50%)"},prolog:{color:"hsl(30, 20%, 50%)"},doctype:{color:"hsl(30, 20%, 50%)"},cdata:{color:"hsl(30, 20%, 50%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},property:{color:"hsl(350, 40%, 70%)"},tag:{color:"hsl(350, 40%, 70%)"},boolean:{color:"hsl(350, 40%, 70%)"},number:{color:"hsl(350, 40%, 70%)"},constant:{color:"hsl(350, 40%, 70%)"},symbol:{color:"hsl(350, 40%, 70%)"},selector:{color:"hsl(75, 70%, 60%)"},"attr-name":{color:"hsl(75, 70%, 60%)"},string:{color:"hsl(75, 70%, 60%)"},char:{color:"hsl(75, 70%, 60%)"},builtin:{color:"hsl(75, 70%, 60%)"},inserted:{color:"hsl(75, 70%, 60%)"},operator:{color:"hsl(40, 90%, 60%)"},entity:{color:"hsl(40, 90%, 60%)",cursor:"help"},url:{color:"hsl(40, 90%, 60%)"},".language-css .token.string":{color:"hsl(40, 90%, 60%)"},".style .token.string":{color:"hsl(40, 90%, 60%)"},variable:{color:"hsl(40, 90%, 60%)"},atrule:{color:"hsl(350, 40%, 70%)"},"attr-value":{color:"hsl(350, 40%, 70%)"},keyword:{color:"hsl(350, 40%, 70%)"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"}}}(ee)),ee}var oe={},ro;function Qr(){return ro||(ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"black",color:"white",boxShadow:"-.3em 0 0 .3em black, .3em 0 0 .3em black"},'pre[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:".4em .8em",margin:".5em 0",overflow:"auto",background:`url('data:image/svg+xml;charset=utf-8,%0D%0A%0D%0A%0D%0A<%2Fsvg>')`,backgroundSize:"1em 1em"},':not(pre) > code[class*="language-"]':{padding:".2em",borderRadius:".3em",boxShadow:"none",whiteSpace:"normal"},comment:{color:"#aaa"},prolog:{color:"#aaa"},doctype:{color:"#aaa"},cdata:{color:"#aaa"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#0cf"},tag:{color:"#0cf"},boolean:{color:"#0cf"},number:{color:"#0cf"},constant:{color:"#0cf"},symbol:{color:"#0cf"},selector:{color:"yellow"},"attr-name":{color:"yellow"},string:{color:"yellow"},char:{color:"yellow"},builtin:{color:"yellow"},operator:{color:"yellowgreen"},entity:{color:"yellowgreen",cursor:"help"},url:{color:"yellowgreen"},".language-css .token.string":{color:"yellowgreen"},variable:{color:"yellowgreen"},inserted:{color:"yellowgreen"},atrule:{color:"deeppink"},"attr-value":{color:"deeppink"},keyword:{color:"deeppink"},regex:{color:"orange"},important:{color:"orange",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"},"pre.diff-highlight.diff-highlight > code .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre.diff-highlight.diff-highlight > code .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"}}}(oe)),oe}var re={},no;function Gr(){return no||(no=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#272822",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#272822",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8292a2"},prolog:{color:"#8292a2"},doctype:{color:"#8292a2"},cdata:{color:"#8292a2"},punctuation:{color:"#f8f8f2"},namespace:{Opacity:".7"},property:{color:"#f92672"},tag:{color:"#f92672"},constant:{color:"#f92672"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},boolean:{color:"#ae81ff"},number:{color:"#ae81ff"},selector:{color:"#a6e22e"},"attr-name":{color:"#a6e22e"},string:{color:"#a6e22e"},char:{color:"#a6e22e"},builtin:{color:"#a6e22e"},inserted:{color:"#a6e22e"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#e6db74"},"attr-value":{color:"#e6db74"},function:{color:"#e6db74"},"class-name":{color:"#e6db74"},keyword:{color:"#66d9ef"},regex:{color:"#fd971f"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(re)),re}var ne={},ao;function Jr(){return ao||(ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",backgroundColor:"#fdf6e3"},'pre[class*="language-"]::-moz-selection':{background:"#073642"},'pre[class*="language-"] ::-moz-selection':{background:"#073642"},'code[class*="language-"]::-moz-selection':{background:"#073642"},'code[class*="language-"] ::-moz-selection':{background:"#073642"},'pre[class*="language-"]::selection':{background:"#073642"},'pre[class*="language-"] ::selection':{background:"#073642"},'code[class*="language-"]::selection':{background:"#073642"},'code[class*="language-"] ::selection':{background:"#073642"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdf6e3",padding:".1em",borderRadius:".3em"},comment:{color:"#93a1a1"},prolog:{color:"#93a1a1"},doctype:{color:"#93a1a1"},cdata:{color:"#93a1a1"},punctuation:{color:"#586e75"},namespace:{Opacity:".7"},property:{color:"#268bd2"},tag:{color:"#268bd2"},boolean:{color:"#268bd2"},number:{color:"#268bd2"},constant:{color:"#268bd2"},symbol:{color:"#268bd2"},deleted:{color:"#268bd2"},selector:{color:"#2aa198"},"attr-name":{color:"#2aa198"},string:{color:"#2aa198"},char:{color:"#2aa198"},builtin:{color:"#2aa198"},url:{color:"#2aa198"},inserted:{color:"#2aa198"},entity:{color:"#657b83",background:"#eee8d5",cursor:"help"},atrule:{color:"#859900"},"attr-value":{color:"#859900"},keyword:{color:"#859900"},function:{color:"#b58900"},"class-name":{color:"#b58900"},regex:{color:"#cb4b16"},important:{color:"#cb4b16",fontWeight:"bold"},variable:{color:"#cb4b16"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(ne)),ne}var ae={},lo;function Yr(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ccc",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ccc",background:"#2d2d2d",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},':not(pre) > code[class*="language-"]':{background:"#2d2d2d",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#999"},"block-comment":{color:"#999"},prolog:{color:"#999"},doctype:{color:"#999"},cdata:{color:"#999"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},deleted:{color:"#e2777a"},"function-name":{color:"#6196cc"},boolean:{color:"#f08d49"},number:{color:"#f08d49"},function:{color:"#f08d49"},property:{color:"#f8c555"},"class-name":{color:"#f8c555"},constant:{color:"#f8c555"},symbol:{color:"#f8c555"},selector:{color:"#cc99cd"},important:{color:"#cc99cd",fontWeight:"bold"},atrule:{color:"#cc99cd"},keyword:{color:"#cc99cd"},builtin:{color:"#cc99cd"},string:{color:"#7ec699"},char:{color:"#7ec699"},"attr-value":{color:"#7ec699"},regex:{color:"#7ec699"},variable:{color:"#7ec699"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(ae)),ae}var le={},to;function Xr(){return to||(to=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(0, 0%, 8%)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",borderRadius:".5em",border:".3em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .5em black inset",margin:".5em 0",overflow:"auto",padding:"1em"},':not(pre) > code[class*="language-"]':{background:"hsl(0, 0%, 8%)",borderRadius:".3em",border:".13em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .3em -.1em black inset",padding:".15em .2em .05em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"]::selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},comment:{color:"hsl(0, 0%, 47%)"},prolog:{color:"hsl(0, 0%, 47%)"},doctype:{color:"hsl(0, 0%, 47%)"},cdata:{color:"hsl(0, 0%, 47%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},tag:{color:"hsl(14, 58%, 55%)"},boolean:{color:"hsl(14, 58%, 55%)"},number:{color:"hsl(14, 58%, 55%)"},deleted:{color:"hsl(14, 58%, 55%)"},keyword:{color:"hsl(53, 89%, 79%)"},property:{color:"hsl(53, 89%, 79%)"},selector:{color:"hsl(53, 89%, 79%)"},constant:{color:"hsl(53, 89%, 79%)"},symbol:{color:"hsl(53, 89%, 79%)"},builtin:{color:"hsl(53, 89%, 79%)"},"attr-name":{color:"hsl(76, 21%, 52%)"},"attr-value":{color:"hsl(76, 21%, 52%)"},string:{color:"hsl(76, 21%, 52%)"},char:{color:"hsl(76, 21%, 52%)"},operator:{color:"hsl(76, 21%, 52%)"},entity:{color:"hsl(76, 21%, 52%)",cursor:"help"},url:{color:"hsl(76, 21%, 52%)"},".language-css .token.string":{color:"hsl(76, 21%, 52%)"},".style .token.string":{color:"hsl(76, 21%, 52%)"},variable:{color:"hsl(76, 21%, 52%)"},inserted:{color:"hsl(76, 21%, 52%)"},atrule:{color:"hsl(218, 22%, 55%)"},regex:{color:"hsl(42, 75%, 65%)"},important:{color:"hsl(42, 75%, 65%)",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},".language-markup .token.tag":{color:"hsl(33, 33%, 52%)"},".language-markup .token.attr-name":{color:"hsl(33, 33%, 52%)"},".language-markup .token.punctuation":{color:"hsl(33, 33%, 52%)"},"":{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0))",borderBottom:"1px dashed hsl(0, 0%, 33%)",borderTop:"1px dashed hsl(0, 0%, 33%)",marginTop:"0.75em",zIndex:"0"},".line-highlight.line-highlight:before":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"}}}(le)),le}var te={},co;function Zr(){return co||(co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(te)),te}var ce={},io;function $r(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2b2b2b",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#d4d0ab"},prolog:{color:"#d4d0ab"},doctype:{color:"#d4d0ab"},cdata:{color:"#d4d0ab"},punctuation:{color:"#fefefe"},property:{color:"#ffa07a"},tag:{color:"#ffa07a"},constant:{color:"#ffa07a"},symbol:{color:"#ffa07a"},deleted:{color:"#ffa07a"},boolean:{color:"#00e0e0"},number:{color:"#00e0e0"},selector:{color:"#abe338"},"attr-name":{color:"#abe338"},string:{color:"#abe338"},char:{color:"#abe338"},builtin:{color:"#abe338"},inserted:{color:"#abe338"},operator:{color:"#00e0e0"},entity:{color:"#00e0e0",cursor:"help"},url:{color:"#00e0e0"},".language-css .token.string":{color:"#00e0e0"},".style .token.string":{color:"#00e0e0"},variable:{color:"#00e0e0"},atrule:{color:"#ffd700"},"attr-value":{color:"#ffd700"},function:{color:"#ffd700"},keyword:{color:"#00e0e0"},regex:{color:"#ffd700"},important:{color:"#ffd700",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(ce)),ce}var ie={},so;function en(){return so||(so=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{Opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(ie)),ie}var se={},uo;function on(){return uo||(uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#898ea4"},prolog:{color:"#898ea4"},doctype:{color:"#898ea4"},cdata:{color:"#898ea4"},punctuation:{color:"#5e6687"},namespace:{Opacity:".7"},operator:{color:"#c76b29"},boolean:{color:"#c76b29"},number:{color:"#c76b29"},property:{color:"#c08b30"},tag:{color:"#3d8fd1"},string:{color:"#22a2c9"},selector:{color:"#6679cc"},"attr-name":{color:"#c76b29"},entity:{color:"#22a2c9",cursor:"help"},url:{color:"#22a2c9"},".language-css .token.string":{color:"#22a2c9"},".style .token.string":{color:"#22a2c9"},"attr-value":{color:"#ac9739"},keyword:{color:"#ac9739"},control:{color:"#ac9739"},directive:{color:"#ac9739"},unit:{color:"#ac9739"},statement:{color:"#22a2c9"},regex:{color:"#22a2c9"},atrule:{color:"#22a2c9"},placeholder:{color:"#3d8fd1"},variable:{color:"#3d8fd1"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #202746",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c94922"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:"0.4em solid #c94922",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#dfe2f1"},".line-numbers .line-numbers-rows > span:before":{color:"#979db4"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0))"}}}(se)),se}var de={},go;function rn(){return go||(go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"none",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"#222",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"15px",margin:"1em 0",overflow:"auto",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},'pre[class*="language-"] code':{float:"left",padding:"0 15px 0 0"},':not(pre) > code[class*="language-"]':{background:"#222",padding:"5px 10px",lineHeight:"1",MozBorderRadius:"3px",WebkitBorderRadius:"3px",borderRadius:"3px"},comment:{color:"#797979"},prolog:{color:"#797979"},doctype:{color:"#797979"},cdata:{color:"#797979"},selector:{color:"#fff"},operator:{color:"#fff"},punctuation:{color:"#fff"},namespace:{Opacity:".7"},tag:{color:"#ffd893"},boolean:{color:"#ffd893"},atrule:{color:"#B0C975"},"attr-value":{color:"#B0C975"},hex:{color:"#B0C975"},string:{color:"#B0C975"},property:{color:"#c27628"},entity:{color:"#c27628",cursor:"help"},url:{color:"#c27628"},"attr-name":{color:"#c27628"},keyword:{color:"#c27628"},regex:{color:"#9B71C6"},function:{color:"#e5a638"},constant:{color:"#e5a638"},variable:{color:"#fdfba8"},number:{color:"#8799B0"},important:{color:"#E45734"},deliminator:{color:"#E45734"},".line-highlight.line-highlight":{background:"rgba(255, 255, 255, .2)"},".line-highlight.line-highlight:before":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-highlight.line-highlight[data-end]:after":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-numbers .line-numbers-rows > span":{borderRight:"3px #d9d336 solid"}}}(de)),de}var ue={},bo;function nn(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#111b27",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#111b27",background:"#e3eaf2",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'code[class*="language-"]::-moz-selection':{background:"#8da1b9"},'code[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"]::selection':{background:"#8da1b9"},'pre[class*="language-"] ::selection':{background:"#8da1b9"},'code[class*="language-"]::selection':{background:"#8da1b9"},'code[class*="language-"] ::selection':{background:"#8da1b9"},':not(pre) > code[class*="language-"]':{background:"#e3eaf2",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#3c526d"},prolog:{color:"#3c526d"},doctype:{color:"#3c526d"},cdata:{color:"#3c526d"},punctuation:{color:"#111b27"},"delimiter.important":{color:"#006d6d",fontWeight:"inherit"},"selector.parent":{color:"#006d6d"},tag:{color:"#006d6d"},"tag.punctuation":{color:"#006d6d"},"attr-name":{color:"#755f00"},boolean:{color:"#755f00"},"boolean.important":{color:"#755f00"},number:{color:"#755f00"},constant:{color:"#755f00"},"selector.attribute":{color:"#755f00"},"class-name":{color:"#005a8e"},key:{color:"#005a8e"},parameter:{color:"#005a8e"},property:{color:"#005a8e"},"property-access":{color:"#005a8e"},variable:{color:"#005a8e"},"attr-value":{color:"#116b00"},inserted:{color:"#116b00"},color:{color:"#116b00"},"selector.value":{color:"#116b00"},string:{color:"#116b00"},"string.url-link":{color:"#116b00"},builtin:{color:"#af00af"},"keyword-array":{color:"#af00af"},package:{color:"#af00af"},regex:{color:"#af00af"},function:{color:"#7c00aa"},"selector.class":{color:"#7c00aa"},"selector.id":{color:"#7c00aa"},"atrule.rule":{color:"#a04900"},combinator:{color:"#a04900"},keyword:{color:"#a04900"},operator:{color:"#a04900"},"pseudo-class":{color:"#a04900"},"pseudo-element":{color:"#a04900"},selector:{color:"#a04900"},unit:{color:"#a04900"},deleted:{color:"#c22f2e"},important:{color:"#c22f2e",fontWeight:"bold"},"keyword-this":{color:"#005a8e",fontWeight:"bold"},this:{color:"#005a8e",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#af00af"},".language-markdown .token.code":{color:"#006d6d"},".language-markdown .token.hr.punctuation":{color:"#005a8e"},".language-markdown .token.url > .token.content":{color:"#116b00"},".language-markdown .token.url-link":{color:"#755f00"},".language-markdown .token.list.punctuation":{color:"#af00af"},".language-markdown .token.table-header":{color:"#111b27"},".language-json .token.operator":{color:"#111b27"},".language-scss .token.variable":{color:"#006d6d"},"token.tab:not(:empty):before":{color:"#3c526d"},"token.cr:before":{color:"#3c526d"},"token.lf:before":{color:"#3c526d"},"token.space:before":{color:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#e3eaf2",background:"#3c526d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #8da1b92f 70%, #8da1b925)"},".line-highlight.line-highlight:before":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#3c526d1f"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #8da1b97a",background:"#d0dae77a"},".line-numbers .line-numbers-rows > span:before":{color:"#3c526dda"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#7c00aa"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},".command-line .command-line-prompt":{borderRight:"1px solid #8da1b97a"},".command-line .command-line-prompt > span:before":{color:"#3c526dda"}}}(ue)),ue}var ge={},po;function an(){return po||(po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#e3eaf2",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#e3eaf2",background:"#111b27",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#3c526d"},'pre[class*="language-"] ::-moz-selection':{background:"#3c526d"},'code[class*="language-"]::-moz-selection':{background:"#3c526d"},'code[class*="language-"] ::-moz-selection':{background:"#3c526d"},'pre[class*="language-"]::selection':{background:"#3c526d"},'pre[class*="language-"] ::selection':{background:"#3c526d"},'code[class*="language-"]::selection':{background:"#3c526d"},'code[class*="language-"] ::selection':{background:"#3c526d"},':not(pre) > code[class*="language-"]':{background:"#111b27",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#8da1b9"},prolog:{color:"#8da1b9"},doctype:{color:"#8da1b9"},cdata:{color:"#8da1b9"},punctuation:{color:"#e3eaf2"},"delimiter.important":{color:"#66cccc",fontWeight:"inherit"},"selector.parent":{color:"#66cccc"},tag:{color:"#66cccc"},"tag.punctuation":{color:"#66cccc"},"attr-name":{color:"#e6d37a"},boolean:{color:"#e6d37a"},"boolean.important":{color:"#e6d37a"},number:{color:"#e6d37a"},constant:{color:"#e6d37a"},"selector.attribute":{color:"#e6d37a"},"class-name":{color:"#6cb8e6"},key:{color:"#6cb8e6"},parameter:{color:"#6cb8e6"},property:{color:"#6cb8e6"},"property-access":{color:"#6cb8e6"},variable:{color:"#6cb8e6"},"attr-value":{color:"#91d076"},inserted:{color:"#91d076"},color:{color:"#91d076"},"selector.value":{color:"#91d076"},string:{color:"#91d076"},"string.url-link":{color:"#91d076"},builtin:{color:"#f4adf4"},"keyword-array":{color:"#f4adf4"},package:{color:"#f4adf4"},regex:{color:"#f4adf4"},function:{color:"#c699e3"},"selector.class":{color:"#c699e3"},"selector.id":{color:"#c699e3"},"atrule.rule":{color:"#e9ae7e"},combinator:{color:"#e9ae7e"},keyword:{color:"#e9ae7e"},operator:{color:"#e9ae7e"},"pseudo-class":{color:"#e9ae7e"},"pseudo-element":{color:"#e9ae7e"},selector:{color:"#e9ae7e"},unit:{color:"#e9ae7e"},deleted:{color:"#cd6660"},important:{color:"#cd6660",fontWeight:"bold"},"keyword-this":{color:"#6cb8e6",fontWeight:"bold"},this:{color:"#6cb8e6",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#f4adf4"},".language-markdown .token.code":{color:"#66cccc"},".language-markdown .token.hr.punctuation":{color:"#6cb8e6"},".language-markdown .token.url .token.content":{color:"#91d076"},".language-markdown .token.url-link":{color:"#e6d37a"},".language-markdown .token.list.punctuation":{color:"#f4adf4"},".language-markdown .token.table-header":{color:"#e3eaf2"},".language-json .token.operator":{color:"#e3eaf2"},".language-scss .token.variable":{color:"#66cccc"},"token.tab:not(:empty):before":{color:"#8da1b9"},"token.cr:before":{color:"#8da1b9"},"token.lf:before":{color:"#8da1b9"},"token.space:before":{color:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#111b27",background:"#8da1b9"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #3c526d5f 70%, #3c526d55)"},".line-highlight.line-highlight:before":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#8da1b918"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #0b121b",background:"#0b121b7a"},".line-numbers .line-numbers-rows > span:before":{color:"#8da1b9da"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#c699e3"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},".command-line .command-line-prompt":{borderRight:"1px solid #0b121b"},".command-line .command-line-prompt > span:before":{color:"#8da1b9da"}}}(ge)),ge}var be={},fo;function ln(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local",margin:".5em 0",padding:"0 1em"},'pre[class*="language-"] > code':{display:"block"},':not(pre) > code[class*="language-"]':{position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"}}}(be)),be}var pe={},ho;function tn(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}}(pe)),pe}var fe={},mo;function cn(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#282a36",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#282a36",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#6272a4"},prolog:{color:"#6272a4"},doctype:{color:"#6272a4"},cdata:{color:"#6272a4"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#ff79c6"},tag:{color:"#ff79c6"},constant:{color:"#ff79c6"},symbol:{color:"#ff79c6"},deleted:{color:"#ff79c6"},boolean:{color:"#bd93f9"},number:{color:"#bd93f9"},selector:{color:"#50fa7b"},"attr-name":{color:"#50fa7b"},string:{color:"#50fa7b"},char:{color:"#50fa7b"},builtin:{color:"#50fa7b"},inserted:{color:"#50fa7b"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#f1fa8c"},"attr-value":{color:"#f1fa8c"},function:{color:"#f1fa8c"},"class-name":{color:"#f1fa8c"},keyword:{color:"#8be9fd"},regex:{color:"#ffb86c"},important:{color:"#ffb86c",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(fe)),fe}var he={},ko;function sn(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6c6783"},prolog:{color:"#6c6783"},doctype:{color:"#6c6783"},cdata:{color:"#6c6783"},punctuation:{color:"#6c6783"},namespace:{Opacity:".7"},tag:{color:"#e09142"},operator:{color:"#e09142"},number:{color:"#e09142"},property:{color:"#9a86fd"},function:{color:"#9a86fd"},"tag-id":{color:"#eeebff"},selector:{color:"#eeebff"},"atrule-id":{color:"#eeebff"},"code.language-javascript":{color:"#c4b9fe"},"attr-name":{color:"#c4b9fe"},"code.language-css":{color:"#ffcc99"},"code.language-scss":{color:"#ffcc99"},boolean:{color:"#ffcc99"},string:{color:"#ffcc99"},entity:{color:"#ffcc99",cursor:"help"},url:{color:"#ffcc99"},".language-css .token.string":{color:"#ffcc99"},".language-scss .token.string":{color:"#ffcc99"},".style .token.string":{color:"#ffcc99"},"attr-value":{color:"#ffcc99"},keyword:{color:"#ffcc99"},control:{color:"#ffcc99"},directive:{color:"#ffcc99"},unit:{color:"#ffcc99"},statement:{color:"#ffcc99"},regex:{color:"#ffcc99"},atrule:{color:"#ffcc99"},placeholder:{color:"#ffcc99"},variable:{color:"#ffcc99"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #eeebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c4b9fe"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #8a75f5",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c2937"},".line-numbers .line-numbers-rows > span:before":{color:"#3c3949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0))"}}}(he)),he}var me={},yo;function dn(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6a5f58"},prolog:{color:"#6a5f58"},doctype:{color:"#6a5f58"},cdata:{color:"#6a5f58"},punctuation:{color:"#6a5f58"},namespace:{Opacity:".7"},tag:{color:"#bfa05a"},operator:{color:"#bfa05a"},number:{color:"#bfa05a"},property:{color:"#88786d"},function:{color:"#88786d"},"tag-id":{color:"#fff3eb"},selector:{color:"#fff3eb"},"atrule-id":{color:"#fff3eb"},"code.language-javascript":{color:"#a48774"},"attr-name":{color:"#a48774"},"code.language-css":{color:"#fcc440"},"code.language-scss":{color:"#fcc440"},boolean:{color:"#fcc440"},string:{color:"#fcc440"},entity:{color:"#fcc440",cursor:"help"},url:{color:"#fcc440"},".language-css .token.string":{color:"#fcc440"},".language-scss .token.string":{color:"#fcc440"},".style .token.string":{color:"#fcc440"},"attr-value":{color:"#fcc440"},keyword:{color:"#fcc440"},control:{color:"#fcc440"},directive:{color:"#fcc440"},unit:{color:"#fcc440"},statement:{color:"#fcc440"},regex:{color:"#fcc440"},atrule:{color:"#fcc440"},placeholder:{color:"#fcc440"},variable:{color:"#fcc440"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #fff3eb",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#a48774"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #816d5f",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#35302b"},".line-numbers .line-numbers-rows > span:before":{color:"#46403d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0))"}}}(me)),me}var ke={},wo;function un(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#535f53"},prolog:{color:"#535f53"},doctype:{color:"#535f53"},cdata:{color:"#535f53"},punctuation:{color:"#535f53"},namespace:{Opacity:".7"},tag:{color:"#a2b34d"},operator:{color:"#a2b34d"},number:{color:"#a2b34d"},property:{color:"#687d68"},function:{color:"#687d68"},"tag-id":{color:"#f0fff0"},selector:{color:"#f0fff0"},"atrule-id":{color:"#f0fff0"},"code.language-javascript":{color:"#b3d6b3"},"attr-name":{color:"#b3d6b3"},"code.language-css":{color:"#e5fb79"},"code.language-scss":{color:"#e5fb79"},boolean:{color:"#e5fb79"},string:{color:"#e5fb79"},entity:{color:"#e5fb79",cursor:"help"},url:{color:"#e5fb79"},".language-css .token.string":{color:"#e5fb79"},".language-scss .token.string":{color:"#e5fb79"},".style .token.string":{color:"#e5fb79"},"attr-value":{color:"#e5fb79"},keyword:{color:"#e5fb79"},control:{color:"#e5fb79"},directive:{color:"#e5fb79"},unit:{color:"#e5fb79"},statement:{color:"#e5fb79"},regex:{color:"#e5fb79"},atrule:{color:"#e5fb79"},placeholder:{color:"#e5fb79"},variable:{color:"#e5fb79"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #f0fff0",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#b3d6b3"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #5c705c",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c302c"},".line-numbers .line-numbers-rows > span:before":{color:"#3b423b"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0))"}}}(ke)),ke}var ye={},So;function gn(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#b6ad9a"},prolog:{color:"#b6ad9a"},doctype:{color:"#b6ad9a"},cdata:{color:"#b6ad9a"},punctuation:{color:"#b6ad9a"},namespace:{Opacity:".7"},tag:{color:"#063289"},operator:{color:"#063289"},number:{color:"#063289"},property:{color:"#b29762"},function:{color:"#b29762"},"tag-id":{color:"#2d2006"},selector:{color:"#2d2006"},"atrule-id":{color:"#2d2006"},"code.language-javascript":{color:"#896724"},"attr-name":{color:"#896724"},"code.language-css":{color:"#728fcb"},"code.language-scss":{color:"#728fcb"},boolean:{color:"#728fcb"},string:{color:"#728fcb"},entity:{color:"#728fcb",cursor:"help"},url:{color:"#728fcb"},".language-css .token.string":{color:"#728fcb"},".language-scss .token.string":{color:"#728fcb"},".style .token.string":{color:"#728fcb"},"attr-value":{color:"#728fcb"},keyword:{color:"#728fcb"},control:{color:"#728fcb"},directive:{color:"#728fcb"},unit:{color:"#728fcb"},statement:{color:"#728fcb"},regex:{color:"#728fcb"},atrule:{color:"#728fcb"},placeholder:{color:"#93abdc"},variable:{color:"#93abdc"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #2d2006",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#896724"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #896724",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#ece8de"},".line-numbers .line-numbers-rows > span:before":{color:"#cdc4b1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0))"}}}(ye)),ye}var we={},xo;function bn(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#4a5f78"},prolog:{color:"#4a5f78"},doctype:{color:"#4a5f78"},cdata:{color:"#4a5f78"},punctuation:{color:"#4a5f78"},namespace:{Opacity:".7"},tag:{color:"#0aa370"},operator:{color:"#0aa370"},number:{color:"#0aa370"},property:{color:"#57718e"},function:{color:"#57718e"},"tag-id":{color:"#ebf4ff"},selector:{color:"#ebf4ff"},"atrule-id":{color:"#ebf4ff"},"code.language-javascript":{color:"#7eb6f6"},"attr-name":{color:"#7eb6f6"},"code.language-css":{color:"#47ebb4"},"code.language-scss":{color:"#47ebb4"},boolean:{color:"#47ebb4"},string:{color:"#47ebb4"},entity:{color:"#47ebb4",cursor:"help"},url:{color:"#47ebb4"},".language-css .token.string":{color:"#47ebb4"},".language-scss .token.string":{color:"#47ebb4"},".style .token.string":{color:"#47ebb4"},"attr-value":{color:"#47ebb4"},keyword:{color:"#47ebb4"},control:{color:"#47ebb4"},directive:{color:"#47ebb4"},unit:{color:"#47ebb4"},statement:{color:"#47ebb4"},regex:{color:"#47ebb4"},atrule:{color:"#47ebb4"},placeholder:{color:"#47ebb4"},variable:{color:"#47ebb4"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebf4ff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#7eb6f6"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #34659d",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#1f2932"},".line-numbers .line-numbers-rows > span:before":{color:"#2c3847"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0))"}}}(we)),we}var Se={},vo;function pn(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#5b5b76"},prolog:{color:"#5b5b76"},doctype:{color:"#5b5b76"},cdata:{color:"#5b5b76"},punctuation:{color:"#5b5b76"},namespace:{Opacity:".7"},tag:{color:"#dd672c"},operator:{color:"#dd672c"},number:{color:"#dd672c"},property:{color:"#767693"},function:{color:"#767693"},"tag-id":{color:"#ebebff"},selector:{color:"#ebebff"},"atrule-id":{color:"#ebebff"},"code.language-javascript":{color:"#aaaaca"},"attr-name":{color:"#aaaaca"},"code.language-css":{color:"#fe8c52"},"code.language-scss":{color:"#fe8c52"},boolean:{color:"#fe8c52"},string:{color:"#fe8c52"},entity:{color:"#fe8c52",cursor:"help"},url:{color:"#fe8c52"},".language-css .token.string":{color:"#fe8c52"},".language-scss .token.string":{color:"#fe8c52"},".style .token.string":{color:"#fe8c52"},"attr-value":{color:"#fe8c52"},keyword:{color:"#fe8c52"},control:{color:"#fe8c52"},directive:{color:"#fe8c52"},unit:{color:"#fe8c52"},statement:{color:"#fe8c52"},regex:{color:"#fe8c52"},atrule:{color:"#fe8c52"},placeholder:{color:"#fe8c52"},variable:{color:"#fe8c52"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#aaaaca"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #7676f4",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#262631"},".line-numbers .line-numbers-rows > span:before":{color:"#393949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0))"}}}(Se)),Se}var xe={},zo;function fn(){return zo||(zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"]::selection':{background:"#b3d4fc"},'pre[class*="language-"] ::selection':{background:"#b3d4fc"},'code[class*="language-"]::selection':{background:"#b3d4fc"},'code[class*="language-"] ::selection':{background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#999988",fontStyle:"italic"},prolog:{color:"#999988",fontStyle:"italic"},doctype:{color:"#999988",fontStyle:"italic"},cdata:{color:"#999988",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#e3116c"},"attr-value":{color:"#e3116c"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},entity:{color:"#36acaa"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},property:{color:"#36acaa"},regex:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#00a4db"},keyword:{color:"#00a4db"},"attr-name":{color:"#00a4db"},".language-autohotkey .token.selector":{color:"#00a4db"},function:{color:"#9a050f",fontWeight:"bold"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},tag:{color:"#00009f"},selector:{color:"#00009f"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(xe)),xe}var ve={},Mo;function hn(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#1d2021"},'pre[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},':not(pre) > code[class*="language-"]':{background:"#1d2021",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#a89984"},prolog:{color:"#a89984"},cdata:{color:"#a89984"},delimiter:{color:"#fb4934"},boolean:{color:"#fb4934"},keyword:{color:"#fb4934"},selector:{color:"#fb4934"},important:{color:"#fb4934"},atrule:{color:"#fb4934"},operator:{color:"#a89984"},punctuation:{color:"#a89984"},"attr-name":{color:"#a89984"},tag:{color:"#fabd2f"},"tag.punctuation":{color:"#fabd2f"},doctype:{color:"#fabd2f"},builtin:{color:"#fabd2f"},entity:{color:"#d3869b"},number:{color:"#d3869b"},symbol:{color:"#d3869b"},property:{color:"#fb4934"},constant:{color:"#fb4934"},variable:{color:"#fb4934"},string:{color:"#b8bb26"},char:{color:"#b8bb26"},"attr-value":{color:"#a89984"},"attr-value.punctuation":{color:"#a89984"},url:{color:"#b8bb26",textDecoration:"underline"},function:{color:"#fabd2f"},regex:{background:"#b8bb26"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#a89984"},deleted:{background:"#fb4934"}}}(ve)),ve}var ze={},Ao;function mn(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#f9f5d7"},'pre[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},':not(pre) > code[class*="language-"]':{background:"#f9f5d7",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#7c6f64"},prolog:{color:"#7c6f64"},cdata:{color:"#7c6f64"},delimiter:{color:"#9d0006"},boolean:{color:"#9d0006"},keyword:{color:"#9d0006"},selector:{color:"#9d0006"},important:{color:"#9d0006"},atrule:{color:"#9d0006"},operator:{color:"#7c6f64"},punctuation:{color:"#7c6f64"},"attr-name":{color:"#7c6f64"},tag:{color:"#b57614"},"tag.punctuation":{color:"#b57614"},doctype:{color:"#b57614"},builtin:{color:"#b57614"},entity:{color:"#8f3f71"},number:{color:"#8f3f71"},symbol:{color:"#8f3f71"},property:{color:"#9d0006"},constant:{color:"#9d0006"},variable:{color:"#9d0006"},string:{color:"#797403"},char:{color:"#797403"},"attr-value":{color:"#7c6f64"},"attr-value.punctuation":{color:"#7c6f64"},url:{color:"#797403",textDecoration:"underline"},function:{color:"#b57614"},regex:{background:"#797403"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#7c6f64"},deleted:{background:"#9d0006"}}}(ze)),ze}var Me={},Co;function kn(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},"pre[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",border:"1px solid #2a4555",borderRadius:"5px",padding:"1.5em 1em",margin:"1em 0",overflow:"auto"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},":not(pre) > code[class*='language-']":{color:"#f0f6f6",background:"#2a4555",padding:"0.2em 0.3em",borderRadius:"0.2em",boxDecorationBreak:"clone"},comment:{color:"#446e69"},prolog:{color:"#446e69"},doctype:{color:"#446e69"},cdata:{color:"#446e69"},punctuation:{color:"#d6b007"},property:{color:"#d6e7ff"},tag:{color:"#d6e7ff"},boolean:{color:"#d6e7ff"},number:{color:"#d6e7ff"},constant:{color:"#d6e7ff"},symbol:{color:"#d6e7ff"},deleted:{color:"#d6e7ff"},selector:{color:"#e60067"},"attr-name":{color:"#e60067"},builtin:{color:"#e60067"},inserted:{color:"#e60067"},string:{color:"#49c6ec"},char:{color:"#49c6ec"},operator:{color:"#ec8e01",background:"transparent"},entity:{color:"#ec8e01",background:"transparent"},url:{color:"#ec8e01",background:"transparent"},".language-css .token.string":{color:"#ec8e01",background:"transparent"},".style .token.string":{color:"#ec8e01",background:"transparent"},atrule:{color:"#0fe468"},"attr-value":{color:"#0fe468"},keyword:{color:"#0fe468"},function:{color:"#78f3e9"},"class-name":{color:"#78f3e9"},regex:{color:"#d6e7ff"},important:{color:"#d6e7ff"},variable:{color:"#d6e7ff"}}}(Me)),Me}var Ae={},Ho;function yn(){return Ho||(Ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8"},'pre[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#797379"},prolog:{color:"#797379"},doctype:{color:"#797379"},cdata:{color:"#797379"},punctuation:{color:"#b9b5b8"},".namespace":{Opacity:".7"},null:{color:"#fd8b19"},operator:{color:"#fd8b19"},boolean:{color:"#fd8b19"},number:{color:"#fd8b19"},property:{color:"#fdcc59"},tag:{color:"#1290bf"},string:{color:"#149b93"},selector:{color:"#c85e7c"},"attr-name":{color:"#fd8b19"},entity:{color:"#149b93",cursor:"help"},url:{color:"#149b93"},".language-css .token.string":{color:"#149b93"},".style .token.string":{color:"#149b93"},"attr-value":{color:"#8fc13e"},keyword:{color:"#8fc13e"},control:{color:"#8fc13e"},directive:{color:"#8fc13e"},unit:{color:"#8fc13e"},statement:{color:"#149b93"},regex:{color:"#149b93"},atrule:{color:"#149b93"},placeholder:{color:"#1290bf"},variable:{color:"#1290bf"},important:{color:"#dd464c",fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid red",OutlineOffset:".4em"}}}(Ae)),Ae}var Ce={},jo;function wn(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#263E52",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#263E52",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#5c98cd"},prolog:{color:"#5c98cd"},doctype:{color:"#5c98cd"},cdata:{color:"#5c98cd"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#F05E5D"},tag:{color:"#F05E5D"},constant:{color:"#F05E5D"},symbol:{color:"#F05E5D"},deleted:{color:"#F05E5D"},boolean:{color:"#BC94F9"},number:{color:"#BC94F9"},selector:{color:"#FCFCD6"},"attr-name":{color:"#FCFCD6"},string:{color:"#FCFCD6"},char:{color:"#FCFCD6"},builtin:{color:"#FCFCD6"},inserted:{color:"#FCFCD6"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#66D8EF"},"attr-value":{color:"#66D8EF"},function:{color:"#66D8EF"},"class-name":{color:"#66D8EF"},keyword:{color:"#6EB26E"},regex:{color:"#F05E5D"},important:{color:"#F05E5D",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Ce)),Ce}var He={},To;function Sn(){return To||(To=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#a5e844"},attribute:{color:"#a5e844"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},comment:{color:"#616161"},constant:{color:"#c792ea"},deleted:{color:"#ff6666"},doctype:{color:"#616161"},entity:{color:"#ff6666"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#616161"},property:{color:"#80cbc4"},"pseudo-class":{color:"#a5e844"},"pseudo-element":{color:"#a5e844"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#ff6666"},string:{color:"#a5e844"},symbol:{color:"#c792ea"},tag:{color:"#ff6666"},unit:{color:"#fd9170"},url:{color:"#ff6666"},variable:{color:"#ff6666"}}}(He)),He}var je={},Oo;function xn(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}}(je)),je}var Te={},Wo;function vn(){return Wo||(Wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#c3e88d"},attribute:{color:"#c3e88d"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},color:{color:"#f2ff00"},comment:{color:"#546e7a"},constant:{color:"#c792ea"},deleted:{color:"#f07178"},doctype:{color:"#546e7a"},entity:{color:"#f07178"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea",fontStyle:"italic"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#546e7a"},property:{color:"#80cbc4"},"pseudo-class":{color:"#c3e88d"},"pseudo-element":{color:"#c3e88d"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#f07178"},string:{color:"#c3e88d"},symbol:{color:"#c792ea"},tag:{color:"#f07178"},unit:{color:"#f07178"},url:{color:"#fd9170"},variable:{color:"#f07178"}}}(Te)),Te}var Oe={},Fo;function zn(){return Fo||(Fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#d6deeb",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#011627"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},':not(pre) > code[class*="language-"]':{color:"white",background:"#011627",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(130, 170, 255)"},function:{color:"rgb(130, 170, 255)"},builtin:{color:"rgb(130, 170, 255)"},char:{color:"rgb(130, 170, 255)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Oe)),Oe}var We={},Ro;function Mn(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2E3440",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2E3440",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#636f88"},prolog:{color:"#636f88"},doctype:{color:"#636f88"},cdata:{color:"#636f88"},punctuation:{color:"#81A1C1"},".namespace":{Opacity:".7"},property:{color:"#81A1C1"},tag:{color:"#81A1C1"},constant:{color:"#81A1C1"},symbol:{color:"#81A1C1"},deleted:{color:"#81A1C1"},number:{color:"#B48EAD"},boolean:{color:"#81A1C1"},selector:{color:"#A3BE8C"},"attr-name":{color:"#A3BE8C"},string:{color:"#A3BE8C"},char:{color:"#A3BE8C"},builtin:{color:"#A3BE8C"},inserted:{color:"#A3BE8C"},operator:{color:"#81A1C1"},entity:{color:"#81A1C1",cursor:"help"},url:{color:"#81A1C1"},".language-css .token.string":{color:"#81A1C1"},".style .token.string":{color:"#81A1C1"},variable:{color:"#81A1C1"},atrule:{color:"#88C0D0"},"attr-value":{color:"#88C0D0"},function:{color:"#88C0D0"},"class-name":{color:"#88C0D0"},keyword:{color:"#81A1C1"},regex:{color:"#EBCB8B"},important:{color:"#EBCB8B",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(We)),We}var Fe={},Bo;function An(){return Bo||(Bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}}}(Fe)),Fe}var Re={},Do;function Cn(){return Do||(Do=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}}(Re)),Re}var Be={},_o;function Hn(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#dccf8f",textShadow:"0"},'pre[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#DCCF8F",textShadow:"0",borderRadius:"5px",border:"1px solid #000",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"12px",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{borderRadius:"5px",border:"1px solid #000",color:"#DCCF8F",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"2px 6px"},namespace:{Opacity:".7"},comment:{color:"#586e75",fontStyle:"italic"},prolog:{color:"#586e75",fontStyle:"italic"},doctype:{color:"#586e75",fontStyle:"italic"},cdata:{color:"#586e75",fontStyle:"italic"},number:{color:"#b89859"},string:{color:"#468966"},char:{color:"#468966"},builtin:{color:"#468966"},inserted:{color:"#468966"},"attr-name":{color:"#b89859"},operator:{color:"#dccf8f"},entity:{color:"#dccf8f",cursor:"help"},url:{color:"#dccf8f"},".language-css .token.string":{color:"#dccf8f"},".style .token.string":{color:"#dccf8f"},selector:{color:"#859900"},regex:{color:"#859900"},atrule:{color:"#cb4b16"},keyword:{color:"#cb4b16"},"attr-value":{color:"#468966"},function:{color:"#b58900"},variable:{color:"#b58900"},placeholder:{color:"#b58900"},property:{color:"#b89859"},tag:{color:"#ffb03b"},boolean:{color:"#b89859"},constant:{color:"#b89859"},symbol:{color:"#b89859"},important:{color:"#dc322f"},statement:{color:"#dc322f"},deleted:{color:"#dc322f"},punctuation:{color:"#dccf8f"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Be)),Be}var De={},Po;function jn(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245"},"pre[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245",padding:"2em",margin:"0.5em 0",overflow:"auto",background:"#1e1e3f"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},":not(pre) > code[class*='language-']":{background:"#1e1e3f",padding:"0.1em",borderRadius:"0.3em"},"":{fontWeight:"400"},comment:{color:"#b362ff"},prolog:{color:"#b362ff"},cdata:{color:"#b362ff"},delimiter:{color:"#ff9d00"},keyword:{color:"#ff9d00"},selector:{color:"#ff9d00"},important:{color:"#ff9d00"},atrule:{color:"#ff9d00"},operator:{color:"rgb(255, 180, 84)",background:"none"},"attr-name":{color:"rgb(255, 180, 84)"},punctuation:{color:"#ffffff"},boolean:{color:"rgb(255, 98, 140)"},tag:{color:"rgb(255, 157, 0)"},"tag.punctuation":{color:"rgb(255, 157, 0)"},doctype:{color:"rgb(255, 157, 0)"},builtin:{color:"rgb(255, 157, 0)"},entity:{color:"#6897bb",background:"none"},symbol:{color:"#6897bb"},number:{color:"#ff628c"},property:{color:"#ff628c"},constant:{color:"#ff628c"},variable:{color:"#ff628c"},string:{color:"#a5ff90"},char:{color:"#a5ff90"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline",background:"none"},function:{color:"rgb(250, 208, 0)"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#00ff00"},deleted:{background:"#ff000d"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"},"class-name":{color:"#fb94ff"},".language-css .token.string":{background:"none"},".style .token.string":{background:"none"},".line-highlight.line-highlight":{marginTop:"36px",background:"linear-gradient(to right, rgba(179, 98, 255, 0.17), transparent)"},".line-highlight.line-highlight:before":{content:"''"},".line-highlight.line-highlight[data-end]:after":{content:"''"}}}(De)),De}var _e={},qo;function Tn(){return qo||(qo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#002b36"},':not(pre) > code[class*="language-"]':{background:"#002b36",padding:".1em",borderRadius:".3em"},comment:{color:"#586e75"},prolog:{color:"#586e75"},doctype:{color:"#586e75"},cdata:{color:"#586e75"},punctuation:{color:"#93a1a1"},".namespace":{Opacity:".7"},property:{color:"#268bd2"},keyword:{color:"#268bd2"},tag:{color:"#268bd2"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#b58900"},constant:{color:"#b58900"},symbol:{color:"#dc322f"},deleted:{color:"#dc322f"},number:{color:"#859900"},selector:{color:"#859900"},"attr-name":{color:"#859900"},string:{color:"#859900"},char:{color:"#859900"},builtin:{color:"#859900"},inserted:{color:"#859900"},variable:{color:"#268bd2"},operator:{color:"#EDEDED"},function:{color:"#268bd2"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"}}}(_e)),_e}var Pe={},No;function On(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)"},':not(pre) > code[class*="language-"]':{backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8e8e8e"},"block-comment":{color:"#8e8e8e"},prolog:{color:"#8e8e8e"},doctype:{color:"#8e8e8e"},cdata:{color:"#8e8e8e"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},number:{color:"#e2777a"},unit:{color:"#e2777a"},hexcode:{color:"#e2777a"},deleted:{color:"#e2777a"},property:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},selector:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},"function-name":{color:"#6196cc"},boolean:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"selector.id":{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},function:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"class-name":{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"},constant:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},symbol:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},important:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575",fontWeight:"bold"},atrule:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},keyword:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},"selector.class":{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},builtin:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},string:{color:"#f87c32"},char:{color:"#f87c32"},"attr-value":{color:"#f87c32"},regex:{color:"#f87c32"},variable:{color:"#f87c32"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(Pe)),Pe}var qe={},Lo;function Wn(){return Lo||(Lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"]::selection':{background:"#C1DEF1"},'pre[class*="language-"] ::selection':{background:"#C1DEF1"},'code[class*="language-"]::selection':{background:"#C1DEF1"},'code[class*="language-"] ::selection':{background:"#C1DEF1"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#008000",fontStyle:"italic"},prolog:{color:"#008000",fontStyle:"italic"},doctype:{color:"#008000",fontStyle:"italic"},cdata:{color:"#008000",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#A31515"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#0000ff"},keyword:{color:"#0000ff"},"attr-value":{color:"#0000ff"},".language-autohotkey .token.selector":{color:"#0000ff"},".language-json .token.boolean":{color:"#0000ff"},".language-json .token.number":{color:"#0000ff"},'code[class*="language-css"]':{color:"#0000ff"},function:{color:"#393A34"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},selector:{color:"#800000"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"class-name":{color:"#2B91AF"},".language-json .token.property":{color:"#2B91AF"},tag:{color:"#800000"},"attr-name":{color:"#ff0000"},property:{color:"#ff0000"},regex:{color:"#ff0000"},entity:{color:"#ff0000"},"directive.tag.tag":{background:"#ffff00",color:"#393A34"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#a5a5a5"},".line-numbers .line-numbers-rows > span:before":{color:"#2B91AF"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0))"}}}(qe)),qe}var Ne={},Eo;function Fn(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}}}(Ne)),Ne}var Le={},Uo;function Rn(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none"},'pre[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none",background:"#2a2a2a",padding:"15px",borderRadius:"4px",border:"1px solid #e1e1e8",overflow:"auto",position:"relative"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{background:"#2a2a2a",padding:"0.15em 0.2em 0.05em",borderRadius:".3em",border:"0.13em solid #7a6652",boxShadow:"1px 1px 0.3em -0.1em #000 inset"},'pre[class*="language-"] code':{whiteSpace:"pre",display:"block"},namespace:{Opacity:".7"},comment:{color:"#6f705e"},prolog:{color:"#6f705e"},doctype:{color:"#6f705e"},cdata:{color:"#6f705e"},operator:{color:"#a77afe"},boolean:{color:"#a77afe"},number:{color:"#a77afe"},"attr-name":{color:"#e6d06c"},string:{color:"#e6d06c"},entity:{color:"#e6d06c",cursor:"help"},url:{color:"#e6d06c"},".language-css .token.string":{color:"#e6d06c"},".style .token.string":{color:"#e6d06c"},selector:{color:"#a6e22d"},inserted:{color:"#a6e22d"},atrule:{color:"#ef3b7d"},"attr-value":{color:"#ef3b7d"},keyword:{color:"#ef3b7d"},important:{color:"#ef3b7d",fontWeight:"bold"},deleted:{color:"#ef3b7d"},regex:{color:"#76d9e6"},statement:{color:"#76d9e6",fontWeight:"bold"},placeholder:{color:"#fff"},variable:{color:"#fff"},bold:{fontWeight:"bold"},punctuation:{color:"#bebec5"},italic:{fontStyle:"italic"},"code.language-markup":{color:"#f9f9f9"},"code.language-markup .token.tag":{color:"#ef3b7d"},"code.language-markup .token.attr-name":{color:"#a6e22d"},"code.language-markup .token.attr-value":{color:"#e6d06c"},"code.language-markup .token.style":{color:"#76d9e6"},"code.language-markup .token.script":{color:"#76d9e6"},"code.language-markup .token.script .token.keyword":{color:"#76d9e6"},".line-highlight.line-highlight":{padding:"0",background:"rgba(255, 255, 255, 0.08)"},".line-highlight.line-highlight:before":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"},".line-highlight.line-highlight[data-end]:after":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"}}}(Le)),Le}var Ee={},Io;function Bn(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#22da17",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"5px 0"},'pre[class*="language-"]':{color:"white",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"0.5em 0",background:"#0a143c",padding:"1em",overflow:"auto"},'pre[class*="language-"] *':{fontFamily:"monospace"},':not(pre) > code[class*="language-"]':{color:"white",background:"#0a143c",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(34 183 199)"},function:{color:"rgb(34 183 199)"},builtin:{color:"rgb(34 183 199)"},char:{color:"rgb(34 183 199)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Ee)),Ee}var Vo;function Dn(){return Vo||(Vo=1,function(e){var r=Ir();Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"a11yDark",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"atomDark",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"cb",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"coldarkCold",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"coldarkDark",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"coy",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"coyWithoutShadows",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"darcula",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"dark",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"dracula",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"duotoneDark",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"duotoneEarth",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"duotoneForest",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"duotoneLight",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"duotoneSea",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"duotoneSpace",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"funky",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ghcolors",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"gruvboxDark",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"gruvboxLight",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"holiTheme",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"hopscotch",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(e,"lucario",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"materialDark",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"materialLight",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"materialOceanic",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(e,"nightOwl",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"nord",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"okaidia",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"oneDark",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"oneLight",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"pojoaque",{enumerable:!0,get:function(){return lr.default}}),Object.defineProperty(e,"prism",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"shadesOfPurple",{enumerable:!0,get:function(){return tr.default}}),Object.defineProperty(e,"solarizedDarkAtom",{enumerable:!0,get:function(){return cr.default}}),Object.defineProperty(e,"solarizedlight",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"synthwave84",{enumerable:!0,get:function(){return ir.default}}),Object.defineProperty(e,"tomorrow",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"twilight",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"vs",{enumerable:!0,get:function(){return sr.default}}),Object.defineProperty(e,"vscDarkPlus",{enumerable:!0,get:function(){return dr.default}}),Object.defineProperty(e,"xonokai",{enumerable:!0,get:function(){return ur.default}}),Object.defineProperty(e,"zTouch",{enumerable:!0,get:function(){return gr.default}});var a=r(Vr()),n=r(Kr()),l=r(Qr()),m=r(Gr()),i=r(Jr()),y=r(Yr()),j=r(Xr()),h=r(Zr()),O=r($r()),k=r(en()),w=r(on()),C=r(rn()),W=r(nn()),g=r(an()),f=r(ln()),B=r(tn()),S=r(cn()),d=r(sn()),u=r(dn()),b=r(un()),s=r(gn()),D=r(bn()),I=r(pn()),x=r(fn()),N=r(hn()),_=r(mn()),L=r(kn()),V=r(yn()),p=r(wn()),F=r(Sn()),G=r(xn()),K=r(vn()),E=r(zn()),J=r(Mn()),U=r(An()),P=r(Cn()),lr=r(Hn()),tr=r(jn()),cr=r(Tn()),ir=r(On()),sr=r(Wn()),dr=r(Fn()),ur=r(Rn()),gr=r(Bn())}(X)),X}var Q=Dn();const _n=({message:e})=>{const{t:r}=Ke(),{theme:a}=or(),[n,l]=c.useState(null);c.useEffect(()=>{(async()=>{try{const[{default:y}]=await Promise.all([Qe(()=>import("./index-1Hy45NwC.js"),__vite__mapDeps([0,1,2,3])),Qe(()=>Promise.resolve({}),__vite__mapDeps([4]))]);l(()=>y)}catch(y){console.error("Failed to load KaTeX:",y)}})()},[]);const m=c.useCallback(async()=>{if(e.content)try{await navigator.clipboard.writeText(e.content)}catch(i){console.error(r("chat.copyError"),i)}},[e,r]);return o.jsxs("div",{className:`${e.role==="user"?"max-w-[80%] bg-primary text-primary-foreground":e.isError?"w-[95%] bg-red-100 text-red-600 dark:bg-red-950 dark:text-red-400":"w-[95%] bg-muted"} rounded-lg px-4 py-2`,children:[o.jsxs("div",{className:"relative",children:[o.jsx(_r,{className:"prose dark:prose-invert max-w-none text-sm break-words prose-headings:mt-4 prose-headings:mb-2 prose-p:my-2 prose-ul:my-2 prose-ol:my-2 prose-li:my-1 [&_.katex]:text-current [&_.katex-display]:my-4 [&_.katex-display]:overflow-x-auto",remarkPlugins:[qr,Nr],rehypePlugins:[...n?[[n,{errorColor:a==="dark"?"#ef4444":"#dc2626",throwOnError:!1,displayMode:!1}]]:[],Pr],skipHtml:!1,components:c.useMemo(()=>({code:i=>o.jsx(ar,{...i,renderAsDiagram:e.mermaidRendered??!1}),p:({children:i})=>o.jsx("p",{className:"my-2",children:i}),h1:({children:i})=>o.jsx("h1",{className:"text-xl font-bold mt-4 mb-2",children:i}),h2:({children:i})=>o.jsx("h2",{className:"text-lg font-bold mt-4 mb-2",children:i}),h3:({children:i})=>o.jsx("h3",{className:"text-base font-bold mt-3 mb-2",children:i}),h4:({children:i})=>o.jsx("h4",{className:"text-base font-semibold mt-3 mb-2",children:i}),ul:({children:i})=>o.jsx("ul",{className:"list-disc pl-5 my-2",children:i}),ol:({children:i})=>o.jsx("ol",{className:"list-decimal pl-5 my-2",children:i}),li:({children:i})=>o.jsx("li",{className:"my-1",children:i})}),[e.mermaidRendered]),children:e.content}),e.role==="assistant"&&e.content&&e.content.length>0&&o.jsxs(Ue,{onClick:m,className:"absolute right-0 bottom-0 size-6 rounded-md opacity-20 transition-opacity hover:opacity-100",tooltip:r("retrievePanel.chatMessage.copyTooltip"),variant:"default",size:"icon",children:[o.jsx(Hr,{className:"size-4"})," "]})]}),e.content===""&&o.jsx(jr,{className:"animate-spin duration-2000"})," "]})},Pn=e=>{if(!e||!e.children)return!1;const r=e.children.filter(a=>a.type==="text").map(a=>a.value).join("");return!r.includes(` -`)||r.length<40},qn=(e,r)=>!r||e!=="json"?!1:r.length>5e3,ar=c.memo(({className:e,children:r,node:a,renderAsDiagram:n=!1,...l})=>{const{theme:m}=or(),[i,y]=c.useState(!1),j=e==null?void 0:e.match(/language-(\w+)/),h=j?j[1]:void 0,O=Pn(a),k=c.useRef(null),w=c.useRef(null),C=String(r||"").replace(/\n$/,""),W=qn(h,C);return c.useEffect(()=>{if(n&&!i&&h==="mermaid"&&k.current){const g=k.current;w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{if(g&&!i)try{Ge.initialize({startOnLoad:!1,theme:m==="dark"?"dark":"default",securityLevel:"loose"}),g.innerHTML='
';const f=String(r).replace(/\n$/,"").trim();if(!(f.length>10&&(f.startsWith("graph")||f.startsWith("sequenceDiagram")||f.startsWith("classDiagram")||f.startsWith("stateDiagram")||f.startsWith("gantt")||f.startsWith("pie")||f.startsWith("flowchart")||f.startsWith("erDiagram")))){console.log("Mermaid content might be incomplete, skipping render attempt:",f);return}const S=f.split(` -`).map(u=>{const b=u.trim();if(b.startsWith("subgraph")){const s=b.split(" ");if(s.length>1)return`subgraph "${s.slice(1).join(" ").replace(/["']/g,"")}"`}return b}).filter(u=>!u.trim().startsWith("linkStyle")).join(` -`),d=`mermaid-${Date.now()}`;Ge.render(d,S).then(({svg:u,bindFunctions:b})=>{if(k.current===g&&!i){if(g.innerHTML=u,y(!0),b)try{b(g)}catch(s){console.error("Mermaid bindFunctions error:",s),g.innerHTML+='

Diagram interactions might be limited.

'}}else k.current!==g&&console.log("Mermaid container changed before rendering completed.")}).catch(u=>{if(console.error("Mermaid rendering promise error (debounced):",u),console.error("Failed content (debounced):",S),k.current===g){const b=u instanceof Error?u.message:String(u),s=document.createElement("pre");s.className="text-red-500 text-xs whitespace-pre-wrap break-words",s.textContent=`Mermaid diagram error: ${b} - -Content: -${S}`,g.innerHTML="",g.appendChild(s)}})}catch(f){if(console.error("Mermaid synchronous error (debounced):",f),console.error("Failed content (debounced):",String(r)),k.current===g){const B=f instanceof Error?f.message:String(f),S=document.createElement("pre");S.className="text-red-500 text-xs whitespace-pre-wrap break-words",S.textContent=`Mermaid diagram setup error: ${B}`,g.innerHTML="",g.appendChild(S)}}},300)}return()=>{w.current&&clearTimeout(w.current)}},[n,i,h,r,m]),W?o.jsx("pre",{className:"whitespace-pre-wrap break-words bg-muted p-4 rounded-md overflow-x-auto text-sm font-mono",children:C}):h==="mermaid"&&!n?o.jsx(Je,{style:m==="dark"?Q.oneDark:Q.oneLight,PreTag:"div",language:"text",...l,children:C}):h==="mermaid"?o.jsx("div",{className:"mermaid-diagram-container my-4 overflow-x-auto",ref:k}):O?o.jsx("code",{className:T(e,"mx-1 rounded-sm bg-muted px-1 py-0.5 font-mono text-sm"),...l,children:r}):o.jsx(Je,{style:m==="dark"?Q.oneDark:Q.oneLight,PreTag:"div",language:h,...l,children:C})});ar.displayName="CodeHighlight";const Ko=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`id-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;function Vn(){const{t:e}=Ke(),[r,a]=c.useState(()=>{try{return(q.getState().retrievalHistory||[]).map((u,b)=>{try{const s=u;return{...u,id:s.id||`hist-${Date.now()}-${b}`,mermaidRendered:s.mermaidRendered??!0}}catch(s){return console.error("Error processing message:",s),{role:"system",content:"Error loading message",id:`error-${Date.now()}-${b}`,isError:!0,mermaidRendered:!0}}})}catch(d){return console.error("Error loading history:",d),[]}}),[n,l]=c.useState(""),[m,i]=c.useState(!1),[y,j]=c.useState(""),h=c.useRef(!0),O=c.useRef(!1),k=c.useRef(!1),w=c.useRef(!1),C=c.useRef(null),W=c.useRef(null),g=c.useCallback(()=>{k.current=!0,requestAnimationFrame(()=>{C.current&&C.current.scrollIntoView({behavior:"auto"})})},[]),f=c.useCallback(async d=>{if(d.preventDefault(),!n.trim()||m)return;const u=["naive","local","global","hybrid","mix","bypass"],b=n.match(/^\/(\w+)\s+(.+)/);let s,D=n;if(/^\/\S+/.test(n)&&!b){j(e("retrievePanel.retrieval.queryModePrefixInvalid"));return}if(b){const p=b[1],F=b[2];if(!u.includes(p)){j(e("retrievePanel.retrieval.queryModeError",{modes:"naive, local, global, hybrid, mix, bypass"}));return}s=p,D=F}j("");const I={id:Ko(),content:n,role:"user"},x={id:Ko(),content:"",role:"assistant",mermaidRendered:!1},N=[...r];a([...N,I,x]),h.current=!0,w.current=!0,setTimeout(()=>{g()},0),l(""),i(!0);const _=(p,F)=>{x.content+=p;const G=/```mermaid\s+([\s\S]+?)```/g;let K=!1,E;for(;(E=G.exec(x.content))!==null;)if(E[1]&&E[1].trim().length>10){K=!0;break}x.mermaidRendered=K,a(J=>{const U=[...J],P=U[U.length-1];return P.role==="assistant"&&(P.content=x.content,P.isError=F,P.mermaidRendered=x.mermaidRendered),U}),h.current&&setTimeout(()=>{g()},30)},L=q.getState(),V={...L.querySettings,query:D,conversation_history:N.filter(p=>p.isError!==!0).slice(-(L.querySettings.history_turns||0)*2).map(p=>({role:p.role,content:p.content})),...s?{mode:s}:{}};try{if(L.querySettings.stream){let p="";await Tr(V,_,F=>{p+=F}),p&&(x.content&&(p=x.content+` -`+p),_(p,!0))}else{const p=await Or(V);_(p.response)}}catch(p){_(`${e("retrievePanel.retrieval.error")} -${Wr(p)}`,!0)}finally{i(!1),w.current=!1,q.getState().setRetrievalHistory([...N,I,x])}},[n,m,r,a,e,g]);c.useEffect(()=>{const d=W.current;if(!d)return;const u=s=>{Math.abs(s.deltaY)>10&&!O.current&&(h.current=!1)},b=Fr(()=>{if(k.current){k.current=!1;return}const s=W.current;s&&(s.scrollHeight-s.scrollTop-s.clientHeight<20?h.current=!0:!O.current&&!w.current&&(h.current=!1))},30);return d.addEventListener("wheel",u),d.addEventListener("scroll",b),()=>{d.removeEventListener("wheel",u),d.removeEventListener("scroll",b)}},[]),c.useEffect(()=>{const d=document.querySelector("form");if(!d)return;const u=()=>{O.current=!0,setTimeout(()=>{O.current=!1},500)};return d.addEventListener("mousedown",u),()=>{d.removeEventListener("mousedown",u)}},[]);const B=Rr(r,150);c.useEffect(()=>{h.current&&g()},[B,g]);const S=c.useCallback(()=>{a([]),q.getState().setRetrievalHistory([])},[a]);return o.jsxs("div",{className:"flex size-full gap-2 px-2 pb-12 overflow-hidden",children:[o.jsxs("div",{className:"flex grow flex-col gap-4",children:[o.jsx("div",{className:"relative grow",children:o.jsx("div",{ref:W,className:"bg-primary-foreground/60 absolute inset-0 flex flex-col overflow-auto rounded-lg border p-2",onClick:()=>{h.current&&(h.current=!1)},children:o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[r.length===0?o.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center text-lg",children:e("retrievePanel.retrieval.startPrompt")}):r.map(d=>o.jsx("div",{className:`flex ${d.role==="user"?"justify-end":"justify-start"}`,children:o.jsx(_n,{message:d})},d.id)),o.jsx("div",{ref:C,className:"pb-1"})]})})}),o.jsxs("form",{onSubmit:f,className:"flex shrink-0 items-center gap-2",children:[o.jsxs(Ue,{type:"button",variant:"outline",onClick:S,disabled:m,size:"sm",children:[o.jsx(Br,{}),e("retrievePanel.retrieval.clear")]}),o.jsxs("div",{className:"flex-1 relative",children:[o.jsx("label",{htmlFor:"query-input",className:"sr-only",children:e("retrievePanel.retrieval.placeholder")}),o.jsx(R,{id:"query-input",className:"w-full",value:n,onChange:d=>{l(d.target.value),y&&j("")},placeholder:e("retrievePanel.retrieval.placeholder"),disabled:m}),y&&o.jsx("div",{className:"absolute left-0 top-full mt-1 text-xs text-red-500",children:y})]}),o.jsxs(Ue,{type:"submit",variant:"default",disabled:m,size:"sm",children:[o.jsx(Dr,{}),e("retrievePanel.retrieval.send")]})]})]}),o.jsx(Ur,{})]})}export{Vn as R,Ye as S,Ie as a,Ze as b,Ve as c,H as d}; diff --git a/lightrag/api/webui/assets/flowDiagram-4HSFHLVR-DZNySYxV.js b/lightrag/api/webui/assets/flowDiagram-4HSFHLVR-DZNySYxV.js deleted file mode 100644 index 95c972cd..00000000 --- a/lightrag/api/webui/assets/flowDiagram-4HSFHLVR-DZNySYxV.js +++ /dev/null @@ -1,161 +0,0 @@ -import{_ as m,o as O1,l as Z,c as Ge,d as Ce,p as H1,r as q1,u as i1,b as X1,s as Q1,q as J1,a as Z1,g as $1,t as et,k as tt,v as st,J as it,x as rt,y as s1,z as nt,A as at,B as ut,C as lt}from"./mermaid-vendor-D0f_SE0h.js";import{g as ot,s as ct}from"./chunk-RZ5BOZE2-B615FLH4.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";var ht="flowchart-",Pe,dt=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ge(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=X1,this.setAccDescription=Q1,this.setDiagramTitle=J1,this.getAccTitle=Z1,this.getAccDescription=$1,this.getDiagramTitle=et,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return tt.sanitizeText(i,this.config)}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return n.domId;return i}addVertex(i,n,a,u,l,f,c={},A){var U,T;if(!i||i.trim().length===0)return;let r;if(A!==void 0){let d;A.includes(` -`)?d=A+` -`:d=`{ -`+A+` -}`,r=st(d,{schema:it})}const b=this.edges.find(d=>d.id===i);if(b){const d=r;(d==null?void 0:d.animate)!==void 0&&(b.animate=d.animate),(d==null?void 0:d.animation)!==void 0&&(b.animation=d.animation);return}let F,k=this.vertices.get(i);if(k===void 0&&(k={id:i,labelType:"text",domId:ht+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,k)),this.vertexCounter++,n!==void 0?(this.config=Ge(),F=this.sanitizeText(n.text.trim()),k.labelType=n.type,F.startsWith('"')&&F.endsWith('"')&&(F=F.substring(1,F.length-1)),k.text=F):k.text===void 0&&(k.text=i),a!==void 0&&(k.type=a),u!=null&&u.forEach(d=>{k.styles.push(d)}),l!=null&&l.forEach(d=>{k.classes.push(d)}),f!==void 0&&(k.dir=f),k.props===void 0?k.props=c:c!==void 0&&Object.assign(k.props,c),r!==void 0){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!rt(r.shape))throw new Error(`No such shape: ${r.shape}.`);k.type=r==null?void 0:r.shape}r!=null&&r.label&&(k.text=r==null?void 0:r.label),r!=null&&r.icon&&(k.icon=r==null?void 0:r.icon,!((U=r.label)!=null&&U.trim())&&k.text===i&&(k.text="")),r!=null&&r.form&&(k.form=r==null?void 0:r.form),r!=null&&r.pos&&(k.pos=r==null?void 0:r.pos),r!=null&&r.img&&(k.img=r==null?void 0:r.img,!((T=r.label)!=null&&T.trim())&&k.text===i&&(k.text="")),r!=null&&r.constraint&&(k.constraint=r.constraint),r.w&&(k.assetWidth=Number(r.w)),r.h&&(k.assetHeight=Number(r.h))}}addSingleLink(i,n,a,u){const c={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};Z.info("abc78 Got edge...",c);const A=a.text;if(A!==void 0&&(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"')&&(c.text=c.text.substring(1,c.text.length-1)),c.labelType=A.type),a!==void 0&&(c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length),u&&!this.edges.some(r=>r.id===u))c.id=u,c.isUserDefinedId=!0;else{const r=this.edges.filter(b=>b.start===c.start&&b.end===c.end);r.length===0?c.id=s1(c.start,c.end,{counter:0,prefix:"L"}):c.id=s1(c.start,c.end,{counter:r.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))Z.info("Pushing edge..."),this.edges.push(c);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. - -Initialize mermaid with maxEdges set to a higher number to allow more edges. -You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,a){const u=this.isLinkData(a)?a.id.replace("@",""):void 0;Z.info("addLink",i,n,u);for(const l of i)for(const f of n){const c=l===i[i.length-1],A=f===n[0];c&&A?this.addSingleLink(l,f,a,u):this.addSingleLink(l,f,a,void 0)}}updateLinkInterpolate(i,n){i.forEach(a=>{a==="default"?this.edges.defaultInterpolate=n:this.edges[a].interpolate=n})}updateLink(i,n){i.forEach(a=>{var u,l,f,c,A,r;if(typeof a=="number"&&a>=this.edges.length)throw new Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);a==="default"?this.edges.defaultStyle=n:(this.edges[a].style=n,(((l=(u=this.edges[a])==null?void 0:u.style)==null?void 0:l.length)??0)>0&&!((c=(f=this.edges[a])==null?void 0:f.style)!=null&&c.some(b=>b==null?void 0:b.startsWith("fill")))&&((r=(A=this.edges[a])==null?void 0:A.style)==null||r.push("fill:none")))})}addClass(i,n){const a=n.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(u=>{let l=this.classes.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.classes.set(u,l)),a!=null&&a.forEach(f=>{if(/color/.exec(f)){const c=f.replace("fill","bgFill");l.textStyles.push(c)}l.styles.push(f)})})}setDirection(i){this.direction=i,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(const a of i.split(",")){const u=this.vertices.get(a);u&&u.classes.push(n);const l=this.edges.find(c=>c.id===a);l&&l.classes.push(n);const f=this.subGraphLookup.get(a);f&&f.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(const a of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,n)}}setClickFun(i,n,a){const u=this.lookUpDomId(i);if(Ge().securityLevel!=="loose"||n===void 0)return;let l=[];if(typeof a=="string"){l=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c{const c=document.querySelector(`[id="${u}"]`);c!==null&&c.addEventListener("click",()=>{i1.runFunc(n,...l)},!1)}))}setLink(i,n,a){i.split(",").forEach(u=>{const l=this.vertices.get(u);l!==void 0&&(l.link=i1.formatUrl(n,this.config),l.linkTarget=a)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,a){i.split(",").forEach(u=>{this.setClickFun(u,n,a)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){var i;return(i=this.direction)==null?void 0:i.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){let n=Ce(".mermaidTooltip");(n._groups||n)[0][0]===null&&(n=Ce("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Ce(i).select("svg").selectAll("g.node").on("mouseover",l=>{var r;const f=Ce(l.currentTarget);if(f.attr("title")===null)return;const A=(r=l.currentTarget)==null?void 0:r.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(f.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),n.html(n.html().replace(/<br\/>/g,"
")),f.classed("hover",!0)}).on("mouseout",l=>{n.transition().duration(500).style("opacity",0),Ce(l.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=Ge(),nt()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,a){let u=i.text.trim(),l=a.text;i===a&&/\s/.exec(a.text)&&(u=void 0);const f=m(b=>{const F={boolean:{},number:{},string:{}},k=[];let U;return{nodeList:b.filter(function(d){const K=typeof d;return d.stmt&&d.stmt==="dir"?(U=d.value,!1):d.trim()===""?!1:K in F?F[K].hasOwnProperty(d)?!1:F[K][d]=!0:k.includes(d)?!1:k.push(d)}),dir:U}},"uniq"),{nodeList:c,dir:A}=f(n.flat());if(this.version==="gen-1")for(let b=0;b2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let u=0,l=1;for(;u=0){const c=this.indexNodes2(i,f);if(c.result)return{result:!0,count:l+c.count};l=l+c.count}u=u+1}return{result:!1,count:l}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(i){let n=i.trim(),a="arrow_open";switch(n[0]){case"<":a="arrow_point",n=n.slice(1);break;case"x":a="arrow_cross",n=n.slice(1);break;case"o":a="arrow_circle",n=n.slice(1);break}let u="normal";return n.includes("=")&&(u="thick"),n.includes(".")&&(u="dotted"),{type:a,stroke:u}}countChar(i,n){const a=n.length;let u=0;for(let l=0;l":u="arrow_point",n.startsWith("<")&&(u="double_"+u,a=a.slice(1));break;case"o":u="arrow_circle",n.startsWith("o")&&(u="double_"+u,a=a.slice(1));break}let l="normal",f=a.length-1;a.startsWith("=")&&(l="thick"),a.startsWith("~")&&(l="invisible");const c=this.countChar(".",a);return c&&(l="dotted",f=c),{type:u,stroke:l,length:f}}destructLink(i,n){const a=this.destructEndLink(i);let u;if(n){if(u=this.destructStartLink(n),u.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(u.type==="arrow_open")u.type=a.type;else{if(u.type!==a.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return u.type==="double_arrow"&&(u.type="double_arrow_point"),u.length=a.length,u}return a}exists(i,n){for(const a of i)if(a.nodes.includes(n))return!0;return!1}makeUniq(i,n){const a=[];return i.nodes.forEach((u,l)=>{this.exists(n,u)||a.push(i.nodes[l])}),{nodes:a}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,n){return i.find(a=>a.id===n)}destructEdgeType(i){let n="none",a="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":a=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),a=n;break}return{arrowTypeStart:n,arrowTypeEnd:a}}addNodeFromVertex(i,n,a,u,l,f){var b;const c=a.get(i.id),A=u.get(i.id)??!1,r=this.findNode(n,i.id);if(r)r.cssStyles=i.styles,r.cssCompiledStyles=this.getCompiledStyles(i.classes),r.cssClasses=i.classes.join(" ");else{const F={id:i.id,label:i.text,labelStyle:"",parentId:c,padding:((b=l.flowchart)==null?void 0:b.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:f,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint};A?n.push({...F,isGroup:!0,shape:"rect"}):n.push({...F,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let n=[];for(const a of i){const u=this.classes.get(a);u!=null&&u.styles&&(n=[...n,...u.styles??[]].map(l=>l.trim())),u!=null&&u.textStyles&&(n=[...n,...u.textStyles??[]].map(l=>l.trim()))}return n}getData(){const i=Ge(),n=[],a=[],u=this.getSubGraphs(),l=new Map,f=new Map;for(let r=u.length-1;r>=0;r--){const b=u[r];b.nodes.length>0&&f.set(b.id,!0);for(const F of b.nodes)l.set(F,b.id)}for(let r=u.length-1;r>=0;r--){const b=u[r];n.push({id:b.id,label:b.title,labelStyle:"",parentId:l.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssClasses:b.classes.join(" "),shape:"rect",dir:b.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(r=>{this.addNodeFromVertex(r,n,l,f,i,i.look||"classic")});const A=this.getEdges();return A.forEach((r,b)=>{var d;const{arrowTypeStart:F,arrowTypeEnd:k}=this.destructEdgeType(r.type),U=[...A.defaultStyle??[]];r.style&&U.push(...r.style);const T={id:s1(r.start,r.end,{counter:b,prefix:"L"},r.id),isUserDefinedId:r.isUserDefinedId,start:r.start,end:r.end,type:r.type??"normal",label:r.text,labelpos:"c",thickness:r.stroke,minlen:r.length,classes:(r==null?void 0:r.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":F,arrowTypeEnd:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":k,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(r.classes),labelStyle:U,style:U,pattern:r.stroke,look:i.look,animate:r.animate,animation:r.animation,curve:r.interpolate||this.edges.defaultInterpolate||((d=i.flowchart)==null?void 0:d.curve)};a.push(T)}),{nodes:n,edges:a,other:{},config:i}}defaultConfig(){return at.flowchart}},m(Pe,"FlowDB"),Pe),pt=m(function(s,i){return i.db.getClasses()},"getClasses"),ft=m(async function(s,i,n,a){var U;Z.info("REF0:"),Z.info("Drawing state diagram (v2)",i);const{securityLevel:u,flowchart:l,layout:f}=Ge();let c;u==="sandbox"&&(c=Ce("#i"+i));const A=u==="sandbox"?c.nodes()[0].contentDocument:document;Z.debug("Before getData: ");const r=a.db.getData();Z.debug("Data: ",r);const b=ot(i,u),F=a.db.getDirection();r.type=a.type,r.layoutAlgorithm=H1(f),r.layoutAlgorithm==="dagre"&&f==="elk"&&Z.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),r.direction=F,r.nodeSpacing=(l==null?void 0:l.nodeSpacing)||50,r.rankSpacing=(l==null?void 0:l.rankSpacing)||50,r.markers=["point","circle","cross"],r.diagramId=i,Z.debug("REF1:",r),await q1(r,b);const k=((U=r.config.flowchart)==null?void 0:U.diagramPadding)??8;i1.insertTitle(b,"flowchartTitleText",(l==null?void 0:l.titleTopMargin)||0,a.db.getDiagramTitle()),ct(b,k,"flowchart",(l==null?void 0:l.useMaxWidth)||!1);for(const T of r.nodes){const d=Ce(`#${i} [id="${T.id}"]`);if(!d||!T.link)continue;const K=A.createElementNS("http://www.w3.org/2000/svg","a");K.setAttributeNS("http://www.w3.org/2000/svg","class",T.cssClasses),K.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?K.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):T.linkTarget&&K.setAttributeNS("http://www.w3.org/2000/svg","target",T.linkTarget);const fe=d.insert(function(){return K},":first-child"),ge=d.select(".label-container");ge&&fe.append(function(){return ge.node()});const be=d.select(".label");be&&fe.append(function(){return be.node()})}},"draw"),gt={getClasses:pt,draw:ft},r1=function(){var s=m(function(pe,h,p,g){for(p=p||{},g=pe.length;g--;p[pe[g]]=h);return p},"o"),i=[1,4],n=[1,3],a=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],l=[2,2],f=[1,13],c=[1,14],A=[1,15],r=[1,16],b=[1,23],F=[1,25],k=[1,26],U=[1,27],T=[1,49],d=[1,48],K=[1,29],fe=[1,30],ge=[1,31],be=[1,32],Me=[1,33],L=[1,44],v=[1,46],I=[1,42],w=[1,47],R=[1,43],N=[1,50],G=[1,45],P=[1,51],O=[1,52],Ue=[1,34],We=[1,35],ze=[1,36],je=[1,37],he=[1,57],E=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],$=[1,61],ee=[1,60],te=[1,62],Se=[8,9,11,75,77,78],n1=[1,78],De=[1,91],xe=[1,96],Te=[1,95],Ee=[1,92],ye=[1,88],Fe=[1,94],_e=[1,90],Be=[1,97],Ve=[1,93],Le=[1,98],ve=[1,89],Ae=[8,9,10,11,40,75,77,78],W=[8,9,10,11,40,46,75,77,78],H=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],a1=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ie=[44,60,89,102,105,106,109,111,114,115,116],u1=[1,121],l1=[1,122],Ke=[1,124],Ye=[1,123],o1=[44,60,62,74,89,102,105,106,109,111,114,115,116],c1=[1,133],h1=[1,147],d1=[1,148],p1=[1,149],f1=[1,150],g1=[1,135],b1=[1,137],A1=[1,141],k1=[1,142],m1=[1,143],C1=[1,144],S1=[1,145],D1=[1,146],x1=[1,151],T1=[1,152],E1=[1,131],y1=[1,132],F1=[1,139],_1=[1,134],B1=[1,138],V1=[1,136],Qe=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],L1=[1,154],v1=[1,156],B=[8,9,11],q=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],C=[1,176],z=[1,172],j=[1,173],S=[1,177],D=[1,174],x=[1,175],we=[77,116,119],y=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],I1=[10,106],de=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],se=[1,247],ie=[1,245],re=[1,249],ne=[1,243],ae=[1,244],ue=[1,246],le=[1,248],oe=[1,250],Re=[1,268],w1=[8,9,11,106],J=[8,9,10,11,60,84,105,106,109,110,111,112],Je={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:m(function(h,p,g,o,_,e,Oe){var t=e.length-1;switch(_){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 183:this.$=e[t];break;case 11:o.setDirection("TB"),this.$="TB";break;case 12:o.setDirection(e[t-1]),this.$=e[t-1];break;case 27:this.$=e[t-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=o.addSubGraph(e[t-6],e[t-1],e[t-4]);break;case 34:this.$=o.addSubGraph(e[t-3],e[t-1],e[t-3]);break;case 35:this.$=o.addSubGraph(void 0,e[t-1],void 0);break;case 37:this.$=e[t].trim(),o.setAccTitle(this.$);break;case 38:case 39:this.$=e[t].trim(),o.setAccDescription(this.$);break;case 43:this.$=e[t-1]+e[t];break;case 44:this.$=e[t];break;case 45:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),o.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 46:o.addLink(e[t-2].stmt,e[t],e[t-1]),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 47:o.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 48:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 49:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),this.$={stmt:e[t-1],nodes:e[t-1],shapeData:e[t]};break;case 50:this.$={stmt:e[t],nodes:e[t]};break;case 51:this.$=[e[t]];break;case 52:o.addVertex(e[t-5][e[t-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4]),this.$=e[t-5].concat(e[t]);break;case 53:this.$=e[t-4].concat(e[t]);break;case 54:this.$=e[t];break;case 55:this.$=e[t-2],o.setClass(e[t-2],e[t]);break;case 56:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"square");break;case 57:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"doublecircle");break;case 58:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"circle");break;case 59:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"ellipse");break;case 60:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"stadium");break;case 61:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"subroutine");break;case 62:this.$=e[t-7],o.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]]));break;case 63:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"cylinder");break;case 64:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"round");break;case 65:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"diamond");break;case 66:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"hexagon");break;case 67:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"odd");break;case 68:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"trapezoid");break;case 69:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"inv_trapezoid");break;case 70:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_right");break;case 71:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_left");break;case 72:this.$=e[t],o.addVertex(e[t]);break;case 73:e[t-1].text=e[t],this.$=e[t-1];break;case 74:case 75:e[t-2].text=e[t-1],this.$=e[t-2];break;case 76:this.$=e[t];break;case 77:var V=o.destructLink(e[t],e[t-2]);this.$={type:V.type,stroke:V.stroke,length:V.length,text:e[t-1]};break;case 78:var V=o.destructLink(e[t],e[t-2]);this.$={type:V.type,stroke:V.stroke,length:V.length,text:e[t-1],id:e[t-3]};break;case 79:this.$={text:e[t],type:"text"};break;case 80:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 81:this.$={text:e[t],type:"string"};break;case 82:this.$={text:e[t],type:"markdown"};break;case 83:var V=o.destructLink(e[t]);this.$={type:V.type,stroke:V.stroke,length:V.length};break;case 84:var V=o.destructLink(e[t]);this.$={type:V.type,stroke:V.stroke,length:V.length,id:e[t-1]};break;case 85:this.$=e[t-1];break;case 86:this.$={text:e[t],type:"text"};break;case 87:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 88:this.$={text:e[t],type:"string"};break;case 89:case 104:this.$={text:e[t],type:"markdown"};break;case 101:this.$={text:e[t],type:"text"};break;case 102:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 103:this.$={text:e[t],type:"text"};break;case 105:this.$=e[t-4],o.addClass(e[t-2],e[t]);break;case 106:this.$=e[t-4],o.setClass(e[t-2],e[t]);break;case 107:case 115:this.$=e[t-1],o.setClickEvent(e[t-1],e[t]);break;case 108:case 116:this.$=e[t-3],o.setClickEvent(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 109:this.$=e[t-2],o.setClickEvent(e[t-2],e[t-1],e[t]);break;case 110:this.$=e[t-4],o.setClickEvent(e[t-4],e[t-3],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 111:this.$=e[t-2],o.setLink(e[t-2],e[t]);break;case 112:this.$=e[t-4],o.setLink(e[t-4],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 113:this.$=e[t-4],o.setLink(e[t-4],e[t-2],e[t]);break;case 114:this.$=e[t-6],o.setLink(e[t-6],e[t-4],e[t]),o.setTooltip(e[t-6],e[t-2]);break;case 117:this.$=e[t-1],o.setLink(e[t-1],e[t]);break;case 118:this.$=e[t-3],o.setLink(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 119:this.$=e[t-3],o.setLink(e[t-3],e[t-2],e[t]);break;case 120:this.$=e[t-5],o.setLink(e[t-5],e[t-4],e[t]),o.setTooltip(e[t-5],e[t-2]);break;case 121:this.$=e[t-4],o.addVertex(e[t-2],void 0,void 0,e[t]);break;case 122:this.$=e[t-4],o.updateLink([e[t-2]],e[t]);break;case 123:this.$=e[t-4],o.updateLink(e[t-2],e[t]);break;case 124:this.$=e[t-8],o.updateLinkInterpolate([e[t-6]],e[t-2]),o.updateLink([e[t-6]],e[t]);break;case 125:this.$=e[t-8],o.updateLinkInterpolate(e[t-6],e[t-2]),o.updateLink(e[t-6],e[t]);break;case 126:this.$=e[t-6],o.updateLinkInterpolate([e[t-4]],e[t]);break;case 127:this.$=e[t-6],o.updateLinkInterpolate(e[t-4],e[t]);break;case 128:case 130:this.$=[e[t]];break;case 129:case 131:e[t-2].push(e[t]),this.$=e[t-2];break;case 133:this.$=e[t-1]+e[t];break;case 181:this.$=e[t];break;case 182:this.$=e[t-1]+""+e[t];break;case 184:this.$=e[t-1]+""+e[t];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:n,12:a},{1:[3]},s(u,l,{5:6}),{4:7,9:i,10:n,12:a},{4:8,9:i,10:n,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:b,33:24,34:F,36:k,38:U,42:28,43:38,44:T,45:39,47:40,60:d,84:K,85:fe,86:ge,87:be,88:Me,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O,121:Ue,122:We,123:ze,124:je},s(u,[2,9]),s(u,[2,10]),s(u,[2,11]),{8:[1,54],9:[1,55],10:he,15:53,18:56},s(E,[2,3]),s(E,[2,4]),s(E,[2,5]),s(E,[2,6]),s(E,[2,7]),s(E,[2,8]),{8:$,9:ee,11:te,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:$,9:ee,11:te,21:67},{8:$,9:ee,11:te,21:68},{8:$,9:ee,11:te,21:69},{8:$,9:ee,11:te,21:70},{8:$,9:ee,11:te,21:71},{8:$,9:ee,10:[1,72],11:te,21:73},s(E,[2,36]),{35:[1,74]},{37:[1,75]},s(E,[2,39]),s(Se,[2,50],{18:76,39:77,10:he,40:n1}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:De,44:xe,60:Te,80:[1,86],89:Ee,95:[1,83],97:[1,84],101:85,105:ye,106:Fe,109:_e,111:Be,114:Ve,115:Le,116:ve,120:87},s(E,[2,185]),s(E,[2,186]),s(E,[2,187]),s(E,[2,188]),s(Ae,[2,51]),s(Ae,[2,54],{46:[1,99]}),s(W,[2,72],{113:112,29:[1,100],44:T,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:d,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:L,102:v,105:I,106:w,109:R,111:N,114:G,115:P,116:O}),s(H,[2,181]),s(H,[2,142]),s(H,[2,143]),s(H,[2,144]),s(H,[2,145]),s(H,[2,146]),s(H,[2,147]),s(H,[2,148]),s(H,[2,149]),s(H,[2,150]),s(H,[2,151]),s(H,[2,152]),s(u,[2,12]),s(u,[2,18]),s(u,[2,19]),{9:[1,113]},s(a1,[2,26],{18:114,10:he}),s(E,[2,27]),{42:115,43:38,44:T,45:39,47:40,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},s(E,[2,40]),s(E,[2,41]),s(E,[2,42]),s(Ie,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:u1,81:l1,116:Ke,119:Ye},{75:[1,125],77:[1,126]},s(o1,[2,83]),s(E,[2,28]),s(E,[2,29]),s(E,[2,30]),s(E,[2,31]),s(E,[2,32]),{10:c1,12:h1,14:d1,27:p1,28:127,32:f1,44:g1,60:b1,75:A1,80:[1,129],81:[1,130],83:140,84:k1,85:m1,86:C1,87:S1,88:D1,89:x1,90:T1,91:128,105:E1,109:y1,111:F1,114:_1,115:B1,116:V1},s(Qe,l,{5:153}),s(E,[2,37]),s(E,[2,38]),s(Se,[2,48],{44:L1}),s(Se,[2,49],{18:155,10:he,40:v1}),s(Ae,[2,44]),{44:T,47:157,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},{102:[1,158],103:159,105:[1,160]},{44:T,47:161,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},{44:T,47:162,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},s(B,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},s(B,[2,115],{120:167,10:[1,166],14:De,44:xe,60:Te,89:Ee,105:ye,106:Fe,109:_e,111:Be,114:Ve,115:Le,116:ve}),s(B,[2,117],{10:[1,168]}),s(q,[2,183]),s(q,[2,170]),s(q,[2,171]),s(q,[2,172]),s(q,[2,173]),s(q,[2,174]),s(q,[2,175]),s(q,[2,176]),s(q,[2,177]),s(q,[2,178]),s(q,[2,179]),s(q,[2,180]),{44:T,47:169,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},{30:170,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:178,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:180,50:[1,179],67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:181,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:182,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:183,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{109:[1,184]},{30:185,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:186,65:[1,187],67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:188,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:189,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{30:190,67:C,80:z,81:j,82:171,116:S,117:D,118:x},s(H,[2,182]),s(u,[2,20]),s(a1,[2,25]),s(Se,[2,46],{39:191,18:192,10:he,40:n1}),s(Ie,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{77:[1,196],79:197,116:Ke,119:Ye},s(we,[2,79]),s(we,[2,81]),s(we,[2,82]),s(we,[2,168]),s(we,[2,169]),{76:198,79:120,80:u1,81:l1,116:Ke,119:Ye},s(o1,[2,84]),{8:$,9:ee,10:c1,11:te,12:h1,14:d1,21:200,27:p1,29:[1,199],32:f1,44:g1,60:b1,75:A1,83:140,84:k1,85:m1,86:C1,87:S1,88:D1,89:x1,90:T1,91:201,105:E1,109:y1,111:F1,114:_1,115:B1,116:V1},s(y,[2,101]),s(y,[2,103]),s(y,[2,104]),s(y,[2,157]),s(y,[2,158]),s(y,[2,159]),s(y,[2,160]),s(y,[2,161]),s(y,[2,162]),s(y,[2,163]),s(y,[2,164]),s(y,[2,165]),s(y,[2,166]),s(y,[2,167]),s(y,[2,90]),s(y,[2,91]),s(y,[2,92]),s(y,[2,93]),s(y,[2,94]),s(y,[2,95]),s(y,[2,96]),s(y,[2,97]),s(y,[2,98]),s(y,[2,99]),s(y,[2,100]),{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:b,32:[1,202],33:24,34:F,36:k,38:U,42:28,43:38,44:T,45:39,47:40,60:d,84:K,85:fe,86:ge,87:be,88:Me,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O,121:Ue,122:We,123:ze,124:je},{10:he,18:203},{44:[1,204]},s(Ae,[2,43]),{10:[1,205],44:T,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:112,114:G,115:P,116:O},{10:[1,206]},{10:[1,207],106:[1,208]},s(I1,[2,128]),{10:[1,209],44:T,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:112,114:G,115:P,116:O},{10:[1,210],44:T,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:112,114:G,115:P,116:O},{80:[1,211]},s(B,[2,109],{10:[1,212]}),s(B,[2,111],{10:[1,213]}),{80:[1,214]},s(q,[2,184]),{80:[1,215],98:[1,216]},s(Ae,[2,55],{113:112,44:T,60:d,89:L,102:v,105:I,106:w,109:R,111:N,114:G,115:P,116:O}),{31:[1,217],67:C,82:218,116:S,117:D,118:x},s(de,[2,86]),s(de,[2,88]),s(de,[2,89]),s(de,[2,153]),s(de,[2,154]),s(de,[2,155]),s(de,[2,156]),{49:[1,219],67:C,82:218,116:S,117:D,118:x},{30:220,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{51:[1,221],67:C,82:218,116:S,117:D,118:x},{53:[1,222],67:C,82:218,116:S,117:D,118:x},{55:[1,223],67:C,82:218,116:S,117:D,118:x},{57:[1,224],67:C,82:218,116:S,117:D,118:x},{60:[1,225]},{64:[1,226],67:C,82:218,116:S,117:D,118:x},{66:[1,227],67:C,82:218,116:S,117:D,118:x},{30:228,67:C,80:z,81:j,82:171,116:S,117:D,118:x},{31:[1,229],67:C,82:218,116:S,117:D,118:x},{67:C,69:[1,230],71:[1,231],82:218,116:S,117:D,118:x},{67:C,69:[1,233],71:[1,232],82:218,116:S,117:D,118:x},s(Se,[2,45],{18:155,10:he,40:v1}),s(Se,[2,47],{44:L1}),s(Ie,[2,75]),s(Ie,[2,74]),{62:[1,234],67:C,82:218,116:S,117:D,118:x},s(Ie,[2,77]),s(we,[2,80]),{77:[1,235],79:197,116:Ke,119:Ye},{30:236,67:C,80:z,81:j,82:171,116:S,117:D,118:x},s(Qe,l,{5:237}),s(y,[2,102]),s(E,[2,35]),{43:238,44:T,45:39,47:40,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},{10:he,18:239},{10:se,60:ie,84:re,92:240,105:ne,107:241,108:242,109:ae,110:ue,111:le,112:oe},{10:se,60:ie,84:re,92:251,104:[1,252],105:ne,107:241,108:242,109:ae,110:ue,111:le,112:oe},{10:se,60:ie,84:re,92:253,104:[1,254],105:ne,107:241,108:242,109:ae,110:ue,111:le,112:oe},{105:[1,255]},{10:se,60:ie,84:re,92:256,105:ne,107:241,108:242,109:ae,110:ue,111:le,112:oe},{44:T,47:257,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},s(B,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},s(B,[2,116]),s(B,[2,118],{10:[1,261]}),s(B,[2,119]),s(W,[2,56]),s(de,[2,87]),s(W,[2,57]),{51:[1,262],67:C,82:218,116:S,117:D,118:x},s(W,[2,64]),s(W,[2,59]),s(W,[2,60]),s(W,[2,61]),{109:[1,263]},s(W,[2,63]),s(W,[2,65]),{66:[1,264],67:C,82:218,116:S,117:D,118:x},s(W,[2,67]),s(W,[2,68]),s(W,[2,70]),s(W,[2,69]),s(W,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(Ie,[2,78]),{31:[1,265],67:C,82:218,116:S,117:D,118:x},{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:b,32:[1,266],33:24,34:F,36:k,38:U,42:28,43:38,44:T,45:39,47:40,60:d,84:K,85:fe,86:ge,87:be,88:Me,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O,121:Ue,122:We,123:ze,124:je},s(Ae,[2,53]),{43:267,44:T,45:39,47:40,60:d,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O},s(B,[2,121],{106:Re}),s(w1,[2,130],{108:269,10:se,60:ie,84:re,105:ne,109:ae,110:ue,111:le,112:oe}),s(J,[2,132]),s(J,[2,134]),s(J,[2,135]),s(J,[2,136]),s(J,[2,137]),s(J,[2,138]),s(J,[2,139]),s(J,[2,140]),s(J,[2,141]),s(B,[2,122],{106:Re}),{10:[1,270]},s(B,[2,123],{106:Re}),{10:[1,271]},s(I1,[2,129]),s(B,[2,105],{106:Re}),s(B,[2,106],{113:112,44:T,60:d,89:L,102:v,105:I,106:w,109:R,111:N,114:G,115:P,116:O}),s(B,[2,110]),s(B,[2,112],{10:[1,272]}),s(B,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:$,9:ee,11:te,21:277},s(E,[2,34]),s(Ae,[2,52]),{10:se,60:ie,84:re,105:ne,107:278,108:242,109:ae,110:ue,111:le,112:oe},s(J,[2,133]),{14:De,44:xe,60:Te,89:Ee,101:279,105:ye,106:Fe,109:_e,111:Be,114:Ve,115:Le,116:ve,120:87},{14:De,44:xe,60:Te,89:Ee,101:280,105:ye,106:Fe,109:_e,111:Be,114:Ve,115:Le,116:ve,120:87},{98:[1,281]},s(B,[2,120]),s(W,[2,58]),{30:282,67:C,80:z,81:j,82:171,116:S,117:D,118:x},s(W,[2,66]),s(Qe,l,{5:283}),s(w1,[2,131],{108:269,10:se,60:ie,84:re,105:ne,109:ae,110:ue,111:le,112:oe}),s(B,[2,126],{120:167,10:[1,284],14:De,44:xe,60:Te,89:Ee,105:ye,106:Fe,109:_e,111:Be,114:Ve,115:Le,116:ve}),s(B,[2,127],{120:167,10:[1,285],14:De,44:xe,60:Te,89:Ee,105:ye,106:Fe,109:_e,111:Be,114:Ve,115:Le,116:ve}),s(B,[2,114]),{31:[1,286],67:C,82:218,116:S,117:D,118:x},{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:b,32:[1,287],33:24,34:F,36:k,38:U,42:28,43:38,44:T,45:39,47:40,60:d,84:K,85:fe,86:ge,87:be,88:Me,89:L,102:v,105:I,106:w,109:R,111:N,113:41,114:G,115:P,116:O,121:Ue,122:We,123:ze,124:je},{10:se,60:ie,84:re,92:288,105:ne,107:241,108:242,109:ae,110:ue,111:le,112:oe},{10:se,60:ie,84:re,92:289,105:ne,107:241,108:242,109:ae,110:ue,111:le,112:oe},s(W,[2,62]),s(E,[2,33]),s(B,[2,124],{106:Re}),s(B,[2,125],{106:Re})],defaultActions:{},parseError:m(function(h,p){if(p.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=p,g}},"parseError"),parse:m(function(h){var p=this,g=[0],o=[],_=[null],e=[],Oe=this.table,t="",V=0,R1=0,z1=2,N1=1,j1=e.slice.call(arguments,1),M=Object.create(this.lexer),ke={yy:{}};for(var Ze in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ze)&&(ke.yy[Ze]=this.yy[Ze]);M.setInput(h,ke.yy),ke.yy.lexer=M,ke.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var $e=M.yylloc;e.push($e);var K1=M.options&&M.options.ranges;typeof ke.yy.parseError=="function"?this.parseError=ke.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y1(X){g.length=g.length-2*X,_.length=_.length-X,e.length=e.length-X}m(Y1,"popStack");function G1(){var X;return X=o.pop()||M.lex()||N1,typeof X!="number"&&(X instanceof Array&&(o=X,X=o.pop()),X=p.symbols_[X]||X),X}m(G1,"lex");for(var Y,me,Q,e1,Ne={},qe,ce,P1,Xe;;){if(me=g[g.length-1],this.defaultActions[me]?Q=this.defaultActions[me]:((Y===null||typeof Y>"u")&&(Y=G1()),Q=Oe[me]&&Oe[me][Y]),typeof Q>"u"||!Q.length||!Q[0]){var t1="";Xe=[];for(qe in Oe[me])this.terminals_[qe]&&qe>z1&&Xe.push("'"+this.terminals_[qe]+"'");M.showPosition?t1="Parse error on line "+(V+1)+`: -`+M.showPosition()+` -Expecting `+Xe.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":t1="Parse error on line "+(V+1)+": Unexpected "+(Y==N1?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(t1,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:$e,expected:Xe})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+me+", token: "+Y);switch(Q[0]){case 1:g.push(Y),_.push(M.yytext),e.push(M.yylloc),g.push(Q[1]),Y=null,R1=M.yyleng,t=M.yytext,V=M.yylineno,$e=M.yylloc;break;case 2:if(ce=this.productions_[Q[1]][1],Ne.$=_[_.length-ce],Ne._$={first_line:e[e.length-(ce||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(ce||1)].first_column,last_column:e[e.length-1].last_column},K1&&(Ne._$.range=[e[e.length-(ce||1)].range[0],e[e.length-1].range[1]]),e1=this.performAction.apply(Ne,[t,R1,V,ke.yy,Q[1],_,e].concat(j1)),typeof e1<"u")return e1;ce&&(g=g.slice(0,-1*ce*2),_=_.slice(0,-1*ce),e=e.slice(0,-1*ce)),g.push(this.productions_[Q[1]][0]),_.push(Ne.$),e.push(Ne._$),P1=Oe[g[g.length-2]][g[g.length-1]],g.push(P1);break;case 3:return!0}}return!0},"parse")},W1=function(){var pe={EOF:1,parseError:m(function(p,g){if(this.yy.parser)this.yy.parser.parseError(p,g);else throw new Error(p)},"parseError"),setInput:m(function(h,p){return this.yy=p||this.yy||{},this._input=h,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:m(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var p=h.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:m(function(h){var p=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var o=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),g.length-1&&(this.yylineno-=g.length-1);var _=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:g?(g.length===o.length?this.yylloc.first_column:0)+o[o.length-g.length].length-g[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(h){this.unput(this.match.slice(h))},"less"),pastInput:m(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var h=this.pastInput(),p=new Array(h.length+1).join("-");return h+this.upcomingInput()+` -`+p+"^"},"showPosition"),test_match:m(function(h,p){var g,o,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),o=h[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in _)this[e]=_[e];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,p,g,o;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),e=0;e<_.length;e++)if(g=this._input.match(this.rules[_[e]]),g&&(!p||g[0].length>p[0].length)){if(p=g,o=e,this.options.backtrack_lexer){if(h=this.test_match(g,_[e]),h!==!1)return h;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(h=this.test_match(p,_[o]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var p=this.next();return p||this.lex()},"lex"),begin:m(function(p){this.conditionStack.push(p)},"begin"),popState:m(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(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:m(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:m(function(p){this.begin(p)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:m(function(p,g,o,_){switch(o){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;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 this.pushState("shapeData"),g.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const e=/\n\s*/g;return g.yytext=g.yytext.replace(e,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return p.lex.firstGraph()&&this.begin("dir"),12;case 36:return p.lex.firstGraph()&&this.begin("dir"),12;case 37:return p.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return pe}();Je.lexer=W1;function He(){this.yy={}}return m(He,"Parser"),He.prototype=Je,Je.Parser=He,new He}();r1.parser=r1;var M1=r1,U1=Object.assign({},M1);U1.parse=s=>{const i=s.replace(/}\s*\n/g,`} -`);return M1.parse(i)};var bt=U1,At=m((s,i)=>{const n=ut,a=n(s,"r"),u=n(s,"g"),l=n(s,"b");return lt(a,u,l,i)},"fade"),kt=m(s=>`.label { - font-family: ${s.fontFamily}; - color: ${s.nodeTextColor||s.textColor}; - } - .cluster-label text { - fill: ${s.titleColor}; - } - .cluster-label span { - color: ${s.titleColor}; - } - .cluster-label span p { - background-color: transparent; - } - - .label text,span { - fill: ${s.nodeTextColor||s.textColor}; - color: ${s.nodeTextColor||s.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${s.mainBkg}; - stroke: ${s.nodeBorder}; - stroke-width: 1px; - } - .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .katex path { - fill: #000; - stroke: #000; - stroke-width: 1px; - } - - .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - - .root .anchor path { - fill: ${s.lineColor} !important; - stroke-width: 0; - stroke: ${s.lineColor}; - } - - .arrowheadPath { - fill: ${s.arrowheadColor}; - } - - .edgePath .path { - stroke: ${s.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${s.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${s.edgeLabelBackground}; - p { - background-color: ${s.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${s.edgeLabelBackground}; - fill: ${s.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${At(s.edgeLabelBackground,.5)}; - // background-color: - } - - .cluster rect { - fill: ${s.clusterBkg}; - stroke: ${s.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${s.titleColor}; - } - - .cluster span { - color: ${s.titleColor}; - } - /* .cluster div { - color: ${s.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${s.fontFamily}; - font-size: 12px; - background: ${s.tertiaryColor}; - border: 1px solid ${s.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${s.textColor}; - } - - rect.text { - fill: none; - stroke-width: 0; - } - - .icon-shape, .image-shape { - background-color: ${s.edgeLabelBackground}; - p { - background-color: ${s.edgeLabelBackground}; - padding: 2px; - } - rect { - opacity: 0.5; - background-color: ${s.edgeLabelBackground}; - fill: ${s.edgeLabelBackground}; - } - text-align: center; - } -`,"getStyles"),mt=kt,Ft={parser:bt,get db(){return new dt},renderer:gt,styles:mt,init:m(s=>{s.flowchart||(s.flowchart={}),s.layout&&O1({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,O1({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{Ft as diagram}; diff --git a/lightrag/api/webui/assets/flowDiagram-PKI6S5ZS-Ry-v0Q5g.js b/lightrag/api/webui/assets/flowDiagram-PKI6S5ZS-Ry-v0Q5g.js new file mode 100644 index 00000000..1e7a1956 --- /dev/null +++ b/lightrag/api/webui/assets/flowDiagram-PKI6S5ZS-Ry-v0Q5g.js @@ -0,0 +1,162 @@ +import{g as qt}from"./chunk-E2GYISFI-DBdOi329.js";import{_ as m,o as Ot,l as t1,c as b1,d as S1,p as Ht,r as Xt,u as it,b as Qt,s as Jt,q as Zt,a as $t,g as te,t as ee,k as se,v as ie,J as re,x as ae,y as st,z as ne,A as ue,B as oe,C as le}from"./mermaid-vendor-DOoA-Fcm.js";import{g as ce}from"./chunk-BFAMUDN2-DUbWdDRU.js";import{s as he}from"./chunk-SKB7J2MH-CncvyOyo.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";var de="flowchart-",P1,pe=(P1=class{constructor(){this.vertexCounter=0,this.config=b1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Qt,this.setAccDescription=Jt,this.setDiagramTitle=Zt,this.getAccTitle=$t,this.getAccDescription=te,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return se.sanitizeText(i,this.config)}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return a.domId;return i}addVertex(i,a,n,u,o,f,c={},A){var L,C;if(!i||i.trim().length===0)return;let r;if(A!==void 0){let p;A.includes(` +`)?p=A+` +`:p=`{ +`+A+` +}`,r=ie(p,{schema:re})}const k=this.edges.find(p=>p.id===i);if(k){const p=r;(p==null?void 0:p.animate)!==void 0&&(k.animate=p.animate),(p==null?void 0:p.animation)!==void 0&&(k.animation=p.animation);return}let E,b=this.vertices.get(i);if(b===void 0&&(b={id:i,labelType:"text",domId:de+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,b)),this.vertexCounter++,a!==void 0?(this.config=b1(),E=this.sanitizeText(a.text.trim()),b.labelType=a.type,E.startsWith('"')&&E.endsWith('"')&&(E=E.substring(1,E.length-1)),b.text=E):b.text===void 0&&(b.text=i),n!==void 0&&(b.type=n),u!=null&&u.forEach(p=>{b.styles.push(p)}),o!=null&&o.forEach(p=>{b.classes.push(p)}),f!==void 0&&(b.dir=f),b.props===void 0?b.props=c:c!==void 0&&Object.assign(b.props,c),r!==void 0){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!ae(r.shape))throw new Error(`No such shape: ${r.shape}.`);b.type=r==null?void 0:r.shape}r!=null&&r.label&&(b.text=r==null?void 0:r.label),r!=null&&r.icon&&(b.icon=r==null?void 0:r.icon,!((L=r.label)!=null&&L.trim())&&b.text===i&&(b.text="")),r!=null&&r.form&&(b.form=r==null?void 0:r.form),r!=null&&r.pos&&(b.pos=r==null?void 0:r.pos),r!=null&&r.img&&(b.img=r==null?void 0:r.img,!((C=r.label)!=null&&C.trim())&&b.text===i&&(b.text="")),r!=null&&r.constraint&&(b.constraint=r.constraint),r.w&&(b.assetWidth=Number(r.w)),r.h&&(b.assetHeight=Number(r.h))}}addSingleLink(i,a,n,u){const c={start:i,end:a,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};t1.info("abc78 Got edge...",c);const A=n.text;if(A!==void 0&&(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"')&&(c.text=c.text.substring(1,c.text.length-1)),c.labelType=A.type),n!==void 0&&(c.type=n.type,c.stroke=n.stroke,c.length=n.length>10?10:n.length),u&&!this.edges.some(r=>r.id===u))c.id=u,c.isUserDefinedId=!0;else{const r=this.edges.filter(k=>k.start===c.start&&k.end===c.end);r.length===0?c.id=st(c.start,c.end,{counter:0,prefix:"L"}):c.id=st(c.start,c.end,{counter:r.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))t1.info("Pushing edge..."),this.edges.push(c);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,a,n){const u=this.isLinkData(n)?n.id.replace("@",""):void 0;t1.info("addLink",i,a,u);for(const o of i)for(const f of a){const c=o===i[i.length-1],A=f===a[0];c&&A?this.addSingleLink(o,f,n,u):this.addSingleLink(o,f,n,void 0)}}updateLinkInterpolate(i,a){i.forEach(n=>{n==="default"?this.edges.defaultInterpolate=a:this.edges[n].interpolate=a})}updateLink(i,a){i.forEach(n=>{var u,o,f,c,A,r;if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=a:(this.edges[n].style=a,(((o=(u=this.edges[n])==null?void 0:u.style)==null?void 0:o.length)??0)>0&&!((c=(f=this.edges[n])==null?void 0:f.style)!=null&&c.some(k=>k==null?void 0:k.startsWith("fill")))&&((r=(A=this.edges[n])==null?void 0:A.style)==null||r.push("fill:none")))})}addClass(i,a){const n=a.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(u=>{let o=this.classes.get(u);o===void 0&&(o={id:u,styles:[],textStyles:[]},this.classes.set(u,o)),n!=null&&n.forEach(f=>{if(/color/.exec(f)){const c=f.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(f)})})}setDirection(i){this.direction=i,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,a){for(const n of i.split(",")){const u=this.vertices.get(n);u&&u.classes.push(a);const o=this.edges.find(c=>c.id===n);o&&o.classes.push(a);const f=this.subGraphLookup.get(n);f&&f.classes.push(a)}}setTooltip(i,a){if(a!==void 0){a=this.sanitizeText(a);for(const n of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,a)}}setClickFun(i,a,n){const u=this.lookUpDomId(i);if(b1().securityLevel!=="loose"||a===void 0)return;let o=[];if(typeof n=="string"){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c{const c=document.querySelector(`[id="${u}"]`);c!==null&&c.addEventListener("click",()=>{it.runFunc(a,...o)},!1)}))}setLink(i,a,n){i.split(",").forEach(u=>{const o=this.vertices.get(u);o!==void 0&&(o.link=it.formatUrl(a,this.config),o.linkTarget=n)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,a,n){i.split(",").forEach(u=>{this.setClickFun(u,a,n)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(a=>{a(i)})}getDirection(){var i;return(i=this.direction)==null?void 0:i.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){let a=S1(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=S1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),S1(i).select("svg").selectAll("g.node").on("mouseover",o=>{var r;const f=S1(o.currentTarget);if(f.attr("title")===null)return;const A=(r=o.currentTarget)==null?void 0:r.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(f.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),a.html(a.html().replace(/<br\/>/g,"
")),f.classed("hover",!0)}).on("mouseout",o=>{a.transition().duration(500).style("opacity",0),S1(o.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=b1(),ne()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,a,n){let u=i.text.trim(),o=n.text;i===n&&/\s/.exec(n.text)&&(u=void 0);const c=m(b=>{const L={boolean:{},number:{},string:{}},C=[];let p;return{nodeList:b.filter(function(W){const Z=typeof W;return W.stmt&&W.stmt==="dir"?(p=W.value,!1):W.trim()===""?!1:Z in L?L[Z].hasOwnProperty(W)?!1:L[Z][W]=!0:C.includes(W)?!1:C.push(W)}),dir:p}},"uniq")(a.flat()),A=c.nodeList;let r=c.dir;const k=b1().flowchart??{};if(r=r??(k.inheritDir?this.getDirection()??b1().direction??void 0:void 0),this.version==="gen-1")for(let b=0;b2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=a,this.subGraphs[a].id===i)return{result:!0,count:0};let u=0,o=1;for(;u=0){const c=this.indexNodes2(i,f);if(c.result)return{result:!0,count:o+c.count};o=o+c.count}u=u+1}return{result:!1,count:o}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(i){let a=i.trim(),n="arrow_open";switch(a[0]){case"<":n="arrow_point",a=a.slice(1);break;case"x":n="arrow_cross",a=a.slice(1);break;case"o":n="arrow_circle",a=a.slice(1);break}let u="normal";return a.includes("=")&&(u="thick"),a.includes(".")&&(u="dotted"),{type:n,stroke:u}}countChar(i,a){const n=a.length;let u=0;for(let o=0;o":u="arrow_point",a.startsWith("<")&&(u="double_"+u,n=n.slice(1));break;case"o":u="arrow_circle",a.startsWith("o")&&(u="double_"+u,n=n.slice(1));break}let o="normal",f=n.length-1;n.startsWith("=")&&(o="thick"),n.startsWith("~")&&(o="invisible");const c=this.countChar(".",n);return c&&(o="dotted",f=c),{type:u,stroke:o,length:f}}destructLink(i,a){const n=this.destructEndLink(i);let u;if(a){if(u=this.destructStartLink(a),u.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(u.type==="arrow_open")u.type=n.type;else{if(u.type!==n.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return u.type==="double_arrow"&&(u.type="double_arrow_point"),u.length=n.length,u}return n}exists(i,a){for(const n of i)if(n.nodes.includes(a))return!0;return!1}makeUniq(i,a){const n=[];return i.nodes.forEach((u,o)=>{this.exists(a,u)||n.push(i.nodes[o])}),{nodes:n}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,a){return i.find(n=>n.id===a)}destructEdgeType(i){let a="none",n="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":n=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":a=i.replace("double_",""),n=a;break}return{arrowTypeStart:a,arrowTypeEnd:n}}addNodeFromVertex(i,a,n,u,o,f){var k;const c=n.get(i.id),A=u.get(i.id)??!1,r=this.findNode(a,i.id);if(r)r.cssStyles=i.styles,r.cssCompiledStyles=this.getCompiledStyles(i.classes),r.cssClasses=i.classes.join(" ");else{const E={id:i.id,label:i.text,labelStyle:"",parentId:c,padding:((k=o.flowchart)==null?void 0:k.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:f,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint};A?a.push({...E,isGroup:!0,shape:"rect"}):a.push({...E,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let a=[];for(const n of i){const u=this.classes.get(n);u!=null&&u.styles&&(a=[...a,...u.styles??[]].map(o=>o.trim())),u!=null&&u.textStyles&&(a=[...a,...u.textStyles??[]].map(o=>o.trim()))}return a}getData(){const i=b1(),a=[],n=[],u=this.getSubGraphs(),o=new Map,f=new Map;for(let r=u.length-1;r>=0;r--){const k=u[r];k.nodes.length>0&&f.set(k.id,!0);for(const E of k.nodes)o.set(E,k.id)}for(let r=u.length-1;r>=0;r--){const k=u[r];a.push({id:k.id,label:k.title,labelStyle:"",parentId:o.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssClasses:k.classes.join(" "),shape:"rect",dir:k.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(r=>{this.addNodeFromVertex(r,a,o,f,i,i.look||"classic")});const A=this.getEdges();return A.forEach((r,k)=>{var p;const{arrowTypeStart:E,arrowTypeEnd:b}=this.destructEdgeType(r.type),L=[...A.defaultStyle??[]];r.style&&L.push(...r.style);const C={id:st(r.start,r.end,{counter:k,prefix:"L"},r.id),isUserDefinedId:r.isUserDefinedId,start:r.start,end:r.end,type:r.type??"normal",label:r.text,labelpos:"c",thickness:r.stroke,minlen:r.length,classes:(r==null?void 0:r.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":E,arrowTypeEnd:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":b,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(r.classes),labelStyle:L,style:L,pattern:r.stroke,look:i.look,animate:r.animate,animation:r.animation,curve:r.interpolate||this.edges.defaultInterpolate||((p=i.flowchart)==null?void 0:p.curve)};n.push(C)}),{nodes:a,edges:n,other:{},config:i}}defaultConfig(){return ue.flowchart}},m(P1,"FlowDB"),P1),fe=m(function(s,i){return i.db.getClasses()},"getClasses"),ge=m(async function(s,i,a,n){var L;t1.info("REF0:"),t1.info("Drawing state diagram (v2)",i);const{securityLevel:u,flowchart:o,layout:f}=b1();let c;u==="sandbox"&&(c=S1("#i"+i));const A=u==="sandbox"?c.nodes()[0].contentDocument:document;t1.debug("Before getData: ");const r=n.db.getData();t1.debug("Data: ",r);const k=ce(i,u),E=n.db.getDirection();r.type=n.type,r.layoutAlgorithm=Ht(f),r.layoutAlgorithm==="dagre"&&f==="elk"&&t1.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),r.direction=E,r.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,r.rankSpacing=(o==null?void 0:o.rankSpacing)||50,r.markers=["point","circle","cross"],r.diagramId=i,t1.debug("REF1:",r),await Xt(r,k);const b=((L=r.config.flowchart)==null?void 0:L.diagramPadding)??8;it.insertTitle(k,"flowchartTitleText",(o==null?void 0:o.titleTopMargin)||0,n.db.getDiagramTitle()),he(k,b,"flowchart",(o==null?void 0:o.useMaxWidth)||!1);for(const C of r.nodes){const p=S1(`#${i} [id="${C.id}"]`);if(!p||!C.link)continue;const J=A.createElementNS("http://www.w3.org/2000/svg","a");J.setAttributeNS("http://www.w3.org/2000/svg","class",C.cssClasses),J.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?J.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):C.linkTarget&&J.setAttributeNS("http://www.w3.org/2000/svg","target",C.linkTarget);const W=p.insert(function(){return J},":first-child"),Z=p.select(".label-container");Z&&W.append(function(){return Z.node()});const A1=p.select(".label");A1&&W.append(function(){return A1.node()})}},"draw"),be={getClasses:fe,draw:ge},rt=function(){var s=m(function(g1,h,d,g){for(d=d||{},g=g1.length;g--;d[g1[g]]=h);return d},"o"),i=[1,4],a=[1,3],n=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],o=[2,2],f=[1,13],c=[1,14],A=[1,15],r=[1,16],k=[1,23],E=[1,25],b=[1,26],L=[1,27],C=[1,49],p=[1,48],J=[1,29],W=[1,30],Z=[1,31],A1=[1,32],M1=[1,33],V=[1,44],I=[1,46],w=[1,42],R=[1,47],N=[1,43],G=[1,50],P=[1,45],O=[1,51],M=[1,52],U1=[1,34],W1=[1,35],z1=[1,36],j1=[1,37],p1=[1,57],y=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],e1=[1,61],s1=[1,60],i1=[1,62],D1=[8,9,11,75,77,78],at=[1,78],x1=[1,91],T1=[1,96],E1=[1,95],y1=[1,92],F1=[1,88],_1=[1,94],B1=[1,90],v1=[1,97],L1=[1,93],V1=[1,98],I1=[1,89],k1=[8,9,10,11,40,75,77,78],z=[8,9,10,11,40,46,75,77,78],q=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],nt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],w1=[44,60,89,102,105,106,109,111,114,115,116],ut=[1,121],ot=[1,122],K1=[1,124],Y1=[1,123],lt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ct=[1,133],ht=[1,147],dt=[1,148],pt=[1,149],ft=[1,150],gt=[1,135],bt=[1,137],At=[1,141],kt=[1,142],mt=[1,143],Ct=[1,144],St=[1,145],Dt=[1,146],xt=[1,151],Tt=[1,152],Et=[1,131],yt=[1,132],Ft=[1,139],_t=[1,134],Bt=[1,138],vt=[1,136],Q1=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],Lt=[1,154],Vt=[1,156],B=[8,9,11],H=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],S=[1,176],j=[1,172],K=[1,173],D=[1,177],x=[1,174],T=[1,175],R1=[77,116,119],F=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],It=[10,106],f1=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],r1=[1,247],a1=[1,245],n1=[1,249],u1=[1,243],o1=[1,244],l1=[1,246],c1=[1,248],h1=[1,250],N1=[1,268],wt=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],J1={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:m(function(h,d,g,l,_,t,O1){var e=t.length-1;switch(_){case 2:this.$=[];break;case 3:(!Array.isArray(t[e])||t[e].length>0)&&t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 183:this.$=t[e];break;case 11:l.setDirection("TB"),this.$="TB";break;case 12:l.setDirection(t[e-1]),this.$=t[e-1];break;case 27:this.$=t[e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=l.addSubGraph(t[e-6],t[e-1],t[e-4]);break;case 34:this.$=l.addSubGraph(t[e-3],t[e-1],t[e-3]);break;case 35:this.$=l.addSubGraph(void 0,t[e-1],void 0);break;case 37:this.$=t[e].trim(),l.setAccTitle(this.$);break;case 38:case 39:this.$=t[e].trim(),l.setAccDescription(this.$);break;case 43:this.$=t[e-1]+t[e];break;case 44:this.$=t[e];break;case 45:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 46:l.addLink(t[e-2].stmt,t[e],t[e-1]),this.$={stmt:t[e],nodes:t[e].concat(t[e-2].nodes)};break;case 47:l.addLink(t[e-3].stmt,t[e-1],t[e-2]),this.$={stmt:t[e-1],nodes:t[e-1].concat(t[e-3].nodes)};break;case 48:this.$={stmt:t[e-1],nodes:t[e-1]};break;case 49:l.addVertex(t[e-1][t[e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e]),this.$={stmt:t[e-1],nodes:t[e-1],shapeData:t[e]};break;case 50:this.$={stmt:t[e],nodes:t[e]};break;case 51:this.$=[t[e]];break;case 52:l.addVertex(t[e-5][t[e-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,t[e-4]),this.$=t[e-5].concat(t[e]);break;case 53:this.$=t[e-4].concat(t[e]);break;case 54:this.$=t[e];break;case 55:this.$=t[e-2],l.setClass(t[e-2],t[e]);break;case 56:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"square");break;case 57:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"doublecircle");break;case 58:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"circle");break;case 59:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"ellipse");break;case 60:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"stadium");break;case 61:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"subroutine");break;case 62:this.$=t[e-7],l.addVertex(t[e-7],t[e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[e-5],t[e-3]]]));break;case 63:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"cylinder");break;case 64:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"round");break;case 65:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"diamond");break;case 66:this.$=t[e-5],l.addVertex(t[e-5],t[e-2],"hexagon");break;case 67:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"odd");break;case 68:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"trapezoid");break;case 69:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"inv_trapezoid");break;case 70:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_right");break;case 71:this.$=t[e-3],l.addVertex(t[e-3],t[e-1],"lean_left");break;case 72:this.$=t[e],l.addVertex(t[e]);break;case 73:t[e-1].text=t[e],this.$=t[e-1];break;case 74:case 75:t[e-2].text=t[e-1],this.$=t[e-2];break;case 76:this.$=t[e];break;case 77:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1]};break;case 78:var v=l.destructLink(t[e],t[e-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:t[e-1],id:t[e-3]};break;case 79:this.$={text:t[e],type:"text"};break;case 80:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 81:this.$={text:t[e],type:"string"};break;case 82:this.$={text:t[e],type:"markdown"};break;case 83:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length};break;case 84:var v=l.destructLink(t[e]);this.$={type:v.type,stroke:v.stroke,length:v.length,id:t[e-1]};break;case 85:this.$=t[e-1];break;case 86:this.$={text:t[e],type:"text"};break;case 87:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 88:this.$={text:t[e],type:"string"};break;case 89:case 104:this.$={text:t[e],type:"markdown"};break;case 101:this.$={text:t[e],type:"text"};break;case 102:this.$={text:t[e-1].text+""+t[e],type:t[e-1].type};break;case 103:this.$={text:t[e],type:"text"};break;case 105:this.$=t[e-4],l.addClass(t[e-2],t[e]);break;case 106:this.$=t[e-4],l.setClass(t[e-2],t[e]);break;case 107:case 115:this.$=t[e-1],l.setClickEvent(t[e-1],t[e]);break;case 108:case 116:this.$=t[e-3],l.setClickEvent(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 109:this.$=t[e-2],l.setClickEvent(t[e-2],t[e-1],t[e]);break;case 110:this.$=t[e-4],l.setClickEvent(t[e-4],t[e-3],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 111:this.$=t[e-2],l.setLink(t[e-2],t[e]);break;case 112:this.$=t[e-4],l.setLink(t[e-4],t[e-2]),l.setTooltip(t[e-4],t[e]);break;case 113:this.$=t[e-4],l.setLink(t[e-4],t[e-2],t[e]);break;case 114:this.$=t[e-6],l.setLink(t[e-6],t[e-4],t[e]),l.setTooltip(t[e-6],t[e-2]);break;case 117:this.$=t[e-1],l.setLink(t[e-1],t[e]);break;case 118:this.$=t[e-3],l.setLink(t[e-3],t[e-2]),l.setTooltip(t[e-3],t[e]);break;case 119:this.$=t[e-3],l.setLink(t[e-3],t[e-2],t[e]);break;case 120:this.$=t[e-5],l.setLink(t[e-5],t[e-4],t[e]),l.setTooltip(t[e-5],t[e-2]);break;case 121:this.$=t[e-4],l.addVertex(t[e-2],void 0,void 0,t[e]);break;case 122:this.$=t[e-4],l.updateLink([t[e-2]],t[e]);break;case 123:this.$=t[e-4],l.updateLink(t[e-2],t[e]);break;case 124:this.$=t[e-8],l.updateLinkInterpolate([t[e-6]],t[e-2]),l.updateLink([t[e-6]],t[e]);break;case 125:this.$=t[e-8],l.updateLinkInterpolate(t[e-6],t[e-2]),l.updateLink(t[e-6],t[e]);break;case 126:this.$=t[e-6],l.updateLinkInterpolate([t[e-4]],t[e]);break;case 127:this.$=t[e-6],l.updateLinkInterpolate(t[e-4],t[e]);break;case 128:case 130:this.$=[t[e]];break;case 129:case 131:t[e-2].push(t[e]),this.$=t[e-2];break;case 133:this.$=t[e-1]+t[e];break;case 181:this.$=t[e];break;case 182:this.$=t[e-1]+""+t[e];break;case 184:this.$=t[e-1]+""+t[e];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:a,12:n},{1:[3]},s(u,o,{5:6}),{4:7,9:i,10:a,12:n},{4:8,9:i,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,33:24,34:E,36:b,38:L,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:A1,88:M1,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:U1,122:W1,123:z1,124:j1},s(u,[2,9]),s(u,[2,10]),s(u,[2,11]),{8:[1,54],9:[1,55],10:p1,15:53,18:56},s(y,[2,3]),s(y,[2,4]),s(y,[2,5]),s(y,[2,6]),s(y,[2,7]),s(y,[2,8]),{8:e1,9:s1,11:i1,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:e1,9:s1,11:i1,21:67},{8:e1,9:s1,11:i1,21:68},{8:e1,9:s1,11:i1,21:69},{8:e1,9:s1,11:i1,21:70},{8:e1,9:s1,11:i1,21:71},{8:e1,9:s1,10:[1,72],11:i1,21:73},s(y,[2,36]),{35:[1,74]},{37:[1,75]},s(y,[2,39]),s(D1,[2,50],{18:76,39:77,10:p1,40:at}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:x1,44:T1,60:E1,80:[1,86],89:y1,95:[1,83],97:[1,84],101:85,105:F1,106:_1,109:B1,111:v1,114:L1,115:V1,116:I1,120:87},s(y,[2,185]),s(y,[2,186]),s(y,[2,187]),s(y,[2,188]),s(k1,[2,51]),s(k1,[2,54],{46:[1,99]}),s(z,[2,72],{113:112,29:[1,100],44:C,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:p,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:V,102:I,105:w,106:R,109:N,111:G,114:P,115:O,116:M}),s(q,[2,181]),s(q,[2,142]),s(q,[2,143]),s(q,[2,144]),s(q,[2,145]),s(q,[2,146]),s(q,[2,147]),s(q,[2,148]),s(q,[2,149]),s(q,[2,150]),s(q,[2,151]),s(q,[2,152]),s(u,[2,12]),s(u,[2,18]),s(u,[2,19]),{9:[1,113]},s(nt,[2,26],{18:114,10:p1}),s(y,[2,27]),{42:115,43:38,44:C,45:39,47:40,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(y,[2,40]),s(y,[2,41]),s(y,[2,42]),s(w1,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:ut,81:ot,116:K1,119:Y1},{75:[1,125],77:[1,126]},s(lt,[2,83]),s(y,[2,28]),s(y,[2,29]),s(y,[2,30]),s(y,[2,31]),s(y,[2,32]),{10:ct,12:ht,14:dt,27:pt,28:127,32:ft,44:gt,60:bt,75:At,80:[1,129],81:[1,130],83:140,84:kt,85:mt,86:Ct,87:St,88:Dt,89:xt,90:Tt,91:128,105:Et,109:yt,111:Ft,114:_t,115:Bt,116:vt},s(Q1,o,{5:153}),s(y,[2,37]),s(y,[2,38]),s(D1,[2,48],{44:Lt}),s(D1,[2,49],{18:155,10:p1,40:Vt}),s(k1,[2,44]),{44:C,47:157,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{102:[1,158],103:159,105:[1,160]},{44:C,47:161,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{44:C,47:162,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(B,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},s(B,[2,115],{120:167,10:[1,166],14:x1,44:T1,60:E1,89:y1,105:F1,106:_1,109:B1,111:v1,114:L1,115:V1,116:I1}),s(B,[2,117],{10:[1,168]}),s(H,[2,183]),s(H,[2,170]),s(H,[2,171]),s(H,[2,172]),s(H,[2,173]),s(H,[2,174]),s(H,[2,175]),s(H,[2,176]),s(H,[2,177]),s(H,[2,178]),s(H,[2,179]),s(H,[2,180]),{44:C,47:169,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{30:170,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:178,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:180,50:[1,179],67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:181,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:182,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:183,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{109:[1,184]},{30:185,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:186,65:[1,187],67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:188,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:189,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:190,67:S,80:j,81:K,82:171,116:D,117:x,118:T},s(q,[2,182]),s(u,[2,20]),s(nt,[2,25]),s(D1,[2,46],{39:191,18:192,10:p1,40:at}),s(w1,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{77:[1,196],79:197,116:K1,119:Y1},s(R1,[2,79]),s(R1,[2,81]),s(R1,[2,82]),s(R1,[2,168]),s(R1,[2,169]),{76:198,79:120,80:ut,81:ot,116:K1,119:Y1},s(lt,[2,84]),{8:e1,9:s1,10:ct,11:i1,12:ht,14:dt,21:200,27:pt,29:[1,199],32:ft,44:gt,60:bt,75:At,83:140,84:kt,85:mt,86:Ct,87:St,88:Dt,89:xt,90:Tt,91:201,105:Et,109:yt,111:Ft,114:_t,115:Bt,116:vt},s(F,[2,101]),s(F,[2,103]),s(F,[2,104]),s(F,[2,157]),s(F,[2,158]),s(F,[2,159]),s(F,[2,160]),s(F,[2,161]),s(F,[2,162]),s(F,[2,163]),s(F,[2,164]),s(F,[2,165]),s(F,[2,166]),s(F,[2,167]),s(F,[2,90]),s(F,[2,91]),s(F,[2,92]),s(F,[2,93]),s(F,[2,94]),s(F,[2,95]),s(F,[2,96]),s(F,[2,97]),s(F,[2,98]),s(F,[2,99]),s(F,[2,100]),{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,32:[1,202],33:24,34:E,36:b,38:L,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:A1,88:M1,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:U1,122:W1,123:z1,124:j1},{10:p1,18:203},{44:[1,204]},s(k1,[2,43]),{10:[1,205],44:C,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:112,114:P,115:O,116:M},{10:[1,206]},{10:[1,207],106:[1,208]},s(It,[2,128]),{10:[1,209],44:C,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:112,114:P,115:O,116:M},{10:[1,210],44:C,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:112,114:P,115:O,116:M},{80:[1,211]},s(B,[2,109],{10:[1,212]}),s(B,[2,111],{10:[1,213]}),{80:[1,214]},s(H,[2,184]),{80:[1,215],98:[1,216]},s(k1,[2,55],{113:112,44:C,60:p,89:V,102:I,105:w,106:R,109:N,111:G,114:P,115:O,116:M}),{31:[1,217],67:S,82:218,116:D,117:x,118:T},s(f1,[2,86]),s(f1,[2,88]),s(f1,[2,89]),s(f1,[2,153]),s(f1,[2,154]),s(f1,[2,155]),s(f1,[2,156]),{49:[1,219],67:S,82:218,116:D,117:x,118:T},{30:220,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{51:[1,221],67:S,82:218,116:D,117:x,118:T},{53:[1,222],67:S,82:218,116:D,117:x,118:T},{55:[1,223],67:S,82:218,116:D,117:x,118:T},{57:[1,224],67:S,82:218,116:D,117:x,118:T},{60:[1,225]},{64:[1,226],67:S,82:218,116:D,117:x,118:T},{66:[1,227],67:S,82:218,116:D,117:x,118:T},{30:228,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{31:[1,229],67:S,82:218,116:D,117:x,118:T},{67:S,69:[1,230],71:[1,231],82:218,116:D,117:x,118:T},{67:S,69:[1,233],71:[1,232],82:218,116:D,117:x,118:T},s(D1,[2,45],{18:155,10:p1,40:Vt}),s(D1,[2,47],{44:Lt}),s(w1,[2,75]),s(w1,[2,74]),{62:[1,234],67:S,82:218,116:D,117:x,118:T},s(w1,[2,77]),s(R1,[2,80]),{77:[1,235],79:197,116:K1,119:Y1},{30:236,67:S,80:j,81:K,82:171,116:D,117:x,118:T},s(Q1,o,{5:237}),s(F,[2,102]),s(y,[2,35]),{43:238,44:C,45:39,47:40,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{10:p1,18:239},{10:r1,60:a1,84:n1,92:240,105:u1,107:241,108:242,109:o1,110:l1,111:c1,112:h1},{10:r1,60:a1,84:n1,92:251,104:[1,252],105:u1,107:241,108:242,109:o1,110:l1,111:c1,112:h1},{10:r1,60:a1,84:n1,92:253,104:[1,254],105:u1,107:241,108:242,109:o1,110:l1,111:c1,112:h1},{105:[1,255]},{10:r1,60:a1,84:n1,92:256,105:u1,107:241,108:242,109:o1,110:l1,111:c1,112:h1},{44:C,47:257,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(B,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},s(B,[2,116]),s(B,[2,118],{10:[1,261]}),s(B,[2,119]),s(z,[2,56]),s(f1,[2,87]),s(z,[2,57]),{51:[1,262],67:S,82:218,116:D,117:x,118:T},s(z,[2,64]),s(z,[2,59]),s(z,[2,60]),s(z,[2,61]),{109:[1,263]},s(z,[2,63]),s(z,[2,65]),{66:[1,264],67:S,82:218,116:D,117:x,118:T},s(z,[2,67]),s(z,[2,68]),s(z,[2,70]),s(z,[2,69]),s(z,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(w1,[2,78]),{31:[1,265],67:S,82:218,116:D,117:x,118:T},{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,32:[1,266],33:24,34:E,36:b,38:L,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:A1,88:M1,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:U1,122:W1,123:z1,124:j1},s(k1,[2,53]),{43:267,44:C,45:39,47:40,60:p,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(B,[2,121],{106:N1}),s(wt,[2,130],{108:269,10:r1,60:a1,84:n1,105:u1,109:o1,110:l1,111:c1,112:h1}),s($,[2,132]),s($,[2,134]),s($,[2,135]),s($,[2,136]),s($,[2,137]),s($,[2,138]),s($,[2,139]),s($,[2,140]),s($,[2,141]),s(B,[2,122],{106:N1}),{10:[1,270]},s(B,[2,123],{106:N1}),{10:[1,271]},s(It,[2,129]),s(B,[2,105],{106:N1}),s(B,[2,106],{113:112,44:C,60:p,89:V,102:I,105:w,106:R,109:N,111:G,114:P,115:O,116:M}),s(B,[2,110]),s(B,[2,112],{10:[1,272]}),s(B,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:e1,9:s1,11:i1,21:277},s(y,[2,34]),s(k1,[2,52]),{10:r1,60:a1,84:n1,105:u1,107:278,108:242,109:o1,110:l1,111:c1,112:h1},s($,[2,133]),{14:x1,44:T1,60:E1,89:y1,101:279,105:F1,106:_1,109:B1,111:v1,114:L1,115:V1,116:I1,120:87},{14:x1,44:T1,60:E1,89:y1,101:280,105:F1,106:_1,109:B1,111:v1,114:L1,115:V1,116:I1,120:87},{98:[1,281]},s(B,[2,120]),s(z,[2,58]),{30:282,67:S,80:j,81:K,82:171,116:D,117:x,118:T},s(z,[2,66]),s(Q1,o,{5:283}),s(wt,[2,131],{108:269,10:r1,60:a1,84:n1,105:u1,109:o1,110:l1,111:c1,112:h1}),s(B,[2,126],{120:167,10:[1,284],14:x1,44:T1,60:E1,89:y1,105:F1,106:_1,109:B1,111:v1,114:L1,115:V1,116:I1}),s(B,[2,127],{120:167,10:[1,285],14:x1,44:T1,60:E1,89:y1,105:F1,106:_1,109:B1,111:v1,114:L1,115:V1,116:I1}),s(B,[2,114]),{31:[1,286],67:S,82:218,116:D,117:x,118:T},{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,32:[1,287],33:24,34:E,36:b,38:L,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:A1,88:M1,89:V,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:U1,122:W1,123:z1,124:j1},{10:r1,60:a1,84:n1,92:288,105:u1,107:241,108:242,109:o1,110:l1,111:c1,112:h1},{10:r1,60:a1,84:n1,92:289,105:u1,107:241,108:242,109:o1,110:l1,111:c1,112:h1},s(z,[2,62]),s(y,[2,33]),s(B,[2,124],{106:N1}),s(B,[2,125],{106:N1})],defaultActions:{},parseError:m(function(h,d){if(d.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=d,g}},"parseError"),parse:m(function(h){var d=this,g=[0],l=[],_=[null],t=[],O1=this.table,e="",v=0,Rt=0,zt=2,Nt=1,jt=t.slice.call(arguments,1),U=Object.create(this.lexer),m1={yy:{}};for(var Z1 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z1)&&(m1.yy[Z1]=this.yy[Z1]);U.setInput(h,m1.yy),m1.yy.lexer=U,m1.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var $1=U.yylloc;t.push($1);var Kt=U.options&&U.options.ranges;typeof m1.yy.parseError=="function"?this.parseError=m1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Yt(X){g.length=g.length-2*X,_.length=_.length-X,t.length=t.length-X}m(Yt,"popStack");function Gt(){var X;return X=l.pop()||U.lex()||Nt,typeof X!="number"&&(X instanceof Array&&(l=X,X=l.pop()),X=d.symbols_[X]||X),X}m(Gt,"lex");for(var Y,C1,Q,tt,G1={},H1,d1,Pt,X1;;){if(C1=g[g.length-1],this.defaultActions[C1]?Q=this.defaultActions[C1]:((Y===null||typeof Y>"u")&&(Y=Gt()),Q=O1[C1]&&O1[C1][Y]),typeof Q>"u"||!Q.length||!Q[0]){var et="";X1=[];for(H1 in O1[C1])this.terminals_[H1]&&H1>zt&&X1.push("'"+this.terminals_[H1]+"'");U.showPosition?et="Parse error on line "+(v+1)+`: +`+U.showPosition()+` +Expecting `+X1.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":et="Parse error on line "+(v+1)+": Unexpected "+(Y==Nt?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(et,{text:U.match,token:this.terminals_[Y]||Y,line:U.yylineno,loc:$1,expected:X1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C1+", token: "+Y);switch(Q[0]){case 1:g.push(Y),_.push(U.yytext),t.push(U.yylloc),g.push(Q[1]),Y=null,Rt=U.yyleng,e=U.yytext,v=U.yylineno,$1=U.yylloc;break;case 2:if(d1=this.productions_[Q[1]][1],G1.$=_[_.length-d1],G1._$={first_line:t[t.length-(d1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(d1||1)].first_column,last_column:t[t.length-1].last_column},Kt&&(G1._$.range=[t[t.length-(d1||1)].range[0],t[t.length-1].range[1]]),tt=this.performAction.apply(G1,[e,Rt,v,m1.yy,Q[1],_,t].concat(jt)),typeof tt<"u")return tt;d1&&(g=g.slice(0,-1*d1*2),_=_.slice(0,-1*d1),t=t.slice(0,-1*d1)),g.push(this.productions_[Q[1]][0]),_.push(G1.$),t.push(G1._$),Pt=O1[g[g.length-2]][g[g.length-1]],g.push(Pt);break;case 3:return!0}}return!0},"parse")},Wt=function(){var g1={EOF:1,parseError:m(function(d,g){if(this.yy.parser)this.yy.parser.parseError(d,g);else throw new Error(d)},"parseError"),setInput:m(function(h,d){return this.yy=d||this.yy||{},this._input=h,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:m(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var d=h.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:m(function(h){var d=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=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),g.length-1&&(this.yylineno-=g.length-1);var _=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:g?(g.length===l.length?this.yylloc.first_column:0)+l[l.length-g.length].length-g[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(h){this.unput(this.match.slice(h))},"less"),pastInput:m(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var h=this.pastInput(),d=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:m(function(h,d){var g,l,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),l=h[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var t in _)this[t]=_[t];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,d,g,l;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),t=0;t<_.length;t++)if(g=this._input.match(this.rules[_[t]]),g&&(!d||g[0].length>d[0].length)){if(d=g,l=t,this.options.backtrack_lexer){if(h=this.test_match(g,_[t]),h!==!1)return h;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(h=this.test_match(d,_[l]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var d=this.next();return d||this.lex()},"lex"),begin:m(function(d){this.conditionStack.push(d)},"begin"),popState:m(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(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:m(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:m(function(d){this.begin(d)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:m(function(d,g,l,_){switch(l){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;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 this.pushState("shapeData"),g.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return g.yytext=g.yytext.replace(t,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return d.lex.firstGraph()&&this.begin("dir"),12;case 36:return d.lex.firstGraph()&&this.begin("dir"),12;case 37:return d.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return g1}();J1.lexer=Wt;function q1(){this.yy={}}return m(q1,"Parser"),q1.prototype=J1,J1.Parser=q1,new q1}();rt.parser=rt;var Mt=rt,Ut=Object.assign({},Mt);Ut.parse=s=>{const i=s.replace(/}\s*\n/g,`} +`);return Mt.parse(i)};var Ae=Ut,ke=m((s,i)=>{const a=oe,n=a(s,"r"),u=a(s,"g"),o=a(s,"b");return le(n,u,o,i)},"fade"),me=m(s=>`.label { + font-family: ${s.fontFamily}; + color: ${s.nodeTextColor||s.textColor}; + } + .cluster-label text { + fill: ${s.titleColor}; + } + .cluster-label span { + color: ${s.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${s.nodeTextColor||s.textColor}; + color: ${s.nodeTextColor||s.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${s.lineColor} !important; + stroke-width: 0; + stroke: ${s.lineColor}; + } + + .arrowheadPath { + fill: ${s.arrowheadColor}; + } + + .edgePath .path { + stroke: ${s.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${s.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${ke(s.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${s.clusterBkg}; + stroke: ${s.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${s.titleColor}; + } + + .cluster span { + color: ${s.titleColor}; + } + /* .cluster div { + color: ${s.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${s.fontFamily}; + font-size: 12px; + background: ${s.tertiaryColor}; + border: 1px solid ${s.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${s.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; + } + ${qt()} +`,"getStyles"),Ce=me,ve={parser:Ae,get db(){return new pe},renderer:be,styles:Ce,init:m(s=>{s.flowchart||(s.flowchart={}),s.layout&&Ot({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Ot({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{ve as diagram}; diff --git a/lightrag/api/webui/assets/ganttDiagram-APWFNJXF-GWTNv7FR.js b/lightrag/api/webui/assets/ganttDiagram-APWFNJXF-GWTNv7FR.js deleted file mode 100644 index 3296abdd..00000000 --- a/lightrag/api/webui/assets/ganttDiagram-APWFNJXF-GWTNv7FR.js +++ /dev/null @@ -1,257 +0,0 @@ -import{_ as c,g as ut,s as dt,t as ft,q as ht,a as kt,b as mt,c as ce,d as ge,ay as yt,az as gt,aA as pt,e as vt,R as xt,aB as Tt,aC as X,l as we,aD as bt,aE as qe,aF as Ge,aG as wt,aH as _t,aI as Dt,aJ as Ct,aK as Et,aL as St,aM as Mt,aN as He,aO as Xe,aP as je,aQ as Ue,aR as Ze,aS as It,k as At,j as Ft,z as Lt,u as Yt}from"./mermaid-vendor-D0f_SE0h.js";import{g as Ae}from"./react-vendor-DEwriMA6.js";import"./feature-graph-NODQb6qW.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";var pe={exports:{}},Wt=pe.exports,Qe;function Ot(){return Qe||(Qe=1,function(e,s){(function(n,a){e.exports=a()})(Wt,function(){var n="day";return function(a,i,k){var f=function(S){return S.add(4-S.isoWeekday(),n)},_=i.prototype;_.isoWeekYear=function(){return f(this).year()},_.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var g,M,P,V,B=f(this),E=(g=this.isoWeekYear(),M=this.$u,P=(M?k.utc:k)().year(g).startOf("year"),V=4-P.isoWeekday(),P.isoWeekday()>4&&(V+=7),P.add(V,n));return B.diff(E,"week")+1},_.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var Y=_.startOf;_.startOf=function(S,g){var M=this.$utils(),P=!!M.u(g)||g;return M.p(S)==="isoweek"?P?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(S,g)}}})}(pe)),pe.exports}var Pt=Ot();const Vt=Ae(Pt);var ve={exports:{}},zt=ve.exports,$e;function Rt(){return $e||($e=1,function(e,s){(function(n,a){e.exports=a()})(zt,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,k=/\d\d/,f=/\d\d?/,_=/\d*[^-_:/,()\s\d]+/,Y={},S=function(p){return(p=+p)+(p>68?1900:2e3)},g=function(p){return function(C){this[p]=+C}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var F=C.match(/([+-]|\d\d)/g),L=60*F[1]+(+F[2]||0);return L===0?0:F[0]==="+"?-L:L}(p)}],P=function(p){var C=Y[p];return C&&(C.indexOf?C:C.s.concat(C.f))},V=function(p,C){var F,L=Y.meridiem;if(L){for(var G=1;G<=24;G+=1)if(p.indexOf(L(G,0,C))>-1){F=G>12;break}}else F=p===(C?"pm":"PM");return F},B={A:[_,function(p){this.afternoon=V(p,!1)}],a:[_,function(p){this.afternoon=V(p,!0)}],Q:[i,function(p){this.month=3*(p-1)+1}],S:[i,function(p){this.milliseconds=100*+p}],SS:[k,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[f,g("seconds")],ss:[f,g("seconds")],m:[f,g("minutes")],mm:[f,g("minutes")],H:[f,g("hours")],h:[f,g("hours")],HH:[f,g("hours")],hh:[f,g("hours")],D:[f,g("day")],DD:[k,g("day")],Do:[_,function(p){var C=Y.ordinal,F=p.match(/\d+/);if(this.day=F[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===p&&(this.day=L)}],w:[f,g("week")],ww:[k,g("week")],M:[f,g("month")],MM:[k,g("month")],MMM:[_,function(p){var C=P("months"),F=(P("monthsShort")||C.map(function(L){return L.slice(0,3)})).indexOf(p)+1;if(F<1)throw new Error;this.month=F%12||F}],MMMM:[_,function(p){var C=P("months").indexOf(p)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,g("year")],YY:[k,function(p){this.year=S(p)}],YYYY:[/\d{4}/,g("year")],Z:M,ZZ:M};function E(p){var C,F;C=p,F=Y&&Y.formats;for(var L=(p=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(T,b,m){var w=m&&m.toUpperCase();return b||F[m]||n[m]||F[w].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(o,l,h){return l||h.slice(1)})})).match(a),G=L.length,H=0;H-1)return new Date((v==="X"?1e3:1)*d);var t=E(v)(d),I=t.year,D=t.month,A=t.day,N=t.hours,W=t.minutes,O=t.seconds,$=t.milliseconds,ae=t.zone,ie=t.week,de=new Date,fe=A||(I||D?1:de.getDate()),oe=I||de.getFullYear(),z=0;I&&!D||(z=D>0?D-1:de.getMonth());var Z,q=N||0,se=W||0,K=O||0,re=$||0;return ae?new Date(Date.UTC(oe,z,fe,q,se,K,re+60*ae.offset*1e3)):r?new Date(Date.UTC(oe,z,fe,q,se,K,re)):(Z=new Date(oe,z,fe,q,se,K,re),ie&&(Z=u(Z).week(ie).toDate()),Z)}catch{return new Date("")}}(Q,x,j,F),this.init(),w&&w!==!0&&(this.$L=this.locale(w).$L),m&&Q!=this.format(x)&&(this.$d=new Date("")),Y={}}else if(x instanceof Array)for(var o=x.length,l=1;l<=o;l+=1){y[1]=x[l-1];var h=F.apply(this,y);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}l===o&&(this.$d=new Date(""))}else G.call(this,H)}}})}(ve)),ve.exports}var Nt=Rt();const Bt=Ae(Nt);var xe={exports:{}},qt=xe.exports,Ke;function Gt(){return Ke||(Ke=1,function(e,s){(function(n,a){e.exports=a()})(qt,function(){return function(n,a){var i=a.prototype,k=i.format;i.format=function(f){var _=this,Y=this.$locale();if(!this.isValid())return k.bind(this)(f);var S=this.$utils(),g=(f||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(M){switch(M){case"Q":return Math.ceil((_.$M+1)/3);case"Do":return Y.ordinal(_.$D);case"gggg":return _.weekYear();case"GGGG":return _.isoWeekYear();case"wo":return Y.ordinal(_.week(),"W");case"w":case"ww":return S.s(_.week(),M==="w"?1:2,"0");case"W":case"WW":return S.s(_.isoWeek(),M==="W"?1:2,"0");case"k":case"kk":return S.s(String(_.$H===0?24:_.$H),M==="k"?1:2,"0");case"X":return Math.floor(_.$d.getTime()/1e3);case"x":return _.$d.getTime();case"z":return"["+_.offsetName()+"]";case"zzz":return"["+_.offsetName("long")+"]";default:return M}});return k.bind(this)(g)}}})}(xe)),xe.exports}var Ht=Gt();const Xt=Ae(Ht);var Ee=function(){var e=c(function(w,o,l,h){for(l=l||{},h=w.length;h--;l[w[h]]=o);return l},"o"),s=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],a=[1,27],i=[1,28],k=[1,29],f=[1,30],_=[1,31],Y=[1,32],S=[1,33],g=[1,34],M=[1,9],P=[1,10],V=[1,11],B=[1,12],E=[1,13],p=[1,14],C=[1,15],F=[1,16],L=[1,19],G=[1,20],H=[1,21],Q=[1,22],j=[1,23],y=[1,25],x=[1,35],T={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(o,l,h,d,v,r,u){var t=r.length-1;switch(v){case 1:return r[t-1];case 2:this.$=[];break;case 3:r[t-1].push(r[t]),this.$=r[t-1];break;case 4:case 5:this.$=r[t];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(r[t].substr(11)),this.$=r[t].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=r[t].substr(18);break;case 19:d.TopAxis(),this.$=r[t].substr(8);break;case 20:d.setAxisFormat(r[t].substr(11)),this.$=r[t].substr(11);break;case 21:d.setTickInterval(r[t].substr(13)),this.$=r[t].substr(13);break;case 22:d.setExcludes(r[t].substr(9)),this.$=r[t].substr(9);break;case 23:d.setIncludes(r[t].substr(9)),this.$=r[t].substr(9);break;case 24:d.setTodayMarker(r[t].substr(12)),this.$=r[t].substr(12);break;case 27:d.setDiagramTitle(r[t].substr(6)),this.$=r[t].substr(6);break;case 28:this.$=r[t].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=r[t].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(r[t].substr(8)),this.$=r[t].substr(8);break;case 33:d.addTask(r[t-1],r[t]),this.$="task";break;case 34:this.$=r[t-1],d.setClickEvent(r[t-1],r[t],null);break;case 35:this.$=r[t-2],d.setClickEvent(r[t-2],r[t-1],r[t]);break;case 36:this.$=r[t-2],d.setClickEvent(r[t-2],r[t-1],null),d.setLink(r[t-2],r[t]);break;case 37:this.$=r[t-3],d.setClickEvent(r[t-3],r[t-2],r[t-1]),d.setLink(r[t-3],r[t]);break;case 38:this.$=r[t-2],d.setClickEvent(r[t-2],r[t],null),d.setLink(r[t-2],r[t-1]);break;case 39:this.$=r[t-3],d.setClickEvent(r[t-3],r[t-1],r[t]),d.setLink(r[t-3],r[t-2]);break;case 40:this.$=r[t-1],d.setLink(r[t-1],r[t]);break;case 41:case 47:this.$=r[t-1]+" "+r[t];break;case 42:case 43:case 45:this.$=r[t-2]+" "+r[t-1]+" "+r[t];break;case 44:case 46:this.$=r[t-3]+" "+r[t-2]+" "+r[t-1]+" "+r[t];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(s,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:a,14:i,15:k,16:f,17:_,18:Y,19:18,20:S,21:g,22:M,23:P,24:V,25:B,26:E,27:p,28:C,29:F,30:L,31:G,33:H,35:Q,36:j,37:24,38:y,40:x},e(s,[2,7],{1:[2,1]}),e(s,[2,3]),{9:36,11:17,12:n,13:a,14:i,15:k,16:f,17:_,18:Y,19:18,20:S,21:g,22:M,23:P,24:V,25:B,26:E,27:p,28:C,29:F,30:L,31:G,33:H,35:Q,36:j,37:24,38:y,40:x},e(s,[2,5]),e(s,[2,6]),e(s,[2,17]),e(s,[2,18]),e(s,[2,19]),e(s,[2,20]),e(s,[2,21]),e(s,[2,22]),e(s,[2,23]),e(s,[2,24]),e(s,[2,25]),e(s,[2,26]),e(s,[2,27]),{32:[1,37]},{34:[1,38]},e(s,[2,30]),e(s,[2,31]),e(s,[2,32]),{39:[1,39]},e(s,[2,8]),e(s,[2,9]),e(s,[2,10]),e(s,[2,11]),e(s,[2,12]),e(s,[2,13]),e(s,[2,14]),e(s,[2,15]),e(s,[2,16]),{41:[1,40],43:[1,41]},e(s,[2,4]),e(s,[2,28]),e(s,[2,29]),e(s,[2,33]),e(s,[2,34],{42:[1,42],43:[1,43]}),e(s,[2,40],{41:[1,44]}),e(s,[2,35],{43:[1,45]}),e(s,[2,36]),e(s,[2,38],{42:[1,46]}),e(s,[2,37]),e(s,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:c(function(o){var l=this,h=[0],d=[],v=[null],r=[],u=this.table,t="",I=0,D=0,A=2,N=1,W=r.slice.call(arguments,1),O=Object.create(this.lexer),$={yy:{}};for(var ae in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ae)&&($.yy[ae]=this.yy[ae]);O.setInput(o,$.yy),$.yy.lexer=O,$.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var ie=O.yylloc;r.push(ie);var de=O.options&&O.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fe(U){h.length=h.length-2*U,v.length=v.length-U,r.length=r.length-U}c(fe,"popStack");function oe(){var U;return U=d.pop()||O.lex()||N,typeof U!="number"&&(U instanceof Array&&(d=U,U=d.pop()),U=l.symbols_[U]||U),U}c(oe,"lex");for(var z,Z,q,se,K={},re,J,Be,ye;;){if(Z=h[h.length-1],this.defaultActions[Z]?q=this.defaultActions[Z]:((z===null||typeof z>"u")&&(z=oe()),q=u[Z]&&u[Z][z]),typeof q>"u"||!q.length||!q[0]){var Ce="";ye=[];for(re in u[Z])this.terminals_[re]&&re>A&&ye.push("'"+this.terminals_[re]+"'");O.showPosition?Ce="Parse error on line "+(I+1)+`: -`+O.showPosition()+` -Expecting `+ye.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Ce="Parse error on line "+(I+1)+": Unexpected "+(z==N?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(Ce,{text:O.match,token:this.terminals_[z]||z,line:O.yylineno,loc:ie,expected:ye})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+z);switch(q[0]){case 1:h.push(z),v.push(O.yytext),r.push(O.yylloc),h.push(q[1]),z=null,D=O.yyleng,t=O.yytext,I=O.yylineno,ie=O.yylloc;break;case 2:if(J=this.productions_[q[1]][1],K.$=v[v.length-J],K._$={first_line:r[r.length-(J||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(J||1)].first_column,last_column:r[r.length-1].last_column},de&&(K._$.range=[r[r.length-(J||1)].range[0],r[r.length-1].range[1]]),se=this.performAction.apply(K,[t,D,I,$.yy,q[1],v,r].concat(W)),typeof se<"u")return se;J&&(h=h.slice(0,-1*J*2),v=v.slice(0,-1*J),r=r.slice(0,-1*J)),h.push(this.productions_[q[1]][0]),v.push(K.$),r.push(K._$),Be=u[h[h.length-2]][h[h.length-1]],h.push(Be);break;case 3:return!0}}return!0},"parse")},b=function(){var w={EOF:1,parseError:c(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:c(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:c(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:c(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),h.length-1&&(this.yylineno-=h.length-1);var v=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:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+` -`+l+"^"},"showPosition"),test_match:c(function(o,l){var h,d,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],h=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var r in v)this[r]=v[r];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,h,d;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),r=0;rl[0].length)){if(l=h,d=r,this.options.backtrack_lexer){if(o=this.test_match(h,v[r]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,v[d]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var l=this.next();return l||this.lex()},"lex"),begin:c(function(l){this.conditionStack.push(l)},"begin"),popState:c(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:c(function(l){this.begin(l)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(l,h,d,v){switch(d){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return w}();T.lexer=b;function m(){this.yy={}}return c(m,"Parser"),m.prototype=T,T.Parser=m,new m}();Ee.parser=Ee;var jt=Ee;X.extend(Vt);X.extend(Bt);X.extend(Xt);var Je={friday:5,saturday:6},ee="",Fe="",Le=void 0,Ye="",he=[],ke=[],We=new Map,Oe=[],_e=[],ue="",Pe="",rt=["active","done","crit","milestone"],Ve=[],me=!1,ze=!1,Re="sunday",De="saturday",Se=0,Ut=c(function(){Oe=[],_e=[],ue="",Ve=[],Te=0,Ie=void 0,be=void 0,R=[],ee="",Fe="",Pe="",Le=void 0,Ye="",he=[],ke=[],me=!1,ze=!1,Se=0,We=new Map,Lt(),Re="sunday",De="saturday"},"clear"),Zt=c(function(e){Fe=e},"setAxisFormat"),Qt=c(function(){return Fe},"getAxisFormat"),$t=c(function(e){Le=e},"setTickInterval"),Kt=c(function(){return Le},"getTickInterval"),Jt=c(function(e){Ye=e},"setTodayMarker"),er=c(function(){return Ye},"getTodayMarker"),tr=c(function(e){ee=e},"setDateFormat"),rr=c(function(){me=!0},"enableInclusiveEndDates"),sr=c(function(){return me},"endDatesAreInclusive"),nr=c(function(){ze=!0},"enableTopAxis"),ar=c(function(){return ze},"topAxisEnabled"),ir=c(function(e){Pe=e},"setDisplayMode"),or=c(function(){return Pe},"getDisplayMode"),cr=c(function(){return ee},"getDateFormat"),lr=c(function(e){he=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),ur=c(function(){return he},"getIncludes"),dr=c(function(e){ke=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),fr=c(function(){return ke},"getExcludes"),hr=c(function(){return We},"getLinks"),kr=c(function(e){ue=e,Oe.push(e)},"addSection"),mr=c(function(){return Oe},"getSections"),yr=c(function(){let e=et();const s=10;let n=0;for(;!e&&n[\d\w- ]+)/.exec(n);if(i!==null){let f=null;for(const Y of i.groups.ids.split(" ")){let S=ne(Y);S!==void 0&&(!f||S.endTime>f.endTime)&&(f=S)}if(f)return f.endTime;const _=new Date;return _.setHours(0,0,0,0),_}let k=X(n,s.trim(),!0);if(k.isValid())return k.toDate();{we.debug("Invalid date:"+n),we.debug("With date format:"+s.trim());const f=new Date(n);if(f===void 0||isNaN(f.getTime())||f.getFullYear()<-1e4||f.getFullYear()>1e4)throw new Error("Invalid date:"+n);return f}},"getStartDate"),at=c(function(e){const s=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return s!==null?[Number.parseFloat(s[1]),s[2]]:[NaN,"ms"]},"parseDuration"),it=c(function(e,s,n,a=!1){n=n.trim();const k=/^until\s+(?[\d\w- ]+)/.exec(n);if(k!==null){let g=null;for(const P of k.groups.ids.split(" ")){let V=ne(P);V!==void 0&&(!g||V.startTime{window.open(n,"_self")}),We.set(a,n))}),ct(e,"clickable")},"setLink"),ct=c(function(e,s){e.split(",").forEach(function(n){let a=ne(n);a!==void 0&&a.classes.push(s)})},"setClass"),Cr=c(function(e,s,n){if(ce().securityLevel!=="loose"||s===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{Yt.runFunc(s,...a)})},"setClickFun"),lt=c(function(e,s){Ve.push(function(){const n=document.querySelector(`[id="${e}"]`);n!==null&&n.addEventListener("click",function(){s()})},function(){const n=document.querySelector(`[id="${e}-text"]`);n!==null&&n.addEventListener("click",function(){s()})})},"pushFun"),Er=c(function(e,s,n){e.split(",").forEach(function(a){Cr(a,s,n)}),ct(e,"clickable")},"setClickEvent"),Sr=c(function(e){Ve.forEach(function(s){s(e)})},"bindFunctions"),Mr={getConfig:c(()=>ce().gantt,"getConfig"),clear:Ut,setDateFormat:tr,getDateFormat:cr,enableInclusiveEndDates:rr,endDatesAreInclusive:sr,enableTopAxis:nr,topAxisEnabled:ar,setAxisFormat:Zt,getAxisFormat:Qt,setTickInterval:$t,getTickInterval:Kt,setTodayMarker:Jt,getTodayMarker:er,setAccTitle:mt,getAccTitle:kt,setDiagramTitle:ht,getDiagramTitle:ft,setDisplayMode:ir,getDisplayMode:or,setAccDescription:dt,getAccDescription:ut,addSection:kr,getSections:mr,getTasks:yr,addTask:wr,findTaskById:ne,addTaskOrg:_r,setIncludes:lr,getIncludes:ur,setExcludes:dr,getExcludes:fr,setClickEvent:Er,setLink:Dr,getLinks:hr,bindFunctions:Sr,parseDuration:at,isInvalidDate:st,setWeekday:gr,getWeekday:pr,setWeekend:vr};function Ne(e,s,n){let a=!0;for(;a;)a=!1,n.forEach(function(i){const k="^\\s*"+i+"\\s*$",f=new RegExp(k);e[0].match(f)&&(s[i]=!0,e.shift(1),a=!0)})}c(Ne,"getTaskTags");var Ir=c(function(){we.debug("Something is calling, setConf, remove the call")},"setConf"),tt={monday:Mt,tuesday:St,wednesday:Et,thursday:Ct,friday:Dt,saturday:_t,sunday:wt},Ar=c((e,s)=>{let n=[...e].map(()=>-1/0),a=[...e].sort((k,f)=>k.startTime-f.startTime||k.order-f.order),i=0;for(const k of a)for(let f=0;f=n[f]){n[f]=k.endTime,k.order=f+s,f>i&&(i=f);break}return i},"getMaxIntersections"),te,Fr=c(function(e,s,n,a){const i=ce().gantt,k=ce().securityLevel;let f;k==="sandbox"&&(f=ge("#i"+s));const _=k==="sandbox"?ge(f.nodes()[0].contentDocument.body):ge("body"),Y=k==="sandbox"?f.nodes()[0].contentDocument:document,S=Y.getElementById(s);te=S.parentElement.offsetWidth,te===void 0&&(te=1200),i.useWidth!==void 0&&(te=i.useWidth);const g=a.db.getTasks();let M=[];for(const y of g)M.push(y.type);M=j(M);const P={};let V=2*i.topPadding;if(a.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const y={};for(const T of g)y[T.section]===void 0?y[T.section]=[T]:y[T.section].push(T);let x=0;for(const T of Object.keys(y)){const b=Ar(y[T],x)+1;x+=b,V+=b*(i.barHeight+i.barGap),P[T]=b}}else{V+=g.length*(i.barHeight+i.barGap);for(const y of M)P[y]=g.filter(x=>x.type===y).length}S.setAttribute("viewBox","0 0 "+te+" "+V);const B=_.select(`[id="${s}"]`),E=yt().domain([gt(g,function(y){return y.startTime}),pt(g,function(y){return y.endTime})]).rangeRound([0,te-i.leftPadding-i.rightPadding]);function p(y,x){const T=y.startTime,b=x.startTime;let m=0;return T>b?m=1:Tu.order))].map(u=>y.find(t=>t.order===u));B.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(u,t){return t=u.order,t*x+T-2}).attr("width",function(){return o-i.rightPadding/2}).attr("height",x).attr("class",function(u){for(const[t,I]of M.entries())if(u.type===I)return"section section"+t%i.numberSectionStyles;return"section section0"});const d=B.append("g").selectAll("rect").data(y).enter(),v=a.db.getLinks();if(d.append("rect").attr("id",function(u){return u.id}).attr("rx",3).attr("ry",3).attr("x",function(u){return u.milestone?E(u.startTime)+b+.5*(E(u.endTime)-E(u.startTime))-.5*m:E(u.startTime)+b}).attr("y",function(u,t){return t=u.order,t*x+T}).attr("width",function(u){return u.milestone?m:E(u.renderEndTime||u.endTime)-E(u.startTime)}).attr("height",m).attr("transform-origin",function(u,t){return t=u.order,(E(u.startTime)+b+.5*(E(u.endTime)-E(u.startTime))).toString()+"px "+(t*x+T+.5*m).toString()+"px"}).attr("class",function(u){const t="task";let I="";u.classes.length>0&&(I=u.classes.join(" "));let D=0;for(const[N,W]of M.entries())u.type===W&&(D=N%i.numberSectionStyles);let A="";return u.active?u.crit?A+=" activeCrit":A=" active":u.done?u.crit?A=" doneCrit":A=" done":u.crit&&(A+=" crit"),A.length===0&&(A=" task"),u.milestone&&(A=" milestone "+A),A+=D,A+=" "+I,t+A}),d.append("text").attr("id",function(u){return u.id+"-text"}).text(function(u){return u.task}).attr("font-size",i.fontSize).attr("x",function(u){let t=E(u.startTime),I=E(u.renderEndTime||u.endTime);u.milestone&&(t+=.5*(E(u.endTime)-E(u.startTime))-.5*m),u.milestone&&(I=t+m);const D=this.getBBox().width;return D>I-t?I+D+1.5*i.leftPadding>o?t+b-5:I+b+5:(I-t)/2+t+b}).attr("y",function(u,t){return t=u.order,t*x+i.barHeight/2+(i.fontSize/2-2)+T}).attr("text-height",m).attr("class",function(u){const t=E(u.startTime);let I=E(u.endTime);u.milestone&&(I=t+m);const D=this.getBBox().width;let A="";u.classes.length>0&&(A=u.classes.join(" "));let N=0;for(const[O,$]of M.entries())u.type===$&&(N=O%i.numberSectionStyles);let W="";return u.active&&(u.crit?W="activeCritText"+N:W="activeText"+N),u.done?u.crit?W=W+" doneCritText"+N:W=W+" doneText"+N:u.crit&&(W=W+" critText"+N),u.milestone&&(W+=" milestoneText"),D>I-t?I+D+1.5*i.leftPadding>o?A+" taskTextOutsideLeft taskTextOutside"+N+" "+W:A+" taskTextOutsideRight taskTextOutside"+N+" "+W+" width-"+D:A+" taskText taskText"+N+" "+W+" width-"+D}),ce().securityLevel==="sandbox"){let u;u=ge("#i"+s);const t=u.nodes()[0].contentDocument;d.filter(function(I){return v.has(I.id)}).each(function(I){var D=t.querySelector("#"+I.id),A=t.querySelector("#"+I.id+"-text");const N=D.parentNode;var W=t.createElement("a");W.setAttribute("xlink:href",v.get(I.id)),W.setAttribute("target","_top"),N.appendChild(W),W.appendChild(D),W.appendChild(A)})}}c(F,"drawRects");function L(y,x,T,b,m,w,o,l){if(o.length===0&&l.length===0)return;let h,d;for(const{startTime:D,endTime:A}of w)(h===void 0||Dd)&&(d=A);if(!h||!d)return;if(X(d).diff(X(h),"year")>5){we.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const v=a.db.getDateFormat(),r=[];let u=null,t=X(h);for(;t.valueOf()<=d;)a.db.isInvalidDate(t,v,o,l)?u?u.end=t:u={start:t,end:t}:u&&(r.push(u),u=null),t=t.add(1,"d");B.append("g").selectAll("rect").data(r).enter().append("rect").attr("id",function(D){return"exclude-"+D.start.format("YYYY-MM-DD")}).attr("x",function(D){return E(D.start)+T}).attr("y",i.gridLineStartPadding).attr("width",function(D){const A=D.end.add(1,"day");return E(A)-E(D.start)}).attr("height",m-x-i.gridLineStartPadding).attr("transform-origin",function(D,A){return(E(D.start)+T+.5*(E(D.end)-E(D.start))).toString()+"px "+(A*y+.5*m).toString()+"px"}).attr("class","exclude-range")}c(L,"drawExcludeDays");function G(y,x,T,b){let m=bt(E).tickSize(-b+x+i.gridLineStartPadding).tickFormat(qe(a.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(a.db.getTickInterval()||i.tickInterval);if(o!==null){const l=o[1],h=o[2],d=a.db.getWeekday()||i.weekday;switch(h){case"millisecond":m.ticks(Ze.every(l));break;case"second":m.ticks(Ue.every(l));break;case"minute":m.ticks(je.every(l));break;case"hour":m.ticks(Xe.every(l));break;case"day":m.ticks(He.every(l));break;case"week":m.ticks(tt[d].every(l));break;case"month":m.ticks(Ge.every(l));break}}if(B.append("g").attr("class","grid").attr("transform","translate("+y+", "+(b-50)+")").call(m).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),a.db.topAxisEnabled()||i.topAxis){let l=It(E).tickSize(-b+x+i.gridLineStartPadding).tickFormat(qe(a.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(o!==null){const h=o[1],d=o[2],v=a.db.getWeekday()||i.weekday;switch(d){case"millisecond":l.ticks(Ze.every(h));break;case"second":l.ticks(Ue.every(h));break;case"minute":l.ticks(je.every(h));break;case"hour":l.ticks(Xe.every(h));break;case"day":l.ticks(He.every(h));break;case"week":l.ticks(tt[v].every(h));break;case"month":l.ticks(Ge.every(h));break}}B.append("g").attr("class","grid").attr("transform","translate("+y+", "+x+")").call(l).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}c(G,"makeGrid");function H(y,x){let T=0;const b=Object.keys(P).map(m=>[m,P[m]]);B.append("g").selectAll("text").data(b).enter().append(function(m){const w=m[0].split(At.lineBreakRegex),o=-(w.length-1)/2,l=Y.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("dy",o+"em");for(const[h,d]of w.entries()){const v=Y.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttribute("alignment-baseline","central"),v.setAttribute("x","10"),h>0&&v.setAttribute("dy","1em"),v.textContent=d,l.appendChild(v)}return l}).attr("x",10).attr("y",function(m,w){if(w>0)for(let o=0;o` - .mermaid-main-font { - font-family: ${e.fontFamily}; - } - - .exclude-range { - fill: ${e.excludeBkgColor}; - } - - .section { - stroke: none; - opacity: 0.2; - } - - .section0 { - fill: ${e.sectionBkgColor}; - } - - .section2 { - fill: ${e.sectionBkgColor2}; - } - - .section1, - .section3 { - fill: ${e.altSectionBkgColor}; - opacity: 0.2; - } - - .sectionTitle0 { - fill: ${e.titleColor}; - } - - .sectionTitle1 { - fill: ${e.titleColor}; - } - - .sectionTitle2 { - fill: ${e.titleColor}; - } - - .sectionTitle3 { - fill: ${e.titleColor}; - } - - .sectionTitle { - text-anchor: start; - font-family: ${e.fontFamily}; - } - - - /* Grid and axis */ - - .grid .tick { - stroke: ${e.gridColor}; - opacity: 0.8; - shape-rendering: crispEdges; - } - - .grid .tick text { - font-family: ${e.fontFamily}; - fill: ${e.textColor}; - } - - .grid path { - stroke-width: 0; - } - - - /* Today line */ - - .today { - fill: none; - stroke: ${e.todayLineColor}; - stroke-width: 2px; - } - - - /* Task styling */ - - /* Default task */ - - .task { - stroke-width: 2; - } - - .taskText { - text-anchor: middle; - font-family: ${e.fontFamily}; - } - - .taskTextOutsideRight { - fill: ${e.taskTextDarkColor}; - text-anchor: start; - font-family: ${e.fontFamily}; - } - - .taskTextOutsideLeft { - fill: ${e.taskTextDarkColor}; - text-anchor: end; - } - - - /* Special case clickable */ - - .task.clickable { - cursor: pointer; - } - - .taskText.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideLeft.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideRight.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - - /* Specific task settings for the sections*/ - - .taskText0, - .taskText1, - .taskText2, - .taskText3 { - fill: ${e.taskTextColor}; - } - - .task0, - .task1, - .task2, - .task3 { - fill: ${e.taskBkgColor}; - stroke: ${e.taskBorderColor}; - } - - .taskTextOutside0, - .taskTextOutside2 - { - fill: ${e.taskTextOutsideColor}; - } - - .taskTextOutside1, - .taskTextOutside3 { - fill: ${e.taskTextOutsideColor}; - } - - - /* Active task */ - - .active0, - .active1, - .active2, - .active3 { - fill: ${e.activeTaskBkgColor}; - stroke: ${e.activeTaskBorderColor}; - } - - .activeText0, - .activeText1, - .activeText2, - .activeText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Completed task */ - - .done0, - .done1, - .done2, - .done3 { - stroke: ${e.doneTaskBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - } - - .doneText0, - .doneText1, - .doneText2, - .doneText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Tasks on the critical line */ - - .crit0, - .crit1, - .crit2, - .crit3 { - stroke: ${e.critBorderColor}; - fill: ${e.critBkgColor}; - stroke-width: 2; - } - - .activeCrit0, - .activeCrit1, - .activeCrit2, - .activeCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.activeTaskBkgColor}; - stroke-width: 2; - } - - .doneCrit0, - .doneCrit1, - .doneCrit2, - .doneCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - cursor: pointer; - shape-rendering: crispEdges; - } - - .milestone { - transform: rotate(45deg) scale(0.8,0.8); - } - - .milestoneText { - font-style: italic; - } - .doneCritText0, - .doneCritText1, - .doneCritText2, - .doneCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .activeCritText0, - .activeCritText1, - .activeCritText2, - .activeCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .titleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.titleColor||e.textColor}; - font-family: ${e.fontFamily}; - } -`,"getStyles"),Wr=Yr,Br={parser:jt,db:Mr,renderer:Lr,styles:Wr};export{Br as diagram}; diff --git a/lightrag/api/webui/assets/ganttDiagram-EK5VF46D-Bxc01I9z.js b/lightrag/api/webui/assets/ganttDiagram-EK5VF46D-Bxc01I9z.js new file mode 100644 index 00000000..645db27a --- /dev/null +++ b/lightrag/api/webui/assets/ganttDiagram-EK5VF46D-Bxc01I9z.js @@ -0,0 +1,267 @@ +import{_ as l,g as ue,s as de,t as fe,q as he,a as ke,b as me,c as ct,d as gt,aE as ye,aF as ge,aG as pe,e as ve,R as xe,aH as Te,aI as X,l as wt,aJ as be,aK as qt,aL as Gt,aM as we,aN as _e,aO as De,aP as Ce,aQ as Se,aR as Ee,aS as Me,aT as Ht,aU as Xt,aV as Ut,aW as jt,aX as Zt,aY as Ie,k as Ae,j as Le,z as Fe,u as Ye}from"./mermaid-vendor-DOoA-Fcm.js";import{g as At}from"./react-vendor-CgPb4pW_.js";import"./feature-graph-D68hhnYC.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";var pt={exports:{}},We=pt.exports,$t;function Pe(){return $t||($t=1,function(t,a){(function(r,n){t.exports=n()})(We,function(){var r="day";return function(n,i,m){var f=function(M){return M.add(4-M.isoWeekday(),r)},_=i.prototype;_.isoWeekYear=function(){return f(this).year()},_.isoWeek=function(M){if(!this.$utils().u(M))return this.add(7*(M-this.isoWeek()),r);var g,I,V,O,B=f(this),S=(g=this.isoWeekYear(),I=this.$u,V=(I?m.utc:m)().year(g).startOf("year"),O=4-V.isoWeekday(),V.isoWeekday()>4&&(O+=7),V.add(O,r));return B.diff(S,"week")+1},_.isoWeekday=function(M){return this.$utils().u(M)?this.day()||7:this.day(this.day()%7?M:M-7)};var Y=_.startOf;_.startOf=function(M,g){var I=this.$utils(),V=!!I.u(g)||g;return I.p(M)==="isoweek"?V?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(M,g)}}})}(pt)),pt.exports}var Ve=Pe();const Oe=At(Ve);var vt={exports:{}},ze=vt.exports,Qt;function Re(){return Qt||(Qt=1,function(t,a){(function(r,n){t.exports=n()})(ze,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,m=/\d\d/,f=/\d\d?/,_=/\d*[^-_:/,()\s\d]+/,Y={},M=function(p){return(p=+p)+(p>68?1900:2e3)},g=function(p){return function(C){this[p]=+C}},I=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),F=60*L[1]+(+L[2]||0);return F===0?0:L[0]==="+"?-F:F}(p)}],V=function(p){var C=Y[p];return C&&(C.indexOf?C:C.s.concat(C.f))},O=function(p,C){var L,F=Y.meridiem;if(F){for(var G=1;G<=24;G+=1)if(p.indexOf(F(G,0,C))>-1){L=G>12;break}}else L=p===(C?"pm":"PM");return L},B={A:[_,function(p){this.afternoon=O(p,!1)}],a:[_,function(p){this.afternoon=O(p,!0)}],Q:[i,function(p){this.month=3*(p-1)+1}],S:[i,function(p){this.milliseconds=100*+p}],SS:[m,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[f,g("seconds")],ss:[f,g("seconds")],m:[f,g("minutes")],mm:[f,g("minutes")],H:[f,g("hours")],h:[f,g("hours")],HH:[f,g("hours")],hh:[f,g("hours")],D:[f,g("day")],DD:[m,g("day")],Do:[_,function(p){var C=Y.ordinal,L=p.match(/\d+/);if(this.day=L[0],C)for(var F=1;F<=31;F+=1)C(F).replace(/\[|\]/g,"")===p&&(this.day=F)}],w:[f,g("week")],ww:[m,g("week")],M:[f,g("month")],MM:[m,g("month")],MMM:[_,function(p){var C=V("months"),L=(V("monthsShort")||C.map(function(F){return F.slice(0,3)})).indexOf(p)+1;if(L<1)throw new Error;this.month=L%12||L}],MMMM:[_,function(p){var C=V("months").indexOf(p)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,g("year")],YY:[m,function(p){this.year=M(p)}],YYYY:[/\d{4}/,g("year")],Z:I,ZZ:I};function S(p){var C,L;C=p,L=Y&&Y.formats;for(var F=(p=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,x,k){var w=k&&k.toUpperCase();return x||L[k]||r[k]||L[w].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,u,h){return u||h.slice(1)})})).match(n),G=F.length,H=0;H-1)return new Date((v==="X"?1e3:1)*d);var e=S(v)(d),A=e.year,D=e.month,E=e.day,N=e.hours,W=e.minutes,P=e.seconds,Q=e.milliseconds,it=e.zone,nt=e.week,dt=new Date,ft=E||(A||D?1:dt.getDate()),ot=A||dt.getFullYear(),z=0;A&&!D||(z=D>0?D-1:dt.getMonth());var Z,q=N||0,st=W||0,K=P||0,rt=Q||0;return it?new Date(Date.UTC(ot,z,ft,q,st,K,rt+60*it.offset*1e3)):s?new Date(Date.UTC(ot,z,ft,q,st,K,rt)):(Z=new Date(ot,z,ft,q,st,K,rt),nt&&(Z=o(Z).week(nt).toDate()),Z)}catch{return new Date("")}}($,T,U,L),this.init(),w&&w!==!0&&(this.$L=this.locale(w).$L),k&&$!=this.format(T)&&(this.$d=new Date("")),Y={}}else if(T instanceof Array)for(var c=T.length,u=1;u<=c;u+=1){y[1]=T[u-1];var h=L.apply(this,y);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}u===c&&(this.$d=new Date(""))}else G.call(this,H)}}})}(vt)),vt.exports}var Ne=Re();const Be=At(Ne);var xt={exports:{}},qe=xt.exports,Kt;function Ge(){return Kt||(Kt=1,function(t,a){(function(r,n){t.exports=n()})(qe,function(){return function(r,n){var i=n.prototype,m=i.format;i.format=function(f){var _=this,Y=this.$locale();if(!this.isValid())return m.bind(this)(f);var M=this.$utils(),g=(f||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(I){switch(I){case"Q":return Math.ceil((_.$M+1)/3);case"Do":return Y.ordinal(_.$D);case"gggg":return _.weekYear();case"GGGG":return _.isoWeekYear();case"wo":return Y.ordinal(_.week(),"W");case"w":case"ww":return M.s(_.week(),I==="w"?1:2,"0");case"W":case"WW":return M.s(_.isoWeek(),I==="W"?1:2,"0");case"k":case"kk":return M.s(String(_.$H===0?24:_.$H),I==="k"?1:2,"0");case"X":return Math.floor(_.$d.getTime()/1e3);case"x":return _.$d.getTime();case"z":return"["+_.offsetName()+"]";case"zzz":return"["+_.offsetName("long")+"]";default:return I}});return m.bind(this)(g)}}})}(xt)),xt.exports}var He=Ge();const Xe=At(He);var St=function(){var t=l(function(w,c,u,h){for(u=u||{},h=w.length;h--;u[w[h]]=c);return u},"o"),a=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],m=[1,29],f=[1,30],_=[1,31],Y=[1,32],M=[1,33],g=[1,34],I=[1,9],V=[1,10],O=[1,11],B=[1,12],S=[1,13],p=[1,14],C=[1,15],L=[1,16],F=[1,19],G=[1,20],H=[1,21],$=[1,22],U=[1,23],y=[1,25],T=[1,35],b={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(c,u,h,d,v,s,o){var e=s.length-1;switch(v){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:d.TopAxis(),this.$=s[e].substr(8);break;case 20:d.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:d.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:d.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:d.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:d.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:d.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:d.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],d.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],null),d.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-2],s[e-1]),d.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],d.setClickEvent(s[e-2],s[e],null),d.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-1],s[e]),d.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],d.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:m,16:f,17:_,18:Y,19:18,20:M,21:g,22:I,23:V,24:O,25:B,26:S,27:p,28:C,29:L,30:F,31:G,33:H,35:$,36:U,37:24,38:y,40:T},t(a,[2,7],{1:[2,1]}),t(a,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:m,16:f,17:_,18:Y,19:18,20:M,21:g,22:I,23:V,24:O,25:B,26:S,27:p,28:C,29:L,30:F,31:G,33:H,35:$,36:U,37:24,38:y,40:T},t(a,[2,5]),t(a,[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),t(a,[2,20]),t(a,[2,21]),t(a,[2,22]),t(a,[2,23]),t(a,[2,24]),t(a,[2,25]),t(a,[2,26]),t(a,[2,27]),{32:[1,37]},{34:[1,38]},t(a,[2,30]),t(a,[2,31]),t(a,[2,32]),{39:[1,39]},t(a,[2,8]),t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),t(a,[2,12]),t(a,[2,13]),t(a,[2,14]),t(a,[2,15]),t(a,[2,16]),{41:[1,40],43:[1,41]},t(a,[2,4]),t(a,[2,28]),t(a,[2,29]),t(a,[2,33]),t(a,[2,34],{42:[1,42],43:[1,43]}),t(a,[2,40],{41:[1,44]}),t(a,[2,35],{43:[1,45]}),t(a,[2,36]),t(a,[2,38],{42:[1,46]}),t(a,[2,37]),t(a,[2,39])],defaultActions:{},parseError:l(function(c,u){if(u.recoverable)this.trace(c);else{var h=new Error(c);throw h.hash=u,h}},"parseError"),parse:l(function(c){var u=this,h=[0],d=[],v=[null],s=[],o=this.table,e="",A=0,D=0,E=2,N=1,W=s.slice.call(arguments,1),P=Object.create(this.lexer),Q={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(Q.yy[it]=this.yy[it]);P.setInput(c,Q.yy),Q.yy.lexer=P,Q.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var nt=P.yylloc;s.push(nt);var dt=P.options&&P.options.ranges;typeof Q.yy.parseError=="function"?this.parseError=Q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(j){h.length=h.length-2*j,v.length=v.length-j,s.length=s.length-j}l(ft,"popStack");function ot(){var j;return j=d.pop()||P.lex()||N,typeof j!="number"&&(j instanceof Array&&(d=j,j=d.pop()),j=u.symbols_[j]||j),j}l(ot,"lex");for(var z,Z,q,st,K={},rt,J,Bt,yt;;){if(Z=h[h.length-1],this.defaultActions[Z]?q=this.defaultActions[Z]:((z===null||typeof z>"u")&&(z=ot()),q=o[Z]&&o[Z][z]),typeof q>"u"||!q.length||!q[0]){var Ct="";yt=[];for(rt in o[Z])this.terminals_[rt]&&rt>E&&yt.push("'"+this.terminals_[rt]+"'");P.showPosition?Ct="Parse error on line "+(A+1)+`: +`+P.showPosition()+` +Expecting `+yt.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Ct="Parse error on line "+(A+1)+": Unexpected "+(z==N?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(Ct,{text:P.match,token:this.terminals_[z]||z,line:P.yylineno,loc:nt,expected:yt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+z);switch(q[0]){case 1:h.push(z),v.push(P.yytext),s.push(P.yylloc),h.push(q[1]),z=null,D=P.yyleng,e=P.yytext,A=P.yylineno,nt=P.yylloc;break;case 2:if(J=this.productions_[q[1]][1],K.$=v[v.length-J],K._$={first_line:s[s.length-(J||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(J||1)].first_column,last_column:s[s.length-1].last_column},dt&&(K._$.range=[s[s.length-(J||1)].range[0],s[s.length-1].range[1]]),st=this.performAction.apply(K,[e,D,A,Q.yy,q[1],v,s].concat(W)),typeof st<"u")return st;J&&(h=h.slice(0,-1*J*2),v=v.slice(0,-1*J),s=s.slice(0,-1*J)),h.push(this.productions_[q[1]][0]),v.push(K.$),s.push(K._$),Bt=o[h[h.length-2]][h[h.length-1]],h.push(Bt);break;case 3:return!0}}return!0},"parse")},x=function(){var w={EOF:1,parseError:l(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:l(function(c,u){return this.yy=u||this.yy||{},this._input=c,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:l(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var u=c.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:l(function(c){var u=c.length,h=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=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),h.length-1&&(this.yylineno-=h.length-1);var v=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:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(c){this.unput(this.match.slice(c))},"less"),pastInput:l(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var c=this.pastInput(),u=new Array(c.length+1).join("-");return c+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:l(function(c,u){var h,d,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),d=c[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var s in v)this[s]=v[s];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,u,h,d;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),s=0;su[0].length)){if(u=h,d=s,this.options.backtrack_lexer){if(c=this.test_match(h,v[s]),c!==!1)return c;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(c=this.test_match(u,v[d]),c!==!1?c:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var u=this.next();return u||this.lex()},"lex"),begin:l(function(u){this.conditionStack.push(u)},"begin"),popState:l(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:l(function(u){this.begin(u)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(u,h,d,v){switch(d){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return w}();b.lexer=x;function k(){this.yy={}}return l(k,"Parser"),k.prototype=b,b.Parser=k,new k}();St.parser=St;var Ue=St;X.extend(Oe);X.extend(Be);X.extend(Xe);var Jt={friday:5,saturday:6},tt="",Lt="",Ft=void 0,Yt="",ht=[],kt=[],Wt=new Map,Pt=[],_t=[],ut="",Vt="",re=["active","done","crit","milestone","vert"],Ot=[],mt=!1,zt=!1,Rt="sunday",Dt="saturday",Et=0,je=l(function(){Pt=[],_t=[],ut="",Ot=[],Tt=0,It=void 0,bt=void 0,R=[],tt="",Lt="",Vt="",Ft=void 0,Yt="",ht=[],kt=[],mt=!1,zt=!1,Et=0,Wt=new Map,Fe(),Rt="sunday",Dt="saturday"},"clear"),Ze=l(function(t){Lt=t},"setAxisFormat"),$e=l(function(){return Lt},"getAxisFormat"),Qe=l(function(t){Ft=t},"setTickInterval"),Ke=l(function(){return Ft},"getTickInterval"),Je=l(function(t){Yt=t},"setTodayMarker"),tr=l(function(){return Yt},"getTodayMarker"),er=l(function(t){tt=t},"setDateFormat"),rr=l(function(){mt=!0},"enableInclusiveEndDates"),sr=l(function(){return mt},"endDatesAreInclusive"),ar=l(function(){zt=!0},"enableTopAxis"),ir=l(function(){return zt},"topAxisEnabled"),nr=l(function(t){Vt=t},"setDisplayMode"),or=l(function(){return Vt},"getDisplayMode"),cr=l(function(){return tt},"getDateFormat"),lr=l(function(t){ht=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),ur=l(function(){return ht},"getIncludes"),dr=l(function(t){kt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),fr=l(function(){return kt},"getExcludes"),hr=l(function(){return Wt},"getLinks"),kr=l(function(t){ut=t,Pt.push(t)},"addSection"),mr=l(function(){return Pt},"getSections"),yr=l(function(){let t=te();const a=10;let r=0;for(;!t&&r[\d\w- ]+)/.exec(r);if(i!==null){let f=null;for(const Y of i.groups.ids.split(" ")){let M=at(Y);M!==void 0&&(!f||M.endTime>f.endTime)&&(f=M)}if(f)return f.endTime;const _=new Date;return _.setHours(0,0,0,0),_}let m=X(r,a.trim(),!0);if(m.isValid())return m.toDate();{wt.debug("Invalid date:"+r),wt.debug("With date format:"+a.trim());const f=new Date(r);if(f===void 0||isNaN(f.getTime())||f.getFullYear()<-1e4||f.getFullYear()>1e4)throw new Error("Invalid date:"+r);return f}},"getStartDate"),ie=l(function(t){const a=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return a!==null?[Number.parseFloat(a[1]),a[2]]:[NaN,"ms"]},"parseDuration"),ne=l(function(t,a,r,n=!1){r=r.trim();const m=/^until\s+(?[\d\w- ]+)/.exec(r);if(m!==null){let g=null;for(const V of m.groups.ids.split(" ")){let O=at(V);O!==void 0&&(!g||O.startTime{window.open(r,"_self")}),Wt.set(n,r))}),ce(t,"clickable")},"setLink"),ce=l(function(t,a){t.split(",").forEach(function(r){let n=at(r);n!==void 0&&n.classes.push(a)})},"setClass"),Cr=l(function(t,a,r){if(ct().securityLevel!=="loose"||a===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m{Ye.runFunc(a,...n)})},"setClickFun"),le=l(function(t,a){Ot.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){a()})},function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){a()})})},"pushFun"),Sr=l(function(t,a,r){t.split(",").forEach(function(n){Cr(n,a,r)}),ce(t,"clickable")},"setClickEvent"),Er=l(function(t){Ot.forEach(function(a){a(t)})},"bindFunctions"),Mr={getConfig:l(()=>ct().gantt,"getConfig"),clear:je,setDateFormat:er,getDateFormat:cr,enableInclusiveEndDates:rr,endDatesAreInclusive:sr,enableTopAxis:ar,topAxisEnabled:ir,setAxisFormat:Ze,getAxisFormat:$e,setTickInterval:Qe,getTickInterval:Ke,setTodayMarker:Je,getTodayMarker:tr,setAccTitle:me,getAccTitle:ke,setDiagramTitle:he,getDiagramTitle:fe,setDisplayMode:nr,getDisplayMode:or,setAccDescription:de,getAccDescription:ue,addSection:kr,getSections:mr,getTasks:yr,addTask:wr,findTaskById:at,addTaskOrg:_r,setIncludes:lr,getIncludes:ur,setExcludes:dr,getExcludes:fr,setClickEvent:Sr,setLink:Dr,getLinks:hr,bindFunctions:Er,parseDuration:ie,isInvalidDate:se,setWeekday:gr,getWeekday:pr,setWeekend:vr};function Nt(t,a,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){const m="^\\s*"+i+"\\s*$",f=new RegExp(m);t[0].match(f)&&(a[i]=!0,t.shift(1),n=!0)})}l(Nt,"getTaskTags");var Ir=l(function(){wt.debug("Something is calling, setConf, remove the call")},"setConf"),ee={monday:Me,tuesday:Ee,wednesday:Se,thursday:Ce,friday:De,saturday:_e,sunday:we},Ar=l((t,a)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((m,f)=>m.startTime-f.startTime||m.order-f.order),i=0;for(const m of n)for(let f=0;f=r[f]){r[f]=m.endTime,m.order=f+a,f>i&&(i=f);break}return i},"getMaxIntersections"),et,Lr=l(function(t,a,r,n){const i=ct().gantt,m=ct().securityLevel;let f;m==="sandbox"&&(f=gt("#i"+a));const _=m==="sandbox"?gt(f.nodes()[0].contentDocument.body):gt("body"),Y=m==="sandbox"?f.nodes()[0].contentDocument:document,M=Y.getElementById(a);et=M.parentElement.offsetWidth,et===void 0&&(et=1200),i.useWidth!==void 0&&(et=i.useWidth);const g=n.db.getTasks();let I=[];for(const y of g)I.push(y.type);I=U(I);const V={};let O=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const y={};for(const b of g)y[b.section]===void 0?y[b.section]=[b]:y[b.section].push(b);let T=0;for(const b of Object.keys(y)){const x=Ar(y[b],T)+1;T+=x,O+=x*(i.barHeight+i.barGap),V[b]=x}}else{O+=g.length*(i.barHeight+i.barGap);for(const y of I)V[y]=g.filter(T=>T.type===y).length}M.setAttribute("viewBox","0 0 "+et+" "+O);const B=_.select(`[id="${a}"]`),S=ye().domain([ge(g,function(y){return y.startTime}),pe(g,function(y){return y.endTime})]).rangeRound([0,et-i.leftPadding-i.rightPadding]);function p(y,T){const b=y.startTime,x=T.startTime;let k=0;return b>x?k=1:bo.vert===e.vert?0:o.vert?1:-1);const h=[...new Set(y.map(o=>o.order))].map(o=>y.find(e=>e.order===o));B.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(o,e){return e=o.order,e*T+b-2}).attr("width",function(){return c-i.rightPadding/2}).attr("height",T).attr("class",function(o){for(const[e,A]of I.entries())if(o.type===A)return"section section"+e%i.numberSectionStyles;return"section section0"}).enter();const d=B.append("g").selectAll("rect").data(y).enter(),v=n.db.getLinks();if(d.append("rect").attr("id",function(o){return o.id}).attr("rx",3).attr("ry",3).attr("x",function(o){return o.milestone?S(o.startTime)+x+.5*(S(o.endTime)-S(o.startTime))-.5*k:S(o.startTime)+x}).attr("y",function(o,e){return e=o.order,o.vert?i.gridLineStartPadding:e*T+b}).attr("width",function(o){return o.milestone?k:o.vert?.08*k:S(o.renderEndTime||o.endTime)-S(o.startTime)}).attr("height",function(o){return o.vert?g.length*(i.barHeight+i.barGap)+i.barHeight*2:k}).attr("transform-origin",function(o,e){return e=o.order,(S(o.startTime)+x+.5*(S(o.endTime)-S(o.startTime))).toString()+"px "+(e*T+b+.5*k).toString()+"px"}).attr("class",function(o){const e="task";let A="";o.classes.length>0&&(A=o.classes.join(" "));let D=0;for(const[N,W]of I.entries())o.type===W&&(D=N%i.numberSectionStyles);let E="";return o.active?o.crit?E+=" activeCrit":E=" active":o.done?o.crit?E=" doneCrit":E=" done":o.crit&&(E+=" crit"),E.length===0&&(E=" task"),o.milestone&&(E=" milestone "+E),o.vert&&(E=" vert "+E),E+=D,E+=" "+A,e+E}),d.append("text").attr("id",function(o){return o.id+"-text"}).text(function(o){return o.task}).attr("font-size",i.fontSize).attr("x",function(o){let e=S(o.startTime),A=S(o.renderEndTime||o.endTime);if(o.milestone&&(e+=.5*(S(o.endTime)-S(o.startTime))-.5*k,A=e+k),o.vert)return S(o.startTime)+x;const D=this.getBBox().width;return D>A-e?A+D+1.5*i.leftPadding>c?e+x-5:A+x+5:(A-e)/2+e+x}).attr("y",function(o,e){return o.vert?i.gridLineStartPadding+g.length*(i.barHeight+i.barGap)+60:(e=o.order,e*T+i.barHeight/2+(i.fontSize/2-2)+b)}).attr("text-height",k).attr("class",function(o){const e=S(o.startTime);let A=S(o.endTime);o.milestone&&(A=e+k);const D=this.getBBox().width;let E="";o.classes.length>0&&(E=o.classes.join(" "));let N=0;for(const[P,Q]of I.entries())o.type===Q&&(N=P%i.numberSectionStyles);let W="";return o.active&&(o.crit?W="activeCritText"+N:W="activeText"+N),o.done?o.crit?W=W+" doneCritText"+N:W=W+" doneText"+N:o.crit&&(W=W+" critText"+N),o.milestone&&(W+=" milestoneText"),o.vert&&(W+=" vertText"),D>A-e?A+D+1.5*i.leftPadding>c?E+" taskTextOutsideLeft taskTextOutside"+N+" "+W:E+" taskTextOutsideRight taskTextOutside"+N+" "+W+" width-"+D:E+" taskText taskText"+N+" "+W+" width-"+D}),ct().securityLevel==="sandbox"){let o;o=gt("#i"+a);const e=o.nodes()[0].contentDocument;d.filter(function(A){return v.has(A.id)}).each(function(A){var D=e.querySelector("#"+A.id),E=e.querySelector("#"+A.id+"-text");const N=D.parentNode;var W=e.createElement("a");W.setAttribute("xlink:href",v.get(A.id)),W.setAttribute("target","_top"),N.appendChild(W),W.appendChild(D),W.appendChild(E)})}}l(L,"drawRects");function F(y,T,b,x,k,w,c,u){if(c.length===0&&u.length===0)return;let h,d;for(const{startTime:D,endTime:E}of w)(h===void 0||Dd)&&(d=E);if(!h||!d)return;if(X(d).diff(X(h),"year")>5){wt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const v=n.db.getDateFormat(),s=[];let o=null,e=X(h);for(;e.valueOf()<=d;)n.db.isInvalidDate(e,v,c,u)?o?o.end=e:o={start:e,end:e}:o&&(s.push(o),o=null),e=e.add(1,"d");B.append("g").selectAll("rect").data(s).enter().append("rect").attr("id",function(D){return"exclude-"+D.start.format("YYYY-MM-DD")}).attr("x",function(D){return S(D.start)+b}).attr("y",i.gridLineStartPadding).attr("width",function(D){const E=D.end.add(1,"day");return S(E)-S(D.start)}).attr("height",k-T-i.gridLineStartPadding).attr("transform-origin",function(D,E){return(S(D.start)+b+.5*(S(D.end)-S(D.start))).toString()+"px "+(E*y+.5*k).toString()+"px"}).attr("class","exclude-range")}l(F,"drawExcludeDays");function G(y,T,b,x){let k=be(S).tickSize(-x+T+i.gridLineStartPadding).tickFormat(qt(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const c=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(c!==null){const u=c[1],h=c[2],d=n.db.getWeekday()||i.weekday;switch(h){case"millisecond":k.ticks(Zt.every(u));break;case"second":k.ticks(jt.every(u));break;case"minute":k.ticks(Ut.every(u));break;case"hour":k.ticks(Xt.every(u));break;case"day":k.ticks(Ht.every(u));break;case"week":k.ticks(ee[d].every(u));break;case"month":k.ticks(Gt.every(u));break}}if(B.append("g").attr("class","grid").attr("transform","translate("+y+", "+(x-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let u=Ie(S).tickSize(-x+T+i.gridLineStartPadding).tickFormat(qt(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(c!==null){const h=c[1],d=c[2],v=n.db.getWeekday()||i.weekday;switch(d){case"millisecond":u.ticks(Zt.every(h));break;case"second":u.ticks(jt.every(h));break;case"minute":u.ticks(Ut.every(h));break;case"hour":u.ticks(Xt.every(h));break;case"day":u.ticks(Ht.every(h));break;case"week":u.ticks(ee[v].every(h));break;case"month":u.ticks(Gt.every(h));break}}B.append("g").attr("class","grid").attr("transform","translate("+y+", "+T+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}l(G,"makeGrid");function H(y,T){let b=0;const x=Object.keys(V).map(k=>[k,V[k]]);B.append("g").selectAll("text").data(x).enter().append(function(k){const w=k[0].split(Ae.lineBreakRegex),c=-(w.length-1)/2,u=Y.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",c+"em");for(const[h,d]of w.entries()){const v=Y.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttribute("alignment-baseline","central"),v.setAttribute("x","10"),h>0&&v.setAttribute("dy","1em"),v.textContent=d,u.appendChild(v)}return u}).attr("x",10).attr("y",function(k,w){if(w>0)for(let c=0;c` + .mermaid-main-font { + font-family: ${t.fontFamily}; + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${t.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .vert { + stroke: ${t.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${t.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: ${t.fontFamily}; + } +`,"getStyles"),Wr=Yr,Br={parser:Ue,db:Mr,renderer:Fr,styles:Wr};export{Br as diagram}; diff --git a/lightrag/api/webui/assets/gitGraphDiagram-7IBYFJ6S-BXUpvPAf.js b/lightrag/api/webui/assets/gitGraphDiagram-7IBYFJ6S-BXUpvPAf.js deleted file mode 100644 index 03955373..00000000 --- a/lightrag/api/webui/assets/gitGraphDiagram-7IBYFJ6S-BXUpvPAf.js +++ /dev/null @@ -1,65 +0,0 @@ -import{p as Z}from"./chunk-4BMEZGHF-CAhtCpmT.js";import{I as F}from"./chunk-XZIHB7SX-c4P7PYPk.js";import{_ as h,t as U,q as ee,s as re,g as te,a as ae,b as ne,l as w,c as se,d as ce,u as oe,E as ie,z as de,k as B,F as he,G as le,H as $e,I as fe}from"./mermaid-vendor-D0f_SE0h.js";import{p as ge}from"./radar-MK3ICKWK-DOAXm8cx.js";import"./feature-graph-NODQb6qW.js";import"./react-vendor-DEwriMA6.js";import"./graph-vendor-B-X5JegA.js";import"./ui-vendor-CeCm8EER.js";import"./utils-vendor-BysuhMZA.js";import"./_baseUniq-CtAZZJ8e.js";import"./_basePickBy-D3PHsJjq.js";import"./clone-Dm5jEAXQ.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ye=$e.gitGraph,z=h(()=>he({...ye,...le().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),e=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:a}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function S(){return fe({length:7})}h(S,"getID");function N(t,e){const a=Object.create(null);return t.reduce((s,r)=>{const n=e(r);return a[n]||(a[n]=!0,s.push(r)),s},[])}h(N,"uniqBy");var ue=h(function(t){i.records.direction=t},"setDirection"),pe=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(e){w.error("error while parsing gitGraph options",e.message)}},"setOptions"),xe=h(function(){return i.records.options},"getOptions"),be=h(function(t){let e=t.msg,a=t.id;const s=t.type;let r=t.tags;w.info("commit",e,a,s,r),w.debug("Entering commit:",e,a,s,r);const n=z();a=B.sanitizeText(a,n),e=B.sanitizeText(e,n),r=r==null?void 0:r.map(c=>B.sanitizeText(c,n));const o={id:a||i.records.seq+"-"+S(),message:e,seq:i.records.seq++,type:s??p.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=o,w.info("main branch",n.mainBranchName),i.records.commits.set(o.id,o),i.records.branches.set(i.records.currBranch,o.id),w.debug("in pushCommit "+o.id)},"commit"),me=h(function(t){let e=t.name;const a=t.order;if(e=B.sanitizeText(e,z()),i.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);i.records.branches.set(e,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(e,{name:e,order:a}),_(e),w.debug("in createBranch")},"branch"),we=h(t=>{let e=t.branch,a=t.id;const s=t.type,r=t.tags,n=z();e=B.sanitizeText(e,n),a&&(a=B.sanitizeText(a,n));const o=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(e),$=o?i.records.commits.get(o):void 0,l=c?i.records.commits.get(c):void 0;if($&&l&&$.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(i.records.currBranch===e){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!i.records.branches.has(e)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${e} ${a} ${s} ${r==null?void 0:r.join(" ")}`,token:`merge ${e} ${a} ${s} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${e} ${a}_UNIQUE ${s} ${r==null?void 0:r.join(" ")}`]},d}const f=c||"",g={id:a||`${i.records.seq}-${S()}`,message:`merged branch ${e} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:p.MERGE,customType:s,customId:!!a,tags:r??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),Ce=h(function(t){let e=t.id,a=t.targetId,s=t.tags,r=t.parent;w.debug("Entering cherryPick:",e,a,s);const n=z();if(e=B.sanitizeText(e,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),r=B.sanitizeText(r,n),!e||!i.records.commits.has(e)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},$}const o=i.records.commits.get(e);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&!(Array.isArray(o.parents)&&o.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=o.branch;if(o.type===p.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(c===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+S(),message:`cherry-picked ${o==null?void 0:o.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,o.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${o.id}${o.type===p.MERGE?`|parent:${r}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const e=i.records.branches.get(i.records.currBranch);e===void 0||!e?i.records.head=null:i.records.head=i.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");function A(t,e,a){const s=t.indexOf(e);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function Y(t){const e=t.reduce((r,n)=>r.seq>n.seq?r:n,t[0]);let a="";t.forEach(function(r){r===e?a+=" *":a+=" |"});const s=[a,e.id,e.seq];for(const r in i.records.branches)i.records.branches.get(r)===e.id&&s.push(r);if(w.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const r=i.records.commits.get(e.parents[0]);A(t,e,r),e.parents[1]&&t.push(i.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const r=i.records.commits.get(e.parents[0]);A(t,e,r)}}t=N(t,r=>r.id),Y(t)}h(Y,"prettyPrintCommitHistory");var ve=h(function(){w.debug(i.records.commits);const t=V()[0];Y([t])},"prettyPrint"),Ee=h(function(){i.reset(),de()},"clear"),Be=h(function(){return[...i.records.branchConfig.values()].map((e,a)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${a}`)}).sort((e,a)=>(e.order??0)-(a.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),ke=h(function(){return i.records.branches},"getBranches"),Le=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(e){w.debug(e.id)}),t.sort((e,a)=>e.seq-a.seq),t},"getCommitsArray"),Te=h(function(){return i.records.currBranch},"getCurrentBranch"),Me=h(function(){return i.records.direction},"getDirection"),Re=h(function(){return i.records.head},"getHead"),X={commitType:p,getConfig:z,setDirection:ue,setOptions:pe,getOptions:xe,commit:be,branch:me,merge:we,cherryPick:Ce,checkout:_,prettyPrint:ve,clear:Ee,getBranchesAsObjArray:Be,getBranches:ke,getCommits:Le,getCommitsArray:V,getCurrentBranch:Te,getDirection:Me,getHead:Re,setAccTitle:ne,getAccTitle:ae,getAccDescription:te,setAccDescription:re,setDiagramTitle:ee,getDiagramTitle:U},Ie=h((t,e)=>{Z(t,e),t.dir&&e.setDirection(t.dir);for(const a of t.statements)qe(a,e)},"populate"),qe=h((t,e)=>{const s={Commit:h(r=>e.commit(Oe(r)),"Commit"),Branch:h(r=>e.branch(ze(r)),"Branch"),Merge:h(r=>e.merge(Ge(r)),"Merge"),Checkout:h(r=>e.checkout(He(r)),"Checkout"),CherryPicking:h(r=>e.cherryPick(Pe(r)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Oe=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),ze=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Ge=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),He=h(t=>t.branch,"parseCheckout"),Pe=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),We={parse:h(async t=>{const e=await ge("gitGraph",t);w.debug(e),Ie(e,X)},"parse")},j=se(),b=j==null?void 0:j.gitGraph,R=10,I=40,k=4,L=2,O=8,v=new Map,E=new Map,P=30,G=new Map,W=[],M=0,u="LR",Se=h(()=>{v.clear(),E.clear(),G.clear(),M=0,W=[],u="LR"},"clear"),J=h(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=s.trim(),e.appendChild(r)}),e},"drawText"),Q=h(t=>{let e,a,s;return u==="BT"?(a=h((r,n)=>r<=n,"comparisonFunc"),s=1/0):(a=h((r,n)=>r>=n,"comparisonFunc"),s=0),t.forEach(r=>{var o,c;const n=u==="TB"||u=="BT"?(o=E.get(r))==null?void 0:o.y:(c=E.get(r))==null?void 0:c.x;n!==void 0&&a(n,s)&&(e=r,s=n)}),e},"findClosestParent"),je=h(t=>{let e="",a=1/0;return t.forEach(s=>{const r=E.get(s).y;r<=a&&(e=s,a=r)}),e||void 0},"findClosestParentBT"),Ae=h((t,e,a)=>{let s=a,r=a;const n=[];t.forEach(o=>{const c=e.get(o);if(!c)throw new Error(`Commit not found for key ${o}`);c.parents.length?(s=De(c),r=Math.max(s,r)):n.push(c),Ke(c,s)}),s=r,n.forEach(o=>{Ne(o,s,a)}),t.forEach(o=>{const c=e.get(o);if(c!=null&&c.parents.length){const $=je(c.parents);s=E.get($).y-I,s<=r&&(r=s);const l=v.get(c.branch).pos,f=s-R;E.set(c.id,{x:l,y:f})}})},"setParallelBTPos"),Ye=h(t=>{var s;const e=Q(t.parents.filter(r=>r!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(e))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),De=h(t=>Ye(t)+I,"calculateCommitPosition"),Ke=h((t,e)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,r=e+R;return E.set(t.id,{x:s,y:r}),{x:s,y:r}},"setCommitPosition"),Ne=h((t,e,a)=>{const s=v.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const r=e+a,n=s.pos;E.set(t.id,{x:n,y:r})},"setRootPosition"),_e=h((t,e,a,s,r,n)=>{if(n===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${r%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${r%O} ${s}-inner`);else if(n===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${e.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${s}`);else{const o=t.append("circle");if(o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",e.type===p.MERGE?9:10),o.attr("class",`commit ${e.id} commit${r%O}`),n===p.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${s} ${e.id} commit${r%O}`)}n===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${e.id} commit${r%O}`)}},"drawCommitBullet"),Ve=h((t,e,a,s)=>{var r;if(e.type!==p.CHERRY_PICK&&(e.customId&&e.type===p.MERGE||e.type!==p.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),o=n.insert("rect").attr("class","commit-label-bkg"),c=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(e.id),$=(r=c.node())==null?void 0:r.getBBox();if($&&(o.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),u==="TB"||u==="BT"?(o.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),c.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):c.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(u==="TB"||u==="BT")c.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),o.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xe=h((t,e,a,s)=>{var r;if(e.tags.length>0){let n=0,o=0,c=0;const $=[];for(const l of e.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(r=d.node())==null?void 0:r.getBBox();if(!y)throw new Error("Tag bbox not found");o=Math.max(o,y.width),c=Math.max(c,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=c/2,x=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` - ${s-o/2-k/2},${x+L} - ${s-o/2-k/2},${x-L} - ${a.posWithOffset-o/2-k},${x-y-L} - ${a.posWithOffset+o/2+k},${x-y-L} - ${a.posWithOffset+o/2+k},${x+y+L} - ${a.posWithOffset-o/2-k},${x+y+L}`),f.attr("cy",x).attr("cx",s-o/2+k/2).attr("r",1.5).attr("class","tag-hole"),u==="TB"||u==="BT"){const m=s+d;g.attr("class","tag-label-bkg").attr("points",` - ${a.x},${m+2} - ${a.x},${m-2} - ${a.x+R},${m-y-2} - ${a.x+R+o+4},${m-y-2} - ${a.x+R+o+4},${m+y+2} - ${a.x+R},${m+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Je=h(t=>{switch(t.customType??t.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qe=h((t,e,a,s)=>{const r={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const o=s.get(n)??r;return e==="TB"?o.y+I:e==="BT"?(s.get(t.id)??r).y-I:o.x+I}}else return e==="TB"?P:e==="BT"?(s.get(t.id)??r).y-I:0;return 0},"calculatePosition"),Ze=h((t,e,a)=>{var o,c;const s=u==="BT"&&a?e:e+R,r=u==="TB"||u==="BT"?s:(o=v.get(t.branch))==null?void 0:o.pos,n=u==="TB"||u==="BT"?(c=v.get(t.branch))==null?void 0:c.pos:s;if(n===void 0||r===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:r,posWithOffset:s}},"getCommitPosition"),K=h((t,e,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),r=t.append("g").attr("class","commit-labels");let n=u==="TB"||u==="BT"?P:0;const o=[...e.keys()],c=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var x,m;const d=(x=e.get(f))==null?void 0:x.seq,y=(m=e.get(g))==null?void 0:m.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=o.sort($);u==="BT"&&(c&&Ae(l,e,n),l=l.reverse()),l.forEach(f=>{var y;const g=e.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);c&&(n=Qe(g,u,n,E));const d=Ze(g,n,c);if(a){const x=Je(g),m=g.customType??g.type,q=((y=v.get(g.branch))==null?void 0:y.index)??0;_e(s,g,d,x,q,m),Ve(r,g,d,n),Xe(r,g,d,n)}u==="TB"||u==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=u==="BT"&&c?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fe=h((t,e,a,s,r)=>{const o=(u==="TB"||u==="BT"?a.xl.branch===o,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&c(l))},"shouldRerouteArrow"),H=h((t,e,a=0)=>{const s=t+Math.abs(t-e)/2;if(a>5)return s;if(W.every(o=>Math.abs(o-s)>=10))return W.push(s),s;const n=Math.abs(t-e);return H(t,e-n/5,a+1)},"findLane"),Ue=h((t,e,a,s)=>{var y,x,m,q,D;const r=E.get(e.id),n=E.get(a.id);if(r===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${a.id}`);const o=Fe(e,a,r,n,s);let c="",$="",l=0,f=0,g=(y=v.get(a.branch))==null?void 0:y.index;a.type===p.MERGE&&e.id!==a.parents[0]&&(g=(x=v.get(e.branch))==null?void 0:x.index);let d;if(o){c="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=r.yn.x&&(c="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===p.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${n.y-l} ${$} ${r.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${n.x+l} ${r.y} ${c} ${n.x} ${r.y+f} L ${n.x} ${n.y}`),r.x===n.x&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):u==="BT"?(r.xn.x&&(c="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===p.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${n.y+l} ${c} ${r.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${n.x-l} ${r.y} ${c} ${n.x} ${r.y-f} L ${n.x} ${n.y}`),r.x===n.x&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):(r.yn.y&&(a.type===p.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${n.x-l} ${r.y} ${c} ${n.x} ${r.y-f} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${r.x} ${n.y+l} ${$} ${r.x+f} ${n.y} L ${n.x} ${n.y}`),r.y===n.y&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),er=h((t,e)=>{const a=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(s=>{const r=e.get(s);r.parents&&r.parents.length>0&&r.parents.forEach(n=>{Ue(a,e.get(n),r,e)})})},"drawArrows"),rr=h((t,e)=>{const a=t.append("g");e.forEach((s,r)=>{var x;const n=r%O,o=(x=v.get(s.name))==null?void 0:x.pos;if(o===void 0)throw new Error(`Position not found for branch ${s.name}`);const c=a.append("line");c.attr("x1",0),c.attr("y1",o),c.attr("x2",M),c.attr("y2",o),c.attr("class","branch branch"+n),u==="TB"?(c.attr("y1",P),c.attr("x1",o),c.attr("y2",M),c.attr("x2",o)):u==="BT"&&(c.attr("y1",M),c.attr("x1",o),c.attr("y2",P),c.attr("x2",o)),W.push(o);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(o-y.height/2-1)+")"),u==="TB"?(f.attr("x",o-y.width/2-10).attr("y",0),d.attr("transform","translate("+(o-y.width/2-5)+", 0)")):u==="BT"?(f.attr("x",o-y.width/2-10).attr("y",M),d.attr("transform","translate("+(o-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(o-y.height/2)+")")})},"drawBranches"),tr=h(function(t,e,a,s,r){return v.set(t,{pos:e,index:a}),e+=50+(r?40:0)+(u==="TB"||u==="BT"?s.width/2:0),e},"setBranchPosition"),ar=h(function(t,e,a,s){if(Se(),w.debug("in gitgraph renderer",t+` -`,"id:",e,a),!b)throw new Error("GitGraph config not found");const r=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const o=n.getBranchesAsObjArray();u=n.getDirection();const c=ce(`[id="${e}"]`);let $=0;o.forEach((l,f)=>{var q;const g=J(l.name),d=c.append("g"),y=d.insert("g").attr("class","branchLabel"),x=y.insert("g").attr("class","label branch-label");(q=x.node())==null||q.appendChild(g);const m=g.getBBox();$=tr(l.name,$,f,m,r),x.remove(),y.remove(),d.remove()}),K(c,G,!1),b.showBranches&&rr(c,o),er(c,G),K(c,G,!0),oe.insertTitle(c,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),ie(void 0,c,b.diagramPadding,b.useMaxWidth)},"draw"),nr={draw:ar},sr=h(t=>` - .commit-id, - .commit-msg, - .branch-label { - fill: lightgrey; - color: lightgrey; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - } - ${[0,1,2,3,4,5,6,7].map(e=>` - .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } - .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } - .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } - .label${e} { fill: ${t["git"+e]}; } - .arrow${e} { stroke: ${t["git"+e]}; } - `).join(` -`)} - - .branch { - stroke-width: 1; - stroke: ${t.lineColor}; - stroke-dasharray: 2; - } - .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} - .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } - .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} - .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } - .tag-hole { fill: ${t.textColor}; } - - .commit-merge { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - } - .commit-reverse { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - stroke-width: 3; - } - .commit-highlight-outer { - } - .commit-highlight-inner { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - } - - .arrow { stroke-width: 8; stroke-linecap: round; fill: none} - .gitTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${t.textColor}; - } -`,"getStyles"),cr=sr,br={parser:We,db:X,renderer:nr,styles:cr};export{br as diagram}; diff --git a/lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-tvjpfBbf.js b/lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-tvjpfBbf.js new file mode 100644 index 00000000..de214a6f --- /dev/null +++ b/lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-tvjpfBbf.js @@ -0,0 +1,65 @@ +import{p as Z}from"./chunk-353BL4L5-Dc2iugoC.js";import{I as F}from"./chunk-AACKK3MU-Bulquadc.js";import{_ as h,t as U,q as rr,s as er,g as tr,a as ar,b as nr,l as m,c as sr,d as or,u as cr,E as ir,z as dr,k as B,F as hr,G as lr,H as $r,I as fr}from"./mermaid-vendor-DOoA-Fcm.js";import{p as gr}from"./treemap-6Y5VK53G-DD2bKuQl.js";import"./feature-graph-D68hhnYC.js";import"./react-vendor-CgPb4pW_.js";import"./graph-vendor-BC3frDkq.js";import"./ui-vendor-DaJTMqwy.js";import"./utils-vendor-elCzPYZl.js";import"./_baseUniq-DHoNBBvA.js";import"./_basePickBy-enj1kD1i.js";import"./clone-DMtoZDWc.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=$r.gitGraph,z=h(()=>hr({...yr,...lr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function S(){return fr({length:7})}h(S,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var pr=h(function(t){i.records.direction=t},"setDirection"),xr=h(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),ur=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;m.info("commit",r,a,s,e),m.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+S(),message:r,seq:i.records.seq++,type:s??x.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,m.info("main branch",n.mainBranchName),i.records.commits.has(c.id)&&m.warn(`Commit ID ${c.id} already exists`),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),m.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),m.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${S()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:x.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===x.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+S(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===x.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function A(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(m.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);A(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);A(t,r,e)}}t=N(t,e=>e.id),D(t)}h(D,"prettyPrintCommitHistory");var Cr=h(function(){m.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Er=h(function(){i.reset(),dr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:x,getConfig:z,setDirection:pr,setOptions:xr,getOptions:ur,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:ar,getAccDescription:tr,setAccDescription:er,setDiagramTitle:rr,getDiagramTitle:U},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);m.debug(r),Ir(r,X)},"parse")},j=sr(),b=j==null?void 0:j.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,p="LR",Sr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],p="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return p==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=p==="TB"||p=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),jr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Ar=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=jr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Dr=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Dr(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===x.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===x.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),p==="TB"||p==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(p==="TB"||p==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,u=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` + ${s-c/2-k/2},${u+L} + ${s-c/2-k/2},${u-L} + ${a.posWithOffset-c/2-k},${u-y-L} + ${a.posWithOffset+c/2+k},${u-y-L} + ${a.posWithOffset+c/2+k},${u+y+L} + ${a.posWithOffset-c/2-k},${u+y+L}`),f.attr("cy",u).attr("cx",s-c/2+k/2).attr("r",1.5).attr("class","tag-hole"),p==="TB"||p==="BT"){const w=s+d;g.attr("class","tag-label-bkg").attr("points",` + ${a.x},${w+2} + ${a.x},${w-2} + ${a.x+R},${w-y-2} + ${a.x+R+c+4},${w-y-2} + ${a.x+R+c+4},${w+y+2} + ${a.x+R},${w+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Jr=h(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const c=s.get(n)??e;return r==="TB"?c.y+I:r==="BT"?(s.get(t.id)??e).y-I:c.x+I}}else return r==="TB"?P:r==="BT"?(s.get(t.id)??e).y-I:0;return 0},"calculatePosition"),Zr=h((t,r,a)=>{var c,o;const s=p==="BT"&&a?r:r+R,e=p==="TB"||p==="BT"?s:(c=C.get(t.branch))==null?void 0:c.pos,n=p==="TB"||p==="BT"?(o=C.get(t.branch))==null?void 0:o.pos:s;if(n===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:e,posWithOffset:s}},"getCommitPosition"),K=h((t,r,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let n=p==="TB"||p==="BT"?P:0;const c=[...r.keys()],o=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var u,w;const d=(u=r.get(f))==null?void 0:u.seq,y=(w=r.get(g))==null?void 0:w.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=c.sort($);p==="BT"&&(o&&Ar(l,r,n),l=l.reverse()),l.forEach(f=>{var y;const g=r.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);o&&(n=Qr(g,p,n,E));const d=Zr(g,n,o);if(a){const u=Jr(g),w=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,u,q,w),Vr(e,g,d,n),Xr(e,g,d,n)}p==="TB"||p==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=p==="BT"&&o?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fr=h((t,r,a,s,e)=>{const c=(p==="TB"||p==="BT"?a.xl.branch===c,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&o(l))},"shouldRerouteArrow"),H=h((t,r,a=0)=>{const s=t+Math.abs(t-r)/2;if(a>5)return s;if(W.every(c=>Math.abs(c-s)>=10))return W.push(s),s;const n=Math.abs(t-r);return H(t,r-n/5,a+1)},"findLane"),Ur=h((t,r,a,s)=>{var y,u,w,q,Y;const e=E.get(r.id),n=E.get(a.id);if(e===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const c=Fr(r,a,e,n,s);let o="",$="",l=0,f=0,g=(y=C.get(a.branch))==null?void 0:y.index;a.type===x.MERGE&&r.id!==a.parents[0]&&(g=(u=C.get(r.branch))==null?void 0:u.index);let d;if(c){o="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=e.yn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${$} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x+l} ${e.y} ${o} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):p==="BT"?(e.xn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${o} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):(e.yn.y&&(a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y===n.y&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),re=h((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const e=r.get(s);e.parents&&e.parents.length>0&&e.parents.forEach(n=>{Ur(a,r.get(n),e,r)})})},"drawArrows"),ee=h((t,r)=>{const a=t.append("g");r.forEach((s,e)=>{var u;const n=e%O,c=(u=C.get(s.name))==null?void 0:u.pos;if(c===void 0)throw new Error(`Position not found for branch ${s.name}`);const o=a.append("line");o.attr("x1",0),o.attr("y1",c),o.attr("x2",M),o.attr("y2",c),o.attr("class","branch branch"+n),p==="TB"?(o.attr("y1",P),o.attr("x1",c),o.attr("y2",M),o.attr("x2",c)):p==="BT"&&(o.attr("y1",M),o.attr("x1",c),o.attr("y2",P),o.attr("x2",c)),W.push(c);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(c-y.height/2-1)+")"),p==="TB"?(f.attr("x",c-y.width/2-10).attr("y",0),d.attr("transform","translate("+(c-y.width/2-5)+", 0)")):p==="BT"?(f.attr("x",c-y.width/2-10).attr("y",M),d.attr("transform","translate("+(c-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(c-y.height/2)+")")})},"drawBranches"),te=h(function(t,r,a,s,e){return C.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(p==="TB"||p==="BT"?s.width/2:0),r},"setBranchPosition"),ae=h(function(t,r,a,s){if(Sr(),m.debug("in gitgraph renderer",t+` +`,"id:",r,a),!b)throw new Error("GitGraph config not found");const e=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const c=n.getBranchesAsObjArray();p=n.getDirection();const o=or(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=J(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),u=y.insert("g").attr("class","label branch-label");(q=u.node())==null||q.appendChild(g);const w=g.getBBox();$=te(l.name,$,f,w,e),u.remove(),y.remove(),d.remove()}),K(o,G,!1),b.showBranches&&ee(o,c),re(o,G),K(o,G,!0),cr.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),ir(void 0,o,b.diagramPadding,b.useMaxWidth)},"draw"),ne={draw:ae},se=h(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(r=>` + .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; } + .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; } + .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; } + .label${r} { fill: ${t["git"+r]}; } + .arrow${r} { stroke: ${t["git"+r]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),oe=se,be={parser:Wr,db:X,renderer:ne,styles:oe};export{be as diagram}; diff --git a/lightrag/api/webui/assets/graph-BLnbmvfZ.js b/lightrag/api/webui/assets/graph-C9TLhZpq.js similarity index 94% rename from lightrag/api/webui/assets/graph-BLnbmvfZ.js rename to lightrag/api/webui/assets/graph-C9TLhZpq.js index c1f9f3d5..fc7469e7 100644 --- a/lightrag/api/webui/assets/graph-BLnbmvfZ.js +++ b/lightrag/api/webui/assets/graph-C9TLhZpq.js @@ -1 +1 @@ -import{aq as N,ar as j,as as f,at as b,au as E}from"./mermaid-vendor-D0f_SE0h.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./_baseUniq-CtAZZJ8e.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G}; +import{aw as N,ax as j,ay as f,az as b,aA as E}from"./mermaid-vendor-DOoA-Fcm.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as w}from"./_baseUniq-DHoNBBvA.js";var D=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return D(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return w(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G}; diff --git a/lightrag/api/webui/assets/graph-vendor-B-X5JegA.js b/lightrag/api/webui/assets/graph-vendor-BC3frDkq.js similarity index 66% rename from lightrag/api/webui/assets/graph-vendor-B-X5JegA.js rename to lightrag/api/webui/assets/graph-vendor-BC3frDkq.js index 284d52ed..6db35aa6 100644 --- a/lightrag/api/webui/assets/graph-vendor-B-X5JegA.js +++ b/lightrag/api/webui/assets/graph-vendor-BC3frDkq.js @@ -1,8 +1,8 @@ -import{g as xi,r as G,R as Me}from"./react-vendor-DEwriMA6.js";var Te={exports:{}},ut;function Ti(){if(ut)return Te.exports;ut=1;var n=typeof Reflect=="object"?Reflect:null,i=n&&typeof n.apply=="function"?n.apply:function(p,v,_){return Function.prototype.apply.call(p,v,_)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:t=function(p){return Object.getOwnPropertyNames(p)};function e(g){console&&console.warn&&console.warn(g)}var r=Number.isNaN||function(p){return p!==p};function a(){a.init.call(this)}Te.exports=a,Te.exports.once=k,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(g){if(typeof g!="number"||g<0||r(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");o=g}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||r(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function u(g){return g._maxListeners===void 0?a.defaultMaxListeners:g._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(p){for(var v=[],_=1;_0&&(L=v[0]),L instanceof Error)throw L;var F=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw F.context=L,F}var P=D[p];if(P===void 0)return!1;if(typeof P=="function")i(P,this,v);else for(var q=P.length,O=y(P,q),_=0;_0&&L.length>A&&!L.warned){L.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=g,F.type=p,F.count=L.length,e(F)}return g}a.prototype.addListener=function(p,v){return h(this,p,v,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(p,v){return h(this,p,v,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(g,p,v){var _={fired:!1,wrapFn:void 0,target:g,type:p,listener:v},A=d.bind(_);return A.listener=v,_.wrapFn=A,A}a.prototype.once=function(p,v){return s(v),this.on(p,l(this,p,v)),this},a.prototype.prependOnceListener=function(p,v){return s(v),this.prependListener(p,l(this,p,v)),this},a.prototype.removeListener=function(p,v){var _,A,D,L,F;if(s(v),A=this._events,A===void 0)return this;if(_=A[p],_===void 0)return this;if(_===v||_.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete A[p],A.removeListener&&this.emit("removeListener",p,_.listener||v));else if(typeof _!="function"){for(D=-1,L=_.length-1;L>=0;L--)if(_[L]===v||_[L].listener===v){F=_[L].listener,D=L;break}if(D<0)return this;D===0?_.shift():b(_,D),_.length===1&&(A[p]=_[0]),A.removeListener!==void 0&&this.emit("removeListener",p,F||v)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(p){var v,_,A;if(_=this._events,_===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete _[p]),this;if(arguments.length===0){var D=Object.keys(_),L;for(A=0;A=0;A--)this.removeListener(p,v[A]);return this};function c(g,p,v){var _=g._events;if(_===void 0)return[];var A=_[p];return A===void 0?[]:typeof A=="function"?v?[A.listener||A]:[A]:v?E(A):y(A,A.length)}a.prototype.listeners=function(p){return c(this,p,!0)},a.prototype.rawListeners=function(p){return c(this,p,!1)},a.listenerCount=function(g,p){return typeof g.listenerCount=="function"?g.listenerCount(p):f.call(g,p)},a.prototype.listenerCount=f;function f(g){var p=this._events;if(p!==void 0){var v=p[g];if(typeof v=="function")return 1;if(v!==void 0)return v.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(g,p){for(var v=new Array(p),_=0;_n++}function Q(){const n=arguments;let i=null,t=-1;return{[Symbol.iterator](){return this},next(){let e=null;do{if(i===null){if(t++,t>=n.length)return{done:!0};i=n[t][Symbol.iterator]()}if(e=i.next(),e.done){i=null;continue}break}while(!0);return e}}}function ce(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Qe extends Error{constructor(i){super(),this.name="GraphError",this.message=i}}class C extends Qe{constructor(i){super(i),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,C.prototype.constructor)}}class w extends Qe{constructor(i){super(i),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,w.prototype.constructor)}}class R extends Qe{constructor(i){super(i),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,R.prototype.constructor)}}function Ut(n,i){this.key=n,this.attributes=i,this.clear()}Ut.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function $t(n,i){this.key=n,this.attributes=i,this.clear()}$t.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function zt(n,i){this.key=n,this.attributes=i,this.clear()}zt.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function fe(n,i,t,e,r){this.key=i,this.attributes=r,this.undirected=n,this.source=t,this.target=e}fe.prototype.attach=function(){let n="out",i="in";this.undirected&&(n=i="undirected");const t=this.source.key,e=this.target.key;this.source[n][e]=this,!(this.undirected&&t===e)&&(this.target[i][t]=this)};fe.prototype.attachMulti=function(){let n="out",i="in";const t=this.source.key,e=this.target.key;this.undirected&&(n=i="undirected");const r=this.source[n],a=r[e];if(typeof a>"u"){r[e]=this,this.undirected&&t===e||(this.target[i][t]=this);return}a.previous=this,this.next=a,r[e]=this,this.target[i][t]=this};fe.prototype.detach=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),delete this.source[t][i],delete this.target[e][n]};fe.prototype.detachMulti=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][i],delete this.target[e][n]):(this.next.previous=void 0,this.source[t][i]=this.next,this.target[e][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Bt=0,Ht=1,ki=2,Wt=3;function ee(n,i,t,e,r,a,o){let s,u,h,d;if(e=""+e,t===Bt){if(s=n._nodes.get(e),!s)throw new w(`Graph.${i}: could not find the "${e}" node in the graph.`);h=r,d=a}else if(t===Wt){if(r=""+r,u=n._edges.get(r),!u)throw new w(`Graph.${i}: could not find the "${r}" edge in the graph.`);const l=u.source.key,c=u.target.key;if(e===l)s=u.target;else if(e===c)s=u.source;else throw new w(`Graph.${i}: the "${e}" node is not attached to the "${r}" edge (${l}, ${c}).`);h=a,d=o}else{if(u=n._edges.get(e),!u)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`);t===Ht?s=u.source:s=u.target,h=r,d=a}return[s,h,d]}function Ai(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes[s]}}function Ri(n,i,t){n.prototype[i]=function(e,r){const[a]=ee(this,i,t,e,r);return a.attributes}}function Li(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes.hasOwnProperty(s)}}function Di(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);return s.attributes[u]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Ni(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);if(typeof h!="function")throw new C(`Graph.${i}: updater should be a function.`);const d=s.attributes,l=h(d[u]);return d[u]=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Gi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}function Fi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!M(s))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Pi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!M(s))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return I(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}function Ii(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(typeof s!="function")throw new C(`Graph.${i}: provided updater is not a function.`);return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const Mi=[{name:n=>`get${n}Attribute`,attacher:Ai},{name:n=>`get${n}Attributes`,attacher:Ri},{name:n=>`has${n}Attribute`,attacher:Li},{name:n=>`set${n}Attribute`,attacher:Di},{name:n=>`update${n}Attribute`,attacher:Ni},{name:n=>`remove${n}Attribute`,attacher:Gi},{name:n=>`replace${n}Attributes`,attacher:Fi},{name:n=>`merge${n}Attributes`,attacher:Pi},{name:n=>`update${n}Attributes`,attacher:Ii}];function Oi(n){Mi.forEach(function({name:i,attacher:t}){t(n,i("Node"),Bt),t(n,i("Source"),Ht),t(n,i("Target"),ki),t(n,i("Opposite"),Wt)})}function Ui(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]}}function $i(n,i,t){n.prototype[i]=function(e){let r;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,o=""+arguments[1];if(r=B(this,a,o,t),!r)throw new w(`Graph.${i}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function zi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(r)}}function Bi(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=B(this,s,u,t),!o)throw new w(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=a,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Hi(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=B(this,s,u,t),!o)throw new w(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof a!="function")throw new C(`Graph.${i}: updater should be a function.`);return o.attributes[r]=a(o.attributes[r]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Wi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[r],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:r}),this}}function ji(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!M(r))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return a.attributes=r,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Vi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!M(r))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return I(a.attributes,r),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:r}),this}}function Ki(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof r!="function")throw new C(`Graph.${i}: provided updater is not a function.`);return a.attributes=r(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Yi=[{name:n=>`get${n}Attribute`,attacher:Ui},{name:n=>`get${n}Attributes`,attacher:$i},{name:n=>`has${n}Attribute`,attacher:zi},{name:n=>`set${n}Attribute`,attacher:Bi},{name:n=>`update${n}Attribute`,attacher:Hi},{name:n=>`remove${n}Attribute`,attacher:Wi},{name:n=>`replace${n}Attributes`,attacher:ji},{name:n=>`merge${n}Attributes`,attacher:Vi},{name:n=>`update${n}Attributes`,attacher:Ki}];function qi(n){Yi.forEach(function({name:i,attacher:t}){t(n,i("Edge"),"mixed"),t(n,i("DirectedEdge"),"directed"),t(n,i("UndirectedEdge"),"undirected")})}const Zi=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Xi(n,i,t,e){let r=!1;for(const a in i){if(a===e)continue;const o=i[a];if(r=t(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&r)return o.key}}function Ji(n,i,t,e){let r,a,o,s=!1;for(const u in i)if(u!==e){r=i[u];do{if(a=r.source,o=r.target,s=t(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected),n&&s)return r.key;r=r.next}while(r!==void 0)}}function Oe(n,i){const t=Object.keys(n),e=t.length;let r,a=0;return{[Symbol.iterator](){return this},next(){do if(r)r=r.next;else{if(a>=e)return{done:!0};const o=t[a++];if(o===i){r=void 0;continue}r=n[o]}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}}}function Qi(n,i,t,e){const r=i[t];if(!r)return;const a=r.source,o=r.target;if(e(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected)&&n)return r.key}function er(n,i,t,e){let r=i[t];if(!r)return;let a=!1;do{if(a=e(r.key,r.attributes,r.source.key,r.target.key,r.source.attributes,r.target.attributes,r.undirected),n&&a)return r.key;r=r.next}while(r!==void 0)}function Ue(n,i){let t=n[i];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const r={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:r}}};let e=!1;return{[Symbol.iterator](){return this},next(){return e===!0?{done:!0}:(e=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function tr(n,i){if(n.size===0)return[];if(i==="mixed"||i===n.type)return Array.from(n._edges.keys());const t=i==="undirected"?n.undirectedSize:n.directedSize,e=new Array(t),r=i==="undirected",a=n._edges.values();let o=0,s,u;for(;s=a.next(),s.done!==!0;)u=s.value,u.undirected===r&&(e[o++]=u.key);return e}function jt(n,i,t,e){if(i.size===0)return;const r=t!=="mixed"&&t!==i.type,a=t==="undirected";let o,s,u=!1;const h=i._edges.values();for(;o=h.next(),o.done!==!0;){if(s=o.value,r&&s.undirected!==a)continue;const{key:d,attributes:l,source:c,target:f}=s;if(u=e(d,l,c.key,f.key,c.attributes,f.attributes,s.undirected),n&&u)return d}}function ir(n,i){if(n.size===0)return ce();const t=i!=="mixed"&&i!==n.type,e=i==="undirected",r=n._edges.values();return{[Symbol.iterator](){return this},next(){let a,o;for(;;){if(a=r.next(),a.done)return a;if(o=a.value,!(t&&o.undirected!==e))break}return{value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected},done:!1}}}}function et(n,i,t,e,r,a){const o=i?Ji:Xi;let s;if(t!=="undirected"&&(e!=="out"&&(s=o(n,r.in,a),n&&s)||e!=="in"&&(s=o(n,r.out,a,e?void 0:r.key),n&&s))||t!=="directed"&&(s=o(n,r.undirected,a),n&&s))return s}function rr(n,i,t,e){const r=[];return et(!1,n,i,t,e,function(a){r.push(a)}),r}function nr(n,i,t){let e=ce();return n!=="undirected"&&(i!=="out"&&typeof t.in<"u"&&(e=Q(e,Oe(t.in))),i!=="in"&&typeof t.out<"u"&&(e=Q(e,Oe(t.out,i?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(e=Q(e,Oe(t.undirected))),e}function tt(n,i,t,e,r,a,o){const s=t?er:Qi;let u;if(i!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&(u=s(n,r.in,a,o),n&&u)||typeof r.out<"u"&&e!=="in"&&(e||r.key!==a)&&(u=s(n,r.out,a,o),n&&u))||i!=="directed"&&typeof r.undirected<"u"&&(u=s(n,r.undirected,a,o),n&&u))return u}function ar(n,i,t,e,r){const a=[];return tt(!1,n,i,t,e,r,function(o){a.push(o)}),a}function or(n,i,t,e){let r=ce();return n!=="undirected"&&(typeof t.in<"u"&&i!=="out"&&e in t.in&&(r=Q(r,Ue(t.in,e))),typeof t.out<"u"&&i!=="in"&&e in t.out&&(i||t.key!==e)&&(r=Q(r,Ue(t.out,e)))),n!=="directed"&&typeof t.undirected<"u"&&e in t.undirected&&(r=Q(r,Ue(t.undirected,e))),r}function sr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a,o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];if(!arguments.length)return tr(this,e);if(arguments.length===1){a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new w(`Graph.${t}: could not find the "${a}" node in the graph.`);return rr(this.multi,e==="mixed"?this.type:e,r,s)}if(arguments.length===2){a=""+a,o=""+o;const s=this._nodes.get(a);if(!s)throw new w(`Graph.${t}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(o))throw new w(`Graph.${t}: could not find the "${o}" target node in the graph.`);return ar(e,this.multi,r,s,o)}throw new C(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function ur(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d,l){if(!(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)){if(arguments.length===1)return l=h,jt(!1,this,e,l);if(arguments.length===2){h=""+h,l=d;const c=this._nodes.get(h);if(typeof c>"u")throw new w(`Graph.${a}: could not find the "${h}" node in the graph.`);return et(!1,this.multi,e==="mixed"?this.type:e,r,c,l)}if(arguments.length===3){h=""+h,d=""+d;const c=this._nodes.get(h);if(!c)throw new w(`Graph.${a}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(d))throw new w(`Graph.${a}: could not find the "${d}" target node in the graph.`);return tt(!1,e,this.multi,r,c,d,l)}throw new C(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop();let l;if(h.length===0){let c=0;e!=="directed"&&(c+=this.undirectedSize),e!=="undirected"&&(c+=this.directedSize),l=new Array(c);let f=0;h.push((y,b,E,k,x,T,g)=>{l[f++]=d(y,b,E,k,x,T,g)})}else l=[],h.push((c,f,y,b,E,k,x)=>{l.push(d(c,f,y,b,E,k,x))});return this[a].apply(this,h),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop(),l=[];return h.push((c,f,y,b,E,k,x)=>{d(c,f,y,b,E,k,x)&&l.push(c)}),this[a].apply(this,h),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new C(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new C(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,l;h.length===2?(d=h[0],l=h[1],h=[]):h.length===3?(d=h[1],l=h[2],h=[h[0]]):h.length===4&&(d=h[2],l=h[3],h=[h[0],h[1]]);let c=l;return h.push((f,y,b,E,k,x,T)=>{c=d(c,f,y,b,E,k,x,T)}),this[a].apply(this,h),c}}function hr(n,i){const{name:t,type:e,direction:r}=i,a="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(u,h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return!1;if(arguments.length===1)return d=u,jt(!0,this,e,d);if(arguments.length===2){u=""+u,d=h;const l=this._nodes.get(u);if(typeof l>"u")throw new w(`Graph.${a}: could not find the "${u}" node in the graph.`);return et(!0,this.multi,e==="mixed"?this.type:e,r,l,d)}if(arguments.length===3){u=""+u,h=""+h;const l=this._nodes.get(u);if(!l)throw new w(`Graph.${a}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(h))throw new w(`Graph.${a}: could not find the "${h}" target node in the graph.`);return tt(!0,e,this.multi,r,l,h,d)}throw new C(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,c,f,y,b,E,k)=>h(l,c,f,y,b,E,k)),!!this[a].apply(this,u)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,c,f,y,b,E,k)=>!h(l,c,f,y,b,E,k)),!this[a].apply(this,u)}}function dr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o,s){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return ce();if(!arguments.length)return ir(this,e);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new w(`Graph.${a}: could not find the "${o}" node in the graph.`);return nr(e,r,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new w(`Graph.${a}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new w(`Graph.${a}: could not find the "${s}" target node in the graph.`);return or(e,r,u,s)}throw new C(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function lr(n){Zi.forEach(i=>{sr(n,i),ur(n,i),hr(n,i),dr(n,i)})}const cr=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function Ne(){this.A=null,this.B=null}Ne.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};Ne.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function me(n,i,t,e,r){for(const a in e){const o=e[a],s=o.source,u=o.target,h=s===t?u:s;if(i&&i.has(h.key))continue;const d=r(h.key,h.attributes);if(n&&d)return h.key}}function it(n,i,t,e,r){if(i!=="mixed"){if(i==="undirected")return me(n,null,e,e.undirected,r);if(typeof t=="string")return me(n,null,e,e[t],r)}const a=new Ne;let o;if(i!=="undirected"){if(t!=="out"){if(o=me(n,null,e,e.in,r),n&&o)return o;a.wrap(e.in)}if(t!=="in"){if(o=me(n,a,e,e.out,r),n&&o)return o;a.wrap(e.out)}}if(i!=="directed"&&(o=me(n,a,e,e.undirected,r),n&&o))return o}function fr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof i=="string")return Object.keys(t[i])}const e=[];return it(!1,n,i,t,function(r){e.push(r)}),e}function ve(n,i,t){const e=Object.keys(t),r=e.length;let a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=r)return n&&n.wrap(t),{done:!0};const s=t[e[a++]],u=s.source,h=s.target;if(o=u===i?h:u,n&&n.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function gr(n,i,t){if(n!=="mixed"){if(n==="undirected")return ve(null,t,t.undirected);if(typeof i=="string")return ve(null,t,t[i])}let e=ce();const r=new Ne;return n!=="undirected"&&(i!=="out"&&(e=Q(e,ve(r,t,t.in))),i!=="in"&&(e=Q(e,ve(r,t,t.out)))),n!=="directed"&&(e=Q(e,ve(r,t,t.undirected))),e}function pr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];a=""+a;const o=this._nodes.get(a);if(typeof o>"u")throw new w(`Graph.${t}: could not find the "${a}" node in the graph.`);return fr(e==="mixed"?this.type:e,r,o)}}function mr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new w(`Graph.${a}: could not find the "${h}" node in the graph.`);it(!1,e==="mixed"?this.type:e,r,l,d)};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(h,d){const l=[];return this[a](h,(c,f)=>{l.push(d(c,f))}),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(h,d){const l=[];return this[a](h,(c,f)=>{d(c,f)&&l.push(c)}),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(h,d,l){if(arguments.length<3)throw new C(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let c=l;return this[a](h,(f,y)=>{c=d(c,f,y)}),c}}function vr(n,i){const{name:t,type:e,direction:r}=i,a=t[0].toUpperCase()+t.slice(1,-1),o="find"+a;n.prototype[o]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new w(`Graph.${o}: could not find the "${h}" node in the graph.`);return it(!0,e==="mixed"?this.type:e,r,l,d)};const s="some"+a;n.prototype[s]=function(h,d){return!!this[o](h,d)};const u="every"+a;n.prototype[u]=function(h,d){return!this[o](h,(c,f)=>!d(c,f))}}function yr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return ce();o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new w(`Graph.${a}: could not find the "${o}" node in the graph.`);return gr(e==="mixed"?this.type:e,r,s)}}function br(n){cr.forEach(i=>{pr(n,i),mr(n,i),vr(n,i),yr(n,i)})}function Ce(n,i,t,e,r){const a=e._nodes.values(),o=e.type;let s,u,h,d,l,c;for(;s=a.next(),s.done!==!0;){let f=!1;if(u=s.value,o!=="undirected"){d=u.out;for(h in d){l=d[h];do c=l.target,f=!0,r(u.key,c.key,u.attributes,c.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}if(o!=="directed"){d=u.undirected;for(h in d)if(!(i&&u.key>h)){l=d[h];do c=l.target,c.key!==h&&(c=l.source),f=!0,r(u.key,c.key,u.attributes,c.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}t&&!f&&r(u.key,null,u.attributes,null,null,null,null)}}function wr(n,i){const t={key:n};return Ot(i.attributes)||(t.attributes=I({},i.attributes)),t}function Er(n,i,t){const e={key:i,source:t.source.key,target:t.target.key};return Ot(t.attributes)||(e.attributes=I({},t.attributes)),n==="mixed"&&t.undirected&&(e.undirected=!0),e}function _r(n){if(!M(n))throw new C('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new C("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!M(n.attributes)||n.attributes===null))throw new C("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function xr(n){if(!M(n))throw new C('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new C("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new C("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!M(n.attributes)||n.attributes===null))throw new C("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new C("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const Tr=Si(),Cr=new Set(["directed","undirected","mixed"]),dt=new Set(["domain","_events","_eventsCount","_maxListeners"]),Sr=[{name:n=>`${n}Edge`,generateKey:!0},{name:n=>`${n}DirectedEdge`,generateKey:!0,type:"directed"},{name:n=>`${n}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:n=>`${n}EdgeWithKey`},{name:n=>`${n}DirectedEdgeWithKey`,type:"directed"},{name:n=>`${n}UndirectedEdgeWithKey`,type:"undirected"}],kr={allowSelfLoops:!0,multi:!1,type:"mixed"};function Ar(n,i,t){if(t&&!M(t))throw new C(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(i=""+i,t=t||{},n._nodes.has(i))throw new R(`Graph.addNode: the "${i}" node already exist in the graph.`);const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function lt(n,i,t){const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function Vt(n,i,t,e,r,a,o,s){if(!e&&n.type==="undirected")throw new R(`Graph.${i}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new R(`Graph.${i}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!M(s))throw new C(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`);if(a=""+a,o=""+o,s=s||{},!n.allowSelfLoops&&a===o)throw new R(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=n._nodes.get(a),h=n._nodes.get(o);if(!u)throw new w(`Graph.${i}: source node "${a}" not found.`);if(!h)throw new w(`Graph.${i}: target node "${o}" not found.`);const d={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new R(`Graph.${i}: the "${r}" edge already exists in the graph.`);if(!n.multi&&(e?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new R(`Graph.${i}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const l=new fe(e,r,u,h,s);n._edges.set(r,l);const c=a===o;return e?(u.undirectedDegree++,h.undirectedDegree++,c&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,h.inDegree++,c&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),e?n._undirectedSize++:n._directedSize++,d.key=r,n.emit("edgeAdded",d),r}function Rr(n,i,t,e,r,a,o,s,u){if(!e&&n.type==="undirected")throw new R(`Graph.${i}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new R(`Graph.${i}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(u){if(typeof s!="function")throw new C(`Graph.${i}: invalid updater function. Expecting a function but got "${s}"`)}else if(!M(s))throw new C(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`)}a=""+a,o=""+o;let h;if(u&&(h=s,s=void 0),!n.allowSelfLoops&&a===o)throw new R(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=n._nodes.get(a),l=n._nodes.get(o),c,f;if(!t&&(c=n._edges.get(r),c)){if((c.source.key!==a||c.target.key!==o)&&(!e||c.source.key!==o||c.target.key!==a))throw new R(`Graph.${i}: inconsistency detected when attempting to merge the "${r}" edge with "${a}" source & "${o}" target vs. ("${c.source.key}", "${c.target.key}").`);f=c}if(!f&&!n.multi&&d&&(f=e?d.undirected[o]:d.out[o]),f){const x=[f.key,!1,!1,!1];if(u?!h:!s)return x;if(u){const T=f.attributes;f.attributes=h(T),n.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else I(f.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:s});return x}s=s||{},u&&h&&(s=h(s));const y={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new R(`Graph.${i}: the "${r}" edge already exists in the graph.`);let b=!1,E=!1;d||(d=lt(n,a,{}),b=!0,a===o&&(l=d,E=!0)),l||(l=lt(n,o,{}),E=!0),c=new fe(e,r,d,l,s),n._edges.set(r,c);const k=a===o;return e?(d.undirectedDegree++,l.undirectedDegree++,k&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,l.inDegree++,k&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?c.attachMulti():c.attach(),e?n._undirectedSize++:n._directedSize++,y.key=r,n.emit("edgeAdded",y),[r,!0,b,E]}function ue(n,i){n._edges.delete(i.key);const{source:t,target:e,attributes:r}=i,a=i.undirected,o=t===e;a?(t.undirectedDegree--,e.undirectedDegree--,o&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,e.inDegree--,o&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?i.detachMulti():i.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:i.key,attributes:r,source:t.key,target:e.key,undirected:a})}class N extends Mt.EventEmitter{constructor(i){if(super(),i=I({},kr,i),typeof i.multi!="boolean")throw new C(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${i.multi}".`);if(!Cr.has(i.type))throw new C(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${i.type}".`);if(typeof i.allowSelfLoops!="boolean")throw new C(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${i.allowSelfLoops}".`);const t=i.type==="mixed"?Ut:i.type==="directed"?$t:zt;z(this,"NodeDataClass",t);const e="geid_"+Tr()+"_";let r=0;const a=()=>{let o;do o=e+r++;while(this._edges.has(o));return o};z(this,"_attributes",{}),z(this,"_nodes",new Map),z(this,"_edges",new Map),z(this,"_directedSize",0),z(this,"_undirectedSize",0),z(this,"_directedSelfLoopCount",0),z(this,"_undirectedSelfLoopCount",0),z(this,"_edgeKeyGenerator",a),z(this,"_options",i),dt.forEach(o=>z(this,o,this[o])),V(this,"order",()=>this._nodes.size),V(this,"size",()=>this._edges.size),V(this,"directedSize",()=>this._directedSize),V(this,"undirectedSize",()=>this._undirectedSize),V(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),V(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),V(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),V(this,"multi",this._options.multi),V(this,"type",this._options.type),V(this,"allowSelfLoops",this._options.allowSelfLoops),V(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(i){return this._nodes.has(""+i)}hasDirectedEdge(i,t){if(this.type==="undirected")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&!r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.out.hasOwnProperty(t):!1}throw new C(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(i,t){if(this.type==="directed")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.undirected.hasOwnProperty(t):!1}throw new C(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(i,t){if(arguments.length===1){const e=""+i;return this._edges.has(e)}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?typeof e.out<"u"&&e.out.hasOwnProperty(t)||typeof e.undirected<"u"&&e.undirected.hasOwnProperty(t):!1}throw new C(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(i,t){if(this.type==="undirected")return;if(i=""+i,t=""+t,this.multi)throw new R("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const e=this._nodes.get(i);if(!e)throw new w(`Graph.directedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new w(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||void 0;if(r)return r.key}undirectedEdge(i,t){if(this.type==="directed")return;if(i=""+i,t=""+t,this.multi)throw new R("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const e=this._nodes.get(i);if(!e)throw new w(`Graph.undirectedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new w(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=e.undirected&&e.undirected[t]||void 0;if(r)return r.key}edge(i,t){if(this.multi)throw new R("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.edge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new w(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||e.undirected&&e.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areDirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in||t in e.out}areOutNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areOutNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.out}areInNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areInNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in}areUndirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areUndirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="directed"?!1:t in e.undirected}areNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&(t in e.in||t in e.out)||this.type!=="directed"&&t in e.undirected}areInboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areInboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.in||this.type!=="directed"&&t in e.undirected}areOutboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areOutboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.out||this.type!=="directed"&&t in e.undirected}inDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.directedDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.undirectedDegree: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree),e}outboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.outDegree),e}degree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.degree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree),e}inDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.directedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree,r+=t.directedLoops),e-r}outboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.outDegree,r+=t.directedLoops),e-r}degreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.degreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree,r+=t.directedLoops*2),e-r}source(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.source: could not find the "${i}" edge in the graph.`);return t.source.key}target(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.target: could not find the "${i}" edge in the graph.`);return t.target.key}extremities(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.extremities: could not find the "${i}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(i,t){i=""+i,t=""+t;const e=this._edges.get(t);if(!e)throw new w(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=e.source.key,a=e.target.key;if(i===r)return a;if(i===a)return r;throw new w(`Graph.opposite: the "${i}" node is not attached to the "${t}" edge (${r}, ${a}).`)}hasExtremity(i,t){i=""+i,t=""+t;const e=this._edges.get(i);if(!e)throw new w(`Graph.hasExtremity: could not find the "${i}" edge in the graph.`);return e.source.key===t||e.target.key===t}isUndirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.isUndirected: could not find the "${i}" edge in the graph.`);return t.undirected}isDirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.isDirected: could not find the "${i}" edge in the graph.`);return!t.undirected}isSelfLoop(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.isSelfLoop: could not find the "${i}" edge in the graph.`);return t.source===t.target}addNode(i,t){return Ar(this,i,t).key}mergeNode(i,t){if(t&&!M(t))throw new C(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);i=""+i,t=t||{};let e=this._nodes.get(i);return e?(t&&(I(e.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:i,attributes:e.attributes,data:t})),[i,!1]):(e=new this.NodeDataClass(i,t),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:t}),[i,!0])}updateNode(i,t){if(t&&typeof t!="function")throw new C(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);i=""+i;let e=this._nodes.get(i);if(e){if(t){const a=e.attributes;e.attributes=t(a),this.emit("nodeAttributesUpdated",{type:"replace",key:i,attributes:e.attributes})}return[i,!1]}const r=t?t({}):{};return e=new this.NodeDataClass(i,r),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:r}),[i,!0]}dropNode(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.dropNode: could not find the "${i}" node in the graph.`);let e;if(this.type!=="undirected"){for(const r in t.out){e=t.out[r];do ue(this,e),e=e.next;while(e)}for(const r in t.in){e=t.in[r];do ue(this,e),e=e.next;while(e)}}if(this.type!=="directed")for(const r in t.undirected){e=t.undirected[r];do ue(this,e),e=e.next;while(e)}this._nodes.delete(i),this.emit("nodeDropped",{key:i,attributes:t.attributes})}dropEdge(i){let t;if(arguments.length>1){const e=""+arguments[0],r=""+arguments[1];if(t=B(this,e,r,this.type),!t)throw new w(`Graph.dropEdge: could not find the "${e}" -> "${r}" edge in the graph.`)}else if(i=""+i,t=this._edges.get(i),!t)throw new w(`Graph.dropEdge: could not find the "${i}" edge in the graph.`);return ue(this,t),this}dropDirectedEdge(i,t){if(arguments.length<2)throw new R("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new R("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");i=""+i,t=""+t;const e=B(this,i,t,"directed");if(!e)throw new w(`Graph.dropDirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}dropUndirectedEdge(i,t){if(arguments.length<2)throw new R("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new R("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const e=B(this,i,t,"undirected");if(!e)throw new w(`Graph.dropUndirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const i=this._nodes.values();let t;for(;t=i.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(i){return this._attributes[i]}getAttributes(){return this._attributes}hasAttribute(i){return this._attributes.hasOwnProperty(i)}setAttribute(i,t){return this._attributes[i]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}updateAttribute(i,t){if(typeof t!="function")throw new C("Graph.updateAttribute: updater should be a function.");const e=this._attributes[i];return this._attributes[i]=t(e),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}removeAttribute(i){return delete this._attributes[i],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:i}),this}replaceAttributes(i){if(!M(i))throw new C("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=i,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(i){if(!M(i))throw new C("Graph.mergeAttributes: provided attributes are not a plain object.");return I(this._attributes,i),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:i}),this}updateAttributes(i){if(typeof i!="function")throw new C("Graph.updateAttributes: provided updater is not a function.");return this._attributes=i(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(i,t){if(typeof i!="function")throw new C("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!ht(t))throw new C("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._nodes.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,a.attributes=i(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(i,t){if(typeof i!="function")throw new C("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!ht(t))throw new C("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._edges.values();let r,a,o,s;for(;r=e.next(),r.done!==!0;)a=r.value,o=a.source,s=a.target,a.attributes=i(a.key,a.attributes,o.key,s.key,o.attributes,s.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(i){if(typeof i!="function")throw new C("Graph.forEachAdjacencyEntry: expecting a callback.");Ce(!1,!1,!1,this,i)}forEachAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new C("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Ce(!1,!1,!0,this,i)}forEachAssymetricAdjacencyEntry(i){if(typeof i!="function")throw new C("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Ce(!1,!0,!1,this,i)}forEachAssymetricAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new C("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Ce(!1,!0,!0,this,i)}nodes(){return Array.from(this._nodes.keys())}forEachNode(i){if(typeof i!="function")throw new C("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)}findNode(i){if(typeof i!="function")throw new C("Graph.findNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return r.key}mapNodes(i){if(typeof i!="function")throw new C("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let e,r;const a=new Array(this.order);let o=0;for(;e=t.next(),e.done!==!0;)r=e.value,a[o++]=i(r.key,r.attributes);return a}someNode(i){if(typeof i!="function")throw new C("Graph.someNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return!0;return!1}everyNode(i){if(typeof i!="function")throw new C("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,!i(r.key,r.attributes))return!1;return!0}filterNodes(i){if(typeof i!="function")throw new C("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let e,r;const a=[];for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)&&a.push(r.key);return a}reduceNodes(i,t){if(typeof i!="function")throw new C("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new C("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=t;const r=this._nodes.values();let a,o;for(;a=r.next(),a.done!==!0;)o=a.value,e=i(e,o.key,o.attributes);return e}nodeEntries(){const i=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=i.next();if(t.done)return t;const e=t.value;return{value:{node:e.key,attributes:e.attributes},done:!1}}}}export(){const i=new Array(this._nodes.size);let t=0;this._nodes.forEach((r,a)=>{i[t++]=wr(a,r)});const e=new Array(this._edges.size);return t=0,this._edges.forEach((r,a)=>{e[t++]=Er(this.type,a,r)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:i,edges:e}}import(i,t=!1){if(i instanceof N)return i.forEachNode((u,h)=>{t?this.mergeNode(u,h):this.addNode(u,h)}),i.forEachEdge((u,h,d,l,c,f,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,l,h):this.mergeDirectedEdgeWithKey(u,d,l,h):y?this.addUndirectedEdgeWithKey(u,d,l,h):this.addDirectedEdgeWithKey(u,d,l,h)}),this;if(!M(i))throw new C("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(i.attributes){if(!M(i.attributes))throw new C("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(i.attributes):this.replaceAttributes(i.attributes)}let e,r,a,o,s;if(i.nodes){if(a=i.nodes,!Array.isArray(a))throw new C("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=a.length;e{const a=I({},e.attributes);e=new t.NodeDataClass(r,a),t._nodes.set(r,e)}),t}copy(i){if(i=i||{},typeof i.type=="string"&&i.type!==this.type&&i.type!=="mixed")throw new R(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${i.type}" because this would mean losing information about the current graph.`);if(typeof i.multi=="boolean"&&i.multi!==this.multi&&i.multi!==!0)throw new R("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof i.allowSelfLoops=="boolean"&&i.allowSelfLoops!==this.allowSelfLoops&&i.allowSelfLoops!==!0)throw new R("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(i),e=this._edges.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,Vt(t,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,I({},a.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const i={};this._nodes.forEach((a,o)=>{i[o]=a.attributes});const t={},e={};this._edges.forEach((a,o)=>{const s=a.undirected?"--":"->";let u="",h=a.source.key,d=a.target.key,l;a.undirected&&h>d&&(l=h,h=d,d=l);const c=`(${h})${s}(${d})`;o.startsWith("geid_")?this.multi&&(typeof e[c]>"u"?e[c]=0:e[c]++,u+=`${e[c]}. `):u+=`[${o}]: `,u+=c,t[u]=a.attributes});const r={};for(const a in this)this.hasOwnProperty(a)&&!dt.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(r[a]=this[a]);return r.attributes=this._attributes,r.nodes=i,r.edges=t,z(r,"constructor",this.constructor),r}}typeof Symbol<"u"&&(N.prototype[Symbol.for("nodejs.util.inspect.custom")]=N.prototype.inspect);Sr.forEach(n=>{["add","merge","update"].forEach(i=>{const t=n.name(i),e=i==="add"?Vt:Rr;n.generateKey?N.prototype[t]=function(r,a,o){return e(this,t,!0,(n.type||this.type)==="undirected",null,r,a,o,i==="update")}:N.prototype[t]=function(r,a,o,s){return e(this,t,!1,(n.type||this.type)==="undirected",r,a,o,s,i==="update")}})});Oi(N);qi(N);lr(N);br(N);class Kt extends N{constructor(i){const t=I({type:"directed"},i);if("multi"in t&&t.multi!==!1)throw new C("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new C('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Yt extends N{constructor(i){const t=I({type:"undirected"},i);if("multi"in t&&t.multi!==!1)throw new C("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new C('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class qt extends N{constructor(i){const t=I({multi:!0},i);if("multi"in t&&t.multi!==!0)throw new C("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Zt extends N{constructor(i){const t=I({type:"directed",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new C("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new C('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Xt extends N{constructor(i){const t=I({type:"undirected",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new C("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new C('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function ge(n){n.from=function(i,t){const e=I({},i.options,t),r=new n(e);return r.import(i),r}}ge(N);ge(Kt);ge(Yt);ge(qt);ge(Zt);ge(Xt);N.Graph=N;N.DirectedGraph=Kt;N.UndirectedGraph=Yt;N.MultiGraph=qt;N.MultiDirectedGraph=Zt;N.MultiUndirectedGraph=Xt;N.InvalidArgumentsGraphError=C;N.NotFoundGraphError=w;N.UsageGraphError=R;function Lr(n,i){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,i);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function _e(n){var i=Lr(n,"string");return typeof i=="symbol"?i:i+""}function U(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function ct(n,i){for(var t=0;tn.length)&&(i=n.length);for(var t=0,e=Array(i);t>8&255,a=t>>16&255,o=t>>24&255;return[e,r,a,o]}var ze={};function ri(n){if(typeof ze[n]<"u")return ze[n];var i=(n&16711680)>>>16,t=(n&65280)>>>8,e=n&255,r=255,a=ii(i,t,e,r);return ze[n]=a,a}function ft(n,i,t,e){return t+(i<<8)+(n<<16)}function gt(n,i,t,e,r,a){var o=Math.floor(t/a*r),s=Math.floor(n.drawingBufferHeight/a-e/a*r),u=new Uint8Array(4);n.bindFramebuffer(n.FRAMEBUFFER,i),n.readPixels(o,s,1,1,n.RGBA,n.UNSIGNED_BYTE,u);var h=le(u,4),d=h[0],l=h[1],c=h[2],f=h[3];return[d,l,c,f]}function m(n,i,t){return(i=_e(i))in n?Object.defineProperty(n,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[i]=t,n}function pt(n,i){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,e)}return t}function S(n){for(var i=1;i0&&(L=v[0]),L instanceof Error)throw L;var F=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw F.context=L,F}var P=D[p];if(P===void 0)return!1;if(typeof P=="function")i(P,this,v);else for(var q=P.length,O=y(P,q),_=0;_0&&L.length>A&&!L.warned){L.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=g,F.type=p,F.count=L.length,e(F)}return g}a.prototype.addListener=function(p,v){return h(this,p,v,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(p,v){return h(this,p,v,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(g,p,v){var _={fired:!1,wrapFn:void 0,target:g,type:p,listener:v},A=d.bind(_);return A.listener=v,_.wrapFn=A,A}a.prototype.once=function(p,v){return s(v),this.on(p,l(this,p,v)),this},a.prototype.prependOnceListener=function(p,v){return s(v),this.prependListener(p,l(this,p,v)),this},a.prototype.removeListener=function(p,v){var _,A,D,L,F;if(s(v),A=this._events,A===void 0)return this;if(_=A[p],_===void 0)return this;if(_===v||_.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete A[p],A.removeListener&&this.emit("removeListener",p,_.listener||v));else if(typeof _!="function"){for(D=-1,L=_.length-1;L>=0;L--)if(_[L]===v||_[L].listener===v){F=_[L].listener,D=L;break}if(D<0)return this;D===0?_.shift():b(_,D),_.length===1&&(A[p]=_[0]),A.removeListener!==void 0&&this.emit("removeListener",p,F||v)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(p){var v,_,A;if(_=this._events,_===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete _[p]),this;if(arguments.length===0){var D=Object.keys(_),L;for(A=0;A=0;A--)this.removeListener(p,v[A]);return this};function c(g,p,v){var _=g._events;if(_===void 0)return[];var A=_[p];return A===void 0?[]:typeof A=="function"?v?[A.listener||A]:[A]:v?E(A):y(A,A.length)}a.prototype.listeners=function(p){return c(this,p,!0)},a.prototype.rawListeners=function(p){return c(this,p,!1)},a.listenerCount=function(g,p){return typeof g.listenerCount=="function"?g.listenerCount(p):f.call(g,p)},a.prototype.listenerCount=f;function f(g){var p=this._events;if(p!==void 0){var v=p[g];if(typeof v=="function")return 1;if(v!==void 0)return v.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(g,p){for(var v=new Array(p),_=0;_n++}function Q(){const n=arguments;let i=null,t=-1;return{[Symbol.iterator](){return this},next(){let e=null;do{if(i===null){if(t++,t>=n.length)return{done:!0};i=n[t][Symbol.iterator]()}if(e=i.next(),e.done){i=null;continue}break}while(!0);return e}}}function ce(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Qe extends Error{constructor(i){super(),this.name="GraphError",this.message=i}}class C extends Qe{constructor(i){super(i),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,C.prototype.constructor)}}class w extends Qe{constructor(i){super(i),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,w.prototype.constructor)}}class R extends Qe{constructor(i){super(i),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,R.prototype.constructor)}}function zt(n,i){this.key=n,this.attributes=i,this.clear()}zt.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Bt(n,i){this.key=n,this.attributes=i,this.clear()}Bt.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function Ht(n,i){this.key=n,this.attributes=i,this.clear()}Ht.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function fe(n,i,t,e,r){this.key=i,this.attributes=r,this.undirected=n,this.source=t,this.target=e}fe.prototype.attach=function(){let n="out",i="in";this.undirected&&(n=i="undirected");const t=this.source.key,e=this.target.key;this.source[n][e]=this,!(this.undirected&&t===e)&&(this.target[i][t]=this)};fe.prototype.attachMulti=function(){let n="out",i="in";const t=this.source.key,e=this.target.key;this.undirected&&(n=i="undirected");const r=this.source[n],a=r[e];if(typeof a>"u"){r[e]=this,this.undirected&&t===e||(this.target[i][t]=this);return}a.previous=this,this.next=a,r[e]=this,this.target[i][t]=this};fe.prototype.detach=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),delete this.source[t][i],delete this.target[e][n]};fe.prototype.detachMulti=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][i],delete this.target[e][n]):(this.next.previous=void 0,this.source[t][i]=this.next,this.target[e][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Wt=0,jt=1,Ri=2,Vt=3;function ee(n,i,t,e,r,a,o){let s,u,h,d;if(e=""+e,t===Wt){if(s=n._nodes.get(e),!s)throw new w(`Graph.${i}: could not find the "${e}" node in the graph.`);h=r,d=a}else if(t===Vt){if(r=""+r,u=n._edges.get(r),!u)throw new w(`Graph.${i}: could not find the "${r}" edge in the graph.`);const l=u.source.key,c=u.target.key;if(e===l)s=u.target;else if(e===c)s=u.source;else throw new w(`Graph.${i}: the "${e}" node is not attached to the "${r}" edge (${l}, ${c}).`);h=a,d=o}else{if(u=n._edges.get(e),!u)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`);t===jt?s=u.source:s=u.target,h=r,d=a}return[s,h,d]}function Li(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes[s]}}function Di(n,i,t){n.prototype[i]=function(e,r){const[a]=ee(this,i,t,e,r);return a.attributes}}function Ni(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes.hasOwnProperty(s)}}function Gi(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);return s.attributes[u]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Fi(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);if(typeof h!="function")throw new C(`Graph.${i}: updater should be a function.`);const d=s.attributes,l=h(d[u]);return d[u]=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Pi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}function Ii(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!M(s))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Mi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!M(s))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return I(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}function Oi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(typeof s!="function")throw new C(`Graph.${i}: provided updater is not a function.`);return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const Ui=[{name:n=>`get${n}Attribute`,attacher:Li},{name:n=>`get${n}Attributes`,attacher:Di},{name:n=>`has${n}Attribute`,attacher:Ni},{name:n=>`set${n}Attribute`,attacher:Gi},{name:n=>`update${n}Attribute`,attacher:Fi},{name:n=>`remove${n}Attribute`,attacher:Pi},{name:n=>`replace${n}Attributes`,attacher:Ii},{name:n=>`merge${n}Attributes`,attacher:Mi},{name:n=>`update${n}Attributes`,attacher:Oi}];function $i(n){Ui.forEach(function({name:i,attacher:t}){t(n,i("Node"),Wt),t(n,i("Source"),jt),t(n,i("Target"),Ri),t(n,i("Opposite"),Vt)})}function zi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]}}function Bi(n,i,t){n.prototype[i]=function(e){let r;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,o=""+arguments[1];if(r=B(this,a,o,t),!r)throw new w(`Graph.${i}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function Hi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(r)}}function Wi(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=B(this,s,u,t),!o)throw new w(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=a,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function ji(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=B(this,s,u,t),!o)throw new w(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof a!="function")throw new C(`Graph.${i}: updater should be a function.`);return o.attributes[r]=a(o.attributes[r]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Vi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[r],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:r}),this}}function Ki(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!M(r))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return a.attributes=r,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Yi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!M(r))throw new C(`Graph.${i}: provided attributes are not a plain object.`);return I(a.attributes,r),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:r}),this}}function qi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new R(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new R(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=B(this,o,s,t),!a)throw new w(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new R(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new w(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof r!="function")throw new C(`Graph.${i}: provided updater is not a function.`);return a.attributes=r(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Zi=[{name:n=>`get${n}Attribute`,attacher:zi},{name:n=>`get${n}Attributes`,attacher:Bi},{name:n=>`has${n}Attribute`,attacher:Hi},{name:n=>`set${n}Attribute`,attacher:Wi},{name:n=>`update${n}Attribute`,attacher:ji},{name:n=>`remove${n}Attribute`,attacher:Vi},{name:n=>`replace${n}Attributes`,attacher:Ki},{name:n=>`merge${n}Attributes`,attacher:Yi},{name:n=>`update${n}Attributes`,attacher:qi}];function Xi(n){Zi.forEach(function({name:i,attacher:t}){t(n,i("Edge"),"mixed"),t(n,i("DirectedEdge"),"directed"),t(n,i("UndirectedEdge"),"undirected")})}const Ji=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Qi(n,i,t,e){let r=!1;for(const a in i){if(a===e)continue;const o=i[a];if(r=t(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&r)return o.key}}function er(n,i,t,e){let r,a,o,s=!1;for(const u in i)if(u!==e){r=i[u];do{if(a=r.source,o=r.target,s=t(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected),n&&s)return r.key;r=r.next}while(r!==void 0)}}function Oe(n,i){const t=Object.keys(n),e=t.length;let r,a=0;return{[Symbol.iterator](){return this},next(){do if(r)r=r.next;else{if(a>=e)return{done:!0};const o=t[a++];if(o===i){r=void 0;continue}r=n[o]}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}}}function tr(n,i,t,e){const r=i[t];if(!r)return;const a=r.source,o=r.target;if(e(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected)&&n)return r.key}function ir(n,i,t,e){let r=i[t];if(!r)return;let a=!1;do{if(a=e(r.key,r.attributes,r.source.key,r.target.key,r.source.attributes,r.target.attributes,r.undirected),n&&a)return r.key;r=r.next}while(r!==void 0)}function Ue(n,i){let t=n[i];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const r={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:r}}};let e=!1;return{[Symbol.iterator](){return this},next(){return e===!0?{done:!0}:(e=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function rr(n,i){if(n.size===0)return[];if(i==="mixed"||i===n.type)return Array.from(n._edges.keys());const t=i==="undirected"?n.undirectedSize:n.directedSize,e=new Array(t),r=i==="undirected",a=n._edges.values();let o=0,s,u;for(;s=a.next(),s.done!==!0;)u=s.value,u.undirected===r&&(e[o++]=u.key);return e}function Kt(n,i,t,e){if(i.size===0)return;const r=t!=="mixed"&&t!==i.type,a=t==="undirected";let o,s,u=!1;const h=i._edges.values();for(;o=h.next(),o.done!==!0;){if(s=o.value,r&&s.undirected!==a)continue;const{key:d,attributes:l,source:c,target:f}=s;if(u=e(d,l,c.key,f.key,c.attributes,f.attributes,s.undirected),n&&u)return d}}function nr(n,i){if(n.size===0)return ce();const t=i!=="mixed"&&i!==n.type,e=i==="undirected",r=n._edges.values();return{[Symbol.iterator](){return this},next(){let a,o;for(;;){if(a=r.next(),a.done)return a;if(o=a.value,!(t&&o.undirected!==e))break}return{value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected},done:!1}}}}function et(n,i,t,e,r,a){const o=i?er:Qi;let s;if(t!=="undirected"&&(e!=="out"&&(s=o(n,r.in,a),n&&s)||e!=="in"&&(s=o(n,r.out,a,e?void 0:r.key),n&&s))||t!=="directed"&&(s=o(n,r.undirected,a),n&&s))return s}function ar(n,i,t,e){const r=[];return et(!1,n,i,t,e,function(a){r.push(a)}),r}function or(n,i,t){let e=ce();return n!=="undirected"&&(i!=="out"&&typeof t.in<"u"&&(e=Q(e,Oe(t.in))),i!=="in"&&typeof t.out<"u"&&(e=Q(e,Oe(t.out,i?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(e=Q(e,Oe(t.undirected))),e}function tt(n,i,t,e,r,a,o){const s=t?ir:tr;let u;if(i!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&(u=s(n,r.in,a,o),n&&u)||typeof r.out<"u"&&e!=="in"&&(e||r.key!==a)&&(u=s(n,r.out,a,o),n&&u))||i!=="directed"&&typeof r.undirected<"u"&&(u=s(n,r.undirected,a,o),n&&u))return u}function sr(n,i,t,e,r){const a=[];return tt(!1,n,i,t,e,r,function(o){a.push(o)}),a}function ur(n,i,t,e){let r=ce();return n!=="undirected"&&(typeof t.in<"u"&&i!=="out"&&e in t.in&&(r=Q(r,Ue(t.in,e))),typeof t.out<"u"&&i!=="in"&&e in t.out&&(i||t.key!==e)&&(r=Q(r,Ue(t.out,e)))),n!=="directed"&&typeof t.undirected<"u"&&e in t.undirected&&(r=Q(r,Ue(t.undirected,e))),r}function hr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a,o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];if(!arguments.length)return rr(this,e);if(arguments.length===1){a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new w(`Graph.${t}: could not find the "${a}" node in the graph.`);return ar(this.multi,e==="mixed"?this.type:e,r,s)}if(arguments.length===2){a=""+a,o=""+o;const s=this._nodes.get(a);if(!s)throw new w(`Graph.${t}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(o))throw new w(`Graph.${t}: could not find the "${o}" target node in the graph.`);return sr(e,this.multi,r,s,o)}throw new C(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function dr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d,l){if(!(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)){if(arguments.length===1)return l=h,Kt(!1,this,e,l);if(arguments.length===2){h=""+h,l=d;const c=this._nodes.get(h);if(typeof c>"u")throw new w(`Graph.${a}: could not find the "${h}" node in the graph.`);return et(!1,this.multi,e==="mixed"?this.type:e,r,c,l)}if(arguments.length===3){h=""+h,d=""+d;const c=this._nodes.get(h);if(!c)throw new w(`Graph.${a}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(d))throw new w(`Graph.${a}: could not find the "${d}" target node in the graph.`);return tt(!1,e,this.multi,r,c,d,l)}throw new C(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop();let l;if(h.length===0){let c=0;e!=="directed"&&(c+=this.undirectedSize),e!=="undirected"&&(c+=this.directedSize),l=new Array(c);let f=0;h.push((y,b,E,k,x,T,g)=>{l[f++]=d(y,b,E,k,x,T,g)})}else l=[],h.push((c,f,y,b,E,k,x)=>{l.push(d(c,f,y,b,E,k,x))});return this[a].apply(this,h),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop(),l=[];return h.push((c,f,y,b,E,k,x)=>{d(c,f,y,b,E,k,x)&&l.push(c)}),this[a].apply(this,h),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new C(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new C(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,l;h.length===2?(d=h[0],l=h[1],h=[]):h.length===3?(d=h[1],l=h[2],h=[h[0]]):h.length===4&&(d=h[2],l=h[3],h=[h[0],h[1]]);let c=l;return h.push((f,y,b,E,k,x,T)=>{c=d(c,f,y,b,E,k,x,T)}),this[a].apply(this,h),c}}function lr(n,i){const{name:t,type:e,direction:r}=i,a="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(u,h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return!1;if(arguments.length===1)return d=u,Kt(!0,this,e,d);if(arguments.length===2){u=""+u,d=h;const l=this._nodes.get(u);if(typeof l>"u")throw new w(`Graph.${a}: could not find the "${u}" node in the graph.`);return et(!0,this.multi,e==="mixed"?this.type:e,r,l,d)}if(arguments.length===3){u=""+u,h=""+h;const l=this._nodes.get(u);if(!l)throw new w(`Graph.${a}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(h))throw new w(`Graph.${a}: could not find the "${h}" target node in the graph.`);return tt(!0,e,this.multi,r,l,h,d)}throw new C(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,c,f,y,b,E,k)=>h(l,c,f,y,b,E,k)),!!this[a].apply(this,u)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((l,c,f,y,b,E,k)=>!h(l,c,f,y,b,E,k)),!this[a].apply(this,u)}}function cr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o,s){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return ce();if(!arguments.length)return nr(this,e);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new w(`Graph.${a}: could not find the "${o}" node in the graph.`);return or(e,r,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new w(`Graph.${a}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new w(`Graph.${a}: could not find the "${s}" target node in the graph.`);return ur(e,r,u,s)}throw new C(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function fr(n){Ji.forEach(i=>{hr(n,i),dr(n,i),lr(n,i),cr(n,i)})}const gr=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function Ne(){this.A=null,this.B=null}Ne.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};Ne.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function me(n,i,t,e,r){for(const a in e){const o=e[a],s=o.source,u=o.target,h=s===t?u:s;if(i&&i.has(h.key))continue;const d=r(h.key,h.attributes);if(n&&d)return h.key}}function it(n,i,t,e,r){if(i!=="mixed"){if(i==="undirected")return me(n,null,e,e.undirected,r);if(typeof t=="string")return me(n,null,e,e[t],r)}const a=new Ne;let o;if(i!=="undirected"){if(t!=="out"){if(o=me(n,null,e,e.in,r),n&&o)return o;a.wrap(e.in)}if(t!=="in"){if(o=me(n,a,e,e.out,r),n&&o)return o;a.wrap(e.out)}}if(i!=="directed"&&(o=me(n,a,e,e.undirected,r),n&&o))return o}function pr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof i=="string")return Object.keys(t[i])}const e=[];return it(!1,n,i,t,function(r){e.push(r)}),e}function ve(n,i,t){const e=Object.keys(t),r=e.length;let a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=r)return n&&n.wrap(t),{done:!0};const s=t[e[a++]],u=s.source,h=s.target;if(o=u===i?h:u,n&&n.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function mr(n,i,t){if(n!=="mixed"){if(n==="undirected")return ve(null,t,t.undirected);if(typeof i=="string")return ve(null,t,t[i])}let e=ce();const r=new Ne;return n!=="undirected"&&(i!=="out"&&(e=Q(e,ve(r,t,t.in))),i!=="in"&&(e=Q(e,ve(r,t,t.out)))),n!=="directed"&&(e=Q(e,ve(r,t,t.undirected))),e}function vr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];a=""+a;const o=this._nodes.get(a);if(typeof o>"u")throw new w(`Graph.${t}: could not find the "${a}" node in the graph.`);return pr(e==="mixed"?this.type:e,r,o)}}function yr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new w(`Graph.${a}: could not find the "${h}" node in the graph.`);it(!1,e==="mixed"?this.type:e,r,l,d)};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(h,d){const l=[];return this[a](h,(c,f)=>{l.push(d(c,f))}),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(h,d){const l=[];return this[a](h,(c,f)=>{d(c,f)&&l.push(c)}),l};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(h,d,l){if(arguments.length<3)throw new C(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let c=l;return this[a](h,(f,y)=>{c=d(c,f,y)}),c}}function br(n,i){const{name:t,type:e,direction:r}=i,a=t[0].toUpperCase()+t.slice(1,-1),o="find"+a;n.prototype[o]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const l=this._nodes.get(h);if(typeof l>"u")throw new w(`Graph.${o}: could not find the "${h}" node in the graph.`);return it(!0,e==="mixed"?this.type:e,r,l,d)};const s="some"+a;n.prototype[s]=function(h,d){return!!this[o](h,d)};const u="every"+a;n.prototype[u]=function(h,d){return!this[o](h,(c,f)=>!d(c,f))}}function wr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return ce();o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new w(`Graph.${a}: could not find the "${o}" node in the graph.`);return mr(e==="mixed"?this.type:e,r,s)}}function Er(n){gr.forEach(i=>{vr(n,i),yr(n,i),br(n,i),wr(n,i)})}function Ce(n,i,t,e,r){const a=e._nodes.values(),o=e.type;let s,u,h,d,l,c;for(;s=a.next(),s.done!==!0;){let f=!1;if(u=s.value,o!=="undirected"){d=u.out;for(h in d){l=d[h];do c=l.target,f=!0,r(u.key,c.key,u.attributes,c.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}if(o!=="directed"){d=u.undirected;for(h in d)if(!(i&&u.key>h)){l=d[h];do c=l.target,c.key!==h&&(c=l.source),f=!0,r(u.key,c.key,u.attributes,c.attributes,l.key,l.attributes,l.undirected),l=l.next;while(l)}}t&&!f&&r(u.key,null,u.attributes,null,null,null,null)}}function _r(n,i){const t={key:n};return $t(i.attributes)||(t.attributes=I({},i.attributes)),t}function xr(n,i,t){const e={key:i,source:t.source.key,target:t.target.key};return $t(t.attributes)||(e.attributes=I({},t.attributes)),n==="mixed"&&t.undirected&&(e.undirected=!0),e}function Tr(n){if(!M(n))throw new C('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new C("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!M(n.attributes)||n.attributes===null))throw new C("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Cr(n){if(!M(n))throw new C('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new C("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new C("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!M(n.attributes)||n.attributes===null))throw new C("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new C("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const Sr=Ai(),kr=new Set(["directed","undirected","mixed"]),dt=new Set(["domain","_events","_eventsCount","_maxListeners"]),Ar=[{name:n=>`${n}Edge`,generateKey:!0},{name:n=>`${n}DirectedEdge`,generateKey:!0,type:"directed"},{name:n=>`${n}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:n=>`${n}EdgeWithKey`},{name:n=>`${n}DirectedEdgeWithKey`,type:"directed"},{name:n=>`${n}UndirectedEdgeWithKey`,type:"undirected"}],Rr={allowSelfLoops:!0,multi:!1,type:"mixed"};function Lr(n,i,t){if(t&&!M(t))throw new C(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(i=""+i,t=t||{},n._nodes.has(i))throw new R(`Graph.addNode: the "${i}" node already exist in the graph.`);const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function lt(n,i,t){const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function Yt(n,i,t,e,r,a,o,s){if(!e&&n.type==="undirected")throw new R(`Graph.${i}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new R(`Graph.${i}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!M(s))throw new C(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`);if(a=""+a,o=""+o,s=s||{},!n.allowSelfLoops&&a===o)throw new R(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=n._nodes.get(a),h=n._nodes.get(o);if(!u)throw new w(`Graph.${i}: source node "${a}" not found.`);if(!h)throw new w(`Graph.${i}: target node "${o}" not found.`);const d={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new R(`Graph.${i}: the "${r}" edge already exists in the graph.`);if(!n.multi&&(e?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new R(`Graph.${i}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const l=new fe(e,r,u,h,s);n._edges.set(r,l);const c=a===o;return e?(u.undirectedDegree++,h.undirectedDegree++,c&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,h.inDegree++,c&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),e?n._undirectedSize++:n._directedSize++,d.key=r,n.emit("edgeAdded",d),r}function Dr(n,i,t,e,r,a,o,s,u){if(!e&&n.type==="undirected")throw new R(`Graph.${i}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new R(`Graph.${i}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(u){if(typeof s!="function")throw new C(`Graph.${i}: invalid updater function. Expecting a function but got "${s}"`)}else if(!M(s))throw new C(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`)}a=""+a,o=""+o;let h;if(u&&(h=s,s=void 0),!n.allowSelfLoops&&a===o)throw new R(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=n._nodes.get(a),l=n._nodes.get(o),c,f;if(!t&&(c=n._edges.get(r),c)){if((c.source.key!==a||c.target.key!==o)&&(!e||c.source.key!==o||c.target.key!==a))throw new R(`Graph.${i}: inconsistency detected when attempting to merge the "${r}" edge with "${a}" source & "${o}" target vs. ("${c.source.key}", "${c.target.key}").`);f=c}if(!f&&!n.multi&&d&&(f=e?d.undirected[o]:d.out[o]),f){const x=[f.key,!1,!1,!1];if(u?!h:!s)return x;if(u){const T=f.attributes;f.attributes=h(T),n.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else I(f.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:s});return x}s=s||{},u&&h&&(s=h(s));const y={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new R(`Graph.${i}: the "${r}" edge already exists in the graph.`);let b=!1,E=!1;d||(d=lt(n,a,{}),b=!0,a===o&&(l=d,E=!0)),l||(l=lt(n,o,{}),E=!0),c=new fe(e,r,d,l,s),n._edges.set(r,c);const k=a===o;return e?(d.undirectedDegree++,l.undirectedDegree++,k&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,l.inDegree++,k&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?c.attachMulti():c.attach(),e?n._undirectedSize++:n._directedSize++,y.key=r,n.emit("edgeAdded",y),[r,!0,b,E]}function ue(n,i){n._edges.delete(i.key);const{source:t,target:e,attributes:r}=i,a=i.undirected,o=t===e;a?(t.undirectedDegree--,e.undirectedDegree--,o&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,e.inDegree--,o&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?i.detachMulti():i.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:i.key,attributes:r,source:t.key,target:e.key,undirected:a})}class N extends Ut.EventEmitter{constructor(i){if(super(),i=I({},Rr,i),typeof i.multi!="boolean")throw new C(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${i.multi}".`);if(!kr.has(i.type))throw new C(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${i.type}".`);if(typeof i.allowSelfLoops!="boolean")throw new C(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${i.allowSelfLoops}".`);const t=i.type==="mixed"?zt:i.type==="directed"?Bt:Ht;z(this,"NodeDataClass",t);const e="geid_"+Sr()+"_";let r=0;const a=()=>{let o;do o=e+r++;while(this._edges.has(o));return o};z(this,"_attributes",{}),z(this,"_nodes",new Map),z(this,"_edges",new Map),z(this,"_directedSize",0),z(this,"_undirectedSize",0),z(this,"_directedSelfLoopCount",0),z(this,"_undirectedSelfLoopCount",0),z(this,"_edgeKeyGenerator",a),z(this,"_options",i),dt.forEach(o=>z(this,o,this[o])),V(this,"order",()=>this._nodes.size),V(this,"size",()=>this._edges.size),V(this,"directedSize",()=>this._directedSize),V(this,"undirectedSize",()=>this._undirectedSize),V(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),V(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),V(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),V(this,"multi",this._options.multi),V(this,"type",this._options.type),V(this,"allowSelfLoops",this._options.allowSelfLoops),V(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(i){return this._nodes.has(""+i)}hasDirectedEdge(i,t){if(this.type==="undirected")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&!r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.out.hasOwnProperty(t):!1}throw new C(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(i,t){if(this.type==="directed")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.undirected.hasOwnProperty(t):!1}throw new C(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(i,t){if(arguments.length===1){const e=""+i;return this._edges.has(e)}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?typeof e.out<"u"&&e.out.hasOwnProperty(t)||typeof e.undirected<"u"&&e.undirected.hasOwnProperty(t):!1}throw new C(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(i,t){if(this.type==="undirected")return;if(i=""+i,t=""+t,this.multi)throw new R("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const e=this._nodes.get(i);if(!e)throw new w(`Graph.directedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new w(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||void 0;if(r)return r.key}undirectedEdge(i,t){if(this.type==="directed")return;if(i=""+i,t=""+t,this.multi)throw new R("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const e=this._nodes.get(i);if(!e)throw new w(`Graph.undirectedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new w(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=e.undirected&&e.undirected[t]||void 0;if(r)return r.key}edge(i,t){if(this.multi)throw new R("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.edge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new w(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||e.undirected&&e.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areDirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in||t in e.out}areOutNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areOutNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.out}areInNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areInNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in}areUndirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areUndirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="directed"?!1:t in e.undirected}areNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&(t in e.in||t in e.out)||this.type!=="directed"&&t in e.undirected}areInboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areInboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.in||this.type!=="directed"&&t in e.undirected}areOutboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new w(`Graph.areOutboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.out||this.type!=="directed"&&t in e.undirected}inDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.directedDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.undirectedDegree: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree),e}outboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.outDegree),e}degree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.degree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree),e}inDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.directedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree,r+=t.directedLoops),e-r}outboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.outDegree,r+=t.directedLoops),e-r}degreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.degreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree,r+=t.directedLoops*2),e-r}source(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.source: could not find the "${i}" edge in the graph.`);return t.source.key}target(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.target: could not find the "${i}" edge in the graph.`);return t.target.key}extremities(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.extremities: could not find the "${i}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(i,t){i=""+i,t=""+t;const e=this._edges.get(t);if(!e)throw new w(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=e.source.key,a=e.target.key;if(i===r)return a;if(i===a)return r;throw new w(`Graph.opposite: the "${i}" node is not attached to the "${t}" edge (${r}, ${a}).`)}hasExtremity(i,t){i=""+i,t=""+t;const e=this._edges.get(i);if(!e)throw new w(`Graph.hasExtremity: could not find the "${i}" edge in the graph.`);return e.source.key===t||e.target.key===t}isUndirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.isUndirected: could not find the "${i}" edge in the graph.`);return t.undirected}isDirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.isDirected: could not find the "${i}" edge in the graph.`);return!t.undirected}isSelfLoop(i){i=""+i;const t=this._edges.get(i);if(!t)throw new w(`Graph.isSelfLoop: could not find the "${i}" edge in the graph.`);return t.source===t.target}addNode(i,t){return Lr(this,i,t).key}mergeNode(i,t){if(t&&!M(t))throw new C(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);i=""+i,t=t||{};let e=this._nodes.get(i);return e?(t&&(I(e.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:i,attributes:e.attributes,data:t})),[i,!1]):(e=new this.NodeDataClass(i,t),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:t}),[i,!0])}updateNode(i,t){if(t&&typeof t!="function")throw new C(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);i=""+i;let e=this._nodes.get(i);if(e){if(t){const a=e.attributes;e.attributes=t(a),this.emit("nodeAttributesUpdated",{type:"replace",key:i,attributes:e.attributes})}return[i,!1]}const r=t?t({}):{};return e=new this.NodeDataClass(i,r),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:r}),[i,!0]}dropNode(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new w(`Graph.dropNode: could not find the "${i}" node in the graph.`);let e;if(this.type!=="undirected"){for(const r in t.out){e=t.out[r];do ue(this,e),e=e.next;while(e)}for(const r in t.in){e=t.in[r];do ue(this,e),e=e.next;while(e)}}if(this.type!=="directed")for(const r in t.undirected){e=t.undirected[r];do ue(this,e),e=e.next;while(e)}this._nodes.delete(i),this.emit("nodeDropped",{key:i,attributes:t.attributes})}dropEdge(i){let t;if(arguments.length>1){const e=""+arguments[0],r=""+arguments[1];if(t=B(this,e,r,this.type),!t)throw new w(`Graph.dropEdge: could not find the "${e}" -> "${r}" edge in the graph.`)}else if(i=""+i,t=this._edges.get(i),!t)throw new w(`Graph.dropEdge: could not find the "${i}" edge in the graph.`);return ue(this,t),this}dropDirectedEdge(i,t){if(arguments.length<2)throw new R("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new R("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");i=""+i,t=""+t;const e=B(this,i,t,"directed");if(!e)throw new w(`Graph.dropDirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}dropUndirectedEdge(i,t){if(arguments.length<2)throw new R("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new R("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const e=B(this,i,t,"undirected");if(!e)throw new w(`Graph.dropUndirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const i=this._nodes.values();let t;for(;t=i.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(i){return this._attributes[i]}getAttributes(){return this._attributes}hasAttribute(i){return this._attributes.hasOwnProperty(i)}setAttribute(i,t){return this._attributes[i]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}updateAttribute(i,t){if(typeof t!="function")throw new C("Graph.updateAttribute: updater should be a function.");const e=this._attributes[i];return this._attributes[i]=t(e),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}removeAttribute(i){return delete this._attributes[i],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:i}),this}replaceAttributes(i){if(!M(i))throw new C("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=i,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(i){if(!M(i))throw new C("Graph.mergeAttributes: provided attributes are not a plain object.");return I(this._attributes,i),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:i}),this}updateAttributes(i){if(typeof i!="function")throw new C("Graph.updateAttributes: provided updater is not a function.");return this._attributes=i(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(i,t){if(typeof i!="function")throw new C("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!ht(t))throw new C("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._nodes.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,a.attributes=i(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(i,t){if(typeof i!="function")throw new C("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!ht(t))throw new C("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._edges.values();let r,a,o,s;for(;r=e.next(),r.done!==!0;)a=r.value,o=a.source,s=a.target,a.attributes=i(a.key,a.attributes,o.key,s.key,o.attributes,s.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(i){if(typeof i!="function")throw new C("Graph.forEachAdjacencyEntry: expecting a callback.");Ce(!1,!1,!1,this,i)}forEachAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new C("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Ce(!1,!1,!0,this,i)}forEachAssymetricAdjacencyEntry(i){if(typeof i!="function")throw new C("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Ce(!1,!0,!1,this,i)}forEachAssymetricAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new C("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Ce(!1,!0,!0,this,i)}nodes(){return Array.from(this._nodes.keys())}forEachNode(i){if(typeof i!="function")throw new C("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)}findNode(i){if(typeof i!="function")throw new C("Graph.findNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return r.key}mapNodes(i){if(typeof i!="function")throw new C("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let e,r;const a=new Array(this.order);let o=0;for(;e=t.next(),e.done!==!0;)r=e.value,a[o++]=i(r.key,r.attributes);return a}someNode(i){if(typeof i!="function")throw new C("Graph.someNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return!0;return!1}everyNode(i){if(typeof i!="function")throw new C("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,!i(r.key,r.attributes))return!1;return!0}filterNodes(i){if(typeof i!="function")throw new C("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let e,r;const a=[];for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)&&a.push(r.key);return a}reduceNodes(i,t){if(typeof i!="function")throw new C("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new C("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=t;const r=this._nodes.values();let a,o;for(;a=r.next(),a.done!==!0;)o=a.value,e=i(e,o.key,o.attributes);return e}nodeEntries(){const i=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=i.next();if(t.done)return t;const e=t.value;return{value:{node:e.key,attributes:e.attributes},done:!1}}}}export(){const i=new Array(this._nodes.size);let t=0;this._nodes.forEach((r,a)=>{i[t++]=_r(a,r)});const e=new Array(this._edges.size);return t=0,this._edges.forEach((r,a)=>{e[t++]=xr(this.type,a,r)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:i,edges:e}}import(i,t=!1){if(i instanceof N)return i.forEachNode((u,h)=>{t?this.mergeNode(u,h):this.addNode(u,h)}),i.forEachEdge((u,h,d,l,c,f,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,l,h):this.mergeDirectedEdgeWithKey(u,d,l,h):y?this.addUndirectedEdgeWithKey(u,d,l,h):this.addDirectedEdgeWithKey(u,d,l,h)}),this;if(!M(i))throw new C("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(i.attributes){if(!M(i.attributes))throw new C("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(i.attributes):this.replaceAttributes(i.attributes)}let e,r,a,o,s;if(i.nodes){if(a=i.nodes,!Array.isArray(a))throw new C("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=a.length;e{const a=I({},e.attributes);e=new t.NodeDataClass(r,a),t._nodes.set(r,e)}),t}copy(i){if(i=i||{},typeof i.type=="string"&&i.type!==this.type&&i.type!=="mixed")throw new R(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${i.type}" because this would mean losing information about the current graph.`);if(typeof i.multi=="boolean"&&i.multi!==this.multi&&i.multi!==!0)throw new R("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof i.allowSelfLoops=="boolean"&&i.allowSelfLoops!==this.allowSelfLoops&&i.allowSelfLoops!==!0)throw new R("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(i),e=this._edges.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,Yt(t,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,I({},a.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const i={};this._nodes.forEach((a,o)=>{i[o]=a.attributes});const t={},e={};this._edges.forEach((a,o)=>{const s=a.undirected?"--":"->";let u="",h=a.source.key,d=a.target.key,l;a.undirected&&h>d&&(l=h,h=d,d=l);const c=`(${h})${s}(${d})`;o.startsWith("geid_")?this.multi&&(typeof e[c]>"u"?e[c]=0:e[c]++,u+=`${e[c]}. `):u+=`[${o}]: `,u+=c,t[u]=a.attributes});const r={};for(const a in this)this.hasOwnProperty(a)&&!dt.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(r[a]=this[a]);return r.attributes=this._attributes,r.nodes=i,r.edges=t,z(r,"constructor",this.constructor),r}}typeof Symbol<"u"&&(N.prototype[Symbol.for("nodejs.util.inspect.custom")]=N.prototype.inspect);Ar.forEach(n=>{["add","merge","update"].forEach(i=>{const t=n.name(i),e=i==="add"?Yt:Dr;n.generateKey?N.prototype[t]=function(r,a,o){return e(this,t,!0,(n.type||this.type)==="undirected",null,r,a,o,i==="update")}:N.prototype[t]=function(r,a,o,s){return e(this,t,!1,(n.type||this.type)==="undirected",r,a,o,s,i==="update")}})});$i(N);Xi(N);fr(N);Er(N);class qt extends N{constructor(i){const t=I({type:"directed"},i);if("multi"in t&&t.multi!==!1)throw new C("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new C('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Zt extends N{constructor(i){const t=I({type:"undirected"},i);if("multi"in t&&t.multi!==!1)throw new C("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new C('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Xt extends N{constructor(i){const t=I({multi:!0},i);if("multi"in t&&t.multi!==!0)throw new C("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Jt extends N{constructor(i){const t=I({type:"directed",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new C("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new C('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Qt extends N{constructor(i){const t=I({type:"undirected",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new C("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new C('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function ge(n){n.from=function(i,t){const e=I({},i.options,t),r=new n(e);return r.import(i),r}}ge(N);ge(qt);ge(Zt);ge(Xt);ge(Jt);ge(Qt);N.Graph=N;N.DirectedGraph=qt;N.UndirectedGraph=Zt;N.MultiGraph=Xt;N.MultiDirectedGraph=Jt;N.MultiUndirectedGraph=Qt;N.InvalidArgumentsGraphError=C;N.NotFoundGraphError=w;N.UsageGraphError=R;function Nr(n,i){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,i);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function _e(n){var i=Nr(n,"string");return typeof i=="symbol"?i:i+""}function U(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function ct(n,i){for(var t=0;tn.length)&&(i=n.length);for(var t=0,e=Array(i);t>8&255,a=t>>16&255,o=t>>24&255;return[e,r,a,o]}var ze={};function ai(n){if(typeof ze[n]<"u")return ze[n];var i=(n&16711680)>>>16,t=(n&65280)>>>8,e=n&255,r=255,a=ni(i,t,e,r);return ze[n]=a,a}function ft(n,i,t,e){return t+(i<<8)+(n<<16)}function gt(n,i,t,e,r,a){var o=Math.floor(t/a*r),s=Math.floor(n.drawingBufferHeight/a-e/a*r),u=new Uint8Array(4);n.bindFramebuffer(n.FRAMEBUFFER,i),n.readPixels(o,s,1,1,n.RGBA,n.UNSIGNED_BYTE,u);var h=le(u,4),d=h[0],l=h[1],c=h[2],f=h[3];return[d,l,c,f]}function m(n,i,t){return(i=_e(i))in n?Object.defineProperty(n,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[i]=t,n}function pt(n,i){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,e)}return t}function S(n){for(var i=1;ig){var v="…";for(h=h+v,p=n.measureText(h).width;p>g&&h.length>1;)h=h.slice(0,-2)+v,p=n.measureText(h).width;if(h.length<4)return}var _;x>0?T>0?_=Math.acos(x/g):_=Math.asin(T/g):T>0?_=Math.acos(x/g)+Math.PI:_=Math.asin(x/g)+Math.PI/2,n.save(),n.translate(E,k),n.rotate(_),n.fillText(h,-p/2,i.size/2+a),n.restore()}}}function si(n,i,t){if(i.label){var e=t.labelSize,r=t.labelFont,a=t.labelWeight,o=t.labelColor.attribute?i[t.labelColor.attribute]||t.labelColor.color||"#000":t.labelColor.color;n.fillStyle=o,n.font="".concat(a," ").concat(e,"px ").concat(r),n.fillText(i.label,i.x+i.size+3,i.y+e/3)}}function Yr(n,i,t){var e=t.labelSize,r=t.labelFont,a=t.labelWeight;n.font="".concat(a," ").concat(e,"px ").concat(r),n.fillStyle="#FFF",n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowBlur=8,n.shadowColor="#000";var o=2;if(typeof i.label=="string"){var s=n.measureText(i.label).width,u=Math.round(s+5),h=Math.round(e+2*o),d=Math.max(i.size,e/2)+o,l=Math.asin(h/2/d),c=Math.sqrt(Math.abs(Math.pow(d,2)-Math.pow(h/2,2)));n.beginPath(),n.moveTo(i.x+c,i.y+h/2),n.lineTo(i.x+d+u,i.y+h/2),n.lineTo(i.x+d+u,i.y-h/2),n.lineTo(i.x+c,i.y-h/2),n.arc(i.x,i.y,d,l,-l),n.closePath(),n.fill()}else n.beginPath(),n.arc(i.x,i.y,i.size+o,0,Math.PI*2),n.closePath(),n.fill();n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowBlur=0,si(n,i,t)}var qr=` +`).concat(t))}return r}function Hr(n,i){return si("VERTEX",n,i)}function Wr(n,i){return si("FRAGMENT",n,i)}function jr(n,i){var t=n.createProgram();if(t===null)throw new Error("loadProgram: error while creating the program.");var e,r;for(e=0,r=i.length;eg){var v="…";for(h=h+v,p=n.measureText(h).width;p>g&&h.length>1;)h=h.slice(0,-2)+v,p=n.measureText(h).width;if(h.length<4)return}var _;x>0?T>0?_=Math.acos(x/g):_=Math.asin(T/g):T>0?_=Math.acos(x/g)+Math.PI:_=Math.asin(x/g)+Math.PI/2,n.save(),n.translate(E,k),n.rotate(_),n.fillText(h,-p/2,i.size/2+a),n.restore()}}}function hi(n,i,t){if(i.label){var e=t.labelSize,r=t.labelFont,a=t.labelWeight,o=t.labelColor.attribute?i[t.labelColor.attribute]||t.labelColor.color||"#000":t.labelColor.color;n.fillStyle=o,n.font="".concat(a," ").concat(e,"px ").concat(r),n.fillText(i.label,i.x+i.size+3,i.y+e/3)}}function Zr(n,i,t){var e=t.labelSize,r=t.labelFont,a=t.labelWeight;n.font="".concat(a," ").concat(e,"px ").concat(r),n.fillStyle="#FFF",n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowBlur=8,n.shadowColor="#000";var o=2;if(typeof i.label=="string"){var s=n.measureText(i.label).width,u=Math.round(s+5),h=Math.round(e+2*o),d=Math.max(i.size,e/2)+o,l=Math.asin(h/2/d),c=Math.sqrt(Math.abs(Math.pow(d,2)-Math.pow(h/2,2)));n.beginPath(),n.moveTo(i.x+c,i.y+h/2),n.lineTo(i.x+d+u,i.y+h/2),n.lineTo(i.x+d+u,i.y-h/2),n.lineTo(i.x+c,i.y-h/2),n.arc(i.x,i.y,d,l,-l),n.closePath(),n.fill()}else n.beginPath(),n.arc(i.x,i.y,i.size+o,0,Math.PI*2),n.closePath(),n.fill();n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowBlur=0,hi(n,i,t)}var Xr=` precision highp float; varying vec4 v_color; @@ -34,7 +34,7 @@ void main(void) { gl_FragColor = mix(v_color, transparent, t); #endif } -`,Zr=qr,Xr=` +`,Jr=Xr,Qr=` attribute vec4 a_id; attribute vec4 a_color; attribute vec2 a_position; @@ -75,7 +75,7 @@ void main() { v_color.a *= bias; } -`,Jr=Xr,ui=WebGLRenderingContext,yt=ui.UNSIGNED_BYTE,He=ui.FLOAT,Qr=["u_sizeRatio","u_correctionRatio","u_matrix"],Ge=function(n){function i(){return U(this,i),H(this,i,arguments)}return W(i,n),$(i,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:Jr,FRAGMENT_SHADER_SOURCE:Zr,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Qr,ATTRIBUTES:[{name:"a_position",size:2,type:He},{name:"a_size",size:1,type:He},{name:"a_color",size:4,type:yt,normalized:!0},{name:"a_id",size:4,type:yt,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:He}],CONSTANT_DATA:[[i.ANGLE_1],[i.ANGLE_2],[i.ANGLE_3]]}}},{key:"processVisibleItem",value:function(e,r,a){var o=this.array,s=pe(a.color);o[r++]=a.x,o[r++]=a.y,o[r++]=a.size,o[r++]=s,o[r++]=e}},{key:"setUniforms",value:function(e,r){var a=r.gl,o=r.uniformLocations,s=o.u_sizeRatio,u=o.u_correctionRatio,h=o.u_matrix;a.uniform1f(u,e.correctionRatio),a.uniform1f(s,e.sizeRatio),a.uniformMatrix3fv(h,!1,e.matrix)}}])}(jr);m(Ge,"ANGLE_1",0);m(Ge,"ANGLE_2",2*Math.PI/3);m(Ge,"ANGLE_3",4*Math.PI/3);var en=` +`,en=Qr,di=WebGLRenderingContext,yt=di.UNSIGNED_BYTE,He=di.FLOAT,tn=["u_sizeRatio","u_correctionRatio","u_matrix"],Ge=function(n){function i(){return U(this,i),H(this,i,arguments)}return W(i,n),$(i,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:en,FRAGMENT_SHADER_SOURCE:Jr,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:tn,ATTRIBUTES:[{name:"a_position",size:2,type:He},{name:"a_size",size:1,type:He},{name:"a_color",size:4,type:yt,normalized:!0},{name:"a_id",size:4,type:yt,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:He}],CONSTANT_DATA:[[i.ANGLE_1],[i.ANGLE_2],[i.ANGLE_3]]}}},{key:"processVisibleItem",value:function(e,r,a){var o=this.array,s=pe(a.color);o[r++]=a.x,o[r++]=a.y,o[r++]=a.size,o[r++]=s,o[r++]=e}},{key:"setUniforms",value:function(e,r){var a=r.gl,o=r.uniformLocations,s=o.u_sizeRatio,u=o.u_correctionRatio,h=o.u_matrix;a.uniform1f(u,e.correctionRatio),a.uniform1f(s,e.sizeRatio),a.uniformMatrix3fv(h,!1,e.matrix)}}])}(Kr);m(Ge,"ANGLE_1",0);m(Ge,"ANGLE_2",2*Math.PI/3);m(Ge,"ANGLE_3",4*Math.PI/3);var rn=` precision mediump float; varying vec4 v_color; @@ -83,7 +83,7 @@ varying vec4 v_color; void main(void) { gl_FragColor = v_color; } -`,tn=en,rn=` +`,nn=rn,an=` attribute vec2 a_position; attribute vec2 a_normal; attribute float a_radius; @@ -149,7 +149,7 @@ void main() { v_color.a *= bias; } -`,nn=rn,hi=WebGLRenderingContext,bt=hi.UNSIGNED_BYTE,ke=hi.FLOAT,an=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],di={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function li(n){var i=S(S({},di),n||{});return function(t){function e(){return U(this,e),H(this,e,arguments)}return W(e,t),$(e,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:nn,FRAGMENT_SHADER_SOURCE:tn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:an,ATTRIBUTES:[{name:"a_position",size:2,type:ke},{name:"a_normal",size:2,type:ke},{name:"a_radius",size:1,type:ke},{name:"a_color",size:4,type:bt,normalized:!0},{name:"a_id",size:4,type:bt,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:ke}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(a,o,s,u,h){if(i.extremity==="source"){var d=[u,s];s=d[0],u=d[1]}var l=h.size||1,c=u.size||1,f=s.x,y=s.y,b=u.x,E=u.y,k=pe(h.color),x=b-f,T=E-y,g=x*x+T*T,p=0,v=0;g&&(g=1/Math.sqrt(g),p=-T*g*l,v=x*g*l);var _=this.array;_[o++]=b,_[o++]=E,_[o++]=-p,_[o++]=-v,_[o++]=c,_[o++]=k,_[o++]=a}},{key:"setUniforms",value:function(a,o){var s=o.gl,u=o.uniformLocations,h=u.u_matrix,d=u.u_sizeRatio,l=u.u_correctionRatio,c=u.u_minEdgeThickness,f=u.u_lengthToThicknessRatio,y=u.u_widenessToThicknessRatio;s.uniformMatrix3fv(h,!1,a.matrix),s.uniform1f(d,a.sizeRatio),s.uniform1f(l,a.correctionRatio),s.uniform1f(c,a.minEdgeThickness),s.uniform1f(f,i.lengthToThicknessRatio),s.uniform1f(y,i.widenessToThicknessRatio)}}])}(rt)}li();var on=` +`,on=an,li=WebGLRenderingContext,bt=li.UNSIGNED_BYTE,ke=li.FLOAT,sn=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],ci={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function fi(n){var i=S(S({},ci),n||{});return function(t){function e(){return U(this,e),H(this,e,arguments)}return W(e,t),$(e,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:on,FRAGMENT_SHADER_SOURCE:nn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:sn,ATTRIBUTES:[{name:"a_position",size:2,type:ke},{name:"a_normal",size:2,type:ke},{name:"a_radius",size:1,type:ke},{name:"a_color",size:4,type:bt,normalized:!0},{name:"a_id",size:4,type:bt,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:ke}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(a,o,s,u,h){if(i.extremity==="source"){var d=[u,s];s=d[0],u=d[1]}var l=h.size||1,c=u.size||1,f=s.x,y=s.y,b=u.x,E=u.y,k=pe(h.color),x=b-f,T=E-y,g=x*x+T*T,p=0,v=0;g&&(g=1/Math.sqrt(g),p=-T*g*l,v=x*g*l);var _=this.array;_[o++]=b,_[o++]=E,_[o++]=-p,_[o++]=-v,_[o++]=c,_[o++]=k,_[o++]=a}},{key:"setUniforms",value:function(a,o){var s=o.gl,u=o.uniformLocations,h=u.u_matrix,d=u.u_sizeRatio,l=u.u_correctionRatio,c=u.u_minEdgeThickness,f=u.u_lengthToThicknessRatio,y=u.u_widenessToThicknessRatio;s.uniformMatrix3fv(h,!1,a.matrix),s.uniform1f(d,a.sizeRatio),s.uniform1f(l,a.correctionRatio),s.uniform1f(c,a.minEdgeThickness),s.uniform1f(f,i.lengthToThicknessRatio),s.uniform1f(y,i.widenessToThicknessRatio)}}])}(rt)}fi();var un=` precision mediump float; varying vec4 v_color; @@ -175,7 +175,7 @@ void main(void) { gl_FragColor = mix(v_color, transparent, t); #endif } -`,ci=on,sn=` +`,gi=un,hn=` attribute vec4 a_id; attribute vec4 a_color; attribute vec2 a_normal; @@ -243,7 +243,7 @@ void main() { v_color.a *= bias; } -`,un=sn,fi=WebGLRenderingContext,wt=fi.UNSIGNED_BYTE,oe=fi.FLOAT,hn=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],dn={lengthToThicknessRatio:di.lengthToThicknessRatio};function gi(n){var i=S(S({},dn),{});return function(t){function e(){return U(this,e),H(this,e,arguments)}return W(e,t),$(e,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:un,FRAGMENT_SHADER_SOURCE:ci,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:hn,ATTRIBUTES:[{name:"a_positionStart",size:2,type:oe},{name:"a_positionEnd",size:2,type:oe},{name:"a_normal",size:2,type:oe},{name:"a_color",size:4,type:wt,normalized:!0},{name:"a_id",size:4,type:wt,normalized:!0},{name:"a_radius",size:1,type:oe}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:oe},{name:"a_normalCoef",size:1,type:oe},{name:"a_radiusCoef",size:1,type:oe}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(a,o,s,u,h){var d=h.size||1,l=s.x,c=s.y,f=u.x,y=u.y,b=pe(h.color),E=f-l,k=y-c,x=u.size||1,T=E*E+k*k,g=0,p=0;T&&(T=1/Math.sqrt(T),g=-k*T*d,p=E*T*d);var v=this.array;v[o++]=l,v[o++]=c,v[o++]=f,v[o++]=y,v[o++]=g,v[o++]=p,v[o++]=b,v[o++]=a,v[o++]=x}},{key:"setUniforms",value:function(a,o){var s=o.gl,u=o.uniformLocations,h=u.u_matrix,d=u.u_zoomRatio,l=u.u_feather,c=u.u_pixelRatio,f=u.u_correctionRatio,y=u.u_sizeRatio,b=u.u_minEdgeThickness,E=u.u_lengthToThicknessRatio;s.uniformMatrix3fv(h,!1,a.matrix),s.uniform1f(d,a.zoomRatio),s.uniform1f(y,a.sizeRatio),s.uniform1f(f,a.correctionRatio),s.uniform1f(c,a.pixelRatio),s.uniform1f(l,a.antiAliasingFeather),s.uniform1f(b,a.minEdgeThickness),s.uniform1f(E,i.lengthToThicknessRatio)}}])}(rt)}gi();function ln(n){return Vr([gi(),li(n)])}var cn=ln(),fn=cn,gn=` +`,dn=hn,pi=WebGLRenderingContext,wt=pi.UNSIGNED_BYTE,oe=pi.FLOAT,ln=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],cn={lengthToThicknessRatio:ci.lengthToThicknessRatio};function mi(n){var i=S(S({},cn),{});return function(t){function e(){return U(this,e),H(this,e,arguments)}return W(e,t),$(e,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:dn,FRAGMENT_SHADER_SOURCE:gi,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:ln,ATTRIBUTES:[{name:"a_positionStart",size:2,type:oe},{name:"a_positionEnd",size:2,type:oe},{name:"a_normal",size:2,type:oe},{name:"a_color",size:4,type:wt,normalized:!0},{name:"a_id",size:4,type:wt,normalized:!0},{name:"a_radius",size:1,type:oe}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:oe},{name:"a_normalCoef",size:1,type:oe},{name:"a_radiusCoef",size:1,type:oe}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(a,o,s,u,h){var d=h.size||1,l=s.x,c=s.y,f=u.x,y=u.y,b=pe(h.color),E=f-l,k=y-c,x=u.size||1,T=E*E+k*k,g=0,p=0;T&&(T=1/Math.sqrt(T),g=-k*T*d,p=E*T*d);var v=this.array;v[o++]=l,v[o++]=c,v[o++]=f,v[o++]=y,v[o++]=g,v[o++]=p,v[o++]=b,v[o++]=a,v[o++]=x}},{key:"setUniforms",value:function(a,o){var s=o.gl,u=o.uniformLocations,h=u.u_matrix,d=u.u_zoomRatio,l=u.u_feather,c=u.u_pixelRatio,f=u.u_correctionRatio,y=u.u_sizeRatio,b=u.u_minEdgeThickness,E=u.u_lengthToThicknessRatio;s.uniformMatrix3fv(h,!1,a.matrix),s.uniform1f(d,a.zoomRatio),s.uniform1f(y,a.sizeRatio),s.uniform1f(f,a.correctionRatio),s.uniform1f(c,a.pixelRatio),s.uniform1f(l,a.antiAliasingFeather),s.uniform1f(b,a.minEdgeThickness),s.uniform1f(E,i.lengthToThicknessRatio)}}])}(rt)}mi();function fn(n){return Yr([mi(),fi(n)])}var gn=fn(),pn=gn,mn=` attribute vec4 a_id; attribute vec4 a_color; attribute vec2 a_normal; @@ -308,5 +308,5 @@ void main() { v_color.a *= bias; } -`,pn=gn,pi=WebGLRenderingContext,Et=pi.UNSIGNED_BYTE,ye=pi.FLOAT,mn=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],vn=function(n){function i(){return U(this,i),H(this,i,arguments)}return W(i,n),$(i,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:pn,FRAGMENT_SHADER_SOURCE:ci,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:mn,ATTRIBUTES:[{name:"a_positionStart",size:2,type:ye},{name:"a_positionEnd",size:2,type:ye},{name:"a_normal",size:2,type:ye},{name:"a_color",size:4,type:Et,normalized:!0},{name:"a_id",size:4,type:Et,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:ye},{name:"a_normalCoef",size:1,type:ye}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(e,r,a,o,s){var u=s.size||1,h=a.x,d=a.y,l=o.x,c=o.y,f=pe(s.color),y=l-h,b=c-d,E=y*y+b*b,k=0,x=0;E&&(E=1/Math.sqrt(E),k=-b*E*u,x=y*E*u);var T=this.array;T[r++]=h,T[r++]=d,T[r++]=l,T[r++]=c,T[r++]=k,T[r++]=x,T[r++]=f,T[r++]=e}},{key:"setUniforms",value:function(e,r){var a=r.gl,o=r.uniformLocations,s=o.u_matrix,u=o.u_zoomRatio,h=o.u_feather,d=o.u_pixelRatio,l=o.u_correctionRatio,c=o.u_sizeRatio,f=o.u_minEdgeThickness;a.uniformMatrix3fv(s,!1,e.matrix),a.uniform1f(u,e.zoomRatio),a.uniform1f(c,e.sizeRatio),a.uniform1f(l,e.correctionRatio),a.uniform1f(d,e.pixelRatio),a.uniform1f(h,e.antiAliasingFeather),a.uniform1f(f,e.minEdgeThickness)}}])}(rt),nt=function(n){function i(){var t;return U(this,i),t=H(this,i),t.rawEmitter=t,t}return W(i,n),$(i)}(Mt.EventEmitter),We,_t;function yn(){return _t||(_t=1,We=function(i){return i!==null&&typeof i=="object"&&typeof i.addUndirectedEdgeWithKey=="function"&&typeof i.dropNode=="function"&&typeof i.multi=="boolean"}),We}var bn=yn();const wn=xi(bn);var En=function(i){return i},_n=function(i){return i*i},xn=function(i){return i*(2-i)},Tn=function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)},Cn=function(i){return i*i*i},Sn=function(i){return--i*i*i+1},kn=function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)},mi={linear:En,quadraticIn:_n,quadraticOut:xn,quadraticInOut:Tn,cubicIn:Cn,cubicOut:Sn,cubicInOut:kn},vi={easing:"quadraticInOut",duration:150};function aa(n,i,t,e){var r=Object.assign({},vi,t),a=typeof r.easing=="function"?r.easing:mi[r.easing],o=Date.now(),s={};for(var u in i){var h=i[u];s[u]={};for(var d in h)s[u][d]=n.getNodeAttribute(u,d)}var l=null,c=function(){l=null;var y=(Date.now()-o)/r.duration;if(y>=1){for(var b in i){var E=i[b];for(var k in E)n.setNodeAttribute(b,k,E[k])}return}y=a(y);for(var x in i){var T=i[x],g=s[x];for(var p in T)n.setNodeAttribute(x,p,T[p]*y+g[p]*(1-y))}l=requestAnimationFrame(c)};return c(),function(){l&&cancelAnimationFrame(l)}}function K(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Ae(n,i,t){return n[0]=i,n[4]=typeof t=="number"?t:i,n}function xt(n,i){var t=Math.sin(i),e=Math.cos(i);return n[0]=e,n[1]=t,n[3]=-t,n[4]=e,n}function Tt(n,i,t){return n[6]=i,n[7]=t,n}function ne(n,i){var t=n[0],e=n[1],r=n[2],a=n[3],o=n[4],s=n[5],u=n[6],h=n[7],d=n[8],l=i[0],c=i[1],f=i[2],y=i[3],b=i[4],E=i[5],k=i[6],x=i[7],T=i[8];return n[0]=l*t+c*a+f*u,n[1]=l*e+c*o+f*h,n[2]=l*r+c*s+f*d,n[3]=y*t+b*a+E*u,n[4]=y*e+b*o+E*h,n[5]=y*r+b*s+E*d,n[6]=k*t+x*a+T*u,n[7]=k*e+x*o+T*h,n[8]=k*r+x*s+T*d,n}function Xe(n,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,e=n[0],r=n[1],a=n[3],o=n[4],s=n[6],u=n[7],h=i.x,d=i.y;return{x:h*e+d*a+s*t,y:h*r+d*o+u*t}}function An(n,i){var t=n.height/n.width,e=i.height/i.width;return t<1&&e>1||t>1&&e<1?1:Math.min(Math.max(e,1/e),Math.max(1/t,t))}function be(n,i,t,e,r){var a=n.angle,o=n.ratio,s=n.x,u=n.y,h=i.width,d=i.height,l=K(),c=Math.min(h,d)-2*e,f=An(i,t);return r?(ne(l,Tt(K(),s,u)),ne(l,Ae(K(),o)),ne(l,xt(K(),a)),ne(l,Ae(K(),h/c/2/f,d/c/2/f))):(ne(l,Ae(K(),2*(c/h)*f,2*(c/d)*f)),ne(l,xt(K(),-a)),ne(l,Ae(K(),1/o)),ne(l,Tt(K(),-s,-u))),l}function Rn(n,i,t){var e=Xe(n,{x:Math.cos(i.angle),y:Math.sin(i.angle)},0),r=e.x,a=e.y;return 1/Math.sqrt(Math.pow(r,2)+Math.pow(a,2))/t.width}function Ln(n){if(!n.order)return{x:[0,1],y:[0,1]};var i=1/0,t=-1/0,e=1/0,r=-1/0;return n.forEachNode(function(a,o){var s=o.x,u=o.y;st&&(t=s),ur&&(r=u)}),{x:[i,t],y:[e,r]}}function Dn(n){if(!wn(n))throw new Error("Sigma: invalid graph instance.");n.forEachNode(function(i,t){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw new Error("Sigma: Coordinates of node ".concat(i," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function Nn(n,i,t){var e=document.createElement(n);if(i)for(var r in i)e.style[r]=i[r];if(t)for(var a in t)e.setAttribute(a,t[a]);return e}function Ct(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function St(n,i,t){return t.sort(function(e,r){var a=i(e)||0,o=i(r)||0;return ao?1:0})}function kt(n){var i=le(n.x,2),t=i[0],e=i[1],r=le(n.y,2),a=r[0],o=r[1],s=Math.max(e-t,o-a),u=(e+t)/2,h=(o+a)/2;(s===0||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(u)&&(u=0),isNaN(h)&&(h=0);var d=function(c){return{x:.5+(c.x-u)/s,y:.5+(c.y-h)/s}};return d.applyTo=function(l){l.x=.5+(l.x-u)/s,l.y=.5+(l.y-h)/s},d.inverse=function(l){return{x:u+s*(l.x-.5),y:h+s*(l.y-.5)}},d.ratio=s,d}function Je(n){"@babel/helpers - typeof";return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Je(n)}function At(n,i){var t=i.size;if(t!==0){var e=n.length;n.length+=t;var r=0;i.forEach(function(a){n[e+r]=a,r++})}}function je(n){n=n||{};for(var i=0,t=arguments.length<=1?0:arguments.length-1;i1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(!o)return new Promise(function(f){return r.animate(e,a,f)});if(this.enabled){var s=S(S({},vi),a),u=this.validateState(e),h=typeof s.easing=="function"?s.easing:mi[s.easing],d=Date.now(),l=this.getState(),c=function(){var y=(Date.now()-d)/s.duration;if(y>=1){r.nextFrame=null,r.setState(u),r.animationCallback&&(r.animationCallback.call(null),r.animationCallback=void 0);return}var b=h(y),E={};typeof u.x=="number"&&(E.x=l.x+(u.x-l.x)*b),typeof u.y=="number"&&(E.y=l.y+(u.y-l.y)*b),r.enabledRotation&&typeof u.angle=="number"&&(E.angle=l.angle+(u.angle-l.angle)*b),typeof u.ratio=="number"&&(E.ratio=l.ratio+(u.ratio-l.ratio)*b),r.setState(E),r.nextFrame=requestAnimationFrame(c)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(c)):c(),this.animationCallback=o}}},{key:"animatedZoom",value:function(e){return e?typeof e=="number"?this.animate({ratio:this.ratio/e}):this.animate({ratio:this.ratio/(e.factor||Re)},e):this.animate({ratio:this.ratio/Re})}},{key:"animatedUnzoom",value:function(e){return e?typeof e=="number"?this.animate({ratio:this.ratio*e}):this.animate({ratio:this.ratio*(e.factor||Re)},e):this.animate({ratio:this.ratio*Re})}},{key:"animatedReset",value:function(e){return this.animate({x:.5,y:.5,ratio:1,angle:0},e)}},{key:"copy",value:function(){return i.from(this.getState())}}],[{key:"from",value:function(e){var r=new i;return r.setState(e)}}])}(nt);function Y(n,i){var t=i.getBoundingClientRect();return{x:n.clientX-t.left,y:n.clientY-t.top}}function X(n,i){var t=S(S({},Y(n,i)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){t.sigmaDefaultPrevented=!0},original:n});return t}function we(n){var i="x"in n?n:S(S({},n.touches[0]||n.previousTouches[0]),{},{original:n.original,sigmaDefaultPrevented:n.sigmaDefaultPrevented,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0,i.sigmaDefaultPrevented=!0}});return i}function In(n,i){return S(S({},X(n,i)),{},{delta:yi(n)})}var Mn=2;function De(n){for(var i=[],t=0,e=Math.min(n.length,Mn);t0;r.draggedEvents=0,l&&r.renderer.getSetting("hideEdgesOnMove")&&r.renderer.refresh()},0),this.emit("mouseup",X(e,this.container))}}},{key:"handleMove",value:function(e){var r=this;if(this.enabled){var a=X(e,this.container);if(this.emit("mousemovebody",a),(e.target===this.container||e.composedPath()[0]===this.container)&&this.emit("mousemove",a),!a.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){r.movingTimeout=null,r.isMoving=!1},this.settings.dragTimeout);var o=this.renderer.getCamera(),s=Y(e,this.container),u=s.x,h=s.y,d=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),l=this.renderer.viewportToFramedGraph({x:u,y:h}),c=d.x-l.x,f=d.y-l.y,y=o.getState(),b=y.x+c,E=y.y+f;o.setState({x:b,y:E}),this.lastMouseX=u,this.lastMouseY=h,e.preventDefault(),e.stopPropagation()}}}},{key:"handleLeave",value:function(e){this.emit("mouseleave",X(e,this.container))}},{key:"handleEnter",value:function(e){this.emit("mouseenter",X(e,this.container))}},{key:"handleWheel",value:function(e){var r=this,a=this.renderer.getCamera();if(!(!this.enabled||!a.enabledZooming)){var o=yi(e);if(o){var s=In(e,this.container);if(this.emit("wheel",s),s.sigmaDefaultPrevented){e.preventDefault(),e.stopPropagation();return}var u=a.getState().ratio,h=o>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,d=a.getBoundedRatio(u*h),l=o>0?1:-1,c=Date.now();u!==d&&(e.preventDefault(),e.stopPropagation(),!(this.currentWheelDirection===l&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTimee.size?-1:t.sizee.key?1:-1}}])}(),Nt=function(){function n(){U(this,n),m(this,"width",0),m(this,"height",0),m(this,"cellSize",0),m(this,"columns",0),m(this,"rows",0),m(this,"cells",{})}return $(n,[{key:"resizeAndClear",value:function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}}},{key:"getIndex",value:function(t){var e=Math.floor(t.x/this.cellSize),r=Math.floor(t.y/this.cellSize);return r*this.columns+e}},{key:"add",value:function(t,e,r){var a=new Dt(t,e),o=this.getIndex(r),s=this.cells[o];s||(s=[],this.cells[o]=s),s.push(a)}},{key:"organize",value:function(){for(var t in this.cells){var e=this.cells[t];e.sort(Dt.compare)}}},{key:"getLabelsToDisplay",value:function(t,e){var r=this.cellSize*this.cellSize,a=r/t/t,o=a*e/r,s=Math.ceil(o),u=[];for(var h in this.cells)for(var d=this.cells[h],l=0;l2&&arguments[2]!==void 0?arguments[2]:{};if(U(this,i),r=H(this,i),m(r,"elements",{}),m(r,"canvasContexts",{}),m(r,"webGLContexts",{}),m(r,"pickingLayers",new Set),m(r,"textures",{}),m(r,"frameBuffers",{}),m(r,"activeListeners",{}),m(r,"labelGrid",new Nt),m(r,"nodeDataCache",{}),m(r,"edgeDataCache",{}),m(r,"nodeProgramIndex",{}),m(r,"edgeProgramIndex",{}),m(r,"nodesWithForcedLabels",new Set),m(r,"edgesWithForcedLabels",new Set),m(r,"nodeExtent",{x:[0,1],y:[0,1]}),m(r,"nodeZExtent",[1/0,-1/0]),m(r,"edgeZExtent",[1/0,-1/0]),m(r,"matrix",K()),m(r,"invMatrix",K()),m(r,"correctionRatio",1),m(r,"customBBox",null),m(r,"normalizationFunction",kt({x:[0,1],y:[0,1]})),m(r,"graphToViewportRatio",1),m(r,"itemIDsIndex",{}),m(r,"nodeIndices",{}),m(r,"edgeIndices",{}),m(r,"width",0),m(r,"height",0),m(r,"pixelRatio",Ct()),m(r,"pickingDownSizingRatio",2*r.pixelRatio),m(r,"displayedNodeLabels",new Set),m(r,"displayedEdgeLabels",new Set),m(r,"highlightedNodes",new Set),m(r,"hoveredNode",null),m(r,"hoveredEdge",null),m(r,"renderFrame",null),m(r,"renderHighlightedNodesFrame",null),m(r,"needToProcess",!1),m(r,"checkEdgesEventsFrame",null),m(r,"nodePrograms",{}),m(r,"nodeHoverPrograms",{}),m(r,"edgePrograms",{}),r.settings=Pn(a),Ve(r.settings),Dn(t),!(e instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");r.graph=t,r.container=e,r.createWebGLContext("edges",{picking:a.enableEdgeEvents}),r.createCanvasContext("edgeLabels"),r.createWebGLContext("nodes",{picking:!0}),r.createCanvasContext("labels"),r.createCanvasContext("hovers"),r.createWebGLContext("hoverNodes"),r.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),r.resize();for(var o in r.settings.nodeProgramClasses)r.registerNodeProgram(o,r.settings.nodeProgramClasses[o],r.settings.nodeHoverProgramClasses[o]);for(var s in r.settings.edgeProgramClasses)r.registerEdgeProgram(s,r.settings.edgeProgramClasses[s]);return r.camera=new Rt,r.bindCameraHandlers(),r.mouseCaptor=new $n(r.elements.mouse,r),r.mouseCaptor.setSettings(r.settings),r.touchCaptor=new Hn(r.elements.mouse,r),r.touchCaptor.setSettings(r.settings),r.bindEventHandlers(),r.bindGraphHandlers(),r.handleSettingsUpdate(),r.refresh(),r}return W(i,n),$(i,[{key:"registerNodeProgram",value:function(e,r,a){return this.nodePrograms[e]&&this.nodePrograms[e].kill(),this.nodeHoverPrograms[e]&&this.nodeHoverPrograms[e].kill(),this.nodePrograms[e]=new r(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[e]=new(a||r)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(e,r){return this.edgePrograms[e]&&this.edgePrograms[e].kill(),this.edgePrograms[e]=new r(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(e){if(this.nodePrograms[e]){var r=this.nodePrograms,a=r[e],o=Ke(r,[e].map(_e));a.kill(),this.nodePrograms=o}if(this.nodeHoverPrograms[e]){var s=this.nodeHoverPrograms,u=s[e],h=Ke(s,[e].map(_e));u.kill(),this.nodePrograms=h}return this}},{key:"unregisterEdgeProgram",value:function(e){if(this.edgePrograms[e]){var r=this.edgePrograms,a=r[e],o=Ke(r,[e].map(_e));a.kill(),this.edgePrograms=o}return this}},{key:"resetWebGLTexture",value:function(e){var r=this.webGLContexts[e],a=this.frameBuffers[e],o=this.textures[e];o&&r.deleteTexture(o);var s=r.createTexture();return r.bindFramebuffer(r.FRAMEBUFFER,a),r.bindTexture(r.TEXTURE_2D,s),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,this.width,this.height,0,r.RGBA,r.UNSIGNED_BYTE,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,s,0),this.textures[e]=s,this}},{key:"bindCameraHandlers",value:function(){var e=this;return this.activeListeners.camera=function(){e.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(e){var r=e.x,a=e.y,o=gt(this.webGLContexts.nodes,this.frameBuffers.nodes,r,a,this.pixelRatio,this.pickingDownSizingRatio),s=ft.apply(void 0,Lt(o)),u=this.itemIDsIndex[s];return u&&u.type==="node"?u.id:null}},{key:"bindEventHandlers",value:function(){var e=this;this.activeListeners.handleResize=function(){e.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(a){var o=we(a),s={event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}},u=e.getNodeAtPosition(o);if(u&&e.hoveredNode!==u&&!e.nodeDataCache[u].hidden){e.hoveredNode&&e.emit("leaveNode",S(S({},s),{},{node:e.hoveredNode})),e.hoveredNode=u,e.emit("enterNode",S(S({},s),{},{node:u})),e.scheduleHighlightedNodesRender();return}if(e.hoveredNode&&e.getNodeAtPosition(o)!==e.hoveredNode){var h=e.hoveredNode;e.hoveredNode=null,e.emit("leaveNode",S(S({},s),{},{node:h})),e.scheduleHighlightedNodesRender();return}if(e.settings.enableEdgeEvents){var d=e.hoveredNode?null:e.getEdgeAtPoint(s.event.x,s.event.y);d!==e.hoveredEdge&&(e.hoveredEdge&&e.emit("leaveEdge",S(S({},s),{},{edge:e.hoveredEdge})),d&&e.emit("enterEdge",S(S({},s),{},{edge:d})),e.hoveredEdge=d)}},this.activeListeners.handleMoveBody=function(a){var o=we(a);e.emit("moveBody",{event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(a){var o=we(a),s={event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}};e.hoveredNode&&(e.emit("leaveNode",S(S({},s),{},{node:e.hoveredNode})),e.scheduleHighlightedNodesRender()),e.settings.enableEdgeEvents&&e.hoveredEdge&&(e.emit("leaveEdge",S(S({},s),{},{edge:e.hoveredEdge})),e.scheduleHighlightedNodesRender()),e.emit("leaveStage",S({},s))},this.activeListeners.handleEnter=function(a){var o=we(a),s={event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}};e.emit("enterStage",S({},s))};var r=function(o){return function(s){var u=we(s),h={event:u,preventSigmaDefault:function(){u.preventSigmaDefault()}},d=e.getNodeAtPosition(u);if(d)return e.emit("".concat(o,"Node"),S(S({},h),{},{node:d}));if(e.settings.enableEdgeEvents){var l=e.getEdgeAtPoint(u.x,u.y);if(l)return e.emit("".concat(o,"Edge"),S(S({},h),{},{edge:l}))}return e.emit("".concat(o,"Stage"),h)}};return this.activeListeners.handleClick=r("click"),this.activeListeners.handleRightClick=r("rightClick"),this.activeListeners.handleDoubleClick=r("doubleClick"),this.activeListeners.handleWheel=r("wheel"),this.activeListeners.handleDown=r("down"),this.activeListeners.handleUp=r("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var e=this,r=this.graph,a=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(o){var s,u=(s=o.hints)===null||s===void 0?void 0:s.attributes;e.graph.forEachNode(function(d){return e.updateNode(d)});var h=!u||u.some(function(d){return a.has(d)});e.refresh({partialGraph:{nodes:r.nodes()},skipIndexation:!h,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(o){var s,u=(s=o.hints)===null||s===void 0?void 0:s.attributes;e.graph.forEachEdge(function(d){return e.updateEdge(d)});var h=u&&["zIndex","type"].some(function(d){return u==null?void 0:u.includes(d)});e.refresh({partialGraph:{edges:r.edges()},skipIndexation:!h,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(o){var s=o.key;e.addNode(s),e.refresh({partialGraph:{nodes:[s]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(o){var s=o.key;e.refresh({partialGraph:{nodes:[s]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(o){var s=o.key;e.removeNode(s),e.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(o){var s=o.key;e.addEdge(s),e.refresh({partialGraph:{edges:[s]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(o){var s=o.key;e.refresh({partialGraph:{edges:[s]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(o){var s=o.key;e.removeEdge(s),e.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){e.clearEdgeState(),e.clearEdgeIndices(),e.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){e.clearEdgeState(),e.clearNodeState(),e.clearEdgeIndices(),e.clearNodeIndices(),e.refresh({schedule:!0})},r.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),r.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),r.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),r.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),r.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),r.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),r.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),r.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),r.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),r.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var e=this.graph;e.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),e.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),e.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),e.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),e.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),e.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),e.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(e,r){var a=gt(this.webGLContexts.edges,this.frameBuffers.edges,e,r,this.pixelRatio,this.pickingDownSizingRatio),o=ft.apply(void 0,Lt(a)),s=this.itemIDsIndex[o];return s&&s.type==="edge"?s.id:null}},{key:"process",value:function(){var e=this;this.emit("beforeProcess");var r=this.graph,a=this.settings,o=this.getDimensions();if(this.nodeExtent=Ln(this.graph),!this.settings.autoRescale){var s=o.width,u=o.height,h=this.nodeExtent,d=h.x,l=h.y;this.nodeExtent={x:[(d[0]+d[1])/2-s/2,(d[0]+d[1])/2+s/2],y:[(l[0]+l[1])/2-u/2,(l[0]+l[1])/2+u/2]}}this.normalizationFunction=kt(this.customBBox||this.nodeExtent);var c=new Rt,f=be(c.getState(),o,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(o,a.labelGridCellSize);for(var y={},b={},E={},k={},x=1,T=r.nodes(),g=0,p=T.length;g1&&arguments[1]!==void 0?arguments[1]:{},a=r.tolerance,o=a===void 0?0:a,s=r.boundaries,u=S({},e),h=s||this.nodeExtent,d=le(h.x,2),l=d[0],c=d[1],f=le(h.y,2),y=f[0],b=f[1],E=[this.graphToViewport({x:l,y},{cameraState:e}),this.graphToViewport({x:c,y},{cameraState:e}),this.graphToViewport({x:l,y:b},{cameraState:e}),this.graphToViewport({x:c,y:b},{cameraState:e})],k=1/0,x=-1/0,T=1/0,g=-1/0;E.forEach(function(O){var j=O.x,te=O.y;k=Math.min(k,j),x=Math.max(x,j),T=Math.min(T,te),g=Math.max(g,te)});var p=x-k,v=g-T,_=this.getDimensions(),A=_.width,D=_.height,L=0,F=0;if(p>=A?xo&&(L=k-o):x>A+o?L=x-(A+o):k<-o&&(L=k+o),v>=D?go&&(F=T-o):g>D+o?F=g-(D+o):T<-o&&(F=T+o),L||F){var P=this.viewportToFramedGraph({x:0,y:0},{cameraState:e}),q=this.viewportToFramedGraph({x:L,y:F},{cameraState:e});L=q.x-P.x,F=q.y-P.y,u.x+=L,u.y+=F}return u}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),r=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);At(r,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var a=this.canvasContexts.labels,o=0,s=r.length;othis.width+qn||c<-50||c>this.height+Zn)){this.displayedNodeLabels.add(u);var y=this.settings.defaultDrawNodeLabel,b=this.nodePrograms[h.type],E=(b==null?void 0:b.drawLabel)||y;E(a,S(S({key:u},h),{},{size:f,x:l,y:c}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);var r=Yn({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});At(r,this.edgesWithForcedLabels);for(var a=new Set,o=0,s=r.length;othis.nodeZExtent[1]&&(this.nodeZExtent[1]=a.zIndex))}},{key:"updateNode",value:function(e){this.addNode(e);var r=this.nodeDataCache[e];this.normalizationFunction.applyTo(r)}},{key:"removeNode",value:function(e){delete this.nodeDataCache[e],delete this.nodeProgramIndex[e],this.highlightedNodes.delete(e),this.hoveredNode===e&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(e)}},{key:"addEdge",value:function(e){var r=Object.assign({},this.graph.getEdgeAttributes(e));this.settings.edgeReducer&&(r=this.settings.edgeReducer(e,r));var a=Jn(this.settings,e,r);this.edgeDataCache[e]=a,this.edgesWithForcedLabels.delete(e),a.forceLabel&&!a.hidden&&this.edgesWithForcedLabels.add(e),this.settings.zIndex&&(a.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=a.zIndex))}},{key:"updateEdge",value:function(e){this.addEdge(e)}},{key:"removeEdge",value:function(e){delete this.edgeDataCache[e],delete this.edgeProgramIndex[e],this.hoveredEdge===e&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(e)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new Nt,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0]}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(e,r,a){var o=this.nodeDataCache[e],s=this.nodePrograms[o.type];if(!s)throw new Error('Sigma: could not find a suitable program for node type "'.concat(o.type,'"!'));s.process(r,a,o),this.nodeProgramIndex[e]=a}},{key:"addEdgeToProgram",value:function(e,r,a){var o=this.edgeDataCache[e],s=this.edgePrograms[o.type];if(!s)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(o.type,'"!'));var u=this.graph.extremities(e),h=this.nodeDataCache[u[0]],d=this.nodeDataCache[u[1]];s.process(r,a,h,d,o),this.edgeProgramIndex[e]=a}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var e=this.settings,r=e.stagePadding,a=e.autoRescale;return a&&r||0}},{key:"createLayer",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[e])throw new Error('Sigma: a layer named "'.concat(e,'" already exists'));var o=Nn(r,{position:"absolute"},{class:"sigma-".concat(e)});return a.style&&Object.assign(o.style,a.style),this.elements[e]=o,"beforeLayer"in a&&a.beforeLayer?this.elements[a.beforeLayer].before(o):"afterLayer"in a&&a.afterLayer?this.elements[a.afterLayer].after(o):this.container.appendChild(o),o}},{key:"createCanvas",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(e,"canvas",r)}},{key:"createCanvasContext",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.createCanvas(e,r),o={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[e]=a.getContext("2d",o),this}},{key:"createWebGLContext",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=(r==null?void 0:r.canvas)||this.createCanvas(e,r);r.hidden&&a.remove();var o=S({preserveDrawingBuffer:!1,antialias:!1},r),s;s=a.getContext("webgl2",o),s||(s=a.getContext("webgl",o)),s||(s=a.getContext("experimental-webgl",o));var u=s;if(this.webGLContexts[e]=u,u.blendFunc(u.ONE,u.ONE_MINUS_SRC_ALPHA),r.picking){this.pickingLayers.add(e);var h=u.createFramebuffer();if(!h)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(e));this.frameBuffers[e]=h}return u}},{key:"killLayer",value:function(e){var r=this.elements[e];if(!r)throw new Error("Sigma: cannot kill layer ".concat(e,", which does not exist"));if(this.webGLContexts[e]){var a,o=this.webGLContexts[e];(a=o.getExtension("WEBGL_lose_context"))===null||a===void 0||a.loseContext(),delete this.webGLContexts[e]}else this.canvasContexts[e]&&delete this.canvasContexts[e];return r.remove(),delete this.elements[e],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(e){this.unbindCameraHandlers(),this.camera=e,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(e){e!==this.graph&&(this.hoveredNode&&!e.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!e.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}}},{key:"getNodeDisplayData",value:function(e){var r=this.nodeDataCache[e];return r?Object.assign({},r):void 0}},{key:"getEdgeDisplayData",value:function(e){var r=this.edgeDataCache[e];return r?Object.assign({},r):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return S({},this.settings)}},{key:"getSetting",value:function(e){return this.settings[e]}},{key:"setSetting",value:function(e,r){var a=S({},this.settings);return this.settings[e]=r,Ve(this.settings),this.handleSettingsUpdate(a),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(e,r){return this.setSetting(e,r(this.settings[e])),this}},{key:"setSettings",value:function(e){var r=S({},this.settings);return this.settings=S(S({},this.settings),e),Ve(this.settings),this.handleSettingsUpdate(r),this.scheduleRefresh(),this}},{key:"resize",value:function(e){var r=this.width,a=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=Ct(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!e&&r===this.width&&a===this.height)return this;for(var o in this.elements){var s=this.elements[o];s.style.width=this.width+"px",s.style.height=this.height+"px"}for(var u in this.canvasContexts)this.elements[u].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[u].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[u].scale(this.pixelRatio,this.pixelRatio);for(var h in this.webGLContexts){this.elements[h].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[h].setAttribute("height",this.height*this.pixelRatio+"px");var d=this.webGLContexts[h];if(d.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(h)){var l=this.textures[h];l&&d.deleteTexture(l)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(e){var r=this,a=(e==null?void 0:e.skipIndexation)!==void 0?e==null?void 0:e.skipIndexation:!1,o=(e==null?void 0:e.schedule)!==void 0?e.schedule:!1,s=!e||!e.partialGraph;if(s)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(g){return r.addNode(g)}),this.graph.forEachEdge(function(g){return r.addEdge(g)});else{for(var u,h,d=((u=e.partialGraph)===null||u===void 0?void 0:u.nodes)||[],l=0,c=(d==null?void 0:d.length)||0;l1&&arguments[1]!==void 0?arguments[1]:{},a=!!r.cameraState||!!r.viewportDimensions||!!r.graphDimensions,o=r.matrix?r.matrix:a?be(r.cameraState||this.camera.getState(),r.viewportDimensions||this.getDimensions(),r.graphDimensions||this.getGraphDimensions(),r.padding||this.getStagePadding()):this.matrix,s=Xe(o,e);return{x:(1+s.x)*this.width/2,y:(1-s.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=!!r.cameraState||!!r.viewportDimensions||!r.graphDimensions,o=r.matrix?r.matrix:a?be(r.cameraState||this.camera.getState(),r.viewportDimensions||this.getDimensions(),r.graphDimensions||this.getGraphDimensions(),r.padding||this.getStagePadding(),!0):this.invMatrix,s=Xe(o,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(s.x)&&(s.x=0),isNaN(s.y)&&(s.y=0),s}},{key:"viewportToGraph",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(e,r))}},{key:"graphToViewport",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(e),r)}},{key:"getGraphToViewportRatio",value:function(){var e={x:0,y:0},r={x:1,y:1},a=Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2)),o=this.graphToViewport(e),s=this.graphToViewport(r),u=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2));return u/a}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(e){return this.customBBox=e,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild);this.canvasContexts={},this.webGLContexts={},this.elements={};for(var r in this.nodePrograms)this.nodePrograms[r].kill();for(var a in this.nodeHoverPrograms)this.nodeHoverPrograms[a].kill();for(var o in this.edgePrograms)this.edgePrograms[o].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var s in this.elements)this.killLayer(s)}},{key:"scaleSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return e/this.settings.zoomToSizeRatioFunction(r)*(this.getSetting("itemSizesReference")==="positions"?r*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var e={};for(var r in this.elements)this.elements[r]instanceof HTMLCanvasElement&&(e[r]=this.elements[r]);return e}}])}(nt);const wi=G.createContext(null),ea=wi.Provider;function ot(){const n=G.useContext(wi);if(n==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of ");return n}function Ei(){return ot().sigma}function ta(){const{sigma:n}=ot();return G.useCallback(i=>{n&&Object.keys(i).forEach(t=>{n.setSetting(t,i[t])})},[n])}function Fe(n){return new Set(Object.keys(n))}const Gt=Fe({clickNode:!0,rightClickNode:!0,downNode:!0,enterNode:!0,leaveNode:!0,doubleClickNode:!0,wheelNode:!0,clickEdge:!0,rightClickEdge:!0,downEdge:!0,enterEdge:!0,leaveEdge:!0,doubleClickEdge:!0,wheelEdge:!0,clickStage:!0,rightClickStage:!0,downStage:!0,doubleClickStage:!0,wheelStage:!0,beforeRender:!0,afterRender:!0,kill:!0,upStage:!0,upEdge:!0,upNode:!0,enterStage:!0,leaveStage:!0,resize:!0,afterClear:!0,afterProcess:!0,beforeClear:!0,beforeProcess:!0,moveBody:!0}),Ft=Fe({click:!0,rightClick:!0,doubleClick:!0,mouseup:!0,mousedown:!0,mousemove:!0,mousemovebody:!0,mouseleave:!0,mouseenter:!0,wheel:!0}),Pt=Fe({touchup:!0,touchdown:!0,touchmove:!0,touchmovebody:!0,tap:!0,doubletap:!0}),It=Fe({updated:!0});function oa(){const n=Ei(),i=ta(),[t,e]=G.useState({});return G.useEffect(()=>{if(!n||!t)return;const r=t,a=Object.keys(r);return a.forEach(o=>{const s=r[o];Gt.has(o)&&n.on(o,s),Ft.has(o)&&n.getMouseCaptor().on(o,s),Pt.has(o)&&n.getTouchCaptor().on(o,s),It.has(o)&&n.getCamera().on(o,s)}),()=>{n&&a.forEach(o=>{const s=r[o];Gt.has(o)&&n.off(o,s),Ft.has(o)&&n.getMouseCaptor().off(o,s),Pt.has(o)&&n.getTouchCaptor().off(o,s),It.has(o)&&n.getCamera().off(o,s)})}},[n,t,i]),e}function st(n,i){if(n===i)return!0;if(typeof n=="object"&&n!=null&&typeof i=="object"&&i!=null){if(Object.keys(n).length!=Object.keys(i).length)return!1;for(const t in n)if(!Object.hasOwn(i,t)||!st(n[t],i[t]))return!1;return!0}return!1}function sa(n){const i=Ei(),[t,e]=G.useState(n||{});G.useEffect(()=>{e(h=>st(h,n||{})?h:n||{})},[n]);const r=G.useCallback(h=>{i.getCamera().animatedZoom(Object.assign(Object.assign({},t),h))},[i,t]),a=G.useCallback(h=>{i.getCamera().animatedUnzoom(Object.assign(Object.assign({},t),h))},[i,t]),o=G.useCallback(h=>{i.getCamera().animatedReset(Object.assign(Object.assign({},t),h))},[i,t]),s=G.useCallback((h,d)=>{i.getCamera().animate(h,Object.assign(Object.assign({},t),d))},[i,t]),u=G.useCallback((h,d)=>{const l=i.getNodeDisplayData(h);l?i.getCamera().animate(l,Object.assign(Object.assign({},t),d)):console.warn(`Node ${h} not found`)},[i,t]);return{zoomIn:r,zoomOut:a,reset:o,goto:s,gotoNode:u}}function ua(n){const i=ot(),[t,e]=G.useState(!1),[r,a]=G.useState(i.container),o=G.useCallback(()=>e(s=>!s),[]);return G.useEffect(()=>(document.addEventListener("fullscreenchange",o),()=>document.removeEventListener("fullscreenchange",o)),[o]),G.useEffect(()=>{a(i.container)},[n,i.container]),{toggle:G.useCallback(()=>{var s;s=r,document.fullscreenElement!==s?s.requestFullscreen():document.exitFullscreen&&document.exitFullscreen()},[r]),isFullScreen:t}}const ha=G.forwardRef(({graph:n,id:i,className:t,style:e,settings:r={},children:a},o)=>{const s=G.useRef(null),u=G.useRef(null),h={className:`react-sigma ${t||""}`,id:i,style:e},[d,l]=G.useState(null),[c,f]=G.useState(r);G.useEffect(()=>{f(E=>st(E,r)?E:r)},[r]),G.useEffect(()=>{l(E=>{let k=null;if(u.current!==null){let x=new N;n&&(x=typeof n=="function"?new n:n);let T=null;E&&(T=E.getCamera().getState(),E.kill()),k=new Qn(x,u.current,c),T&&k.getCamera().setState(T)}return k})},[u,n,c]),G.useImperativeHandle(o,()=>d,[d]);const y=G.useMemo(()=>d&&s.current?{sigma:d,container:s.current}:null,[d,s]),b=y!==null?Me.createElement(ea,{value:y},a):null;return Me.createElement("div",Object.assign({},h,{ref:s}),Me.createElement("div",{className:"sigma-container",ref:u}),b)});export{di as D,rt as E,ci as F,jr as N,ha as S,Yt as U,W as _,$ as a,U as b,H as c,S as d,Vr as e,pe as f,li as g,ra as h,sa as i,st as j,aa as k,ua as l,Ge as m,na as n,fn as o,ta as p,yn as r,Ei as v,oa as y}; +`,vn=mn,vi=WebGLRenderingContext,Et=vi.UNSIGNED_BYTE,ye=vi.FLOAT,yn=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],bn=function(n){function i(){return U(this,i),H(this,i,arguments)}return W(i,n),$(i,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:vn,FRAGMENT_SHADER_SOURCE:gi,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:yn,ATTRIBUTES:[{name:"a_positionStart",size:2,type:ye},{name:"a_positionEnd",size:2,type:ye},{name:"a_normal",size:2,type:ye},{name:"a_color",size:4,type:Et,normalized:!0},{name:"a_id",size:4,type:Et,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:ye},{name:"a_normalCoef",size:1,type:ye}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(e,r,a,o,s){var u=s.size||1,h=a.x,d=a.y,l=o.x,c=o.y,f=pe(s.color),y=l-h,b=c-d,E=y*y+b*b,k=0,x=0;E&&(E=1/Math.sqrt(E),k=-b*E*u,x=y*E*u);var T=this.array;T[r++]=h,T[r++]=d,T[r++]=l,T[r++]=c,T[r++]=k,T[r++]=x,T[r++]=f,T[r++]=e}},{key:"setUniforms",value:function(e,r){var a=r.gl,o=r.uniformLocations,s=o.u_matrix,u=o.u_zoomRatio,h=o.u_feather,d=o.u_pixelRatio,l=o.u_correctionRatio,c=o.u_sizeRatio,f=o.u_minEdgeThickness;a.uniformMatrix3fv(s,!1,e.matrix),a.uniform1f(u,e.zoomRatio),a.uniform1f(c,e.sizeRatio),a.uniform1f(l,e.correctionRatio),a.uniform1f(d,e.pixelRatio),a.uniform1f(h,e.antiAliasingFeather),a.uniform1f(f,e.minEdgeThickness)}}])}(rt),nt=function(n){function i(){var t;return U(this,i),t=H(this,i),t.rawEmitter=t,t}return W(i,n),$(i)}(Ut.EventEmitter),We,_t;function wn(){return _t||(_t=1,We=function(i){return i!==null&&typeof i=="object"&&typeof i.addUndirectedEdgeWithKey=="function"&&typeof i.dropNode=="function"&&typeof i.multi=="boolean"}),We}var En=wn();const _n=Ci(En);var xn=function(i){return i},Tn=function(i){return i*i},Cn=function(i){return i*(2-i)},Sn=function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)},kn=function(i){return i*i*i},An=function(i){return--i*i*i+1},Rn=function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)},yi={linear:xn,quadraticIn:Tn,quadraticOut:Cn,quadraticInOut:Sn,cubicIn:kn,cubicOut:An,cubicInOut:Rn},bi={easing:"quadraticInOut",duration:150};function aa(n,i,t,e){var r=Object.assign({},bi,t),a=typeof r.easing=="function"?r.easing:yi[r.easing],o=Date.now(),s={};for(var u in i){var h=i[u];s[u]={};for(var d in h)s[u][d]=n.getNodeAttribute(u,d)}var l=null,c=function(){l=null;var y=(Date.now()-o)/r.duration;if(y>=1){for(var b in i){var E=i[b];for(var k in E)n.setNodeAttribute(b,k,E[k])}return}y=a(y);for(var x in i){var T=i[x],g=s[x];for(var p in T)n.setNodeAttribute(x,p,T[p]*y+g[p]*(1-y))}l=requestAnimationFrame(c)};return c(),function(){l&&cancelAnimationFrame(l)}}function K(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Ae(n,i,t){return n[0]=i,n[4]=typeof t=="number"?t:i,n}function xt(n,i){var t=Math.sin(i),e=Math.cos(i);return n[0]=e,n[1]=t,n[3]=-t,n[4]=e,n}function Tt(n,i,t){return n[6]=i,n[7]=t,n}function ne(n,i){var t=n[0],e=n[1],r=n[2],a=n[3],o=n[4],s=n[5],u=n[6],h=n[7],d=n[8],l=i[0],c=i[1],f=i[2],y=i[3],b=i[4],E=i[5],k=i[6],x=i[7],T=i[8];return n[0]=l*t+c*a+f*u,n[1]=l*e+c*o+f*h,n[2]=l*r+c*s+f*d,n[3]=y*t+b*a+E*u,n[4]=y*e+b*o+E*h,n[5]=y*r+b*s+E*d,n[6]=k*t+x*a+T*u,n[7]=k*e+x*o+T*h,n[8]=k*r+x*s+T*d,n}function Xe(n,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,e=n[0],r=n[1],a=n[3],o=n[4],s=n[6],u=n[7],h=i.x,d=i.y;return{x:h*e+d*a+s*t,y:h*r+d*o+u*t}}function Ln(n,i){var t=n.height/n.width,e=i.height/i.width;return t<1&&e>1||t>1&&e<1?1:Math.min(Math.max(e,1/e),Math.max(1/t,t))}function be(n,i,t,e,r){var a=n.angle,o=n.ratio,s=n.x,u=n.y,h=i.width,d=i.height,l=K(),c=Math.min(h,d)-2*e,f=Ln(i,t);return r?(ne(l,Tt(K(),s,u)),ne(l,Ae(K(),o)),ne(l,xt(K(),a)),ne(l,Ae(K(),h/c/2/f,d/c/2/f))):(ne(l,Ae(K(),2*(c/h)*f,2*(c/d)*f)),ne(l,xt(K(),-a)),ne(l,Ae(K(),1/o)),ne(l,Tt(K(),-s,-u))),l}function Dn(n,i,t){var e=Xe(n,{x:Math.cos(i.angle),y:Math.sin(i.angle)},0),r=e.x,a=e.y;return 1/Math.sqrt(Math.pow(r,2)+Math.pow(a,2))/t.width}function Nn(n){if(!n.order)return{x:[0,1],y:[0,1]};var i=1/0,t=-1/0,e=1/0,r=-1/0;return n.forEachNode(function(a,o){var s=o.x,u=o.y;st&&(t=s),ur&&(r=u)}),{x:[i,t],y:[e,r]}}function Gn(n){if(!_n(n))throw new Error("Sigma: invalid graph instance.");n.forEachNode(function(i,t){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw new Error("Sigma: Coordinates of node ".concat(i," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function Fn(n,i,t){var e=document.createElement(n);if(i)for(var r in i)e.style[r]=i[r];if(t)for(var a in t)e.setAttribute(a,t[a]);return e}function Ct(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function St(n,i,t){return t.sort(function(e,r){var a=i(e)||0,o=i(r)||0;return ao?1:0})}function kt(n){var i=le(n.x,2),t=i[0],e=i[1],r=le(n.y,2),a=r[0],o=r[1],s=Math.max(e-t,o-a),u=(e+t)/2,h=(o+a)/2;(s===0||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(u)&&(u=0),isNaN(h)&&(h=0);var d=function(c){return{x:.5+(c.x-u)/s,y:.5+(c.y-h)/s}};return d.applyTo=function(l){l.x=.5+(l.x-u)/s,l.y=.5+(l.y-h)/s},d.inverse=function(l){return{x:u+s*(l.x-.5),y:h+s*(l.y-.5)}},d.ratio=s,d}function Je(n){"@babel/helpers - typeof";return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Je(n)}function At(n,i){var t=i.size;if(t!==0){var e=n.length;n.length+=t;var r=0;i.forEach(function(a){n[e+r]=a,r++})}}function je(n){n=n||{};for(var i=0,t=arguments.length<=1?0:arguments.length-1;i1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(!o)return new Promise(function(f){return r.animate(e,a,f)});if(this.enabled){var s=S(S({},bi),a),u=this.validateState(e),h=typeof s.easing=="function"?s.easing:yi[s.easing],d=Date.now(),l=this.getState(),c=function(){var y=(Date.now()-d)/s.duration;if(y>=1){r.nextFrame=null,r.setState(u),r.animationCallback&&(r.animationCallback.call(null),r.animationCallback=void 0);return}var b=h(y),E={};typeof u.x=="number"&&(E.x=l.x+(u.x-l.x)*b),typeof u.y=="number"&&(E.y=l.y+(u.y-l.y)*b),r.enabledRotation&&typeof u.angle=="number"&&(E.angle=l.angle+(u.angle-l.angle)*b),typeof u.ratio=="number"&&(E.ratio=l.ratio+(u.ratio-l.ratio)*b),r.setState(E),r.nextFrame=requestAnimationFrame(c)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(c)):c(),this.animationCallback=o}}},{key:"animatedZoom",value:function(e){return e?typeof e=="number"?this.animate({ratio:this.ratio/e}):this.animate({ratio:this.ratio/(e.factor||Re)},e):this.animate({ratio:this.ratio/Re})}},{key:"animatedUnzoom",value:function(e){return e?typeof e=="number"?this.animate({ratio:this.ratio*e}):this.animate({ratio:this.ratio*(e.factor||Re)},e):this.animate({ratio:this.ratio*Re})}},{key:"animatedReset",value:function(e){return this.animate({x:.5,y:.5,ratio:1,angle:0},e)}},{key:"copy",value:function(){return i.from(this.getState())}}],[{key:"from",value:function(e){var r=new i;return r.setState(e)}}])}(nt);function Y(n,i){var t=i.getBoundingClientRect();return{x:n.clientX-t.left,y:n.clientY-t.top}}function X(n,i){var t=S(S({},Y(n,i)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){t.sigmaDefaultPrevented=!0},original:n});return t}function we(n){var i="x"in n?n:S(S({},n.touches[0]||n.previousTouches[0]),{},{original:n.original,sigmaDefaultPrevented:n.sigmaDefaultPrevented,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0,i.sigmaDefaultPrevented=!0}});return i}function On(n,i){return S(S({},X(n,i)),{},{delta:wi(n)})}var Un=2;function De(n){for(var i=[],t=0,e=Math.min(n.length,Un);t0;r.draggedEvents=0,l&&r.renderer.getSetting("hideEdgesOnMove")&&r.renderer.refresh()},0),this.emit("mouseup",X(e,this.container))}}},{key:"handleMove",value:function(e){var r=this;if(this.enabled){var a=X(e,this.container);if(this.emit("mousemovebody",a),(e.target===this.container||e.composedPath()[0]===this.container)&&this.emit("mousemove",a),!a.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){r.movingTimeout=null,r.isMoving=!1},this.settings.dragTimeout);var o=this.renderer.getCamera(),s=Y(e,this.container),u=s.x,h=s.y,d=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),l=this.renderer.viewportToFramedGraph({x:u,y:h}),c=d.x-l.x,f=d.y-l.y,y=o.getState(),b=y.x+c,E=y.y+f;o.setState({x:b,y:E}),this.lastMouseX=u,this.lastMouseY=h,e.preventDefault(),e.stopPropagation()}}}},{key:"handleLeave",value:function(e){this.emit("mouseleave",X(e,this.container))}},{key:"handleEnter",value:function(e){this.emit("mouseenter",X(e,this.container))}},{key:"handleWheel",value:function(e){var r=this,a=this.renderer.getCamera();if(!(!this.enabled||!a.enabledZooming)){var o=wi(e);if(o){var s=On(e,this.container);if(this.emit("wheel",s),s.sigmaDefaultPrevented){e.preventDefault(),e.stopPropagation();return}var u=a.getState().ratio,h=o>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,d=a.getBoundedRatio(u*h),l=o>0?1:-1,c=Date.now();u!==d&&(e.preventDefault(),e.stopPropagation(),!(this.currentWheelDirection===l&&this.lastWheelTriggerTime&&c-this.lastWheelTriggerTimee.size?-1:t.sizee.key?1:-1}}])}(),Nt=function(){function n(){U(this,n),m(this,"width",0),m(this,"height",0),m(this,"cellSize",0),m(this,"columns",0),m(this,"rows",0),m(this,"cells",{})}return $(n,[{key:"resizeAndClear",value:function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}}},{key:"getIndex",value:function(t){var e=Math.floor(t.x/this.cellSize),r=Math.floor(t.y/this.cellSize);return r*this.columns+e}},{key:"add",value:function(t,e,r){var a=new Dt(t,e),o=this.getIndex(r),s=this.cells[o];s||(s=[],this.cells[o]=s),s.push(a)}},{key:"organize",value:function(){for(var t in this.cells){var e=this.cells[t];e.sort(Dt.compare)}}},{key:"getLabelsToDisplay",value:function(t,e){var r=this.cellSize*this.cellSize,a=r/t/t,o=a*e/r,s=Math.ceil(o),u=[];for(var h in this.cells)for(var d=this.cells[h],l=0;l2&&arguments[2]!==void 0?arguments[2]:{};if(U(this,i),r=H(this,i),m(r,"elements",{}),m(r,"canvasContexts",{}),m(r,"webGLContexts",{}),m(r,"pickingLayers",new Set),m(r,"textures",{}),m(r,"frameBuffers",{}),m(r,"activeListeners",{}),m(r,"labelGrid",new Nt),m(r,"nodeDataCache",{}),m(r,"edgeDataCache",{}),m(r,"nodeProgramIndex",{}),m(r,"edgeProgramIndex",{}),m(r,"nodesWithForcedLabels",new Set),m(r,"edgesWithForcedLabels",new Set),m(r,"nodeExtent",{x:[0,1],y:[0,1]}),m(r,"nodeZExtent",[1/0,-1/0]),m(r,"edgeZExtent",[1/0,-1/0]),m(r,"matrix",K()),m(r,"invMatrix",K()),m(r,"correctionRatio",1),m(r,"customBBox",null),m(r,"normalizationFunction",kt({x:[0,1],y:[0,1]})),m(r,"graphToViewportRatio",1),m(r,"itemIDsIndex",{}),m(r,"nodeIndices",{}),m(r,"edgeIndices",{}),m(r,"width",0),m(r,"height",0),m(r,"pixelRatio",Ct()),m(r,"pickingDownSizingRatio",2*r.pixelRatio),m(r,"displayedNodeLabels",new Set),m(r,"displayedEdgeLabels",new Set),m(r,"highlightedNodes",new Set),m(r,"hoveredNode",null),m(r,"hoveredEdge",null),m(r,"renderFrame",null),m(r,"renderHighlightedNodesFrame",null),m(r,"needToProcess",!1),m(r,"checkEdgesEventsFrame",null),m(r,"nodePrograms",{}),m(r,"nodeHoverPrograms",{}),m(r,"edgePrograms",{}),r.settings=Mn(a),Ve(r.settings),Gn(t),!(e instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");r.graph=t,r.container=e,r.createWebGLContext("edges",{picking:a.enableEdgeEvents}),r.createCanvasContext("edgeLabels"),r.createWebGLContext("nodes",{picking:!0}),r.createCanvasContext("labels"),r.createCanvasContext("hovers"),r.createWebGLContext("hoverNodes"),r.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),r.resize();for(var o in r.settings.nodeProgramClasses)r.registerNodeProgram(o,r.settings.nodeProgramClasses[o],r.settings.nodeHoverProgramClasses[o]);for(var s in r.settings.edgeProgramClasses)r.registerEdgeProgram(s,r.settings.edgeProgramClasses[s]);return r.camera=new Rt,r.bindCameraHandlers(),r.mouseCaptor=new Bn(r.elements.mouse,r),r.mouseCaptor.setSettings(r.settings),r.touchCaptor=new jn(r.elements.mouse,r),r.touchCaptor.setSettings(r.settings),r.bindEventHandlers(),r.bindGraphHandlers(),r.handleSettingsUpdate(),r.refresh(),r}return W(i,n),$(i,[{key:"registerNodeProgram",value:function(e,r,a){return this.nodePrograms[e]&&this.nodePrograms[e].kill(),this.nodeHoverPrograms[e]&&this.nodeHoverPrograms[e].kill(),this.nodePrograms[e]=new r(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[e]=new(a||r)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(e,r){return this.edgePrograms[e]&&this.edgePrograms[e].kill(),this.edgePrograms[e]=new r(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(e){if(this.nodePrograms[e]){var r=this.nodePrograms,a=r[e],o=Ke(r,[e].map(_e));a.kill(),this.nodePrograms=o}if(this.nodeHoverPrograms[e]){var s=this.nodeHoverPrograms,u=s[e],h=Ke(s,[e].map(_e));u.kill(),this.nodePrograms=h}return this}},{key:"unregisterEdgeProgram",value:function(e){if(this.edgePrograms[e]){var r=this.edgePrograms,a=r[e],o=Ke(r,[e].map(_e));a.kill(),this.edgePrograms=o}return this}},{key:"resetWebGLTexture",value:function(e){var r=this.webGLContexts[e],a=this.frameBuffers[e],o=this.textures[e];o&&r.deleteTexture(o);var s=r.createTexture();return r.bindFramebuffer(r.FRAMEBUFFER,a),r.bindTexture(r.TEXTURE_2D,s),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,this.width,this.height,0,r.RGBA,r.UNSIGNED_BYTE,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,s,0),this.textures[e]=s,this}},{key:"bindCameraHandlers",value:function(){var e=this;return this.activeListeners.camera=function(){e.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(e){var r=e.x,a=e.y,o=gt(this.webGLContexts.nodes,this.frameBuffers.nodes,r,a,this.pixelRatio,this.pickingDownSizingRatio),s=ft.apply(void 0,Lt(o)),u=this.itemIDsIndex[s];return u&&u.type==="node"?u.id:null}},{key:"bindEventHandlers",value:function(){var e=this;this.activeListeners.handleResize=function(){e.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(a){var o=we(a),s={event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}},u=e.getNodeAtPosition(o);if(u&&e.hoveredNode!==u&&!e.nodeDataCache[u].hidden){e.hoveredNode&&e.emit("leaveNode",S(S({},s),{},{node:e.hoveredNode})),e.hoveredNode=u,e.emit("enterNode",S(S({},s),{},{node:u})),e.scheduleHighlightedNodesRender();return}if(e.hoveredNode&&e.getNodeAtPosition(o)!==e.hoveredNode){var h=e.hoveredNode;e.hoveredNode=null,e.emit("leaveNode",S(S({},s),{},{node:h})),e.scheduleHighlightedNodesRender();return}if(e.settings.enableEdgeEvents){var d=e.hoveredNode?null:e.getEdgeAtPoint(s.event.x,s.event.y);d!==e.hoveredEdge&&(e.hoveredEdge&&e.emit("leaveEdge",S(S({},s),{},{edge:e.hoveredEdge})),d&&e.emit("enterEdge",S(S({},s),{},{edge:d})),e.hoveredEdge=d)}},this.activeListeners.handleMoveBody=function(a){var o=we(a);e.emit("moveBody",{event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(a){var o=we(a),s={event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}};e.hoveredNode&&(e.emit("leaveNode",S(S({},s),{},{node:e.hoveredNode})),e.scheduleHighlightedNodesRender()),e.settings.enableEdgeEvents&&e.hoveredEdge&&(e.emit("leaveEdge",S(S({},s),{},{edge:e.hoveredEdge})),e.scheduleHighlightedNodesRender()),e.emit("leaveStage",S({},s))},this.activeListeners.handleEnter=function(a){var o=we(a),s={event:o,preventSigmaDefault:function(){o.preventSigmaDefault()}};e.emit("enterStage",S({},s))};var r=function(o){return function(s){var u=we(s),h={event:u,preventSigmaDefault:function(){u.preventSigmaDefault()}},d=e.getNodeAtPosition(u);if(d)return e.emit("".concat(o,"Node"),S(S({},h),{},{node:d}));if(e.settings.enableEdgeEvents){var l=e.getEdgeAtPoint(u.x,u.y);if(l)return e.emit("".concat(o,"Edge"),S(S({},h),{},{edge:l}))}return e.emit("".concat(o,"Stage"),h)}};return this.activeListeners.handleClick=r("click"),this.activeListeners.handleRightClick=r("rightClick"),this.activeListeners.handleDoubleClick=r("doubleClick"),this.activeListeners.handleWheel=r("wheel"),this.activeListeners.handleDown=r("down"),this.activeListeners.handleUp=r("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var e=this,r=this.graph,a=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(o){var s,u=(s=o.hints)===null||s===void 0?void 0:s.attributes;e.graph.forEachNode(function(d){return e.updateNode(d)});var h=!u||u.some(function(d){return a.has(d)});e.refresh({partialGraph:{nodes:r.nodes()},skipIndexation:!h,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(o){var s,u=(s=o.hints)===null||s===void 0?void 0:s.attributes;e.graph.forEachEdge(function(d){return e.updateEdge(d)});var h=u&&["zIndex","type"].some(function(d){return u==null?void 0:u.includes(d)});e.refresh({partialGraph:{edges:r.edges()},skipIndexation:!h,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(o){var s=o.key;e.addNode(s),e.refresh({partialGraph:{nodes:[s]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(o){var s=o.key;e.refresh({partialGraph:{nodes:[s]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(o){var s=o.key;e.removeNode(s),e.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(o){var s=o.key;e.addEdge(s),e.refresh({partialGraph:{edges:[s]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(o){var s=o.key;e.refresh({partialGraph:{edges:[s]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(o){var s=o.key;e.removeEdge(s),e.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){e.clearEdgeState(),e.clearEdgeIndices(),e.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){e.clearEdgeState(),e.clearNodeState(),e.clearEdgeIndices(),e.clearNodeIndices(),e.refresh({schedule:!0})},r.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),r.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),r.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),r.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),r.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),r.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),r.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),r.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),r.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),r.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var e=this.graph;e.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),e.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),e.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),e.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),e.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),e.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),e.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(e,r){var a=gt(this.webGLContexts.edges,this.frameBuffers.edges,e,r,this.pixelRatio,this.pickingDownSizingRatio),o=ft.apply(void 0,Lt(a)),s=this.itemIDsIndex[o];return s&&s.type==="edge"?s.id:null}},{key:"process",value:function(){var e=this;this.emit("beforeProcess");var r=this.graph,a=this.settings,o=this.getDimensions();if(this.nodeExtent=Nn(this.graph),!this.settings.autoRescale){var s=o.width,u=o.height,h=this.nodeExtent,d=h.x,l=h.y;this.nodeExtent={x:[(d[0]+d[1])/2-s/2,(d[0]+d[1])/2+s/2],y:[(l[0]+l[1])/2-u/2,(l[0]+l[1])/2+u/2]}}this.normalizationFunction=kt(this.customBBox||this.nodeExtent);var c=new Rt,f=be(c.getState(),o,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(o,a.labelGridCellSize);for(var y={},b={},E={},k={},x=1,T=r.nodes(),g=0,p=T.length;g1&&arguments[1]!==void 0?arguments[1]:{},a=r.tolerance,o=a===void 0?0:a,s=r.boundaries,u=S({},e),h=s||this.nodeExtent,d=le(h.x,2),l=d[0],c=d[1],f=le(h.y,2),y=f[0],b=f[1],E=[this.graphToViewport({x:l,y},{cameraState:e}),this.graphToViewport({x:c,y},{cameraState:e}),this.graphToViewport({x:l,y:b},{cameraState:e}),this.graphToViewport({x:c,y:b},{cameraState:e})],k=1/0,x=-1/0,T=1/0,g=-1/0;E.forEach(function(O){var j=O.x,te=O.y;k=Math.min(k,j),x=Math.max(x,j),T=Math.min(T,te),g=Math.max(g,te)});var p=x-k,v=g-T,_=this.getDimensions(),A=_.width,D=_.height,L=0,F=0;if(p>=A?xo&&(L=k-o):x>A+o?L=x-(A+o):k<-o&&(L=k+o),v>=D?go&&(F=T-o):g>D+o?F=g-(D+o):T<-o&&(F=T+o),L||F){var P=this.viewportToFramedGraph({x:0,y:0},{cameraState:e}),q=this.viewportToFramedGraph({x:L,y:F},{cameraState:e});L=q.x-P.x,F=q.y-P.y,u.x+=L,u.y+=F}return u}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),r=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);At(r,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var a=this.canvasContexts.labels,o=0,s=r.length;othis.width+Gt||c<-Ft||c>this.height+Ft)){this.displayedNodeLabels.add(u);var y=this.settings.defaultDrawNodeLabel,b=this.nodePrograms[h.type],E=(b==null?void 0:b.drawLabel)||y;E(a,S(S({key:u},h),{},{size:f,x:l,y:c}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);var r=Zn({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});At(r,this.edgesWithForcedLabels);for(var a=new Set,o=0,s=r.length;othis.nodeZExtent[1]&&(this.nodeZExtent[1]=a.zIndex))}},{key:"updateNode",value:function(e){this.addNode(e);var r=this.nodeDataCache[e];this.normalizationFunction.applyTo(r)}},{key:"removeNode",value:function(e){delete this.nodeDataCache[e],delete this.nodeProgramIndex[e],this.highlightedNodes.delete(e),this.hoveredNode===e&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(e)}},{key:"addEdge",value:function(e){var r=Object.assign({},this.graph.getEdgeAttributes(e));this.settings.edgeReducer&&(r=this.settings.edgeReducer(e,r));var a=Jn(this.settings,e,r);this.edgeDataCache[e]=a,this.edgesWithForcedLabels.delete(e),a.forceLabel&&!a.hidden&&this.edgesWithForcedLabels.add(e),this.settings.zIndex&&(a.zIndexthis.edgeZExtent[1]&&(this.edgeZExtent[1]=a.zIndex))}},{key:"updateEdge",value:function(e){this.addEdge(e)}},{key:"removeEdge",value:function(e){delete this.edgeDataCache[e],delete this.edgeProgramIndex[e],this.hoveredEdge===e&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(e)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new Nt,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0],this.highlightedNodes=new Set}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(e,r,a){var o=this.nodeDataCache[e],s=this.nodePrograms[o.type];if(!s)throw new Error('Sigma: could not find a suitable program for node type "'.concat(o.type,'"!'));s.process(r,a,o),this.nodeProgramIndex[e]=a}},{key:"addEdgeToProgram",value:function(e,r,a){var o=this.edgeDataCache[e],s=this.edgePrograms[o.type];if(!s)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(o.type,'"!'));var u=this.graph.extremities(e),h=this.nodeDataCache[u[0]],d=this.nodeDataCache[u[1]];s.process(r,a,h,d,o),this.edgeProgramIndex[e]=a}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var e=this.settings,r=e.stagePadding,a=e.autoRescale;return a&&r||0}},{key:"createLayer",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[e])throw new Error('Sigma: a layer named "'.concat(e,'" already exists'));var o=Fn(r,{position:"absolute"},{class:"sigma-".concat(e)});return a.style&&Object.assign(o.style,a.style),this.elements[e]=o,"beforeLayer"in a&&a.beforeLayer?this.elements[a.beforeLayer].before(o):"afterLayer"in a&&a.afterLayer?this.elements[a.afterLayer].after(o):this.container.appendChild(o),o}},{key:"createCanvas",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(e,"canvas",r)}},{key:"createCanvasContext",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.createCanvas(e,r),o={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[e]=a.getContext("2d",o),this}},{key:"createWebGLContext",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=(r==null?void 0:r.canvas)||this.createCanvas(e,r);r.hidden&&a.remove();var o=S({preserveDrawingBuffer:!1,antialias:!1},r),s;s=a.getContext("webgl2",o),s||(s=a.getContext("webgl",o)),s||(s=a.getContext("experimental-webgl",o));var u=s;if(this.webGLContexts[e]=u,u.blendFunc(u.ONE,u.ONE_MINUS_SRC_ALPHA),r.picking){this.pickingLayers.add(e);var h=u.createFramebuffer();if(!h)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(e));this.frameBuffers[e]=h}return u}},{key:"killLayer",value:function(e){var r=this.elements[e];if(!r)throw new Error("Sigma: cannot kill layer ".concat(e,", which does not exist"));if(this.webGLContexts[e]){var a,o=this.webGLContexts[e];(a=o.getExtension("WEBGL_lose_context"))===null||a===void 0||a.loseContext(),delete this.webGLContexts[e]}else this.canvasContexts[e]&&delete this.canvasContexts[e];return r.remove(),delete this.elements[e],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(e){this.unbindCameraHandlers(),this.camera=e,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(e){e!==this.graph&&(this.hoveredNode&&!e.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!e.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}}},{key:"getNodeDisplayData",value:function(e){var r=this.nodeDataCache[e];return r?Object.assign({},r):void 0}},{key:"getEdgeDisplayData",value:function(e){var r=this.edgeDataCache[e];return r?Object.assign({},r):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return S({},this.settings)}},{key:"getSetting",value:function(e){return this.settings[e]}},{key:"setSetting",value:function(e,r){var a=S({},this.settings);return this.settings[e]=r,Ve(this.settings),this.handleSettingsUpdate(a),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(e,r){return this.setSetting(e,r(this.settings[e])),this}},{key:"setSettings",value:function(e){var r=S({},this.settings);return this.settings=S(S({},this.settings),e),Ve(this.settings),this.handleSettingsUpdate(r),this.scheduleRefresh(),this}},{key:"resize",value:function(e){var r=this.width,a=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=Ct(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!e&&r===this.width&&a===this.height)return this;for(var o in this.elements){var s=this.elements[o];s.style.width=this.width+"px",s.style.height=this.height+"px"}for(var u in this.canvasContexts)this.elements[u].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[u].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[u].scale(this.pixelRatio,this.pixelRatio);for(var h in this.webGLContexts){this.elements[h].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[h].setAttribute("height",this.height*this.pixelRatio+"px");var d=this.webGLContexts[h];if(d.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(h)){var l=this.textures[h];l&&d.deleteTexture(l)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(e){var r=this,a=(e==null?void 0:e.skipIndexation)!==void 0?e==null?void 0:e.skipIndexation:!1,o=(e==null?void 0:e.schedule)!==void 0?e.schedule:!1,s=!e||!e.partialGraph;if(s)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(g){return r.addNode(g)}),this.graph.forEachEdge(function(g){return r.addEdge(g)});else{for(var u,h,d=((u=e.partialGraph)===null||u===void 0?void 0:u.nodes)||[],l=0,c=(d==null?void 0:d.length)||0;l1&&arguments[1]!==void 0?arguments[1]:{},a=!!r.cameraState||!!r.viewportDimensions||!!r.graphDimensions,o=r.matrix?r.matrix:a?be(r.cameraState||this.camera.getState(),r.viewportDimensions||this.getDimensions(),r.graphDimensions||this.getGraphDimensions(),r.padding||this.getStagePadding()):this.matrix,s=Xe(o,e);return{x:(1+s.x)*this.width/2,y:(1-s.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=!!r.cameraState||!!r.viewportDimensions||!r.graphDimensions,o=r.matrix?r.matrix:a?be(r.cameraState||this.camera.getState(),r.viewportDimensions||this.getDimensions(),r.graphDimensions||this.getGraphDimensions(),r.padding||this.getStagePadding(),!0):this.invMatrix,s=Xe(o,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(s.x)&&(s.x=0),isNaN(s.y)&&(s.y=0),s}},{key:"viewportToGraph",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(e,r))}},{key:"graphToViewport",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(e),r)}},{key:"getGraphToViewportRatio",value:function(){var e={x:0,y:0},r={x:1,y:1},a=Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2)),o=this.graphToViewport(e),s=this.graphToViewport(r),u=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2));return u/a}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(e){return this.customBBox=e,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild);for(var r in this.nodePrograms)this.nodePrograms[r].kill();for(var a in this.nodeHoverPrograms)this.nodeHoverPrograms[a].kill();for(var o in this.edgePrograms)this.edgePrograms[o].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var s in this.elements)this.killLayer(s);this.canvasContexts={},this.webGLContexts={},this.elements={}}},{key:"scaleSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return e/this.settings.zoomToSizeRatioFunction(r)*(this.getSetting("itemSizesReference")==="positions"?r*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var e={};for(var r in this.elements)this.elements[r]instanceof HTMLCanvasElement&&(e[r]=this.elements[r]);return e}}])}(nt);const _i=G.createContext(null),ea=_i.Provider;function ot(){const n=G.useContext(_i);if(n==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of ");return n}function xi(){return ot().sigma}function ta(){const{sigma:n}=ot();return G.useCallback(i=>{n&&Object.keys(i).forEach(t=>{n.setSetting(t,i[t])})},[n])}function Fe(n){return new Set(Object.keys(n))}const Pt=Fe({clickNode:!0,rightClickNode:!0,downNode:!0,enterNode:!0,leaveNode:!0,doubleClickNode:!0,wheelNode:!0,clickEdge:!0,rightClickEdge:!0,downEdge:!0,enterEdge:!0,leaveEdge:!0,doubleClickEdge:!0,wheelEdge:!0,clickStage:!0,rightClickStage:!0,downStage:!0,doubleClickStage:!0,wheelStage:!0,beforeRender:!0,afterRender:!0,kill:!0,upStage:!0,upEdge:!0,upNode:!0,enterStage:!0,leaveStage:!0,resize:!0,afterClear:!0,afterProcess:!0,beforeClear:!0,beforeProcess:!0,moveBody:!0}),It=Fe({click:!0,rightClick:!0,doubleClick:!0,mouseup:!0,mousedown:!0,mousemove:!0,mousemovebody:!0,mouseleave:!0,mouseenter:!0,wheel:!0}),Mt=Fe({touchup:!0,touchdown:!0,touchmove:!0,touchmovebody:!0,tap:!0,doubletap:!0}),Ot=Fe({updated:!0});function oa(){const n=xi(),i=ta(),[t,e]=G.useState({});return G.useEffect(()=>{if(!n||!t)return;const r=t,a=Object.keys(r);return a.forEach(o=>{const s=r[o];Pt.has(o)&&n.on(o,s),It.has(o)&&n.getMouseCaptor().on(o,s),Mt.has(o)&&n.getTouchCaptor().on(o,s),Ot.has(o)&&n.getCamera().on(o,s)}),()=>{n&&a.forEach(o=>{const s=r[o];Pt.has(o)&&n.off(o,s),It.has(o)&&n.getMouseCaptor().off(o,s),Mt.has(o)&&n.getTouchCaptor().off(o,s),Ot.has(o)&&n.getCamera().off(o,s)})}},[n,t,i]),e}function st(n,i){if(n===i)return!0;if(typeof n=="object"&&n!=null&&typeof i=="object"&&i!=null){if(Object.keys(n).length!=Object.keys(i).length)return!1;for(const t in n)if(!Object.hasOwn(i,t)||!st(n[t],i[t]))return!1;return!0}return!1}function sa(n){const i=xi(),[t,e]=G.useState(n||{});G.useEffect(()=>{e(h=>st(h,n||{})?h:n||{})},[n]);const r=G.useCallback(h=>{i.getCamera().animatedZoom(Object.assign(Object.assign({},t),h))},[i,t]),a=G.useCallback(h=>{i.getCamera().animatedUnzoom(Object.assign(Object.assign({},t),h))},[i,t]),o=G.useCallback(h=>{i.getCamera().animatedReset(Object.assign(Object.assign({},t),h))},[i,t]),s=G.useCallback((h,d)=>{i.getCamera().animate(h,Object.assign(Object.assign({},t),d))},[i,t]),u=G.useCallback((h,d)=>{const l=i.getNodeDisplayData(h);l?i.getCamera().animate(l,Object.assign(Object.assign({},t),d)):console.warn(`Node ${h} not found`)},[i,t]);return{zoomIn:r,zoomOut:a,reset:o,goto:s,gotoNode:u}}function ua(n){const i=ot(),[t,e]=G.useState(!1),[r,a]=G.useState(i.container),o=G.useCallback(()=>e(s=>!s),[]);return G.useEffect(()=>(document.addEventListener("fullscreenchange",o),()=>document.removeEventListener("fullscreenchange",o)),[o]),G.useEffect(()=>{a(i.container)},[n,i.container]),{toggle:G.useCallback(()=>{var s;s=r,document.fullscreenElement!==s?s.requestFullscreen():document.exitFullscreen&&document.exitFullscreen()},[r]),isFullScreen:t}}const ha=G.forwardRef(({graph:n,id:i,className:t,style:e,settings:r={},children:a},o)=>{const s=G.useRef(null),u=G.useRef(null),h={className:`react-sigma ${t||""}`,id:i,style:e},[d,l]=G.useState(null),[c,f]=G.useState(r);G.useEffect(()=>{f(E=>st(E,r)?E:r)},[r]),G.useEffect(()=>{l(E=>{let k=null;if(u.current!==null){let x=new N;n&&(x=typeof n=="function"?new n:n);let T=null;E&&(T=E.getCamera().getState(),E.kill()),k=new Qn(x,u.current,c),T&&k.getCamera().setState(T)}return k})},[u,n,c]),G.useImperativeHandle(o,()=>d,[d]);const y=G.useMemo(()=>d&&s.current?{sigma:d,container:s.current}:null,[d,s]),b=y!==null?Me.createElement(ea,{value:y},a):null;return Me.createElement("div",Object.assign({},h,{ref:s}),Me.createElement("div",{className:"sigma-container",ref:u}),b)});export{ci as D,rt as E,gi as F,Kr as N,ha as S,Zt as U,W as _,$ as a,U as b,H as c,S as d,Yr as e,pe as f,fi as g,ra as h,sa as i,st as j,aa as k,ua as l,Ge as m,na as n,pn as o,ta as p,wn as r,xi as v,oa as y}; diff --git a/lightrag/api/webui/assets/index-1Hy45NwC.js b/lightrag/api/webui/assets/index-1Hy45NwC.js deleted file mode 100644 index a63a535a..00000000 --- a/lightrag/api/webui/assets/index-1Hy45NwC.js +++ /dev/null @@ -1,263 +0,0 @@ -import{p as Zt,c as Jt,d as en,v as tn,S as rn}from"./markdown-vendor-DmIvJdn7.js";import"./ui-vendor-CeCm8EER.js";import"./react-vendor-DEwriMA6.js";class xe{constructor(e,t,a){this.normal=t,this.property=e,a&&(this.space=a)}}xe.prototype.normal={};xe.prototype.property={};xe.prototype.space=void 0;function Wr(r,e){const t={},a={};for(const n of r)Object.assign(t,n.property),Object.assign(a,n.normal);return new xe(t,a,e)}function ge(r){return r.toLowerCase()}class m0{constructor(e,t){this.attribute=t,this.property=e}}m0.prototype.attribute="";m0.prototype.booleanish=!1;m0.prototype.boolean=!1;m0.prototype.commaOrSpaceSeparated=!1;m0.prototype.commaSeparated=!1;m0.prototype.defined=!1;m0.prototype.mustUseProperty=!1;m0.prototype.number=!1;m0.prototype.overloadedBoolean=!1;m0.prototype.property="";m0.prototype.spaceSeparated=!1;m0.prototype.space=void 0;let an=0;const P=_0(),r0=_0(),bt=_0(),z=_0(),j=_0(),oe=_0(),f0=_0();function _0(){return 2**++an}const yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:P,booleanish:r0,commaOrSpaceSeparated:f0,commaSeparated:oe,number:z,overloadedBoolean:bt,spaceSeparated:j},Symbol.toStringTag,{value:"Module"})),et=Object.keys(yt);class Dt extends m0{constructor(e,t,a,n){let l=-1;if(super(e,t),Qt(this,"space",n),typeof a=="number")for(;++l4&&t.slice(0,4)==="data"&&on.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(_t,cn);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!_t.test(l)){let o=l.replace(sn,hn);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}n=Dt}return new n(a,e)}function hn(r){return"-"+r.toLowerCase()}function cn(r){return r.charAt(1).toUpperCase()}const mn=Wr([Xr,nn,Kr,Zr,Jr],"html"),dn=Wr([Xr,ln,Kr,Zr,Jr],"svg"),er=/[#.]/g;function fn(r,e){const t=r||"",a={};let n=0,l,o;for(;np&&(p=g):g&&(p!==void 0&&p>-1&&c.push(` -`.repeat(p)||" "),p=-1,c.push(g))}return c.join("")}function ra(r,e,t){return r.type==="element"?In(r,e,t):r.type==="text"?t.whitespace==="normal"?aa(r,t):Fn(r):[]}function In(r,e,t){const a=na(r,t),n=r.children||[];let l=-1,o=[];if(On(r))return o;let h,c;for(wt(r)||sr(r)&&ar(e,r,sr)?c=` -`:Rn(r)?(h=2,c=2):ta(r)&&(h=1,c=1);++l15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;l+15":">","<":"<",'"':""","'":"'"},jn=/[&><"']/g;function Kn(r){return String(r).replace(jn,e=>$n[e])}var la=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},Zn=function(e){var t=la(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Jn=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Qn=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},q={contains:Gn,deflt:Yn,escape:Kn,hyphenate:Xn,getBaseElem:la,isCharacterBox:Zn,protocolFromUrl:Qn},rt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function _n(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class e1{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in rt)if(rt.hasOwnProperty(t)){var a=rt[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:_n(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new A("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=q.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class U0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return z0[t1[this.id]]}sub(){return z0[r1[this.id]]}fracNum(){return z0[a1[this.id]]}fracDen(){return z0[n1[this.id]]}cramp(){return z0[l1[this.id]]}text(){return z0[i1[this.id]]}isTight(){return this.size>=2}}var Nt=0,Ie=1,ue=2,R0=3,be=4,y0=5,he=6,o0=7,z0=[new U0(Nt,0,!1),new U0(Ie,0,!0),new U0(ue,1,!1),new U0(R0,1,!0),new U0(be,2,!1),new U0(y0,2,!0),new U0(he,3,!1),new U0(o0,3,!0)],t1=[be,y0,be,y0,he,o0,he,o0],r1=[y0,y0,y0,y0,o0,o0,o0,o0],a1=[ue,R0,be,y0,he,o0,he,o0],n1=[R0,R0,y0,y0,o0,o0,o0,o0],l1=[Ie,Ie,R0,R0,y0,y0,o0,o0],i1=[Nt,Ie,ue,R0,ue,R0,ue,R0],O={DISPLAY:z0[Nt],TEXT:z0[ue],SCRIPT:z0[be],SCRIPTSCRIPT:z0[he]},kt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function s1(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}var Le=[];kt.forEach(r=>r.blocks.forEach(e=>Le.push(...e)));function ia(r){for(var e=0;e=Le[e]&&r<=Le[e+1])return!0;return!1}var se=80,o1=function(e,t){return"M95,"+(622+e+t)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+e/2.075+" -"+e+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+e)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},u1=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+e/2.084+" -"+e+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+e)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},h1=function(e,t){return"M983 "+(10+e+t)+` -l`+e/3.13+" -"+e+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},c1=function(e,t){return"M424,"+(2398+e+t)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+e)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` -h400000v`+(40+e)+"h-400000z"},m1=function(e,t){return"M473,"+(2713+e+t)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},d1=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},f1=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` -H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},p1=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=o1(t,se);break;case"sqrtSize1":n=u1(t,se);break;case"sqrtSize2":n=h1(t,se);break;case"sqrtSize3":n=c1(t,se);break;case"sqrtSize4":n=m1(t,se);break;case"sqrtTall":n=f1(t,se,a)}return n},v1=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},or={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z -M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z -M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z -M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z -M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},g1=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z -M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z -M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z -M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class we{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return q.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}}var q0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Te={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ur={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Et(r,e,t){if(!q0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=q0[e][a];if(!n&&r[0]in ur&&(a=ur[r[0]].charCodeAt(0),n=q0[e][a]),!n&&t==="text"&&ia(a)&&(n=q0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var at={};function b1(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!at[e]){var t=at[e]={cssEmPerMu:Te.quad[e]/18};for(var a in Te)Te.hasOwnProperty(a)&&(t[a]=Te[a][e])}return at[e]}var y1=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],hr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],cr=function(e,t){return t.size<2?e:y1[e-1][t.size-1]};class E0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||E0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=hr[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new E0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:cr(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:hr[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=cr(E0.BASESIZE,e);return this.size===t&&this.textSize===E0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==E0.BASESIZE?["sizing","reset-size"+this.size,"size"+E0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=b1(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}E0.BASESIZE=6;var St={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},x1={ex:!0,em:!0,mu:!0},sa=function(e){return typeof e!="string"&&(e=e.unit),e in St||e in x1||e==="ex"},_=function(e,t){var a;if(e.unit in St)a=St[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new A("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},T=function(e){return+e.toFixed(4)+"em"},W0=function(e){return e.filter(t=>t).join(" ")},oa=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},ua=function(e){var t=document.createElement(e);t.className=W0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var l=0;l/=\x00-\x1f]/,ha=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+q.escape(W0(this.classes))+'"');var a="";for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=q.hyphenate(n)+":"+this.style[n]+";");a&&(t+=' style="'+q.escape(a)+'"');for(var l in this.attributes)if(this.attributes.hasOwnProperty(l)){if(w1.test(l))throw new A("Invalid attribute name '"+l+"'");t+=" "+l+'="'+q.escape(this.attributes[l])+'"'}t+=">";for(var o=0;o",t};class Ue{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,oa.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return q.contains(this.classes,e)}toNode(){return ua.call(this,"span")}toMarkup(){return ha.call(this,"span")}}class ca{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,oa.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return q.contains(this.classes,e)}toNode(){return ua.call(this,"a")}toMarkup(){return ha.call(this,"a")}}class k1{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return q.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+q.escape(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=T(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=W0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=q.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+q.escape(a)+'"');var l=q.escape(this.text);return e?(t+=">",t+=l,t+="",t):l}}class X0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n':''}}class mr{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var z1={bin:1,close:1,inner:1,open:1,punct:1,rel:1},A1={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},K={math:{},text:{}};function i(r,e,t,a,n,l){K[r][n]={font:e,group:t,replace:a},l&&a&&(K[r][a]=K[r][n])}var s="math",k="text",u="main",d="ams",Z="accent-token",B="bin",u0="close",me="inner",R="mathord",a0="op-token",g0="open",Ge="punct",f="rel",F0="spacing",v="textord";i(s,u,f,"≡","\\equiv",!0);i(s,u,f,"≺","\\prec",!0);i(s,u,f,"≻","\\succ",!0);i(s,u,f,"∼","\\sim",!0);i(s,u,f,"⊥","\\perp");i(s,u,f,"⪯","\\preceq",!0);i(s,u,f,"⪰","\\succeq",!0);i(s,u,f,"≃","\\simeq",!0);i(s,u,f,"∣","\\mid",!0);i(s,u,f,"≪","\\ll",!0);i(s,u,f,"≫","\\gg",!0);i(s,u,f,"≍","\\asymp",!0);i(s,u,f,"∥","\\parallel");i(s,u,f,"⋈","\\bowtie",!0);i(s,u,f,"⌣","\\smile",!0);i(s,u,f,"⊑","\\sqsubseteq",!0);i(s,u,f,"⊒","\\sqsupseteq",!0);i(s,u,f,"≐","\\doteq",!0);i(s,u,f,"⌢","\\frown",!0);i(s,u,f,"∋","\\ni",!0);i(s,u,f,"∝","\\propto",!0);i(s,u,f,"⊢","\\vdash",!0);i(s,u,f,"⊣","\\dashv",!0);i(s,u,f,"∋","\\owns");i(s,u,Ge,".","\\ldotp");i(s,u,Ge,"⋅","\\cdotp");i(s,u,v,"#","\\#");i(k,u,v,"#","\\#");i(s,u,v,"&","\\&");i(k,u,v,"&","\\&");i(s,u,v,"ℵ","\\aleph",!0);i(s,u,v,"∀","\\forall",!0);i(s,u,v,"ℏ","\\hbar",!0);i(s,u,v,"∃","\\exists",!0);i(s,u,v,"∇","\\nabla",!0);i(s,u,v,"♭","\\flat",!0);i(s,u,v,"ℓ","\\ell",!0);i(s,u,v,"♮","\\natural",!0);i(s,u,v,"♣","\\clubsuit",!0);i(s,u,v,"℘","\\wp",!0);i(s,u,v,"♯","\\sharp",!0);i(s,u,v,"♢","\\diamondsuit",!0);i(s,u,v,"ℜ","\\Re",!0);i(s,u,v,"♡","\\heartsuit",!0);i(s,u,v,"ℑ","\\Im",!0);i(s,u,v,"♠","\\spadesuit",!0);i(s,u,v,"§","\\S",!0);i(k,u,v,"§","\\S");i(s,u,v,"¶","\\P",!0);i(k,u,v,"¶","\\P");i(s,u,v,"†","\\dag");i(k,u,v,"†","\\dag");i(k,u,v,"†","\\textdagger");i(s,u,v,"‡","\\ddag");i(k,u,v,"‡","\\ddag");i(k,u,v,"‡","\\textdaggerdbl");i(s,u,u0,"⎱","\\rmoustache",!0);i(s,u,g0,"⎰","\\lmoustache",!0);i(s,u,u0,"⟯","\\rgroup",!0);i(s,u,g0,"⟮","\\lgroup",!0);i(s,u,B,"∓","\\mp",!0);i(s,u,B,"⊖","\\ominus",!0);i(s,u,B,"⊎","\\uplus",!0);i(s,u,B,"⊓","\\sqcap",!0);i(s,u,B,"∗","\\ast");i(s,u,B,"⊔","\\sqcup",!0);i(s,u,B,"◯","\\bigcirc",!0);i(s,u,B,"∙","\\bullet",!0);i(s,u,B,"‡","\\ddagger");i(s,u,B,"≀","\\wr",!0);i(s,u,B,"⨿","\\amalg");i(s,u,B,"&","\\And");i(s,u,f,"⟵","\\longleftarrow",!0);i(s,u,f,"⇐","\\Leftarrow",!0);i(s,u,f,"⟸","\\Longleftarrow",!0);i(s,u,f,"⟶","\\longrightarrow",!0);i(s,u,f,"⇒","\\Rightarrow",!0);i(s,u,f,"⟹","\\Longrightarrow",!0);i(s,u,f,"↔","\\leftrightarrow",!0);i(s,u,f,"⟷","\\longleftrightarrow",!0);i(s,u,f,"⇔","\\Leftrightarrow",!0);i(s,u,f,"⟺","\\Longleftrightarrow",!0);i(s,u,f,"↦","\\mapsto",!0);i(s,u,f,"⟼","\\longmapsto",!0);i(s,u,f,"↗","\\nearrow",!0);i(s,u,f,"↩","\\hookleftarrow",!0);i(s,u,f,"↪","\\hookrightarrow",!0);i(s,u,f,"↘","\\searrow",!0);i(s,u,f,"↼","\\leftharpoonup",!0);i(s,u,f,"⇀","\\rightharpoonup",!0);i(s,u,f,"↙","\\swarrow",!0);i(s,u,f,"↽","\\leftharpoondown",!0);i(s,u,f,"⇁","\\rightharpoondown",!0);i(s,u,f,"↖","\\nwarrow",!0);i(s,u,f,"⇌","\\rightleftharpoons",!0);i(s,d,f,"≮","\\nless",!0);i(s,d,f,"","\\@nleqslant");i(s,d,f,"","\\@nleqq");i(s,d,f,"⪇","\\lneq",!0);i(s,d,f,"≨","\\lneqq",!0);i(s,d,f,"","\\@lvertneqq");i(s,d,f,"⋦","\\lnsim",!0);i(s,d,f,"⪉","\\lnapprox",!0);i(s,d,f,"⊀","\\nprec",!0);i(s,d,f,"⋠","\\npreceq",!0);i(s,d,f,"⋨","\\precnsim",!0);i(s,d,f,"⪹","\\precnapprox",!0);i(s,d,f,"≁","\\nsim",!0);i(s,d,f,"","\\@nshortmid");i(s,d,f,"∤","\\nmid",!0);i(s,d,f,"⊬","\\nvdash",!0);i(s,d,f,"⊭","\\nvDash",!0);i(s,d,f,"⋪","\\ntriangleleft");i(s,d,f,"⋬","\\ntrianglelefteq",!0);i(s,d,f,"⊊","\\subsetneq",!0);i(s,d,f,"","\\@varsubsetneq");i(s,d,f,"⫋","\\subsetneqq",!0);i(s,d,f,"","\\@varsubsetneqq");i(s,d,f,"≯","\\ngtr",!0);i(s,d,f,"","\\@ngeqslant");i(s,d,f,"","\\@ngeqq");i(s,d,f,"⪈","\\gneq",!0);i(s,d,f,"≩","\\gneqq",!0);i(s,d,f,"","\\@gvertneqq");i(s,d,f,"⋧","\\gnsim",!0);i(s,d,f,"⪊","\\gnapprox",!0);i(s,d,f,"⊁","\\nsucc",!0);i(s,d,f,"⋡","\\nsucceq",!0);i(s,d,f,"⋩","\\succnsim",!0);i(s,d,f,"⪺","\\succnapprox",!0);i(s,d,f,"≆","\\ncong",!0);i(s,d,f,"","\\@nshortparallel");i(s,d,f,"∦","\\nparallel",!0);i(s,d,f,"⊯","\\nVDash",!0);i(s,d,f,"⋫","\\ntriangleright");i(s,d,f,"⋭","\\ntrianglerighteq",!0);i(s,d,f,"","\\@nsupseteqq");i(s,d,f,"⊋","\\supsetneq",!0);i(s,d,f,"","\\@varsupsetneq");i(s,d,f,"⫌","\\supsetneqq",!0);i(s,d,f,"","\\@varsupsetneqq");i(s,d,f,"⊮","\\nVdash",!0);i(s,d,f,"⪵","\\precneqq",!0);i(s,d,f,"⪶","\\succneqq",!0);i(s,d,f,"","\\@nsubseteqq");i(s,d,B,"⊴","\\unlhd");i(s,d,B,"⊵","\\unrhd");i(s,d,f,"↚","\\nleftarrow",!0);i(s,d,f,"↛","\\nrightarrow",!0);i(s,d,f,"⇍","\\nLeftarrow",!0);i(s,d,f,"⇏","\\nRightarrow",!0);i(s,d,f,"↮","\\nleftrightarrow",!0);i(s,d,f,"⇎","\\nLeftrightarrow",!0);i(s,d,f,"△","\\vartriangle");i(s,d,v,"ℏ","\\hslash");i(s,d,v,"▽","\\triangledown");i(s,d,v,"◊","\\lozenge");i(s,d,v,"Ⓢ","\\circledS");i(s,d,v,"®","\\circledR");i(k,d,v,"®","\\circledR");i(s,d,v,"∡","\\measuredangle",!0);i(s,d,v,"∄","\\nexists");i(s,d,v,"℧","\\mho");i(s,d,v,"Ⅎ","\\Finv",!0);i(s,d,v,"⅁","\\Game",!0);i(s,d,v,"‵","\\backprime");i(s,d,v,"▲","\\blacktriangle");i(s,d,v,"▼","\\blacktriangledown");i(s,d,v,"■","\\blacksquare");i(s,d,v,"⧫","\\blacklozenge");i(s,d,v,"★","\\bigstar");i(s,d,v,"∢","\\sphericalangle",!0);i(s,d,v,"∁","\\complement",!0);i(s,d,v,"ð","\\eth",!0);i(k,u,v,"ð","ð");i(s,d,v,"╱","\\diagup");i(s,d,v,"╲","\\diagdown");i(s,d,v,"□","\\square");i(s,d,v,"□","\\Box");i(s,d,v,"◊","\\Diamond");i(s,d,v,"¥","\\yen",!0);i(k,d,v,"¥","\\yen",!0);i(s,d,v,"✓","\\checkmark",!0);i(k,d,v,"✓","\\checkmark");i(s,d,v,"ℶ","\\beth",!0);i(s,d,v,"ℸ","\\daleth",!0);i(s,d,v,"ℷ","\\gimel",!0);i(s,d,v,"ϝ","\\digamma",!0);i(s,d,v,"ϰ","\\varkappa");i(s,d,g0,"┌","\\@ulcorner",!0);i(s,d,u0,"┐","\\@urcorner",!0);i(s,d,g0,"└","\\@llcorner",!0);i(s,d,u0,"┘","\\@lrcorner",!0);i(s,d,f,"≦","\\leqq",!0);i(s,d,f,"⩽","\\leqslant",!0);i(s,d,f,"⪕","\\eqslantless",!0);i(s,d,f,"≲","\\lesssim",!0);i(s,d,f,"⪅","\\lessapprox",!0);i(s,d,f,"≊","\\approxeq",!0);i(s,d,B,"⋖","\\lessdot");i(s,d,f,"⋘","\\lll",!0);i(s,d,f,"≶","\\lessgtr",!0);i(s,d,f,"⋚","\\lesseqgtr",!0);i(s,d,f,"⪋","\\lesseqqgtr",!0);i(s,d,f,"≑","\\doteqdot");i(s,d,f,"≓","\\risingdotseq",!0);i(s,d,f,"≒","\\fallingdotseq",!0);i(s,d,f,"∽","\\backsim",!0);i(s,d,f,"⋍","\\backsimeq",!0);i(s,d,f,"⫅","\\subseteqq",!0);i(s,d,f,"⋐","\\Subset",!0);i(s,d,f,"⊏","\\sqsubset",!0);i(s,d,f,"≼","\\preccurlyeq",!0);i(s,d,f,"⋞","\\curlyeqprec",!0);i(s,d,f,"≾","\\precsim",!0);i(s,d,f,"⪷","\\precapprox",!0);i(s,d,f,"⊲","\\vartriangleleft");i(s,d,f,"⊴","\\trianglelefteq");i(s,d,f,"⊨","\\vDash",!0);i(s,d,f,"⊪","\\Vvdash",!0);i(s,d,f,"⌣","\\smallsmile");i(s,d,f,"⌢","\\smallfrown");i(s,d,f,"≏","\\bumpeq",!0);i(s,d,f,"≎","\\Bumpeq",!0);i(s,d,f,"≧","\\geqq",!0);i(s,d,f,"⩾","\\geqslant",!0);i(s,d,f,"⪖","\\eqslantgtr",!0);i(s,d,f,"≳","\\gtrsim",!0);i(s,d,f,"⪆","\\gtrapprox",!0);i(s,d,B,"⋗","\\gtrdot");i(s,d,f,"⋙","\\ggg",!0);i(s,d,f,"≷","\\gtrless",!0);i(s,d,f,"⋛","\\gtreqless",!0);i(s,d,f,"⪌","\\gtreqqless",!0);i(s,d,f,"≖","\\eqcirc",!0);i(s,d,f,"≗","\\circeq",!0);i(s,d,f,"≜","\\triangleq",!0);i(s,d,f,"∼","\\thicksim");i(s,d,f,"≈","\\thickapprox");i(s,d,f,"⫆","\\supseteqq",!0);i(s,d,f,"⋑","\\Supset",!0);i(s,d,f,"⊐","\\sqsupset",!0);i(s,d,f,"≽","\\succcurlyeq",!0);i(s,d,f,"⋟","\\curlyeqsucc",!0);i(s,d,f,"≿","\\succsim",!0);i(s,d,f,"⪸","\\succapprox",!0);i(s,d,f,"⊳","\\vartriangleright");i(s,d,f,"⊵","\\trianglerighteq");i(s,d,f,"⊩","\\Vdash",!0);i(s,d,f,"∣","\\shortmid");i(s,d,f,"∥","\\shortparallel");i(s,d,f,"≬","\\between",!0);i(s,d,f,"⋔","\\pitchfork",!0);i(s,d,f,"∝","\\varpropto");i(s,d,f,"◀","\\blacktriangleleft");i(s,d,f,"∴","\\therefore",!0);i(s,d,f,"∍","\\backepsilon");i(s,d,f,"▶","\\blacktriangleright");i(s,d,f,"∵","\\because",!0);i(s,d,f,"⋘","\\llless");i(s,d,f,"⋙","\\gggtr");i(s,d,B,"⊲","\\lhd");i(s,d,B,"⊳","\\rhd");i(s,d,f,"≂","\\eqsim",!0);i(s,u,f,"⋈","\\Join");i(s,d,f,"≑","\\Doteq",!0);i(s,d,B,"∔","\\dotplus",!0);i(s,d,B,"∖","\\smallsetminus");i(s,d,B,"⋒","\\Cap",!0);i(s,d,B,"⋓","\\Cup",!0);i(s,d,B,"⩞","\\doublebarwedge",!0);i(s,d,B,"⊟","\\boxminus",!0);i(s,d,B,"⊞","\\boxplus",!0);i(s,d,B,"⋇","\\divideontimes",!0);i(s,d,B,"⋉","\\ltimes",!0);i(s,d,B,"⋊","\\rtimes",!0);i(s,d,B,"⋋","\\leftthreetimes",!0);i(s,d,B,"⋌","\\rightthreetimes",!0);i(s,d,B,"⋏","\\curlywedge",!0);i(s,d,B,"⋎","\\curlyvee",!0);i(s,d,B,"⊝","\\circleddash",!0);i(s,d,B,"⊛","\\circledast",!0);i(s,d,B,"⋅","\\centerdot");i(s,d,B,"⊺","\\intercal",!0);i(s,d,B,"⋒","\\doublecap");i(s,d,B,"⋓","\\doublecup");i(s,d,B,"⊠","\\boxtimes",!0);i(s,d,f,"⇢","\\dashrightarrow",!0);i(s,d,f,"⇠","\\dashleftarrow",!0);i(s,d,f,"⇇","\\leftleftarrows",!0);i(s,d,f,"⇆","\\leftrightarrows",!0);i(s,d,f,"⇚","\\Lleftarrow",!0);i(s,d,f,"↞","\\twoheadleftarrow",!0);i(s,d,f,"↢","\\leftarrowtail",!0);i(s,d,f,"↫","\\looparrowleft",!0);i(s,d,f,"⇋","\\leftrightharpoons",!0);i(s,d,f,"↶","\\curvearrowleft",!0);i(s,d,f,"↺","\\circlearrowleft",!0);i(s,d,f,"↰","\\Lsh",!0);i(s,d,f,"⇈","\\upuparrows",!0);i(s,d,f,"↿","\\upharpoonleft",!0);i(s,d,f,"⇃","\\downharpoonleft",!0);i(s,u,f,"⊶","\\origof",!0);i(s,u,f,"⊷","\\imageof",!0);i(s,d,f,"⊸","\\multimap",!0);i(s,d,f,"↭","\\leftrightsquigarrow",!0);i(s,d,f,"⇉","\\rightrightarrows",!0);i(s,d,f,"⇄","\\rightleftarrows",!0);i(s,d,f,"↠","\\twoheadrightarrow",!0);i(s,d,f,"↣","\\rightarrowtail",!0);i(s,d,f,"↬","\\looparrowright",!0);i(s,d,f,"↷","\\curvearrowright",!0);i(s,d,f,"↻","\\circlearrowright",!0);i(s,d,f,"↱","\\Rsh",!0);i(s,d,f,"⇊","\\downdownarrows",!0);i(s,d,f,"↾","\\upharpoonright",!0);i(s,d,f,"⇂","\\downharpoonright",!0);i(s,d,f,"⇝","\\rightsquigarrow",!0);i(s,d,f,"⇝","\\leadsto");i(s,d,f,"⇛","\\Rrightarrow",!0);i(s,d,f,"↾","\\restriction");i(s,u,v,"‘","`");i(s,u,v,"$","\\$");i(k,u,v,"$","\\$");i(k,u,v,"$","\\textdollar");i(s,u,v,"%","\\%");i(k,u,v,"%","\\%");i(s,u,v,"_","\\_");i(k,u,v,"_","\\_");i(k,u,v,"_","\\textunderscore");i(s,u,v,"∠","\\angle",!0);i(s,u,v,"∞","\\infty",!0);i(s,u,v,"′","\\prime");i(s,u,v,"△","\\triangle");i(s,u,v,"Γ","\\Gamma",!0);i(s,u,v,"Δ","\\Delta",!0);i(s,u,v,"Θ","\\Theta",!0);i(s,u,v,"Λ","\\Lambda",!0);i(s,u,v,"Ξ","\\Xi",!0);i(s,u,v,"Π","\\Pi",!0);i(s,u,v,"Σ","\\Sigma",!0);i(s,u,v,"Υ","\\Upsilon",!0);i(s,u,v,"Φ","\\Phi",!0);i(s,u,v,"Ψ","\\Psi",!0);i(s,u,v,"Ω","\\Omega",!0);i(s,u,v,"A","Α");i(s,u,v,"B","Β");i(s,u,v,"E","Ε");i(s,u,v,"Z","Ζ");i(s,u,v,"H","Η");i(s,u,v,"I","Ι");i(s,u,v,"K","Κ");i(s,u,v,"M","Μ");i(s,u,v,"N","Ν");i(s,u,v,"O","Ο");i(s,u,v,"P","Ρ");i(s,u,v,"T","Τ");i(s,u,v,"X","Χ");i(s,u,v,"¬","\\neg",!0);i(s,u,v,"¬","\\lnot");i(s,u,v,"⊤","\\top");i(s,u,v,"⊥","\\bot");i(s,u,v,"∅","\\emptyset");i(s,d,v,"∅","\\varnothing");i(s,u,R,"α","\\alpha",!0);i(s,u,R,"β","\\beta",!0);i(s,u,R,"γ","\\gamma",!0);i(s,u,R,"δ","\\delta",!0);i(s,u,R,"ϵ","\\epsilon",!0);i(s,u,R,"ζ","\\zeta",!0);i(s,u,R,"η","\\eta",!0);i(s,u,R,"θ","\\theta",!0);i(s,u,R,"ι","\\iota",!0);i(s,u,R,"κ","\\kappa",!0);i(s,u,R,"λ","\\lambda",!0);i(s,u,R,"μ","\\mu",!0);i(s,u,R,"ν","\\nu",!0);i(s,u,R,"ξ","\\xi",!0);i(s,u,R,"ο","\\omicron",!0);i(s,u,R,"π","\\pi",!0);i(s,u,R,"ρ","\\rho",!0);i(s,u,R,"σ","\\sigma",!0);i(s,u,R,"τ","\\tau",!0);i(s,u,R,"υ","\\upsilon",!0);i(s,u,R,"ϕ","\\phi",!0);i(s,u,R,"χ","\\chi",!0);i(s,u,R,"ψ","\\psi",!0);i(s,u,R,"ω","\\omega",!0);i(s,u,R,"ε","\\varepsilon",!0);i(s,u,R,"ϑ","\\vartheta",!0);i(s,u,R,"ϖ","\\varpi",!0);i(s,u,R,"ϱ","\\varrho",!0);i(s,u,R,"ς","\\varsigma",!0);i(s,u,R,"φ","\\varphi",!0);i(s,u,B,"∗","*",!0);i(s,u,B,"+","+");i(s,u,B,"−","-",!0);i(s,u,B,"⋅","\\cdot",!0);i(s,u,B,"∘","\\circ",!0);i(s,u,B,"÷","\\div",!0);i(s,u,B,"±","\\pm",!0);i(s,u,B,"×","\\times",!0);i(s,u,B,"∩","\\cap",!0);i(s,u,B,"∪","\\cup",!0);i(s,u,B,"∖","\\setminus",!0);i(s,u,B,"∧","\\land");i(s,u,B,"∨","\\lor");i(s,u,B,"∧","\\wedge",!0);i(s,u,B,"∨","\\vee",!0);i(s,u,v,"√","\\surd");i(s,u,g0,"⟨","\\langle",!0);i(s,u,g0,"∣","\\lvert");i(s,u,g0,"∥","\\lVert");i(s,u,u0,"?","?");i(s,u,u0,"!","!");i(s,u,u0,"⟩","\\rangle",!0);i(s,u,u0,"∣","\\rvert");i(s,u,u0,"∥","\\rVert");i(s,u,f,"=","=");i(s,u,f,":",":");i(s,u,f,"≈","\\approx",!0);i(s,u,f,"≅","\\cong",!0);i(s,u,f,"≥","\\ge");i(s,u,f,"≥","\\geq",!0);i(s,u,f,"←","\\gets");i(s,u,f,">","\\gt",!0);i(s,u,f,"∈","\\in",!0);i(s,u,f,"","\\@not");i(s,u,f,"⊂","\\subset",!0);i(s,u,f,"⊃","\\supset",!0);i(s,u,f,"⊆","\\subseteq",!0);i(s,u,f,"⊇","\\supseteq",!0);i(s,d,f,"⊈","\\nsubseteq",!0);i(s,d,f,"⊉","\\nsupseteq",!0);i(s,u,f,"⊨","\\models");i(s,u,f,"←","\\leftarrow",!0);i(s,u,f,"≤","\\le");i(s,u,f,"≤","\\leq",!0);i(s,u,f,"<","\\lt",!0);i(s,u,f,"→","\\rightarrow",!0);i(s,u,f,"→","\\to");i(s,d,f,"≱","\\ngeq",!0);i(s,d,f,"≰","\\nleq",!0);i(s,u,F0," ","\\ ");i(s,u,F0," ","\\space");i(s,u,F0," ","\\nobreakspace");i(k,u,F0," ","\\ ");i(k,u,F0," "," ");i(k,u,F0," ","\\space");i(k,u,F0," ","\\nobreakspace");i(s,u,F0,null,"\\nobreak");i(s,u,F0,null,"\\allowbreak");i(s,u,Ge,",",",");i(s,u,Ge,";",";");i(s,d,B,"⊼","\\barwedge",!0);i(s,d,B,"⊻","\\veebar",!0);i(s,u,B,"⊙","\\odot",!0);i(s,u,B,"⊕","\\oplus",!0);i(s,u,B,"⊗","\\otimes",!0);i(s,u,v,"∂","\\partial",!0);i(s,u,B,"⊘","\\oslash",!0);i(s,d,B,"⊚","\\circledcirc",!0);i(s,d,B,"⊡","\\boxdot",!0);i(s,u,B,"△","\\bigtriangleup");i(s,u,B,"▽","\\bigtriangledown");i(s,u,B,"†","\\dagger");i(s,u,B,"⋄","\\diamond");i(s,u,B,"⋆","\\star");i(s,u,B,"◃","\\triangleleft");i(s,u,B,"▹","\\triangleright");i(s,u,g0,"{","\\{");i(k,u,v,"{","\\{");i(k,u,v,"{","\\textbraceleft");i(s,u,u0,"}","\\}");i(k,u,v,"}","\\}");i(k,u,v,"}","\\textbraceright");i(s,u,g0,"{","\\lbrace");i(s,u,u0,"}","\\rbrace");i(s,u,g0,"[","\\lbrack",!0);i(k,u,v,"[","\\lbrack",!0);i(s,u,u0,"]","\\rbrack",!0);i(k,u,v,"]","\\rbrack",!0);i(s,u,g0,"(","\\lparen",!0);i(s,u,u0,")","\\rparen",!0);i(k,u,v,"<","\\textless",!0);i(k,u,v,">","\\textgreater",!0);i(s,u,g0,"⌊","\\lfloor",!0);i(s,u,u0,"⌋","\\rfloor",!0);i(s,u,g0,"⌈","\\lceil",!0);i(s,u,u0,"⌉","\\rceil",!0);i(s,u,v,"\\","\\backslash");i(s,u,v,"∣","|");i(s,u,v,"∣","\\vert");i(k,u,v,"|","\\textbar",!0);i(s,u,v,"∥","\\|");i(s,u,v,"∥","\\Vert");i(k,u,v,"∥","\\textbardbl");i(k,u,v,"~","\\textasciitilde");i(k,u,v,"\\","\\textbackslash");i(k,u,v,"^","\\textasciicircum");i(s,u,f,"↑","\\uparrow",!0);i(s,u,f,"⇑","\\Uparrow",!0);i(s,u,f,"↓","\\downarrow",!0);i(s,u,f,"⇓","\\Downarrow",!0);i(s,u,f,"↕","\\updownarrow",!0);i(s,u,f,"⇕","\\Updownarrow",!0);i(s,u,a0,"∐","\\coprod");i(s,u,a0,"⋁","\\bigvee");i(s,u,a0,"⋀","\\bigwedge");i(s,u,a0,"⨄","\\biguplus");i(s,u,a0,"⋂","\\bigcap");i(s,u,a0,"⋃","\\bigcup");i(s,u,a0,"∫","\\int");i(s,u,a0,"∫","\\intop");i(s,u,a0,"∬","\\iint");i(s,u,a0,"∭","\\iiint");i(s,u,a0,"∏","\\prod");i(s,u,a0,"∑","\\sum");i(s,u,a0,"⨂","\\bigotimes");i(s,u,a0,"⨁","\\bigoplus");i(s,u,a0,"⨀","\\bigodot");i(s,u,a0,"∮","\\oint");i(s,u,a0,"∯","\\oiint");i(s,u,a0,"∰","\\oiiint");i(s,u,a0,"⨆","\\bigsqcup");i(s,u,a0,"∫","\\smallint");i(k,u,me,"…","\\textellipsis");i(s,u,me,"…","\\mathellipsis");i(k,u,me,"…","\\ldots",!0);i(s,u,me,"…","\\ldots",!0);i(s,u,me,"⋯","\\@cdots",!0);i(s,u,me,"⋱","\\ddots",!0);i(s,u,v,"⋮","\\varvdots");i(k,u,v,"⋮","\\varvdots");i(s,u,Z,"ˊ","\\acute");i(s,u,Z,"ˋ","\\grave");i(s,u,Z,"¨","\\ddot");i(s,u,Z,"~","\\tilde");i(s,u,Z,"ˉ","\\bar");i(s,u,Z,"˘","\\breve");i(s,u,Z,"ˇ","\\check");i(s,u,Z,"^","\\hat");i(s,u,Z,"⃗","\\vec");i(s,u,Z,"˙","\\dot");i(s,u,Z,"˚","\\mathring");i(s,u,R,"","\\@imath");i(s,u,R,"","\\@jmath");i(s,u,v,"ı","ı");i(s,u,v,"ȷ","ȷ");i(k,u,v,"ı","\\i",!0);i(k,u,v,"ȷ","\\j",!0);i(k,u,v,"ß","\\ss",!0);i(k,u,v,"æ","\\ae",!0);i(k,u,v,"œ","\\oe",!0);i(k,u,v,"ø","\\o",!0);i(k,u,v,"Æ","\\AE",!0);i(k,u,v,"Œ","\\OE",!0);i(k,u,v,"Ø","\\O",!0);i(k,u,Z,"ˊ","\\'");i(k,u,Z,"ˋ","\\`");i(k,u,Z,"ˆ","\\^");i(k,u,Z,"˜","\\~");i(k,u,Z,"ˉ","\\=");i(k,u,Z,"˘","\\u");i(k,u,Z,"˙","\\.");i(k,u,Z,"¸","\\c");i(k,u,Z,"˚","\\r");i(k,u,Z,"ˇ","\\v");i(k,u,Z,"¨",'\\"');i(k,u,Z,"˝","\\H");i(k,u,Z,"◯","\\textcircled");var ma={"--":!0,"---":!0,"``":!0,"''":!0};i(k,u,v,"–","--",!0);i(k,u,v,"–","\\textendash");i(k,u,v,"—","---",!0);i(k,u,v,"—","\\textemdash");i(k,u,v,"‘","`",!0);i(k,u,v,"‘","\\textquoteleft");i(k,u,v,"’","'",!0);i(k,u,v,"’","\\textquoteright");i(k,u,v,"“","``",!0);i(k,u,v,"“","\\textquotedblleft");i(k,u,v,"”","''",!0);i(k,u,v,"”","\\textquotedblright");i(s,u,v,"°","\\degree",!0);i(k,u,v,"°","\\degree");i(k,u,v,"°","\\textdegree",!0);i(s,u,v,"£","\\pounds");i(s,u,v,"£","\\mathsterling",!0);i(k,u,v,"£","\\pounds");i(k,u,v,"£","\\textsterling",!0);i(s,d,v,"✠","\\maltese");i(k,d,v,"✠","\\maltese");var fr='0123456789/@."';for(var nt=0;nt0)return S0(l,p,n,t,o.concat(g));if(c){var b,x;if(c==="boldsymbol"){var w=D1(l,n,t,o,a);b=w.fontName,x=[w.fontClass]}else h?(b=pa[c].fontName,x=[c]):(b=Ne(c,t.fontWeight,t.fontShape),x=[c,t.fontWeight,t.fontShape]);if(Ye(l,b,n).metrics)return S0(l,b,n,t,o.concat(x));if(ma.hasOwnProperty(l)&&b.slice(0,10)==="Typewriter"){for(var M=[],C=0;C{if(W0(r.classes)!==W0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},E1=r=>{for(var e=0;et&&(t=o.height),o.depth>a&&(a=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},c0=function(e,t,a,n){var l=new Ue(e,t,a,n);return qt(l),l},da=(r,e,t,a)=>new Ue(r,e,t,a),q1=function(e,t,a){var n=c0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=T(n.height),n.maxFontSize=1,n},R1=function(e,t,a,n){var l=new ca(e,t,a,n);return qt(l),l},fa=function(e){var t=new we(e);return qt(t),t},O1=function(e,t){return e instanceof we?c0([],[e],t):e},L1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,l=n,o=1;o{var t=c0(["mspace"],[],e),a=_(r,e);return t.style.marginRight=T(a),t},Ne=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var l;return t==="textbf"&&a==="textit"?l="BoldItalic":t==="textbf"?l="Bold":t==="textit"?l="Italic":l="Regular",n+"-"+l},pa={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},va={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},P1=function(e,t){var[a,n,l]=va[e],o=new Q0(a),h=new X0([o],{width:T(n),height:T(l),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+1e3*l,preserveAspectRatio:"xMinYMin"}),c=da(["overlay"],[h],t);return c.height=l,c.style.height=T(l),c.style.width=T(n),c},y={fontMap:pa,makeSymbol:S0,mathsym:C1,makeSpan:c0,makeSvgSpan:da,makeLineSpan:q1,makeAnchor:R1,makeFragment:fa,wrapFragment:O1,makeVList:I1,makeOrd:B1,makeGlue:F1,staticSvg:P1,svgData:va,tryCombineChars:E1},Q={number:3,unit:"mu"},J0={number:4,unit:"mu"},N0={number:5,unit:"mu"},H1={mord:{mop:Q,mbin:J0,mrel:N0,minner:Q},mop:{mord:Q,mop:Q,mrel:N0,minner:Q},mbin:{mord:J0,mop:J0,mopen:J0,minner:J0},mrel:{mord:N0,mop:N0,mopen:N0,minner:N0},mopen:{},mclose:{mop:Q,mbin:J0,mrel:N0,minner:Q},mpunct:{mord:Q,mop:Q,mrel:N0,mopen:Q,mclose:Q,mpunct:Q,minner:Q},minner:{mord:Q,mop:Q,mbin:J0,mrel:N0,mopen:Q,mpunct:Q,minner:Q}},V1={mord:{mop:Q},mop:{mord:Q,mop:Q},mbin:{},mrel:{},mopen:{},mclose:{mop:Q},mpunct:{},minner:{mop:Q}},ga={},Pe={},He={};function D(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:l,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var N=C.classes[0],E=M.classes[0];N==="mbin"&&q.contains(G1,E)?C.classes[0]="mord":E==="mbin"&&q.contains(U1,N)&&(M.classes[0]="mord")},{node:b},x,w),yr(l,(M,C)=>{var N=zt(C),E=zt(M),L=N&&E?M.hasClass("mtight")?V1[N][E]:H1[N][E]:null;if(L)return y.makeGlue(L,p)},{node:b},x,w),l},yr=function r(e,t,a,n,l){n&&e.push(n);for(var o=0;ox=>{e.splice(b+1,0,x),o++})(o)}n&&e.pop()},ba=function(e){return e instanceof we||e instanceof ca||e instanceof Ue&&e.hasClass("enclosing")?e:null},X1=function r(e,t){var a=ba(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},zt=function(e,t){return e?(t&&(e=X1(e,t)),W1[e.classes[0]]||null):null},ye=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return L0(t.concat(a))},U=function(e,t,a){if(!e)return L0();if(Pe[e.type]){var n=Pe[e.type](e,t);if(a&&t.size!==a.size){n=L0(t.sizingClasses(a),[n],t);var l=t.sizeMultiplier/a.sizeMultiplier;n.height*=l,n.depth*=l}return n}else throw new A("Got group of unknown type: '"+e.type+"'")};function Ee(r,e){var t=L0(["base"],r,e),a=L0(["strut"]);return a.style.height=T(t.height+t.depth),t.depth&&(a.style.verticalAlign=T(-t.depth)),t.children.unshift(a),t}function xr(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=l0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var l=[],o=[],h=0;h0&&(l.push(Ee(o,e)),o=[]),l.push(a[h]));o.length>0&&l.push(Ee(o,e));var p;t?(p=Ee(l0(t,e,!0)),p.classes=["tag"],l.push(p)):n&&l.push(n);var g=L0(["katex-html"],l);if(g.setAttribute("aria-hidden","true"),p){var b=p.children[0];b.style.height=T(g.height+g.depth),g.depth&&(b.style.verticalAlign=T(-g.depth))}return g}function ya(r){return new we(r)}class v0{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=W0(this.classes));for(var a=0;a0&&(e+=' class ="'+q.escape(W0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class A0{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return q.escape(this.toText())}toText(){return this.text}}class $1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",T(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var S={MathNode:v0,TextNode:A0,SpaceNode:$1,newDocumentFragment:ya},w0=function(e,t,a){return K[t][e]&&K[t][e].replace&&e.charCodeAt(0)!==55349&&!(ma.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=K[t][e].replace),new S.TextNode(e)},Rt=function(e){return e.length===1?e[0]:new S.MathNode("mrow",e)},Ot=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var l=e.text;if(q.contains(["\\imath","\\jmath"],l))return null;K[n][l]&&K[n][l].replace&&(l=K[n][l].replace);var o=y.fontMap[a].fontName;return Et(l,o,n)?y.fontMap[a].variant:null};function ot(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof A0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof A0&&t.text===","}else return!1}var d0=function(e,t,a){if(e.length===1){var n=$(e[0],t);return a&&n instanceof v0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var l=[],o,h=0;h=1&&(o.type==="mn"||ot(o))){var p=c.children[0];p instanceof v0&&p.type==="mn"&&(p.children=[...o.children,...p.children],l.pop())}else if(o.type==="mi"&&o.children.length===1){var g=o.children[0];if(g instanceof A0&&g.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var b=c.children[0];b instanceof A0&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),l.pop())}}}l.push(c),o=c}return l},$0=function(e,t,a){return Rt(d0(e,t,a))},$=function(e,t){if(!e)return new S.MathNode("mrow");if(He[e.type]){var a=He[e.type](e,t);return a}else throw new A("Got group of unknown type: '"+e.type+"'")};function wr(r,e,t,a,n){var l=d0(r,t),o;l.length===1&&l[0]instanceof v0&&q.contains(["mrow","mtable"],l[0].type)?o=l[0]:o=new S.MathNode("mrow",l);var h=new S.MathNode("annotation",[new S.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new S.MathNode("semantics",[o,h]),p=new S.MathNode("math",[c]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&p.setAttribute("display","block");var g=n?"katex":"katex-mathml";return y.makeSpan([g],[p])}var j1=function(e){return new E0({style:e.displayMode?O.DISPLAY:O.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},K1=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=y.makeSpan(a,[e])}return e},Z1=function(e,t,a){var n=j1(a),l;if(a.output==="mathml")return wr(e,t,n,a.displayMode,!0);if(a.output==="html"){var o=xr(e,n);l=y.makeSpan(["katex"],[o])}else{var h=wr(e,t,n,a.displayMode,!1),c=xr(e,n);l=y.makeSpan(["katex"],[h,c])}return K1(l,a)},J1={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Q1=function(e){var t=new S.MathNode("mo",[new S.TextNode(J1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},_1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},el=function(e){return e.type==="ordgroup"?e.body.length:1},tl=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(q.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=e,g=el(p.base),b,x,w;if(g>5)c==="widehat"||c==="widecheck"?(b=420,h=2364,w=.42,x=c+"4"):(b=312,h=2340,w=.34,x="tilde4");else{var M=[1,1,2,2,3,3][g];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][M],b=[0,239,300,360,420][M],w=[0,.24,.3,.3,.36,.42][M],x=c+M):(h=[0,600,1033,2339,2340][M],b=[0,260,286,306,312][M],w=[0,.26,.286,.3,.306,.34][M],x="tilde"+M)}var C=new Q0(x),N=new X0([C],{width:"100%",height:T(w),viewBox:"0 0 "+h+" "+b,preserveAspectRatio:"none"});return{span:y.makeSvgSpan([],[N],t),minWidth:0,height:w}}else{var E=[],L=_1[c],[F,Y,V]=L,W=V/1e3,G=F.length,J,X;if(G===1){var B0=L[3];J=["hide-tail"],X=[B0]}else if(G===2)J=["halfarrow-left","halfarrow-right"],X=["xMinYMin","xMaxYMin"];else if(G===3)J=["brace-left","brace-center","brace-right"],X=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+G+" children.");for(var i0=0;i00&&(n.style.minWidth=T(l)),n},rl=function(e,t,a,n,l){var o,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(o=y.makeSpan(["stretchy",t],[],l),t==="fbox"){var c=l.color&&l.getColor();c&&(o.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(t)&&p.push(new mr({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&p.push(new mr({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new X0(p,{width:"100%",height:T(h)});o=y.makeSvgSpan([],[g],l)}return o.height=h,o.style.height=T(h),o},I0={encloseSpan:rl,mathMLnode:Q1,svgSpan:tl};function H(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function Lt(r){var e=We(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function We(r){return r&&(r.type==="atom"||A1.hasOwnProperty(r.type))?r:null}var It=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=H(r.base,"accent"),t=a.base,r.base=t,n=M1(U(r,e)),r.base=a):(a=H(r,"accent"),t=a.base);var l=U(t,e.havingCrampedStyle()),o=a.isShifty&&q.isCharacterBox(t),h=0;if(o){var c=q.getBaseElem(t),p=U(c,e.havingCrampedStyle());h=dr(p).skew}var g=a.label==="\\c",b=g?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),x;if(a.isStretchy)x=I0.svgSpan(a,e),x=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:x,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+T(2*h)+")",marginLeft:T(2*h)}:void 0}]},e);else{var w,M;a.label==="\\vec"?(w=y.staticSvg("vec",e),M=y.svgData.vec[1]):(w=y.makeOrd({mode:a.mode,text:a.label},e,"textord"),w=dr(w),w.italic=0,M=w.width,g&&(b+=w.depth)),x=y.makeSpan(["accent-body"],[w]);var C=a.label==="\\textcircled";C&&(x.classes.push("accent-full"),b=l.height);var N=h;C||(N-=M/2),x.style.left=T(N),a.label==="\\textcircled"&&(x.style.top=".2em"),x=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-b},{type:"elem",elem:x}]},e)}var E=y.makeSpan(["mord","accent"],[x],e);return n?(n.children[0]=E,n.height=Math.max(E.height,n.height),n.classes[0]="mord",n):E},xa=(r,e)=>{var t=r.isStretchy?I0.mathMLnode(r.label):new S.MathNode("mo",[w0(r.label,r.mode)]),a=new S.MathNode("mover",[$(r.base,e),t]);return a.setAttribute("accent","true"),a},al=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));D({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=Ve(e[0]),a=!al.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:It,mathmlBuilder:xa});D({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:It,mathmlBuilder:xa});D({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=U(r.base,e),a=I0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,l=y.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return y.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(r,e)=>{var t=I0.mathMLnode(r.label),a=new S.MathNode("munder",[$(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var qe=r=>{var e=new S.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};D({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=y.wrapFragment(U(r.body,a,e),e),l=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(l+"-arrow-pad");var o;r.below&&(a=e.havingStyle(t.sub()),o=y.wrapFragment(U(r.below,a,e),e),o.classes.push(l+"-arrow-pad"));var h=I0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,p=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(p-=n.depth);var g;if(o){var b=-e.fontMetrics().axisHeight+o.height+.5*h.height+.111;g=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c},{type:"elem",elem:o,shift:b}]},e)}else g=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c}]},e);return g.children[0].children[0].children[1].classes.push("svg-align"),y.makeSpan(["mrel","x-arrow"],[g],e)},mathmlBuilder(r,e){var t=I0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=qe($(r.body,e));if(r.below){var l=qe($(r.below,e));a=new S.MathNode("munderover",[t,l,n])}else a=new S.MathNode("mover",[t,n])}else if(r.below){var o=qe($(r.below,e));a=new S.MathNode("munder",[t,o])}else a=qe(),a=new S.MathNode("mover",[t,a]);return a}});var nl=y.makeSpan;function wa(r,e){var t=l0(r.body,e,!0);return nl([r.mclass],t,e)}function ka(r,e){var t,a=d0(r.body,e);return r.mclass==="minner"?t=new S.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new S.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new S.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}D({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:t0(n),isCharacterBox:q.isCharacterBox(n)}},htmlBuilder:wa,mathmlBuilder:ka});var Xe=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};D({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Xe(e[0]),body:t0(e[1]),isCharacterBox:q.isCharacterBox(e[1])}}});D({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],l=e[0],o;a!=="\\stackrel"?o=Xe(n):o="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:t0(n)},c={type:"supsub",mode:l.mode,base:h,sup:a==="\\underset"?null:l,sub:a==="\\underset"?l:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:q.isCharacterBox(c)}},htmlBuilder:wa,mathmlBuilder:ka});D({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Xe(e[0]),body:t0(e[0])}},htmlBuilder(r,e){var t=l0(r.body,e,!0),a=y.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=d0(r.body,e),a=new S.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var ll={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},kr=()=>({type:"styling",body:[],mode:"math",style:"display"}),Sr=r=>r.type==="textord"&&r.text==="@",il=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function sl(r,e,t){var a=ll[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),l={type:"atom",text:a,mode:"math",family:"rel"},o=t.callFunction("\\Big",[l],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,o,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function ol(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new A("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],l=0;l-1))if("<>AV".indexOf(p)>-1)for(var b=0;b<2;b++){for(var x=!0,w=c+1;wAV=|." after @',o[c]);var M=sl(p,g,r),C={type:"styling",body:[M],mode:"math",style:"display"};a.push(C),h=kr()}l%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var N=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:N,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}D({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=y.wrapFragment(U(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=T(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new S.MathNode("mrow",[$(r.label,e)]);return t=new S.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new S.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});D({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=y.wrapFragment(U(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new S.MathNode("mrow",[$(r.fragment,e)])}});D({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=H(e[0],"ordgroup"),n=a.body,l="",o=0;o=1114111)throw new A("\\@char with invalid code point "+l);return c<=65535?p=String.fromCharCode(c):(c-=65536,p=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:p}}});var Sa=(r,e)=>{var t=l0(r.body,e.withColor(r.color),!1);return y.makeFragment(t)},Ma=(r,e)=>{var t=d0(r.body,e.withColor(r.color)),a=new S.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};D({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=H(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:t0(n)}},htmlBuilder:Sa,mathmlBuilder:Ma});D({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=H(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var l=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:l}},htmlBuilder:Sa,mathmlBuilder:Ma});D({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,l=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:l,size:n&&H(n,"size").value}},htmlBuilder(r,e){var t=y.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=T(_(r.size,e)))),t},mathmlBuilder(r,e){var t=new S.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",T(_(r.size,e)))),t}});var At={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},za=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new A("Expected a control sequence",r);return e},ul=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Aa=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};D({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(At[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=At[a.text]),H(e.parseFunction(),"internal");throw new A("Invalid token after macro prefix",a)}});D({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new A("Expected a control sequence",a);for(var l=0,o,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),h[l].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new A('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==l+1)throw new A('Argument number "'+a.text+'" out of order');l++,h.push([])}else{if(a.text==="EOF")throw new A("Expected a macro definition");h[l].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:l,delimiters:h},t===At[t]),{type:"internal",mode:e.mode}}});D({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=za(e.gullet.popToken());e.gullet.consumeSpaces();var n=ul(e);return Aa(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});D({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=za(e.gullet.popToken()),n=e.gullet.popToken(),l=e.gullet.popToken();return Aa(e,a,l,t==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var pe=function(e,t,a){var n=K.math[e]&&K.math[e].replace,l=Et(n||e,t,a);if(!l)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return l},Ft=function(e,t,a,n){var l=a.havingBaseStyle(t),o=y.makeSpan(n.concat(l.sizingClasses(a)),[e],a),h=l.sizeMultiplier/a.sizeMultiplier;return o.height*=h,o.depth*=h,o.maxFontSize=l.sizeMultiplier,o},Ta=function(e,t,a){var n=t.havingBaseStyle(a),l=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=T(l),e.height-=l,e.depth+=l},hl=function(e,t,a,n,l,o){var h=y.makeSymbol(e,"Main-Regular",l,n),c=Ft(h,t,n,o);return a&&Ta(c,n,t),c},cl=function(e,t,a,n){return y.makeSymbol(e,"Size"+t+"-Regular",a,n)},Ca=function(e,t,a,n,l,o){var h=cl(e,t,l,n),c=Ft(y.makeSpan(["delimsizing","size"+t],[h],n),O.TEXT,n,o);return a&&Ta(c,n,O.TEXT),c},ut=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var l=y.makeSpan(["delimsizinginner",n],[y.makeSpan([],[y.makeSymbol(e,t,a)])]);return{type:"elem",elem:l}},ht=function(e,t,a){var n=q0["Size4-Regular"][e.charCodeAt(0)]?q0["Size4-Regular"][e.charCodeAt(0)][4]:q0["Size1-Regular"][e.charCodeAt(0)][4],l=new Q0("inner",v1(e,Math.round(1e3*t))),o=new X0([l],{width:T(n),height:T(t),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=y.makeSvgSpan([],[o],a);return h.height=t,h.style.height=T(t),h.style.width=T(n),{type:"elem",elem:h}},Tt=.008,Re={type:"kern",size:-1*Tt},ml=["|","\\lvert","\\rvert","\\vert"],dl=["\\|","\\lVert","\\rVert","\\Vert"],Da=function(e,t,a,n,l,o){var h,c,p,g,b="",x=0;h=p=g=e,c=null;var w="Size1-Regular";e==="\\uparrow"?p=g="⏐":e==="\\Uparrow"?p=g="‖":e==="\\downarrow"?h=p="⏐":e==="\\Downarrow"?h=p="‖":e==="\\updownarrow"?(h="\\uparrow",p="⏐",g="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",p="‖",g="\\Downarrow"):q.contains(ml,e)?(p="∣",b="vert",x=333):q.contains(dl,e)?(p="∥",b="doublevert",x=556):e==="["||e==="\\lbrack"?(h="⎡",p="⎢",g="⎣",w="Size4-Regular",b="lbrack",x=667):e==="]"||e==="\\rbrack"?(h="⎤",p="⎥",g="⎦",w="Size4-Regular",b="rbrack",x=667):e==="\\lfloor"||e==="⌊"?(p=h="⎢",g="⎣",w="Size4-Regular",b="lfloor",x=667):e==="\\lceil"||e==="⌈"?(h="⎡",p=g="⎢",w="Size4-Regular",b="lceil",x=667):e==="\\rfloor"||e==="⌋"?(p=h="⎥",g="⎦",w="Size4-Regular",b="rfloor",x=667):e==="\\rceil"||e==="⌉"?(h="⎤",p=g="⎥",w="Size4-Regular",b="rceil",x=667):e==="("||e==="\\lparen"?(h="⎛",p="⎜",g="⎝",w="Size4-Regular",b="lparen",x=875):e===")"||e==="\\rparen"?(h="⎞",p="⎟",g="⎠",w="Size4-Regular",b="rparen",x=875):e==="\\{"||e==="\\lbrace"?(h="⎧",c="⎨",g="⎩",p="⎪",w="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="⎫",c="⎬",g="⎭",p="⎪",w="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(h="⎧",g="⎩",p="⎪",w="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(h="⎫",g="⎭",p="⎪",w="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(h="⎧",g="⎭",p="⎪",w="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(h="⎫",g="⎩",p="⎪",w="Size4-Regular");var M=pe(h,w,l),C=M.height+M.depth,N=pe(p,w,l),E=N.height+N.depth,L=pe(g,w,l),F=L.height+L.depth,Y=0,V=1;if(c!==null){var W=pe(c,w,l);Y=W.height+W.depth,V=2}var G=C+F+Y,J=Math.max(0,Math.ceil((t-G)/(V*E))),X=G+J*V*E,B0=n.fontMetrics().axisHeight;a&&(B0*=n.sizeMultiplier);var i0=X/2-B0,n0=[];if(b.length>0){var K0=X-C-F,h0=Math.round(X*1e3),k0=g1(b,Math.round(K0*1e3)),P0=new Q0(b,k0),re=(x/1e3).toFixed(3)+"em",ae=(h0/1e3).toFixed(3)+"em",Ze=new X0([P0],{width:re,height:ae,viewBox:"0 0 "+x+" "+h0}),H0=y.makeSvgSpan([],[Ze],n);H0.height=h0/1e3,H0.style.width=re,H0.style.height=ae,n0.push({type:"elem",elem:H0})}else{if(n0.push(ut(g,w,l)),n0.push(Re),c===null){var V0=X-C-F+2*Tt;n0.push(ht(p,V0,n))}else{var b0=(X-C-F-Y)/2+2*Tt;n0.push(ht(p,b0,n)),n0.push(Re),n0.push(ut(c,w,l)),n0.push(Re),n0.push(ht(p,b0,n))}n0.push(Re),n0.push(ut(h,w,l))}var fe=n.havingBaseStyle(O.TEXT),Je=y.makeVList({positionType:"bottom",positionData:i0,children:n0},fe);return Ft(y.makeSpan(["delimsizing","mult"],[Je],fe),O.TEXT,n,o)},ct=80,mt=.08,dt=function(e,t,a,n,l){var o=p1(e,n,a),h=new Q0(e,o),c=new X0([h],{width:"400em",height:T(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return y.makeSvgSpan(["hide-tail"],[c],l)},fl=function(e,t){var a=t.havingBaseSizing(),n=qa("\\surd",e*a.sizeMultiplier,Ea,a),l=a.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,p=0,g=0,b;return n.type==="small"?(g=1e3+1e3*o+ct,e<1?l=1:e<1.4&&(l=.7),c=(1+o+mt)/l,p=(1+o)/l,h=dt("sqrtMain",c,g,o,t),h.style.minWidth="0.853em",b=.833/l):n.type==="large"?(g=(1e3+ct)*ve[n.size],p=(ve[n.size]+o)/l,c=(ve[n.size]+o+mt)/l,h=dt("sqrtSize"+n.size,c,g,o,t),h.style.minWidth="1.02em",b=1/l):(c=e+o+mt,p=e+o,g=Math.floor(1e3*e+o)+ct,h=dt("sqrtTall",c,g,o,t),h.style.minWidth="0.742em",b=1.056),h.height=p,h.style.height=T(c),{span:h,advanceWidth:b,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*l}},Ba=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],pl=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Na=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ve=[0,1.2,1.8,2.4,3],vl=function(e,t,a,n,l){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),q.contains(Ba,e)||q.contains(Na,e))return Ca(e,t,!1,a,n,l);if(q.contains(pl,e))return Da(e,ve[t],!1,a,n,l);throw new A("Illegal delimiter: '"+e+"'")},gl=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],bl=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"stack"}],Ea=[{type:"small",style:O.SCRIPTSCRIPT},{type:"small",style:O.SCRIPT},{type:"small",style:O.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],yl=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},qa=function(e,t,a,n){for(var l=Math.min(2,3-n.style.size),o=l;ot)return a[o]}return a[a.length-1]},Ra=function(e,t,a,n,l,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var h;q.contains(Na,e)?h=gl:q.contains(Ba,e)?h=Ea:h=bl;var c=qa(e,t,h,n);return c.type==="small"?hl(e,c.style,a,n,l,o):c.type==="large"?Ca(e,c.size,a,n,l,o):Da(e,t,a,n,l,o)},xl=function(e,t,a,n,l,o){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,p=5/n.fontMetrics().ptPerEm,g=Math.max(t-h,a+h),b=Math.max(g/500*c,2*g-p);return Ra(e,b,!0,n,l,o)},O0={sqrtImage:fl,sizedDelim:vl,sizeToMaxHeight:ve,customSizedDelim:Ra,leftRightDelim:xl},Mr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},wl=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function $e(r,e){var t=We(r);if(t&&q.contains(wl,t.text))return t;throw t?new A("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new A("Invalid delimiter type '"+r.type+"'",r)}D({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=$e(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Mr[r.funcName].size,mclass:Mr[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?y.makeSpan([r.mclass]):O0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(w0(r.delim,r.mode));var t=new S.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=T(O0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function zr(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}D({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new A("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:$e(e[0],r).text,color:t}}});D({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=$e(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var l=H(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:l.delim,rightColor:l.color}},htmlBuilder:(r,e)=>{zr(r);for(var t=l0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,l=!1,o=0;o{zr(r);var t=d0(r.body,e);if(r.left!=="."){var a=new S.MathNode("mo",[w0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new S.MathNode("mo",[w0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return Rt(t)}});D({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=$e(e[0],r);if(!r.parser.leftrightDepth)throw new A("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=ye(e,[]);else{t=O0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?w0("|","text"):w0(r.delim,r.mode),a=new S.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Pt=(r,e)=>{var t=y.wrapFragment(U(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,l,o=0,h=q.isCharacterBox(r.body);if(a==="sout")l=y.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/n,o=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=_({number:.6,unit:"pt"},e),p=_({number:.35,unit:"ex"},e),g=e.havingBaseSizing();n=n/g.sizeMultiplier;var b=t.height+t.depth+c+p;t.style.paddingLeft=T(b/2+c);var x=Math.floor(1e3*b*n),w=d1(x),M=new X0([new Q0("phase",w)],{width:"400em",height:T(x/1e3),viewBox:"0 0 400000 "+x,preserveAspectRatio:"xMinYMin slice"});l=y.makeSvgSpan(["hide-tail"],[M],e),l.style.height=T(b),o=t.depth+c+p}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var C=0,N=0,E=0;/box/.test(a)?(E=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),C=e.fontMetrics().fboxsep+(a==="colorbox"?0:E),N=C):a==="angl"?(E=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),C=4*E,N=Math.max(0,.25-t.depth)):(C=h?.2:0,N=C),l=I0.encloseSpan(t,a,C,N,e),/fbox|boxed|fcolorbox/.test(a)?(l.style.borderStyle="solid",l.style.borderWidth=T(E)):a==="angl"&&E!==.049&&(l.style.borderTopWidth=T(E),l.style.borderRightWidth=T(E)),o=t.depth+N,r.backgroundColor&&(l.style.backgroundColor=r.backgroundColor,r.borderColor&&(l.style.borderColor=r.borderColor))}var L;if(r.backgroundColor)L=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:o},{type:"elem",elem:t,shift:0}]},e);else{var F=/cancel|phase/.test(a)?["svg-align"]:[];L=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:l,shift:o,wrapperClasses:F}]},e)}return/cancel/.test(a)&&(L.height=t.height,L.depth=t.depth),/cancel/.test(a)&&!h?y.makeSpan(["mord","cancel-lap"],[L],e):y.makeSpan(["mord"],[L],e)},Ht=(r,e)=>{var t=0,a=new S.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[$(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};D({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,l=H(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:l,body:o}},htmlBuilder:Pt,mathmlBuilder:Ht});D({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,l=H(e[0],"color-token").color,o=H(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:l,body:h}},htmlBuilder:Pt,mathmlBuilder:Ht});D({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});D({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:Pt,mathmlBuilder:Ht});D({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Oa={};function T0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:l,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new A("{"+r.envName+"} can be used only in display mode.")};function Vt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function j0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:l,arraystretch:o,colSeparationType:h,autoTag:c,singleRow:p,emptySingleRow:g,maxNumCols:b,leqno:x}=e;if(r.gullet.beginGroup(),p||r.gullet.macros.set("\\cr","\\\\\\relax"),!o){var w=r.gullet.expandMacroAsText("\\arraystretch");if(w==null)o=1;else if(o=parseFloat(w),!o||o<0)throw new A("Invalid \\arraystretch: "+w)}r.gullet.beginGroup();var M=[],C=[M],N=[],E=[],L=c!=null?[]:void 0;function F(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function Y(){L&&(r.gullet.macros.get("\\df@tag")?(L.push(r.subparse([new x0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):L.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(F(),E.push(Ar(r));;){var V=r.parseExpression(!1,p?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),V={type:"ordgroup",mode:r.mode,body:V},t&&(V={type:"styling",mode:r.mode,style:t,body:[V]}),M.push(V);var W=r.fetch().text;if(W==="&"){if(b&&M.length===b){if(p||h)throw new A("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(W==="\\end"){Y(),M.length===1&&V.type==="styling"&&V.body[0].body.length===0&&(C.length>1||!g)&&C.pop(),E.length0&&(F+=.25),p.push({pos:F,isDashed:ze[Ae]})}for(Y(o[0]),a=0;a0&&(i0+=L,Gze))for(a=0;a=h)){var le=void 0;(n>0||e.hskipBeforeAndAfter)&&(le=q.deflt(b0.pregap,x),le!==0&&(k0=y.makeSpan(["arraycolsep"],[]),k0.style.width=T(le),h0.push(k0)));var ie=[];for(a=0;a0){for(var Qa=y.makeLineSpan("hline",t,g),_a=y.makeLineSpan("hdashline",t,g),Qe=[{type:"elem",elem:c,shift:0}];p.length>0;){var jt=p.pop(),Kt=jt.pos-n0;jt.isDashed?Qe.push({type:"elem",elem:_a,shift:Kt}):Qe.push({type:"elem",elem:Qa,shift:Kt})}c=y.makeVList({positionType:"individualShift",children:Qe},t)}if(re.length===0)return y.makeSpan(["mord"],[c],t);var _e=y.makeVList({positionType:"individualShift",children:re},t);return _e=y.makeSpan(["tag"],[_e],t),y.makeFragment([c,_e])},kl={c:"center ",l:"left ",r:"right "},D0=function(e,t){for(var a=[],n=new S.MathNode("mtd",[],["mtr-glue"]),l=new S.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var M=e.cols,C="",N=!1,E=0,L=M.length;M[0].type==="separator"&&(x+="top ",E=1),M[M.length-1].type==="separator"&&(x+="bottom ",L-=1);for(var F=E;F0?"left ":"",x+=J[J.length-1].length>0?"right ":"";for(var X=1;X-1?"alignat":"align",l=e.envName==="split",o=j0(e.parser,{cols:a,addJot:!0,autoTag:l?void 0:Vt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:l?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var g="",b=0;b0&&w&&(N=1),a[M]={type:"align",align:C,pregap:N,postgap:0}}return o.colSeparationType=w?"align":"alignat",o};T0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=We(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(o){var h=Lt(o),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new A("Unknown column alignment: "+c,o)}),l={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return j0(r.parser,l,Ut(r.envName))},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new A("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var l=j0(r.parser,a,Ut(r.envName)),o=Math.max(0,...l.body.map(h=>h.length));return l.cols=new Array(o).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[l],left:e[0],right:e[1],rightColor:void 0}:l},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=j0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=We(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(o){var h=Lt(o),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new A("Unknown column alignment: "+c,o)});if(n.length>1)throw new A("{subarray} can contain only one column");var l={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=j0(r.parser,l,"script"),l.body.length>0&&l.body[0].length>1)throw new A("{subarray} can contain only one column");return l},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=j0(r.parser,e,Ut(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ia,htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){q.contains(["gather","gather*"],r.envName)&&je(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Vt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return j0(r.parser,e,"display")},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ia,htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){je(r);var e={autoTag:Vt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return j0(r.parser,e,"display")},htmlBuilder:C0,mathmlBuilder:D0});T0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return je(r),ol(r.parser)},htmlBuilder:C0,mathmlBuilder:D0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");D({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new A(r.funcName+" valid only within array environment")}});var Tr=Oa;D({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new A("Invalid environment name",n);for(var l="",o=0;o{var t=r.font,a=e.withFont(t);return U(r.body,a)},Pa=(r,e)=>{var t=r.font,a=e.withFont(t);return $(r.body,a)},Cr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};D({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=Ve(e[0]),l=a;return l in Cr&&(l=Cr[l]),{type:"font",mode:t.mode,font:l.slice(1),body:n}},htmlBuilder:Fa,mathmlBuilder:Pa});D({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=q.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Xe(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});D({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:l}=t,o=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:l,font:h,body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:Fa,mathmlBuilder:Pa});var Ha=(r,e)=>{var t=e;return r==="display"?t=t.id>=O.SCRIPT.id?t.text():O.DISPLAY:r==="text"&&t.size===O.DISPLAY.size?t=O.TEXT:r==="script"?t=O.SCRIPT:r==="scriptscript"&&(t=O.SCRIPTSCRIPT),t},Gt=(r,e)=>{var t=Ha(r.size,e.style),a=t.fracNum(),n=t.fracDen(),l;l=e.havingStyle(a);var o=U(r.numer,l,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?M=3*x:M=7*x,C=e.fontMetrics().denom1):(b>0?(w=e.fontMetrics().num2,M=x):(w=e.fontMetrics().num3,M=3*x),C=e.fontMetrics().denom2);var N;if(g){var L=e.fontMetrics().axisHeight;w-o.depth-(L+.5*b){var t=new S.MathNode("mfrac",[$(r.numer,e),$(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=_(r.barSize,e);t.setAttribute("linethickness",T(a))}var n=Ha(r.size,e.style);if(n.size!==e.style.size){t=new S.MathNode("mstyle",[t]);var l=n.size===O.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",l),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var o=[];if(r.leftDelim!=null){var h=new S.MathNode("mo",[new S.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),o.push(h)}if(o.push(t),r.rightDelim!=null){var c=new S.MathNode("mo",[new S.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),o.push(c)}return Rt(o)}return t};D({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],l=e[1],o,h=null,c=null,p="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,h="(",c=")";break;case"\\\\bracefrac":o=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":p="display";break;case"\\tfrac":case"\\tbinom":p="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:l,hasBarLine:o,leftDelim:h,rightDelim:c,size:p,barSize:null}},htmlBuilder:Gt,mathmlBuilder:Yt});D({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],l=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});D({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var Dr=["display","text","script","scriptscript"],Br=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};D({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],l=Ve(e[0]),o=l.type==="atom"&&l.family==="open"?Br(l.text):null,h=Ve(e[1]),c=h.type==="atom"&&h.family==="close"?Br(h.text):null,p=H(e[2],"size"),g,b=null;p.isBlank?g=!0:(b=p.value,g=b.number>0);var x="auto",w=e[3];if(w.type==="ordgroup"){if(w.body.length>0){var M=H(w.body[0],"textord");x=Dr[Number(M.text)]}}else w=H(w,"textord"),x=Dr[Number(w.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:g,barSize:b,leftDelim:o,rightDelim:c,size:x}},htmlBuilder:Gt,mathmlBuilder:Yt});D({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:H(e[0],"size").value,token:n}}});D({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],l=Jn(H(e[1],"infix").size),o=e[2],h=l.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:o,continued:!1,hasBarLine:h,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Gt,mathmlBuilder:Yt});var Va=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?U(r.sup,e.havingStyle(t.sup()),e):U(r.sub,e.havingStyle(t.sub()),e),n=H(r.base,"horizBrace")):n=H(r,"horizBrace");var l=U(n.base,e.havingBaseStyle(O.DISPLAY)),o=I0.svgSpan(n,e),h;if(n.isOver?(h=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:o}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=y.makeVList({positionType:"bottom",positionData:l.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:l}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=y.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=y.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return y.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},Sl=(r,e)=>{var t=I0.mathMLnode(r.label);return new S.MathNode(r.isOver?"mover":"munder",[$(r.base,e),t])};D({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:Va,mathmlBuilder:Sl});D({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=H(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:t0(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=l0(r.body,e,!1);return y.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=$0(r.body,e);return t instanceof v0||(t=new v0("mrow",[t])),t.setAttribute("href",r.href),t}});D({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=H(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],l=0;l{var{parser:t,funcName:a,token:n}=r,l=H(e[0],"raw").string,o=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=l,h={command:"\\htmlClass",class:l};break;case"\\htmlId":c.id=l,h={command:"\\htmlId",id:l};break;case"\\htmlStyle":c.style=l,h={command:"\\htmlStyle",style:l};break;case"\\htmlData":{for(var p=l.split(","),g=0;g{var t=l0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=y.makeSpan(a,t,e);for(var l in r.attributes)l!=="class"&&r.attributes.hasOwnProperty(l)&&n.setAttribute(l,r.attributes[l]);return n},mathmlBuilder:(r,e)=>$0(r.body,e)});D({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:t0(e[0]),mathml:t0(e[1])}},htmlBuilder:(r,e)=>{var t=l0(r.html,e,!1);return y.makeFragment(t)},mathmlBuilder:(r,e)=>$0(r.mathml,e)});var ft=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new A("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!sa(a))throw new A("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};D({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},l={number:.9,unit:"em"},o={number:0,unit:"em"},h="";if(t[0])for(var c=H(t[0],"raw").string,p=c.split(","),g=0;g{var t=_(r.height,e),a=0;r.totalheight.number>0&&(a=_(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=_(r.width,e));var l={height:T(t+a)};n>0&&(l.width=T(n)),a>0&&(l.verticalAlign=T(-a));var o=new k1(r.src,r.alt,l);return o.height=t,o.depth=a,o},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=_(r.height,e),n=0;if(r.totalheight.number>0&&(n=_(r.totalheight,e)-a,t.setAttribute("valign",T(-n))),t.setAttribute("height",T(a+n)),r.width.number>0){var l=_(r.width,e);t.setAttribute("width",T(l))}return t.setAttribute("src",r.src),t}});D({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=H(e[0],"size");if(t.settings.strict){var l=a[1]==="m",o=n.value.unit==="mu";l?(o||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return y.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=_(r.dimension,e);return new S.SpaceNode(t)}});D({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=y.makeSpan([],[U(r.body,e)]),t=y.makeSpan(["inner"],[t],e)):t=y.makeSpan(["inner"],[U(r.body,e)]);var a=y.makeSpan(["fix"],[]),n=y.makeSpan([r.alignment],[t,a],e),l=y.makeSpan(["strut"]);return l.style.height=T(n.height+n.depth),n.depth&&(l.style.verticalAlign=T(-n.depth)),n.children.unshift(l),n=y.makeSpan(["thinbox"],[n],e),y.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mpadded",[$(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});D({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var l=t==="\\("?"\\)":"$",o=a.parseExpression(!1,l);return a.expect(l),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}});D({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new A("Mismatched "+r.funcName)}});var Nr=(r,e)=>{switch(e.style.size){case O.DISPLAY.size:return r.display;case O.TEXT.size:return r.text;case O.SCRIPT.size:return r.script;case O.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};D({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:t0(e[0]),text:t0(e[1]),script:t0(e[2]),scriptscript:t0(e[3])}},htmlBuilder:(r,e)=>{var t=Nr(r,e),a=l0(t,e,!1);return y.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=Nr(r,e);return $0(t,e)}});var Ua=(r,e,t,a,n,l,o)=>{r=y.makeSpan([],[r]);var h=t&&q.isCharacterBox(t),c,p;if(e){var g=U(e,a.havingStyle(n.sup()),a);p={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(t){var b=U(t,a.havingStyle(n.sub()),a);c={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-b.height)}}var x;if(p&&c){var w=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+o;x=y.makeVList({positionType:"bottom",positionData:w,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-l)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:T(l)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var M=r.height-o;x=y.makeVList({positionType:"top",positionData:M,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-l)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(p){var C=r.depth+o;x=y.makeVList({positionType:"bottom",positionData:C,children:[{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:T(l)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var N=[x];if(c&&l!==0&&!h){var E=y.makeSpan(["mspace"],[],a);E.style.marginRight=T(l),N.unshift(E)}return y.makeSpan(["mop","op-limits"],N,a)},Ga=["\\smallint"],de=(r,e)=>{var t,a,n=!1,l;r.type==="supsub"?(t=r.sup,a=r.sub,l=H(r.base,"op"),n=!0):l=H(r,"op");var o=e.style,h=!1;o.size===O.DISPLAY.size&&l.symbol&&!q.contains(Ga,l.name)&&(h=!0);var c;if(l.symbol){var p=h?"Size2-Regular":"Size1-Regular",g="";if((l.name==="\\oiint"||l.name==="\\oiiint")&&(g=l.name.slice(1),l.name=g==="oiint"?"\\iint":"\\iiint"),c=y.makeSymbol(l.name,p,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),g.length>0){var b=c.italic,x=y.staticSvg(g+"Size"+(h?"2":"1"),e);c=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:x,shift:h?.08:0}]},e),l.name="\\"+g,c.classes.unshift("mop"),c.italic=b}}else if(l.body){var w=l0(l.body,e,!0);w.length===1&&w[0]instanceof M0?(c=w[0],c.classes[0]="mop"):c=y.makeSpan(["mop"],w,e)}else{for(var M=[],C=1;C{var t;if(r.symbol)t=new v0("mo",[w0(r.name,r.mode)]),q.contains(Ga,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new v0("mo",d0(r.body,e));else{t=new v0("mi",[new A0(r.name.slice(1))]);var a=new v0("mo",[w0("⁡","text")]);r.parentIsSupSub?t=new v0("mrow",[t,a]):t=ya([t,a])}return t},Ml={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};D({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=Ml[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:de,mathmlBuilder:ke});D({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:t0(a)}},htmlBuilder:de,mathmlBuilder:ke});var zl={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};D({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:de,mathmlBuilder:ke});D({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:de,mathmlBuilder:ke});D({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=zl[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:de,mathmlBuilder:ke});var Ya=(r,e)=>{var t,a,n=!1,l;r.type==="supsub"?(t=r.sup,a=r.sub,l=H(r.base,"operatorname"),n=!0):l=H(r,"operatorname");var o;if(l.body.length>0){for(var h=l.body.map(b=>{var x=b.text;return typeof x=="string"?{type:"textord",mode:b.mode,text:x}:b}),c=l0(h,e.withFont("mathrm"),!0),p=0;p{for(var t=d0(r.body,e.withFont("mathrm")),a=!0,n=0;ng.toText()).join("");t=[new S.TextNode(h)]}var c=new S.MathNode("mi",t);c.setAttribute("mathvariant","normal");var p=new S.MathNode("mo",[w0("⁡","text")]);return r.parentIsSupSub?new S.MathNode("mrow",[c,p]):S.newDocumentFragment([c,p])};D({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:t0(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Ya,mathmlBuilder:Al});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");te({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?y.makeFragment(l0(r.body,e,!1)):y.makeSpan(["mord"],l0(r.body,e,!0),e)},mathmlBuilder(r,e){return $0(r.body,e,!0)}});D({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=U(r.body,e.havingCrampedStyle()),a=y.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,l=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return y.makeSpan(["mord","overline"],[l],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("mover",[$(r.body,e),t]);return a.setAttribute("accent","true"),a}});D({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:t0(a)}},htmlBuilder:(r,e)=>{var t=l0(r.body,e.withPhantom(),!1);return y.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=d0(r.body,e);return new S.MathNode("mphantom",t)}});D({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=y.makeSpan([],[U(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=d0(t0(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});D({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=y.makeSpan(["inner"],[U(r.body,e.withPhantom())]),a=y.makeSpan(["fix"],[]);return y.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=d0(t0(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});D({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=H(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=U(r.body,e),a=_(r.dy,e);return y.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new S.MathNode("mpadded",[$(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});D({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});D({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],l=H(e[0],"size"),o=H(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&H(n,"size").value,width:l.value,height:o.value}},htmlBuilder(r,e){var t=y.makeSpan(["mord","rule"],[],e),a=_(r.width,e),n=_(r.height,e),l=r.shift?_(r.shift,e):0;return t.style.borderRightWidth=T(a),t.style.borderTopWidth=T(n),t.style.bottom=T(l),t.width=a,t.height=n+l,t.depth=-l,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=_(r.width,e),a=_(r.height,e),n=r.shift?_(r.shift,e):0,l=e.color&&e.getColor()||"black",o=new S.MathNode("mspace");o.setAttribute("mathbackground",l),o.setAttribute("width",T(t)),o.setAttribute("height",T(a));var h=new S.MathNode("mpadded",[o]);return n>=0?h.setAttribute("height",T(n)):(h.setAttribute("height",T(n)),h.setAttribute("depth",T(-n))),h.setAttribute("voffset",T(n)),h}});function Wa(r,e,t){for(var a=l0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,l=0;l{var t=e.havingSize(r.size);return Wa(r.body,t,e)};D({type:"sizing",names:Er,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,l=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:Er.indexOf(a)+1,body:l}},htmlBuilder:Tl,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=d0(r.body,t),n=new S.MathNode("mstyle",a);return n.setAttribute("mathsize",T(t.sizeMultiplier)),n}});D({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,l=!1,o=t[0]&&H(t[0],"ordgroup");if(o)for(var h="",c=0;c{var t=y.makeSpan([],[U(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new S.MathNode("mpadded",[$(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});D({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],l=e[0];return{type:"sqrt",mode:a.mode,body:l,index:n}},htmlBuilder(r,e){var t=U(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=y.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,l=n;e.style.idt.height+t.depth+o&&(o=(o+b-t.height-t.depth)/2);var x=c.height-t.height-o-p;t.style.paddingLeft=T(g);var w=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+x)},{type:"elem",elem:c},{type:"kern",size:p}]},e);if(r.index){var M=e.havingStyle(O.SCRIPTSCRIPT),C=U(r.index,M,e),N=.6*(w.height-w.depth),E=y.makeVList({positionType:"shift",positionData:-N,children:[{type:"elem",elem:C}]},e),L=y.makeSpan(["root"],[E]);return y.makeSpan(["mord","sqrt"],[L,w],e)}else return y.makeSpan(["mord","sqrt"],[w],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new S.MathNode("mroot",[$(t,e),$(a,e)]):new S.MathNode("msqrt",[$(t,e)])}});var qr={display:O.DISPLAY,text:O.TEXT,script:O.SCRIPT,scriptscript:O.SCRIPTSCRIPT};D({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,l=n.parseExpression(!0,t),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:l}},htmlBuilder(r,e){var t=qr[r.style],a=e.havingStyle(t).withFont("");return Wa(r.body,a,e)},mathmlBuilder(r,e){var t=qr[r.style],a=e.havingStyle(t),n=d0(r.body,a),l=new S.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=o[r.style];return l.setAttribute("scriptlevel",h[0]),l.setAttribute("displaystyle",h[1]),l}});var Cl=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===O.DISPLAY.size||a.alwaysHandleSupSub);return n?de:null}else if(a.type==="operatorname"){var l=a.alwaysHandleSupSub&&(t.style.size===O.DISPLAY.size||a.limits);return l?Ya:null}else{if(a.type==="accent")return q.isCharacterBox(a.base)?It:null;if(a.type==="horizBrace"){var o=!e.sub;return o===a.isOver?Va:null}else return null}else return null};te({type:"supsub",htmlBuilder(r,e){var t=Cl(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:l}=r,o=U(a,e),h,c,p=e.fontMetrics(),g=0,b=0,x=a&&q.isCharacterBox(a);if(n){var w=e.havingStyle(e.style.sup());h=U(n,w,e),x||(g=o.height-w.fontMetrics().supDrop*w.sizeMultiplier/e.sizeMultiplier)}if(l){var M=e.havingStyle(e.style.sub());c=U(l,M,e),x||(b=o.depth+M.fontMetrics().subDrop*M.sizeMultiplier/e.sizeMultiplier)}var C;e.style===O.DISPLAY?C=p.sup1:e.style.cramped?C=p.sup3:C=p.sup2;var N=e.sizeMultiplier,E=T(.5/p.ptPerEm/N),L=null;if(c){var F=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(o instanceof M0||F)&&(L=T(-o.italic))}var Y;if(h&&c){g=Math.max(g,C,h.depth+.25*p.xHeight),b=Math.max(b,p.sub2);var V=p.defaultRuleThickness,W=4*V;if(g-h.depth-(c.height-b)0&&(g+=G,b-=G)}var J=[{type:"elem",elem:c,shift:b,marginRight:E,marginLeft:L},{type:"elem",elem:h,shift:-g,marginRight:E}];Y=y.makeVList({positionType:"individualShift",children:J},e)}else if(c){b=Math.max(b,p.sub1,c.height-.8*p.xHeight);var X=[{type:"elem",elem:c,marginLeft:L,marginRight:E}];Y=y.makeVList({positionType:"shift",positionData:b,children:X},e)}else if(h)g=Math.max(g,C,h.depth+.25*p.xHeight),Y=y.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:h,marginRight:E}]},e);else throw new Error("supsub must have either sup or sub.");var B0=zt(o,"right")||"mord";return y.makeSpan([B0],[o,y.makeSpan(["msupsub"],[Y])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var l=[$(r.base,e)];r.sub&&l.push($(r.sub,e)),r.sup&&l.push($(r.sup,e));var o;if(t)o=a?"mover":"munder";else if(r.sub)if(r.sup){var p=r.base;p&&p.type==="op"&&p.limits&&e.style===O.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(e.style===O.DISPLAY||p.limits)?o="munderover":o="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===O.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===O.DISPLAY)?o="munder":o="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===O.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===O.DISPLAY)?o="mover":o="msup"}return new S.MathNode(o,l)}});te({type:"atom",htmlBuilder(r,e){return y.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new S.MathNode("mo",[w0(r.text,r.mode)]);if(r.family==="bin"){var a=Ot(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var Xa={mi:"italic",mn:"normal",mtext:"normal"};te({type:"mathord",htmlBuilder(r,e){return y.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new S.MathNode("mi",[w0(r.text,r.mode,e)]),a=Ot(r,e)||"italic";return a!==Xa[t.type]&&t.setAttribute("mathvariant",a),t}});te({type:"textord",htmlBuilder(r,e){return y.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=w0(r.text,r.mode,e),a=Ot(r,e)||"normal",n;return r.mode==="text"?n=new S.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new S.MathNode("mn",[t]):r.text==="\\prime"?n=new S.MathNode("mo",[t]):n=new S.MathNode("mi",[t]),a!==Xa[n.type]&&n.setAttribute("mathvariant",a),n}});var pt={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},vt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};te({type:"spacing",htmlBuilder(r,e){if(vt.hasOwnProperty(r.text)){var t=vt[r.text].className||"";if(r.mode==="text"){var a=y.makeOrd(r,e,"textord");return a.classes.push(t),a}else return y.makeSpan(["mspace",t],[y.mathsym(r.text,r.mode,e)],e)}else{if(pt.hasOwnProperty(r.text))return y.makeSpan(["mspace",pt[r.text]],[],e);throw new A('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(vt.hasOwnProperty(r.text))t=new S.MathNode("mtext",[new S.TextNode(" ")]);else{if(pt.hasOwnProperty(r.text))return new S.MathNode("mspace");throw new A('Unknown type of space "'+r.text+'"')}return t}});var Rr=()=>{var r=new S.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};te({type:"tag",mathmlBuilder(r,e){var t=new S.MathNode("mtable",[new S.MathNode("mtr",[Rr(),new S.MathNode("mtd",[$0(r.body,e)]),Rr(),new S.MathNode("mtd",[$0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var Or={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Lr={"\\textbf":"textbf","\\textmd":"textmd"},Dl={"\\textit":"textit","\\textup":"textup"},Ir=(r,e)=>{var t=r.font;if(t){if(Or[t])return e.withTextFontFamily(Or[t]);if(Lr[t])return e.withTextFontWeight(Lr[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Dl[t])};D({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:t0(n),font:a}},htmlBuilder(r,e){var t=Ir(r,e),a=l0(r.body,t,!0);return y.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=Ir(r,e);return $0(r.body,t)}});D({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=U(r.body,e),a=y.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,l=y.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return y.makeSpan(["mord","underline"],[l],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("munder",[$(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});D({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=U(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return y.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new S.MathNode("mpadded",[$(r.body,e)],["vcenter"])}});D({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new A("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=Fr(r),a=[],n=e.havingStyle(e.style.text()),l=0;lr.body.replace(/ /g,r.star?"␣":" "),Y0=ga,$a=`[ \r - ]`,Bl="\\\\[a-zA-Z@]+",Nl="\\\\[^\uD800-\uDFFF]",El="("+Bl+")"+$a+"*",ql=`\\\\( -|[ \r ]+ -?)[ \r ]*`,Ct="[̀-ͯ]",Rl=new RegExp(Ct+"+$"),Ol="("+$a+"+)|"+(ql+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Ct+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Ct+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+El)+("|"+Nl+")");class Pr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Ol,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new x0("EOF",new p0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new A("Unexpected character: '"+e[t]+"'",new x0(e[t],new p0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var l=e.indexOf(` -`,this.tokenRegex.lastIndex);return l===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=l+1,this.lex()}return new x0(n,new p0(this,t,this.tokenRegex.lastIndex))}}class Ll{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new A("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var Il=La;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Hr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new A("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=Hr[e.text],a==null||a>=t)throw new A("Invalid base-"+t+" digit "+e.text);for(var n;(n=Hr[r.future().text])!=null&&n{var n=r.consumeArg().tokens;if(n.length!==1)throw new A("\\newcommand's first argument must be a macro name");var l=n[0].text,o=r.isDefined(l);if(o&&!e)throw new A("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!o&&!t)throw new A("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var h=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var c="",p=r.expandNextToken();p.text!=="]"&&p.text!=="EOF";)c+=p.text,p=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new A("Invalid number of arguments: "+c);h=parseInt(c),n=r.consumeArg().tokens}return o&&a||r.macros.set(l,{tokens:n,numArgs:h}),""};m("\\newcommand",r=>Wt(r,!1,!0,!1));m("\\renewcommand",r=>Wt(r,!0,!1,!1));m("\\providecommand",r=>Wt(r,!0,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),Y0[t],K.math[t],K.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");m("ℬ","\\mathscr{B}");m("ℰ","\\mathscr{E}");m("ℱ","\\mathscr{F}");m("ℋ","\\mathscr{H}");m("ℐ","\\mathscr{I}");m("ℒ","\\mathscr{L}");m("ℳ","\\mathscr{M}");m("ℛ","\\mathscr{R}");m("ℭ","\\mathfrak{C}");m("ℌ","\\mathfrak{H}");m("ℨ","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("·","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");m("\\ne","\\neq");m("≠","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");m("∉","\\notin");m("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");m("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");m("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");m("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");m("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");m("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");m("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");m("⟂","\\perp");m("‼","\\mathclose{!\\mkern-0.8mu!}");m("∌","\\notni");m("⌜","\\ulcorner");m("⌝","\\urcorner");m("⌞","\\llcorner");m("⌟","\\lrcorner");m("©","\\copyright");m("®","\\textregistered");m("️","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");m("⋮","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");m("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");m("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Vr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in Vr?e=Vr[t]:(t.slice(0,4)==="\\not"||t in K.math&&q.contains(["bin","rel"],K.math[t].group))&&(e="\\dotsb"),e});var Xt={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Xt?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Xt&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Xt?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new A("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ja=T(q0["Main-Regular"][84][1]-.7*q0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ja+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ja+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("∷","\\dblcolon");m("∹","\\eqcolon");m("≔","\\coloneqq");m("≕","\\eqqcolon");m("⩴","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");m("\\nleqq","\\html@mathml{\\@nleqq}{≰}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");m("\\imath","\\html@mathml{\\@imath}{ı}");m("\\jmath","\\html@mathml{\\@jmath}{ȷ}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");m("⟦","\\llbracket");m("⟧","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");m("⦃","\\lBrace");m("⦄","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");m("⦵","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var Ka=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,l=e.consumeArg().tokens,o=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=b=>x=>{r&&(x.macros.set("|",o),n.length&&x.macros.set("\\|",h));var w=b;if(!b&&n.length){var M=x.future();M.text==="|"&&(x.popToken(),w=!0)}return{tokens:w?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...l,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};m("\\bra@ket",Ka(!1));m("\\bra@set",Ka(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var Za={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Fl{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ll(Il,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new Pr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new x0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),l,o=0,h=0;do{if(l=this.popToken(),t.push(l),l.text==="{")++o;else if(l.text==="}"){if(--o,o===-1)throw new A("Extra }",l)}else if(l.text==="EOF")throw new A("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",l);if(e&&a)if((o===0||o===1&&e[h]==="{")&&l.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:l}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new A("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new A("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new A("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var l=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){l=l.slice();for(var h=l.length-1;h>=0;--h){var c=l[h];if(c.text==="#"){if(h===0)throw new A("Incomplete placeholder at end of macro body",c);if(c=l[--h],c.text==="#")l.splice(h+1,1);else if(/^[1-9]$/.test(c.text))l.splice(h,2,...o[+c.text-1]);else throw new A("Not a valid argument number",c)}}}return this.pushTokens(l),l.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new x0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var l=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(l+1))!==-1;)++l;for(var h=new Pr(n,this.settings),c=[],p=h.lex();p.text!=="EOF";)c.push(p),p=h.lex();c.reverse();var g={tokens:c,numArgs:l};return g}return n}isDefined(e){return this.macros.has(e)||Y0.hasOwnProperty(e)||K.math.hasOwnProperty(e)||K.text.hasOwnProperty(e)||Za.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Y0.hasOwnProperty(e)&&!Y0[e].primitive}}var Ur=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Oe=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),gt={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Gr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ke{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Fl(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new A("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new x0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(Ke.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&Y0[n.text]&&Y0[n.text].infix)break;var l=this.parseAtom(t);if(l){if(l.type==="internal")continue}else break;a.push(l)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=K[this.mode][t].group,c=p0.range(e),p;if(z1.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:h,mode:this.mode,loc:c,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(ia(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:p0.range(e),text:t};else return null;if(this.consume(),l)for(var b=0;bf&&(f=l):l&&(f!==void 0&&f>-1&&c.push(` +`.repeat(f)||" "),f=-1,c.push(l))}return c.join("")}function R(e,t,n){return e.type==="element"?we(e,t,n):e.type==="text"?n.whitespace==="normal"?_(e,n):Ne(e):[]}function we(e,t,n){const r=H(e,n),o=e.children||[];let i=-1,s=[];if(ge(e))return s;let a,c;for(N(e)||L(e)&&I(t,e,L)?c=` +`:me(e)?(a=2,c=2):G(e)&&(a=1,c=1);++i:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\!overflow-hidden{overflow:hidden!important}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-400{border-color:var(--color-blue-400)}.border-border\/40{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,var(--border)40%,transparent)}}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-green-400{border-color:var(--color-green-400)}.border-input{border-color:var(--input)}.border-muted-foreground\/25{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/25{border-color:color-mix(in oklab,var(--muted-foreground)25%,transparent)}}.border-muted-foreground\/50{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/50{border-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}.border-primary{border-color:var(--primary)}.border-red-400{border-color:var(--color-red-400)}.border-transparent{border-color:#0000}.border-yellow-400{border-color:var(--color-yellow-400)}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.\!bg-background{background-color:var(--background)!important}.\!bg-emerald-400{background-color:var(--color-emerald-400)!important}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background,.bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}}.bg-background\/95{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/95{background-color:color-mix(in oklab,var(--background)95%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-border{background-color:var(--border)}.bg-card,.bg-card\/95{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/95{background-color:color-mix(in oklab,var(--card)95%,transparent)}}.bg-destructive,.bg-destructive\/15{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/15{background-color:color-mix(in oklab,var(--destructive)15%,transparent)}}.bg-foreground\/10{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/10{background-color:color-mix(in oklab,var(--foreground)10%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted)50%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-foreground\/60{background-color:var(--primary-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-primary-foreground\/60{background-color:color-mix(in oklab,var(--primary-foreground)60%,transparent)}}.bg-primary\/5{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,var(--primary)5%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-50{--tw-gradient-from:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-100{--tw-gradient-to:var(--color-teal-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-cover{object-fit:cover}.\!p-0{padding:calc(var(--spacing)*0)!important}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-16{padding:calc(var(--spacing)*16)}.p-\[1px\]{padding:1px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-zinc-50{color:var(--color-zinc-50)!important}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-700{color:var(--color-emerald-700)}.text-foreground,.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground)80%,transparent)}}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground,.text-muted-foreground\/70{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground)70%,transparent)}}.text-orange-500{color:var(--color-orange-500)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-primary\/60{color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.text-primary\/60{color:color-mix(in oklab,var(--primary)60%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-violet-700{color:var(--color-violet-700)}.text-yellow-600{color:var(--color-yellow-600)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-800{color:var(--color-zinc-800)}.lowercase{text-transform:lowercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(34\,197\,94\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#22c55e66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(239\,68\,68\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#ef444466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_-1px_0_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:inset 0 -1px 0 var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-2000{animation-duration:2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.fade-in-0{--tw-enter-opacity:0}.running{animation-play-state:running}.zoom-in-95{--tw-enter-scale:.95}@media (hover:hover){.group-hover\:visible:is(:where(.group):hover *){visibility:visible}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:w-fit:hover{width:fit-content}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-background\/60:hover{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,var(--background)60%,transparent)}}.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive)80%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-muted:hover,.hover\:bg-muted\/25:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/25:hover{background-color:color-mix(in oklab,var(--muted)25%,transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted)50%,transparent)}}.hover\:bg-primary\/5:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,var(--primary)5%,transparent)}}.hover\:bg-primary\/20:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--primary)20%,transparent)}}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-zinc-300:hover{background-color:var(--color-zinc-300)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-0:focus{outline-style:var(--tw-outline-style);outline-width:0}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:relative:focus-visible{position:relative}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:right-0:active{right:calc(var(--spacing)*0)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-.5rem}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:.5rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-.5rem}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:.5rem}.data-\[state\=active\]\:visible[data-state=active]{visibility:visible}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:bg-muted[data-state=checked]{background-color:var(--muted)}.data-\[state\=checked\]\:text-muted-foreground[data-state=checked]{color:var(--muted-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=inactive\]\:invisible[data-state=inactive]{visibility:hidden}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}.supports-\[backdrop-filter\]\:bg-card\/75{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.supports-\[backdrop-filter\]\:bg-card\/75{background-color:color-mix(in oklab,var(--card)75%,transparent)}}}@media (min-width:40rem){.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-\[800px\]{max-width:800px}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-5{padding-inline:calc(var(--spacing)*5)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:inline-block{display:inline-block}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-blue-600:is(.dark *){border-color:var(--color-blue-600)}.dark\:border-destructive:is(.dark *){border-color:var(--destructive)}.dark\:border-gray-500:is(.dark *){border-color:var(--color-gray-500)}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-700:is(.dark *){border-color:var(--color-gray-700)}.dark\:border-green-600:is(.dark *){border-color:var(--color-green-600)}.dark\:border-red-600:is(.dark *){border-color:var(--color-red-600)}.dark\:border-yellow-600:is(.dark *){border-color:var(--color-yellow-600)}.dark\:bg-amber-900:is(.dark *){background-color:var(--color-amber-900)}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1e29394d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-800\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-green-900\/30:is(.dark *){background-color:#0d542b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}}.dark\:bg-red-900\/30:is(.dark *){background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.dark\:bg-red-950:is(.dark *){background-color:var(--color-red-950)}.dark\:bg-yellow-900\/30:is(.dark *){background-color:#733e0a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)30%,transparent)}}.dark\:bg-zinc-700:is(.dark *){background-color:var(--color-zinc-700)}.dark\:from-gray-900:is(.dark *){--tw-gradient-from:var(--color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\:to-gray-800:is(.dark *){--tw-gradient-to:var(--color-gray-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-zinc-200:is(.dark *){color:var(--color-zinc-200)}@media (hover:hover){.dark\:hover\:bg-gray-700:is(.dark *):hover{background-color:var(--color-gray-700)}.dark\:hover\:bg-gray-800:is(.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-zinc-600:is(.dark *):hover{background-color:var(--color-zinc-600)}}.\[\&_\.katex\]\:text-current .katex{color:currentColor}.\[\&_\.katex-display\]\:my-4 .katex-display{margin-block:calc(var(--spacing)*4)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-inner-spin-button\]\:opacity-50::-webkit-inner-spin-button{opacity:.5}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:opacity-50::-webkit-outer-spin-button{opacity:.5}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing)*0)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing)*4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing)*4)}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing)*7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}:root{--background:#fff;--foreground:#09090b;--card:#fff;--card-foreground:#09090b;--popover:#fff;--popover-foreground:#09090b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#18181b;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#18181b;--destructive:#ef4444;--destructive-foreground:#fafafa;--border:#e4e4e7;--input:#e4e4e7;--ring:#09090b;--chart-1:#e76e50;--chart-2:#2a9d90;--chart-3:#274754;--chart-4:#e8c468;--chart-5:#f4a462;--radius:.6rem;--sidebar-background:#fafafa;--sidebar-foreground:#3f3f46;--sidebar-primary:#18181b;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f4f4f5;--sidebar-accent-foreground:#18181b;--sidebar-border:#e5e7eb;--sidebar-ring:#3b82f6}.dark{--background:#09090b;--foreground:#fafafa;--card:#09090b;--card-foreground:#fafafa;--popover:#09090b;--popover-foreground:#fafafa;--primary:#fafafa;--primary-foreground:#18181b;--secondary:#27272a;--secondary-foreground:#fafafa;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#fafafa;--destructive:#7f1d1d;--destructive-foreground:#fafafa;--border:#27272a;--input:#27272a;--ring:#d4d4d8;--chart-1:#2662d9;--chart-2:#2eb88a;--chart-3:#e88c30;--chart-4:#af57db;--chart-5:#e23670;--sidebar-background:#18181b;--sidebar-foreground:#f4f4f5;--sidebar-primary:#1d4ed8;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#f4f4f5;--sidebar-border:#27272a;--sidebar-ring:#3b82f6}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.dark ::-webkit-scrollbar-thumb{background-color:#e6e6e6}.dark ::-webkit-scrollbar-track{background-color:#000}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/lightrag/api/webui/assets/index-DYCpH32b.js b/lightrag/api/webui/assets/index-DYCpH32b.js new file mode 100644 index 00000000..c043a0e8 --- /dev/null +++ b/lightrag/api/webui/assets/index-DYCpH32b.js @@ -0,0 +1,151 @@ +import{j as o,Z as hd,O as Ag,k as Dg,u as gd,$ as Ng,c as Mg,l as Eg,h as zg,b as Og,T as Cg,n as Rg,m as pd,o as jg,p as _g,a0 as yd,a1 as vd,a2 as bd,a3 as Ug}from"./ui-vendor-DaJTMqwy.js";import{f as Bg,h as qg,r as E,u as Sd,H as Lg,i as Hg,j as ud}from"./react-vendor-CgPb4pW_.js";import{z as Ve,c as we,ac as Td,u as Ul,y as Ot,ad as xd,ae as Ad,I as cs,B as xn,D as Gg,i as Yg,j as Kg,k as Xg,l as Qg,af as Vg,ag as wg,ah as Zg,ai as kg,aj as _l,ak as Dd,al as rs,am as ss,W as Jg,Y as Fg,Z as Pg,_ as $g,an as Wg,ao as Ig,ap as Nd,aq as ep,ar as lp,as as Md,at as tp,au as Ed,C as ap,J as np,K as up,d as bn,av as ip,aw as cp,ax as sp}from"./feature-graph-D68hhnYC.js";import{S as id,a as cd,b as sd,c as od,d as ot,R as op}from"./feature-retrieval-D7g3nMgj.js";import{D as rp}from"./feature-documents-C5UJveNV.js";import{i as os}from"./utils-vendor-elCzPYZl.js";import"./graph-vendor-BC3frDkq.js";import"./mermaid-vendor-DOoA-Fcm.js";import"./markdown-vendor-7kCcHxQn.js";(function(){const v=document.createElement("link").relList;if(v&&v.supports&&v.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))f(M);new MutationObserver(M=>{for(const O of M)if(O.type==="childList")for(const q of O.addedNodes)q.tagName==="LINK"&&q.rel==="modulepreload"&&f(q)}).observe(document,{childList:!0,subtree:!0});function A(M){const O={};return M.integrity&&(O.integrity=M.integrity),M.referrerPolicy&&(O.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?O.credentials="include":M.crossOrigin==="anonymous"?O.credentials="omit":O.credentials="same-origin",O}function f(M){if(M.ep)return;M.ep=!0;const O=A(M);fetch(M.href,O)}})();var ns={exports:{}},Sn={},us={exports:{}},is={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var rd;function fp(){return rd||(rd=1,function(h){function v(T,D){var U=T.length;T.push(D);e:for(;0>>1,ae=T[te];if(0>>1;teM(J,U))yeM(ol,J)?(T[te]=ol,T[ye]=U,te=ye):(T[te]=J,T[ie]=U,te=ie);else if(yeM(ol,U))T[te]=ol,T[ye]=U,te=ye;else break e}}return D}function M(T,D){var U=T.sortIndex-D.sortIndex;return U!==0?U:T.id-D.id}if(h.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var O=performance;h.unstable_now=function(){return O.now()}}else{var q=Date,ne=q.now();h.unstable_now=function(){return q.now()-ne}}var w=[],W=[],B=1,he=null,K=3,Oe=!1,ee=!1,C=!1,cl=!1,ba=typeof setTimeout=="function"?setTimeout:null,ql=typeof clearTimeout=="function"?clearTimeout:null,Ze=typeof setImmediate<"u"?setImmediate:null;function Ll(T){for(var D=A(W);D!==null;){if(D.callback===null)f(W);else if(D.startTime<=T)f(W),D.sortIndex=D.expirationTime,v(w,D);else break;D=A(W)}}function rt(T){if(C=!1,Ll(T),!ee)if(A(w)!==null)ee=!0,sl||(sl=!0,ke());else{var D=A(W);D!==null&&yl(rt,D.startTime-T)}}var sl=!1,pl=-1,al=5,Ct=-1;function An(){return cl?!0:!(h.unstable_now()-CtT&&An());){var te=he.callback;if(typeof te=="function"){he.callback=null,K=he.priorityLevel;var ae=te(he.expirationTime<=T);if(T=h.unstable_now(),typeof ae=="function"){he.callback=ae,Ll(T),D=!0;break l}he===A(w)&&f(w),Ll(T)}else f(w);he=A(w)}if(he!==null)D=!0;else{var Ee=A(W);Ee!==null&&yl(rt,Ee.startTime-T),D=!1}}break e}finally{he=null,K=U,Oe=!1}D=void 0}}finally{D?ke():sl=!1}}}var ke;if(typeof Ze=="function")ke=function(){Ze(Rt)};else if(typeof MessageChannel<"u"){var Dn=new MessageChannel,Sa=Dn.port2;Dn.port1.onmessage=Rt,ke=function(){Sa.postMessage(null)}}else ke=function(){ba(Rt,0)};function yl(T,D){pl=ba(function(){T(h.unstable_now())},D)}h.unstable_IdlePriority=5,h.unstable_ImmediatePriority=1,h.unstable_LowPriority=4,h.unstable_NormalPriority=3,h.unstable_Profiling=null,h.unstable_UserBlockingPriority=2,h.unstable_cancelCallback=function(T){T.callback=null},h.unstable_forceFrameRate=function(T){0>T||125te?(T.sortIndex=U,v(W,T),A(w)===null&&T===A(W)&&(C?(ql(pl),pl=-1):C=!0,yl(rt,U-te))):(T.sortIndex=ae,v(w,T),ee||Oe||(ee=!0,sl||(sl=!0,ke()))),T},h.unstable_shouldYield=An,h.unstable_wrapCallback=function(T){var D=K;return function(){var U=K;K=D;try{return T.apply(this,arguments)}finally{K=U}}}}(is)),is}var fd;function dp(){return fd||(fd=1,us.exports=fp()),us.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var dd;function mp(){if(dd)return Sn;dd=1;var h=dp(),v=Bg(),A=qg();function f(e){var l="https://react.dev/errors/"+e;if(1ae||(e.current=te[ae],te[ae]=null,ae--)}function J(e,l){ae++,te[ae]=e.current,e.current=l}var ye=Ee(null),ol=Ee(null),Hl=Ee(null),Nn=Ee(null);function Mn(e,l){switch(J(Hl,l),J(ol,e),J(ye,null),l.nodeType){case 9:case 11:e=(e=l.documentElement)&&(e=e.namespaceURI)?_f(e):0;break;default:if(e=l.tagName,l=l.namespaceURI)l=_f(l),e=Uf(l,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ie(ye),J(ye,e)}function jt(){ie(ye),ie(ol),ie(Hl)}function Qu(e){e.memoizedState!==null&&J(Nn,e);var l=ye.current,t=Uf(l,e.type);l!==t&&(J(ol,e),J(ye,t))}function En(e){ol.current===e&&(ie(ye),ie(ol)),Nn.current===e&&(ie(Nn),hn._currentValue=U)}var Vu=Object.prototype.hasOwnProperty,wu=h.unstable_scheduleCallback,Zu=h.unstable_cancelCallback,lm=h.unstable_shouldYield,tm=h.unstable_requestPaint,rl=h.unstable_now,am=h.unstable_getCurrentPriorityLevel,fs=h.unstable_ImmediatePriority,ds=h.unstable_UserBlockingPriority,zn=h.unstable_NormalPriority,nm=h.unstable_LowPriority,ms=h.unstable_IdlePriority,um=h.log,im=h.unstable_setDisableYieldValue,Ta=null,Be=null;function Gl(e){if(typeof um=="function"&&im(e),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(Ta,e)}catch{}}var qe=Math.clz32?Math.clz32:om,cm=Math.log,sm=Math.LN2;function om(e){return e>>>=0,e===0?32:31-(cm(e)/sm|0)|0}var On=256,Cn=4194304;function ft(e){var l=e&42;if(l!==0)return l;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Rn(e,l,t){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var c=a&134217727;return c!==0?(a=c&~u,a!==0?n=ft(a):(i&=c,i!==0?n=ft(i):t||(t=c&~e,t!==0&&(n=ft(t))))):(c=a&~u,c!==0?n=ft(c):i!==0?n=ft(i):t||(t=a&~e,t!==0&&(n=ft(t)))),n===0?0:l!==0&&l!==n&&(l&u)===0&&(u=n&-n,t=l&-l,u>=t||u===32&&(t&4194048)!==0)?l:n}function xa(e,l){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&l)===0}function rm(e,l){switch(e){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hs(){var e=On;return On<<=1,(On&4194048)===0&&(On=256),e}function gs(){var e=Cn;return Cn<<=1,(Cn&62914560)===0&&(Cn=4194304),e}function ku(e){for(var l=[],t=0;31>t;t++)l.push(e);return l}function Aa(e,l){e.pendingLanes|=l,l!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fm(e,l,t,a,n,u){var i=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var c=e.entanglements,s=e.expirationTimes,g=e.hiddenUpdates;for(t=i&~t;0)":-1n||s[a]!==g[n]){var b=` +`+s[a].replace(" at new "," at ");return e.displayName&&b.includes("")&&(b=b.replace("",e.displayName)),b}while(1<=a&&0<=n);break}}}finally{Iu=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?Ht(t):""}function ym(e){switch(e.tag){case 26:case 27:case 5:return Ht(e.type);case 16:return Ht("Lazy");case 13:return Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return ei(e.type,!1);case 11:return ei(e.type.render,!1);case 1:return ei(e.type,!0);case 31:return Ht("Activity");default:return""}}function Ns(e){try{var l="";do l+=ym(e),e=e.return;while(e);return l}catch(t){return` +Error generating stack: `+t.message+` +`+t.stack}}function Je(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ms(e){var l=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function vm(e){var l=Ms(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,l),a=""+e[l];if(!e.hasOwnProperty(l)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var n=t.get,u=t.set;return Object.defineProperty(e,l,{configurable:!0,get:function(){return n.call(this)},set:function(i){a=""+i,u.call(this,i)}}),Object.defineProperty(e,l,{enumerable:t.enumerable}),{getValue:function(){return a},setValue:function(i){a=""+i},stopTracking:function(){e._valueTracker=null,delete e[l]}}}}function Un(e){e._valueTracker||(e._valueTracker=vm(e))}function Es(e){if(!e)return!1;var l=e._valueTracker;if(!l)return!0;var t=l.getValue(),a="";return e&&(a=Ms(e)?e.checked?"true":"false":e.value),e=a,e!==t?(l.setValue(e),!0):!1}function Bn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var bm=/[\n"\\]/g;function Fe(e){return e.replace(bm,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function li(e,l,t,a,n,u,i,c){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),l!=null?i==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+Je(l)):e.value!==""+Je(l)&&(e.value=""+Je(l)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),l!=null?ti(e,i,Je(l)):t!=null?ti(e,i,Je(t)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.name=""+Je(c):e.removeAttribute("name")}function zs(e,l,t,a,n,u,i,c){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),l!=null||t!=null){if(!(u!=="submit"&&u!=="reset"||l!=null))return;t=t!=null?""+Je(t):"",l=l!=null?""+Je(l):t,c||l===e.value||(e.value=l),e.defaultValue=l}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=c?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i)}function ti(e,l,t){l==="number"&&Bn(e.ownerDocument)===e||e.defaultValue===""+t||(e.defaultValue=""+t)}function Gt(e,l,t,a){if(e=e.options,l){l={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ci=!1;if(bl)try{var Ea={};Object.defineProperty(Ea,"passive",{get:function(){ci=!0}}),window.addEventListener("test",Ea,Ea),window.removeEventListener("test",Ea,Ea)}catch{ci=!1}var Kl=null,si=null,Ln=null;function Bs(){if(Ln)return Ln;var e,l=si,t=l.length,a,n="value"in Kl?Kl.value:Kl.textContent,u=n.length;for(e=0;e=Ca),Ks=" ",Xs=!1;function Qs(e,l){switch(e){case"keyup":return km.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qt=!1;function Fm(e,l){switch(e){case"compositionend":return Vs(l);case"keypress":return l.which!==32?null:(Xs=!0,Ks);case"textInput":return e=l.data,e===Ks&&Xs?null:e;default:return null}}function Pm(e,l){if(Qt)return e==="compositionend"||!mi&&Qs(e,l)?(e=Bs(),Ln=si=Kl=null,Qt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:t,offset:l-e};e=a}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Ws(t)}}function eo(e,l){return e&&l?e===l?!0:e&&e.nodeType===3?!1:l&&l.nodeType===3?eo(e,l.parentNode):"contains"in e?e.contains(l):e.compareDocumentPosition?!!(e.compareDocumentPosition(l)&16):!1:!1}function lo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var l=Bn(e.document);l instanceof e.HTMLIFrameElement;){try{var t=typeof l.contentWindow.location.href=="string"}catch{t=!1}if(t)e=l.contentWindow;else break;l=Bn(e.document)}return l}function pi(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l&&(l==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||l==="textarea"||e.contentEditable==="true")}var nh=bl&&"documentMode"in document&&11>=document.documentMode,Vt=null,yi=null,Ua=null,vi=!1;function to(e,l,t){var a=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;vi||Vt==null||Vt!==Bn(a)||(a=Vt,"selectionStart"in a&&pi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ua&&_a(Ua,a)||(Ua=a,a=Eu(yi,"onSelect"),0>=i,n-=i,Tl=1<<32-qe(l)+n|t<u?u:8;var i=T.T,c={};T.T=c,ac(e,!1,l,t);try{var s=n(),g=T.S;if(g!==null&&g(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var b=mh(s,a);Fa(e,l,b,Xe(e))}else Fa(e,l,a,Xe(e))}catch(x){Fa(e,l,{then:function(){},status:"rejected",reason:x},Xe())}finally{D.p=u,T.T=i}}function vh(){}function lc(e,l,t,a){if(e.tag!==5)throw Error(f(476));var n=nr(e).queue;ar(e,n,l,U,t===null?vh:function(){return ur(e),t(a)})}function nr(e){var l=e.memoizedState;if(l!==null)return l;l={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nl,lastRenderedState:U},next:null};var t={};return l.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nl,lastRenderedState:t},next:null},e.memoizedState=l,e=e.alternate,e!==null&&(e.memoizedState=l),l}function ur(e){var l=nr(e).next.queue;Fa(e,l,{},Xe())}function tc(){return Me(hn)}function ir(){return me().memoizedState}function cr(){return me().memoizedState}function bh(e){for(var l=e.return;l!==null;){switch(l.tag){case 24:case 3:var t=Xe();e=Vl(t);var a=wl(l,e,t);a!==null&&(Qe(a,l,t),Qa(a,l,t)),l={cache:ji()},e.payload=l;return}l=l.return}}function Sh(e,l,t){var a=Xe();t={lane:a,revertLane:0,action:t,hasEagerState:!1,eagerState:null,next:null},cu(e)?or(l,t):(t=xi(e,l,t,a),t!==null&&(Qe(t,e,a),rr(t,l,a)))}function sr(e,l,t){var a=Xe();Fa(e,l,t,a)}function Fa(e,l,t,a){var n={lane:a,revertLane:0,action:t,hasEagerState:!1,eagerState:null,next:null};if(cu(e))or(l,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=l.lastRenderedReducer,u!==null))try{var i=l.lastRenderedState,c=u(i,t);if(n.hasEagerState=!0,n.eagerState=c,Le(c,i))return Vn(e,l,n,0),le===null&&Qn(),!1}catch{}finally{}if(t=xi(e,l,n,a),t!==null)return Qe(t,e,a),rr(t,l,a),!0}return!1}function ac(e,l,t,a){if(a={lane:2,revertLane:Bc(),action:a,hasEagerState:!1,eagerState:null,next:null},cu(e)){if(l)throw Error(f(479))}else l=xi(e,t,a,2),l!==null&&Qe(l,e,2)}function cu(e){var l=e.alternate;return e===L||l!==null&&l===L}function or(e,l){ea=lu=!0;var t=e.pending;t===null?l.next=l:(l.next=t.next,t.next=l),e.pending=l}function rr(e,l,t){if((t&4194048)!==0){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,ys(e,t)}}var su={readContext:Me,use:au,useCallback:re,useContext:re,useEffect:re,useImperativeHandle:re,useLayoutEffect:re,useInsertionEffect:re,useMemo:re,useReducer:re,useRef:re,useState:re,useDebugValue:re,useDeferredValue:re,useTransition:re,useSyncExternalStore:re,useId:re,useHostTransitionStatus:re,useFormState:re,useActionState:re,useOptimistic:re,useMemoCache:re,useCacheRefresh:re},fr={readContext:Me,use:au,useCallback:function(e,l){return je().memoizedState=[e,l===void 0?null:l],e},useContext:Me,useEffect:Jo,useImperativeHandle:function(e,l,t){t=t!=null?t.concat([e]):null,iu(4194308,4,Wo.bind(null,l,e),t)},useLayoutEffect:function(e,l){return iu(4194308,4,e,l)},useInsertionEffect:function(e,l){iu(4,2,e,l)},useMemo:function(e,l){var t=je();l=l===void 0?null:l;var a=e();if(Dt){Gl(!0);try{e()}finally{Gl(!1)}}return t.memoizedState=[a,l],a},useReducer:function(e,l,t){var a=je();if(t!==void 0){var n=t(l);if(Dt){Gl(!0);try{t(l)}finally{Gl(!1)}}}else n=l;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Sh.bind(null,L,e),[a.memoizedState,e]},useRef:function(e){var l=je();return e={current:e},l.memoizedState=e},useState:function(e){e=$i(e);var l=e.queue,t=sr.bind(null,L,l);return l.dispatch=t,[e.memoizedState,t]},useDebugValue:Ii,useDeferredValue:function(e,l){var t=je();return ec(t,e,l)},useTransition:function(){var e=$i(!1);return e=ar.bind(null,L,e.queue,!0,!1),je().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,l,t){var a=L,n=je();if(V){if(t===void 0)throw Error(f(407));t=t()}else{if(t=l(),le===null)throw Error(f(349));(X&124)!==0||jo(a,l,t)}n.memoizedState=t;var u={value:t,getSnapshot:l};return n.queue=u,Jo(Uo.bind(null,a,u,e),[e]),a.flags|=2048,ta(9,uu(),_o.bind(null,a,u,t,l),null),t},useId:function(){var e=je(),l=le.identifierPrefix;if(V){var t=xl,a=Tl;t=(a&~(1<<32-qe(a)-1)).toString(32)+t,l="«"+l+"R"+t,t=tu++,0j?(Te=z,z=null):Te=z.sibling;var Q=p(d,z,m[j],S);if(Q===null){z===null&&(z=Te);break}e&&z&&Q.alternate===null&&l(d,z),r=u(Q,r,j),H===null?N=Q:H.sibling=Q,H=Q,z=Te}if(j===m.length)return t(d,z),V&&vt(d,j),N;if(z===null){for(;jj?(Te=z,z=null):Te=z.sibling;var st=p(d,z,Q.value,S);if(st===null){z===null&&(z=Te);break}e&&z&&st.alternate===null&&l(d,z),r=u(st,r,j),H===null?N=st:H.sibling=st,H=st,z=Te}if(Q.done)return t(d,z),V&&vt(d,j),N;if(z===null){for(;!Q.done;j++,Q=m.next())Q=x(d,Q.value,S),Q!==null&&(r=u(Q,r,j),H===null?N=Q:H.sibling=Q,H=Q);return V&&vt(d,j),N}for(z=a(z);!Q.done;j++,Q=m.next())Q=y(z,d,j,Q.value,S),Q!==null&&(e&&Q.alternate!==null&&z.delete(Q.key===null?j:Q.key),r=u(Q,r,j),H===null?N=Q:H.sibling=Q,H=Q);return e&&z.forEach(function(xg){return l(d,xg)}),V&&vt(d,j),N}function $(d,r,m,S){if(typeof m=="object"&&m!==null&&m.type===ee&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case K:e:{for(var N=m.key;r!==null;){if(r.key===N){if(N=m.type,N===ee){if(r.tag===7){t(d,r.sibling),S=n(r,m.props.children),S.return=d,d=S;break e}}else if(r.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===al&&mr(N)===r.type){t(d,r.sibling),S=n(r,m.props),$a(S,m),S.return=d,d=S;break e}t(d,r);break}else l(d,r);r=r.sibling}m.type===ee?(S=pt(m.props.children,d.mode,S,m.key),S.return=d,d=S):(S=Zn(m.type,m.key,m.props,null,d.mode,S),$a(S,m),S.return=d,d=S)}return i(d);case Oe:e:{for(N=m.key;r!==null;){if(r.key===N)if(r.tag===4&&r.stateNode.containerInfo===m.containerInfo&&r.stateNode.implementation===m.implementation){t(d,r.sibling),S=n(r,m.children||[]),S.return=d,d=S;break e}else{t(d,r);break}else l(d,r);r=r.sibling}S=Ni(m,d.mode,S),S.return=d,d=S}return i(d);case al:return N=m._init,m=N(m._payload),$(d,r,m,S)}if(yl(m))return _(d,r,m,S);if(ke(m)){if(N=ke(m),typeof N!="function")throw Error(f(150));return m=N.call(m),R(d,r,m,S)}if(typeof m.then=="function")return $(d,r,ou(m),S);if(m.$$typeof===Ze)return $(d,r,Pn(d,m),S);ru(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,r!==null&&r.tag===6?(t(d,r.sibling),S=n(r,m),S.return=d,d=S):(t(d,r),S=Di(m,d.mode,S),S.return=d,d=S),i(d)):t(d,r)}return function(d,r,m,S){try{Pa=0;var N=$(d,r,m,S);return aa=null,N}catch(z){if(z===Ka||z===Wn)throw z;var H=He(29,z,null,d.mode);return H.lanes=S,H.return=d,H}finally{}}}var na=hr(!0),gr=hr(!1),el=Ee(null),dl=null;function kl(e){var l=e.alternate;J(pe,pe.current&1),J(el,e),dl===null&&(l===null||It.current!==null||l.memoizedState!==null)&&(dl=e)}function pr(e){if(e.tag===22){if(J(pe,pe.current),J(el,e),dl===null){var l=e.alternate;l!==null&&l.memoizedState!==null&&(dl=e)}}else Jl()}function Jl(){J(pe,pe.current),J(el,el.current)}function Ml(e){ie(el),dl===e&&(dl=null),ie(pe)}var pe=Ee(0);function fu(e){for(var l=e;l!==null;){if(l.tag===13){var t=l.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||kc(t)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function nc(e,l,t,a){l=e.memoizedState,t=t(a,l),t=t==null?l:B({},l,t),e.memoizedState=t,e.lanes===0&&(e.updateQueue.baseState=t)}var uc={enqueueSetState:function(e,l,t){e=e._reactInternals;var a=Xe(),n=Vl(a);n.payload=l,t!=null&&(n.callback=t),l=wl(e,n,a),l!==null&&(Qe(l,e,a),Qa(l,e,a))},enqueueReplaceState:function(e,l,t){e=e._reactInternals;var a=Xe(),n=Vl(a);n.tag=1,n.payload=l,t!=null&&(n.callback=t),l=wl(e,n,a),l!==null&&(Qe(l,e,a),Qa(l,e,a))},enqueueForceUpdate:function(e,l){e=e._reactInternals;var t=Xe(),a=Vl(t);a.tag=2,l!=null&&(a.callback=l),l=wl(e,a,t),l!==null&&(Qe(l,e,t),Qa(l,e,t))}};function yr(e,l,t,a,n,u,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,i):l.prototype&&l.prototype.isPureReactComponent?!_a(t,a)||!_a(n,u):!0}function vr(e,l,t,a){e=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(t,a),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(t,a),l.state!==e&&uc.enqueueReplaceState(l,l.state,null)}function Nt(e,l){var t=l;if("ref"in l){t={};for(var a in l)a!=="ref"&&(t[a]=l[a])}if(e=e.defaultProps){t===l&&(t=B({},t));for(var n in e)t[n]===void 0&&(t[n]=e[n])}return t}var du=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function br(e){du(e)}function Sr(e){console.error(e)}function Tr(e){du(e)}function mu(e,l){try{var t=e.onUncaughtError;t(l.value,{componentStack:l.stack})}catch(a){setTimeout(function(){throw a})}}function xr(e,l,t){try{var a=e.onCaughtError;a(t.value,{componentStack:t.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function ic(e,l,t){return t=Vl(t),t.tag=3,t.payload={element:null},t.callback=function(){mu(e,l)},t}function Ar(e){return e=Vl(e),e.tag=3,e}function Dr(e,l,t,a){var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;e.payload=function(){return n(u)},e.callback=function(){xr(l,t,a)}}var i=t.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){xr(l,t,a),typeof n!="function"&&(et===null?et=new Set([this]):et.add(this));var c=a.stack;this.componentDidCatch(a.value,{componentStack:c!==null?c:""})})}function xh(e,l,t,a,n){if(t.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(l=t.alternate,l!==null&&Ha(l,t,n,!0),t=el.current,t!==null){switch(t.tag){case 13:return dl===null?Cc():t.alternate===null&&oe===0&&(oe=3),t.flags&=-257,t.flags|=65536,t.lanes=n,a===Bi?t.flags|=16384:(l=t.updateQueue,l===null?t.updateQueue=new Set([a]):l.add(a),jc(e,a,n)),!1;case 22:return t.flags|=65536,a===Bi?t.flags|=16384:(l=t.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([a])},t.updateQueue=l):(t=l.retryQueue,t===null?l.retryQueue=new Set([a]):t.add(a)),jc(e,a,n)),!1}throw Error(f(435,t.tag))}return jc(e,a,n),Cc(),!1}if(V)return l=el.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=n,a!==zi&&(e=Error(f(422),{cause:a}),La(Pe(e,t)))):(a!==zi&&(l=Error(f(423),{cause:a}),La(Pe(l,t))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Pe(a,t),n=ic(e.stateNode,a,n),Hi(e,n),oe!==4&&(oe=2)),!1;var u=Error(f(520),{cause:a});if(u=Pe(u,t),nn===null?nn=[u]:nn.push(u),oe!==4&&(oe=2),l===null)return!0;a=Pe(a,t),t=l;do{switch(t.tag){case 3:return t.flags|=65536,e=n&-n,t.lanes|=e,e=ic(t.stateNode,a,e),Hi(t,e),!1;case 1:if(l=t.type,u=t.stateNode,(t.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(et===null||!et.has(u))))return t.flags|=65536,n&=-n,t.lanes|=n,n=Ar(n),Dr(n,e,t,a),Hi(t,n),!1}t=t.return}while(t!==null);return!1}var Nr=Error(f(461)),be=!1;function xe(e,l,t,a){l.child=e===null?gr(l,null,t,a):na(l,e.child,t,a)}function Mr(e,l,t,a,n){t=t.render;var u=l.ref;if("ref"in a){var i={};for(var c in a)c!=="ref"&&(i[c]=a[c])}else i=a;return xt(l),a=Qi(e,l,t,i,u,n),c=Vi(),e!==null&&!be?(wi(e,l,n),El(e,l,n)):(V&&c&&Mi(l),l.flags|=1,xe(e,l,a,n),l.child)}function Er(e,l,t,a,n){if(e===null){var u=t.type;return typeof u=="function"&&!Ai(u)&&u.defaultProps===void 0&&t.compare===null?(l.tag=15,l.type=u,zr(e,l,u,a,n)):(e=Zn(t.type,null,a,l,l.mode,n),e.ref=l.ref,e.return=l,l.child=e)}if(u=e.child,!hc(e,n)){var i=u.memoizedProps;if(t=t.compare,t=t!==null?t:_a,t(i,a)&&e.ref===l.ref)return El(e,l,n)}return l.flags|=1,e=Sl(u,a),e.ref=l.ref,e.return=l,l.child=e}function zr(e,l,t,a,n){if(e!==null){var u=e.memoizedProps;if(_a(u,a)&&e.ref===l.ref)if(be=!1,l.pendingProps=a=u,hc(e,n))(e.flags&131072)!==0&&(be=!0);else return l.lanes=e.lanes,El(e,l,n)}return cc(e,l,t,a,n)}function Or(e,l,t){var a=l.pendingProps,n=a.children,u=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((l.flags&128)!==0){if(a=u!==null?u.baseLanes|t:t,e!==null){for(n=l.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;l.childLanes=u&~a}else l.childLanes=0,l.child=null;return Cr(e,l,a,t)}if((t&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},e!==null&&$n(l,u!==null?u.cachePool:null),u!==null?zo(l,u):Yi(),pr(l);else return l.lanes=l.childLanes=536870912,Cr(e,l,u!==null?u.baseLanes|t:t,t)}else u!==null?($n(l,u.cachePool),zo(l,u),Jl(),l.memoizedState=null):(e!==null&&$n(l,null),Yi(),Jl());return xe(e,l,n,t),l.child}function Cr(e,l,t,a){var n=Ui();return n=n===null?null:{parent:ge._currentValue,pool:n},l.memoizedState={baseLanes:t,cachePool:n},e!==null&&$n(l,null),Yi(),pr(l),e!==null&&Ha(e,l,a,!0),null}function hu(e,l){var t=l.ref;if(t===null)e!==null&&e.ref!==null&&(l.flags|=4194816);else{if(typeof t!="function"&&typeof t!="object")throw Error(f(284));(e===null||e.ref!==t)&&(l.flags|=4194816)}}function cc(e,l,t,a,n){return xt(l),t=Qi(e,l,t,a,void 0,n),a=Vi(),e!==null&&!be?(wi(e,l,n),El(e,l,n)):(V&&a&&Mi(l),l.flags|=1,xe(e,l,t,n),l.child)}function Rr(e,l,t,a,n,u){return xt(l),l.updateQueue=null,t=Co(l,a,t,n),Oo(e),a=Vi(),e!==null&&!be?(wi(e,l,u),El(e,l,u)):(V&&a&&Mi(l),l.flags|=1,xe(e,l,t,u),l.child)}function jr(e,l,t,a,n){if(xt(l),l.stateNode===null){var u=Jt,i=t.contextType;typeof i=="object"&&i!==null&&(u=Me(i)),u=new t(a,u),l.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=uc,l.stateNode=u,u._reactInternals=l,u=l.stateNode,u.props=a,u.state=l.memoizedState,u.refs={},qi(l),i=t.contextType,u.context=typeof i=="object"&&i!==null?Me(i):Jt,u.state=l.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(nc(l,t,i,a),u.state=l.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&uc.enqueueReplaceState(u,u.state,null),wa(l,a,u,n),Va(),u.state=l.memoizedState),typeof u.componentDidMount=="function"&&(l.flags|=4194308),a=!0}else if(e===null){u=l.stateNode;var c=l.memoizedProps,s=Nt(t,c);u.props=s;var g=u.context,b=t.contextType;i=Jt,typeof b=="object"&&b!==null&&(i=Me(b));var x=t.getDerivedStateFromProps;b=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function",c=l.pendingProps!==c,b||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c||g!==i)&&vr(l,u,a,i),Ql=!1;var p=l.memoizedState;u.state=p,wa(l,a,u,n),Va(),g=l.memoizedState,c||p!==g||Ql?(typeof x=="function"&&(nc(l,t,x,a),g=l.memoizedState),(s=Ql||yr(l,t,s,a,p,g,i))?(b||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(l.flags|=4194308)):(typeof u.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=a,l.memoizedState=g),u.props=a,u.state=g,u.context=i,a=s):(typeof u.componentDidMount=="function"&&(l.flags|=4194308),a=!1)}else{u=l.stateNode,Li(e,l),i=l.memoizedProps,b=Nt(t,i),u.props=b,x=l.pendingProps,p=u.context,g=t.contextType,s=Jt,typeof g=="object"&&g!==null&&(s=Me(g)),c=t.getDerivedStateFromProps,(g=typeof c=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==x||p!==s)&&vr(l,u,a,s),Ql=!1,p=l.memoizedState,u.state=p,wa(l,a,u,n),Va();var y=l.memoizedState;i!==x||p!==y||Ql||e!==null&&e.dependencies!==null&&Fn(e.dependencies)?(typeof c=="function"&&(nc(l,t,c,a),y=l.memoizedState),(b=Ql||yr(l,t,b,a,p,y,s)||e!==null&&e.dependencies!==null&&Fn(e.dependencies))?(g||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,y,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,y,s)),typeof u.componentDidUpdate=="function"&&(l.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=1024),l.memoizedProps=a,l.memoizedState=y),u.props=a,u.state=y,u.context=s,a=b):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=1024),a=!1)}return u=a,hu(e,l),a=(l.flags&128)!==0,u||a?(u=l.stateNode,t=a&&typeof t.getDerivedStateFromError!="function"?null:u.render(),l.flags|=1,e!==null&&a?(l.child=na(l,e.child,null,n),l.child=na(l,null,t,n)):xe(e,l,t,n),l.memoizedState=u.state,e=l.child):e=El(e,l,n),e}function _r(e,l,t,a){return qa(),l.flags|=256,xe(e,l,t,a),l.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oc(e){return{baseLanes:e,cachePool:So()}}function rc(e,l,t){return e=e!==null?e.childLanes&~t:0,l&&(e|=ll),e}function Ur(e,l,t){var a=l.pendingProps,n=!1,u=(l.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(pe.current&2)!==0),i&&(n=!0,l.flags&=-129),i=(l.flags&32)!==0,l.flags&=-33,e===null){if(V){if(n?kl(l):Jl(),V){var c=se,s;if(s=c){e:{for(s=c,c=fl;s.nodeType!==8;){if(!c){c=null;break e}if(s=il(s.nextSibling),s===null){c=null;break e}}c=s}c!==null?(l.memoizedState={dehydrated:c,treeContext:yt!==null?{id:Tl,overflow:xl}:null,retryLane:536870912,hydrationErrors:null},s=He(18,null,null,0),s.stateNode=c,s.return=l,l.child=s,ze=l,se=null,s=!0):s=!1}s||St(l)}if(c=l.memoizedState,c!==null&&(c=c.dehydrated,c!==null))return kc(c)?l.lanes=32:l.lanes=536870912,null;Ml(l)}return c=a.children,a=a.fallback,n?(Jl(),n=l.mode,c=gu({mode:"hidden",children:c},n),a=pt(a,n,t,null),c.return=l,a.return=l,c.sibling=a,l.child=c,n=l.child,n.memoizedState=oc(t),n.childLanes=rc(e,i,t),l.memoizedState=sc,a):(kl(l),fc(l,c))}if(s=e.memoizedState,s!==null&&(c=s.dehydrated,c!==null)){if(u)l.flags&256?(kl(l),l.flags&=-257,l=dc(e,l,t)):l.memoizedState!==null?(Jl(),l.child=e.child,l.flags|=128,l=null):(Jl(),n=a.fallback,c=l.mode,a=gu({mode:"visible",children:a.children},c),n=pt(n,c,t,null),n.flags|=2,a.return=l,n.return=l,a.sibling=n,l.child=a,na(l,e.child,null,t),a=l.child,a.memoizedState=oc(t),a.childLanes=rc(e,i,t),l.memoizedState=sc,l=n);else if(kl(l),kc(c)){if(i=c.nextSibling&&c.nextSibling.dataset,i)var g=i.dgst;i=g,a=Error(f(419)),a.stack="",a.digest=i,La({value:a,source:null,stack:null}),l=dc(e,l,t)}else if(be||Ha(e,l,t,!1),i=(t&e.childLanes)!==0,be||i){if(i=le,i!==null&&(a=t&-t,a=(a&42)!==0?1:Ju(a),a=(a&(i.suspendedLanes|t))!==0?0:a,a!==0&&a!==s.retryLane))throw s.retryLane=a,kt(e,a),Qe(i,e,a),Nr;c.data==="$?"||Cc(),l=dc(e,l,t)}else c.data==="$?"?(l.flags|=192,l.child=e.child,l=null):(e=s.treeContext,se=il(c.nextSibling),ze=l,V=!0,bt=null,fl=!1,e!==null&&(We[Ie++]=Tl,We[Ie++]=xl,We[Ie++]=yt,Tl=e.id,xl=e.overflow,yt=l),l=fc(l,a.children),l.flags|=4096);return l}return n?(Jl(),n=a.fallback,c=l.mode,s=e.child,g=s.sibling,a=Sl(s,{mode:"hidden",children:a.children}),a.subtreeFlags=s.subtreeFlags&65011712,g!==null?n=Sl(g,n):(n=pt(n,c,t,null),n.flags|=2),n.return=l,a.return=l,a.sibling=n,l.child=a,a=n,n=l.child,c=e.child.memoizedState,c===null?c=oc(t):(s=c.cachePool,s!==null?(g=ge._currentValue,s=s.parent!==g?{parent:g,pool:g}:s):s=So(),c={baseLanes:c.baseLanes|t,cachePool:s}),n.memoizedState=c,n.childLanes=rc(e,i,t),l.memoizedState=sc,a):(kl(l),t=e.child,e=t.sibling,t=Sl(t,{mode:"visible",children:a.children}),t.return=l,t.sibling=null,e!==null&&(i=l.deletions,i===null?(l.deletions=[e],l.flags|=16):i.push(e)),l.child=t,l.memoizedState=null,t)}function fc(e,l){return l=gu({mode:"visible",children:l},e.mode),l.return=e,e.child=l}function gu(e,l){return e=He(22,e,null,l),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function dc(e,l,t){return na(l,e.child,null,t),e=fc(l,l.pendingProps.children),e.flags|=2,l.memoizedState=null,e}function Br(e,l,t){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l),Ci(e.return,l,t)}function mc(e,l,t,a,n){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:a,tail:t,tailMode:n}:(u.isBackwards=l,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=t,u.tailMode=n)}function qr(e,l,t){var a=l.pendingProps,n=a.revealOrder,u=a.tail;if(xe(e,l,a.children,t),a=pe.current,(a&2)!==0)a=a&1|2,l.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=l.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Br(e,t,l);else if(e.tag===19)Br(e,t,l);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===l)break e;for(;e.sibling===null;){if(e.return===null||e.return===l)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}switch(J(pe,a),n){case"forwards":for(t=l.child,n=null;t!==null;)e=t.alternate,e!==null&&fu(e)===null&&(n=t),t=t.sibling;t=n,t===null?(n=l.child,l.child=null):(n=t.sibling,t.sibling=null),mc(l,!1,n,t,u);break;case"backwards":for(t=null,n=l.child,l.child=null;n!==null;){if(e=n.alternate,e!==null&&fu(e)===null){l.child=n;break}e=n.sibling,n.sibling=t,t=n,n=e}mc(l,!0,t,null,u);break;case"together":mc(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function El(e,l,t){if(e!==null&&(l.dependencies=e.dependencies),Il|=l.lanes,(t&l.childLanes)===0)if(e!==null){if(Ha(e,l,t,!1),(t&l.childLanes)===0)return null}else return null;if(e!==null&&l.child!==e.child)throw Error(f(153));if(l.child!==null){for(e=l.child,t=Sl(e,e.pendingProps),l.child=t,t.return=l;e.sibling!==null;)e=e.sibling,t=t.sibling=Sl(e,e.pendingProps),t.return=l;t.sibling=null}return l.child}function hc(e,l){return(e.lanes&l)!==0?!0:(e=e.dependencies,!!(e!==null&&Fn(e)))}function Ah(e,l,t){switch(l.tag){case 3:Mn(l,l.stateNode.containerInfo),Xl(l,ge,e.memoizedState.cache),qa();break;case 27:case 5:Qu(l);break;case 4:Mn(l,l.stateNode.containerInfo);break;case 10:Xl(l,l.type,l.memoizedProps.value);break;case 13:var a=l.memoizedState;if(a!==null)return a.dehydrated!==null?(kl(l),l.flags|=128,null):(t&l.child.childLanes)!==0?Ur(e,l,t):(kl(l),e=El(e,l,t),e!==null?e.sibling:null);kl(l);break;case 19:var n=(e.flags&128)!==0;if(a=(t&l.childLanes)!==0,a||(Ha(e,l,t,!1),a=(t&l.childLanes)!==0),n){if(a)return qr(e,l,t);l.flags|=128}if(n=l.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),J(pe,pe.current),a)break;return null;case 22:case 23:return l.lanes=0,Or(e,l,t);case 24:Xl(l,ge,e.memoizedState.cache)}return El(e,l,t)}function Lr(e,l,t){if(e!==null)if(e.memoizedProps!==l.pendingProps)be=!0;else{if(!hc(e,t)&&(l.flags&128)===0)return be=!1,Ah(e,l,t);be=(e.flags&131072)!==0}else be=!1,V&&(l.flags&1048576)!==0&&mo(l,Jn,l.index);switch(l.lanes=0,l.tag){case 16:e:{e=l.pendingProps;var a=l.elementType,n=a._init;if(a=n(a._payload),l.type=a,typeof a=="function")Ai(a)?(e=Nt(a,e),l.tag=1,l=jr(null,l,a,e,t)):(l.tag=0,l=cc(null,l,a,e,t));else{if(a!=null){if(n=a.$$typeof,n===Ll){l.tag=11,l=Mr(null,l,a,e,t);break e}else if(n===pl){l.tag=14,l=Er(null,l,a,e,t);break e}}throw l=Sa(a)||a,Error(f(306,l,""))}}return l;case 0:return cc(e,l,l.type,l.pendingProps,t);case 1:return a=l.type,n=Nt(a,l.pendingProps),jr(e,l,a,n,t);case 3:e:{if(Mn(l,l.stateNode.containerInfo),e===null)throw Error(f(387));a=l.pendingProps;var u=l.memoizedState;n=u.element,Li(e,l),wa(l,a,null,t);var i=l.memoizedState;if(a=i.cache,Xl(l,ge,a),a!==u.cache&&Ri(l,[ge],t,!0),Va(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},l.updateQueue.baseState=u,l.memoizedState=u,l.flags&256){l=_r(e,l,a,t);break e}else if(a!==n){n=Pe(Error(f(424)),l),La(n),l=_r(e,l,a,t);break e}else{switch(e=l.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(se=il(e.firstChild),ze=l,V=!0,bt=null,fl=!0,t=gr(l,null,a,t),l.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(qa(),a===n){l=El(e,l,t);break e}xe(e,l,a,t)}l=l.child}return l;case 26:return hu(e,l),e===null?(t=Xf(l.type,null,l.pendingProps,null))?l.memoizedState=t:V||(t=l.type,e=l.pendingProps,a=Ou(Hl.current).createElement(t),a[Ne]=l,a[Ce]=e,De(a,t,e),ve(a),l.stateNode=a):l.memoizedState=Xf(l.type,e.memoizedProps,l.pendingProps,e.memoizedState),null;case 27:return Qu(l),e===null&&V&&(a=l.stateNode=Gf(l.type,l.pendingProps,Hl.current),ze=l,fl=!0,n=se,at(l.type)?(Jc=n,se=il(a.firstChild)):se=n),xe(e,l,l.pendingProps.children,t),hu(e,l),e===null&&(l.flags|=4194304),l.child;case 5:return e===null&&V&&((n=a=se)&&(a=$h(a,l.type,l.pendingProps,fl),a!==null?(l.stateNode=a,ze=l,se=il(a.firstChild),fl=!1,n=!0):n=!1),n||St(l)),Qu(l),n=l.type,u=l.pendingProps,i=e!==null?e.memoizedProps:null,a=u.children,Vc(n,u)?a=null:i!==null&&Vc(n,i)&&(l.flags|=32),l.memoizedState!==null&&(n=Qi(e,l,gh,null,null,t),hn._currentValue=n),hu(e,l),xe(e,l,a,t),l.child;case 6:return e===null&&V&&((e=t=se)&&(t=Wh(t,l.pendingProps,fl),t!==null?(l.stateNode=t,ze=l,se=null,e=!0):e=!1),e||St(l)),null;case 13:return Ur(e,l,t);case 4:return Mn(l,l.stateNode.containerInfo),a=l.pendingProps,e===null?l.child=na(l,null,a,t):xe(e,l,a,t),l.child;case 11:return Mr(e,l,l.type,l.pendingProps,t);case 7:return xe(e,l,l.pendingProps,t),l.child;case 8:return xe(e,l,l.pendingProps.children,t),l.child;case 12:return xe(e,l,l.pendingProps.children,t),l.child;case 10:return a=l.pendingProps,Xl(l,l.type,a.value),xe(e,l,a.children,t),l.child;case 9:return n=l.type._context,a=l.pendingProps.children,xt(l),n=Me(n),a=a(n),l.flags|=1,xe(e,l,a,t),l.child;case 14:return Er(e,l,l.type,l.pendingProps,t);case 15:return zr(e,l,l.type,l.pendingProps,t);case 19:return qr(e,l,t);case 31:return a=l.pendingProps,t=l.mode,a={mode:a.mode,children:a.children},e===null?(t=gu(a,t),t.ref=l.ref,l.child=t,t.return=l,l=t):(t=Sl(e.child,a),t.ref=l.ref,l.child=t,t.return=l,l=t),l;case 22:return Or(e,l,t);case 24:return xt(l),a=Me(ge),e===null?(n=Ui(),n===null&&(n=le,u=ji(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=t),n=u),l.memoizedState={parent:a,cache:n},qi(l),Xl(l,ge,n)):((e.lanes&t)!==0&&(Li(e,l),wa(l,null,null,t),Va()),n=e.memoizedState,u=l.memoizedState,n.parent!==a?(n={parent:a,cache:a},l.memoizedState=n,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=n),Xl(l,ge,a)):(a=u.cache,Xl(l,ge,a),a!==n.cache&&Ri(l,[ge],t,!0))),xe(e,l,l.pendingProps.children,t),l.child;case 29:throw l.pendingProps}throw Error(f(156,l.tag))}function zl(e){e.flags|=4}function Hr(e,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!kf(l)){if(l=el.current,l!==null&&((X&4194048)===X?dl!==null:(X&62914560)!==X&&(X&536870912)===0||l!==dl))throw Xa=Bi,To;e.flags|=8192}}function pu(e,l){l!==null&&(e.flags|=4),e.flags&16384&&(l=e.tag!==22?gs():536870912,e.lanes|=l,sa|=l)}function Wa(e,l){if(!V)switch(e.tailMode){case"hidden":l=e.tail;for(var t=null;l!==null;)l.alternate!==null&&(t=l),l=l.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?l||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ce(e){var l=e.alternate!==null&&e.alternate.child===e.child,t=0,a=0;if(l)for(var n=e.child;n!==null;)t|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)t|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=t,l}function Dh(e,l,t){var a=l.pendingProps;switch(Ei(l),l.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ce(l),null;case 1:return ce(l),null;case 3:return t=l.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),l.memoizedState.cache!==a&&(l.flags|=2048),Dl(ge),jt(),t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null),(e===null||e.child===null)&&(Ba(l)?zl(l):e===null||e.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,po())),ce(l),null;case 26:return t=l.memoizedState,e===null?(zl(l),t!==null?(ce(l),Hr(l,t)):(ce(l),l.flags&=-16777217)):t?t!==e.memoizedState?(zl(l),ce(l),Hr(l,t)):(ce(l),l.flags&=-16777217):(e.memoizedProps!==a&&zl(l),ce(l),l.flags&=-16777217),null;case 27:En(l),t=Hl.current;var n=l.type;if(e!==null&&l.stateNode!=null)e.memoizedProps!==a&&zl(l);else{if(!a){if(l.stateNode===null)throw Error(f(166));return ce(l),null}e=ye.current,Ba(l)?ho(l):(e=Gf(n,a,t),l.stateNode=e,zl(l))}return ce(l),null;case 5:if(En(l),t=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==a&&zl(l);else{if(!a){if(l.stateNode===null)throw Error(f(166));return ce(l),null}if(e=ye.current,Ba(l))ho(l);else{switch(n=Ou(Hl.current),e){case 1:e=n.createElementNS("http://www.w3.org/2000/svg",t);break;case 2:e=n.createElementNS("http://www.w3.org/1998/Math/MathML",t);break;default:switch(t){case"svg":e=n.createElementNS("http://www.w3.org/2000/svg",t);break;case"math":e=n.createElementNS("http://www.w3.org/1998/Math/MathML",t);break;case"script":e=n.createElement("div"),e.innerHTML=" - - - - - - - - - + + + + + + + + + + Lightrag + + + + + + + + + + - - - -
- - + + + +
+ + diff --git a/lightrag/api/webui/logo.svg b/lightrag/api/webui/logo.svg index fd32836b..6ffd0601 100755 --- a/lightrag/api/webui/logo.svg +++ b/lightrag/api/webui/logo.svg @@ -1 +1 @@ - + diff --git a/lightrag_webui/src/components/retrieval/QuerySettings.tsx b/lightrag_webui/src/components/retrieval/QuerySettings.tsx index f1514a4b..909de6a7 100644 --- a/lightrag_webui/src/components/retrieval/QuerySettings.tsx +++ b/lightrag_webui/src/components/retrieval/QuerySettings.tsx @@ -15,6 +15,7 @@ import { import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/Tooltip' import { useSettingsStore } from '@/stores/settings' import { useTranslation } from 'react-i18next' +import NumberInput from '../ui/NumberInput' export default function QuerySettings() { const { t } = useTranslation() @@ -155,11 +156,20 @@ export default function QuerySettings() {
- handleChange('chunk_top_k', v)} + type="number" + value={querySettings.chunk_top_k ?? ''} + onChange={(e) => { + const value = e.target.value + handleChange('chunk_top_k', value === '' ? '' : parseInt(value) || 0) + }} + onBlur={(e) => { + const value = e.target.value + if (value === '' || isNaN(parseInt(value))) { + handleChange('chunk_top_k', 1) + } + }} min={1} placeholder={t('retrievePanel.querySettings.chunkTopKPlaceholder')} /> @@ -181,11 +191,20 @@ export default function QuerySettings() {
- handleChange('chunk_rerank_top_k', v)} + type="number" + value={querySettings.chunk_rerank_top_k ?? ''} + onChange={(e) => { + const value = e.target.value + handleChange('chunk_rerank_top_k', value === '' ? '' : parseInt(value) || 0) + }} + onBlur={(e) => { + const value = e.target.value + if (value === '' || isNaN(parseInt(value))) { + handleChange('chunk_rerank_top_k', 1) + } + }} min={1} placeholder={t('retrievePanel.querySettings.chunkRerankTopKPlaceholder')} /> @@ -208,11 +227,20 @@ export default function QuerySettings() {
- handleChange('max_entity_tokens', v)} + type="number" + value={querySettings.max_entity_tokens ?? ''} + onChange={(e) => { + const value = e.target.value + handleChange('max_entity_tokens', value === '' ? '' : parseInt(value) || 0) + }} + onBlur={(e) => { + const value = e.target.value + if (value === '' || isNaN(parseInt(value))) { + handleChange('max_entity_tokens', 1) + } + }} min={1} placeholder={t('retrievePanel.querySettings.maxEntityTokens')} /> @@ -233,11 +261,20 @@ export default function QuerySettings() {
- handleChange('max_relation_tokens', v)} + type="number" + value={querySettings.max_relation_tokens ?? ''} + onChange={(e) => { + const value = e.target.value + handleChange('max_relation_tokens', value === '' ? '' : parseInt(value) || 0) + }} + onBlur={(e) => { + const value = e.target.value + if (value === '' || isNaN(parseInt(value))) { + handleChange('max_relation_tokens', 1) + } + }} min={1} placeholder={t('retrievePanel.querySettings.maxRelationTokens')} /> @@ -258,11 +295,20 @@ export default function QuerySettings() {
- handleChange('max_total_tokens', v)} + type="number" + value={querySettings.max_total_tokens ?? ''} + onChange={(e) => { + const value = e.target.value + handleChange('max_total_tokens', value === '' ? '' : parseInt(value) || 0) + }} + onBlur={(e) => { + const value = e.target.value + if (value === '' || isNaN(parseInt(value))) { + handleChange('max_total_tokens', 1) + } + }} min={1} placeholder={t('retrievePanel.querySettings.maxTotalTokens')} />