lookatstudy-mobile 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install-termux.sh +109 -26
- package/package.json +1 -1
- package/server.cjs +25306 -601
- package/web/assets/abnfDiagram-N423BO3Z-CU2Rg7X-.js +1 -0
- package/web/assets/api-web-DI50TDfG.js +1 -0
- package/web/assets/{arc-Bj7Boh6s.js → arc-CVHcrwtq.js} +1 -1
- package/web/assets/architectureDiagram-T3A2C74G-CbOpSoqA.js +36 -0
- package/web/assets/{blockDiagram-VBNYF7ZC-DAzIMkNI.js → blockDiagram-VBNYF7ZC-DkENfYJJ.js} +2 -2
- package/web/assets/{c4Diagram-5PPSVZJV-NlYvtXbZ.js → c4Diagram-5PPSVZJV-D2nKbUxh.js} +2 -2
- package/web/assets/channel-AThd-Hly.js +1 -0
- package/web/assets/{chunk-2GRJ4B5K-Cy2RZsUk.js → chunk-2GRJ4B5K-B2LBmawX.js} +1 -1
- package/web/assets/{chunk-2Q5K7J3B-DtK3xo3Z.js → chunk-2Q5K7J3B-ByZtx99c.js} +1 -1
- package/web/assets/{chunk-5RXB4S5H-CmVGejcd.js → chunk-5RXB4S5H-b6PGx0ql.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-EO_k0Crh.js → chunk-5VM5RSS4-wmKKoEHl.js} +1 -1
- package/web/assets/{chunk-6Q2QTUOP-TBVy-R-c.js → chunk-6Q2QTUOP-CZ89fwLd.js} +1 -1
- package/web/assets/{chunk-GF5L2VYU-_N0jD1tE.js → chunk-GF5L2VYU-3EIIkl6Y.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-BIAuolFx.js → chunk-JWPE2WC7-CdCWYrp8.js} +1 -1
- package/web/assets/{chunk-KBJHAD2P-DqcnXfI8.js → chunk-KBJHAD2P-CmZTgHqr.js} +1 -1
- package/web/assets/{chunk-RYQCIY6F-D5RQKqlg.js → chunk-RYQCIY6F-DfyARx_z.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-1Ksx_dPa.js → chunk-XXDRQBXY-DIoEGjYu.js} +1 -1
- package/web/assets/classDiagram-JCYQIIEL-Ccd6qf2i.js +1 -0
- package/web/assets/classDiagram-v2-OCEON4UE-Ccd6qf2i.js +1 -0
- package/web/assets/cose-bilkent-JH36ORCC-BktEcSRI.js +1 -0
- package/web/assets/{cynefin-VYW2F7L2-CAYbjl57.js → cynefin-VYW2F7L2-sXHUKhTr.js} +1 -1
- package/web/assets/cynefinDiagram-MW4NZA55-CQvZqGMF.js +62 -0
- package/web/assets/{dagre-VZM6K2ZE-CKP3kBHM.js → dagre-VZM6K2ZE-BgVOc66g.js} +2 -2
- package/web/assets/{diagram-7IWD3JNH-CLfr8NaW.js → diagram-7IWD3JNH-CqXnEFCF.js} +2 -2
- package/web/assets/{diagram-B4RE2ZJO-h051w7zn.js → diagram-B4RE2ZJO-CbG6ewsb.js} +2 -2
- package/web/assets/diagram-LBJQPF4R-qCVZtiwb.js +24 -0
- package/web/assets/diagram-Q27KOJAE-fRbvC_4J.js +24 -0
- package/web/assets/diagram-UB23O5K3-DYruB-zm.js +41 -0
- package/web/assets/ebnfDiagram-BXEA7PRR-BKbJqSDg.js +1 -0
- package/web/assets/{erDiagram-JOGREHBK-Bz30kI2B.js → erDiagram-JOGREHBK-anDPN9Fg.js} +2 -2
- package/web/assets/{flowDiagram-UKHOOZJN-CsFP_-KD.js → flowDiagram-UKHOOZJN-DlMRxaQ8.js} +1 -1
- package/web/assets/ganttDiagram-PKOTCBZU-BoCCJylo.js +292 -0
- package/web/assets/gitGraphDiagram-DS77QQ5N-D37HEJEv.js +106 -0
- package/web/assets/index-CeFnA9sR.js +53 -0
- package/web/assets/index-D8iAKGNi.css +1 -0
- package/web/assets/infoDiagram-6WML65LV-Cp2uwsRp.js +2 -0
- package/web/assets/{ishikawaDiagram-WSZJBQD7-Bt6EfUkc.js → ishikawaDiagram-WSZJBQD7-IDCvF8oq.js} +2 -2
- package/web/assets/{journeyDiagram-NVQOT4AX-DmVq_JOG.js → journeyDiagram-NVQOT4AX-CqJjuMRj.js} +2 -2
- package/web/assets/{kanban-definition-27J2QSJJ-tE00W58E.js → kanban-definition-27J2QSJJ-Bzy4l8Im.js} +2 -2
- package/web/assets/{linear-CAqnKu9J.js → linear-BYt2jke2.js} +1 -1
- package/web/assets/main-BaffLdJi.js +528 -0
- package/web/assets/{mermaid.core-uJSxER2x.js → mermaid.core-ChBcV6rX.js} +11 -11
- package/web/assets/{mindmap-definition-FAOFIHXS-D5S_P9_s.js → mindmap-definition-FAOFIHXS-BiQCF2qx.js} +2 -2
- package/web/assets/pegDiagram-VL7TDLO6-JrAhM2Rh.js +1 -0
- package/web/assets/pet-CTf4hJTR.css +1 -0
- package/web/assets/pet-f5Q8AEiU.js +1 -0
- package/web/assets/{pieDiagram-7S7Q4E2Y-DYpiHnao.js → pieDiagram-7S7Q4E2Y-DNB9KI82.js} +2 -2
- package/web/assets/{quadrantDiagram-CIZ2JOQS-BqycGz7D.js → quadrantDiagram-CIZ2JOQS-D9CQH6qH.js} +4 -4
- package/web/assets/railroadDiagram-AXF67PYL-GRAK-BbS.js +1 -0
- package/web/assets/{requirementDiagram-LRYGKXZP-CH-xotLo.js → requirementDiagram-LRYGKXZP-CTFmkmvv.js} +2 -2
- package/web/assets/{sankeyDiagram-W5VNT64P-BCLFObl1.js → sankeyDiagram-W5VNT64P-ocFhBtMa.js} +2 -2
- package/web/assets/{sequenceDiagram-SI44F4Z6-CE1T-Oar.js → sequenceDiagram-SI44F4Z6-itHtrU2O.js} +2 -2
- package/web/assets/sizeCapture-X5ZJPWSS-Bj_0p16L.js +1 -0
- package/web/assets/stateDiagram-OKZ733FA-BZ3FXzdZ.js +1 -0
- package/web/assets/stateDiagram-v2-UEYNNEHI-DacbF0mj.js +1 -0
- package/web/assets/swimlanes-SLNWSIFB-nlxlUqVN.js +2 -0
- package/web/assets/swimlanesDiagram-ULZ7WXOC-Bk858mY5.js +8 -0
- package/web/assets/{timeline-definition-Z64GVDOM-CPajwTED.js → timeline-definition-Z64GVDOM-B-IqLhkR.js} +2 -2
- package/web/assets/{vennDiagram-T6HMQDX7-DKkB137-.js → vennDiagram-T6HMQDX7-Dr1sgkuO.js} +2 -2
- package/web/assets/{wardleyDiagram-T6FBY63Y-CHD6tq1V.js → wardleyDiagram-T6FBY63Y-BOOJsnbk.js} +2 -2
- package/web/assets/{xychartDiagram-ELKLHX3M-DIO9Q6BD.js → xychartDiagram-ELKLHX3M-Bb3lgEh4.js} +2 -2
- package/web/index.html +3 -2
- package/web/pet.html +19 -0
- package/web/assets/abnfDiagram-N423BO3Z-uVyZuC2D.js +0 -1
- package/web/assets/api-web-BydHmVA4.js +0 -1
- package/web/assets/architectureDiagram-T3A2C74G-CrbkXNQp.js +0 -36
- package/web/assets/channel-JNlIjRLZ.js +0 -1
- package/web/assets/classDiagram-JCYQIIEL-C-12RKGI.js +0 -1
- package/web/assets/classDiagram-v2-OCEON4UE-C-12RKGI.js +0 -1
- package/web/assets/cose-bilkent-JH36ORCC-DAUofPwo.js +0 -1
- package/web/assets/cynefinDiagram-MW4NZA55-UaEI49aN.js +0 -62
- package/web/assets/diagram-LBJQPF4R-CUOsO4df.js +0 -24
- package/web/assets/diagram-Q27KOJAE-BXbJxAlu.js +0 -24
- package/web/assets/diagram-UB23O5K3-BHV6tpU9.js +0 -41
- package/web/assets/ebnfDiagram-BXEA7PRR-CAahAB9-.js +0 -1
- package/web/assets/ganttDiagram-PKOTCBZU-Cm5qe_5U.js +0 -292
- package/web/assets/gitGraphDiagram-DS77QQ5N-DNktj2Kq.js +0 -106
- package/web/assets/index-BC_sP79K.js +0 -563
- package/web/assets/index-BSTI-ywB.css +0 -1
- package/web/assets/infoDiagram-6WML65LV-vZK5e7Xx.js +0 -2
- package/web/assets/pegDiagram-VL7TDLO6-BZkaiQ_9.js +0 -1
- package/web/assets/railroadDiagram-AXF67PYL-DEoY1V9D.js +0 -1
- package/web/assets/sizeCapture-X5ZJPWSS-uf4-mQAU.js +0 -1
- package/web/assets/stateDiagram-OKZ733FA-Dt2wQF9A.js +0 -1
- package/web/assets/stateDiagram-v2-UEYNNEHI-BbJD6fMT.js +0 -1
- package/web/assets/swimlanes-SLNWSIFB-jLXDXtjZ.js +0 -2
- package/web/assets/swimlanesDiagram-ULZ7WXOC-BTdV0I38.js +0 -8
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:DIN Round,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html,body,#root{height:100%}.text-caption{font-size:.75rem}.text-label{font-size:.825rem}.text-body{font-size:.875rem}.text-lead{font-size:1rem}.text-title{font-size:1.125rem}.text-hero{font-size:1.5rem}.canvas-grid{background-image:radial-gradient(rgb(var(--ink-rgb) / .1) 1px,transparent 1px);background-size:22px 22px;background-position:center}.canvas-stage-gesture{cursor:grab}.canvas-stage-gesture:active{cursor:grabbing}body{font-feature-settings:"cv02","cv03","cv04","cv11";-webkit-font-smoothing:antialiased;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation}input,textarea,[contenteditable]{-webkit-user-select:text;-moz-user-select:text;user-select:text}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.prose{color:var(--ink);max-width:none}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.6em;margin-bottom:.6em;line-height:1.65}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:rgb(var(--accent-rgb));text-decoration:none;font-weight:500}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)):hover{text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink-strong);font-weight:700}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:.5em;margin-bottom:.5em;padding-inline-start:1.625em;padding-left:1.3em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:.5em;margin-bottom:.5em;padding-inline-start:1.625em;padding-left:1.3em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:rgb(var(--border-rgb));border-top-width:1px;margin-top:1.2em;margin-bottom:1.2em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:normal;color:var(--ink-muted);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:.8em;margin-bottom:.8em;padding-inline-start:1em;border-left-color:rgb(var(--accent-rgb));border-left-width:3px;background-color:rgb(var(--accent-rgb) / .06);padding-left:.9em;padding-top:.4em;padding-bottom:.4em;border-radius:0 .4rem .4rem 0}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink-strong);font-weight:800;font-size:1.25rem;margin-top:1.25em;margin-bottom:.5em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink-strong);font-weight:700;font-size:1.1rem;margin-top:1.2em;margin-bottom:.4em;line-height:1.3333333;padding-bottom:.3em;border-bottom:1px solid rgb(var(--border-rgb))}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink);font-weight:700;font-size:1rem;margin-top:1em;margin-bottom:.3em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink);font-weight:700;margin-top:.8em;margin-bottom:.2em;line-height:1.5;font-size:.9rem}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.6em;margin-bottom:.6em;border-radius:.5rem}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:rgb(var(--accent-rgb));font-weight:500;font-size:.85em;background-color:rgb(var(--surface-3-rgb) / .6);padding:.15em .4em;border-radius:.3rem}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:""}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:""}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink);background-color:rgb(var(--surface-0-rgb));overflow-x:auto;font-weight:400;font-size:.82em;line-height:1.55;margin-top:.7em;margin-bottom:.7em;border-radius:.5rem;padding-inline-end:1.1428571em;padding-inline-start:1.1428571em;padding:.9em 1em;border:1px solid rgb(var(--border-rgb))}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:.8em;margin-bottom:.8em;font-size:.85em;line-height:1.7142857;border-collapse:collapse;display:block;overflow-x:auto}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:2px;border-bottom-color:rgb(var(--brand-rgb))}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: rgb(17 24 39 / 10%);--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.25em;margin-bottom:.25em;padding-left:.2em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose :where(em):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink)}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:rgb(var(--brand-rgb))}.prose :where(th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--ink-strong);font-weight:700;text-align:left;padding:.5em .7em;font-size:.95em}.prose :where(td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.45em .7em;border-bottom:1px solid rgb(var(--border-rgb));vertical-align:top;color:var(--ink)}.prose :where(tbody tr:nth-child(odd)):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:rgb(var(--surface-3-rgb) / .3)}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.shadow-elevated{box-shadow:0 8px 24px -4px rgb(var(--shadow-rgb) / .18),0 2px 6px -2px rgb(var(--shadow-rgb) / .12)}.shadow-card{box-shadow:0 1px 3px -1px rgb(var(--shadow-rgb) / .08)}.shadow-pop{box-shadow:0 4px 12px -2px rgb(var(--shadow-rgb) / .14),0 1px 3px -1px rgb(var(--shadow-rgb) / .08)}.btn-3d{position:relative;border-radius:1rem;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.btn-3d:active{--tw-translate-y: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-3d-brand{position:relative;border-radius:1rem;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.btn-3d-brand:active{--tw-translate-y: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-3d-brand{--tw-bg-opacity: 1;background-color:rgb(var(--brand-rgb) / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));box-shadow:0 4px 0 0 var(--brand-dark)}.btn-3d-brand:hover{--tw-bg-opacity: 1;background-color:rgb(var(--brand-light-rgb) / var(--tw-bg-opacity, 1))}.btn-3d-brand:active{box-shadow:0 1px 0 0 var(--brand-dark)}.btn-3d-neutral{position:relative;border-radius:1rem;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.btn-3d-neutral:active{--tw-translate-y: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-3d-neutral{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(38 38 38 / var(--tw-text-opacity, 1))}.btn-3d-neutral:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.btn-3d-neutral{box-shadow:0 4px rgb(var(--shadow-rgb) / .2)}.btn-3d-neutral:active{box-shadow:0 1px rgb(var(--shadow-rgb) / .2)}.btn-icon-3d-brand{position:relative;display:flex;align-items:center;justify-content:center;border-radius:9999px;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.btn-icon-3d-brand:active{--tw-translate-y: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-icon-3d-brand{--tw-bg-opacity: 1;background-color:rgb(var(--brand-rgb) / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));box-shadow:0 3px 0 0 var(--brand-dark)}.btn-icon-3d-brand:hover{--tw-bg-opacity: 1;background-color:rgb(var(--brand-light-rgb) / var(--tw-bg-opacity, 1))}.btn-icon-3d-brand:active{box-shadow:0 1px 0 0 var(--brand-dark)}.btn-icon-3d-brand:disabled{cursor:not-allowed;background-color:#73737380;box-shadow:none}.btn-icon-3d-warning{position:relative;display:flex;align-items:center;justify-content:center;border-radius:9999px;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.btn-icon-3d-warning:active{--tw-translate-y: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-icon-3d-warning{--tw-bg-opacity: 1;background-color:rgb(var(--warning-rgb) / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));box-shadow:0 3px 0 0 var(--warning-dark)}.btn-icon-3d-warning:hover{--tw-bg-opacity: 1;background-color:rgb(var(--warning-light-rgb) / var(--tw-bg-opacity, 1))}.btn-icon-3d-warning:active{box-shadow:0 1px 0 0 var(--warning-dark)}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-0\.5{top:-.125rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.bottom-0{bottom:0}.bottom-1\.5{bottom:.375rem}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.float-right{float:right}.m-2{margin:.5rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.\!mt-0{margin-top:0!important}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-5{margin-left:1.25rem}.ml-\[68px\]{margin-left:68px}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-px{margin-top:1px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[var\(--app-height\,100vh\)\]{height:var(--app-height,100vh)}.h-auto{height:auto}.h-full{height:100%}.max-h-48{max-height:12rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[40vh\]{max-height:40vh}.max-h-\[420px\]{max-height:420px}.max-h-\[500px\]{max-height:500px}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[120px\]{min-height:120px}.min-h-\[160px\]{min-height:160px}.min-h-\[var\(--app-height\,100vh\)\]{min-height:var(--app-height,100vh)}.min-h-full{min-height:100%}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[220px\]{width:220px}.w-\[300px\]{width:300px}.w-\[min\(400px\,90vw\)\]{width:min(400px,90vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[100px\]{min-width:100px}.min-w-\[3\.25rem\]{min-width:3.25rem}.min-w-\[440px\]{min-width:440px}.max-w-2xl{max-width:42rem}.max-w-\[10rem\]{max-width:10rem}.max-w-\[120px\]{max-width:120px}.max-w-\[12rem\]{max-width:12rem}.max-w-\[13rem\]{max-width:13rem}.max-w-\[140px\]{max-width:140px}.max-w-\[80ch\]{max-width:80ch}.max-w-\[85\%\]{max-width:85%}.max-w-\[90vw\]{max-width:90vw}.max-w-\[960px\]{max-width:960px}.max-w-\[calc\(100vw-1\.5rem\)\]{max-width:calc(100vw - 1.5rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\[0\.99\]{--tw-scale-x: .99;--tw-scale-y: .99;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-\[toast-enter_\.15s_ease-out\]{animation:toast-enter .15s ease-out}@keyframes answer-correct{0%{transform:scale(1)}40%{transform:scale(1.05)}to{transform:scale(1)}}.animate-answer-correct{animation:answer-correct .35s cubic-bezier(.34,1.56,.64,1)}@keyframes answer-wrong{0%,to{transform:translate(0)}20%,60%{transform:translate(-3px)}40%,80%{transform:translate(3px)}}.animate-answer-wrong{animation:answer-wrong .32s ease-in-out}@keyframes artifact-render{0%{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.animate-artifact-render{animation:artifact-render .22s cubic-bezier(.34,1.2,.64,1)}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes tab-slide{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}.animate-tab-slide{animation:tab-slide .18s cubic-bezier(.16,1,.3,1)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-zoom-out{cursor:zoom-out}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-x-0\.5{-moz-column-gap:.125rem;column-gap:.125rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.\!rounded-t-none{border-top-left-radius:0!important;border-top-right-radius:0!important}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.\!border-t-0{border-top-width:0px!important}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--border-faint\)\]{border-color:var(--border-faint)}.border-\[var\(--ink-strong\)\]{border-color:var(--ink-strong)}.border-accent{--tw-border-opacity: 1;border-color:rgb(var(--accent-rgb) / var(--tw-border-opacity, 1))}.border-accent\/20{border-color:rgb(var(--accent-rgb) / .2)}.border-accent\/40{border-color:rgb(var(--accent-rgb) / .4)}.border-brand{--tw-border-opacity: 1;border-color:rgb(var(--brand-rgb) / var(--tw-border-opacity, 1))}.border-brand\/30{border-color:rgb(var(--brand-rgb) / .3)}.border-brand\/40{border-color:rgb(var(--brand-rgb) / .4)}.border-gold\/30{border-color:rgb(var(--gold-rgb) / .3)}.border-ink\/10{border-color:rgb(var(--ink-rgb) / .1)}.border-neutral-50{--tw-border-opacity: 1;border-color:rgb(250 250 250 / var(--tw-border-opacity, 1))}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-review\/20{border-color:rgb(var(--review-rgb) / .2)}.border-transparent{border-color:transparent}.border-warning{--tw-border-opacity: 1;border-color:rgb(var(--warning-rgb) / var(--tw-border-opacity, 1))}.border-warning\/30{border-color:rgb(var(--warning-rgb) / .3)}.border-warning\/40{border-color:rgb(var(--warning-rgb) / .4)}.border-warning\/50{border-color:rgb(var(--warning-rgb) / .5)}.border-white\/15{border-color:#ffffff26}.border-white\/20{border-color:#fff3}.border-t-transparent{border-top-color:transparent}.bg-\[\#0e2a12\]{--tw-bg-opacity: 1;background-color:rgb(14 42 18 / var(--tw-bg-opacity, 1))}.bg-\[var\(--border\)\]{background-color:var(--border)}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(var(--accent-rgb) / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:rgb(var(--accent-rgb) / .1)}.bg-accent\/15{background-color:rgb(var(--accent-rgb) / .15)}.bg-accent\/20{background-color:rgb(var(--accent-rgb) / .2)}.bg-accent\/25{background-color:rgb(var(--accent-rgb) / .25)}.bg-accent\/30{background-color:rgb(var(--accent-rgb) / .3)}.bg-accent\/5{background-color:rgb(var(--accent-rgb) / .05)}.bg-black\/25{background-color:#00000040}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/80{background-color:#000c}.bg-brand{--tw-bg-opacity: 1;background-color:rgb(var(--brand-rgb) / var(--tw-bg-opacity, 1))}.bg-brand\/10{background-color:rgb(var(--brand-rgb) / .1)}.bg-brand\/15{background-color:rgb(var(--brand-rgb) / .15)}.bg-brand\/20{background-color:rgb(var(--brand-rgb) / .2)}.bg-brand\/30{background-color:rgb(var(--brand-rgb) / .3)}.bg-brand\/5{background-color:rgb(var(--brand-rgb) / .05)}.bg-brand\/90{background-color:rgb(var(--brand-rgb) / .9)}.bg-exam{--tw-bg-opacity: 1;background-color:rgb(var(--exam-rgb) / var(--tw-bg-opacity, 1))}.bg-gold{--tw-bg-opacity: 1;background-color:rgb(var(--gold-rgb) / var(--tw-bg-opacity, 1))}.bg-gold\/5{background-color:rgb(var(--gold-rgb) / .05)}.bg-ink-faint{--tw-bg-opacity: 1;background-color:rgb(var(--ink-faint-rgb) / var(--tw-bg-opacity, 1))}.bg-ink-strong{--tw-bg-opacity: 1;background-color:rgb(var(--ink-strong-rgb) / var(--tw-bg-opacity, 1))}.bg-ink\/10{background-color:rgb(var(--ink-rgb) / .1)}.bg-ink\/20{background-color:rgb(var(--ink-rgb) / .2)}.bg-ink\/5{background-color:rgb(var(--ink-rgb) / .05)}.bg-ink\/50{background-color:rgb(var(--ink-rgb) / .5)}.bg-ink\/70{background-color:rgb(var(--ink-rgb) / .7)}.bg-ink\/\[0\.04\]{background-color:rgb(var(--ink-rgb) / .04)}.bg-ink\/\[0\.05\]{background-color:rgb(var(--ink-rgb) / .05)}.bg-ink\/\[0\.06\]{background-color:rgb(var(--ink-rgb) / .06)}.bg-ink\/\[0\.08\]{background-color:rgb(var(--ink-rgb) / .08)}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1))}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-review{--tw-bg-opacity: 1;background-color:rgb(var(--review-rgb) / var(--tw-bg-opacity, 1))}.bg-review\/10{background-color:rgb(var(--review-rgb) / .1)}.bg-review\/20{background-color:rgb(var(--review-rgb) / .2)}.bg-surface-0{--tw-bg-opacity: 1;background-color:rgb(var(--surface-0-rgb) / var(--tw-bg-opacity, 1))}.bg-surface-0\/40{background-color:rgb(var(--surface-0-rgb) / .4)}.bg-surface-0\/60{background-color:rgb(var(--surface-0-rgb) / .6)}.bg-surface-0\/90{background-color:rgb(var(--surface-0-rgb) / .9)}.bg-surface-1{--tw-bg-opacity: 1;background-color:rgb(var(--surface-1-rgb) / var(--tw-bg-opacity, 1))}.bg-surface-1\/40{background-color:rgb(var(--surface-1-rgb) / .4)}.bg-surface-1\/50{background-color:rgb(var(--surface-1-rgb) / .5)}.bg-surface-1\/60{background-color:rgb(var(--surface-1-rgb) / .6)}.bg-surface-2{--tw-bg-opacity: 1;background-color:rgb(var(--surface-2-rgb) / var(--tw-bg-opacity, 1))}.bg-surface-3{--tw-bg-opacity: 1;background-color:rgb(var(--surface-3-rgb) / var(--tw-bg-opacity, 1))}.bg-surface-3\/60{background-color:rgb(var(--surface-3-rgb) / .6)}.bg-surface-rail{--tw-bg-opacity: 1;background-color:rgb(var(--surface-rail-rgb) / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(var(--warning-rgb) / var(--tw-bg-opacity, 1))}.bg-warning\/10{background-color:rgb(var(--warning-rgb) / .1)}.bg-warning\/15{background-color:rgb(var(--warning-rgb) / .15)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/5{background-color:#ffffff0d}.fill-accent\/10{fill:rgb(var(--accent-rgb) / .1)}.fill-current{fill:currentColor}.fill-gold{fill:rgb(var(--gold-rgb) / 1)}.fill-ink{fill:rgb(var(--ink-rgb) / 1)}.fill-ink-faint{fill:rgb(var(--ink-faint-rgb) / 1)}.fill-ink-muted{fill:rgb(var(--ink-muted-rgb) / 1)}.fill-ink-strong{fill:rgb(var(--ink-strong-rgb) / 1)}.fill-none{fill:none}.fill-surface-0{fill:rgb(var(--surface-0-rgb) / 1)}.fill-surface-3{fill:rgb(var(--surface-3-rgb) / 1)}.stroke-\[var\(--border\)\]{stroke:var(--border)}.stroke-\[var\(--border-faint\)\]{stroke:var(--border-faint)}.stroke-accent\/80{stroke:rgb(var(--accent-rgb) / .8)}.stroke-ink-faint\/70{stroke:rgb(var(--ink-faint-rgb) / .7)}.stroke-ink\/20{stroke:rgb(var(--ink-rgb) / .2)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-2\.5{padding-bottom:.625rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-2\.5{padding-top:.625rem}.pt-20{padding-top:5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-48{padding-top:12rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[15vh\]{padding-top:15vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-\[-3px\]{vertical-align:-3px}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-accent{--tw-text-opacity: 1;color:rgb(var(--accent-rgb) / var(--tw-text-opacity, 1))}.text-brand{--tw-text-opacity: 1;color:rgb(var(--brand-rgb) / var(--tw-text-opacity, 1))}.text-gold{--tw-text-opacity: 1;color:rgb(var(--gold-rgb) / var(--tw-text-opacity, 1))}.text-ink{--tw-text-opacity: 1;color:rgb(var(--ink-rgb) / var(--tw-text-opacity, 1))}.text-ink-faint{--tw-text-opacity: 1;color:rgb(var(--ink-faint-rgb) / var(--tw-text-opacity, 1))}.text-ink-muted{--tw-text-opacity: 1;color:rgb(var(--ink-muted-rgb) / var(--tw-text-opacity, 1))}.text-ink-strong{--tw-text-opacity: 1;color:rgb(var(--ink-strong-rgb) / var(--tw-text-opacity, 1))}.text-ink\/20{color:rgb(var(--ink-rgb) / .2)}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.text-review{--tw-text-opacity: 1;color:rgb(var(--review-rgb) / var(--tw-text-opacity, 1))}.text-review\/80{color:rgb(var(--review-rgb) / .8)}.text-surface-0{--tw-text-opacity: 1;color:rgb(var(--surface-0-rgb) / var(--tw-text-opacity, 1))}.text-warning{--tw-text-opacity: 1;color:rgb(var(--warning-rgb) / var(--tw-text-opacity, 1))}.text-warning-light{--tw-text-opacity: 1;color:rgb(var(--warning-light-rgb) / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/25{color:#ffffff40}.text-white\/35{color:#ffffff59}.text-white\/40{color:#fff6}.text-white\/45{color:#ffffff73}.text-white\/50{color:#ffffff80}.text-white\/55{color:#ffffff8c}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.accent-\[var\(--brand\)\]{accent-color:var(--brand)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-\[var\(--border\)\]{--tw-ring-color: var(--border)}.ring-accent{--tw-ring-opacity: 1;--tw-ring-color: rgb(var(--accent-rgb) / var(--tw-ring-opacity, 1))}.ring-accent\/40{--tw-ring-color: rgb(var(--accent-rgb) / .4)}.ring-brand\/30{--tw-ring-color: rgb(var(--brand-rgb) / .3)}.ring-brand\/40{--tw-ring-color: rgb(var(--brand-rgb) / .4)}.ring-gold\/40{--tw-ring-color: rgb(var(--gold-rgb) / .4)}.ring-review\/20{--tw-ring-color: rgb(var(--review-rgb) / .2)}.ring-review\/30{--tw-ring-color: rgb(var(--review-rgb) / .3)}.ring-white\/10{--tw-ring-color: rgb(255 255 255 / .1)}.ring-white\/15{--tw-ring-color: rgb(255 255 255 / .15)}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-neutral-50{--tw-ring-offset-color: #fafafa}.blur{--tw-blur: blur(8px);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)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.4\)\]{--tw-drop-shadow: drop-shadow(0 1px 2px rgba(0,0,0,.4));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)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.7\)\]{--tw-drop-shadow: drop-shadow(0 1px 2px rgba(0,0,0,.7));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)}.drop-shadow-\[0_1px_3px_rgba\(0\,0\,0\,0\.6\)\]{--tw-drop-shadow: drop-shadow(0 1px 3px rgba(0,0,0,.6));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)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));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)}.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-sm{--tw-backdrop-blur: blur(4px);-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,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.2,.64,1)}.ease-out-expo{transition-timing-function:cubic-bezier(.16,1,.3,1)}.will-change-transform{will-change:transform}:root{--brand: #58CC01;--brand-rgb: 88 204 2;--brand-dark: #46A302;--brand-dark-rgb: 70 163 2;--brand-light: #7ED957;--brand-light-rgb: 126 217 87;--brand-glow: #58CC0159;--brand-ring: #58CC0126;--accent: #1DB0F6;--accent-rgb: 28 176 246;--accent-dark: #098CDC;--accent-dark-rgb: 10 140 220;--accent-light: #65C6FF;--accent-light-rgb: 94 212 255;--accent-glow: #1DB0F64C;--accent-ring: #1DB0F626;--gold: #FFC801;--gold-rgb: 255 200 0;--gold-dark: #D59800;--gold-dark-rgb: 217 158 0;--gold-light: #FFE294;--gold-light-rgb: 255 230 128;--gold-glow: #FFC80173;--gold-ring: #FFC80133;--warning: #FF4B4B;--warning-rgb: 255 75 75;--warning-dark: #D01C29;--warning-dark-rgb: 230 43 43;--warning-light: #FF7E77;--warning-light-rgb: 255 117 117;--warning-glow: #FF4B4B4C;--warning-ring: #FF4B4B26;--warning-tint: #FF4B4B1A;--warning-tint-border: #FF4B4B40;--review: #FA6E1D;--review-rgb: 255 122 26;--review-glow: #FA6E1D26;--review-tint: #FA6E1D1A;--exam: #A855F7;--exam-rgb: 168 85 247;--exam-dark: #7E22CE;--exam-dark-rgb: 126 34 206;--exam-light: #C084FC;--exam-light-rgb: 192 132 252;--exam-locked: #524569;--exam-glow: #A855F759;--exam-ring: #A855F726;--surface-rail: #08090B;--surface-rail-rgb: 8 9 11;--surface-0: #0C0D0F;--surface-0-rgb: 12 13 15;--surface-1: #111114;--surface-1-rgb: 17 17 20;--surface-2: #1A1A1D;--surface-2-rgb: 26 26 29;--surface-3: #2A2B2E;--surface-3-rgb: 42 43 46;--ink: #F1F2F4;--ink-rgb: 245 245 250;--ink-strong: #FAFAFA;--ink-strong-rgb: 250 250 250;--ink-muted: #9D9EA2;--ink-muted-rgb: 166 166 176;--ink-faint: #88898C;--ink-faint-rgb: 136 137 140;--border: #252629;--border-rgb: 37 38 41;--border-faint: #1A1A1D;--border-faint-rgb: 26 26 29;--shadow-rgb: 0 0 0;--inner-highlight: rgb(255 255 255 / .55);--ease-out-expo: cubic-bezier(.16, 1, .3, 1);--ease-out-back: cubic-bezier(.34, 1.2, .64, 1);--ease-spring: cubic-bezier(.34, 1.56, .64, 1);--ease-out-quart: cubic-bezier(.25, 1, .5, 1)}@supports (color: oklch(.748 .229 137.6)){:root{--brand: oklch(.748 .229 137.6);--brand-dark: oklch(.633 .193 137.5);--brand-light: oklch(.801 .188 137.5);--brand-glow: oklch(.748 .229 137.6 / .35);--brand-ring: oklch(.748 .229 137.6 / .15);--accent: oklch(.718 .151 237.1);--accent-dark: oklch(.619 .155 245.4);--accent-light: oklch(.79 .13 237);--accent-glow: oklch(.718 .151 237.1 / .3);--accent-ring: oklch(.718 .151 237.1 / .15);--gold: oklch(.857 .175 88.5);--gold-dark: oklch(.72 .16 80);--gold-light: oklch(.92 .16 90);--gold-glow: oklch(.857 .175 88.5 / .45);--gold-ring: oklch(.857 .175 88.5 / .2);--warning: oklch(.671 .217 25.2);--warning-dark: oklch(.55 .21 25);--warning-light: oklch(.74 .18 25);--warning-glow: oklch(.671 .217 25.2 / .3);--warning-ring: oklch(.671 .217 25.2 / .15);--warning-tint: oklch(.671 .217 25.2 / .1);--warning-tint-border: oklch(.671 .217 25.2 / .25);--review: oklch(.7 .19 45);--review-glow: oklch(.7 .19 45 / .15);--review-tint: oklch(.7 .19 45 / .1);--exam: oklch(.627 .233 303.9);--exam-dark: oklch(.496 .237 301.9);--exam-light: oklch(.722 .177 305.5);--exam-locked: oklch(.42 .06 300);--exam-glow: oklch(.627 .233 303.9 / .35);--exam-ring: oklch(.627 .233 303.9 / .15);--surface-rail: oklch(.14 .005 270);--surface-0: oklch(.16 .005 270);--surface-1: oklch(.18 .005 270);--surface-2: oklch(.22 .005 270);--surface-3: oklch(.29 .005 270);--ink: oklch(.96 .003 270);--ink-strong: oklch(.985 0 0);--ink-muted: oklch(.7 .005 270);--ink-faint: oklch(.63 .005 270);--border: oklch(.27 .005 270);--border-faint: oklch(.22 .005 270)}}:where(button,a,[role=button],[tabindex="0"]):focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}html.light{--surface-rail: #F1F2F4;--surface-rail-rgb: 241 242 244;--surface-0: #FFFFFF;--surface-0-rgb: 255 255 255;--surface-1: #F8F8F8;--surface-1-rgb: 248 248 248;--surface-2: #FFFFFF;--surface-2-rgb: 255 255 255;--surface-3: #EAEBED;--surface-3-rgb: 234 235 237;--ink: #181818;--ink-rgb: 24 24 24;--ink-strong: #0A0A0A;--ink-strong-rgb: 10 10 10;--ink-muted: #555555;--ink-muted-rgb: 85 85 85;--ink-faint: #717171;--ink-faint-rgb: 113 113 113;--border: #E4E4E4;--border-rgb: 228 228 228;--border-faint: #EEEEEE;--border-faint-rgb: 238 238 238;--inner-highlight: rgb(255 255 255 / .3);--brand: #3C8613;--brand-rgb: 60 134 19;--brand-dark: #286600;--brand-dark-rgb: 34 103 0;--brand-light: #559A38;--brand-light-rgb: 85 154 56;--brand-glow: #3C861340;--brand-ring: #3C86132E;--accent: #006B99;--accent-rgb: 0 108 177;--accent-dark: #005183;--accent-dark-rgb: 0 79 152;--accent-light: #0084BB;--accent-light-rgb: 0 132 194;--accent-glow: #006B9938;--accent-ring: #006B992E;--gold: #B08900;--gold-rgb: 180 136 0;--gold-dark: #946900;--gold-dark-rgb: 155 101 0;--gold-light: #C7A01E;--gold-light-rgb: 199 160 30;--gold-glow: #B089004C;--gold-ring: #B0890033;--warning: #BB071E;--warning-rgb: 187 7 30;--warning-dark: #940015;--warning-dark-rgb: 158 0 0;--warning-light: #C8393A;--warning-light-rgb: 200 57 58;--warning-glow: #BB071E38;--warning-ring: #BB071E2E;--warning-tint: #BB071E14;--warning-tint-border: #BB071E38;--review: #B84B00;--review-rgb: 189 70 0;--review-glow: #B84B001F;--review-tint: #B84B0014;--exam: #7D37BD;--exam-rgb: 125 55 189;--exam-dark: #641AA5;--exam-dark-rgb: 100 26 165;--exam-light: #905FC0;--exam-light-rgb: 144 95 192;--exam-locked: #756D86;--exam-locked-mix: #A7A2B2;--exam-locked-rgb: 117 109 134;--exam-glow: #7D37BD40;--exam-ring: #7D37BD2E}@supports (color: oklch(.748 .229 137.6)){html.light{--surface-rail: oklch(.96 .003 270);--surface-0: oklch(1 0 0);--surface-1: oklch(.98 0 0);--surface-2: oklch(1 0 0);--surface-3: oklch(.94 .003 270);--ink: oklch(.21 0 0);--ink-strong: oklch(.145 0 0);--ink-muted: oklch(.45 0 0);--ink-faint: oklch(.55 0 0);--border: oklch(.92 0 0);--border-faint: oklch(.95 0 0);--brand: oklch(.55 .16 137.6);--brand-dark: oklch(.45 .15 137.6);--brand-light: oklch(.62 .15 137.6);--brand-glow: oklch(.55 .16 137.6 / .25);--brand-ring: oklch(.55 .16 137.6 / .18);--accent: oklch(.5 .16 237.1);--accent-dark: oklch(.42 .15 245.4);--accent-light: oklch(.58 .14 237);--accent-glow: oklch(.5 .16 237.1 / .22);--accent-ring: oklch(.5 .16 237.1 / .18);--gold: oklch(.65 .15 88.5);--gold-dark: oklch(.55 .14 80);--gold-light: oklch(.72 .14 90);--gold-glow: oklch(.65 .15 88.5 / .3);--gold-ring: oklch(.65 .15 88.5 / .2);--warning: oklch(.5 .2 25.2);--warning-dark: oklch(.42 .2 25);--warning-light: oklch(.56 .18 25);--warning-glow: oklch(.5 .2 25.2 / .22);--warning-ring: oklch(.5 .2 25.2 / .18);--warning-tint: oklch(.5 .2 25.2 / .08);--warning-tint-border: oklch(.5 .2 25.2 / .22);--review: oklch(.55 .17 45);--review-glow: oklch(.55 .17 45 / .12);--review-tint: oklch(.55 .17 45 / .08);--exam: oklch(.5 .2 303.9);--exam-dark: oklch(.42 .2 301.9);--exam-light: oklch(.58 .15 305.5);--exam-locked: oklch(.55 .04 300);--exam-glow: oklch(.5 .2 303.9 / .25);--exam-ring: oklch(.5 .2 303.9 / .18)}}html.light .map-rail-scope{--surface-rail: #08090B;--surface-rail-rgb: 8 9 11;--surface-0: #0C0D0F;--surface-0-rgb: 12 13 15;--surface-1: #111114;--surface-1-rgb: 17 17 20;--surface-2: #1A1A1D;--surface-2-rgb: 26 26 29;--ink: #F1F2F4;--ink-rgb: 245 245 250;--ink-strong: #FAFAFA;--ink-strong-rgb: 250 250 250;--ink-muted: #9D9EA2;--ink-muted-rgb: 166 166 176;--ink-faint: #88898C;--ink-faint-rgb: 136 137 140;--border: #252629;--border-faint: #1A1A1D}@supports (color: oklch(.748 .229 137.6)){html.light .map-rail-scope{--border: oklch(.27 .005 270);--border-faint: oklch(.22 .005 270)}}html.light .lesson-bubble-locked{background:radial-gradient(circle at 35% 30%,#858689,#68696c 60%,#545558);box-shadow:inset 0 3px 6px #00000040,inset 0 -2px 4px #ffffff26,0 2px 4px #00000026}html.light .lesson-bubble-locked:before{background:radial-gradient(ellipse at center,#ffffff40,#fff0 70%)}html.light .exam-bubble-locked{background:radial-gradient(circle at 35% 30%,#7d778a,#605a6c 60%,#4a4553);box-shadow:inset 0 3px 6px #00000040,inset 0 -2px 4px #ffffff1f,0 2px 4px #00000026}.lesson-bubble{position:relative;border-radius:9999px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(.34,1.2,.64,1);background-position:30% 25%}.lesson-bubble:before{content:"";position:absolute;top:12%;left:22%;width:38%;height:28%;border-radius:50%;background:radial-gradient(ellipse at center,var(--inner-highlight) 0%,rgb(255 255 255 / 0) 70%);pointer-events:none;z-index:1}.lesson-bubble-locked{background:radial-gradient(circle at 35% 30%,var(--surface-3) 0%,var(--surface-2) 60%,var(--surface-1) 100%);box-shadow:inset 0 3px 6px rgb(var(--shadow-rgb) / .5),inset 0 -2px 4px #ffffff0a,0 2px 4px rgb(var(--shadow-rgb) / .3)}.lesson-bubble-locked:before{background:radial-gradient(ellipse at center,#ffffff1f,#fff0 70%)}.lesson-bubble-available{background:radial-gradient(circle at 32% 28%,var(--brand-light) 0%,var(--brand) 45%,var(--brand-dark) 100%);box-shadow:0 0 0 4px var(--brand-ring),0 0 16px var(--brand-glow),0 4px 10px rgb(var(--shadow-rgb) / .25)}.lesson-bubble-available:hover{transform:translateY(-3px) scale(1.03);box-shadow:0 0 0 5px rgb(var(--brand-rgb) / .2),0 0 22px rgb(var(--brand-rgb) / .5),0 6px 14px rgb(var(--shadow-rgb) / .3)}.lesson-bubble-available:active{transform:translateY(2px) scale(.97);box-shadow:0 0 0 3px var(--brand-ring),0 0 10px rgb(var(--brand-rgb) / .3),0 2px 6px rgb(var(--shadow-rgb) / .2)}.lesson-bubble-in-progress{background:radial-gradient(circle at 32% 28%,var(--accent-light) 0%,var(--accent) 45%,var(--accent-dark) 100%);box-shadow:0 0 0 4px var(--accent-ring),0 0 14px var(--accent-glow),0 4px 10px rgb(var(--shadow-rgb) / .25)}.lesson-bubble-in-progress:hover{transform:translateY(-2px) scale(1.03);box-shadow:0 0 0 5px rgb(var(--accent-rgb) / .2),0 0 20px rgb(var(--accent-rgb) / .45),0 6px 14px rgb(var(--shadow-rgb) / .3)}.lesson-bubble-mastered{background:radial-gradient(circle at 32% 28%,var(--gold-light) 0%,var(--gold) 45%,var(--gold-dark) 100%);box-shadow:0 0 0 4px var(--gold-ring),0 0 22px var(--gold-glow),0 0 40px rgb(var(--gold-rgb) / .15),0 4px 12px rgb(var(--shadow-rgb) / .25);transform:scale(1.1)}.lesson-bubble-mastered:before{background:radial-gradient(ellipse at center,#ffffffb3,#fff0 70%)}.lesson-bubble-mastered:hover{transform:scale(1.13) translateY(-2px);box-shadow:0 0 0 5px rgb(var(--gold-rgb) / .25),0 0 28px rgb(var(--gold-rgb) / .55),0 0 50px rgb(var(--gold-rgb) / .2),0 6px 16px rgb(var(--shadow-rgb) / .3)}.exam-bubble{background:radial-gradient(circle at 32% 28%,var(--exam-light) 0%,var(--exam) 45%,var(--exam-dark) 100%);box-shadow:0 0 0 4px var(--exam-ring),0 0 16px var(--exam-glow),0 4px 10px rgb(var(--shadow-rgb) / .25)}.exam-bubble-locked{background:radial-gradient(circle at 35% 30%,var(--exam-locked) 0%,var(--exam-locked-mix) 60%,var(--surface-1) 100%);box-shadow:inset 0 3px 6px rgb(var(--shadow-rgb) / .5),inset 0 -2px 4px #ffffff0a,0 2px 4px rgb(var(--shadow-rgb) / .3)}.exam-bubble-passed{background:radial-gradient(circle at 32% 28%,rgb(var(--exam-light-rgb)) 0%,var(--exam-light) 40%,var(--exam) 100%);box-shadow:0 0 0 4px var(--gold-ring),0 0 18px var(--exam-glow),0 0 28px rgb(var(--gold-rgb) / .15),0 4px 12px rgb(var(--shadow-rgb) / .25)}@keyframes bubble-active-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.04)}}.lesson-bubble-available{animation:bubble-active-pulse 2.4s ease-in-out infinite}.env-spring .lesson-bubble{filter:hue-rotate(-12deg) saturate(1.15) brightness(1.02)}.env-summer .lesson-bubble{filter:saturate(1.4) brightness(1.08) contrast(1.05)}.env-autumn .lesson-bubble{filter:hue-rotate(-22deg) saturate(1.1) brightness(.97)}.env-winter .lesson-bubble{filter:saturate(.5) brightness(1.05) hue-rotate(8deg)}.surface-card{background:var(--surface-2);border:1px solid var(--border-faint);border-radius:1rem}@keyframes msg-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.msg-enter{animation:msg-enter .2s var(--ease-out-expo)}.proposal-card{border-color:rgb(var(--brand-rgb) / .3);padding:.75rem;background:var(--surface-2);border:1px solid var(--border-faint);border-radius:1rem;box-shadow:0 0 0 1px var(--brand-ring),0 4px 12px rgb(var(--brand-rgb) / .08)}@keyframes typing-dot{0%,60%,to{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.typing-dot{animation:typing-dot 1.2s ease-in-out infinite}.typing-dot:nth-child(2){animation-delay:.15s}.typing-dot:nth-child(3){animation-delay:.3s}@keyframes toast-enter{0%{opacity:0;transform:translateY(-12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes toast-exit{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-8px) scale(.97)}}.toast-enter{animation:toast-enter .22s var(--ease-out-back)}.toast-exit{animation:toast-exit .18s var(--ease-out-quart) forwards}@keyframes confirm-enter{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.confirm-card{animation:confirm-enter .16s var(--ease-out-back)}.map-sky-canvas{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0;display:block}.map-orb-weather-canvas{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;z-index:20;display:block}.map-path{background:transparent}.map-sky-content{position:relative;z-index:1}.map-header{z-index:30;background:linear-gradient(to bottom,rgb(var(--surface-rail-rgb) / .66) 0%,rgb(var(--surface-rail-rgb) / .5) 40%,rgb(var(--surface-rail-rgb) / .28) 65%,rgb(var(--surface-rail-rgb) / .12) 82%,rgb(var(--surface-rail-rgb) / .04) 92%,transparent 100%)}.map-header:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);-webkit-mask:linear-gradient(to bottom,black 0%,black 70%,transparent 100%);mask:linear-gradient(to bottom,black 0%,black 70%,transparent 100%)}.app-header{position:relative;background:transparent;z-index:30}.app-header:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);-webkit-mask:linear-gradient(to bottom,black 0%,black 65%,transparent 100%);mask:linear-gradient(to bottom,black 0%,black 65%,transparent 100%);background:linear-gradient(to bottom,rgb(var(--surface-1-rgb) / .85) 0%,rgb(var(--surface-1-rgb) / .55) 60%,rgb(var(--surface-1-rgb) / .15) 85%,transparent 100%)}.map-signpost{background:rgb(var(--surface-rail-rgb) / .55);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);border:1px solid rgb(var(--gold-rgb) / .18);border-top-color:rgb(var(--gold-rgb) / .35);box-shadow:0 2px 8px rgb(var(--shadow-rgb) / .35),inset 0 1px #ffffff0f}@keyframes balloon-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.balloon-bob{animation:balloon-bob var(--bob-duration, 6s) ease-in-out infinite;animation-delay:var(--bob-delay, 0s)}@keyframes path-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}.progress-ring-circle{transition:stroke-dashoffset .5s var(--ease-out-expo);transform:rotate(-90deg);transform-origin:50% 50%}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:9999px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover{background:var(--surface-3);background-clip:padding-box}html.light ::-webkit-scrollbar-thumb{background:#0000002e}html.light ::-webkit-scrollbar-thumb:hover{background:#00000047}@keyframes energy-breathe{0%,to{opacity:.78;filter:drop-shadow(0 0 0 var(--brand))}50%{opacity:1;filter:drop-shadow(0 0 4px var(--brand-glow))}}.energy-breathe{animation:energy-breathe 2s ease-in-out infinite}@keyframes flame-flicker{0%,to{transform:scale(1) rotate(-2deg)}25%{transform:scale(1.06) rotate(1deg)}50%{transform:scale(.97) rotate(-1deg)}75%{transform:scale(1.04) rotate(2deg)}}.flame-flicker{animation:flame-flicker 1.4s ease-in-out infinite;transform-origin:50% 80%}@keyframes crown-sparkle{0%,to{transform:scale(1);filter:drop-shadow(0 0 0 var(--gold))}50%{transform:scale(1.08);filter:drop-shadow(0 0 6px var(--gold-glow))}}.crown-sparkle{animation:crown-sparkle 1.6s ease-in-out infinite;display:inline-block}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}.placeholder\:text-ink-faint::-moz-placeholder{--tw-text-opacity: 1;color:rgb(var(--ink-faint-rgb) / var(--tw-text-opacity, 1))}.placeholder\:text-ink-faint::placeholder{--tw-text-opacity: 1;color:rgb(var(--ink-faint-rgb) / var(--tw-text-opacity, 1))}.placeholder\:text-white\/30::-moz-placeholder{color:#ffffff4d}.placeholder\:text-white\/30::placeholder{color:#ffffff4d}.placeholder\:text-white\/35::-moz-placeholder{color:#ffffff59}.placeholder\:text-white\/35::placeholder{color:#ffffff59}.focus-within\:bg-ink\/\[0\.07\]:focus-within{background-color:rgb(var(--ink-rgb) / .07)}.focus-within\:opacity-100:focus-within{opacity:1}.focus-within\:ring-brand\/60:focus-within{--tw-ring-color: rgb(var(--brand-rgb) / .6)}.hover\:z-30:hover{z-index:30}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-\[var\(--border\)\]:hover{border-color:var(--border)}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(var(--accent-rgb) / var(--tw-border-opacity, 1))}.hover\:border-brand:hover{--tw-border-opacity: 1;border-color:rgb(var(--brand-rgb) / var(--tw-border-opacity, 1))}.hover\:border-brand\/50:hover{border-color:rgb(var(--brand-rgb) / .5)}.hover\:border-ink-muted:hover{--tw-border-opacity: 1;border-color:rgb(var(--ink-muted-rgb) / var(--tw-border-opacity, 1))}.hover\:border-ink\/25:hover{border-color:rgb(var(--ink-rgb) / .25)}.hover\:bg-accent\/10:hover{background-color:rgb(var(--accent-rgb) / .1)}.hover\:bg-accent\/20:hover{background-color:rgb(var(--accent-rgb) / .2)}.hover\:bg-brand-light:hover{--tw-bg-opacity: 1;background-color:rgb(var(--brand-light-rgb) / var(--tw-bg-opacity, 1))}.hover\:bg-brand\/10:hover{background-color:rgb(var(--brand-rgb) / .1)}.hover\:bg-brand\/25:hover{background-color:rgb(var(--brand-rgb) / .25)}.hover\:bg-brand\/5:hover{background-color:rgb(var(--brand-rgb) / .05)}.hover\:bg-brand\/90:hover{background-color:rgb(var(--brand-rgb) / .9)}.hover\:bg-ink\/20:hover{background-color:rgb(var(--ink-rgb) / .2)}.hover\:bg-ink\/25:hover{background-color:rgb(var(--ink-rgb) / .25)}.hover\:bg-ink\/5:hover{background-color:rgb(var(--ink-rgb) / .05)}.hover\:bg-ink\/\[0\.06\]:hover{background-color:rgb(var(--ink-rgb) / .06)}.hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1))}.hover\:bg-review\/20:hover{background-color:rgb(var(--review-rgb) / .2)}.hover\:bg-review\/30:hover{background-color:rgb(var(--review-rgb) / .3)}.hover\:bg-surface-1:hover{--tw-bg-opacity: 1;background-color:rgb(var(--surface-1-rgb) / var(--tw-bg-opacity, 1))}.hover\:bg-surface-3:hover{--tw-bg-opacity: 1;background-color:rgb(var(--surface-3-rgb) / var(--tw-bg-opacity, 1))}.hover\:bg-surface-3\/50:hover{background-color:rgb(var(--surface-3-rgb) / .5)}.hover\:bg-surface-3\/60:hover{background-color:rgb(var(--surface-3-rgb) / .6)}.hover\:bg-surface-3\/80:hover{background-color:rgb(var(--surface-3-rgb) / .8)}.hover\:bg-warning:hover{--tw-bg-opacity: 1;background-color:rgb(var(--warning-rgb) / var(--tw-bg-opacity, 1))}.hover\:bg-warning\/10:hover{background-color:rgb(var(--warning-rgb) / .1)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:text-accent:hover{--tw-text-opacity: 1;color:rgb(var(--accent-rgb) / var(--tw-text-opacity, 1))}.hover\:text-brand:hover{--tw-text-opacity: 1;color:rgb(var(--brand-rgb) / var(--tw-text-opacity, 1))}.hover\:text-ink:hover{--tw-text-opacity: 1;color:rgb(var(--ink-rgb) / var(--tw-text-opacity, 1))}.hover\:text-ink-strong:hover{--tw-text-opacity: 1;color:rgb(var(--ink-strong-rgb) / var(--tw-text-opacity, 1))}.hover\:text-neutral-700:hover{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.hover\:text-warning:hover{--tw-text-opacity: 1;color:rgb(var(--warning-rgb) / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/80:hover{color:#fffc}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-accent:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(var(--accent-rgb) / var(--tw-ring-opacity, 1))}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);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)}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(var(--accent-rgb) / var(--tw-border-opacity, 1))}.focus\:border-brand:focus{--tw-border-opacity: 1;border-color:rgb(var(--brand-rgb) / var(--tw-border-opacity, 1))}.focus\:bg-ink\/\[0\.06\]:focus{background-color:rgb(var(--ink-rgb) / .06)}.focus\:bg-ink\/\[0\.08\]:focus{background-color:rgb(var(--ink-rgb) / .08)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-brand\/20:focus{--tw-ring-color: rgb(var(--brand-rgb) / .2)}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-brand\/60:focus-visible{--tw-ring-color: rgb(var(--brand-rgb) / .6)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-\[var\(--surface-2\)\]:focus-visible{--tw-ring-offset-color: var(--surface-2)}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.99\]:active{--tw-scale-x: .99;--tw-scale-y: .99;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-accent\/25:active{background-color:rgb(var(--accent-rgb) / .25)}.active\:bg-ink\/10:active{background-color:rgb(var(--ink-rgb) / .1)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-20:disabled{opacity:.2}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-60{opacity:.6}@media(prefers-reduced-motion:no-preference){.motion-safe\:transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.motion-safe\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.motion-safe\:duration-150{transition-duration:.15s}.motion-safe\:duration-200{transition-duration:.2s}.motion-safe\:ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}}.dark\:border-neutral-950:is(.dark *){--tw-border-opacity: 1;border-color:rgb(10 10 10 / var(--tw-border-opacity, 1))}.dark\:bg-ink\/10:is(.dark *){background-color:rgb(var(--ink-rgb) / .1)}.dark\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.dark\:text-neutral-100:is(.dark *){--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.dark\:text-neutral-300:is(.dark *){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.dark\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.dark\:ring-offset-neutral-950:is(.dark *){--tw-ring-offset-color: #0a0a0a}.dark\:hover\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-neutral-800\/50:hover:is(.dark *){background-color:#26262680}.dark\:hover\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.dark\:hover\:text-neutral-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}@media(min-width:640px){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\[\&_button\]\:pointer-events-auto button{pointer-events:auto}.\[\&_iframe\]\:max-w-full iframe,.\[\&_img\]\:max-w-full img,.\[\&_pre\]\:max-w-full pre{max-width:100%}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_video\]\:max-w-full video{max-width:100%}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as a,l as s,D as o,e as i}from"./mermaid.core-uJSxER2x.js";import{p as g}from"./cynefin-VYW2F7L2-CAYbjl57.js";import"./index-BC_sP79K.js";var p={parse:a(async r=>{const e=await g("info",r);s.debug(e)},"parse")},v={version:"11.16.1"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,n)=>{s.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=o(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),l={draw:c},b={parser:p,db:m,renderer:l};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./chunk-6Q2QTUOP-TBVy-R-c.js";import{p}from"./chunk-JWPE2WC7-BIAuolFx.js";import{_ as t,l as o}from"./mermaid.core-uJSxER2x.js";import{M as u,d as c}from"./cynefin-VYW2F7L2-CAYbjl57.js";import"./index-BC_sP79K.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:b,db:a,renderer:m,styles:l};export{G as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as s,r as l,d as t}from"./chunk-6Q2QTUOP-TBVy-R-c.js";import{p as m}from"./chunk-JWPE2WC7-BIAuolFx.js";import{_ as n,l as i}from"./mermaid.core-uJSxER2x.js";import{M as p,c as u}from"./cynefin-VYW2F7L2-CAYbjl57.js";import"./index-BC_sP79K.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},x={parser:y,db:t,renderer:l,styles:s};export{x as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as n}from"./mermaid.core-uJSxER2x.js";import"./index-BC_sP79K.js";var p=1;function a(){if(!(typeof globalThis>"u"))return globalThis}n(a,"getCaptureGlobal");function m(){var o;return!!((o=a())!=null&&o.mermaidCaptureSizes)}n(m,"shouldCaptureSizes");function d(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}n(d,"capturedFromLocation");function s(o,r){const e=a();if(!e)return;const t=r.node(),i=(t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t,c=(i==null?void 0:i.id)??"(unknown)";e.mermaidCapturedSizes??(e.mermaidCapturedSizes=[]);const u={svgId:c,sizes:o};e.mermaidCapturedSizes.push(u),e.mermaidLastCapturedSizes=u}n(s,"emitCapturedSizes");function l(o,r){const e=[];for(const t of r.nodes)t.isGroup||e.push({id:t.id,width:t.width??0,height:t.height??0});e.length!==0&&s({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:d()},nodes:e},o)}n(l,"captureNodeSizes");export{l as captureNodeSizes,m as shouldCaptureSizes};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as P,a as R,S as N}from"./chunk-5RXB4S5H-CmVGejcd.js";import{_ as f,c as t,d as H,l as S,e as W,k as z,P as _,Q as U,L as C,x as F}from"./mermaid.core-uJSxER2x.js";import{G as O}from"./graph-C9eacEi8.js";import{l as J}from"./layout-DEXfKzaS.js";import"./chunk-XXDRQBXY-1Ksx_dPa.js";import"./chunk-KBJHAD2P-DqcnXfI8.js";import"./chunk-2GRJ4B5K-Cy2RZsUk.js";import"./index-BC_sP79K.js";import"./map-Czzmt4hB.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;W(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},pt={parser:R,get db(){return new N(1)},renderer:it,styles:P,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{pt as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-5RXB4S5H-CmVGejcd.js";import{_ as i}from"./mermaid.core-uJSxER2x.js";import"./chunk-XXDRQBXY-1Ksx_dPa.js";import"./chunk-KBJHAD2P-DqcnXfI8.js";import"./chunk-2GRJ4B5K-Cy2RZsUk.js";import"./index-BC_sP79K.js";var u={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sizeCapture-X5ZJPWSS-uf4-mQAU.js","./mermaid.core-uJSxER2x.js","./index-BC_sP79K.js","./index-BSTI-ywB.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as Rr}from"./index-BC_sP79K.js";import{c as Nr}from"./chunk-RYQCIY6F-D5RQKqlg.js";import{am as Or,an as Pr,ao as Br,ap as kr,l as Qe,c as _r,ae as Fr,ad as Dr,af as Hr,at as Xr,av as Yr,y as Gr,as as $r,aw as zr,x as _e,ax as Ve,_ as d,ay as Po}from"./mermaid.core-uJSxER2x.js";import{G as Vr}from"./graph-C9eacEi8.js";import"./map-Czzmt4hB.js";async function Xo(t,e){const n=new Vr({multigraph:!0,compound:!0}),o=[...e.edges],s=_r(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),a=r.insert("g").attr("class","edges edgePath"),c=r.insert("g").attr("class","edgeLabels"),f=r.insert("g").attr("class","nodes"),g=new Map,p=t.node()!=null;await Promise.all(e.nodes.map(async M=>{var u;if(M.isGroup)n.setNode(M.id,{...M});else{if(p){const h=await Fr(f,M,{config:s,dir:M.dir}),l=((u=h.node())==null?void 0:u.getBBox())??{width:0,height:0};g.set(M.id,h),M.width=l.width,M.height=l.height}n.setNode(M.id,{...M})}}));for(const M of o)n.setEdge(M.start,M.end,{...M},M.id),e.edges.some(h=>h.id===M.id)||e.edges.push(M);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:M}=await Rr(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-uf4-mQAU.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3]),import.meta.url);M(t,e)}return{graph:n,groups:{clusters:i,edgePaths:a,edgeLabels:c,nodes:f,rootGroups:r},nodeElements:g}}d(Xo,"createGraphWithElements");var Bo=5,je=1e-5,Ue=1e-6;function tn(t){const e=[];for(let n=0;n<t.length-1;n++)e.push({a:t[n],b:t[n+1]});return e}d(tn,"buildSegmentList");function Yo(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,a=o.y-n.y,c=s*a-r*i;if(c===0)return null;const f=n.x-t.x,g=n.y-t.y,p=(f*a-g*i)/c,M=(f*r-g*s)/c;return p<=Ue||p>=1-Ue||M<=Ue||M>=1-Ue?null:{point:{x:t.x+p*s,y:t.y+p*r},tA:p,tB:M}}d(Yo,"segmentIntersection");function wn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(wn,"isHorizontalSeg");function Go(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],s=tn(o.points);for(let r=n+1;r<t.length;r++){const i=t[r],a=tn(i.points);for(const[c,f]of s.entries())for(const[g,p]of a.entries()){const M=Yo(f.a,f.b,p.a,p.b);if(!M)continue;const u=wn(f),h=wn(p);(u!==h?u:!1)?e.push({jumpEdgeId:o.id,otherEdgeId:i.id,segIndex:c,t:M.tA,point:M.point}):e.push({jumpEdgeId:i.id,otherEdgeId:o.id,segIndex:g,t:M.tB,point:M.point})}}}return e}d(Go,"findEdgeIntersections");function le(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}d(le,"fmt");function Oe(t){return`${le(t.x)},${le(t.y)}`}d(Oe,"pointToString");function $o(t){const e=t.b.x-t.a.x,n=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(n)?e>=0?1:0:n>=0?1:0}d($o,"getArcSweepFlag");var jr=.001;function zo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Po[e.arrowTypeStart];if(o){const r=t[0],i=t[1],a=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(a),n[0].y=r.y+o*Math.sin(a)}const s=e.arrowTypeEnd&&Po[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],a=t[r-1],c=Math.atan2(a.y-i.y,a.x-i.x);n[r-1].x=a.x-s*Math.cos(c),n[r-1].y=a.y-s*Math.sin(c)}return n}d(zo,"applyMarkerOffsets");function Vo(t,e,n,o,s){const r=t.point.x,i=t.point.y,a={x:r-e*t.r,y:i-n*t.r},c={x:r+e*t.r,y:i+n*t.r},f=[`L${Oe(a)}`];return s==="arc"?f.push(`A${le(t.r)},${le(t.r)} 0 0 ${o} ${Oe(c)}`):f.push(`M${Oe(c)}`),f}d(Vo,"emitJump");function An(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,a=n.y-e.y,c=Math.hypot(s,r),f=Math.hypot(i,a);if(c<je||f<je)return null;const g=s/c,p=r/c,M=i/f,u=a/f,h=g*M+p*u,l=Math.max(-1,Math.min(1,h)),x=Math.acos(l);if(x<je||Math.abs(Math.PI-x)<je)return null;const C=Math.min(o/Math.sin(x/2),c/2,f/2);return{startX:e.x-g*C,startY:e.y-p*C,endX:e.x+M*C,endY:e.y+u*C,ctrlX:e.x,ctrlY:e.y,cutLen:C}}d(An,"computeRoundedCorner");function jo(t,e,n){const o=t.points;if(o.length<2)return"";const s=zo(o,t),r=t.curve==="rounded",i=tn(s),a=new Map;for(const f of e){const g=i[f.segIndex];if(!g)continue;const p=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),M=a.get(f.segIndex)??[];M.push({t:f.t,point:f.point,d:f.t*p,r:n.jumpRadius}),a.set(f.segIndex,M)}const c=[`M${Oe(s[0])}`];for(let f=0;f<i.length;f++){const g=i[f],p=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),M=p===0?0:(g.b.x-g.a.x)/p,u=p===0?0:(g.b.y-g.a.y)/p,h=$o(g);let l=0;if(r&&f>0){const v=An(s[f-1],s[f],s[f+1]??s[f],Bo);v&&(l=v.cutLen)}let x=p,C=null;r&&f<i.length-1&&(C=An(s[f],s[f+1],s[f+2]??s[f+1],Bo),C&&(x=p-C.cutLen));const b=[...a.get(f)??[]].sort((v,L)=>v.t-L.t);for(const v of b)v.r=Math.min(v.r,v.d-l,x-v.d);for(let v=0;v<b.length-1;v++){const L=b[v+1].d-b[v].d;if(b[v].r+b[v+1].r>L){const y=L/2;b[v].r=Math.min(b[v].r,y),b[v+1].r=Math.min(b[v+1].r,y)}}for(const v of b)v.r<jr||c.push(...Vo(v,M,u,h,n.jumpStyle));r&&C?(c.push(`L${le(C.startX)},${le(C.startY)}`),c.push(`Q${le(C.ctrlX)},${le(C.ctrlY)} ${le(C.endX)},${le(C.endY)}`)):c.push(`L${Oe(g.b)}`)}return c.join(" ")}d(jo,"rewriteEdgePath");function Uo(t){return/^[\d\s+,.LMelm-]*$/.test(t)}d(Uo,"isStraightPath");function Wo(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}d(Wo,"curveSupportsLineHops");function Ko(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;const o=[];for(const s of n)s&&typeof s.x=="number"&&typeof s.y=="number"&&o.push({x:s.x,y:s.y});return o.length>=2?o:null}catch{return null}}d(Ko,"decodeDataPoints");function qo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const f of e)s.set(f.id,f);const r=[],i=new Map;for(const f of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(f.id):f.id,p=o.querySelector(`path[data-id="${g}"]`);if(!p)continue;i.set(f.id,p);const u=Ko(p.getAttribute("data-points"))??f.points;r.push({...f,points:u})}const a=Go(r);if(a.length===0)return;const c=new Map;for(const f of a){const g=c.get(f.jumpEdgeId)??[];g.push(f),c.set(f.jumpEdgeId,g)}for(const f of r){const g=c.get(f.id);if(!g||g.length===0)continue;const p=s.get(f.id),M=p==null?void 0:p.curve;if(M!==void 0&&!Wo(M))continue;const u=i.get(f.id);if(!u)continue;if(M===void 0){const v=u.getAttribute("d")??"";if(!Uo(v))continue}const h=u.getAttribute("style")??"",l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(h),x=l?Number.parseFloat(l[1]):null,C=l?Number.parseFloat(l[2]):null,b=jo(f,g,n);if(u.setAttribute("d",b),x!==null&&C!==null&&typeof u.getTotalLength=="function"){const v=u.getTotalLength(),L=Math.max(0,v-x-C),y=`0 ${x} ${L} ${C}`,I=h.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${y};`).replace(/;\s*;+/g,";");u.setAttribute("style",I)}}}d(qo,"applyLineJumpsToSvg");async function Jo(t,e){var s,r;for(const i of t.nodes)i.isGroup?await Dr(e.clusters,i):Hr(i);const n=new Map;for(const i of t.nodes)i!=null&&i.id&&n.set(i.id,i);for(const i of t.edges){const a=i.start?n.get(i.start)??{}:{},c=i.end?n.get(i.end)??{}:{},f=Xr(e.edgePaths,{...i},{},t.type,a,c,t.diagramId);i.label&&await Yr(e.rootGroups,i),i.label&&Zo(i,f)}const o=(r=(s=t.config)==null?void 0:s.swimlane)==null?void 0:r.lineHops;if(o!==!1){const i=o==="gap"?"gap":"arc",a=t.edges.filter(c=>Array.isArray(c.points)&&c.points.length>=2).map(c=>({id:c.id,points:c.points,curve:c.curve,arrowTypeStart:c.arrowTypeStart,arrowTypeEnd:c.arrowTypeEnd}));qo(e.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:i})}}d(Jo,"adjustLayout");function Zo(t,e){const n=(e==null?void 0:e.updatedPath)??(e==null?void 0:e.originalPath),o=Gr(),{subGraphTitleTotalMargin:s}=$r({flowchart:o.flowchart??{}});if(t.label){const r=zr.get(t.id);let i=t.x,a=t.y;if(n){const c=_e.calcLabelPosition(n);Qe.debug("Moving label "+t.label+" from (",i,",",a,") to (",c.x,",",c.y,") abc88"),e&&(i=c.x,a=c.y)}r.attr("transform",`translate(${i}, ${a+s/2})`)}if(t!=null&&t.startLabelLeft){const r=Ve.get(t.id).startLeft;let i=t==null?void 0:t.x,a=t==null?void 0:t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const r=Ve.get(t.id).startRight;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const r=Ve.get(t.id).endLeft;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const r=Ve.get(t.id).endRight;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}}d(Zo,"positionEdgeLabel");var vn="__swimlane_default__",Ur=21,ko=20;function Rn(t){return Math.max(t.padding??ko,ko)}d(Rn,"topLaneHorizontalPadding");function Qo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,a=Math.min(r,n+s/2),c=Math.min(Ur,Math.max(0,a-i)),f=i+c;if(f<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:f}}d(Qo,"assignTopLaneTitleRect");function ts(t){const e=t.direction,n=t.nodes??(t.nodes=[]);for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===vn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:vn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=vn}d(ts,"prepareLayoutForSwimlanes");function es(t){const e=new Map;for(const c of t.nodes??[])e.set(c.id,c);const n=[];for(const c of t.edges??[]){const f=typeof c.start=="string"?c.start:void 0,g=typeof c.end=="string"?c.end:void 0;!f||!g||c.labelNodeId||n.push({id:c.id,src:f,dst:g,ref:c})}const o=t.nodes??[],s=o.filter(c=>c.isGroup),r=o.filter(c=>!c.isGroup);return{nodes:[...[...s].reverse(),...r].map(c=>c.id),edges:n,layout:t,nodeById:e}}d(es,"toGraphView");function ns(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=(o==null?void 0:o.layerGap)??100,a=(o==null?void 0:o.nodeGap)??40;let c=0;for(const M of e.layers){let u=0;for(const h of M){const l=r.get(h);if(!l){u++;continue}l.layer=c,l.order=u;const x=n.x[h]??u*a,C=n.y[h]??c*i;l.x=x,l.y=C,u++}c++}const f=s.nodes??[],g=new Map,p=[];for(const M of f){if(!(M!=null&&M.isGroup))continue;M.parentId||p.push(M);const u=f.filter(b=>b.parentId===M.id);let h=1/0,l=-1/0,x=1/0,C=-1/0;for(const b of u){const v=b.x??n.x[b.id],L=b.y??n.y[b.id],y=b.width??0,I=b.height??0;v!=null&&L!=null&&(h=Math.min(h,v-y/2),l=Math.max(l,v+y/2),x=Math.min(x,L-I/2),C=Math.max(C,L+I/2))}if(h===1/0||x===1/0)M.x=M.x??0,M.y=M.y??0,M.width=M.width??0,M.height=M.height??0;else{const b=M.padding??20,v=M.parentId?b:2*Rn(M),L=b,y=Math.max(0,l-h)+v,I=Math.max(0,C-x)+L,E=(h+l)/2,A=(x+C)/2;M.x=E,M.y=A,M.width=y,M.height=I,g.set(M.id,{minX:h,maxX:l,minY:x,maxY:C})}}if(p.length>0&&g.size>0){let M=1/0,u=-1/0,h=0;for(const l of p){const x=l.padding??20;x>h&&(h=x);const C=g.get(l.id);C&&(M=Math.min(M,C.minY),u=Math.max(u,C.maxY))}if(M!==1/0&&u!==-1/0){const l=Math.max(0,u-M),C=Math.max(h,36),b=l+2*C,v=(M+u)/2;for(const B of p)B.y=v,B.height=b,B.swimlaneContentTop=M;const L=[...p].sort((B,O)=>{const k=B.x??0,H=O.x??0;return k-H}),y=[],I=[],E=[];for(const B of L){const O=g.get(B.id);if(!O)continue;const k=Math.max(0,O.maxX-O.minX)+2*Rn(B),H=(O.minX+O.maxX)/2;y.push(B.id),I.push(H),E.push(k)}const A=y.length;if(A>0){const B=new Map;if(A===1)B.set(y[0],E[0]);else{const O=[];for(let j=0;j<A-1;j++)O.push(I[j+1]-I[j]);const k=new Array(A);k[0]=0;for(let j=0;j<A-1;j++)k[j+1]=2*O[j]-k[j];let H=0,P=Number.POSITIVE_INFINITY;for(let j=0;j<A;j++){const tt=E[j];j%2===0?H=Math.max(H,tt-k[j]):P=Math.min(P,k[j]-tt)}let G=H;H<=P?G=(H+P)/2:G=H;for(let j=0;j<A;j++){const tt=k[j]+(j%2===0?G:-G),ft=Math.max(E[j],tt);B.set(y[j],ft)}}for(const O of p){const k=B.get(O.id);k!=null&&(O.width=k),Qo(O)}}}}}d(ns,"writeBackToLayoutData");var Wr="[EdgeLabelNodes]";function os(t){const e=[],n=[],o=new Map;for(const i of t.nodes)o.set(i.id,i);for(const i of t.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;const a=i.start?o.get(i.start):void 0,c=i.end?o.get(i.end):void 0;if(!a||!c){Qe.warn(Wr,`Edge ${i.id} has missing source or target node`);continue}const f=`edge-label-${i.start}-${i.end}-${i.id}`,p=a.parentId!==c.parentId?c.parentId:a.parentId,M={id:f,label:i.label,edgeStart:i.start??"",edgeEnd:i.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:p,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??"",...a.dir?{dir:a.dir}:{}};e.push(M),i.labelNodeId=f,i.label=void 0,i.text=void 0;const u={id:`${i.id}-to-label`,start:i.start,end:f,type:"normal",isLayoutOnly:!0},h={id:`${i.id}-from-label`,start:f,end:i.end,type:"normal",isLayoutOnly:!0};n.push(u,h)}const s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}d(os,"createEdgeLabelNodes");var Yt=.001;function co(t){const e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Pe(e,n,o,s)}:void 0}d(co,"measuredNodeRect");function ao(t){if(t.isGroup)return;const e=co(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(ao,"nodeBoundsInfoFor");function ce(t,e,n=Yt){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}d(ce,"samePoint");function gt(t,e,n=Yt){return Math.abs(t.x-e.x)<n}d(gt,"sameX");function yt(t,e,n=Yt){return Math.abs(t.y-e.y)<n}d(yt,"sameY");function Nt(t,e,n=Yt){return yt(t,e,n)&&Math.abs(t.x-e.x)>n}d(Nt,"isHorizontalSegment");function Ot(t,e,n=Yt){return gt(t,e,n)&&Math.abs(t.y-e.y)>n}d(Ot,"isVerticalSegment");function Wt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(Wt,"overlapLength");function de(t,e,n=Yt){return t.horizontal&&e.horizontal&&yt(t.a,e.a,n)?Wt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&>(t.a,e.a,n)?Wt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(de,"sameAxisSegmentOverlapLength");function Be(t,e=Yt){const n=[];for(let o=0;o<t.length-1;o++){const s=t[o],r=t[o+1],i=Nt(s,r,e),a=Ot(s,r,e);(i||a)&&n.push({index:o,a:s,b:r,horizontal:i,vertical:a})}return n}d(Be,"orthogonalSegmentsForPoints");function oe(t,e=Yt){const n=Be(t,e);let o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}d(oe,"countOrthogonalBends");function xt(t,e=Yt){const n=[];for(const o of t){const s=n.length>0?n[n.length-1]:void 0;(!s||!ce(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(xt,"dedupeConsecutivePoints");function lo(t,e=Yt){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Nt(n,o,e)&&Ot(o,s,e)&&Nt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:Ot(n,o,e)&&Nt(o,s,e)&&Ot(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(lo,"classifyThreeSegmentRoute");function dn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),a=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&a>n.top-o&&i<n.bottom+o}d(dn,"segmentBoundsOverlapRect");function fo(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}d(fo,"pointInsideRect");function ss(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ss,"rectContainsRect");function en(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}d(en,"rectsOverlap");function Nn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Nn,"inflateRect");function Pe(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Pe,"rectFromCenterSize");function te(t){var e;return(e=co(t))==null?void 0:e.rect}d(te,"rectOfNodeBounds");function Le(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Le,"portForRectSide");function uo(t,e,n,o,s,r=Yt){const i=e==="left"||e==="right",a=o==="left"||o==="right";if(i&&a){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(yt(t,n,r))return[t,n];const p=(t.x+n.x)/2;return[t,{x:p,y:t.y},{x:p,y:n.y},n]}if(e===o){if(yt(t,n,r))return;const p=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x:p,y:t.y},{x:p,y:n.y},n]}return}if(!i&&!a){if(e===o){if(gt(t,n,r))return;const M=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:M},{x:n.x,y:M},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(gt(t,n,r))return[t,n];const p=(t.y+n.y)/2;return[t,{x:t.x,y:p},{x:n.x,y:p},n]}if(i&&!a){const g=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,p=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return g&&p?[t,{x:n.x,y:t.y},n]:void 0}const c=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,f=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return c&&f?[t,{x:t.x,y:n.y},n]:void 0}d(uo,"buildOrthogonalPortPath");function ho(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ho,"buildSameSideTrackPath");function un(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=ao(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(un,"collectRealNodeBounds");function Me(t){const e=[],n=[];for(const o of t){const s=ao(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(Me,"collectNodeRectEntries");function rs(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,a=o.height??0;n.push({nodeId:o.id,...Pe(s,r,i,a)})}return n}d(rs,"collectLayoutNodeRects");function go(t,e,n=Yt){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)<n,collinearY:Math.abs(r.cy-i.cy)<n}}d(go,"getNodePairGeometry");function Pt(t,e,n,o=[],s=0){for(const r of n)if(!o.includes(r.id)&&dn(t,e,r.rect,-s))return!0;return!1}d(Pt,"segmentHitsAnyRect");function mo(t,e,n,o,s=Yt,r=1e-6){const i=yt(t,e,s),a=gt(t,e,s),c=yt(n,o,s),f=gt(n,o,s);if(i&&c||a&&f||!(i||a)||!(c||f))return!1;const g=i?{a:t,b:e}:{a:n,b:o},p=a?{a:t,b:e}:{a:n,b:o},M=g.a.y,u=Math.min(g.a.x,g.b.x),h=Math.max(g.a.x,g.b.x),l=p.a.x,x=Math.min(p.a.y,p.b.y),C=Math.max(p.a.y,p.b.y);if(l<u||l>h||M<x||M>C)return!1;const b=Math.abs(l-g.a.x)<r&&Math.abs(M-g.a.y)<r||Math.abs(l-g.b.x)<r&&Math.abs(M-g.b.y)<r,v=Math.abs(l-p.a.x)<r&&Math.abs(M-p.a.y)<r||Math.abs(l-p.b.x)<r&&Math.abs(M-p.b.y)<r;return!(b&&v)}d(mo,"orthogonalSegmentsCross");function is(t,e,n,o,s=Yt){const r=yt(t,e,s),i=gt(t,e,s),a=yt(n,o,s),c=gt(n,o,s);return i&&c&>(t,n,s)?Wt(t.y,e.y,n.y,o.y)>s:r&&a&&yt(t,n,s)?Wt(t.x,e.x,n.x,o.x)>s:!1}d(is,"sameAxisSegmentsOverlap");function nn(t,e,n,o,{epsilon:s=Yt,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const a=i.points;if(!(!a||a.length<2))for(let c=0;c<a.length-1;c++){const f=a[c],g=a[c+1];if(!(r&&ce(f,g,s))&&(mo(t,e,f,g,s)||is(t,e,f,g,s)))return!0}}return!1}d(nn,"segmentConflictsWithAnyEdge");function he(t,e,n,o,s=Yt){const r=yt(t,e,s),i=gt(t,e,s),a=yt(n,o,s),c=gt(n,o,s);if(!(r&&c||i&&a))return!1;const f=r?{a:t,b:e}:{a:n,b:o},g=r?{a:n,b:o}:{a:t,b:e},p=f.a.y,M=Math.min(f.a.x,f.b.x),u=Math.max(f.a.x,f.b.x),h=g.a.x,l=Math.min(g.a.y,g.b.y),x=Math.max(g.a.y,g.b.y);return h>M+s&&h<u-s&&p>l+s&&p<x-s}d(he,"orthogonalSegmentsStrictlyCross");function On(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>o+Yt&&t<s-Yt}d(On,"strictlyBetween");function cs(t,e,n){return gt(t,e)&>(e,n)?On(e.y,t.y,n.y):yt(t,e)&&yt(e,n)?On(e.x,t.x,n.x):!1}d(cs,"isCollinearIntermediate");function as(t){let e=!1;const n=[];for(let o=0;o<t.length;o++){const s=n[n.length-1],r=t[o],i=o+1<t.length?t[o+1]:void 0;if(s&&i){if(ce(s,i)){o++,e=!0;continue}if(cs(s,r,i)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}d(as,"simplifyPolylineOnce");function on(t){const e=[t[0]];for(let o=1;o<t.length;o++){const s=e[e.length-1],r=t[o];if(!gt(s,r)&&!yt(s,r)){const i=e.length>=2?e[e.length-2]:void 0,c=(i?gt(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(c)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!ce(s,o))&&n.push(o)}return n}d(on,"orthogonalizePolyline");function ue(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=as(e);if(e=o.points,!o.changed)break}return e}d(ue,"simplifyPolyline");var it=.001,Kr=.5,_o=4;function yo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;const s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?te(s):void 0,dstRect:r?te(r):void 0}}d(yo,"endpointContextFor");function ls(t,e,n){if(yt(t,e,it))return{x:t.x<n.left?n.left:n.right,y:t.y};if(gt(t,e,it)){const o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}d(ls,"segmentEnterPoint");function Pn(t,e,n){const o=n?1:-1;let s=n?0:t.length-1;for(;s>=0&&s<t.length&&fo(t[s],e,Kr);)s+=o;if(s<0||s>=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=ls(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(Pn,"clipEndpoint");function fs(t,e){for(const n of t){const o=yo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Pn(s,o.srcRect,!0)),o.dstRect&&(s=Pn(s,o.dstRect,!1)),s=ue(on(s)),s=po(s,o.srcRect,o.dstRect),o.edge.points=ue(on(s))}}d(fs,"clipEdgeEndpointsToNodeBoundaries");function Bn(t,e,n,o=!1){if(yt(t,e,it)){if(e.y<n.top-it||e.y>n.bottom+it)return e;if(o){if(t.x<n.left-it)return{x:n.left,y:t.y};if(t.x>n.right+it)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(gt(t,e,it)){if(e.x<n.left-it||e.x>n.right+it)return e;if(o){if(t.y<n.top-it)return{x:t.x,y:n.top};if(t.y>n.bottom+it)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Bn,"snapEndpointToBoundary");function sn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){const r=t[s];if(!ce(r,o,it))return r}return t[e+n]}d(sn,"firstDistinctAdjacent");function rn(t,e){const n=t+_o,o=e-_o;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}d(rn,"cornerClearanceRange");function kn(t,e,n){const{lo:o,hi:s}=rn(e,n);return Math.min(s,Math.max(o,t))}d(kn,"clampToCornerClearance");function ds(t){const e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(ds,"intersectRanges");function _n(t,e){return e==="left"||e==="right"?rn(t.top,t.bottom):rn(t.left,t.right)}d(_n,"clearanceRangeForSide");function cn(t,e,n){const o=t.y>=n.top-it&&t.y<=n.bottom+it,s=t.x>=n.left-it&&t.x<=n.right+it;if(yt(t,e,it)&&o){if(Math.abs(t.x-n.left)<it)return"left";if(Math.abs(t.x-n.right)<it)return"right"}if(gt(t,e,it)&&s){if(Math.abs(t.y-n.top)<it)return"top";if(Math.abs(t.y-n.bottom)<it)return"bottom"}}d(cn,"terminalSideForSegment");function Fe(t){return t==="left"||t==="right"}d(Fe,"isHorizontalSide");function us(t,e,n,o,s){const r=[],i=n?cn(t,e,n):void 0,a=o?cn(e,t,o):void 0;return n&&i&&Fe(i)===s&&r.push(_n(n,i)),o&&a&&Fe(a)===s&&r.push(_n(o,a)),r.length>0?ds(r):void 0}d(us,"straightClearanceRange");function Fn(t,e,n,o,s){const r=us(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,a=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(a-i)<it))return s?[{x:t.x,y:a},{x:e.x,y:a}]:[{x:a,y:t.y},{x:a,y:e.y}]}d(Fn,"clearStraightEndpointCornerAxis");function po(t,e,n){if(t.length!==2)return t;const[o,s]=t;return yt(o,s,it)?Fn(o,s,e,n,!0)??t:gt(o,s,it)?Fn(o,s,e,n,!1)??t:t}d(po,"clearStraightEndpointCornerConnections");function hs(t,e,n){return Fe(n)?{x:t.x,y:kn(t.y,e.top,e.bottom)}:{x:kn(t.x,e.left,e.right),y:t.y}}d(hs,"cornerClearedEndpoint");function gs(t,e,n,o,s,r){const i=t.map(a=>({...a}));for(let a=e;a>=0&&a<t.length;a+=n){const c=t[a];if(r&&!yt(c,o,it)||!r&&!gt(c,o,it))break;r?i[a].y=s.y:i[a].x=s.x}return i}d(gs,"moveCollinearEndpointRun");function Dn(t,e,n){if(t.length<2)return t;const o=n?0:t.length-1,s=n?1:-1,r=t[o],i=sn(t,o,s);if(!i)return t;const a=cn(r,i,e);if(!a)return t;const c=Fe(a),f=hs(r,e,a);return ce(r,f,it)?t:gs(t,o,s,r,f,c)}d(Dn,"clearEndpointCornerConnection");function Hn(t,e,n){const o=Math.min(t.x,e.x)>=n.left-it&&Math.max(t.x,e.x)<=n.right+it,s=Math.min(t.y,e.y)>=n.top-it&&Math.max(t.y,e.y)<=n.bottom+it;if(Math.abs(t.y-n.top)<it&&Math.abs(e.y-n.top)<it&&o)return"top";if(Math.abs(t.y-n.bottom)<it&&Math.abs(e.y-n.bottom)<it&&o)return"bottom";if(Math.abs(t.x-n.left)<it&&Math.abs(e.x-n.left)<it&&s)return"left";if(Math.abs(t.x-n.right)<it&&Math.abs(e.x-n.right)<it&&s)return"right"}d(Hn,"borderSideForSegment");function Xn(t,e,n,o){switch(t){case"top":return gt(e,n,it)&&n.y<o.top-it;case"bottom":return gt(e,n,it)&&n.y>o.bottom+it;case"left":return yt(e,n,it)&&n.x<o.left-it;case"right":return yt(e,n,it)&&n.x>o.right+it}}d(Xn,"leavesOutward");function Yn(t,e,n){if(t.length<3)return t;if(n){const r=Hn(t[0],t[1],e);return r&&Xn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Hn(t[o-1],t[o],e);return s&&Xn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Yn,"collapseOwnBorderStub");function ms(t,e,n){let o=t;if(e){const r=sn(o,0,1);if(r){const i=Bn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Yn(o,e,!0)}if(n){const r=o.length-1,i=sn(o,r,-1);if(i){const a=Bn(i,o[r],n,!0);a!==o[r]&&(o=[...o.slice(0,r),a])}o=Yn(o,n,!1)}const s=po(o,e,n);return s!==o||o.length===2?s:(e&&(o=Dn(o,e,!0)),n&&(o=Dn(o,n,!1)),o)}d(ms,"snapAndCollapseEndpoints");function Gn(t,e){for(const n of t){const o=yo(n,e,2);if(!o)continue;const s=xt(o.points,it),r=ms(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Gn,"prepareEdgeEndpointsForRenderer");function xo(t){return new Map(t.map(e=>[e.id,e]))}d(xo,"buildNodeMap");function ys(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!(s!=null&&s.isGroup))break;o=s.id,n=s.parentId}return o}d(ys,"resolveTopLevelGroupId");function $n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!(s!=null&&s.isGroup))break;n++,o=s.parentId}return n}d($n,"groupDepth");function bo(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,a=r.y;if(typeof i!="number"||typeof a!="number")continue;const c=r.width??0,f=r.height??0;e=Math.min(e,i-c/2),n=Math.max(n,i+c/2),o=Math.min(o,a-f/2),s=Math.max(s,a+f/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(bo,"boundsForChildren");function ps(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ps,"applyGroupBounds");function xs(t){const e=xo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>$n(s,e)-$n(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=bo(s);r&&ps(o,r)}}d(xs,"recomputeNestedGroupBounds");function an(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);let r=1/0,i=-1/0;for(const c of s){const f=c[e];typeof f=="number"&&(r=Math.min(r,f),i=Math.max(i,f))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const a=d(c=>r+i-c,"mirror");for(const c of n){const f=c[e];typeof f=="number"&&(c[e]=a(f));const g=c.groupTitleRect;g&&(c.groupTitleRect=e==="x"?{...g,left:a(g.right),right:a(g.left)}:{...g,top:a(g.bottom),bottom:a(g.top)})}for(const c of o)for(const f of c.points??[])f[e]=a(f[e]);return!0}d(an,"mirrorAxis");function bs(t){return(t.nodes??[]).some(n=>!n.isGroup)?an(t,"y"):!0}d(bs,"applyBtDirectionTransform");function Ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G<r&&(r=G),j<i&&(i=j)}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const a=36;let c=0,f=0;for(const P of s)c+=P.width??0,f+=P.height??0;const g=c/s.length,p=f/s.length,M=p>0?Math.max(1,g/p):1;for(const P of s){const G=P.x??0,tt=((P.y??0)-i)*M+a,ft=G-r;P.x=tt,P.y=ft}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,ft=(G.y-i)*M+a,Mt=j-r;G.x=ft,G.y=Mt}xs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&an(t,"x"),!0;const h=xo(n),l=new Map;for(const P of n){if(P.isGroup)continue;const G=ys(P,h);if(!G)continue;const j=l.get(G)??[];j.push(P),l.set(G,j)}let x=0;for(const P of u){const G=P.padding??0;G>x&&(x=G)}const C=[];let b=1/0,v=-1/0;for(const P of u){const G=l.get(P.id)??[],j=bo(G);j&&(b=Math.min(b,j.minX),v=Math.max(v,j.maxX),C.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(b===1/0||v===-1/0)return!0;const L=Math.max(0,v-b),y=Math.max(x,10),I=L+2*y,E=a+I,O=(b+v)/2-I/2-a,k=O+E/2,H=Math.max(x,a);C.sort((P,G)=>P.centerY-G.centerY);for(let P=0;P<C.length;P++){const G=C[P];let j,tt;if(P===0?j=G.contentTop-H:j=(C[P-1].contentBottom+G.contentTop)/2,P===C.length-1)tt=G.contentBottom+H;else{const Ht=C[P+1];tt=(G.contentBottom+Ht.contentTop)/2}const ft=Math.max(0,tt-j),Mt=(j+tt)/2;G.lane.x=k,G.lane.y=Mt,G.lane.width=E,G.lane.height=ft,G.lane.swimlaneContentTop=G.contentTop,G.lane.groupTitleRect={left:O,right:O+a,top:j,bottom:tt}}return e==="RL"&&an(t,"x"),!0}d(Ms,"applyLrDirectionTransform");var ae=1e-6,qr=8,We=qr,Jr=[0,We,-We,2*We,-2*We];function Is(t,e){const{nodeInfoById:n,realNodeRects:o}=un(e);for(const s of t){if(s.isLayoutOnly)continue;const r=s.points;if(!r||r.length<4)continue;const i=lo(xt(r,ae),ae);if(!i)continue;const{p3:a}=i,c=i.kind==="HVH",f=go(s,n,ae);if(!f)continue;const{srcId:g,dstId:p,srcInfo:M,dstInfo:u,collinearX:h,collinearY:l}=f;if(h||l)continue;let x;const C=M.rect;for(const b of Jr){let v,L,y;if(c){const k=u.cy>M.cy?C.bottom:C.top,H=M.cx+b;if(H<=C.left+ae||H>=C.right-ae)continue;v={x:H,y:k},L={x:H,y:a.y},y={x:a.x,y:a.y}}else{const k=u.cx>M.cx?C.right:C.left,H=M.cy+b;if(H<=C.top+ae||H>=C.bottom-ae)continue;v={x:k,y:H},L={x:a.x,y:H},y={x:a.x,y:a.y}}const I=ce(v,L,ae),E=ce(L,y,ae);if(I&&E||!I&&Pt(v,L,o,[g],1)||!E&&Pt(L,y,o,[p],1))continue;const A=!I&&nn(v,L,t,s,{epsilon:ae,skipDegenerateOther:!0}),B=!E&&nn(L,y,t,s,{epsilon:ae,skipDegenerateOther:!0});if(!(A||B)){I?x=[L,y]:E?x=[v,L]:x=[v,L,y];break}}x&&(s.points=x)}}d(Is,"portSwapToLShape");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values());for(const a of t){if(a.isLayoutOnly)continue;const c=a.points;if(!c||c.length<4)continue;const f=xt(c,.001);if(f.length<4)continue;const g=f.length-1,p=f[g],M=f[g-1],u=f[g-2],h=p.x-M.x,l=p.y-M.y,x=Math.hypot(h,l);if(x>=10||x<.001)continue;const C=M.x-u.x,b=M.y-u.y;if(Math.hypot(C,b)<.001)continue;const L=Nt(M,p,.001),y=Ot(M,p,.001),I=Nt(u,M,.001),E=Ot(u,M,.001);if(!(L&&E||y&&I))continue;const A=a.end,B=a.start,O=A?e.get(A):void 0;if(!O)continue;const k=O.x??0,H=O.y??0,P=te(O);if(!P)continue;let G,j;if(E){const J=b<0;G={x:k,y:u.y},j={x:k,y:J?P.bottom:P.top}}else{const J=C>0;G={x:u.x,y:H},j={x:J?P.right:P.left,y:H}}if(Pt(G,j,r,A?[A]:[],-2)||Pt(G,j,i,[],-2))continue;if(B){const J=e.get(B),rt=J?te(J):void 0;if(rt&&fo(G,rt,2))continue}const tt=d((J,rt)=>`${J.x.toFixed(3)},${J.y.toFixed(3)}|${rt.x.toFixed(3)},${rt.y.toFixed(3)}`,"ownSegmentKey"),ft=new Set;for(let J=0;J<f.length-1;J++)ft.add(tt(f[J],f[J+1]));const Mt=d((J,rt)=>{for(const ut of t){if(ut===a||ut.isLayoutOnly)continue;const pt=ut.points;if(!(!pt||pt.length<2))for(let St=0;St<pt.length-1;St++){const wt=pt[St],Kt=pt[St+1];if(!ft.has(tt(wt,Kt))&&he(J,rt,wt,Kt,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(Mt(G,j))continue;if(g-3>=0){const J=f[g-3],rt=[B,A].filter(ut=>!!ut);if(Pt(J,G,r,rt,-2)||Mt(J,G))continue}const Ft=[...f.slice(0,g-2),G,j];a.points=Ft;const nt=a.labelNodeId;if(nt){const J=e.get(nt);if(J){const rt=J.width??0,ut=J.height??0;if(rt>0&&ut>0){let pt,St,wt=-1;for(let Kt=0;Kt<Ft.length-1;Kt++){const qt=Ft[Kt],Jt=Ft[Kt+1],se=Math.hypot(Jt.x-qt.x,Jt.y-qt.y),Ee=yt(qt,Jt,.001),me=gt(qt,Jt,.001);(Ee&&se>=rt+2||me&&se>=ut+2)&&se>wt&&(wt=se,pt=(qt.x+Jt.x)/2,St=(qt.y+Jt.y)/2)}pt!==void 0&&St!==void 0&&(J.x=pt,J.y=St)}}}}}d(Ss,"collapseShortTerminalStub");var et=.001,Xt=8,at=Be,Ln=d((t,e)=>gt(t,e,et)||yt(t,e,et),"orthogonallyAligned");function Cs(t,e){const s=d((u,h)=>{const l=u.x??0,x=u.y??0,C=h.x-l,b=h.y-x;let v=(u.width??0)/2,L=(u.height??0)/2;return Math.abs(b)*v>Math.abs(C)*L?(b<0&&(L=-L),{x:l+(b===0?0:L*C/b),y:x+L}):(C<0&&(v=-v),{x:l+v,y:x+(C===0?0:v*b/C)})},"rectIntersect"),r=d((u,h)=>{const l=xt(u.points??[]);if(l.length<2)return;const x=h?u.start:u.end,C=x?e.get(x):void 0,b=C?te(C):void 0;if(!C||!x||!b)return;const v=h?l[0]:l[l.length-1],L=h?l[1]:l[l.length-2],y=s(C,v);let I=v;if(Ln(L,y)&&(I=L),gt(y,I,et))return{edge:u,edgeId:String(u.id??""),nodeId:x,atStart:h,orientation:"V",coord:y.x,min:Math.min(y.y,I.y),max:Math.max(y.y,I.y),boundary:y,railEnd:I,rect:b};if(yt(y,I,et))return{edge:u,edgeId:String(u.id??""),nodeId:x,atStart:h,orientation:"H",coord:y.y,min:Math.min(y.x,I.x),max:Math.max(y.x,I.x),boundary:y,railEnd:I,rect:b}},"terminalLaneFor"),i=d((u,h)=>Math.max(0,Math.min(u.max,h.max)-Math.max(u.min,h.min)),"projectedOverlapLength"),a=d((u,h)=>u.nodeId!==h.nodeId||u.orientation!==h.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&>(u.boundary,h.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&yt(u.boundary,h.boundary,1),"sameTerminalFace"),c=d((u,h)=>u.nodeId!==h.nodeId||u.orientation!==h.orientation?!1:i(u,h)>=Xt&&Math.abs(u.coord-h.coord)<.5,"exactTerminalLaneConflict"),f=d((u,h)=>{if(u.nodeId!==h.nodeId||u.orientation!==h.orientation||u.orientation!=="H"||u.atStart===h.atStart)return!1;const l=i(u,h);if(l<Xt)return!1;const x=u.rect.bottom-u.rect.top;return l<x||l>2*x?!1:a(u,h)&&Math.abs(u.coord-h.coord)<16},"nearTerminalLaneConflict"),g=d((u,h)=>{const l=xt(u.edge.points??[]);if(l.length<2)return;const x=u.orientation==="V"?{x:u.boundary.x+h,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+h},C=u.orientation==="V"?{x:u.railEnd.x+h,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+h};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?yt(x,u.boundary,et)&&x.x>=u.rect.left+1&&x.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?gt(x,u.boundary,et)&&x.y>=u.rect.top+1&&x.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const I=l.length>1&&ce(l[1],u.railEnd,et),E=l.slice(I?2:1),A=E[0];return A&&!Ln(A,C)?void 0:[x,C,...E]}const v=l.length>1&&ce(l[l.length-2],u.railEnd,et),L=l.slice(0,v?-2:-1),y=L[L.length-1];if(!(y&&!Ln(y,C)))return[...L,C,x]},"shiftedCandidate"),p=d(u=>{const h=u.edge,l=xt(h.points??[]);if(l.length!==2)return!1;const x=h.start,C=h.end,b=x?e.get(x):void 0,v=C?e.get(C):void 0;if(!b||!v)return!1;const L=b.x??0,y=b.y??0,I=v.x??0,E=v.y??0,[A,B]=l;return yt(A,B,et)&&Math.abs(y-E)<1&&Math.abs(L-I)>1||gt(A,B,et)&&Math.abs(L-I)<1&&Math.abs(y-E)>1},"laneIsStraightCollinearConnector"),M=[-7,7,-14,14,-21,21];for(let u=0;u<8;u++){const h=t.filter(x=>!x.isLayoutOnly).flatMap(x=>[r(x,!0),r(x,!1)]).filter(x=>!!x);let l=!1;for(let x=0;x<h.length&&!l;x++)for(let C=x+1;C<h.length&&!l;C++){const b=h[x],v=h[C];if(b.edge===v.edge||!(c(b,v)||f(b,v)))continue;const L=!c(b,v),y=[b,v].sort((I,E)=>{const A=p(I),B=p(E);return A!==B?Number(A)-Number(B):+!E.atStart-+!I.atStart});for(const I of y){for(const E of M){const A=g(I,E);if(!A)continue;const B=r({...I.edge,points:A},I.atStart);if(!(!B||h.some(O=>O.edge!==I.edge&&(c(B,O)||L&&f(B,O))))){I.edge.points=A,l=!0;break}}if(l)break}}if(!l)return}}d(Cs,"separateSharedRenderedTerminalLanes");function vs(t,e){const{realNodeRects:o,labelNodeRects:s}=Me(e.values()),r=d((a,c)=>{const f=a.start,g=a.end,p=at(c);if(p.length!==c.length-1)return!1;const M=[f,g].filter(u=>!!u);for(const u of p)if(Pt(u.a,u.b,o,M,-2)||Pt(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===a||u.isLayoutOnly)continue;const h=u.points;if(!(!h||h.length<2)){for(const l of p)for(const x of at(xt(h)))if(de(l,x,.5)>=Xt||he(l.a,l.b,x.a,x.b,et))return!1}}return!0},"candidateIsSafe"),i=d((a,c)=>{if(c+4>=a.length)return;const f=a[c],g=a[c+1],p=a[c+2],M=a[c+3],u=a[c+4],h=Nt(f,g)&&Ot(g,p)&&Nt(p,M)&&Ot(M,u)&>(f,M,et)&>(f,u,et)&>(g,p,et)&&(g.x-f.x)*(M.x-p.x)<0,l=Ot(f,g)&&Nt(g,p)&&Ot(p,M)&&Nt(M,u)&&yt(f,M,et)&&yt(f,u,et)&&yt(g,p,et)&&(g.y-f.y)*(M.y-p.y)<0;if(h||l)return xt([...a.slice(0,c+1),u,...a.slice(c+5)]);if(c+5>=a.length)return;const x=a[c+5],C=Ot(f,g)&&Nt(g,p)&&Ot(p,M)&&Nt(M,u)&&Ot(u,x)&>(f,u,et)&>(f,x,et)&>(p,M,et)&&(p.x-g.x)*(u.x-M.x)<0,b=Nt(f,g)&&Ot(g,p)&&Nt(p,M)&&Ot(M,u)&&Nt(u,x)&&yt(f,u,et)&&yt(f,x,et)&&yt(p,M,et)&&(p.y-g.y)*(u.y-M.y)<0;if(!(!C&&!b))return xt([...a.slice(0,c+1),x,...a.slice(c+6)])},"withoutDogleg");for(let a=0;a<8;a++){let c=!1;for(const f of t){if(f.isLayoutOnly)continue;const g=xt(f.points??[]);for(let p=0;p<=g.length-5;p++){const M=i(g,p);if(!(!M||!r(f,M))){f.points=M,c=!0;break}}if(c)break}if(!c)return}}d(vs,"collapseRedundantRectangularDoglegs");function zn(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values()),a=t.filter(h=>!h.isLayoutOnly),c=d((h,l,x)=>xt(h===l?x??[]:h.points??[]),"pointsFor"),f=d((h,l)=>{let x=0;for(let C=0;C<a.length;C++){const b=at(c(a[C],h,l));for(let v=C+1;v<a.length;v++){const L=at(c(a[v],h,l));for(const y of b)for(const I of L)he(y.a,y.b,I.a,I.b,et)&&x++}}return x},"strictCrossingCount"),g=d(h=>{const l=at(h);if(l.length!==3)return;const x=l[1];if(!(l[0].horizontal===x.horizontal||l[2].horizontal===x.horizontal))return{index:x.index,horizontal:x.horizontal,vertical:x.vertical,segment:x}},"middleRail"),p=d((h,l)=>{const x=[h.start,h.end].filter(C=>!!C);return r.filter(C=>{if(x.includes(C.id))return!1;const b=C.rect;return l.horizontal?Wt(l.a.x,l.b.x,b.left,b.right)>=Xt&&l.a.y>=b.top-2&&l.a.y<=b.bottom+2:Wt(l.a.y,l.b.y,b.top,b.bottom)>=Xt&&l.a.x>=b.left-2&&l.a.x<=b.right+2})},"blockingRectsFor"),M=d((h,l,x)=>{const C=h.map(v=>({...v}));if(l.horizontal)C[l.index].y=x,C[l.index+1].y=x;else if(l.vertical)C[l.index].x=x,C[l.index+1].x=x;else return;const b=ue(xt(C));return at(b).length===b.length-1?b:void 0},"candidateByMovingRail"),u=d((h,l,x)=>{const C=[h.start,h.end].filter(v=>!!v),b=at(l);if(b.length!==l.length-1)return!1;for(const v of b)if(Pt(v.a,v.b,r,C,-2)||Pt(v.a,v.b,i,[],-2))return!1;for(const v of a)if(v!==h){for(const L of b)for(const y of at(c(v)))if(de(L,y,.5)>=Xt)return!1}return f(h,l)<=x},"candidateIsSafe");for(let h=0;h<8;h++){const l=f();let x=!1;for(const C of a){const b=c(C),v=g(b);if(!v)continue;const L=p(C,v.segment);if(L.length===0)continue;const y=v.horizontal?[Math.min(...L.map(I=>I.rect.top))-20,Math.max(...L.map(I=>I.rect.bottom))+20]:[Math.min(...L.map(I=>I.rect.left))-20,Math.max(...L.map(I=>I.rect.right))+20];for(const I of y){const E=M(b,v.segment,I);if(!(!E||!u(C,E,l))){C.points=E,x=!0;break}}if(x)break}if(!x)return}}d(zn,"liftObstacleHuggingSameSideRails");function Vn(t,e){const o=d(c=>{const f=c.groupTitleRect;if(!(!f||typeof f.left!="number"||typeof f.right!="number"||typeof f.top!="number"||typeof f.bottom!="number"||!Number.isFinite(f.left)||!Number.isFinite(f.right)||!Number.isFinite(f.top)||!Number.isFinite(f.bottom)||f.right<=f.left||f.bottom<=f.top))return{left:f.left,right:f.right,top:f.top,bottom:f.bottom}},"validTitleRect"),s=d(c=>{if(!c.isGroup||c.parentId)return;const f=c.direction,g=typeof f=="string"?f.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const p=o(c),M=c.y,u=c.height;if(!p||typeof M!="number"||typeof u!="number"||!Number.isFinite(M)||!Number.isFinite(u)||u<=0)return;const h=p.right-p.left,l=p.bottom-p.top;if(!(l<=0||h<l))return{node:c,rect:p}},"topLaneTitleFor"),r=d((c,f)=>{if(!c.horizontal)return!1;const g=c.a.y;return g<=f.top+et||g>=f.bottom-et?!1:Wt(c.a.x,c.b.x,f.left,f.right)>=Xt},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(c=>!!c);if(i.length===0)return;let a=0;for(const c of t){if(c.isLayoutOnly)continue;const f=xt(c.points??[]);for(const g of at(f))for(const p of i)r(g,p.rect)&&(a=Math.max(a,p.rect.bottom-g.a.y+4))}if(!(a<=et))for(const c of i){const f=c.node.y,g=c.node.height;typeof f!="number"||typeof g!="number"||!Number.isFinite(f)||!Number.isFinite(g)||g<=0||(c.node.y=f-a/2,c.node.height=g+a,c.node.groupTitleRect={...c.rect,top:c.rect.top-a,bottom:c.rect.bottom-a})}}d(Vn,"liftTopLaneTitleBandsAboveRails");function jn(t,e){const o=d(f=>{const g=f.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId||f.direction!=="LR")return;const p=o(f),M=f.x,u=f.width;if(!p||typeof M!="number"||typeof u!="number"||!Number.isFinite(M)||!Number.isFinite(u)||u<=0)return;const h=p.right-p.left,l=p.bottom-p.top;if(!(h<=0||l<h))return{node:f,rect:p}},"leftLaneTitleFor"),r=d((f,g)=>{if(!f.vertical)return!1;const p=f.a.x;return p<=g.left+et||p>=g.right-et?!1:Wt(f.a.y,f.b.y,g.top,g.bottom)>=Xt},"verticalSegmentIntersectsTitle"),i=d((f,g)=>{if(!f.horizontal)return!1;const p=f.a.y;return p<=g.top+et||p>=g.bottom-et?!1:Wt(f.a.x,f.b.x,g.left,g.right)>=Xt},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let c=0;for(const f of t){if(f.isLayoutOnly)continue;const g=xt(f.points??[]);for(const p of at(g))for(const M of a)if(r(p,M.rect))c=Math.max(c,M.rect.right-p.a.x+4);else if(i(p,M.rect)){const u=Math.min(p.a.x,p.b.x);c=Math.max(c,M.rect.right-u+4)}}if(!(c<=et))for(const f of a){const g=f.node.x,p=f.node.width;typeof g!="number"||typeof p!="number"||!Number.isFinite(g)||!Number.isFinite(p)||p<=0||(f.node.x=g-c/2,f.node.width=p+c,f.node.groupTitleRect={...f.rect,left:f.rect.left-c,right:f.rect.right-c})}}d(jn,"shiftLeftLaneTitleBandsLeftOfRails");function Ls(t,e){const{realNodeRects:o}=Me(e.values()),s=t.filter(h=>!h.isLayoutOnly),r=d((h,l=new Map)=>xt(l.get(h)??h.points??[]),"replacementPointsFor"),i=d((h=new Map)=>{let l=0;for(let x=0;x<s.length;x++){const C=at(r(s[x],h));for(let b=x+1;b<s.length;b++){const v=at(r(s[b],h));for(const L of C)for(const y of v)he(L.a,L.b,y.a,y.b,et)&&l++}}return l},"crossingCount"),a=d((h=new Map)=>s.reduce((l,x)=>l+oe(r(x,h)),0),"totalBends"),c=d(h=>{const l=r(h);if(l.length<4)return;const x=l[l.length-2],C=l[l.length-1];if(!(!Nt(x,C,et)&&!Ot(x,C,et)))return{tailStart:x,terminal:C}},"terminalTailFor"),f=d((h,l)=>{const x=r(h);if(x.length<3)return;const C=x[0],b=x[1];let v;if(Nt(C,b,et))v={x:b.x,y:l.tailStart.y};else if(Ot(C,b,et))v={x:l.tailStart.x,y:b.y};else return;const L=ue(xt([C,b,v,l.tailStart,l.terminal]));return at(L).length===L.length-1?L:void 0},"candidateWithDestinationTail"),g=d((h,l)=>{const x=[h.start,h.end].filter(C=>!!C);for(const C of at(l))if(Pt(C.a,C.b,o,x,-2))return!0;return!1},"pathHasNodeHit"),p=d((h,l,x)=>{for(const C of s)if(C!==h){for(const b of at(l))for(const v of at(r(C,x)))if(de(b,v,.5)>=Xt)return!0}return!1},"pathHasSharedTrack"),M=d((h,l,x)=>!g(h,l)&&!p(h,l,x),"candidateIsSafe"),u=d(()=>{const h=new Map;for(const l of s){const x=l.end;if(!x||!e.has(x)||r(l).length<4)continue;const b=h.get(x)??[];b.push(l),h.set(x,b)}return h},"edgesByDestination");for(let h=0;h<4;h++){const l=i();if(l===0)return;const x=a();let C,b=l,v=x;for(const L of u().values())for(let y=0;y<L.length;y++)for(let I=y+1;I<L.length;I++){const E=L[y],A=L[I],B=c(E),O=c(A);if(!B||!O)continue;const k=f(E,O),H=f(A,B);if(!k||!H)continue;const P=new Map([[E,k],[A,H]]);if(!M(E,k,P)||!M(A,H,P))continue;const G=i(P),j=a(P);G>=l||G>b||G===b&&j>=v||(C=P,b=G,v=j)}if(!C)return;for(const[L,y]of C)L.points=y}}d(Ls,"swapDestinationTerminalTailsToReduceCrossings");function Es(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values()),a=t.filter(L=>!L.isLayoutOnly),c=d((L,y=new Map)=>xt(y.get(L)??L.points??[]),"replacementPointsFor"),f=d((L=new Map)=>{let y=0;for(let I=0;I<a.length;I++){const E=at(c(a[I],L));for(let A=I+1;A<a.length;A++){const B=at(c(a[A],L));for(const O of E)for(const k of B)he(O.a,O.b,k.a,k.b,et)&&y++}}return y},"strictCrossingCount"),g=d((L=new Map)=>a.reduce((y,I)=>y+oe(c(I,L)),0),"totalBends"),p=d(L=>{const y=L.start,I=L.end,E=y?e.get(y):void 0,A=I?e.get(I):void 0,B=E?te(E):void 0,O=A?te(A):void 0;return B&&O?{src:B,dst:O}:void 0},"endpointRectsFor"),M=d((L,y,I)=>{if(I.index<=0||I.index+1>=y.length-1)return;const E=p(L);if(E){if(I.vertical){const A=I.a.x,B=Math.min(E.src.left,E.dst.left),O=Math.max(E.src.right,E.dst.right),k=A<B-et?"left":A>O+et?"right":void 0;return k?{edge:L,points:y,segmentIndex:I.index,axis:"vertical",side:k,coord:A,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const A=I.a.y,B=Math.min(E.src.top,E.dst.top),O=Math.max(E.src.bottom,E.dst.bottom),k=A<B-et?"top":A>O+et?"bottom":void 0;return k?{edge:L,points:y,segmentIndex:I.index,axis:"horizontal",side:k,coord:A,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const L=[];for(const y of a){const I=c(y);for(const E of at(I)){const A=M(y,I,E);A&&L.push(A)}}return L},"collectExternalRails"),h=d((L,y)=>L.edge!==y.edge&&L.axis===y.axis&&L.side===y.side&&Wt(L.min,L.max,y.min,y.max)>=Xt,"railsInteract"),l=d(L=>{const y=[],I=new Set;for(const E of L){if(I.has(E))continue;const A=[E],B=[];for(I.add(E);A.length>0;){const O=A.pop();B.push(O);for(const k of L)!I.has(k)&&h(O,k)&&(I.add(k),A.push(k))}B.length>1&&y.push(B)}return y},"connectedComponents"),x=d(L=>{const y=[];for(const I of L)y.some(E=>Math.abs(E-I.coord)<et)||y.push(I.coord);for(;y.length<L.length;){const I=Math.min(...y),E=Math.max(...y),A=L[0].side;y.push(A==="left"||A==="top"?I-12*(L.length-y.length):E+12*(L.length-y.length))}return y},"uniqueCoordsFor"),C=d(L=>{const y=L.map(A=>A.coord),I=x(L),E=[];if(L.length<=6){const A=new Array(I.length).fill(!1),B=[],O=d(()=>{if(B.length===L.length){B.some((k,H)=>Math.abs(k-y[H])>=et)&&E.push([...B]);return}for(const[k,H]of I.entries())A[k]||(A[k]=!0,B.push(H),O(),B.pop(),A[k]=!1)},"visit");return O(),E}for(let A=0;A<y.length;A++)for(let B=A+1;B<y.length;B++){const O=[...y];[O[A],O[B]]=[O[B],O[A]],E.push(O)}return E},"coordinateAssignmentsFor"),b=d((L,y)=>{const I=new Map;for(const[A,B]of L.entries()){const O=y[A],k=I.get(B.edge)??B.points.map(H=>({x:H.x,y:H.y}));B.axis==="vertical"?(k[B.segmentIndex].x=O,k[B.segmentIndex+1].x=O):(k[B.segmentIndex].y=O,k[B.segmentIndex+1].y=O),I.set(B.edge,k)}const E=new Map;for(const[A,B]of I){const O=ue(xt(B));if(at(O).length!==O.length-1)return;E.set(A,O)}return E},"replacementsForAssignment"),v=d(L=>{for(const[y,I]of L){const E=[y.start,y.end].filter(A=>!!A);for(const A of at(I))if(Pt(A.a,A.b,r,E,-2)||Pt(A.a,A.b,i,[],-2))return!1}for(let y=0;y<a.length;y++){const I=a[y],E=L.has(I),A=at(c(I,L));for(let B=y+1;B<a.length;B++){const O=a[B];if(!E&&!L.has(O))continue;const k=at(c(O,L));for(const H of A)for(const P of k)if(de(H,P,.5)>=Xt)return!1}}return!0},"candidateIsSafe");for(let L=0;L<4;L++){const y=f();if(y===0)return;let I,E=y,A=g(),B=Number.POSITIVE_INFINITY;for(const O of l(u()))for(const k of C(O)){const H=b(O,k);if(!H||!v(H))continue;const P=f(H);if(P>=y)continue;const G=g(H),j=O.reduce((tt,ft,Mt)=>tt+Math.abs(k[Mt]-ft.coord),0);P>E||P===E&&(G>A||G===A&&j>=B)||(I=H,E=P,A=G,B=j)}if(!I)return;for(const[O,k]of I)O.points=k}}d(Es,"reassignCrossingExternalRailChannels");function Ts(t,e){const{realNodeRects:o,labelNodeRects:s}=Me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,h,l)=>xt(u===h?l??[]:u.points??[]),"pointsFor"),a=d(u=>at(u).reduce((h,l)=>{const x=l.a.x-l.b.x,C=l.a.y-l.b.y;return h+Math.hypot(x,C)},0),"pathLength"),c=d((u,h)=>{let l=0;for(let x=0;x<r.length;x++){const C=at(i(r[x],u,h));for(let b=x+1;b<r.length;b++){const v=at(i(r[b],u,h));for(const L of C)for(const y of v)he(L.a,L.b,y.a,y.b,et)&&l++}}return l},"strictCrossingCount"),f=d((u,h)=>{if(u.horizontal){const l=u.a.y;return(Math.abs(l-h.top)<1||Math.abs(l-h.bottom)<1)&&Wt(u.a.x,u.b.x,h.left,h.right)>=Xt}if(u.vertical){const l=u.a.x;return(Math.abs(l-h.left)<1||Math.abs(l-h.right)<1)&&Wt(u.a.y,u.b.y,h.top,h.bottom)>=Xt}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const h=[u.start,u.end].filter(x=>!!x),l=[];for(const x of h){const C=e.get(x),b=C?te(C):void 0;b&&l.push(b)}return l},"endpointRectsFor"),p=d((u,h)=>{if(h+3>=u.length)return[];const l=u[h],x=u[h+1],C=u[h+2],b=u[h+3],v=Nt(l,x,et)&&Ot(x,C,et)&&Nt(C,b,et),L=Ot(l,x,et)&&Nt(x,C,et)&&Ot(C,b,et);if(!v&&!L)return[];if(!(v?Math.sign(x.x-l.x)!==Math.sign(b.x-C.x):Math.sign(x.y-l.y)!==Math.sign(b.y-C.y)))return[];const I=gt(l,b,et)||yt(l,b,et)?[]:[{x:l.x,y:b.y},{x:b.x,y:l.y}],E=I.length===0?[[...u.slice(0,h+1),...u.slice(h+3)]]:I.map(B=>[...u.slice(0,h+1),B,...u.slice(h+3)]),A=new Set;return E.map(B=>ue(xt(B))).filter(B=>{if(at(B).length!==B.length-1||!B.some(k=>ce(k,b,et)))return!1;const O=B.map(k=>`${k.x.toFixed(3)},${k.y.toFixed(3)}`).join("|");return A.has(O)?!1:(A.add(O),!0)})},"shortcutCandidatesAt"),M=d((u,h,l)=>{const x=[u.start,u.end].filter(b=>!!b),C=g(u);for(const b of at(h))if(Pt(b.a,b.b,o,x,-2)||Pt(b.a,b.b,s,[],-2)||C.some(v=>f(b,v)))return!1;for(const b of r)if(b!==u){for(const v of at(h))for(const L of at(i(b)))if(de(v,L,.5)>=Xt)return!1}return c(u,h)<=l},"candidateIsSafe");for(let u=0;u<8;u++){const h=c();let l,x,C=h,b=Number.POSITIVE_INFINITY,v=Number.POSITIVE_INFINITY;for(const L of r){const y=i(L),I=oe(y,et),E=a(y);for(let A=0;A<=y.length-4;A++)for(const B of p(y,A)){const O=oe(B,et),k=a(B);if(!(O<I||O===I&&k<E-et)||!M(L,B,h))continue;const P=c(L,B);P>C||P===C&&(O>b||O===b&&k>=v)||(l=L,x=B,C=P,b=O,v=k)}}if(!l||!x)return;l.points=x}}d(Ts,"shortcutRedundantOrthogonalJogs");function ws(t,e){const i=[];for(const R of e.values()){if(R.isGroup||R.isEdgeLabel)continue;const _=R.x??0,F=R.y??0,V=te(R);V&&i.push({id:String(R.id??""),cx:_,cy:F,rect:V})}if(i.length===0)return;const a=new Map(i.map(R=>[R.id,R])),c=i.map(R=>({id:R.id,rect:R.rect})),f=["top","bottom","left","right"],g={top:Math.min(...i.map(R=>R.rect.top))-20,bottom:Math.max(...i.map(R=>R.rect.bottom))+20,left:Math.min(...i.map(R=>R.rect.left))-20,right:Math.max(...i.map(R=>R.rect.right))+20},p=t.filter(R=>!R.isLayoutOnly),M=new Map(p.map((R,_)=>[R,_])),u=d(R=>{const _=R==="left"||R==="top"?-1:1,F=[];for(let V=0;V<=2;V++)F.push(g[R]+_*20*V);return F},"outwardTracksForSide"),h=d((R,_=new Map)=>xt(_.get(R)??R.points??[]),"replacementPointsFor"),l=d((R,_)=>{let F=0;for(const V of R)for(const K of _)he(V.a,V.b,K.a,K.b,et)&&F++;return F},"crossingCountBetweenSegments"),x=d((R,_)=>l(at(R),at(_)),"crossingCountBetweenPaths"),C=d((R=new Map)=>{let _=0;const F=[],V=new Set,K=[],Z=d(Y=>{V.has(Y)||(V.add(Y),K.push(Y))},"addEdge");for(let Y=0;Y<p.length;Y++){const q=p[Y],m=h(q,R);for(let S=Y+1;S<p.length;S++){const w=p[S],T=x(m,h(w,R));T>0&&(_+=T,F.push({first:q,second:w,count:T}),Z(q),Z(w))}}return K.sort((Y,q)=>(M.get(Y)??0)-(M.get(q)??0)),{count:_,pairs:F,edgeSet:V,edges:K}},"crossingSnapshot"),b=d((R,_)=>{const F=new Set(_.keys());if(F.size===0)return R.count;let V=0;for(const Z of R.pairs)(F.has(Z.first)||F.has(Z.second))&&(V+=Z.count);let K=0;for(let Z=0;Z<p.length;Z++){const Y=p[Z],q=F.has(Y),m=h(Y,_);for(let S=Z+1;S<p.length;S++){const w=p[S];!q&&!F.has(w)||(K+=x(m,h(w,_)))}}return R.count-V+K},"crossingCountWithReplacements"),v=d(R=>{const _=new Map;for(const K of R.pairs){const Z=_.get(K.first)??new Set;Z.add(K.second),_.set(K.first,Z);const Y=_.get(K.second)??new Set;Y.add(K.first),_.set(K.second,Y)}const F=[],V=new Set;for(const K of R.edges){if(V.has(K))continue;const Z=[K],Y=[];for(V.add(K);Z.length>0;){const q=Z.pop();Y.push(q);for(const m of _.get(q)??[])V.has(m)||(V.add(m),Z.push(m))}Y.sort((q,m)=>(M.get(q)??0)-(M.get(m)??0)),Y.length>1&&F.push(Y)}return F},"crossingComponents"),L=d(R=>[R.start,R.end].filter(_=>!!_),"endpointIdsFor"),y=d(R=>{const _=[];for(const F of v(R)){const V=new Set(F),K=new Set(F.flatMap(Y=>L(Y))),Z=[...F];for(const Y of p)V.has(Y)||L(Y).some(q=>K.has(q))&&Z.push(Y);Z.sort((Y,q)=>(M.get(Y)??0)-(M.get(q)??0)),_.push(Z)}return _},"pairSearchGroups"),I=d((R,_,F)=>b(R,new Map([[_,F]])),"crossingCountWithSingleReplacement"),E=d(R=>{const _=new Map;for(const F of R.pairs)_.set(F.first,(_.get(F.first)??0)+F.count),_.set(F.second,(_.get(F.second)??0)+F.count);return _},"currentCrossingsByEdge"),A=d(R=>R.slice(1).reduce((_,F,V)=>{const K=R[V];return _+Math.abs(F.x-K.x)+Math.abs(F.y-K.y)},0),"pathLength"),B=d((R=new Map)=>p.reduce((_,F)=>_+oe(h(F,R)),0),"totalBends"),O=d((R=new Map)=>p.reduce((_,F)=>_+A(h(F,R)),0),"totalLength"),k=d((R,_,F=new Map)=>{const V=at(_);for(const K of p)if(K!==R){for(const Z of V)for(const Y of at(h(K,F)))if(de(Z,Y,.5)>=Xt)return!0}return!1},"pathHasSegmentConflict"),H=d((R,_)=>{const F=[R.start,R.end].filter(V=>!!V);for(const V of at(_))if(Pt(V.a,V.b,c,F,-2))return!0;return!1},"pathHitsNode"),P=d((R,_)=>{const F=ue(xt(_));at(F).length===F.length-1&&R.push(F)},"pushOrthogonalCandidate"),G=d(R=>R==="left"||R==="right","sideIsHorizontal"),j=d((R,_,F)=>{switch(_){case"left":return Math.min(R.x,F.x)-20;case"right":return Math.max(R.x,F.x)+20;case"top":return Math.min(R.y,F.y)-20;case"bottom":return Math.max(R.y,F.y)+20}},"localTrackForSameSide"),tt=d((R,_,F,V)=>{const K=F==="left"||F==="top"?-1:1,Z=[j(_,F,V),g[F]];for(const Y of Z)for(let q=0;q<=2;q++)P(R,ho(_,F,V,Y+K*20*q))},"addSameSideCandidates"),ft=d((R,_,F,V,K)=>{for(const Z of u(F))for(const Y of u(K))P(R,[_,{x:Z,y:_.y},{x:Z,y:Y},{x:V.x,y:Y},V])},"addHorizontalToVerticalCandidates"),Mt=d((R,_,F,V,K)=>{for(const Z of u(F))for(const Y of u(K))P(R,[_,{x:_.x,y:Z},{x:Y,y:Z},{x:Y,y:V.y},V])},"addVerticalToHorizontalCandidates"),Ht=d((R,_,F,V,K)=>{const Z=[...u("top"),...u("bottom")];for(const Y of u(F))for(const q of u(K))for(const m of Z)P(R,[_,{x:Y,y:_.y},{x:Y,y:m},{x:q,y:m},{x:q,y:V.y},V])},"addHorizontalPairCandidates"),Ft=d((R,_,F,V,K)=>{const Z=[...u("left"),...u("right")];for(const Y of u(F))for(const q of u(K))for(const m of Z)P(R,[_,{x:_.x,y:Y},{x:m,y:Y},{x:m,y:q},{x:V.x,y:q},V])},"addVerticalPairCandidates"),nt=d(R=>{const _=new Set;return R.map(F=>xt(F)).filter(F=>{const V=F.map(K=>`${K.x.toFixed(3)},${K.y.toFixed(3)}`).join("|");return _.has(V)||F.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),J=d((R,_,F,V)=>{const K=[],Z=uo(R,_,F,V,20,et);Z&&P(K,Z),_===V&&tt(K,R,_,F);const Y=G(_),q=G(V);return Y&&!q?ft(K,R,_,F,V):!Y&&q?Mt(K,R,_,F,V):Y?Ht(K,R,_,F,V):Ft(K,R,_,F,V),nt(K)},"buildCandidatesForSides"),rt=d((R,_,F,V)=>{const K=[...u("left"),...u("right")],Z=[...u("top"),...u("bottom")];for(const Y of f){const q=Le(V,Y),m=Y==="top"||Y==="bottom"?u(Y):Z;for(const S of K){P(R,[_,F,{x:S,y:F.y},{x:S,y:q.y},q]);for(const w of m)P(R,[_,F,{x:S,y:F.y},{x:S,y:w},{x:q.x,y:w},q])}}},"addVerticalDepartureOuterTrackCandidates"),ut=d((R,_,F,V)=>{const K=[...u("left"),...u("right")],Z=[...u("top"),...u("bottom")];for(const Y of f){const q=Le(V,Y),m=Y==="left"||Y==="right"?u(Y):K;for(const S of Z){P(R,[_,F,{x:F.x,y:S},{x:q.x,y:S},q]);for(const w of m)P(R,[_,F,{x:F.x,y:S},{x:w,y:S},{x:w,y:q.y},q])}}},"addHorizontalDepartureOuterTrackCandidates"),pt=d(R=>{const _=R.start,F=R.end,V=F?a.get(F):void 0;if(!_||!V)return[];const K=xt(R.points??[]);if(K.length<4)return[];const Z=K[0],Y=K[1],q=[];return Ot(Z,Y,et)?rt(q,Z,Y,V):Nt(Z,Y,et)&&ut(q,Z,Y,V),q},"terminalPreservingOuterTrackCandidates"),St=d(R=>{const _=R.start,F=R.end,V=_?a.get(_):void 0,K=F?a.get(F):void 0;if(!V||!K)return[];const Z=[];for(const Y of f){const q=Le(V,Y);for(const m of f)Z.push(...J(q,Y,Le(K,m),m))}return Z.push(...pt(R)),Z},"candidatePathsFor"),wt=d(()=>new Map(p.map(R=>[R,at(h(R))])),"currentSegmentsByEdge"),Kt=d((R,_,F)=>{const V=new Set;for(const K of p){if(K===R)continue;const Z=F.get(K)??at(h(K));_.some(Y=>Z.some(q=>de(Y,q,.5)>=Xt))&&V.add(K)}return V},"sharedTrackConflictsFor"),qt=d((R,_,F,V)=>{const K=new Set;return St(R).map(Y=>ue(xt(Y))).filter(Y=>{if(H(R,Y))return!1;const q=Y.map(m=>`${m.x.toFixed(3)},${m.y.toFixed(3)}`).join("|");return K.has(q)||Y.length<2?!1:(K.add(q),!0)}).map(Y=>{const q=at(Y);let m=0;for(const S of p)S!==R&&(m+=l(q,F.get(S)??at(h(S))));return{candidate:Y,candidateSegments:q,crossings:_.count-(V.get(R)??0)+m,bends:oe(Y,et),totalBends:oe(Y),length:A(Y)}}).filter(({crossings:Y})=>Y<=_.count).sort((Y,q)=>Y.crossings-q.crossings||Y.bends-q.bends||Y.length-q.length).slice(0,48).map(Y=>({path:Y.candidate,segments:Y.candidateSegments,sharedTrackConflicts:Kt(R,Y.candidateSegments,F),totalBends:Y.totalBends,length:Y.length}))},"pairCandidatesFor"),Jt=d((R,_,F,V,K,Z)=>{let Y=0;for(const m of R.pairs)(m.first===_||m.second===_||m.first===V||m.second===V)&&(Y+=m.count);let q=l(F.segments,K.segments);for(const m of p){if(m===_||m===V)continue;const S=Z.get(m)??at(h(m));q+=l(F.segments,S)+l(K.segments,S)}return R.count-Y+q},"pairCrossingCount"),se=d((R,_)=>{for(const F of R.sharedTrackConflicts)if(F!==_)return!1;return!0},"conflictsOnlyWith"),Ee=d((R,_)=>R.segments.some(F=>_.segments.some(V=>de(F,V,.5)>=Xt)),"candidatesShareTrack"),me=d((R,_,F,V)=>se(_,F.edge)&&se(V,R.edge)&&!Ee(_,V),"pairCandidatesAreCompatible"),Te=d((R,_,F,V,K)=>{const Z=Jt(R.current,_.edge,F,V.edge,K,R.baseSegments);if(!(Z>=R.current.count))return{replacements:new Map([[_.edge,F.path],[V.edge,K.path]]),crossings:Z,bends:R.currentBends-(R.baseBendsByEdge.get(_.edge)??0)-(R.baseBendsByEdge.get(V.edge)??0)+F.totalBends+K.totalBends,length:R.currentLength-(R.baseLengthByEdge.get(_.edge)??0)-(R.baseLengthByEdge.get(V.edge)??0)+F.length+K.length}},"scorePairReplacement"),mn=d((R,_)=>R.crossings<_.crossings||R.crossings===_.crossings&&(R.bends<_.bends||R.bends===_.bends&&R.length<_.length),"pairScoreIsBetter"),yn=d((R,_,F,V)=>{let K=V;for(const Z of _.candidates)for(const Y of F.candidates){if(!me(_,Z,F,Y))continue;const q=Te(R,_,Z,F,Y);q&&mn(q,K)&&(K=q)}return K},"bestScoreForOptionPair"),pn=d(R=>{const _=B(),F=O(),V=wt(),K=E(R),Z=new Map(p.map(T=>[T,oe(h(T))])),Y=new Map(p.map(T=>[T,A(h(T))])),q=new Map,m=y(R);for(const T of m)for(const N of T){if(q.has(N))continue;const D=qt(N,R,V,K);D.length>0&&q.set(N,{edge:N,candidates:D})}let S={replacements:new Map,crossings:R.count,bends:_,length:F};const w={current:R,currentBends:_,currentLength:F,baseBendsByEdge:Z,baseLengthByEdge:Y,baseSegments:V};for(const T of m){const N=new Set(T.filter(W=>R.edgeSet.has(W))),D=T.map(W=>q.get(W)).filter(W=>!!W);for(let W=0;W<D.length;W++){const ot=D[W];for(let U=W+1;U<D.length;U++){const z=D[U];!N.has(ot.edge)&&!N.has(z.edge)||(S=yn(w,ot,z,S))}}}return S.replacements.size>0?S.replacements:void 0},"bestPairedReplacement");for(let R=0;R<4;R++){const _=C(),F=_.count;if(F===0)return;let V,K,Z=F,Y=Number.POSITIVE_INFINITY;for(const m of _.edges){const S=oe(h(m),et);for(const w of St(m)){const T=H(m,w),N=!T&&k(m,w),D=I(_,m,w),W=oe(w,et);T||N||!(D<F||D===F&&W<S)||D>Z||D===Z&&W>=Y||(V=m,K=w,Z=D,Y=W)}}if(V&&K){V.points=K;continue}const q=pn(_);if(!q)return;for(const[m,S]of q)m.points=S}}d(ws,"resolveRenderedOrthogonalCrossings");var be=.001,Zr=8;function As(t,e){const{nodeInfoById:n,realNodeRects:o}=un(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(l=>l.rect.top))-r,bottom:Math.max(...o.map(l=>l.rect.bottom))+r,left:Math.min(...o.map(l=>l.rect.left))-r,right:Math.max(...o.map(l=>l.rect.right))+r},a=d((l,x,C,b)=>{const v=[],L=uo(l,x,C,b,r,be);return L&&v.push(L),x===b&&v.push(ho(l,x,C,i[x])),v},"buildOrthogonalPathCandidates"),c=d((l,x)=>{for(let C=0;C<l.length-1;C++){const b=l[C],v=l[C+1];if(Pt(b,v,o,x,1))return!0}return!1},"pathHitsNode"),f=d((l,x,C=!1)=>{let b=0;const v=Be(l,be),L=x.start,y=x.end;for(const I of t){if(I===x||I.isLayoutOnly)continue;const E=I.start,A=I.end;if(!C&&L&&y&&(E===L||E===y||A===L||A===y))continue;const B=I.points;if(!(!B||B.length<2))for(const O of v)for(const k of Be(B,be)){if(mo(O.a,O.b,k.a,k.b,be,be)){b++;continue}de(O,k,be)>=Zr&&b++}}return b},"pathConflictCount"),g=4,p=d((l,x)=>{const C=Math.abs(l.y-x.rect.top),b=Math.abs(l.y-x.rect.bottom),v=Math.abs(l.x-x.rect.left),L=Math.abs(l.x-x.rect.right);let y="top",I=C;return b<I&&(y="bottom",I=b),v<I&&(y="left",I=v),L<I&&(y="right",I=L),y},"nearestSideOfRect"),M=new Map,u=d((l,x,C)=>{const b=M.get(l)??[];b.push({side:x,edgeId:C}),M.set(l,b)},"addFaceClaim");for(const l of t){if(l.isLayoutOnly)continue;const x=l.points??[];if(x.length<1)continue;const C=l.id??"",b=l.start,v=l.end;if(b){const L=n.get(b);L&&u(b,p(x[0],L),C)}if(v){const L=n.get(v);L&&u(v,p(x[x.length-1],L),C)}}const h=d((l,x,C)=>{var b;return((b=M.get(l))==null?void 0:b.some(v=>v.edgeId!==C&&v.side===x))??!1},"faceIsClaimed");for(const l of t){if(l.isLayoutOnly)continue;const x=l.points;if(!x||x.length<2)continue;const C=oe(x,be);if(C<g)continue;const b=l.start,v=l.end;if(!b||!v)continue;const L=n.get(b),y=n.get(v);if(!L||!y)continue;const I=l.id??"",E=f(x,l,!0),A=f(x,l);let B,O=E,k=C;for(const H of s){if(h(b,H,I))continue;const P=Le(L,H);for(const G of s){if(h(v,G,I))continue;const j=Le(y,G);for(const tt of a(P,H,j,G)){if(c(tt,[b,v]))continue;const ft=oe(tt,be);if(E>0){const Mt=f(tt,l,!0);if(Mt>O||Mt===O&&ft>=k)continue;O=Mt,k=ft,B=tt;continue}f(tt,l)>A||ft<k&&(k=ft,B=tt)}}}if(B){l.points=B;const H=M.get(b);H&&M.set(b,H.filter(G=>G.edgeId!==I));const P=M.get(v);P&&M.set(v,P.filter(G=>G.edgeId!==I)),u(b,p(B[0],L),I),u(v,p(B[B.length-1],y),I)}}}d(As,"simplifyDetouredEdges");var Qt=.001,Fo=10,Ke=7;function Un(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,a=r.y-s.y;if(!(Math.abs(i)+Math.abs(a)<Qt)){if(Math.abs(a)<=Qt){const f=s.x+Math.sign(i)*Fo;return{left:Math.min(s.x,f),right:Math.max(s.x,f),top:s.y-Ke,bottom:s.y+Ke}}if(Math.abs(i)<=Qt){const f=s.y+Math.sign(a)*Fo;return{left:s.x-Ke,right:s.x+Ke,top:Math.min(s.y,f),bottom:Math.max(s.y,f)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}d(Un,"markerClearanceRectFor");function Rs(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}d(Rs,"normalizeRect");function Wn(t,e){const n=xt(e),o=Un(n,!0),s=Un(n,!1);return[o,s].some(r=>r&&en(t,Rs(r)))}d(Wn,"labelOverlapsOwnMarker");function Je(t,e){const n=[];for(const h of t){if(h.isLayoutOnly)continue;const l=h.points;if(!(!l||l.length<2))for(let x=0;x<l.length-1;x++)n.push({edgeId:h.id,p1:l[x],p2:l[x+1]})}const o=[],s=[];for(const h of e.values()){const l=h.isGroup,x=h.parentId;if(l&&!x){const b=te(h);b&&s.push({id:h.id,rect:b});continue}if(l||h.isEdgeLabel)continue;const C=te(h);C&&o.push({nodeId:h.id,rect:C})}const r=3,i=1,a=12,c=d((h,l)=>{const x=Nn(l,r);for(const{nodeId:C,rect:b}of o)if(C!==h&&en(x,b))return!0;return!1},"labelOverlapsForeignNode"),f=d((h,l)=>{const x=Nn(l,r);for(const C of n)if(C.edgeId!==h&&dn(C.p1,C.p2,x))return!0;return!1},"labelOverlapsForeignEdge"),g=d((h,l,x)=>c(h,x)||f(l,x),"labelOverlapsAnything"),p=[],M=d(h=>{for(const{id:l,rect:x}of s)if(ss(x,h))return l},"findContainingLane"),u=d((h,l)=>p.some(x=>x.labelId!==h&&en(l,x.rect)),"overlapsPlacedLabel");for(const h of t){if(h.isLayoutOnly)continue;const l=h.labelNodeId;if(!l)continue;const x=e.get(l);if(!x)continue;const C=h.points;if(!C||C.length<2)continue;const b=x.width??0,v=x.height??0;if(b<=0||v<=0)continue;const L=[];for(let nt=0;nt<C.length-1;nt++){const J=C[nt],rt=C[nt+1],ut=Math.abs(J.x-rt.x),pt=Math.abs(J.y-rt.y);ut<Qt&&pt<Qt||ut>=Qt&&pt>=Qt||L.push({idx:nt,length:ut+pt,orientation:ut>=Qt?"horizontal":"vertical",midX:(J.x+rt.x)/2,midY:(J.y+rt.y)/2})}if(L.length===0)continue;const y=L.length>=3?L.filter(nt=>nt.idx>0&&nt.idx<L.length-1):L,I=y.length>0?y:L,E=b>=v?"horizontal":"vertical",A=d(nt=>[...nt].sort((J,rt)=>{const ut=J.orientation===E,pt=rt.orientation===E;if(ut!==pt)return ut?-1:1;const St=J.length>=(J.orientation==="horizontal"?b:v)+2,wt=rt.length>=(rt.orientation==="horizontal"?b:v)+2;return St!==wt?St?-1:1:rt.length-J.length}),"rankSegments"),B=L[0],O=L[L.length-1],k=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((nt,J)=>{const rt=C[nt.idx],ut=C[nt.idx+1];return{midX:rt.x+(ut.x-rt.x)*J,midY:rt.y+(ut.y-rt.y)*J}},"anchorAtT"),P=d((nt,J,rt)=>Math.min(rt,Math.max(J,nt)),"clamp"),G=d((nt,J)=>nt.midX>=J.left-Qt&&nt.midX<=J.right+Qt&&nt.midY>=J.top-Qt&&nt.midY<=J.bottom+Qt,"pointInsideRectInclusive"),j=d(nt=>{const J=Pe(nt.midX,nt.midY,b,v),rt=M(J);if(rt)return{laneId:rt,anchor:nt,rect:J};const ut=s.find(({rect:se})=>G(nt,se));if(!ut)return;const pt=ut.rect.left+b/2+i,St=ut.rect.right-b/2-i,wt=ut.rect.top+v/2+i,Kt=ut.rect.bottom-v/2-i;if(pt>St||wt>Kt)return;const qt={midX:P(nt.midX,pt,St),midY:P(nt.midY,wt,Kt)},Jt=Pe(qt.midX,qt.midY,b,v);return G(nt,Jt)?{laneId:ut.id,anchor:qt,rect:Jt}:void 0},"placementForAnchor"),tt=d((nt,J,rt)=>nt.orientation==="horizontal"?Math.abs(J.midX-rt.x):Math.abs(J.midY-rt.y),"distanceAlongSegment"),ft=d((nt,J)=>{const ut=(nt.orientation==="horizontal"?b/2:v/2)+a;if(nt===B){const pt=C[nt.idx];if(tt(nt,J,pt)+Qt<ut)return!1}if(nt===O){const pt=C[nt.idx+1];if(tt(nt,J,pt)+Qt<ut)return!1}return!0},"labelClearsTerminalEndpoints"),Mt=d(nt=>{const J=A(nt);for(const rt of J)for(const ut of k){const pt=H(rt,ut);if(!ft(rt,pt))continue;const St=j(pt);if(St&&!Wn(St.rect,C)&&!u(l,St.rect)&&!g(l,h.id,St.rect))return{laneId:St.laneId,anchor:St.anchor}}},"tryPool"),Ht=d((nt,J,rt=!1)=>{const ut=A(nt);for(const pt of ut){const St={midX:pt.midX,midY:pt.midY};if(J&&!ft(pt,St))continue;const wt=j(St);if(wt&&!Wn(wt.rect,C)&&!u(l,wt.rect)&&!c(l,wt.rect)&&(rt||!f(h.id,wt.rect)))return{laneId:wt.laneId,anchor:wt.anchor}}},"findLaneContainingFallback"),Ft=Mt(I)??(I.length<L.length?Mt(L):void 0)??Ht(L,!0)??Ht(L,!1)??Ht(L,!1,!0);if(Ft){x.x=Ft.anchor.midX,x.y=Ft.anchor.midY,x.parentId=Ft.laneId;const nt=Pe(Ft.anchor.midX,Ft.anchor.midY,b,v),J=p.findIndex(rt=>rt.labelId===l);J>=0?p[J]={labelId:l,rect:nt}:p.push({labelId:l,rect:nt})}}}d(Je,"anchorLabelsToPolyline");var En=1e-6,Qr=8,Do=Qr/2,ti=3;function Kn(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}d(Kn,"pairKey");function Ns(t,e){const{nodeInfoById:n,realNodeRects:o}=un(e),s=new Map;for(const i of e){const a=i.id;if(!i.isGroup&&i.isEdgeLabel){s.set(a,{w:i.width??0,h:i.height??0});continue}}const r=d((i,a,c,f)=>{const g=Kn(a,c);let p=0;const M=d(u=>{if(!u)return;const h=s.get(u);if(!h)return;const l=f==="x"?h.w/2:h.h/2;l>p&&(p=l)},"consider");M(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const h=u.start,l=u.end;!h||!l||Kn(h,l)===g&&M(u.labelNodeId)}return p>0?p+ti:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const a=i.points;if(!lo(a,En))continue;const c=go(i,n,En);if(!c)continue;const{srcId:f,dstId:g,srcInfo:p,dstInfo:M,collinearX:u,collinearY:h}=c;if(u===h)continue;let l,x;if(u){const y=M.cy>p.cy;l={x:p.cx,y:y?p.rect.bottom:p.rect.top},x={x:M.cx,y:y?M.rect.top:M.rect.bottom}}else{const y=M.cx>p.cx;l={x:y?p.rect.right:p.rect.left,y:p.cy},x={x:y?M.rect.left:M.rect.right,y:M.cy}}if(Pt(l,x,o,[f,g],1))continue;const b=r(i,f,g,u?"x":"y"),v=b>Do?b:Do,L=[0,v,-v];for(const y of L){const I={...l},E={...x};if(u){if(I.x+=y,E.x+=y,I.x<=p.rect.left||I.x>=p.rect.right||E.x<=M.rect.left||E.x>=M.rect.right)continue}else if(I.y+=y,E.y+=y,I.y<=p.rect.top||I.y>=p.rect.bottom||E.y<=M.rect.top||E.y>=M.rect.bottom)continue;if(!Pt(I,E,o,[f,g],1)&&!nn(I,E,t,i,{epsilon:En})){i.points=[I,E];break}}}}d(Ns,"straightenCollinearSiblingDetours");function qn(t,e){const{realNodeRects:c,labelNodeRects:f}=Me(e.values()),g=d((y,I)=>Be(I,.001).map(E=>({...E,edge:y,interior:E.index>=1&&E.index<=I.length-3})),"segmentsFor"),p=d(()=>{const y=[];for(const I of t){if(I.isLayoutOnly)continue;const E=I.points;!E||E.length<2||y.push(...g(I,xt(E)))}return y},"allSegments"),M=d((y,I)=>y.horizontal&&I.horizontal?Wt(y.a.x,y.b.x,I.a.x,I.b.x)>=8&&Math.abs(y.a.y-I.a.y)<7:y.vertical&&I.vertical?Wt(y.a.y,y.b.y,I.a.y,I.b.y)>=8&&Math.abs(y.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((y,I)=>{const E=y.start,A=y.end,B=g(y,I);if(B.length!==I.length-1)return!1;const O=[E,A].filter(H=>!!H),k=y.labelNodeId?[y.labelNodeId]:[];for(const H of B)if(Pt(H.a,H.b,c,O,-2)||Pt(H.a,H.b,f,k,-2))return!1;for(const H of t){if(H===y||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of B)for(const j of g(H,xt(P)))if(M(G,j)||he(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),h=d((y,I)=>{const E=xt(y.edge.points??[]);if(E.length<4||y.index>=E.length-1)return;const A=E.map(B=>({...B}));if(y.horizontal)A[y.index].y+=I,A[y.index+1].y+=I;else if(y.vertical)A[y.index].x+=I,A[y.index+1].x+=I;else return;return g(y.edge,A).length===A.length-1?A:void 0},"shiftedCandidate"),l=d((y,I)=>({x:y.x??(I.left+I.right)/2,y:y.y??(I.top+I.bottom)/2}),"nodeCenter"),x=d(y=>{const I=y.edge,E=xt(I.points??[]);if(E.length!==4||y.index!==1)return;const A=I.start?e.get(I.start):void 0,B=I.end?e.get(I.end):void 0,O=A?te(A):void 0,k=B?te(B):void 0,H=E.slice(y.index+2);if(!(!A||!B||!O||!k||H.length===0))return{sourceCenter:l(A,O),targetCenter:l(B,k),sourceRect:O,tail:H}},"sourceDetourContextFor"),C=d((y,I,E,A,B,O)=>{const k=A.y>=E.y,H=k?B.bottom:B.top,P=H+(k?20:-20);if(k&&y.b.y<=P+.001||!k&&y.b.y>=P-.001)return;const G=y.a.x+I;return xt([{x:E.x,y:H},{x:E.x,y:P},{x:G,y:P},{x:G,y:y.b.y},...O],.001)},"verticalSourceDetour"),b=d((y,I,E,A,B,O)=>{const k=A.x>=E.x,H=k?B.right:B.left,P=H+(k?20:-20);if(k&&y.b.x<=P+.001||!k&&y.b.x>=P-.001)return;const G=y.a.y+I;return xt([{x:H,y:E.y},{x:P,y:E.y},{x:P,y:G},{x:y.b.x,y:G},...O],.001)},"horizontalSourceDetour"),v=d((y,I)=>{const E=x(y);if(E){if(y.vertical)return C(y,I,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail);if(y.horizontal)return b(y,I,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail)}},"sourceDetourCandidate"),L=[-7,7,-14,14,-21,21];for(let y=0;y<12;y++){const I=p();let E=!1;for(let A=0;A<I.length&&!E;A++)for(let B=A+1;B<I.length&&!E;B++){const O=I[A],k=I[B];if(O.edge===k.edge||!M(O,k))continue;const H=[O,k].filter(P=>P.interior);for(const P of H){for(const G of L){const j=h(P,G);if(j&&u(P.edge,j)){P.edge.points=j,E=!0;break}const tt=v(P,G);if(tt&&u(P.edge,tt)){P.edge.points=tt,E=!0;break}}if(E)break}}if(!E)return}}d(qn,"nudgeSharedInteriorSubpaths");function Os(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,a=o.y-n.y,c=s*a-r*i;if(Math.abs(c)<1e-10)return!1;const f=n.x-t.x,g=n.y-t.y,p=(f*a-g*i)/c,M=(f*r-g*s)/c,u=.01;return p>u&&p<1-u&&M>u&&M<1-u}d(Os,"segmentsIntersect");function Ps(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=rs(e),r=[];for(const a of n){if(a.isLayoutOnly)continue;const c=a.points;if(!c||c.length<2)continue;const f=a.start,g=a.end,p=a.labelNodeId,M=a.id??`${f}->${g}`;for(const u of s)if(!(u.nodeId===f||u.nodeId===g)&&!(p&&u.nodeId===p)){for(let h=0;h<c.length-1;h++)if(dn(c[h],c[h+1],u,-1)){o.push({type:"edge-node-overlap",edgeId:M,targetId:u.nodeId,detail:`segment ${h} passes through node "${u.nodeId}"`});break}}for(let u=0;u<c.length-1;u++)r.push({edgeId:M,start:f,end:g,p1:c[u],p2:c[u+1]})}const i=new Set;for(let a=0;a<r.length;a++)for(let c=a+1;c<r.length;c++){const f=r[a],g=r[c];if(f.edgeId!==g.edgeId&&!(f.start===g.start||f.start===g.end||f.end===g.start||f.end===g.end)&&Os(f.p1,f.p2,g.p1,g.p2)){const p=f.edgeId<g.edgeId?`${f.edgeId}|${g.edgeId}`:`${g.edgeId}|${f.edgeId}`;i.has(p)||(i.add(p),o.push({type:"edge-edge-crossing",edgeId:f.edgeId,targetId:g.edgeId,detail:`edges "${f.edgeId}" and "${g.edgeId}" cross`}))}}if(o.length>0){const a=o.filter(f=>f.type==="edge-node-overlap").length,c=o.filter(f=>f.type==="edge-edge-crossing").length;Qe.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${a} edge-node overlap(s), ${c} edge crossing(s)`);for(const f of o)Qe.warn(`[SWIMLANE_VALIDATE] ${f.type}: ${f.detail}`)}return o}d(Ps,"validateSwimlanesLayout");function Bs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!Ms(t,e)||e==="BT"&&s.length>0&&!bs(t))return;for(const a of o){if(a.isLayoutOnly)continue;const c=a.points;!c||c.length<2||(a.points=ue(on(c)))}As(o,n),Ns(o,n),Is(o,n);const r=new Map;for(const a of n)r.set(String(a.id),a);Je(o,r),fs(o,r),Ss(o,r),qn(o,r),Cs(o,r),vs(o,r),zn(o,r),Ls(o,r);const i=d(()=>{ws(o,r),Es(o,r),Ts(o,r),Je(o,r),Gn(o,r),zn(o,r),Je(o,r),Gn(o,r)},"finalizeRenderedEdges");i(),qn(o,r),i(),Vn(o,r),jn(o,r),Vn(o,r),jn(o,r)}d(Bs,"postProcessSwimlaneLayout");function Ie(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(Ie,"normalizeGraph");function Mo(t,e){return t.edges.filter(n=>n.dst===e)}d(Mo,"incoming");function ks(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(ks,"buildSuccessorMap");function Io(t){const e=ks(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(Io,"buildSortedSuccessorMap");function So(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(So,"buildInDegreeMap");function Co(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(Co,"sortedZeroInDegreeNodes");function hn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(hn,"buildPredecessorSuccessorMaps");function vo(t,e,n,o){var i,a;let s=0;for(const c of t.nodes)o!=null&&o.skipGroups&&((i=t.nodeById.get(c))!=null&&i.isGroup)||(s=Math.max(s,n[c]??0));const r=Array.from({length:s+1},()=>[]);for(const c of e)o!=null&&o.skipGroups&&((a=t.nodeById.get(c))!=null&&a.isGroup)||r[Math.max(0,n[c]??0)].push(c);return r}d(vo,"buildLayersFromRanks");function De(t){const e=So(t),n=Co(e),o=[],s=Io(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let a=0;for(;a<n.length&&n[a]<i;)a++;n.splice(a,0,i)}}return o.length===t.nodes.length?o:null}d(De,"topoSortIfAcyclic");function ke(t){const e=new Map;let n=0;for(const o of t)e.set(o,n),n++;return e}d(ke,"buildLayerIndex");function Lo(t){const e=new Array(t.length),n=d((o,s)=>{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),a=o,c=r,f=o;for(;a<r||c<s;)c>=s||a<r&&t[a]<=t[c]?e[f++]=t[a++]:(e[f++]=t[c++],i+=r-a);for(let g=o;g<s;g++)t[g]=e[g];return i},"count");return n(0,t.length)}d(Lo,"countInversions");function _s(t){const e=Ie(t),n=new Map;for(const g of e.nodes)n.set(g,[]);for(const g of e.edges)n.get(g.src).push(g);for(const g of n.values())g.sort((p,M)=>p.dst===M.dst?p.id.localeCompare(M.id):p.dst.localeCompare(M.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const p of n.get(g)??[]){const M=p.dst;o[M]===0?r(M):o[M]===1&&s.push(p)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,p)=>g.localeCompare(p));for(const g of i)o[g]===0&&r(g);const a=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),c=e.edges.map(g=>a.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:c,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(_s,"removeCycles_DFS");function Fs(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const a=n(r)??r;return e.set(o,a),a},"resolve");for(const o of t.nodes)n(o);return e}d(Fs,"buildTopLaneMap");function ge(t){const e=Fs(t);return n=>e.get(n)??null}d(ge,"createTopLaneResolver");function gn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(gn,"buildTopLaneOrder");function Eo(t,e){const n=gn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(Eo,"resolveTopLaneOrder");var ei={EPSILON:1e-6},ln={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Ho={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Ds(t,e){const n=Ie(t),o=(e==null?void 0:e.laneOf)??(()=>null),s=e==null?void 0:e.rankHint,{preds:r}=hn(n);for(const y of r.values())y.sort((I,E)=>I.localeCompare(E));const i=De(n)??[...n.nodes].sort((y,I)=>y.localeCompare(I)),a=new Map;for(const[y,I]of i.entries())a.set(I,y);const c=new Map,f=new Map;for(const y of n.nodes)f.set(y,[]);for(const y of i){const I=(r.get(y)??[]).filter(E=>c.has(E));if(I.length>0){const E=Hs(y,I,{laneOf:o,rankHint:s,topoIndex:a});c.set(y,E),f.get(E).push(y)}else c.has(y)||c.set(y,null)}for(const y of n.nodes)c.has(y)||c.set(y,null);const g=new Set;for(const y of n.nodes)(c.get(y)??null)===null&&g.add(y);const p=[...g].sort((y,I)=>{const E=a.get(y)??0,A=a.get(I)??0;return E===A?y.localeCompare(I):E-A}),M=Xs(n),u=new Map;for(const[y,I]of M.entries())u.set(y,[...I].sort((E,A)=>E.localeCompare(A)));const h=Ys(u),l=Gs(u),x=new Map;for(const y of n.nodes)x.set(y,[]);for(const y of l)for(const I of y.nodes){const E=x.get(I);E?E.push(y.id):x.set(I,[y.id])}const C=[],b=[],v=new Set,L=d(y=>{if(!v.has(y)){v.add(y),C.push(y);for(const I of f.get(y)??[])L(I);b.push(y)}},"walk");for(const y of p)L(y);for(const y of i)L(y);return{parent:c,children:f,roots:p,componentOf:h,blocks:l,nodeBlocks:x,adjacency:u,preorder:C,postorder:b,topologicalOrder:i}}d(Ds,"buildDrivingTree");function Hs(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{var l,x;const a=n.laneOf(r),c=n.laneOf(i),f=a!=null&&a===o,g=c!=null&&c===o;if(f!==g)return f?-1:1;const p=(l=n.rankHint)==null?void 0:l[r],M=(x=n.rankHint)==null?void 0:x[i];if(p!=null&&M!=null&&p!==M)return M-p;const u=n.topoIndex.get(r)??0,h=n.topoIndex.get(i)??0;return u!==h?u-h:r.localeCompare(i)})[0]}d(Hs,"chooseParent");function Xs(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Xs,"buildAdjacency");function Ys(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Ys,"assignComponents");function Gs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((a,c)=>{e.set(a,++r),n.set(a,r);for(const f of t.get(a)??[])f!==c&&(e.has(f)?(e.get(f)??0)<(e.get(a)??0)&&(o.push([a,f]),n.set(a,Math.min(n.get(a)??r,e.get(f)??r))):(o.push([a,f]),i(f,a),n.set(a,Math.min(n.get(a)??r,n.get(f)??r)),(n.get(f)??0)>=(e.get(a)??0)&&s.push($s(a,f,o,s.length))))},"visit");for(const a of t.keys())e.has(a)||i(a,null);return s}d(Gs,"computeBlocks");function $s(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d($s,"popBlock");function zs(t,e,n){const o=[...t.nodes],s=new Map;for(const[b,v]of o.entries())s.set(v,b);const r=o.length,i=new Array(r).fill(-1),a=new Array(r).fill(0),c=[],f=new Set;for(const b of o){const v=n.parent.get(b)??null,L=s.get(b);L!=null&&v==null&&(i[L]=-1,a[L]=0,f.has(b)||(f.add(b),c.push(b)))}for(;c.length>0;){const b=c.shift(),v=s.get(b);if(v==null)continue;const L=n.children.get(b)??[];for(const y of L){if(f.has(y))continue;const I=s.get(y);I!=null&&(i[I]=v,a[I]=a[v]+1,f.add(y),c.push(y))}}for(const b of o){if(f.has(b))continue;const v=s.get(b);v!=null&&(i[v]=-1,a[v]=0,f.add(b))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),p=Array.from({length:g},()=>new Array(r).fill(-1));for(let b=0;b<r;b++)p[0][b]=i[b];for(let b=1;b<g;b++)for(let v=0;v<r;v++){const L=p[b-1][v];p[b][v]=L===-1?-1:p[b-1][L]}const M=d((b,v)=>{if(b===-1||v===-1)return-1;a[b]<a[v]&&([b,v]=[v,b]);const L=a[b]-a[v];for(let y=0;y<g;y++)if(L>>y&1&&(b=p[y][b],b===-1))return-1;if(b===v)return b;for(let y=g-1;y>=0;y--){const I=p[y][b],E=p[y][v];I===-1||E===-1||I!==E&&(b=I,v=E)}return p[0][b]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const b of t.edges){let v=b.src,L=b.dst,y=e[v],I=e[L];if(y==null||I==null||(y>I&&([v,L]=[L,v],[y,I]=[I,y]),y==null||I==null||y===I))continue;const E=s.get(v),A=s.get(L);if(E==null||A==null)continue;const B=M(E,A);if(B===-1)continue;const O=u[B];for(let k=y;k<I;k++)O.set(k,(O.get(k)??0)+1)}const h=new Map,l=d((b,v)=>{if(v.size!==0)for(const[L,y]of v)b.set(L,(b.get(L)??0)+y)},"mergeInto"),x=new Set,C=d(b=>{const v=s.get(b);x.add(b);const L=v==null?void 0:u[v],y=L?new Map(L):new Map,I=n.children.get(b)??[];for(const E of I){const A=C(E),B=e[b];if(B!=null){let O=h.get(b);O||(O=new Map,h.set(b,O));let k=A.get(B)??0;const H=e[E];H!=null&&H>B&&(k+=1),O.set(E,k)}l(y,A)}return y},"dfs");for(const b of n.roots)x.has(b)||C(b);for(const b of o)x.has(b)||C(b);return h}d(zs,"computeSubtreeCrossCounts");function Vs(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const a=[...e.get(r)??[]];a.sort(To(n));for(const c of a){s(c);const f=o.get(c);f!=null&&(i=Math.min(i,f))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Vs,"annotateMinimumLayers");function To(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(To,"compareByRankThenId");function js(t,e,n,o){let s=0;for(const c of e){const f=n[c]??0;f>s&&(s=f)}const r=Array.from({length:s+1},()=>[]),i=new Set,a=d(c=>{if(i.has(c))return;i.add(c);const f=n[c]??0;r[f]||(r[f]=[]),r[f].push(c);for(const g of o(c))a(g)},"emit");for(const c of t)a(c);for(const c of e)if(!i.has(c)){const f=n[c]??0;r[f]||(r[f]=[]),r[f].push(c),i.add(c)}return r}d(js,"emitNodesInTreeOrder");function Us(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Us,"deduplicateLayers");function Ws(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,a=[],c=[],f=n.get(s);for(const g of r){const p=o.get(g)??i;p>i?a.push({child:g,min:p}):c.push(g)}return a.sort((g,p)=>g.min===p.min?g.child.localeCompare(p.child):g.min-p.min),c.sort((g,p)=>{const M=(f==null?void 0:f.get(g))??0,u=(f==null?void 0:f.get(p))??0;if(M!==u)return M-u;const h=o.get(g)??i,l=o.get(p)??i;return h!==l?h-l:g.localeCompare(p)}),[...a.map(g=>g.child),...c]}}d(Ws,"createChildOrderer");function fn(t,e,n){const o=Ds(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const p of t.nodes)s.has(p)||s.set(p,[]);const i=zs(t,e,o),a=[...r].sort(To(e)),c=Vs(a,s,e),f=Ws(s,e,i,c);let g=js(a,t.nodes,e,f);return g=Us(g),g}d(fn,"buildMultitreeLayerOrder");function Ks(t,e,n){const o=new Set(t),s=new Set(e),r=ke(e),i=[];for(const a of n)o.has(a.src)&&s.has(a.dst)&&i.push(r.get(a.dst));return Lo(i)}d(Ks,"countCrossingsBetweenAdjacent");function Jn(t,e,n){const o=[];for(const r of e){const i=n[r.src],a=n[r.dst];if(i==null||a==null||i===a)continue;let c=r.src,f=r.dst,g=i,p=a;i>a&&(c=r.dst,f=r.src,g=a,p=i);for(let M=g;M<p;M++)o.push({id:`${r.id}@${M}`,src:c,dst:f,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Ks(t[r],t[r+1],o);return s}d(Jn,"totalCrossings");function qs(t,e){const n={...e},{preds:o}=hn(t),s=ge(t),r=fn(t,n,s);let i=Jn(r,t.edges,n);const a=ln.MAX_CROSSING_OPTIMIZATION_PASSES;for(let c=0;c<a;c++){let f=!1;const g=[...t.nodes].sort((p,M)=>(n[M]??0)-(n[p]??0));for(const p of g){const M=n[p]??0;if(M===0)continue;let u=0;for(const C of o.get(p)??[])u=Math.max(u,(n[C]??0)+1);if(u>=M)continue;const h=M;n[p]=u;const l=fn(t,n,s),x=Jn(l,t.edges,n);x<i?(i=x,f=!0):n[p]=h}if(!f)break}return n}d(qs,"optimizeRanksByCrossings");function Js(t,e){const n=ge(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(l=>l.src===s);if(i.length===0)continue;let a=!1,c=0;for(const l of i){const x=n(l.dst);x==null||x===r?a=!0:c++}if(c===0||a)continue;let f=0,g=!1;for(const l of t.edges){if(l.dst!==s)continue;const x=n(l.src);x&&(x===r?g=!0:f++)}if(f>0||!g)continue;const p=e[s]??0,M=p+c;let u=0;for(const l of t.edges)l.dst===s&&(u=Math.max(u,(e[l.src]??0)+1));const h=Math.max(p,u,M);h!==p&&(e[s]=h)}}d(Js,"adjustCrossLaneSources");function Zs(t,e){const n=Ie(t),o=De(n)??[...n.nodes].sort(),s=(e==null?void 0:e.compactSingleInput)??!1,r=ge(n);let i=Object.create(null);for(const c of o){const f=Mo(n,c),g=e!=null&&e.ignoreCrossLaneEdges?f.filter(p=>{const M=r(p.src),u=r(c);return!M||!u?!0:M===u}):f;if(g.length===0)i[c]=0;else if(s&&g.length===1){const p=g[0].src,M=r(p),u=r(c);M!==u?i[c]=i[p]??0:i[c]=(i[p]??0)+1}else{let p=-1/0;for(const M of g)p=Math.max(p,(i[M.src]??0)+1);i[c]=p===-1/0?0:p}}return((e==null?void 0:e.optimizeRanksByCrossings)??!1)&&(i=qs(n,i)),e!=null&&e.ignoreCrossLaneEdges&&Js(n,i),{layers:fn(n,i,r),rankOf:i,dummy:new Set}}d(Zs,"assignLayers_LongestPath");function Qs(t,e){const n=Ie(t),s={...Zs(n,{compactSingleInput:e==null?void 0:e.compactSingleInput,ignoreCrossLaneEdges:e==null?void 0:e.ignoreCrossLaneEdges,optimizeRanksByCrossings:e==null?void 0:e.optimizeRanksByCrossings}).rankOf},r=ge(n),{preds:i,succs:a}=hn(n,h=>{if(e!=null&&e.ignoreCrossLaneEdges){const l=r(h.src),x=r(h.dst);if(l&&x&&l!==x)return!1}return!0}),c=De(n)??[...n.nodes],f=[...c].reverse(),g=d((h,l)=>{let x=0;for(const v of i.get(h)??[])x=Math.max(x,(s[v]??0)+1);let C=Number.POSITIVE_INFINITY;const b=a.get(h)??[];return b.length>0&&(C=Math.min(...b.map(v=>(s[v]??0)-1))),Number.isFinite(C)||(C=Math.max(x,l)),Math.min(Math.max(l,x),C)},"clampFeasible"),p=ln.GRAVITY_ITERATIONS,M=d(h=>{let l=!1;for(const x of h){const C=i.get(x)??[],b=a.get(x)??[];if(C.length===0&&b.length===0)continue;const v=C.length>0?C.reduce((E,A)=>E+(s[A]??0)+1,0)/C.length:s[x]??0,L=b.length>0?b.reduce((E,A)=>E+(s[A]??0)-1,0)/b.length:s[x]??0,y=Math.round((v+L)/2),I=g(x,y);I!==s[x]&&(s[x]=I,l=!0)}return l},"relaxOrder");for(let h=0;h<p;h++){const l=M(c),x=M(f);if(!l&&!x)break}for(const h of c){let l=0;for(const x of i.get(h)??[])l=Math.max(l,(s[x]??0)+1);(s[h]??0)<l&&(s[h]=l)}for(const h of f){const l=a.get(h)??[];if(l.length>0){const x=Math.min(...l.map(C=>(s[C]??0)-1));(s[h]??0)>x&&(s[h]=x)}}return{layers:vo(n,c,s),rankOf:s,dummy:new Set}}d(Qs,"assignLayers_Gravity");function tr(t){const e=So(t),n=Io(t);let o=Co(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const a of n.get(i)??[])e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0&&r.push(a)}o=r.sort((i,a)=>i.localeCompare(a))}return s.length===t.nodes.length?s:null}d(tr,"topoSortByGenerationIfAcyclic");function er(t,e){const n=Ie(t),o=(e==null?void 0:e.direction)==="LR"?tr(n)??[...n.nodes].sort():De(n)??[...n.nodes].sort(),s=ge(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),a=new Map,c=d((g,p)=>(e==null?void 0:e.ignoreCrossLaneEdges)??!0?r(g)===r(p)?1:0:1,"edgeWeight");for(const g of o){const p=n.nodeById.get(g);if(p!=null&&p.isGroup)continue;const M=Mo(n,g);let u=0;if(M.length>0)for(const C of M){const b=C.src,v=i[b]??0;u=Math.max(u,v+c(b,g))}const h=r(g),l=a.get(h)??0,x=Math.max(u,l);i[g]=x,a.set(h,x+1)}return{layers:vo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(er,"assignLayers_LaneAwareCompact");function nr(t,e){const n=Ie(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const a=new Map(n.nodeById),c=d(u=>{const h=`placeholder-${i++}`,l={id:h,isGroup:!1,isDummy:!0,width:0,height:0};for(a.set(h,l),r.add(h);s.length<=u;)s.push([]);return s[u].push(h),o[h]=u,h},"addDummyAt"),f=[...n.edges].sort((u,h)=>u.id===h.id?u.src===h.src?u.dst.localeCompare(h.dst):u.src.localeCompare(h.src):u.id.localeCompare(h.id)),g=[];for(const u of f){const h=o[u.src]??0,l=o[u.dst]??0;if(l-h<=1){g.push(u);continue}let x=u.src;for(let b=h+1,v=0;b<l;b++,v++){const L=c(b);g.push({id:`${u.id}#${v}`,src:x,dst:L,weight:u.weight,ref:u.ref}),x=L}const C=l-h-2;g.push({id:`${u.id}#${Math.max(C+1,0)}`,src:x,dst:u.dst,weight:u.weight,ref:u.ref})}const M={nodes:[...n.nodes,...[...r].filter(u=>!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:a};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:M}}d(nr,"makeProperLayering");function Zn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Zn,"median");function Qn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Qn,"barycenter");function or(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(or,"neighborPositionsFor");function sr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(sr,"currentOrderTieBreak");function to(t,e,n){const o=new Set(t),s=new Set(e),r=ke(t),i=ke(e),a=[];for(const f of n)o.has(f.src)&&s.has(f.dst)&&a.push({u:r.get(f.src),v:i.get(f.dst)});a.sort((f,g)=>f.u===g.u?f.v-g.v:f.u-g.u);const c=a.map(f=>f.v);return Lo(c)}d(to,"countCrossingsBetweenAdjacent");function Ze(t,e,n){return[...t].sort((o,s)=>{const r=Zn(e.get(o)??[]),i=Zn(e.get(s)??[]);return r===i?sr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(Ze,"sortByHeuristic");function eo(t,e,n,o,s,r){const i=ke(t),a=ke(e),c=or(e,i,n,o);if(!s||!r||r.length===0)return Ze(e,c,a);const f=new Map;for(const M of e){const u=s(M),h=f.get(u)??[];h.push(M),f.set(u,h)}const g=[];for(const M of r){const u=f.get(M);if(!u||u.length===0)continue;const h=Ze(u,c,a);g.push(...h)}const p=f.get(null);if(p&&p.length>0){const M=Ze(p,c,a);for(const u of M){const h=Qn(c.get(u)??[]);let l=g.length;if(isFinite(h))for(const[x,C]of g.entries()){const b=Qn(c.get(C)??[]);if(h<b){l=x;break}}g.splice(l,0,u)}}return g}d(eo,"reorderLayer");function no(t,e,n,o,s){const r=[...e],i=new Set(t),a=new Set(e),c=o?new Set(o):null,f=n.filter(l=>i.has(l.src)&&a.has(l.dst)),g=c?n.filter(l=>a.has(l.src)&&c.has(l.dst)):void 0,p=d(l=>{let x=to(t,l,f);return g&&o&&(x+=to(l,o,g)),x},"crossingScore"),M=s?new Map:null;if(s&&M)for(const l of e)M.set(l,s(l));let u=!0,h=p(r);for(;u;){u=!1;for(let l=0;l+1<r.length;l++){if(M){const b=M.get(r[l]),v=M.get(r[l+1]);if(b!==v)continue}const x=h;[r[l],r[l+1]]=[r[l+1],r[l]];const C=p(r);C<x?(h=C,u=!0):[r[l],r[l+1]]=[r[l+1],r[l]]}}return r}d(no,"transposeImprove");function rr(t,e,n){const o=t.layers.map(a=>[...a]),s=e.edges,r=ge(e),i=Eo(e,n==null?void 0:n.laneOrder);for(let a=0;a<3;a++){for(let c=1;c<o.length;c++)o[c]=eo(o[c-1],o[c],s,"down",r,i),o[c]=no(o[c-1],o[c],s,o[c+1],r);for(let c=o.length-2;c>=0;c--)o[c]=eo(o[c+1],o[c],s,"up",r,i),o[c]=no(o[c+1],o[c],s,o[c-1],r)}return{layers:o}}d(rr,"orderLayers");function ir(t,e,n){const o=(n==null?void 0:n.layerGap)??Ho.DEFAULT_LAYER_GAP,s=(n==null?void 0:n.nodeGap)??Ho.DEFAULT_NODE_GAP,r=(n==null?void 0:n.laneGap)??s*2,i=(n==null?void 0:n.direction)??"TB",a=i==="LR"||i==="RL",c=t.layers,f=Object.create(null),g=Object.create(null),p=d(O=>e.nodeById.get(O),"getNode"),M=d(O=>{var k;return((k=p(O))==null?void 0:k.width)??0},"getWidth"),u=d(O=>{var k;return((k=p(O))==null?void 0:k.height)??0},"getHeight"),h=ge(e),l=Eo(e,n==null?void 0:n.laneOrder),x=c.map(O=>O.reduce((k,H)=>Math.max(k,u(H)),0)),C=[];if(a)for(let O=0;O+1<c.length;O++){const k=c[O].reduce((Mt,Ht)=>Math.max(Mt,M(Ht)),0),H=c[O+1].reduce((Mt,Ht)=>Math.max(Mt,M(Ht)),0),P=x[O],G=x[O+1],j=P/2+G/2,tt=(k+H)/2,ft=Math.max(0,tt-j-o);C.push(ft)}const b=new Set;for(const O of c)for(const k of O)b.add(h(k));const v=b.has(null),L=l.filter(O=>b.has(O)),y=[...v?[null]:[],...L],I=Object.create(null);for(const O of L)I[O]=0;v&&(I.null=0);for(const O of c){const k=Object.create(null),H=[];for(const P of O){const G=h(P);G===null?H.push(P):(k[G]||(k[G]=[])).push(P)}for(const[P,G]of Object.entries(k)){const j=G.reduce((tt,ft)=>tt+M(ft),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(v&&H.length){const P=H.reduce((G,j)=>G+M(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const E=new Map;{const O=y.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,y.length-1))/2;for(let P=0;P<y.length;P++){const G=y[P],j=O[P]??0,tt=H+j/2;E.set(G,tt),H+=j,P<y.length-1&&(H+=r)}}let A=0;for(const[O,k]of c.entries()){const H=x[O]??0,P=new Map;for(const j of k){const tt=h(j),ft=P.get(tt)??[];ft.push(j),P.set(tt,ft)}for(const j of y){const tt=P.get(j)??[];if(tt.length===0)continue;const ft=E.get(j);if(tt.length===1){const Mt=tt[0];f[Mt]=ft,g[Mt]=A+H/2}else{const Mt=tt.map(nt=>M(nt)),Ht=Mt.reduce((nt,J)=>nt+J,0)+s*(tt.length-1);let Ft=ft-Ht/2;for(const[nt,J]of tt.entries()){const rt=Mt[nt];f[J]=Ft+rt/2,g[J]=A+H/2,Ft+=rt+s}}}const G=C[O]??0;A+=H+o+G}const B=new Map;for(const O of e.edges){const k=O.ref.id;B.has(k)||B.set(k,[]),B.get(k).push(O)}for(const[,O]of B){if(O.length===0)continue;const k=O[0].ref,H=k.start,P=k.end;if(H==null||P==null)continue;const G=Math.round(((f[H]??0)+(f[P]??0))/2),j=new Set;for(const tt of O)j.add(tt.src),j.add(tt.dst);for(const tt of j){if(tt===H||tt===P)continue;const ft=e.nodeById.get(tt);ft!=null&&ft.isDummy&&(f[tt]=G)}}return{x:f,y:g}}d(ir,"assignCoordinates");var cr=8;function ar(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}d(ar,"hashString");function lr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(lr,"mulberry32");function fr(t,e){const n=[...t],o=lr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(fr,"deterministicShuffle");function dr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(dr,"sourceDistance");function oo(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const a=n.get(s),c=n.get(r);a==null||c==null||(o+=i*Math.abs(a-c))}return o}d(oo,"laneArrangementCost");function ur(t){const e=gn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=ge(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,a=typeof r.end=="string"?r.end:void 0;if(!i||!a||!t.nodeById.has(i)||!t.nodeById.has(a))continue;const c=o(i),f=o(a);if(!c||!f||c===f)continue;const g=n.get(c),p=n.get(f);if(g==null||p==null)continue;const[M,u]=g<=p?[c,f]:[f,c],h=`${M}\0${u}`,l=s.get(h);l?l.weight++:s.set(h,{a:M,b:u,weight:1})}return[...s.values()]}d(ur,"buildWeightedLaneEdges");function so(t,e,n){const o=[...t];let s=oo(o,e),r=!0,i=0;const a=Math.max(1,o.length);for(;r&&i<a;){r=!1,i++;for(let c=0;c+1<o.length;c++){[o[c],o[c+1]]=[o[c+1],o[c]];const f=oo(o,e);f<s?(s=f,r=!0):[o[c],o[c+1]]=[o[c+1],o[c]]}}return{order:o,cost:s,sourceDistance:dr(o,n)}}d(so,"greedySwitch");function hr(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}d(hr,"isBetterCandidate");function gr(t,e,n){const o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return ar(`${t.join("|")}#${o}#${n}`)}d(gr,"seedForRestart");function mr(t,e={}){const n=gn(t);if(n.length<2)return n;const o=ur(t);if(o.length===0)return n;const s=new Map(n.map((a,c)=>[a,c]));let r=so(n,o,s);const i=Math.max(0,e.restarts??cr);for(let a=0;a<i;a++){const c=gr(n,o,a),f=fr(n,c),g=so(f,o,s);hr(g,r)&&(r=g)}return r.order}d(mr,"optimizeTopLaneOrder");function yr(t,e){const n=(e==null?void 0:e.ignoreCrossLaneEdges)??!0,o=(e==null?void 0:e.optimizeRanksByCrossings)??!0,s=Ie(t),r=e!=null&&e.automaticLaneOrdering?mr(s,{restarts:cr}):void 0,i=_s(s),a=i.acyclic,c=n?er(a,{compactSingleInput:(e==null?void 0:e.compactSingleInput)??ln.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e==null?void 0:e.direction}):Qs(a,{compactSingleInput:(e==null?void 0:e.compactSingleInput)??ln.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:f,graphWithDummies:g}=nr(c,a),p=rr(f,g,{laneOrder:r}),M=ir(p,g,{layerGap:e==null?void 0:e.layerGap,nodeGap:e==null?void 0:e.nodeGap,direction:e==null?void 0:e.direction,laneOrder:r});return{acyclic:a,reversed:i.reversed,layering:f,ordered:p,coordinates:M}}d(yr,"sugiyamaLayout");var lt=ei.EPSILON,ni=8,Ce=15,Ne=15,qe=25,ie=20,Tn=10;function ro(t,e,n){const o=t.x??0,s=t.y??0,r=e.x-o,i=e.y-s,a=Math.abs(r),c=Math.abs(i);return a<lt&&c<lt?n:c>lt&&c*3>=a?i>0?"bottom":"top":a>lt?r>0?"right":"left":n}d(ro,"chooseOrthogonalSide");function io(t,e){return Math.abs(t.to-e.from)<lt||Math.abs(t.to-e.to)<lt?t.to:t.from}d(io,"sharedLineEndpointCoord");function ve(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}d(ve,"pointOnLine");function pr(t,e){var K,Z,Y,q;const n=t.nodes??[],o=t.edges??[],s=[];for(const m of o)m.isLayoutOnly||s.push({...m,__originalEdge:m});const r=new Map,i=new Map,a=[],c=e==="LR";for(const m of n)r.set(m.id,m);const f=n.filter(m=>m.isGroup&&!m.parentId);for(const m of f){const S={id:m.id},w=d(T=>{i.set(T.id,S),n.filter(N=>N.parentId===T.id).forEach(w)},"assignLane");w(m)}const g=n.filter(m=>!m.isGroup&&!m.isEdgeLabel).map(m=>{const S=m.width??10,w=m.height??10,T=m.x??0,N=m.y??0,D=ni;return{nodeId:m.id,minX:T-S/2-D,maxX:T+S/2+D,minY:N-w/2-D,maxY:N+w/2+D,visualXHalfExtent:c?w/2+D:S/2+D}}),p=d((m,S,w,T)=>{let N=a.find(D=>D.orientation===m&&Math.abs(D.coord-S)<1);return N||(N={id:`pipe-${m}-${S.toFixed(0)}`,orientation:m,coord:S,spanMin:w,spanMax:T,tracks:[]},a.push(N)),N.spanMin=Math.min(N.spanMin,w),N.spanMax=Math.max(N.spanMax,T),N},"getOrAddPipe"),M=d((m,S)=>{const w=m.width??10,T=m.height??10,N=m.x??0,D=m.y??0;switch(S){case"top":return{x:N,y:D-T/2};case"bottom":return{x:N,y:D+T/2};case"left":return{x:N-w/2,y:D};case"right":return{x:N+w/2,y:D}}},"portForSide"),u=d((m,S,w)=>M(m,ro(m,S,w?"bottom":"top")),"getOrthogonalPort"),h=[],l=[],x=new Set,C=1e3,b=d((m,S,w)=>{if(h.length===0)return 0;const T=Math.abs(S.y-w.y)<lt,N=Math.abs(S.x-w.x)<lt;if(!T&&!N)return 0;let D=0;if(T){const W=S.y,ot=Math.min(S.x,w.x)-lt,U=Math.max(S.x,w.x)+lt;if(U<=ot)return 0;for(const z of h)z.edgeIndex===m||z.orientation!=="vertical"||z.pipe.coord<ot||z.pipe.coord>U||z.from-lt<=W&&z.to+lt>=W&&(D+=C)}else if(N){const W=S.x,ot=Math.min(S.y,w.y)-lt,U=Math.max(S.y,w.y)+lt;if(U<=ot)return 0;for(const z of h)z.edgeIndex===m||z.orientation!=="horizontal"||z.pipe.coord<ot||z.pipe.coord>U||z.from-lt<=W&&z.to+lt>=W&&(D+=C)}return D},"crossingPenalty"),v=s.map((m,S)=>{if(!m.start||!m.end)return{idx:S,crossLane:0,dx:0,dy:0};const w=r.get(m.start),T=r.get(m.end),N=i.get(m.start),D=i.get(m.end),W=N&&D&&N.id!==D.id?1:0,ot=w&&T?Math.abs((T.x??0)-(w.x??0)):0,U=w&&T?Math.abs((T.y??0)-(w.y??0)):0;return{idx:S,crossLane:W,dx:ot,dy:U}}).sort((m,S)=>{if(m.crossLane!==S.crossLane)return S.crossLane-m.crossLane;const w=m.dx+m.dy,T=S.dx+S.dy;return Math.abs(w-T)>1?w-T:m.idx-S.idx}).map(m=>m.idx),L=d((m,S,w,T)=>{const N=Math.min(m.x,S.x),D=Math.max(m.x,S.x),W=Math.min(m.y,S.y),ot=Math.max(m.y,S.y);return!!g.find(z=>w&&z.nodeId===w||T&&z.nodeId===T?!1:Math.abs(m.x-S.x)>lt?z.minY<m.y&&z.maxY>m.y&&z.maxX>N&&z.minX<D:z.minX<m.x&&z.maxX>m.x&&z.maxY>W&&z.minY<ot)},"isSegmentBlocked"),y=new Map,I=new Map;for(const m of s)!m.start||!m.end||m.start===m.end||(I.set(m.start,(I.get(m.start)??0)+1),I.set(m.end,(I.get(m.end)??0)+1));const E=d((m,S)=>ro(m,S,"bottom"),"determineSide"),A=new Map;for(const[m,S]of s.entries()){if(!S.start||!S.end||S.start===S.end||S.points&&S.points.length>0)continue;const w=r.get(S.start),T=r.get(S.end);if(!w||!T)continue;const N=(T.x??0)-(w.x??0),D=(T.y??0)-(w.y??0);A.set(m,{edgeIdx:m,srcId:S.start,dstId:S.end,srcSide:E(w,{x:T.x??0,y:T.y??0}),dstSide:E(T,{x:w.x??0,y:w.y??0}),absDx:Math.abs(N),absDy:Math.abs(D),dxSign:Math.sign(N),dySign:Math.sign(D)})}const B=d(m=>m.srcSide==="top"||m.srcSide==="bottom"?m.absDx===0?1/0:m.absDy/m.absDx:m.absDy===0?1/0:m.absDx/m.absDy,"preferenceStrength"),O=d(m=>m.srcSide==="top"||m.srcSide==="bottom"?m.dxSign>=0?"right":"left":m.dySign>=0?"bottom":"top","secondarySide"),k=new Map;for(const m of A.values()){const S=`${m.srcId}:${m.srcSide}`;k.has(S)||k.set(S,[]),k.get(S).push(m)}const H=new Map,P=d((m,S)=>`${m}:${S}`,"loadKey");for(const m of A.values())H.set(P(m.srcId,m.srcSide),(H.get(P(m.srcId,m.srcSide))??0)+1),H.set(P(m.dstId,m.dstSide),(H.get(P(m.dstId,m.dstSide))??0)+1);for(const m of k.values())if(!(m.length<2)){m.sort((S,w)=>{const T=B(S),N=B(w);return Math.abs(T-N)>1e-9?N-T:S.edgeIdx-w.edgeIdx});for(let S=1;S<m.length;S++){const w=m[S],T=O(w),N=H.get(P(w.srcId,w.srcSide))??0,D=H.get(P(w.srcId,T))??0;D>=N||(H.set(P(w.srcId,w.srcSide),N-1),H.set(P(w.srcId,T),D+1),w.srcSide=T)}}const G=d(m=>{const S=m==null?void 0:m.shape;return S==="question"||S==="diamond"},"isDiamondNode"),j=new Map;for(const m of A.values())j.has(m.dstId)||j.set(m.dstId,new Set),j.get(m.dstId).add(m.dstSide);for(const m of A.values()){if(!G(r.get(m.srcId)))continue;const S=j.get(m.srcId);if(!(S!=null&&S.has(m.srcSide)))continue;const w=O(m);if(S.has(w)||(H.get(P(m.srcId,w))??0)>0)continue;const T=H.get(P(m.srcId,m.srcSide))??0;H.set(P(m.srcId,m.srcSide),Math.max(0,T-1)),H.set(P(m.srcId,w),1),m.srcSide=w}for(const m of A.values()){const{edgeIdx:S,srcId:w,dstId:T,srcSide:N,dstSide:D}=m,W=r.get(w),ot=r.get(T),U=`${w}:${N}:src`,z=N==="top"||N==="bottom"?ot.x??0:ot.y??0;y.has(U)||y.set(U,[]),y.get(U).push({edgeIdx:S,oppositeCoord:z});const bt=`${T}:${D}:dst`,dt=D==="top"||D==="bottom"?W.x??0:W.y??0;y.has(bt)||y.set(bt,[]),y.get(bt).push({edgeIdx:S,oppositeCoord:dt})}const tt=new Map,ft=8;for(const[m,S]of y){if(S.length<2)continue;S.sort((At,Gt)=>At.oppositeCoord-Gt.oppositeCoord);const w=m.split(":"),T=w.slice(0,-2).join(":"),N=w[w.length-2],D=w[w.length-1],W=r.get(T);if(!W)continue;const U=N==="left"||N==="right"?W.height??10:W.width??10,z=W.shape,dt=z==="question"||z==="diamond"?U*.3:U,st=Math.min(20,Math.max(ft,dt/(S.length+1))),Bt=-(st*(S.length-1))/2;for(const[At,Gt]of S.entries()){const ee=Bt+At*st,xn=`${Gt.edgeIdx}:${D}`;tt.set(xn,ee)}}const Mt=d(m=>{var S;return!!((S=s[m])!=null&&S.labelNodeId)},"edgeHasLabelNode"),Ht=d((m,S)=>m?(y.get(`${m}:${S}:src`)??[]).some(({edgeIdx:w})=>Mt(w))||(y.get(`${m}:${S}:dst`)??[]).some(({edgeIdx:w})=>Mt(w)):!1,"faceHasLabelNode"),Ft=d((m,S,w)=>S==="top"||S==="bottom"?{x:m.x+w,y:m.y}:{x:m.x,y:m.y+w},"applyPortOffset"),nt=d((m,S,w)=>{const T=A.get(m),N={x:w.x??0,y:w.y??0},D={x:S.x??0,y:S.y??0},W=(T==null?void 0:T.srcSide)??E(S,N),ot=(T==null?void 0:T.dstSide)??E(w,D);let U=T?M(S,T.srcSide):u(S,N,!0),z=T?M(w,T.dstSide):u(w,D,!1);const bt=tt.get(`${m}:src`),dt=tt.get(`${m}:dst`);return bt!==void 0&&(U=Ft(U,W,bt)),dt!==void 0&&(z=Ft(z,ot,dt)),{pSrcPort:U,pDstPort:z,srcSide:W,dstSide:ot}},"portsForEdge");for(const m of v){const S=s[m];if(l[m]=[],!S.start||!S.end||S.points&&S.points.length>0||S.start===S.end)continue;const w=r.get(S.start),T=r.get(S.end);if(!w||!T)continue;const{pSrcPort:N,pDstPort:D,srcSide:W,dstSide:ot}=nt(m,w,T),U={...N},z={...D},bt=W==="top"||W==="bottom",dt=ot==="top"||ot==="bottom";if(bt){const X=N.y>(w.y??0);U.y=X?N.y+ie:N.y-ie}else{const X=N.x>(w.x??0);U.x=X?N.x+ie:N.x-ie}if(dt){const X=D.y>(T.y??0);z.y=X?D.y+ie:D.y-ie}else{const X=D.x>(T.x??0);z.x=X?D.x+ie:D.x-ie}const ct=d((X,$)=>{for(const Q of g)if(!$.includes(Q.nodeId)&&X.x>Q.minX&&X.x<Q.maxX&&X.y>Q.minY&&X.y<Q.maxY)return{inside:!0,obstacle:Q};return{inside:!1}},"isPointInObstacle"),st=d((X,$,Q,ht,Tt)=>{if(Tt){const kt=X.y>($.y??0);return{x:(Q.x??0)>=X.x?ht.maxX+Ce:ht.minX-Ce,y:kt?ht.maxY+Ne:ht.minY-Ne,leavesPositiveSide:kt}}const Ct=X.x>($.x??0),Rt=(Q.y??0)>=X.y;return{x:Ct?ht.maxX+Ce:ht.minX-Ce,y:Rt?ht.maxY+Ne:ht.minY-Ne,leavesPositiveSide:Ct}},"obstacleDetour");let It=[];const Bt=[S.start,S.end],At=ct(U,Bt);if(At.inside&&At.obstacle){const X=At.obstacle;if(bt){const $=st(N,w,T,X,!0);U.x=$.x,U.y=$.y;const Q=$.leavesPositiveSide?Math.min(X.minY-2,N.y+ie):Math.max(X.maxY+2,N.y-ie);It=[{x:N.x,y:Q},{x:$.x,y:Q},{x:$.x,y:$.y}]}else{const $=st(N,w,T,X,!1),Q=$.leavesPositiveSide?Math.min(X.minX-2,N.x+ie):Math.max(X.maxX+2,N.x-ie);U.x=$.x,U.y=$.y,It=[{x:Q,y:N.y},{x:Q,y:$.y},{x:$.x,y:$.y}]}}let Gt=[];const ee=ct(z,Bt);if(ee.inside&&ee.obstacle){const X=ee.obstacle;if(dt){const $=st(D,T,w,X,!0);z.x=$.x,z.y=$.y,Gt=[{x:$.x,y:$.y},{x:D.x,y:$.y}]}else{const $=st(D,T,w,X,!1);z.x=$.x,z.y=$.y,Gt=[{x:$.x,y:$.y},{x:$.x,y:D.y}]}}if(It.length===0&&Gt.length===0){const X=Ce,$=Math.abs(U.x-z.x)<X,Q=Math.abs(U.y-z.y)<X,ht=tt.get(`${m}:src`)!==void 0||tt.get(`${m}:dst`)!==void 0,Tt=(((K=y.get(`${S.start??""}:${W}:src`))==null?void 0:K.length)??0)+(((Z=y.get(`${S.start??""}:${W}:dst`))==null?void 0:Z.length)??0),Ct=(((Y=y.get(`${S.end??""}:${ot}:src`))==null?void 0:Y.length)??0)+(((q=y.get(`${S.end??""}:${ot}:dst`))==null?void 0:q.length)??0),Rt=Tt>1||Ct>1,kt=I.get(S.start??"")??0,mt=I.get(S.end??"")??0,Vt=Tt>1&&Ht(S.start,W)||Ct>1&&Ht(S.end,ot),re=Tt<=1||kt<=2,Dt=Ct<=1||mt<=2;if(($||Q)&&!ht&&(!Rt||Rt&&!Vt&&re&&Dt)&&!L(N,D,S.start,S.end)){S.points=[{...N},{...U},{...z},{...D}],x.add(m);const vt=Q?"horizontal":"vertical",Ut=Q?N.y:N.x,Lt=Q?Math.min(N.x,D.x):Math.min(N.y,D.y),Et=Q?Math.max(N.x,D.x):Math.max(N.y,D.y),Zt={id:`fast-path-${vt}-${Ut.toFixed(0)}-${m}`,orientation:vt,coord:Ut,spanMin:Lt,spanMax:Et,tracks:[]};h.push({edgeIndex:m,segmentIndex:0,orientation:vt,pipe:Zt,trackIndex:0,from:Lt,to:Et});continue}}const xn=p("vertical",U.x,U.y,U.y);U.x=xn.coord;const Mr=p("vertical",z.x,z.y,z.y);z.x=Mr.coord;let ye=Math.min(U.x,z.x)-50,pe=Math.max(U.x,z.x)+50,we=Math.min(U.y,z.y)-50,Ae=Math.max(U.y,z.y)+50;for(const X of g){const $=Math.min(U.x,z.x),Q=Math.max(U.x,z.x),ht=Math.min(U.y,z.y),Tt=Math.max(U.y,z.y);X.minX<Q&&X.maxX>$&&X.minY<Tt&&X.maxY>ht&&(ye=Math.min(ye,X.minX-qe),pe=Math.max(pe,X.maxX+qe),we=Math.min(we,X.minY-qe),Ae=Math.max(Ae,X.maxY+qe))}for(const X of g){if(X.maxX<ye||X.minX>pe||X.maxY<we||X.minY>Ae)continue;const $=Ce;p("horizontal",X.minY-$,ye,pe),p("horizontal",X.maxY+$,ye,pe);const Q=Ne;p("vertical",X.minX-Q,we,Ae),p("vertical",X.maxX+Q,we,Ae)}p("horizontal",U.y,ye,pe),p("horizontal",z.y,ye,pe);const Ir=a.filter(X=>X.orientation==="horizontal"&&X.coord>=we&&X.coord<=Ae),Sr=a.filter(X=>X.orientation==="vertical"&&X.coord>=ye&&X.coord<=pe),He=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),Xe=He(U.x,U.y),wo=He(z.x,z.y),Ye=new Map,bn=new Map,Mn=new Map,Ge=new Set,Se=[];Ye.set(Xe,0),Mn.set(Xe,"n"),Se.push({key:Xe,f:Math.hypot(z.x-U.x,z.y-U.y),pt:U}),Ge.add(Xe);let $t=[];const xe=d((X,$)=>L(X,$,S.start,S.end),"checkSegmentBlocked"),In={x:z.x,y:U.y},Cr=xe(U,In),vr=xe(In,z),Lr=Cr||vr,Sn={x:U.x,y:z.y},Er=xe(U,Sn),Tr=xe(Sn,z);if(Lr?Er||Tr||(Math.abs(U.x-z.x)<lt?$t=[U,z]:$t=[U,Sn,z]):Math.abs(U.y-z.y)<lt||Math.abs(U.x-z.x)<lt?$t=[U,z]:$t=[U,In,z],$t.length===0)for(;Se.length>0;){Se.sort((mt,Vt)=>mt.f-Vt.f);const X=Se.shift();if(Ge.delete(X.key),X.key===wo){let mt=wo,Vt=z;for($t=[Vt];bn.has(mt);){const re=bn.get(mt);$t.unshift(re),Vt=re,mt=He(re.x,re.y)}break}const $=X.pt.x,Q=X.pt.y,ht=Sr.sort((mt,Vt)=>mt.coord-Vt.coord),Tt=ht.findIndex(mt=>Math.abs(mt.coord-$)<1),Ct=Ir.sort((mt,Vt)=>mt.coord-Vt.coord),Rt=Ct.findIndex(mt=>Math.abs(mt.coord-Q)<1),kt=[];Tt>0&&kt.push({x:ht[Tt-1].coord,y:Q}),Tt>=0&&Tt<ht.length-1&&kt.push({x:ht[Tt+1].coord,y:Q}),Rt>0&&kt.push({x:$,y:Ct[Rt-1].coord}),Rt>=0&&Rt<Ct.length-1&&kt.push({x:$,y:Ct[Rt+1].coord});for(const mt of kt){const Vt=Math.min($,mt.x),re=Math.max($,mt.x),Dt=Math.min(Q,mt.y),jt=Math.max(Q,mt.y);if(g.some(ne=>ne.nodeId===S.start||ne.nodeId===S.end?!1:Vt!==re?ne.minY<Q&&ne.maxY>Q&&ne.maxX>Vt&&ne.minX<re:ne.minX<$&&ne.maxX>$&&ne.maxY>Dt&&ne.minY<jt))continue;const vt=He(mt.x,mt.y),Ut=Math.abs(mt.x-$)+Math.abs(mt.y-Q),Lt=b(m,X.pt,mt);let Et=0;const Zt=z.x-U.x,Re=z.y-U.y,$e=mt.x-$,Cn=mt.y-Q;(Re>10&&Cn<-5||Re<-10&&Cn>5)&&(Et=Math.abs(Cn)*100),(Zt>10&&$e<-5||Zt<-10&&$e>5)&&(Et+=Math.abs($e)*50);let Ao=0;const Ro=Mn.get(X.key)??"n",No=Math.abs($e)>lt?"h":"v";Ro!=="n"&&Ro!==No&&(Ao=50);const wr=Ut+Lt+Et+Ao,ze=(Ye.get(X.key)??1/0)+wr,Oo=Math.abs(z.x-mt.x)+Math.abs(z.y-mt.y);if(ze<(Ye.get(vt)??1/0))if(bn.set(vt,X.pt),Ye.set(vt,ze),Mn.set(vt,No),!Ge.has(vt))Se.push({key:vt,f:ze+Oo,pt:mt}),Ge.add(vt);else{const ne=Se.findIndex(Ar=>Ar.key===vt);ne!==-1&&(Se[ne].f=ze+Oo)}}}if($t.length===0&&($t=[U,{x:U.x,y:z.y},z]),$t.length>4){const X=$t[0],$=$t[$t.length-1];let Q=Math.min(X.x,$.x),ht=Math.max(X.x,$.x),Tt=Math.min(X.y,$.y),Ct=Math.max(X.y,$.y);for(const Dt of $t)Q=Math.min(Q,Dt.x),ht=Math.max(ht,Dt.x),Tt=Math.min(Tt,Dt.y),Ct=Math.max(Ct,Dt.y);const Rt=ht>Math.max(X.x,$.x),kt=Q<Math.min(X.x,$.x);if(c){const Dt=Ne;if(Rt){const jt=Math.max(X.x,$.x),_t=Math.min(X.y,$.y),vt=Math.max(X.y,$.y),Ut=g.filter(Lt=>Lt.minX<jt&&Lt.maxX>jt&&Lt.minY<vt&&Lt.maxY>_t);if(Ut.length>0){let Lt=Math.max(X.x,$.x);for(const Et of Ut){const Zt=(Et.minX+Et.maxX)/2;if(Et.visualXHalfExtent===void 0||isNaN(Et.visualXHalfExtent))continue;const Re=Zt+Et.visualXHalfExtent+Dt;Lt=Math.max(Lt,Re)}isNaN(Lt)||(ht=Lt)}}if(kt){const jt=g.filter(_t=>_t.minX<Math.min(X.x,$.x)+Dt&&_t.minY<Math.max(X.y,$.y)&&_t.maxY>Math.min(X.y,$.y));if(jt.length>0){let _t=Math.min(X.x,$.x);for(const vt of jt){const Lt=(vt.minX+vt.maxX)/2-vt.visualXHalfExtent-Dt;_t=Math.min(_t,Lt)}Q=_t}}}const mt=d(Dt=>{const jt=$.y>X.y,_t=g.filter(Lt=>{const Et=Math.min(X.x,$.x)<Lt.maxX&&Math.max(X.x,$.x)>Lt.minX,Zt=Math.min(X.y,$.y)<Lt.maxY&&Math.max(X.y,$.y)>Lt.minY;return Et&&Zt});let vt=_t;if(c&&_t.length>0){const Lt=_t.filter(Et=>Et.minX<Dt&&Et.maxX>Dt);Lt.length>0&&(vt=Lt)}if(vt.length===0)return $.y;const Ut=Ce;if(jt){const Et=Math.max(...vt.map(Zt=>Zt.maxY))+Ut;if(Et<$.y-lt)return Et}else{const Et=Math.min(...vt.map(Zt=>Zt.minY))-Ut;if(Et>$.y+lt)return Et}return $.y},"findBestReturnY"),Vt=d(Dt=>{const jt=mt(Dt),_t={x:Dt,y:X.y},vt={x:Dt,y:jt},Ut={x:$.x,y:jt},Lt=xe(X,_t),Et=xe(_t,vt),Zt=xe(vt,Ut),Re=jt!==$.y?xe(Ut,$):!1;return!Lt&&!Et&&!Zt&&!Re?Math.abs(jt-$.y)<lt?[X,_t,vt,$]:[X,_t,vt,Ut,$]:null},"trySimplifyWithDetourX"),re=Rt&&!kt?Vt(ht):kt&&!Rt?Vt(Q):null;re&&($t=re)}const zt=[N,...It,...$t,...Gt.reverse(),D];if(zt.length>=3){const X=zt[zt.length-1],$=zt[zt.length-2],Q=zt[zt.length-3],ht=Math.abs(Q.y-$.y)<lt&&Math.abs($.y-X.y)<lt,Tt=Math.abs(Q.x-$.x)<lt&&Math.abs($.x-X.x)<lt;if(ht){const Ct=Math.sign($.x-Q.x),Rt=Math.sign(X.x-Q.x);Ct!==0&&Ct===Rt&&Math.abs($.x-Q.x)>Math.abs(X.x-Q.x)&&zt.splice(-2,1)}else if(Tt){const Ct=Math.sign($.y-Q.y),Rt=Math.sign(X.y-Q.y);Ct!==0&&Ct===Rt&&Math.abs($.y-Q.y)>Math.abs(X.y-Q.y)&&zt.splice(-2,1)}}const fe=[zt[0]];for(let X=1;X<zt.length-1;X++){if(X===1){fe.push(zt[X]);continue}const $=fe[fe.length-1],Q=zt[X],ht=zt[X+1];if(Math.abs($.y-Q.y)<lt&&Math.abs(Q.y-ht.y)<lt){const Tt=Q.x>$.x,Ct=ht.x>Q.x;if(Tt!==Ct){fe.push(Q);continue}continue}if(Math.abs($.x-Q.x)<lt&&Math.abs(Q.x-ht.x)<lt){const Tt=Q.y>$.y,Ct=ht.y>Q.y;if(Tt!==Ct){fe.push(Q);continue}continue}fe.push(Q)}fe.push(zt[zt.length-1]);for(let X=0;X<fe.length-1;X++){const $=fe[X],Q=fe[X+1],ht=Math.abs($.x-Q.x)<lt?"vertical":"horizontal",Tt=ht==="vertical"?$.x:$.y,Ct=ht==="vertical"?Math.min($.y,Q.y):Math.min($.x,Q.x),Rt=ht==="vertical"?Math.max($.y,Q.y):Math.max($.x,Q.x),kt=p(ht,Tt,Ct,Rt),mt={edgeIndex:m,segmentIndex:X,orientation:ht,pipe:kt,trackIndex:0,from:Ct,to:Rt};h.push(mt),l[m].push(h.length-1),kt.tracks[0]||(kt.tracks[0]={index:0,coord:kt.coord,segments:[]}),kt.tracks[0].segments.push({edgeIndex:m,segmentIndex:X,from:Ct,to:Rt})}}const J=d((m,S)=>m.from<S.to&&S.from<m.to,"segmentsOverlap"),rt=d((m,S,w,T)=>{const N=!T.segments.some(W=>(W.edgeIndex!==S.edgeIndex||W.segmentIndex!==S.segmentIndex)&&J(W,m)),D=!w.segments.some(W=>(W.edgeIndex!==m.edgeIndex||W.segmentIndex!==m.segmentIndex)&&J(W,S));return N&&D?(m.trackIndex=T.index,S.trackIndex=w.index,w.segments=[...w.segments.filter(W=>W.edgeIndex!==m.edgeIndex||W.segmentIndex!==m.segmentIndex),{edgeIndex:S.edgeIndex,segmentIndex:S.segmentIndex,from:S.from,to:S.to}],T.segments=[...T.segments.filter(W=>W.edgeIndex!==S.edgeIndex||W.segmentIndex!==S.segmentIndex),{edgeIndex:m.edgeIndex,segmentIndex:m.segmentIndex,from:m.from,to:m.to}],!0):!1},"trySwapSegmentsAcrossTracks"),ut=d(m=>{const S=m.tracks.length;return m.tracks[S]={index:S,coord:m.coord,segments:[]},S},"createNewTrack"),pt=d((m,S)=>{const w=m.pipe.tracks[m.trackIndex];w.segments=w.segments.filter(N=>N.edgeIndex!==m.edgeIndex||N.segmentIndex!==m.segmentIndex),m.trackIndex=S,m.pipe.tracks[S].segments.push({edgeIndex:m.edgeIndex,segmentIndex:m.segmentIndex,from:m.from,to:m.to})},"moveSegmentToTrack"),St=d((m,S)=>{const w=l[m.edgeIndex];for(const T of w){const N=h[T];N.pipe===m.pipe&&pt(N,S)}},"moveSegmentChainToTrack"),wt=d(m=>{const S=l[m.edgeIndex],w=S.indexOf(h.indexOf(m)),T=[];return w>0&&T.push(h[S[w-1]]),w<S.length-1&&T.push(h[S[w+1]]),T},"getAdjacentSegmentsAlongEdge"),Kt=d((m,S)=>{if(m.orientation===S.orientation)return!1;const w=m.orientation==="horizontal"?m:S,T=m.orientation==="horizontal"?S:m;return T.pipe.coord>w.from&&T.pipe.coord<w.to&&w.pipe.coord>T.from&&w.pipe.coord<T.to},"haveAnyCrossing"),qt=d((m,S)=>{for(const w of m.tracks)if(!w.segments.some(N=>(N.edgeIndex!==S.edgeIndex||N.segmentIndex!==S.segmentIndex)&&J(N,S)))return w.index;return-1},"findAvailableTrack"),Jt=d((m,S)=>{if(m.trackIndex===S.trackIndex)return J(m,S);const w=wt(m),T=wt(S);return w.some(N=>T.some(D=>Kt(N,D)))},"segmentsConflict"),se=d((m,S,w)=>{if(rt(m,S,m.pipe.tracks[m.trackIndex],S.pipe.tracks[S.trackIndex]))return;const T=qt(m.pipe,S);w(S,T!==-1?T:ut(m.pipe))},"resolveTrackConflict"),Ee=d(m=>{let S=0;for(let w=0;w<m.length;w++)for(let T=w+1;T<m.length;T++){const N=m[w],D=m[T];N.pipe===D.pipe&&Jt(N,D)&&(S++,se(N,D,St))}return S},"resolveHandleConflicts"),me=new Map,Te=d(m=>{if(me.has(m))return me.get(m);const S=l[m];if(S.length===0){const ot={dest:0,deviation:0,base:0,delta:0};return me.set(m,ot),ot}const T=h[S[0]].pipe.coord;let N=T;for(let ot=1;ot<S.length;ot++){const U=h[S[ot]];if(U.orientation==="horizontal"){const z=U.from,bt=U.to;N=Math.abs(z-T)>Math.abs(bt-T)?z:bt;break}}const D=Math.abs(N-T),W={dest:N,deviation:D,base:T,delta:N-T};return me.set(m,W),W},"getDestInfo"),mn=d(()=>{let m=0;const S=new Map;for(const[T,N]of s.entries())l[T].length!==0&&N.start&&(S.has(N.start)||S.set(N.start,[]),S.get(N.start).push(T));const w=d(T=>{const N=s[T];if(!N.start||!N.end)return 0;const D=r.get(N.start),W=r.get(N.end);if(!D||!W)return 0;const ot=(W.x??0)-(D.x??0),U=(W.y??0)-(D.y??0);return Math.abs(ot)+Math.abs(U)},"getEdgeDistance");for(const T of S.values()){T.sort((D,W)=>{const ot=Te(D),U=Te(W);if(Math.abs(ot.deviation-U.deviation)>1)return ot.deviation-U.deviation;if(Math.abs(ot.dest-U.dest)>1)return ot.dest-U.dest;const z=w(D),bt=w(W);if(Math.abs(z-bt)>1)return bt-z;const dt=l[D].length,ct=l[W].length;if(dt!==ct)return dt-ct;if(dt===1){const st=l[D][0],It=l[W][0];if(h[st]&&h[It]){const Bt=h[st],At=h[It],Gt=Math.abs(Bt.to-Bt.from),ee=Math.abs(At.to-At.from);if(Math.abs(Gt-ee)>1)return Gt-ee}}return 0});const N=T.map(D=>h[l[D][0]]);m+=Ee(N)}return m},"fixSourceHandleCrossings"),yn=d(()=>{let m=0;const S=new Map;for(const[w,T]of s.entries())l[w].length!==0&&T.end&&(S.has(T.end)||S.set(T.end,[]),S.get(T.end).push(w));for(const w of S.values()){w.sort((N,D)=>{const W=d(z=>{const bt=l[z];if(bt.length<2)return 0;const dt=h[bt[bt.length-2]];return Math.abs(dt.to-dt.from)},"getDist"),ot=W(N),U=W(D);return Math.abs(ot-U)>.1?ot-U:N-D});const T=w.map(N=>h[l[N][l[N].length-1]]);m+=Ee(T)}return m},"fixTargetHandleCrossings"),pn=d(()=>{let m=0;for(const S of a){const w=[];for(const T of S.tracks)for(const N of T.segments){const D=l[N.edgeIndex].find(W=>h[W].segmentIndex===N.segmentIndex);D!==void 0&&w.push(h[D])}w.sort((T,N)=>T.edgeIndex-N.edgeIndex||T.segmentIndex-N.segmentIndex);for(let T=0;T<w.length;T++)for(let N=T+1;N<w.length;N++){const D=w[T],W=w[N];Jt(D,W)&&(m++,se(D,W,pt))}}return m},"fixPipeCrossings");let R=0;const _=10;for(;R<_;){let m=0;if(m+=mn(),m+=yn(),m+=pn(),m===0)break;R++}const F=new Map;for(const m of a){const S=[];m.tracks.forEach(T=>{T.segments.forEach(N=>{S.push({edgeIndex:N.edgeIndex,segmentIndex:N.segmentIndex,trackIndex:T.index,from:N.from,to:N.to})})}),S.sort((T,N)=>T.from-N.from);const w=[];if(S.length>0){let T=[S[0]],N=S[0].to;for(let D=1;D<S.length;D++){const W=S[D];W.from<N?(T.push(W),N=Math.max(N,W.to)):(w.push(T),T=[W],N=W.to)}w.push(T)}for(const T of w){const N=new Set;T.forEach(st=>N.add(st.trackIndex));const D=new Map;T.forEach(st=>{const It=Te(st.edgeIndex);D.set(st.trackIndex,(D.get(st.trackIndex)??0)+It.delta)});const W=[...N].filter(st=>(D.get(st)??0)<-1),ot=[...N].filter(st=>(D.get(st)??0)>1),U=[...N].filter(st=>Math.abs(D.get(st)??0)<=1);W.sort((st,It)=>(D.get(It)??0)-(D.get(st)??0)),ot.sort((st,It)=>(D.get(st)??0)-(D.get(It)??0));const z=d((st,It)=>{T.filter(Bt=>Bt.trackIndex===st).forEach(Bt=>{const At=x.has(Bt.edgeIndex)?m.coord:It;F.set(`${Bt.edgeIndex}-${Bt.segmentIndex}`,At)})},"assignCoord");let bt=0;for(const st of W)bt++,z(st,m.coord-bt*Tn);if(U.length===0&&N.size>0){const st=[...N].sort((At,Gt)=>Math.abs(D.get(At)??0)-Math.abs(D.get(Gt)??0))[0],It=W.indexOf(st);It!==-1&&W.splice(It,1);const Bt=ot.indexOf(st);Bt!==-1&&ot.splice(Bt,1),U.push(st)}let dt=0;for(const st of U){if(dt===0)z(st,m.coord);else{const It=dt%2===1?1:-1,Bt=Math.ceil(dt/2);z(st,m.coord+It*Bt*Tn*.5)}dt++}let ct=0;for(const st of ot)ct++,z(st,m.coord+ct*Tn)}}for(const[m,S]of s.entries()){const w=l[m]??[];if(w.length===0)continue;const T=[],N=r.get(S.start),D=r.get(S.end),{pSrcPort:W,pDstPort:ot}=nt(m,N,D),U=w.map(dt=>{const ct=h[dt],st=F.get(`${ct.edgeIndex}-${ct.segmentIndex}`)??ct.pipe.coord;return{orient:ct.orientation,coord:st,from:ct.from,to:ct.to}});T.push(W);for(let dt=0;dt<U.length;dt++){const ct=U[dt],st=T[T.length-1],It=ct.orient==="vertical"?st.y:st.x,Bt=ct.orient==="vertical"?st.x:st.y,At=U[dt+1],Gt=dt<U.length-1;if(Math.abs(Bt-ct.coord)>lt&&T.push(ve(ct,It)),Gt&&At.orient===ct.orient)if(Math.abs(ct.coord-At.coord)>lt){const ee=ct.orient==="vertical"?(It+At.from)/2:io(ct,At);T.push(ve(ct,ee),ve(At,ee))}else(dt===0||dt===U.length-2)&&T.push(ve(ct,io(ct,At)));else if(Gt)T.push(ve(ct,At.coord));else{const ee=Math.abs(ct.from-It)<Math.abs(ct.to-It)?ct.to:ct.from;T.push(ve(ct,ee))}}const z=T[T.length-1];(Math.abs(z.x-ot.x)>lt||Math.abs(z.y-ot.y)>lt)&&T.push(ot);const bt=[];T.length>0&&bt.push(T[0]);for(let dt=1;dt<T.length;dt++){const ct=T[dt],st=bt[bt.length-1];(Math.abs(ct.x-st.x)>lt||Math.abs(ct.y-st.y)>lt)&&bt.push(ct)}S.points=bt}for(const m of s){const S=m.__originalEdge;S&&m.points&&(S.points=m.points)}t.edges=(t.edges??[]).filter(m=>!m.isLayoutOnly);const V=d((m,S)=>{const w=S.x??0,T=S.y??0,N=S.width??0,D=S.height??0;if(N<=0||D<=0)return m;const W=w-N/2,ot=w+N/2,U=T-D/2,z=T+D/2;if(m.x<W||m.x>ot||m.y<U||m.y>z)return m;const bt=m.x-W,dt=ot-m.x,ct=m.y-U,st=z-m.y,It=Math.min(bt,dt,ct,st);return It===bt?{x:W,y:m.y}:It===dt?{x:ot,y:m.y}:It===ct?{x:m.x,y:U}:{x:m.x,y:z}},"nodeBoundaryClamp");for(const m of t.edges){const S=m.points;if(!S||S.length<2)continue;const w=m.start,T=m.end,N=w?r.get(w):void 0,D=T?r.get(T):void 0;N&&(S[0]=V(S[0],N)),D&&(S[S.length-1]=V(S[S.length-1],D))}return t}d(pr,"routeEdgesOrthogonal");function xr(t){return t.direction??"TB"}d(xr,"getSwimlaneDirection");function br(t){var g,p,M,u,h;const e=es(t),n=((g=t.config.flowchart)==null?void 0:g.nodeSpacing)??40,o=((p=t.config.flowchart)==null?void 0:p.rankSpacing)??100,s=((M=t.config.swimlane)==null?void 0:M.ignoreCrossLaneEdges)??!0,r=((u=t.config.swimlane)==null?void 0:u.optimizeRanksByCrossings)??!0,i=((h=t.config.swimlane)==null?void 0:h.automaticLaneOrdering)??!1,a=xr(t),{ordered:c,coordinates:f}=yr(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:a});ns(e,c,f,{nodeGap:n,layerGap:o});for(const l of t.edges??[])delete l.points;pr(t,a);for(const l of t.edges??[])(!l.curve||l.curve==="basis")&&(l.curve="rounded");return Bs(t,a),Ps(t),a}d(br,"runSwimlaneLayoutCore");async function oi(t,e){const n=e.select("g");Or(n,t.markers,t.type,t.diagramId),Pr(),Br(),kr(),Nr(),ts(t);const o=os(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await Xo(n,t);br(t),await Jo(t,s)}d(oi,"render");export{oi as render};
|