showai-reader 0.10.0-reader.7ttebdmo → 0.10.0-reader.bewbunls

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/chunks/CardGrid-XIOKVIEI.js +2 -0
  3. package/chunks/CommandReference-7FQV6W44.js +3 -0
  4. package/chunks/{ExternalDiagram-B6TDNZM4.js → ExternalDiagram-HKK3NBZH.js} +1 -1
  5. package/chunks/{Flowchart-FDIMKFEA.js → Flowchart-VG42T332.js} +1 -1
  6. package/chunks/LayerDiagram-FHPQBNNP.js +2 -0
  7. package/chunks/{Mindmap-6NWSYUKU.js → Mindmap-E5X5CQBX.js} +1 -1
  8. package/chunks/{RichTextEditor-AC7S457D.js → RichTextEditor-BA5YF46E.js} +44 -44
  9. package/chunks/{SequenceDiagram-WA7DFSY3.js → SequenceDiagram-AG2F4GAU.js} +1 -1
  10. package/chunks/StepGuide-GUW3ELME.js +1 -0
  11. package/chunks/StructureBrowser-VZYKCSL6.js +3 -0
  12. package/chunks/chunk-5CTTY5BQ.js +2 -0
  13. package/chunks/chunk-5X5EO4YB.js +9 -0
  14. package/chunks/{chunk-NWWWOZDQ.js → chunk-BZT4BVM4.js} +1 -1
  15. package/chunks/chunk-GLP5VV7P.js +1 -0
  16. package/chunks/{chunk-NLCSXEUT.js → chunk-KQR52I3G.js} +8 -8
  17. package/chunks/chunk-L2ZHJIET.js +4 -0
  18. package/chunks/chunk-M5RCHTSV.js +1 -0
  19. package/chunks/{chunk-7ZRIRZ4A.js → chunk-RLCYUTAH.js} +1 -1
  20. package/chunks/chunk-UNH6G7NO.js +1 -0
  21. package/chunks/chunk-VSZNYGH7.js +1 -0
  22. package/index.js +1 -1
  23. package/manifest.json +5 -5
  24. package/package.json +1 -1
  25. package/{reader-7TTEBDMO.js → reader-BEWBUNLS.js} +33 -34
  26. package/chunks/CardGrid-6WXY2OUD.js +0 -2
  27. package/chunks/CommandReference-CKBSDW6N.js +0 -3
  28. package/chunks/LayerDiagram-HTH3JN4D.js +0 -2
  29. package/chunks/StepGuide-UE7JVBQD.js +0 -1
  30. package/chunks/StructureBrowser-DG3TSDJF.js +0 -3
  31. package/chunks/chunk-ECJLHLTK.js +0 -8
  32. package/chunks/chunk-GABDVURY.js +0 -1
  33. package/chunks/chunk-KYWOOES7.js +0 -2
  34. package/chunks/chunk-WLKJ25NO.js +0 -1
  35. package/chunks/chunk-YOGTJ6FI.js +0 -4
  36. /package/chunks/{chunk-KYWOOES7.js.LEGAL.txt → chunk-5CTTY5BQ.js.LEGAL.txt} +0 -0
  37. /package/{reader-7TTEBDMO.js.LEGAL.txt → reader-BEWBUNLS.js.LEGAL.txt} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as G,d as U}from"./chunk-AIBH6MTQ.js";import{f as ts}from"./chunk-WLKJ25NO.js";import{b as Z,d as ss}from"./chunk-7K7GQKOA.js";import{Ab as J,a as Q,c as ls,mb as Y}from"./chunk-WRXJZR6G.js";import{a as V}from"./chunk-J6IRWTF7.js";import{c as B}from"./chunk-DCANE7XH.js";var h=B(ls(),1);Q(`.sb-block.sq-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.sq-block li:not(svg){padding:0}.sb-block.sq-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.sq-block{--sq-text: var(--sb-text);--sq-muted: var(--sb-muted);--sq-faint: color-mix(in srgb, var(--sb-muted) 70%, transparent);--sq-line: var(--sb-line);--sq-paper: var(--sb-surface);--sq-soft: var(--sb-soft);--sq-accent: var(--sb-accent);--sq-accent-soft: var(--sb-accent-soft);--sq-wire: color-mix(in srgb, var(--sb-muted) 85%, var(--sb-text));--sq-teal: #0d8579;--sq-teal-soft: #e6f4f2;--sq-orange: #bf6528;--sq-orange-soft: #fbefe6;--sq-violet: #7348d0;--sq-violet-soft: #f2edfc;--sq-rose: #c4415a;--sq-rose-soft: #fbebee;--sq-slate: #526476;--sq-slate-soft: #edf1f4;--t: var(--sq-accent);--ts: var(--sq-accent-soft);color:var(--sq-text);font-family:inherit;font-size:14px;line-height:1.65;padding:8px 0;overflow-wrap:anywhere}:root[data-theme=dark] .sb-block.sq-block,[data-theme=dark] .sb-block.sq-block{--sq-teal: #4fc4b6;--sq-teal-soft: #163734;--sq-orange: #e79c64;--sq-orange-soft: #3b2b1e;--sq-violet: #b497ff;--sq-violet-soft: #2e2648;--sq-rose: #f0839a;--sq-rose-soft: #3e222a;--sq-slate: #a2b2c2;--sq-slate-soft: #242d35}.sb-block.sq-block *{box-sizing:border-box}.sb-block.sq-block [data-tone=accent]{--t: var(--sq-accent);--ts: var(--sq-accent-soft)}.sb-block.sq-block [data-tone=teal]{--t: var(--sq-teal);--ts: var(--sq-teal-soft)}.sb-block.sq-block [data-tone=orange]{--t: var(--sq-orange);--ts: var(--sq-orange-soft)}.sb-block.sq-block [data-tone=violet]{--t: var(--sq-violet);--ts: var(--sq-violet-soft)}.sb-block.sq-block [data-tone=rose]{--t: var(--sq-rose);--ts: var(--sq-rose-soft)}.sb-block.sq-block [data-tone=slate]{--t: var(--sq-slate);--ts: var(--sq-slate-soft)}.sb-block.sq-block .sq-top{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 12px}.sb-block.sq-block .sq-title{margin:0;font-size:16px;line-height:1.5;font-weight:650}.sb-block.sq-block .sq-description{margin:2px 0 0;color:var(--sq-muted);font-size:13px}.sb-block.sq-block .sq-hint{flex:none;font-size:12px;color:var(--sq-faint);white-space:nowrap}.sb-block.sq-block code{font-family:var(--mono, ui-monospace, Menlo, Consolas, monospace);font-size:.88em;background:var(--sq-soft);border-radius:4px;padding:1px 5px}.sb-block.sq-block .sq-svg{display:block;max-width:100%;height:auto;overflow:visible;border-radius:6px;user-select:none;-webkit-user-select:none}.sb-block.sq-block .sq-svg:focus{outline:none}.sb-block.sq-block .sq-svg:focus-visible{outline:2px solid var(--sq-accent);outline-offset:2px}.sb-block.sq-block .sq-svg text{font-family:inherit}.sb-block.sq-block .sq-life{stroke:var(--sq-line);stroke-width:1.2;stroke-dasharray:3 4}.sb-block.sq-block .sq-life[data-on]{stroke:var(--t);stroke-opacity:.45;stroke-dasharray:none}.sb-block.sq-block .sq-actor rect{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-actor[data-on] rect{fill:var(--ts);stroke:var(--t);stroke-width:1.4}.sb-block.sq-block .sq-alabel{fill:var(--sq-text);font-size:14px;font-weight:600}.sb-block.sq-block .sq-asub{fill:var(--sq-muted);font-size:12px}.sb-block.sq-block .sq-icon{font-size:15px}.sb-block.sq-block .sq-band{fill:var(--sq-accent-soft);opacity:.6}.sb-block.sq-block .sq-step{cursor:pointer;transition:opacity .2s ease}.sb-block.sq-block .sq-hit{fill:transparent}.sb-block.sq-block .sq-line{fill:none;stroke:var(--sq-wire);stroke-width:1.4;stroke-linejoin:round}.sb-block.sq-block .sq-line[data-reply]{stroke-dasharray:5 4}.sb-block.sq-block .sq-head{fill:var(--sq-wire)}.sb-block.sq-block .sq-open{fill:none;stroke:var(--sq-wire);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.sb-block.sq-block .sq-label{fill:var(--sq-text);font-size:13px;font-weight:500}.sb-block.sq-block .sq-note{fill:var(--sq-orange-soft);stroke:var(--sq-orange);stroke-opacity:.35}.sb-block.sq-block .sq-num circle{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-num text{fill:var(--sq-muted);font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums}.sb-block.sq-block .sq-step[data-state=todo]{opacity:.3}.sb-block.sq-block .sq-step[data-state=todo]:hover{opacity:.55}.sb-block.sq-block .sq-step[data-state=cur] .sq-line{stroke:var(--sq-accent);stroke-width:2}.sb-block.sq-block .sq-step[data-state=cur] .sq-head{fill:var(--sq-accent)}.sb-block.sq-block .sq-step[data-state=cur] .sq-open{stroke:var(--sq-accent);stroke-width:2}.sb-block.sq-block .sq-step[data-state=cur] .sq-label{font-weight:650}.sb-block.sq-block .sq-step[data-state=cur] .sq-num circle{fill:var(--sq-accent);stroke:var(--sq-accent)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num text{fill:var(--sq-paper)}.sb-block.sq-block .sq-step[data-state=cur] .sq-note{stroke-opacity:.8}.sb-block.sq-block .sq-actor rect,.sb-block.sq-block .sq-life{transition:fill .2s ease,stroke .2s ease}.sb-block.sq-block .sq-panel{margin-top:14px;border:1px solid var(--sq-line);border-radius:10px;background:var(--sq-soft);overflow:hidden}.sb-block.sq-block .sq-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:10px 12px}.sb-block.sq-block .sq-buttons{display:flex;flex-wrap:wrap;gap:6px}.sb-block.sq-block .sq-buttons button{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:13px;line-height:1;color:var(--sq-text);background:var(--sq-paper);border:1px solid var(--sq-line);border-radius:6px;padding:7px 11px 7px 9px;cursor:pointer;transition:border-color .15s ease}.sb-block.sq-block .sq-buttons button:hover:not(:disabled){border-color:var(--sq-muted)}.sb-block.sq-block .sq-buttons button:disabled{color:var(--sq-faint);cursor:default}.sb-block.sq-block .sq-buttons svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.sb-block.sq-block .sq-buttons svg .sq-fill{fill:currentColor;stroke:none}.sb-block.sq-block .sq-buttons .sq-play{background:var(--sq-accent);border-color:var(--sq-accent);color:var(--sq-paper)}.sb-block.sq-block .sq-buttons .sq-play:disabled{opacity:.5;color:var(--sq-paper)}.sb-block.sq-block .sq-buttons button:focus-visible,.sb-block.sq-block .sq-list button:focus-visible,.sb-block.sq-block a:focus-visible{outline:2px solid var(--sq-accent);outline-offset:2px}.sb-block.sq-block .sq-count{font-size:12px;color:var(--sq-muted);font-variant-numeric:tabular-nums;white-space:nowrap}.sb-block.sq-block .sq-progress{height:2px;background:var(--sq-line)}.sb-block.sq-block .sq-progress i{display:block;height:100%;background:var(--sq-accent);transition:width .25s ease}.sb-block.sq-block .sq-detail{padding:14px 18px 16px;background:var(--sq-paper)}.sb-block.sq-block .sq-meta,.sb-block.sq-block .sq-route{display:flex;align-items:center;flex-wrap:wrap;gap:5px 6px;font-size:12px;color:var(--sq-muted)}.sb-block.sq-block .sq-meta em,.sb-block.sq-block .sq-route em{font-style:normal;font-size:12px;color:var(--sq-faint);margin-left:2px}.sb-block.sq-block .sq-detail h4{margin:8px 0 4px;font-size:15px;line-height:1.5;font-weight:650}.sb-block.sq-block .sq-md p{margin:0 0 6px;font-size:14px;line-height:1.7}.sb-block.sq-block .sq-md p:last-child{margin-bottom:0}.sb-block.sq-block .sq-md strong{font-weight:650}.sb-block.sq-block .sq-md a{color:var(--sq-accent);text-underline-offset:3px}.sb-block.sq-block .sq-lnum{flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--sq-accent);color:var(--sq-paper);font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums}.sb-block.sq-block .sq-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;line-height:1;padding:4px 8px;border-radius:6px;background:var(--ts);color:var(--t);font-weight:600;white-space:nowrap}.sb-block.sq-block .sq-arrow{color:var(--sq-faint);font-size:13px}.sb-block.sq-block .sq-cast{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.sb-block.sq-block .sq-panel-bar{margin:0 0 10px}.sb-block.sq-block .sq-panel-bar .sq-buttons button{padding:7px 9px}.sb-block.sq-block .sq-list{list-style:none;margin:0;padding:0;position:relative}.sb-block.sq-block .sq-list:before{content:"";position:absolute;left:21px;top:16px;bottom:16px;width:1px;background:var(--sq-line)}.sb-block.sq-block .sq-list li{position:relative;border-radius:10px;transition:opacity .2s ease}.sb-block.sq-block .sq-list li[data-state=todo]{opacity:.5}.sb-block.sq-block .sq-list li[data-state=cur]{background:var(--sq-soft);box-shadow:inset 0 0 0 1px var(--sq-line)}.sb-block.sq-block .sq-list button{display:flex;align-items:flex-start;gap:12px;width:100%;font:inherit;text-align:left;color:inherit;background:none;border:0;padding:10px;cursor:pointer;border-radius:10px}.sb-block.sq-block .sq-list .sq-lnum{position:relative;margin-top:1px;background:var(--sq-paper);color:var(--sq-muted);box-shadow:inset 0 0 0 1px var(--sq-line)}.sb-block.sq-block .sq-list li[data-state=cur] .sq-lnum{background:var(--sq-accent);color:var(--sq-paper);box-shadow:none}.sb-block.sq-block .sq-lbody{flex:1;min-width:0;display:grid;gap:5px}.sb-block.sq-block .sq-ltitle{font-size:14px;line-height:1.5;font-weight:500}.sb-block.sq-block .sq-list li[data-state=cur] .sq-ltitle{font-weight:650}.sb-block.sq-block .sq-ldetail{padding:0 14px 12px 44px}.sb-block.sq-block .sq-static{display:none}@media(prefers-reduced-motion:reduce){.sb-block.sq-block .sq-step,.sb-block.sq-block .sq-actor rect,.sb-block.sq-block .sq-life,.sb-block.sq-block .sq-progress i,.sb-block.sq-block .sq-list li,.sb-block.sq-block .sq-buttons button{transition:none}}@media print{.sb-block.sq-block .sq-hint,.sb-block.sq-block .sq-panel,.sb-block.sq-block .sq-list,.sb-block.sq-block .sq-cast{display:none}.sb-block.sq-block .sq-step[data-state]{opacity:1}.sb-block.sq-block .sq-band{display:none}.sb-block.sq-block .sq-actor[data-on] rect{fill:var(--sq-paper);stroke:var(--sq-line);stroke-width:1}.sb-block.sq-block .sq-life[data-on]{stroke:var(--sq-line);stroke-opacity:1;stroke-dasharray:3 4}.sb-block.sq-block .sq-step[data-state=cur] .sq-line,.sb-block.sq-block .sq-step[data-state=cur] .sq-open{stroke:var(--sq-wire);stroke-width:1.4}.sb-block.sq-block .sq-step[data-state=cur] .sq-head{fill:var(--sq-wire)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num circle{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num text{fill:var(--sq-muted)}.sb-block.sq-block .sq-static{display:block;margin-top:12px}.sb-block.sq-block .sq-static-title{margin:0 0 6px;font-weight:650}.sb-block.sq-block .sq-static ol{margin:0;padding-left:22px}.sb-block.sq-block .sq-static li{break-inside:avoid;margin-bottom:8px}.sb-block.sq-block .sq-static b{display:block;font-weight:600}}
1
+ import{a as ts}from"./chunk-M5RCHTSV.js";import{a as G,d as U}from"./chunk-AIBH6MTQ.js";import"./chunk-UNH6G7NO.js";import{b as Z,d as ss}from"./chunk-7K7GQKOA.js";import{Ab as J,a as Q,c as ls,mb as Y}from"./chunk-WRXJZR6G.js";import{a as V}from"./chunk-J6IRWTF7.js";import{c as B}from"./chunk-DCANE7XH.js";var h=B(ls(),1);Q(`.sb-block.sq-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.sq-block li:not(svg){padding:0}.sb-block.sq-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.sq-block{--sq-text: var(--sb-text);--sq-muted: var(--sb-muted);--sq-faint: color-mix(in srgb, var(--sb-muted) 70%, transparent);--sq-line: var(--sb-line);--sq-paper: var(--sb-surface);--sq-soft: var(--sb-soft);--sq-accent: var(--sb-accent);--sq-accent-soft: var(--sb-accent-soft);--sq-wire: color-mix(in srgb, var(--sb-muted) 85%, var(--sb-text));--sq-teal: #0d8579;--sq-teal-soft: #e6f4f2;--sq-orange: #bf6528;--sq-orange-soft: #fbefe6;--sq-violet: #7348d0;--sq-violet-soft: #f2edfc;--sq-rose: #c4415a;--sq-rose-soft: #fbebee;--sq-slate: #526476;--sq-slate-soft: #edf1f4;--t: var(--sq-accent);--ts: var(--sq-accent-soft);color:var(--sq-text);font-family:inherit;font-size:14px;line-height:1.65;padding:8px 0;overflow-wrap:anywhere}:root[data-theme=dark] .sb-block.sq-block,[data-theme=dark] .sb-block.sq-block{--sq-teal: #4fc4b6;--sq-teal-soft: #163734;--sq-orange: #e79c64;--sq-orange-soft: #3b2b1e;--sq-violet: #b497ff;--sq-violet-soft: #2e2648;--sq-rose: #f0839a;--sq-rose-soft: #3e222a;--sq-slate: #a2b2c2;--sq-slate-soft: #242d35}.sb-block.sq-block *{box-sizing:border-box}.sb-block.sq-block [data-tone=accent]{--t: var(--sq-accent);--ts: var(--sq-accent-soft)}.sb-block.sq-block [data-tone=teal]{--t: var(--sq-teal);--ts: var(--sq-teal-soft)}.sb-block.sq-block [data-tone=orange]{--t: var(--sq-orange);--ts: var(--sq-orange-soft)}.sb-block.sq-block [data-tone=violet]{--t: var(--sq-violet);--ts: var(--sq-violet-soft)}.sb-block.sq-block [data-tone=rose]{--t: var(--sq-rose);--ts: var(--sq-rose-soft)}.sb-block.sq-block [data-tone=slate]{--t: var(--sq-slate);--ts: var(--sq-slate-soft)}.sb-block.sq-block .sq-top{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 12px}.sb-block.sq-block .sq-title{margin:0;font-size:16px;line-height:1.5;font-weight:650}.sb-block.sq-block .sq-description{margin:2px 0 0;color:var(--sq-muted);font-size:13px}.sb-block.sq-block .sq-hint{flex:none;font-size:12px;color:var(--sq-faint);white-space:nowrap}.sb-block.sq-block code{font-family:var(--mono, ui-monospace, Menlo, Consolas, monospace);font-size:.88em;background:var(--sq-soft);border-radius:4px;padding:1px 5px}.sb-block.sq-block .sq-svg{display:block;max-width:100%;height:auto;overflow:visible;border-radius:6px;user-select:none;-webkit-user-select:none}.sb-block.sq-block .sq-svg:focus{outline:none}.sb-block.sq-block .sq-svg:focus-visible{outline:2px solid var(--sq-accent);outline-offset:2px}.sb-block.sq-block .sq-svg text{font-family:inherit}.sb-block.sq-block .sq-life{stroke:var(--sq-line);stroke-width:1.2;stroke-dasharray:3 4}.sb-block.sq-block .sq-life[data-on]{stroke:var(--t);stroke-opacity:.45;stroke-dasharray:none}.sb-block.sq-block .sq-actor rect{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-actor[data-on] rect{fill:var(--ts);stroke:var(--t);stroke-width:1.4}.sb-block.sq-block .sq-alabel{fill:var(--sq-text);font-size:14px;font-weight:600}.sb-block.sq-block .sq-asub{fill:var(--sq-muted);font-size:12px}.sb-block.sq-block .sq-icon{font-size:15px}.sb-block.sq-block .sq-band{fill:var(--sq-accent-soft);opacity:.6}.sb-block.sq-block .sq-step{cursor:pointer;transition:opacity .2s ease}.sb-block.sq-block .sq-hit{fill:transparent}.sb-block.sq-block .sq-line{fill:none;stroke:var(--sq-wire);stroke-width:1.4;stroke-linejoin:round}.sb-block.sq-block .sq-line[data-reply]{stroke-dasharray:5 4}.sb-block.sq-block .sq-head{fill:var(--sq-wire)}.sb-block.sq-block .sq-open{fill:none;stroke:var(--sq-wire);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.sb-block.sq-block .sq-label{fill:var(--sq-text);font-size:13px;font-weight:500}.sb-block.sq-block .sq-note{fill:var(--sq-orange-soft);stroke:var(--sq-orange);stroke-opacity:.35}.sb-block.sq-block .sq-num circle{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-num text{fill:var(--sq-muted);font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums}.sb-block.sq-block .sq-step[data-state=todo]{opacity:.3}.sb-block.sq-block .sq-step[data-state=todo]:hover{opacity:.55}.sb-block.sq-block .sq-step[data-state=cur] .sq-line{stroke:var(--sq-accent);stroke-width:2}.sb-block.sq-block .sq-step[data-state=cur] .sq-head{fill:var(--sq-accent)}.sb-block.sq-block .sq-step[data-state=cur] .sq-open{stroke:var(--sq-accent);stroke-width:2}.sb-block.sq-block .sq-step[data-state=cur] .sq-label{font-weight:650}.sb-block.sq-block .sq-step[data-state=cur] .sq-num circle{fill:var(--sq-accent);stroke:var(--sq-accent)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num text{fill:var(--sq-paper)}.sb-block.sq-block .sq-step[data-state=cur] .sq-note{stroke-opacity:.8}.sb-block.sq-block .sq-actor rect,.sb-block.sq-block .sq-life{transition:fill .2s ease,stroke .2s ease}.sb-block.sq-block .sq-panel{margin-top:14px;border:1px solid var(--sq-line);border-radius:10px;background:var(--sq-soft);overflow:hidden}.sb-block.sq-block .sq-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;padding:10px 12px}.sb-block.sq-block .sq-buttons{display:flex;flex-wrap:wrap;gap:6px}.sb-block.sq-block .sq-buttons button{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:13px;line-height:1;color:var(--sq-text);background:var(--sq-paper);border:1px solid var(--sq-line);border-radius:6px;padding:7px 11px 7px 9px;cursor:pointer;transition:border-color .15s ease}.sb-block.sq-block .sq-buttons button:hover:not(:disabled){border-color:var(--sq-muted)}.sb-block.sq-block .sq-buttons button:disabled{color:var(--sq-faint);cursor:default}.sb-block.sq-block .sq-buttons svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.sb-block.sq-block .sq-buttons svg .sq-fill{fill:currentColor;stroke:none}.sb-block.sq-block .sq-buttons .sq-play{background:var(--sq-accent);border-color:var(--sq-accent);color:var(--sq-paper)}.sb-block.sq-block .sq-buttons .sq-play:disabled{opacity:.5;color:var(--sq-paper)}.sb-block.sq-block .sq-buttons button:focus-visible,.sb-block.sq-block .sq-list button:focus-visible,.sb-block.sq-block a:focus-visible{outline:2px solid var(--sq-accent);outline-offset:2px}.sb-block.sq-block .sq-count{font-size:12px;color:var(--sq-muted);font-variant-numeric:tabular-nums;white-space:nowrap}.sb-block.sq-block .sq-progress{height:2px;background:var(--sq-line)}.sb-block.sq-block .sq-progress i{display:block;height:100%;background:var(--sq-accent);transition:width .25s ease}.sb-block.sq-block .sq-detail{padding:14px 18px 16px;background:var(--sq-paper)}.sb-block.sq-block .sq-meta,.sb-block.sq-block .sq-route{display:flex;align-items:center;flex-wrap:wrap;gap:5px 6px;font-size:12px;color:var(--sq-muted)}.sb-block.sq-block .sq-meta em,.sb-block.sq-block .sq-route em{font-style:normal;font-size:12px;color:var(--sq-faint);margin-left:2px}.sb-block.sq-block .sq-detail h4{margin:8px 0 4px;font-size:15px;line-height:1.5;font-weight:650}.sb-block.sq-block .sq-md p{margin:0 0 6px;font-size:14px;line-height:1.7}.sb-block.sq-block .sq-md p:last-child{margin-bottom:0}.sb-block.sq-block .sq-md strong{font-weight:650}.sb-block.sq-block .sq-md a{color:var(--sq-accent);text-underline-offset:3px}.sb-block.sq-block .sq-lnum{flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--sq-accent);color:var(--sq-paper);font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums}.sb-block.sq-block .sq-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;line-height:1;padding:4px 8px;border-radius:6px;background:var(--ts);color:var(--t);font-weight:600;white-space:nowrap}.sb-block.sq-block .sq-arrow{color:var(--sq-faint);font-size:13px}.sb-block.sq-block .sq-cast{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.sb-block.sq-block .sq-panel-bar{margin:0 0 10px}.sb-block.sq-block .sq-panel-bar .sq-buttons button{padding:7px 9px}.sb-block.sq-block .sq-list{list-style:none;margin:0;padding:0;position:relative}.sb-block.sq-block .sq-list:before{content:"";position:absolute;left:21px;top:16px;bottom:16px;width:1px;background:var(--sq-line)}.sb-block.sq-block .sq-list li{position:relative;border-radius:10px;transition:opacity .2s ease}.sb-block.sq-block .sq-list li[data-state=todo]{opacity:.5}.sb-block.sq-block .sq-list li[data-state=cur]{background:var(--sq-soft);box-shadow:inset 0 0 0 1px var(--sq-line)}.sb-block.sq-block .sq-list button{display:flex;align-items:flex-start;gap:12px;width:100%;font:inherit;text-align:left;color:inherit;background:none;border:0;padding:10px;cursor:pointer;border-radius:10px}.sb-block.sq-block .sq-list .sq-lnum{position:relative;margin-top:1px;background:var(--sq-paper);color:var(--sq-muted);box-shadow:inset 0 0 0 1px var(--sq-line)}.sb-block.sq-block .sq-list li[data-state=cur] .sq-lnum{background:var(--sq-accent);color:var(--sq-paper);box-shadow:none}.sb-block.sq-block .sq-lbody{flex:1;min-width:0;display:grid;gap:5px}.sb-block.sq-block .sq-ltitle{font-size:14px;line-height:1.5;font-weight:500}.sb-block.sq-block .sq-list li[data-state=cur] .sq-ltitle{font-weight:650}.sb-block.sq-block .sq-ldetail{padding:0 14px 12px 44px}.sb-block.sq-block .sq-static{display:none}@media(prefers-reduced-motion:reduce){.sb-block.sq-block .sq-step,.sb-block.sq-block .sq-actor rect,.sb-block.sq-block .sq-life,.sb-block.sq-block .sq-progress i,.sb-block.sq-block .sq-list li,.sb-block.sq-block .sq-buttons button{transition:none}}@media print{.sb-block.sq-block .sq-hint,.sb-block.sq-block .sq-panel,.sb-block.sq-block .sq-list,.sb-block.sq-block .sq-cast{display:none}.sb-block.sq-block .sq-step[data-state]{opacity:1}.sb-block.sq-block .sq-band{display:none}.sb-block.sq-block .sq-actor[data-on] rect{fill:var(--sq-paper);stroke:var(--sq-line);stroke-width:1}.sb-block.sq-block .sq-life[data-on]{stroke:var(--sq-line);stroke-opacity:1;stroke-dasharray:3 4}.sb-block.sq-block .sq-step[data-state=cur] .sq-line,.sb-block.sq-block .sq-step[data-state=cur] .sq-open{stroke:var(--sq-wire);stroke-width:1.4}.sb-block.sq-block .sq-step[data-state=cur] .sq-head{fill:var(--sq-wire)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num circle{fill:var(--sq-paper);stroke:var(--sq-line)}.sb-block.sq-block .sq-step[data-state=cur] .sq-num text{fill:var(--sq-muted)}.sb-block.sq-block .sq-static{display:block;margin-top:12px}.sb-block.sq-block .sq-static-title{margin:0 0 6px;font-weight:650}.sb-block.sq-block .sq-static ol{margin:0;padding-left:22px}.sb-block.sq-block .sq-static li{break-inside:avoid;margin-bottom:8px}.sb-block.sq-block .sq-static b{display:block;font-weight:600}}
2
2
  `);var es=V("sequenceDiagram",{"zh-CN":{title:"\u65F6\u5E8F\u56FE",diagram:"\u65F6\u5E8F\u56FE\uFF0C\u5171 {count} \u6B65\u3002\u65B9\u5411\u952E\u5207\u6362\u6B65\u9AA4\uFF0CHome / End \u8DF3\u5230\u9996\u5C3E\u3002",controls:"\u6B65\u9AA4\u63A7\u5236",prev:"\u4E0A\u4E00\u6B65",next:"\u4E0B\u4E00\u6B65",play:"\u64AD\u653E",pause:"\u6682\u505C",restart:"\u91CD\u6765",count:"\u7B2C {current} / {total} \u6B65",hint:"\u70B9\u51FB\u7BAD\u5934\u8DF3\u5230\u8BE5\u6B65 \xB7 \u65B9\u5411\u952E\u5207\u6362",reply:"\u8FD4\u56DE",note:"\u5907\u6CE8",stepTitle:"{number}. {from} \u2192 {to}\uFF1A{label}",allSteps:"\u5168\u90E8\u6B65\u9AA4",actors:"\u53C2\u4E0E\u8005"},en:{title:"Sequence diagram",diagram:"Sequence diagram with {count} steps. Arrow keys change the step; Home and End jump to the ends.",controls:"Step controls",prev:"Previous",next:"Next",play:"Play",pause:"Pause",restart:"Restart",count:"Step {current} of {total}",hint:"Click an arrow to jump \xB7 arrow keys to step",reply:"reply",note:"note",stepTitle:"{number}. {from} \u2192 {to}: {label}",allSteps:"All steps",actors:"Participants"}});var s=B(Y(),1),ns=1600,rs=46,cs=56,os="system-ui, -apple-system, sans-serif";function F({source:e}){return(0,s.jsx)(s.Fragment,{children:U(e).map((o,l)=>(0,s.jsx)("p",{children:(0,s.jsx)(ts,{source:o})},l))})}var j;function is(e){return j===void 0&&(j=typeof document>"u"?null:document.createElement("canvas").getContext("2d")),(o,l,b=400)=>{if(j)return j.font=`${b} ${l}px ${e}`,j.measureText(o).width;let n=0;for(let m of o)n+=/[\u2e80-\uffff]/.test(m)?l:l*.58;return n}}function K(e,o,l,b,n=400){if(e(o,b,n)<=l)return o;let m=Array.from(o),N=0,S=m.length;for(;N<S;){let H=N+S+1>>1;e(`${m.slice(0,H).join("")}\u2026`,b,n)<=l?N=H:S=H-1}return`${m.slice(0,N).join("").trimEnd()}\u2026`}function bs(e){let o=(Array.isArray(e.actors)?e.actors:[]).map(n=>({...n,tone:G.includes(n.tone)?n.tone:"accent"})),l=new Map(o.map((n,m)=>[n.id,m])),b=[];for(let n of Array.isArray(e.steps)?e.steps:[]){let m=l.get(n.from),N=l.get(n.to);m===void 0||N===void 0||b.push({...n,a:m,b:N,kind:n.kind==="reply"||n.kind==="note"?n.kind:"call"})}return{actors:o,steps:b}}var ps={prev:(0,s.jsx)("path",{d:"M10 3.5 5.5 8l4.5 4.5"}),next:(0,s.jsx)("path",{d:"M6 3.5 10.5 8 6 12.5"}),play:(0,s.jsx)("path",{className:"sq-fill",d:"M5 3.2v9.6L12.6 8z"}),pause:(0,s.jsx)("path",{className:"sq-fill",d:"M4.5 3.5h2.4v9H4.5zM9.1 3.5h2.4v9H9.1z"}),restart:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M3.5 8a4.5 4.5 0 1 0 1.4-3.3"}),(0,s.jsx)("path",{d:"M4.6 2.2v2.7h2.7"})]})},I=({name:e})=>(0,s.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:ps[e]});function X({actor:e}){return(0,s.jsxs)("span",{className:"sq-chip","data-tone":e.tone,children:[e.icon&&(0,s.jsx)("span",{"aria-hidden":"true",children:e.icon}),e.label]})}function _({step:e,actors:o,t:l}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(X,{actor:o[e.a]}),e.a!==e.b&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"sq-arrow","aria-hidden":"true",children:e.kind==="note"?"\xB7":"\u2192"}),(0,s.jsx)(X,{actor:o[e.b]})]}),e.kind!=="call"&&(0,s.jsx)("em",{children:l(e.kind)})]})}function as(e,o,l){return e.key==="Home"?0:e.key==="End"?l-1:e.key==="ArrowRight"||e.key==="ArrowDown"?Math.min(l-1,o+1):e.key==="ArrowLeft"||e.key==="ArrowUp"?Math.max(0,o-1):null}function qs({actors:e,steps:o,width:l,current:b,measure:n,go:m,label:N,stepTitle:S}){let T=(l-8)/e.length,L=t=>4+T*(t+.5),W=e.some(t=>t.sub)?58:42,D=Math.min(T-12,176),v=[],P=W+16;for(let t of o){let c=t.kind!=="note"&&t.a===t.b?cs:rs;v.push({top:P,h:c,y:P+30}),P+=c}let f=P+14,p=o[b],O=new Set(p?[p.a,p.b]:[]),z=(t,c,q)=>(0,s.jsxs)("g",{className:"sq-num",children:[(0,s.jsx)("circle",{cx:t,cy:c,r:10}),(0,s.jsx)("text",{x:t,y:c+4,textAnchor:"middle",children:q+1})]});return(0,s.jsxs)("svg",{className:"sq-svg",width:l,height:f,viewBox:`0 0 ${l} ${f}`,tabIndex:0,role:"group","aria-label":N,onKeyDown:t=>{let c=as(t,b,o.length);c!==null&&(t.preventDefault(),m(c))},children:[e.map((t,c)=>(0,s.jsx)("line",{className:"sq-life","data-tone":t.tone,"data-on":O.has(c)?"":void 0,x1:L(c),x2:L(c),y1:W,y2:f-4},t.id)),p&&(0,s.jsx)("rect",{className:"sq-band",x:2,y:v[b].top+3,width:l-4,height:v[b].h-6,rx:8}),e.map((t,c)=>{let q=L(c),M=t.icon?26:0,r=K(n,t.label,D-20-M,14,600),w=q-(n(r,14,600)+M)/2,y=t.sub?K(n,t.sub,D-16,12):"",g=t.sub?24:W/2+5;return(0,s.jsxs)("g",{className:"sq-actor","data-tone":t.tone,"data-on":O.has(c)?"":void 0,children:[(0,s.jsx)("rect",{x:q-D/2,y:1,width:D,height:W-2,rx:10}),t.icon&&(0,s.jsx)("text",{className:"sq-icon",x:w+9,y:g,textAnchor:"middle",children:t.icon}),(0,s.jsx)("text",{className:"sq-alabel",x:w+M,y:g,children:r}),y&&(0,s.jsx)("text",{className:"sq-asub",x:q,y:g+19,textAnchor:"middle",children:y}),(0,s.jsx)("title",{children:t.sub?`${t.label} \xB7 ${t.sub}`:t.label})]},t.id)}),o.map((t,c)=>{let q=v[c],M=c<b?"done":c===b?"cur":"todo",r=L(t.a),w=L(t.b),y=13,g=M==="cur"?600:500,a,i;if(t.kind==="note"){let k=Math.min(r,w),$=Math.max(r,w),x=n(t.label,y,g)+52,d,u;if(t.a===t.b){let E=Math.min(x,T-8);d=k-E/2,u=k+E/2}else if(d=k-T*.36,u=$+T*.36,u-d<x){let E=(k+$)/2;d=E-x/2,u=E+x/2}d=Math.max(4,d),u=Math.min(l-4,u);let C=K(n,t.label,u-d-52,y,g),R=27+n(C,y,g),A=(d+u)/2-R/2;a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{className:"sq-note",x:d,y:q.top+8,width:u-d,height:30,rx:6}),z(A+10,q.top+23,c),(0,s.jsx)("text",{className:"sq-label",x:A+27,y:q.top+27.5,children:C})]}),i={x:d,w:u-d}}else if(t.a===t.b){let k=r+74+n(t.label,y,g)<l-4||r<l/2,$=k?1:-1,x=q.top+16,d=q.top+40,u=r+$*30,C=K(n,t.label,k?l-4-(r+70):r-74,y,g),R=27+n(C,y,g),A=k?r+44:r-44-R;a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{className:"sq-line","data-reply":t.kind==="reply"?"":void 0,d:`M${r},${x}H${u-$*6}Q${u},${x} ${u},${x+6}V${d-6}Q${u},${d} ${u-$*6},${d}H${r+$*8}`}),(0,s.jsx)("path",{className:"sq-head",d:`M${r+$},${d}l${$*8},-4.5v9z`}),z(A+10,(x+d)/2,c),(0,s.jsx)("text",{className:"sq-label",x:A+27,y:(x+d)/2+4.5,children:C})]});let E=k?r-8:A-4;i={x:E,w:(k?A+R+8:r+8)-E}}else{let k=w>r?1:-1,$=r+k*2,x=w-k*2,d=K(n,t.label,Math.max(84,Math.abs(w-r)+T*.4-36),y,g),u=27+n(d,y,g),C=Math.max(4,Math.min(l-4-u,(r+w)/2-u/2)),R=t.kind==="reply";a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{className:"sq-line","data-reply":R?"":void 0,d:`M${$},${q.y}H${x-k*(R?1:7)}`}),R?(0,s.jsx)("path",{className:"sq-open",d:`M${x-k*8},${q.y-5}L${x},${q.y}L${x-k*8},${q.y+5}`}):(0,s.jsx)("path",{className:"sq-head",d:`M${x},${q.y}l${-k*8},-4.5v9z`}),z(C+10,q.y-15,c),(0,s.jsx)("text",{className:"sq-label",x:C+27,y:q.y-10.5,children:d})]});let A=Math.min(r,w,C)-6;i={x:A,w:Math.max(r,w,C+u)+6-A}}return(0,s.jsxs)("g",{className:"sq-step","data-state":M,"data-kind":t.kind,onClick:()=>m(c),children:[(0,s.jsx)("rect",{className:"sq-hit",x:i.x,y:q.top+2,width:i.w,height:q.h-4}),a,(0,s.jsx)("title",{children:S(t,c)})]},c)})]})}function ws({data:e}){let o=J(es),l=e,{actors:b,steps:n}=(0,h.useMemo)(()=>bs(l),[l]),m=(0,h.useRef)(null),N=(0,h.useRef)(null),[S,H]=(0,h.useState)(800),[T,L]=(0,h.useState)(os),[W,D]=(0,h.useState)(0),[v,P]=(0,h.useState)(!1),f=n.length,p=Math.min(W,Math.max(0,f-1));(0,h.useEffect)(()=>{let a=m.current;if(!a)return;L(getComputedStyle(a).fontFamily||os);let i=()=>H(Math.floor(a.clientWidth));if(i(),typeof ResizeObserver!="function")return;let k=new ResizeObserver(i);return k.observe(a),()=>k.disconnect()},[]),(0,h.useEffect)(()=>{if(!v)return;let a=setInterval(()=>D(i=>Math.min(i+1,f-1)),ns);return()=>clearInterval(a)},[v,f]),(0,h.useEffect)(()=>{v&&p>=f-1&&P(!1)},[p,v,f]);let O=(0,h.useMemo)(()=>is(T),[T]),z=a=>{P(!1),D(Math.max(0,Math.min(f-1,a)))},t=()=>{if(v)return P(!1);p>=f-1&&D(0),P(!0)},c=(a,i)=>o("stepTitle",{number:i+1,from:b[a.a].label,to:b[a.b].label,label:a.label}),q=ss(l.title,o("title")),M=S<640||(S-8)/Math.max(1,b.length)<96,r=n[p],w=a=>a<p?"done":a===p?"cur":"todo",y=(0,s.jsxs)("div",{className:"sq-bar",children:[(0,s.jsxs)("div",{className:"sq-buttons",role:"group","aria-label":o("controls"),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>z(p-1),disabled:p===0,children:[(0,s.jsx)(I,{name:"prev"}),(0,s.jsx)("span",{children:o("prev")})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>z(p+1),disabled:p>=f-1,children:[(0,s.jsx)(I,{name:"next"}),(0,s.jsx)("span",{children:o("next")})]}),(0,s.jsxs)("button",{type:"button",className:"sq-play","aria-pressed":v,onClick:t,disabled:f<2,children:[(0,s.jsx)(I,{name:v?"pause":"play"}),(0,s.jsx)("span",{children:o(v?"pause":"play")})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>z(0),disabled:p===0&&!v,children:[(0,s.jsx)(I,{name:"restart"}),(0,s.jsx)("span",{children:o("restart")})]})]}),(0,s.jsx)("span",{className:"sq-count","aria-live":"polite",children:o("count",{current:p+1,total:f})})]}),g=(0,s.jsx)("div",{className:"sq-progress","aria-hidden":"true",children:(0,s.jsx)("i",{style:{width:`${(p+1)/Math.max(1,f)*100}%`}})});return(0,s.jsxs)("section",{className:"sb-block sq-block","aria-label":q,ref:m,"data-narrow":M?"":void 0,children:[(l.title||l.description||!M)&&(0,s.jsxs)("div",{className:"sq-top",children:[(0,s.jsxs)("div",{children:[l.title&&(0,s.jsx)("h3",{className:"sq-title",children:(0,s.jsx)(Z,{text:l.title})}),l.description&&(0,s.jsx)("p",{className:"sq-description",children:l.description})]}),!M&&f>0&&(0,s.jsx)("span",{className:"sq-hint",children:o("hint")})]}),r&&(M?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"sq-cast","aria-label":o("actors"),children:b.map(a=>(0,s.jsx)(X,{actor:a},a.id))}),(0,s.jsxs)("div",{className:"sq-panel sq-panel-bar",children:[y,g]}),(0,s.jsx)("ol",{className:"sq-list",ref:N,onKeyDown:a=>{let i=as(a,p,f);i!==null&&(a.preventDefault(),z(i),N.current?.querySelectorAll("button")[i]?.focus())},children:n.map((a,i)=>(0,s.jsxs)("li",{"data-state":w(i),"data-kind":a.kind,children:[(0,s.jsxs)("button",{type:"button","aria-current":i===p?"step":void 0,onClick:()=>z(i),children:[(0,s.jsx)("span",{className:"sq-lnum",children:i+1}),(0,s.jsxs)("span",{className:"sq-lbody",children:[(0,s.jsx)("span",{className:"sq-route",children:(0,s.jsx)(_,{step:a,actors:b,t:o})}),(0,s.jsx)("span",{className:"sq-ltitle",children:a.label})]})]}),i===p&&a.detail&&(0,s.jsx)("div",{className:"sq-ldetail sq-md",children:(0,s.jsx)(F,{source:a.detail})})]},i))})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(qs,{actors:b,steps:n,width:S,current:p,measure:O,go:z,label:o("diagram",{count:f}),stepTitle:c}),(0,s.jsxs)("div",{className:"sq-panel",children:[y,g,(0,s.jsxs)("div",{className:"sq-detail","aria-live":"polite",children:[(0,s.jsxs)("div",{className:"sq-meta",children:[(0,s.jsx)("span",{className:"sq-lnum",children:p+1}),(0,s.jsx)(_,{step:r,actors:b,t:o})]}),(0,s.jsx)("h4",{children:r.label}),r.detail&&(0,s.jsx)("div",{className:"sq-md",children:(0,s.jsx)(F,{source:r.detail})})]})]})]})),(0,s.jsxs)("div",{className:"sq-static",children:[(0,s.jsx)("p",{className:"sq-static-title",children:o("allSteps")}),(0,s.jsx)("ol",{children:n.map((a,i)=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"sq-route",children:(0,s.jsx)(_,{step:a,actors:b,t:o})}),(0,s.jsx)("b",{children:a.label}),a.detail&&(0,s.jsx)("div",{className:"sq-md",children:(0,s.jsx)(F,{source:a.detail})})]},i))})]})]})}export{F as DetailText,ws as SequenceDiagramBlock};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-L2ZHJIET.js";import"./chunk-M5RCHTSV.js";import"./chunk-BZT4BVM4.js";import"./chunk-UNH6G7NO.js";import"./chunk-7K7GQKOA.js";import"./chunk-WRXJZR6G.js";import"./chunk-J6IRWTF7.js";import"./chunk-DCANE7XH.js";export{a as CodePanel,b as StepGuideBlock};
@@ -0,0 +1,3 @@
1
+ import{a as y}from"./chunk-M5RCHTSV.js";import{a as T,b as I,c as O}from"./chunk-RLCYUTAH.js";import{d as E}from"./chunk-UNH6G7NO.js";import{b as K,d as $}from"./chunk-7K7GQKOA.js";import{Ab as M,a as P,c as U,mb as D}from"./chunk-WRXJZR6G.js";import{a as A}from"./chunk-J6IRWTF7.js";import{c as j}from"./chunk-DCANE7XH.js";var c=j(U(),1);P(`.sb-block.stb-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.stb-block li:not(svg){padding:0}.sb-block.stb-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.stb-block{--stb-text: var(--text, #222222);--stb-muted: var(--muted, #6a6a6a);--stb-faint: var(--subtle, #929292);--stb-line: var(--line, #dddddd);--stb-paper: var(--paper, #ffffff);--stb-surface: var(--surface, #fafafa);--stb-hover: var(--hover, #f7f7f7);--stb-accent: var(--accent, #120a8f);--stb-accent-soft: var(--accent-soft, #eeedf9);--stb-mono: var(--font-mono, ui-monospace, Menlo, Consolas, monospace);--stb-object: #7348d0;--stb-object-soft: #f2edfc;--stb-array: #0d8579;--stb-array-soft: #e6f4f2;--stb-note: #a8582a;color:var(--stb-text);font-family:inherit;font-size:14px;line-height:1.7;padding:8px 0;container-type:inline-size}:root[data-theme=dark] .sb-block.stb-block,[data-theme=dark] .sb-block.stb-block{--stb-object: #b497ff;--stb-object-soft: #2e2648;--stb-array: #4fc4b6;--stb-array-soft: #163734;--stb-note: #e79c64}.sb-block.stb-block *{box-sizing:border-box}.sb-block.stb-block .stb-heading{margin:0 0 10px;font-size:17px;font-weight:700}.sb-block.stb-block .stb-frame{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);border:1px solid var(--stb-line);border-radius:10px;overflow:hidden;background:var(--stb-paper)}.sb-block.stb-block .stb-nav{background:var(--stb-surface);border-right:1px solid var(--stb-line);padding:8px 0;min-width:0}.sb-block.stb-block .stb-tree{display:flex;flex-direction:column;gap:1px}.sb-block.stb-block .stb-row{position:relative;display:flex;align-items:center;gap:6px;min-height:30px;margin:0 6px;padding:0 10px 0 calc(8px + var(--depth) * 18px);border-radius:6px;cursor:pointer;font-family:var(--stb-mono);font-size:12.5px;line-height:1.2;color:var(--stb-text);user-select:none;-webkit-user-select:none}.sb-block.stb-block .stb-row:hover{background:var(--stb-hover)}.sb-block.stb-block .stb-row.is-selected{background:var(--stb-accent-soft)}.sb-block.stb-block .stb-row.is-selected .stb-name{color:var(--stb-accent);font-weight:600}.sb-block.stb-block .stb-row:focus{outline:none}.sb-block.stb-block .stb-row:focus-visible{outline:2px solid var(--stb-accent);outline-offset:-2px}.sb-block.stb-block .stb-guide{position:absolute;top:0;bottom:-1px;left:calc(8px + var(--level) * 18px + 6px);width:1px;background:var(--stb-line)}.sb-block.stb-block .stb-row.is-selected .stb-guide{background:color-mix(in srgb,var(--stb-accent) 18%,transparent)}.sb-block.stb-block .stb-chevron{flex:none;display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-right:-1px;border-radius:4px;color:var(--stb-faint)}.sb-block.stb-block .stb-chevron svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}.sb-block.stb-block .stb-chevron.is-open svg{transform:rotate(90deg)}.sb-block.stb-block .stb-row:hover .stb-chevron:not(.is-none){color:var(--stb-muted)}.sb-block.stb-block .stb-name,.sb-block.stb-block .stb-type{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 0}.sb-block.stb-block .stb-type{color:var(--stb-faint);font-family:var(--stb-mono);font-size:11.5px}.sb-block.stb-block .stb-badge{flex:none;margin-left:auto;display:inline-flex;align-items:center;height:19px;padding:0 7px;border-radius:6px;background:var(--stb-surface);border:1px solid var(--stb-line);font-family:var(--font-sans, inherit);font-size:11px;line-height:1;color:var(--stb-muted);white-space:nowrap}.sb-block.stb-block .stb-row .stb-badge{background:var(--stb-paper)}.sb-block.stb-block .stb-row.is-selected .stb-badge{border-color:color-mix(in srgb,var(--stb-accent) 22%,transparent);color:var(--stb-accent)}.sb-block.stb-block .stb-icon{flex:none;width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center}.sb-block.stb-block svg.stb-icon{overflow:visible}.sb-block.stb-block .stb-icon.is-dir path{fill:color-mix(in srgb,var(--stb-accent) 14%,transparent);stroke:var(--stb-accent);stroke-width:1.2;stroke-linejoin:round}.sb-block.stb-block .stb-icon.is-dir.is-open path{fill:color-mix(in srgb,var(--stb-accent) 30%,transparent)}.sb-block.stb-block .stb-icon.is-file path{fill:none;stroke:var(--stb-muted);stroke-width:1.2;stroke-linejoin:round}.sb-block.stb-block .stb-icon.is-file path:first-child{fill:var(--stb-paper)}.sb-block.stb-block .stb-icon.is-field rect{fill:none;stroke:var(--stb-faint);stroke-width:1.3}.sb-block.stb-block .stb-icon.is-glyph{font-family:var(--stb-mono);font-size:10.5px;font-weight:700;letter-spacing:-.5px;border-radius:4px;line-height:16px}.sb-block.stb-block .stb-icon.is-object{color:var(--stb-object);background:var(--stb-object-soft)}.sb-block.stb-block .stb-icon.is-array{color:var(--stb-array);background:var(--stb-array-soft);letter-spacing:-2px;padding-right:2px}.sb-block.stb-block .stb-detail{padding:18px 24px 22px;min-width:0;overflow-wrap:anywhere}.sb-block.stb-block .stb-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px 4px;font-family:var(--stb-mono);font-size:11.5px;line-height:1.5;color:var(--stb-muted)}.sb-block.stb-block .stb-crumbs button{border:0;background:none;font:inherit;cursor:pointer;color:var(--stb-muted);border-radius:4px;padding:0 2px}.sb-block.stb-block .stb-crumbs button:hover{color:var(--stb-accent)}.sb-block.stb-block .stb-crumbs button:focus-visible{outline:2px solid var(--stb-accent);outline-offset:2px}.sb-block.stb-block .stb-crumbs [aria-current]{color:var(--stb-text);padding:0 2px}.sb-block.stb-block .stb-sep{color:var(--stb-faint)}.sb-block.stb-block .stb-title{display:flex;flex-wrap:wrap;align-items:center;gap:6px 9px;margin-top:12px}.sb-block.stb-block .stb-title .stb-icon{width:18px;height:18px}.sb-block.stb-block .stb-title .stb-icon.is-glyph{font-size:11.5px;line-height:18px}.sb-block.stb-block .stb-title h4{margin:0;font-family:var(--stb-mono);font-size:17px;line-height:1.35;font-weight:600;letter-spacing:-.01em}.sb-block.stb-block .stb-dtype{font-family:var(--stb-mono);font-size:12px;line-height:1.5;color:var(--stb-muted);background:var(--stb-surface);border-radius:6px;padding:1px 7px}.sb-block.stb-block .stb-title .stb-badge{margin-left:0}.sb-block.stb-block .stb-meta{margin-top:3px;padding-left:27px;font-size:12px;color:var(--stb-faint)}.sb-block.stb-block .stb-summary{margin:12px 0 0;font-size:15px;line-height:1.65}.sb-block.stb-block .stb-body{margin-top:2px}.sb-block.stb-block .stb-para{margin:10px 0 0;line-height:1.75}.sb-block.stb-block ul.stb-para{padding-left:18px}.sb-block.stb-block ul.stb-para li+li{margin-top:3px}.sb-block.stb-block .stb-empty{margin:14px 0 0;font-size:13px;color:var(--stb-faint)}.sb-block.stb-block .stb-code{margin-top:16px;border:1px solid var(--stb-line);border-radius:8px;background:var(--stb-surface);overflow:hidden}.sb-block.stb-block .stb-codebar{display:flex;align-items:center;gap:8px;padding:5px 6px 5px 12px;border-bottom:1px solid var(--stb-line)}.sb-block.stb-block .stb-lang{font-family:var(--stb-mono);font-size:11px;color:var(--stb-muted);letter-spacing:.03em}.sb-block.stb-block .stb-copystate{flex:1;min-width:0;text-align:right;font-size:11.5px;color:var(--stb-note);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-block.stb-block .stb-copy{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--stb-muted);font:inherit;font-size:12px;cursor:pointer}.sb-block.stb-block .stb-copy:hover{background:var(--stb-line);color:var(--stb-text)}.sb-block.stb-block .stb-copy:focus-visible{outline:2px solid var(--stb-accent);outline-offset:2px}.sb-block.stb-block .stb-copy svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.sb-block.stb-block .stb-copy.is-done{color:var(--stb-array)}.sb-block.stb-block .stb-code .stb-pre{margin:0;padding:12px 14px 14px;overflow-x:auto;font-family:var(--stb-mono);font-size:12.5px;line-height:1.65;white-space:pre;tab-size:2;scrollbar-width:thin}.sb-block.stb-block .stb-code code{font:inherit;background:none;border:0;padding:0;border-radius:0;color:inherit;overflow-wrap:normal}.sb-block.stb-block .stb-kids{margin-top:20px}.sb-block.stb-block .stb-kidshead{font-size:12px;font-weight:600;color:var(--stb-muted);letter-spacing:.04em;margin-bottom:4px}.sb-block.stb-block .stb-kid{display:grid;grid-template-columns:16px auto minmax(0,1fr);align-items:center;gap:9px;width:100%;padding:7px 8px;border:0;border-top:1px solid var(--stb-line);border-radius:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.sb-block.stb-block .stb-kid:last-child{border-bottom:1px solid var(--stb-line)}.sb-block.stb-block .stb-kid:hover{background:var(--stb-hover)}.sb-block.stb-block .stb-kid:focus-visible{outline:2px solid var(--stb-accent);outline-offset:-2px;border-radius:4px}.sb-block.stb-block .stb-kidname{font-family:var(--stb-mono);font-size:12.5px;white-space:nowrap}.sb-block.stb-block .stb-kidsum{font-size:12.5px;color:var(--stb-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sb-block.stb-block .stb-detail code,.sb-block.stb-block .stb-caption code,.sb-block.stb-block .stb-print code{font-family:var(--stb-mono);font-size:.88em;background:var(--stb-surface);border:1px solid var(--stb-line);border-radius:4px;padding:0 4px;overflow-wrap:anywhere}.sb-block.stb-block a{color:var(--stb-accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--stb-accent) 35%,transparent)}.sb-block.stb-block a:hover{border-bottom-color:var(--stb-accent)}.sb-block.stb-block strong{font-weight:600}.sb-block.stb-block .stb-caption{margin:10px 2px 0;font-size:12.5px;line-height:1.65;color:var(--stb-muted)}.sb-block.stb-block .stb-print{display:none}.sb-block.stb-block .stb-print ul{list-style:none;margin:0;padding-left:18px}.sb-block.stb-block .stb-print>ul{padding-left:0}.sb-block.stb-block .stb-print li{margin:2px 0;break-inside:avoid}.sb-block.stb-block .stb-print-name{font-family:var(--stb-mono);font-weight:600;margin-right:6px}.sb-block.stb-block .stb-print .stb-type{display:inline;margin-right:6px}.sb-block.stb-block .stb-print .stb-badge{display:inline;height:auto;margin:0;padding:0 4px}.sb-block.stb-block .stb-print-summary{color:var(--stb-muted)}@container (max-width: 640px){.sb-block.stb-block .stb-frame{grid-template-columns:minmax(0,1fr)}.sb-block.stb-block .stb-nav{border-right:0;border-bottom:1px solid var(--stb-line)}.sb-block.stb-block .stb-detail{padding:16px 16px 18px}.sb-block.stb-block .stb-row{padding-left:calc(6px + var(--depth) * 16px)}.sb-block.stb-block .stb-guide{left:calc(6px + var(--level) * 16px + 6px)}.sb-block.stb-block .stb-summary{font-size:14.5px}}@media(prefers-reduced-motion:reduce){.sb-block.stb-block *{transition:none!important}}@media print{.sb-block.stb-block .stb-frame{display:none}.sb-block.stb-block .stb-print{display:block;font-size:12.5px;line-height:1.6}}
2
+ `);var B=A("structureBrowser",{"zh-CN":{title:"\u7ED3\u6784\u6D4F\u89C8\u5668",tree:"\u7ED3\u6784",path:"\u8DEF\u5F84","kind.dir":"\u6587\u4EF6\u5939","kind.file":"\u6587\u4EF6","kind.object":"\u5BF9\u8C61","kind.array":"\u6570\u7EC4","kind.field":"\u5B57\u6BB5",childCount:{other:"{count} \u4E2A\u5B50\u9879"},contains:"\u5305\u542B",example:"\u793A\u4F8B",copy:"\u590D\u5236",copied:"\u5DF2\u590D\u5236",copyLabel:"\u590D\u5236\u793A\u4F8B\uFF1A{name}",selectedToCopy:"\u5DF2\u9009\u4E2D\uFF0C\u6309 \u2318C / Ctrl+C \u590D\u5236",toggle:"\u5C55\u5F00\u6216\u6536\u8D77 {name}",noDetail:"\u8FD9\u4E00\u9879\u6CA1\u6709\u66F4\u591A\u8BF4\u660E\u3002",empty:"\u6CA1\u6709\u53EF\u663E\u793A\u7684\u7ED3\u6784\u3002"},en:{title:"Structure browser",tree:"Structure",path:"Path","kind.dir":"Folder","kind.file":"File","kind.object":"Object","kind.array":"Array","kind.field":"Field",childCount:{one:"{count} child",other:"{count} children"},contains:"Contains",example:"Example",copy:"Copy",copied:"Copied",copyLabel:"Copy example: {name}",selectedToCopy:"Selected \u2014 press \u2318C / Ctrl+C to copy",toggle:"Expand or collapse {name}",noDetail:"No further description for this item.",empty:"There is no structure to show."}});var t=j(D(),1);function _({source:l}){return l.trim().split(/\n\s*\n/).map((i,b)=>{let s=i.split(`
3
+ `);return s.every(a=>/^\s*[-•]\s+/.test(a))?(0,t.jsx)("ul",{className:"stb-para",children:s.map((a,d)=>(0,t.jsx)("li",{children:(0,t.jsx)(y,{source:a.replace(/^\s*[-•]\s+/,"")})},d))},b):(0,t.jsx)("p",{className:"stb-para",children:s.map((a,d)=>(0,t.jsxs)(c.Fragment,{children:[d>0&&(0,t.jsx)("br",{}),(0,t.jsx)(y,{source:a})]},d))},b)})}function L({kind:l,open:i}){return l==="dir"?(0,t.jsx)("svg",{className:`stb-icon is-dir${i?" is-open":""}`,viewBox:"0 0 16 16","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M1.75 4.25c0-.69.56-1.25 1.25-1.25h2.6l1.4 1.5h6c.69 0 1.25.56 1.25 1.25v6c0 .69-.56 1.25-1.25 1.25H3c-.69 0-1.25-.56-1.25-1.25z"})}):l==="file"?(0,t.jsxs)("svg",{className:"stb-icon is-file",viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 1.75h5.2L12.75 5.3v8.2c0 .41-.34.75-.75.75H4a.75.75 0 0 1-.75-.75V2.5c0-.41.34-.75.75-.75z"}),(0,t.jsx)("path",{d:"M9 1.9v3.6h3.6"})]}):l==="object"?(0,t.jsx)("span",{className:"stb-icon is-glyph is-object","aria-hidden":"true",children:"{}"}):l==="array"?(0,t.jsx)("span",{className:"stb-icon is-glyph is-array","aria-hidden":"true",children:"[ ]"}):(0,t.jsx)("svg",{className:"stb-icon is-field",viewBox:"0 0 16 16","aria-hidden":"true",children:(0,t.jsx)("rect",{x:"5",y:"5",width:"6",height:"6",rx:"1.5",transform:"rotate(45 8 8)"})})}function q({code:l,lang:i,name:b}){let s=M(B),a=(0,c.useRef)(null),d=(0,c.useRef)(void 0),[m,k]=(0,c.useState)("idle");(0,c.useEffect)(()=>()=>window.clearTimeout(d.current),[]);let p=x=>{k(x),window.clearTimeout(d.current),d.current=window.setTimeout(()=>k("idle"),x==="copied"?1500:4e3)},h=()=>{let x=window.getSelection();if(a.current&&x){let g=document.createRange();g.selectNodeContents(a.current),x.removeAllRanges(),x.addRange(g)}p("selected")},w=()=>{if(!navigator.clipboard)return h();navigator.clipboard.writeText(l).then(()=>p("copied"),h)};return(0,t.jsxs)("div",{className:"stb-code",children:[(0,t.jsxs)("div",{className:"stb-codebar",children:[(0,t.jsx)("span",{className:"stb-lang",children:i||s("example")}),(0,t.jsx)("span",{className:"stb-copystate","aria-live":"polite",children:m==="selected"?s("selectedToCopy"):""}),(0,t.jsxs)("button",{type:"button",className:`stb-copy${m==="copied"?" is-done":""}`,"aria-label":s("copyLabel",{name:b}),onClick:w,children:[m==="copied"?(0,t.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3.5 8.5l3 3 6-6.5"})}):(0,t.jsxs)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.6"}),(0,t.jsx)("path",{d:"M10.5 3.5v-.4A1.6 1.6 0 0 0 8.9 1.5H4.1A1.6 1.6 0 0 0 2.5 3.1v4.8a1.6 1.6 0 0 0 1.6 1.6h.4"})]}),s(m==="copied"?"copied":"copy")]})]}),(0,t.jsx)("pre",{className:"stb-pre",children:(0,t.jsx)("code",{ref:a,children:l})})]})}function F({items:l,roots:i},b){let s=new Set;for(let k of l.values())k.node.open&&k.children.length&&s.add(k.path);let a=b?I(b):"",d=l.has(a)?a:null,m=d??i[0]??null;if(d)for(let k=d;k;k=l.get(k).parent)l.get(k).children.length&&s.add(k);else!s.size&&m&&l.get(m).children.length&&s.add(m);return{selected:m,open:s}}function H({paths:l,outline:i}){return(0,t.jsx)("ul",{children:l.map(b=>{let s=i.items.get(b);return(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"stb-print-name",children:s.node.name}),s.node.type&&(0,t.jsx)("span",{className:"stb-type",children:s.node.type}),s.node.badge&&(0,t.jsx)("span",{className:"stb-badge",children:s.node.badge}),s.node.summary&&(0,t.jsxs)("span",{className:"stb-print-summary",children:[" \u2014 ",(0,t.jsx)(y,{source:s.node.summary,links:!1})]}),s.children.length>0&&(0,t.jsx)(H,{paths:s.children,outline:i})]},b)})})}function ot({data:l}){let i=M(B),b=l,s=(0,c.useMemo)(()=>O(b.nodes??[]),[b.nodes]),{items:a,roots:d}=s,[m,k]=(0,c.useState)(()=>F(s,b.initial));(0,c.useEffect)(()=>k(F(s,b.initial)),[s,b.initial]);let{selected:p,open:h}=m,w=(e,o)=>k(u=>{let r=new Set(u.open);return o==="open"||o==="flip"&&!r.has(e)?r.add(e):(o==="close"||o==="flip")&&r.delete(e),{selected:e,open:r}}),x=e=>k(o=>{let u=new Set(o.open);for(let r=a.get(e)?.parent??null;r;r=a.get(r).parent)u.add(r);return{selected:e,open:u}}),g=(0,c.useMemo)(()=>{let e=[],o=u=>{for(let r of u){let f=a.get(r);e.push(f),f.children.length&&h.has(r)&&o(f.children)}};return o(d),e},[a,d,h]),z=(0,c.useRef)(new Map),C=(0,c.useRef)(!1);(0,c.useLayoutEffect)(()=>{C.current&&p&&z.current.get(p)?.focus(),C.current=!1},[p,g]);let R=e=>{if(!p)return;let o=a.get(p),u=g.findIndex(f=>f.path===p),r=(f,v)=>{e.preventDefault(),f&&(C.current=!0,w(f,v))};switch(e.key){case"ArrowDown":return r(g[u+1]?.path);case"ArrowUp":return r(g[u-1]?.path);case"Home":return r(g[0]?.path);case"End":return r(g[g.length-1]?.path);case"ArrowRight":return o.children.length?h.has(p)?r(o.children[0]):r(p,"open"):e.preventDefault();case"ArrowLeft":return o.children.length&&h.has(p)?r(p,"close"):r(o.parent);case"Enter":case" ":return o.children.length?r(p,"flip"):e.preventDefault()}},n=p?a.get(p):void 0,S=[];for(let e=p;e;e=a.get(e).parent)S.unshift(a.get(e));let V=e=>e.parent?a.get(e.parent).children:d;return(0,t.jsxs)("section",{className:"sb-block stb-block","aria-label":$(b.title,i("title")),children:[b.title&&(0,t.jsx)("h3",{className:"stb-heading",children:(0,t.jsx)(K,{text:b.title})}),(0,t.jsxs)("div",{className:"stb-frame",children:[(0,t.jsx)("div",{className:"stb-nav",children:(0,t.jsx)("div",{className:"stb-tree",role:"tree","aria-label":i("tree"),onKeyDown:R,children:g.map(e=>{let o=h.has(e.path),u=e.path===p,r=V(e);return(0,t.jsxs)("div",{ref:f=>{f?z.current.set(e.path,f):z.current.delete(e.path)},role:"treeitem","aria-level":e.depth+1,"aria-setsize":r.length,"aria-posinset":r.indexOf(e.path)+1,"aria-selected":u,"aria-expanded":e.children.length?o:void 0,tabIndex:u?0:-1,className:`stb-row${u?" is-selected":""}`,style:{"--depth":e.depth},onClick:()=>w(e.path,e.children.length&&(!o||u)?"flip":void 0),children:[Array.from({length:e.depth},(f,v)=>(0,t.jsx)("i",{className:"stb-guide",style:{"--level":v},"aria-hidden":"true"},v)),(0,t.jsx)("span",{className:`stb-chevron${e.children.length?"":" is-none"}${o?" is-open":""}`,"aria-hidden":"true",title:e.children.length?i("toggle",{name:e.node.name}):void 0,onClick:f=>{e.children.length&&(f.stopPropagation(),k(v=>{let N=new Set(v.open);return N.has(e.path)?N.delete(e.path):N.add(e.path),{...v,open:N}}))},children:e.children.length>0&&(0,t.jsx)("svg",{viewBox:"0 0 12 12",children:(0,t.jsx)("path",{d:"M4.5 2.75L7.75 6 4.5 9.25"})})}),(0,t.jsx)(L,{kind:e.kind,open:o}),(0,t.jsx)("span",{className:"stb-name",children:e.node.name}),e.node.type&&(0,t.jsx)("span",{className:"stb-type",children:e.node.type}),e.node.badge&&(0,t.jsx)("span",{className:"stb-badge",children:e.node.badge})]},e.path)})})}),(0,t.jsx)("div",{className:"stb-detail","aria-live":"polite",children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("nav",{className:"stb-crumbs","aria-label":i("path"),children:S.map((e,o)=>(0,t.jsxs)(c.Fragment,{children:[o>0&&(0,t.jsx)("span",{className:"stb-sep","aria-hidden":"true",children:"/"}),o<S.length-1?(0,t.jsx)("button",{type:"button",onClick:()=>w(e.path),children:T(e.node.name)}):(0,t.jsx)("span",{"aria-current":"location",children:T(e.node.name)})]},e.path))}),(0,t.jsxs)("div",{className:"stb-title",children:[(0,t.jsx)(L,{kind:n.kind}),(0,t.jsx)("h4",{children:n.node.name}),n.node.type&&(0,t.jsx)("span",{className:"stb-dtype",children:n.node.type}),n.node.badge&&(0,t.jsx)("span",{className:"stb-badge",children:n.node.badge})]}),(0,t.jsxs)("div",{className:"stb-meta",children:[i(`kind.${n.kind}`),n.children.length>0&&` \xB7 ${i("childCount",{count:n.children.length})}`]}),n.node.summary&&(0,t.jsx)("p",{className:"stb-summary",children:(0,t.jsx)(y,{source:n.node.summary})}),n.node.detail&&(0,t.jsx)("div",{className:"stb-body",children:(0,t.jsx)(_,{source:n.node.detail})}),n.node.example&&(0,t.jsx)(q,{code:n.node.example,lang:n.node.exampleLang,name:n.node.name},n.path),n.children.length>0&&(0,t.jsxs)("div",{className:"stb-kids",children:[(0,t.jsx)("div",{className:"stb-kidshead",children:i("contains")}),n.children.map(e=>{let o=a.get(e);return(0,t.jsxs)("button",{type:"button",className:"stb-kid",onClick:()=>x(e),children:[(0,t.jsx)(L,{kind:o.kind}),(0,t.jsx)("span",{className:"stb-kidname",children:o.node.name}),o.node.summary&&(0,t.jsx)("span",{className:"stb-kidsum",children:E(o.node.summary)})]},e)})]}),!n.node.summary&&!n.node.detail&&!n.node.example&&!n.children.length&&(0,t.jsx)("p",{className:"stb-empty",children:i("noDetail")})]}):(0,t.jsx)("p",{className:"stb-empty",children:i("empty")})})]}),(0,t.jsx)("div",{className:"stb-print",children:(0,t.jsx)(H,{paths:d,outline:s})}),b.caption&&(0,t.jsx)("p",{className:"stb-caption",children:(0,t.jsx)(y,{source:b.caption})})]})}export{ot as StructureBrowserBlock};
@@ -0,0 +1,2 @@
1
+ var Ne=Object.defineProperty,Ke=(e,t,r)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qe=(e,t)=>{for(var r in t)Ne(e,r,{get:t[r],enumerable:!0})},Ue=(e,t,r)=>Ke(e,typeof t!="symbol"?t+"":t,r),He={};Qe(He,{Graph:()=>P,alg:()=>te});var Ze=Object.defineProperty,xe=(e,t)=>{for(var r in t)Ze(e,r,{get:t[r],enumerable:!0})},ee=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(r=>{t!==void 0?this.setNode(r,t):this.setNode(r)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=r=>this.removeEdge(this._edgeObjs[r]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(r=>{this.setParent(r)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t="\0";else{t+="";for(let r=t;r!==void 0;r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!=="\0")return t}}children(e="\0"){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let r=new Set(t),n=this.successors(e);if(n)for(let i of n)r.add(i);return Array.from(r.values())}}isLeaf(e){var t;let r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),((t=r?.length)!=null?t:0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([i,o])=>{e(i)&&t.setNode(i,o)}),Object.values(this._edgeObjs).forEach(i=>{t.hasNode(i.v)&&t.hasNode(i.w)&&t.setEdge(i,this.edge(i))});let r={},n=i=>{let o=this.parent(i);return!o||t.hasNode(o)?(r[i]=o,o):o in r?r[o]:n(o)};return this._isCompound&&t.nodes().forEach(i=>t.setParent(i,n(i))),t}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((r,n)=>(t!==void 0?this.setEdge(r,n,t):this.setEdge(r,n),n)),this}setEdge(e,t,r,n){let i,o,s,l,a=!1;typeof e=="object"&&e!==null&&"v"in e?(i=e.v,o=e.w,s=e.name,arguments.length===2&&(l=t,a=!0)):(i=e,o=t,s=n,arguments.length>2&&(l=r,a=!0)),i=""+i,o=""+o,s!==void 0&&(s=""+s);let d=V(this._isDirected,i,o,s);if(d in this._edgeLabels)return a&&(this._edgeLabels[d]=l),this;if(s!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(o),this._edgeLabels[d]=a?l:this._defaultEdgeLabelFn(i,o,s);let u=et(this._isDirected,i,o,s);return i=u.v,o=u.w,Object.freeze(u),this._edgeObjs[d]=u,se(this._preds[o],i),se(this._sucs[i],o),this._in[o][d]=u,this._out[i][d]=u,this._edgeCount++,this}edge(e,t,r){let n=arguments.length===1?W(this._isDirected,e):V(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(e,t,r){let n=arguments.length===1?this.edge(e):this.edge(e,t,r);return typeof n!="object"||n===null?{label:n}:n}hasEdge(e,t,r){return(arguments.length===1?W(this._isDirected,e):V(this._isDirected,e,t,r))in this._edgeLabels}removeEdge(e,t,r){let n=arguments.length===1?W(this._isDirected,e):V(this._isDirected,e,t,r),i=this._edgeObjs[n];if(i){let o=i.v,s=i.w;delete this._edgeLabels[n],delete this._edgeObjs[n],le(this._preds[s],o),le(this._sucs[o],s),delete this._in[s][n],delete this._out[o][n],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,r){if(!e)return;let n=Object.values(e);return r?n.filter(i=>i.v===t&&i.w===r||i.v===r&&i.w===t):n}};function se(e,t){e[t]?e[t]++:e[t]=1}function le(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function V(e,t,r,n){let i=""+t,o=""+r;if(!e&&i>o){let s=i;i=o,o=s}return i+""+o+""+(n===void 0?"\0":n)}function et(e,t,r,n){let i=""+t,o=""+r;if(!e&&i>o){let l=i;i=o,o=l}let s={v:i,w:o};return n&&(s.name=n),s}function W(e,t){return V(e,t.v,t.w,t.name)}var tt={};xe(tt,{read:()=>ot,write:()=>rt});function rt(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:nt(e),edges:it(e)},r=e.graph();return r!==void 0&&(t.value=structuredClone(r)),t}function nt(e){return e.nodes().map(t=>{let r=e.node(t),n=e.parent(t),i={v:t};return r!==void 0&&(i.value=r),n!==void 0&&(i.parent=n),i})}function it(e){return e.edges().map(t=>{let r=e.edge(t),n={v:t.v,w:t.w};return t.name!==void 0&&(n.name=t.name),r!==void 0&&(n.value=r),n})}function ot(e){let t=new ee(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(r=>{t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),e.edges.forEach(r=>{t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}var te={};xe(te,{CycleException:()=>B,bellmanFord:()=>je,components:()=>dt,dijkstra:()=>G,dijkstraAll:()=>ht,findCycles:()=>ct,floydWarshall:()=>gt,isAcyclic:()=>vt,postorder:()=>wt,preorder:()=>Et,prim:()=>bt,shortestPaths:()=>yt,tarjan:()=>Ce,topsort:()=>Me});var st=()=>1;function je(e,t,r,n){return lt(e,String(t),r||st,n||function(i){var o;return(o=e.outEdges(i))!=null?o:[]})}function lt(e,t,r,n){let i={},o,s=0,l=e.nodes(),a=function(h){let c=i[h.v],f=i[h.w];if(!c||!f)return;let p=r(h);c.distance+p<f.distance&&(i[h.w]={distance:c.distance+p,predecessor:h.v},o=!0)},d=function(){l.forEach(function(h){n(h).forEach(function(c){let f=c.v===h?c.v:c.w,p=f===c.v?c.w:c.v;a({v:f,w:p})})})};l.forEach(function(h){let c=h===t?0:Number.POSITIVE_INFINITY;i[h]={distance:c,predecessor:""}});let u=l.length;for(let h=1;h<u&&(o=!1,s++,d(),!!o);h++);if(s===u-1&&(o=!1,d(),o))throw new Error("The graph contains a negative weight cycle");return i}function dt(e){let t={},r=[],n;function i(o){var s,l;o in t||(t[o]=!0,n.push(o),(s=e.successors(o))==null||s.forEach(i),(l=e.predecessors(o))==null||l.forEach(i))}return e.nodes().forEach(function(o){n=[],i(o),n.length&&r.push(n)}),r}var Ie=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let r=this._keyIndices,n=String(e);if(!(n in r)){let i=this._arr,o=i.length;return r[n]=o,i.push({key:n,priority:t}),this._decrease(o),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let r=this._keyIndices[e];if(r===void 0)throw new Error(`Key not found: ${e}`);let n=this._arr[r].priority;if(t>n)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${n} New: ${t}`);this._arr[r].priority=t,this._decrease(r)}_heapify(e){let t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,r=t[e].priority,n;for(;e!==0&&(n=e>>1,!(t[n].priority<r));)this._swap(e,n),e=n}_swap(e,t){let r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}},at=()=>1;function G(e,t,r,n){let i=function(o){var s;return(s=e.outEdges(o))!=null?s:[]};return ut(e,String(t),r||at,n||i)}function ut(e,t,r,n){let i={},o=new Ie,s,l,a=function(d){let u=d.v!==s?d.v:d.w,h=i[u];if(!h)return;let c=r(d),f=l.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+c);f<h.distance&&(h.distance=f,h.predecessor=s,o.decrease(u,f))};for(e.nodes().forEach(function(d){let u=d===t?0:Number.POSITIVE_INFINITY;i[d]={distance:u,predecessor:""},o.add(d,u)});o.size()>0;){s=o.removeMin();let d=i[s];if(!d||d.distance===Number.POSITIVE_INFINITY)break;l=d,n(s).forEach(a)}return i}function ht(e,t,r){return e.nodes().reduce(function(n,i){return n[i]=G(e,i,t,r),n},{})}function Ce(e){let t=0,r=[],n={},i=[];function o(s){var l;let a=n[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),(l=e.successors(s))==null||l.forEach(function(d){if(d in n){let u=n[d];u!=null&&u.onStack&&(a.lowlink=Math.min(a.lowlink,u.index))}else{o(d);let u=n[d];u&&(a.lowlink=Math.min(a.lowlink,u.lowlink))}}),a.lowlink===a.index){let d=[],u;do{u=r.pop();let h=n[u];h&&(h.onStack=!1),d.push(u)}while(s!==u);i.push(d)}}return e.nodes().forEach(function(s){s in n||o(s)}),i}function ct(e){return Ce(e).filter(function(t){var r;let n=t[0];return n?t.length>1||t.length===1&&((r=e.outEdges(n,n))!=null?r:[]).length>0:!1})}var ft=()=>1;function gt(e,t,r){return pt(e,t||ft,r||function(n){var i;return(i=e.outEdges(n))!=null?i:[]})}function pt(e,t,r){let n={},i=e.nodes();return i.forEach(function(o){let s={};n[o]=s,s[o]={distance:0,predecessor:""},i.forEach(function(l){o!==l&&(s[l]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),r(o).forEach(function(l){let a=l.v===o?l.w:l.v,d=t(l);s[a]={distance:d,predecessor:o}})}),i.forEach(function(o){let s=n[o];s&&i.forEach(function(l){let a=n[l];a&&i.forEach(function(d){let u=a[o],h=s[d],c=a[d];if(u&&h&&c){let f=u.distance+h.distance;f<c.distance&&(c.distance=f,c.predecessor=h.predecessor)}})})}),n}var B=class extends Error{constructor(e){super(e),this.name="CycleException"}};function Me(e){let t={},r={},n=[];function i(o){var s;if(o in r)throw new B;o in t||(r[o]=!0,t[o]=!0,(s=e.predecessors(o))==null||s.forEach(i),delete r[o],n.push(o))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new B;return n}function vt(e){try{Me(e)}catch(t){if(t instanceof B)return!1;throw t}return!0}function mt(e,t,r,n,i){Array.isArray(t)||(t=[t]);let o=(l=>{var a;return(a=e.isDirected()?e.successors(l):e.neighbors(l))!=null?a:[]}),s={};return t.forEach(function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);i=Le(e,l,r==="post",s,o,n,i)}),i}function Le(e,t,r,n,i,o,s){return t in n||(n[t]=!0,r||(s=o(s,t)),i(t).forEach(function(l){s=Le(e,l,r,n,i,o,s)}),r&&(s=o(s,t))),s}function Se(e,t,r){return mt(e,t,r,function(n,i){return n.push(i),n},[])}function wt(e,t){return Se(e,t,"post")}function Et(e,t){return Se(e,t,"pre")}function bt(e,t){var r;let n=new ee,i={},o=new Ie,s;function l(u){let h=u.v===s?u.w:u.v,c=o.priority(h);if(c!==void 0){let f=t(u);f<c&&(i[h]=s,o.decrease(h,f))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(u){o.add(u,Number.POSITIVE_INFINITY),n.setNode(u)});let a=e.nodes()[0];a!==void 0&&o.decrease(a,0);let d=!1;for(;o.size()>0;){if(s=o.removeMin(),s in i)n.setEdge(s,i[s]);else{if(d)throw new Error("Input graph is not connected: "+e);d=!0}(r=e.nodeEdges(s))==null||r.forEach(l)}return n}function yt(e,t,r,n){return _t(e,t,r,n??(i=>{var o;return(o=e.outEdges(i))!=null?o:[]}))}function _t(e,t,r,n){if(r===void 0)return G(e,t,r,n);let i=!1,o=e.nodes();for(let s=0;s<o.length;s++){let l=o[s];if(l===void 0)continue;let a=n(l);for(let d=0;d<a.length;d++){let u=a[d];if(!u)continue;let h=u.v===l?u.v:u.w,c=h===u.v?u.w:u.v;r({v:h,w:c})<0&&(i=!0)}if(i)return je(e,t,r,n)}return G(e,t,r,n)}var P=ee;function Y(e,t,r,n){let i=n;for(;e.hasNode(i);)i=re(n);return r.dummy=t,e.setNode(i,r),i}function kt(e){let t=new P().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function Te(e){let t=new P({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t}function de(e,t){let r=e.x,n=e.y,i=t.x-r,o=t.y-n,s=e.width/2,l=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");let a,d;return Math.abs(o)*s>Math.abs(i)*l?(o<0&&(l=-l),a=l*i/o,d=l):(i<0&&(s=-s),a=s,d=s*o/i),{x:r+a,y:n+d}}function q(e){let t=A(Fe(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),i=n.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][n.order]=r)}),t}function Ot(e){let t=e.nodes().map(n=>{let i=e.node(n).rank;return i===void 0?Number.MAX_VALUE:i}),r=T(Math.min,t);e.nodes().forEach(n=>{let i=e.node(n);Object.hasOwn(i,"rank")&&(i.rank-=r)})}function Nt(e){let t=e.nodes().map(s=>e.node(s).rank).filter(s=>s!==void 0),r=T(Math.min,t),n=[];e.nodes().forEach(s=>{let l=e.node(s).rank-r;n[l]||(n[l]=[]),n[l].push(s)});let i=0,o=e.graph().nodeRankFactor;Array.from(n).forEach((s,l)=>{s===void 0&&l%o!==0?--i:s!==void 0&&i&&s.forEach(a=>e.node(a).rank+=i)})}function ae(e,t,r,n){let i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Y(e,"border",i,t)}function xt(e,t=Pe){let r=[];for(let n=0;n<e.length;n+=t){let i=e.slice(n,n+t);r.push(i)}return r}var Pe=65535;function T(e,t){if(t.length>Pe){let r=xt(t);return e(...r.map(n=>e(...n)))}else return e(...t)}function Fe(e){let t=e.nodes().map(r=>{let n=e.node(r).rank;return n===void 0?Number.MIN_VALUE:n});return T(Math.max,t)}function jt(e,t){let r={lhs:[],rhs:[]};return e.forEach(n=>{t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function It(e,t){return t()}var Ct=0;function re(e){let t=++Ct;return e+(""+t)}function A(e,t,r=1){t==null&&(t=e,e=0);let n=o=>o<t;r<0&&(n=o=>t<o);let i=[];for(let o=e;n(o);o+=r)i.push(o);return i}function z(e,t){let r={};for(let n of t)e[n]!==void 0&&(r[n]=e[n]);return r}function $(e,t){let r;return typeof t=="string"?r=n=>n[t]:r=t,Object.entries(e).reduce((n,[i,o])=>(n[i]=r(o,i),n),{})}function Mt(e,t){return e.reduce((r,n,i)=>(r[n]=t[i],r),{})}var X="\0";function Re(e,t,r){var n,i,o,s,l,a;if(!(e&&t&&r&&t.dummy==="edge"&&r.dummy==="edge"&&t.edgeObj&&r.edgeObj&&e[t.edgeObj.v]&&e[r.edgeObj.v]&&e[t.edgeObj.w]&&e[r.edgeObj.w]))return 0;let d=!0;t.edgeObj.w===r.edgeObj.w&&(d=!1);let u=d?(i=(n=e[t.edgeObj.v])==null?void 0:n.rank)!=null?i:NaN+1:(s=(o=e[t.edgeObj.w])==null?void 0:o.rank)!=null?s:NaN-1,h=Object.entries(e).find(b=>{var y,w;return((y=b[1].edgeObj)==null?void 0:y.v)===t.edgeObj.v&&((w=b[1].edgeObj)==null?void 0:w.w)===t.edgeObj.w&&b[1].rank===u}),c=Object.entries(e).find(b=>{var y,w;return((y=b[1].edgeObj)==null?void 0:y.v)===r.edgeObj.v&&((w=b[1].edgeObj)==null?void 0:w.w)===r.edgeObj.w&&b[1].rank===u});if(!h||!c)return 0;let f=(l=h[1].order)!=null?l:NaN,p=(a=c[1].order)!=null?a:NaN;return isNaN(f-p)?0:f-p}var Lt=class{constructor(){Ue(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return ue(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&ue(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,St)),r=r._prev;return"["+e.join(", ")+"]"}};function ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function St(e,t){if(e!=="_next"&&e!=="_prev")return t}var Tt=Lt,Pt=()=>1;function Ft(e,t){if(e.nodeCount()<=1)return[];let r=Dt(e,t||Pt);return Rt(r.graph,r.buckets,r.zeroIdx).flatMap(n=>e.outEdges(n.v,n.w)||[])}function Rt(e,t,r){var n;let i=[],o=t[t.length-1],s=t[0],l;for(;e.nodeCount();){for(;l=s.dequeue();)J(e,t,r,l);for(;l=o.dequeue();)J(e,t,r,l);if(e.nodeCount()){for(let a=t.length-2;a>0;--a)if(l=(n=t[a])==null?void 0:n.dequeue(),l){i=i.concat(J(e,t,r,l,!0)||[]);break}}}return i}function J(e,t,r,n,i){let o=[],s=i?o:void 0;return(e.inEdges(n.v)||[]).forEach(l=>{let a=e.edge(l),d=e.node(l.v);i&&o.push({v:l.v,w:l.w}),d.out-=a,Z(t,r,d)}),(e.outEdges(n.v)||[]).forEach(l=>{let a=e.edge(l),d=l.w,u=e.node(d);u.in-=a,Z(t,r,u)}),e.removeNode(n.v),s}function Dt(e,t){let r=new P,n=0,i=0;e.nodes().forEach(l=>{r.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let a=r.edge(l.v,l.w)||0,d=t(l),u=a+d;r.setEdge(l.v,l.w,u);let h=r.node(l.v),c=r.node(l.w);i=Math.max(i,h.out+=d),n=Math.max(n,c.in+=d)});let o=Yt(i+n+3).map(()=>new Tt),s=n+1;return r.nodes().forEach(l=>{Z(o,s,r.node(l))}),{graph:r,buckets:o,zeroIdx:s}}function Z(e,t,r){var n,i,o;r.out?r.in?(o=e[r.out-r.in+t])==null||o.enqueue(r):(i=e[e.length-1])==null||i.enqueue(r):(n=e[0])==null||n.enqueue(r)}function Yt(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t}function Vt(e,t){(e.graph().acyclicer==="greedy"?Ft(e,r(e)):At(e,t??null)).forEach(n=>{let i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,re("rev"))});function r(n){return i=>n.edge(i).weight}}function At(e,t){let r=[],n={},i={};function o(a){Object.hasOwn(i,a)||(i[a]=!0,n[a]=!0,e.outEdges(a).forEach(d=>{Object.hasOwn(n,d.w)?r.push(d):o(d.w)}),delete n[a])}function s(a){var d;Object.hasOwn(i,a)||(i[a]=!0,n[a]=!0,(d=e.outEdges(a))==null||d.forEach(u=>{var h,c;Object.hasOwn(n,u.w)||((h=t.node(a))==null?void 0:h.rank)>((c=t.node(u.w))==null?void 0:c.rank)&&Bt(e,u.w,u)?r.push(u):s(u.w)}),delete n[a])}let l=o;return t&&typeof t.node=="function"&&(l=s),e.sources().forEach(l),e.nodes().forEach(l),r}function Gt(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}function Bt(e,t,r){let n=new Set;function i(o){var s;if(e.sources().includes(o))return!0;n.add(o);for(let l of(s=e.inEdges(o))!=null?s:[])if(!(l.v===r.v&&l.w===r.w)&&!n.has(l.v)&&i(l.v))return!0;return!1}return i(t)}function zt(e){e.graph().dummyChains=[],e.edges().forEach(t=>qt(e,t))}function qt(e,t){let r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,s=t.name,l=e.edge(t),a=l.labelRank;if(o===n+1)return;e.removeEdge(t);let d,u,h;for(h=0,++n;n<o;++h,++n)l.points=[],u={width:0,height:0,edgeLabel:l,edgeObj:t,rank:n},d=Y(e,"edge",u,"_d"),n===a&&(u.width=l.width,u.height=l.height,u.dummy="edge-label",u.labelpos=l.labelpos),e.setEdge(r,d,{weight:l.weight},s),h===0&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,i,{weight:l.weight},s)}function $t(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}function ne(e){let t={};function r(n){let i=e.node(n);if(Object.hasOwn(t,n))return i.rank;t[n]=!0;let o=e.outEdges(n),s=o?o.map(a=>a==null?Number.POSITIVE_INFINITY:r(a.w)-e.edge(a).minlen):[],l=T(Math.min,s);return l===Number.POSITIVE_INFINITY&&(l=0),i.rank=l}e.sources().forEach(r)}function D(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var De=Xt;function Xt(e){let t=new P({directed:!1}),r=e.nodes();if(r.length===0)throw new Error("Graph must have at least one node");let n=r[0],i=e.nodeCount();t.setNode(n,{});let o,s;for(;Wt(t,e)<i&&(o=Jt(t,e),!!o);)s=t.hasNode(o.v)?D(e,o):-D(e,o),Kt(t,e,s);return t}function Wt(e,t){function r(n){let i=t.nodeEdges(n);i&&i.forEach(o=>{let s=o.v,l=n===s?o.w:s;!e.hasNode(l)&&!D(t,o)&&(e.setNode(l,{}),e.setEdge(n,l,{}),r(l))})}return e.nodes().forEach(r),e.nodeCount()}function Jt(e,t){return t.edges().reduce((r,n)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(n.v)!==e.hasNode(n.w)&&(i=D(t,n)),i<r[0]?[i,n]:r},[Number.POSITIVE_INFINITY,null])[1]}function Kt(e,t,r){e.nodes().forEach(n=>t.node(n).rank+=r)}var{preorder:Qt,postorder:Ut}=te,Ht=F;F.initLowLimValues=oe;F.initCutValues=ie;F.calcCutValue=Ye;F.leaveEdge=Ae;F.enterEdge=Ge;F.exchangeEdges=Be;function F(e){e=kt(e),ne(e);let t=De(e);oe(t),ie(t,e);let r,n;for(;r=Ae(t);)n=Ge(t,e,r),Be(t,e,r,n)}function ie(e,t){let r=Ut(e,e.nodes());r=r.slice(0,r.length-1),r.forEach(n=>Zt(e,t,n))}function Zt(e,t,r){let n=e.node(r).parent,i=e.edge(r,n);i.cutvalue=Ye(e,t,r)}function Ye(e,t,r){let n=e.node(r).parent,i=!0,o=t.edge(r,n),s=0;o||(i=!1,o=t.edge(n,r)),s=o.weight;let l=t.nodeEdges(r);return l&&l.forEach(a=>{let d=a.v===r,u=d?a.w:a.v;if(u!==n){let h=d===i,c=t.edge(a).weight;if(s+=h?c:-c,tr(e,r,u)){let f=e.edge(r,u).cutvalue;s+=h?-f:f}}}),s}function oe(e,t){arguments.length<2&&(t=e.nodes()[0]),Ve(e,{},1,t)}function Ve(e,t,r,n,i){let o=r,s=e.node(n);t[n]=!0;let l=e.neighbors(n);return l&&l.forEach(a=>{Object.hasOwn(t,a)||(r=Ve(e,t,r,a,n))}),s.low=o,s.lim=r++,i?s.parent=i:delete s.parent,r}function Ae(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Ge(e,t,r){let n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);let o=e.node(n),s=e.node(i),l=o,a=!1;return o.lim>s.lim&&(l=s,a=!0),t.edges().filter(d=>a===he(e,e.node(d.v),l)&&a!==he(e,e.node(d.w),l)).reduce((d,u)=>D(t,u)<D(t,d)?u:d)}function Be(e,t,r,n){let i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),oe(e),ie(e,t),er(e,t)}function er(e,t){let r=e.nodes().find(i=>!e.node(i).parent);if(!r)return;let n=Qt(e,[r]);n=n.slice(1),n.forEach(i=>{let o=e.node(i).parent,s=t.edge(i,o),l=!1;s||(s=t.edge(o,i),l=!0),t.node(i).rank=t.node(o).rank+(l?s.minlen:-s.minlen)})}function tr(e,t,r){return e.hasEdge(t,r)}function he(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var rr=nr;function nr(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":ce(e);break;case"tight-tree":or(e);break;case"longest-path":ir(e);break;case"none":break;default:ce(e)}}var ir=ne;function or(e){ne(e),De(e)}function ce(e){Ht(e)}var sr=lr;function lr(e){let t=ar(e),r=e.graph();Array.isArray(r.dummyChains)&&r.dummyChains.forEach(n=>{let i=e.node(n),o=i.edgeObj,s=dr(e,t,o.v,o.w),l=s.path,a=s.lca,d=0,u=l[d],h=!0;for(;n!==o.w;){if(i=e.node(n),h){for(;(u=l[d])!==a&&e.node(u).maxRank<i.rank;)d++;u===a&&(h=!1)}if(!h){for(;d<l.length-1&&e.node(l[d+1]).minRank<=i.rank;)d++;u=l[d]}u!==void 0&&e.setParent(n,u),n=e.successors(n)[0]}})}function dr(e,t,r,n){let i=[],o=[],s=Math.min(t[r].low,t[n].low),l=Math.max(t[r].lim,t[n].lim),a;a=r;do a=e.parent(a),i.push(a);while(a&&(t[a].low>s||l>t[a].lim));let d=a,u=n;for(;(u=e.parent(u))!==d;)o.push(u);return{path:i.concat(o.reverse()),lca:d}}function ar(e){let t={},r=0;function n(i){let o=r;e.children(i).forEach(n),t[i]={low:o,lim:r++}}return e.children(X).forEach(n),t}function ur(e){let t=Y(e,"root",{},"_root"),r=hr(e),n=Object.values(r),i=T(Math.max,n)-1,o=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=o);let s=cr(e)+1;e.children(X).forEach(l=>{ze(e,t,o,s,i,r,l)}),e.graph().nodeRankFactor=o}function ze(e,t,r,n,i,o,s){var l;let a=e.children(s);if(!a.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}let d=ae(e,"_bt"),u=ae(e,"_bb"),h=e.node(s);e.setParent(d,s),h.borderTop=d,e.setParent(u,s),h.borderBottom=u,a.forEach(c=>{var f;ze(e,t,r,n,i,o,c);let p=e.node(c),b=p.borderTop?p.borderTop:c,y=p.borderBottom?p.borderBottom:c,w=p.borderTop?n:2*n,g=b!==y?1:i-((f=o[s])!=null?f:0)+1;e.setEdge(d,b,{weight:w,minlen:g,nestingEdge:!0}),e.setEdge(y,u,{weight:w,minlen:g,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,d,{weight:0,minlen:i+((l=o[s])!=null?l:0)})}function hr(e){let t={};function r(n,i){let o=e.children(n);o&&o.length&&o.forEach(s=>r(s,i+1)),t[n]=i}return e.children(X).forEach(n=>r(n,1)),t}function cr(e){return e.edges().reduce((t,r)=>t+e.edge(r).weight,0)}function fr(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(r=>{e.edge(r).nestingEdge&&e.removeEdge(r)})}var gr=pr;function pr(e){function t(r){let n=e.children(r),i=e.node(r);if(n.length&&n.forEach(t),i&&Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let o=i.minRank,s=i.maxRank+1;o<s;++o)fe(e,"borderLeft","_bl",r,i,o),fe(e,"borderRight","_br",r,i,o)}}e.children(X).forEach(t)}function fe(e,t,r,n,i,o){let s={width:0,height:0,rank:o,borderType:t},l=i[t][o-1],a=Y(e,"border",s,r);i[t][o]=a,e.setParent(a,n),l&&e.setEdge(l,a,{weight:1})}function vr(e){var t;let r=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(r==="lr"||r==="rl")&&qe(e)}function mr(e){var t;let r=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(r==="bt"||r==="rl")&&wr(e),(r==="lr"||r==="rl")&&(Er(e),qe(e))}function qe(e){e.nodes().forEach(t=>ge(e.node(t))),e.edges().forEach(t=>ge(e.edge(t)))}function ge(e){let t=e.width;e.width=e.height,e.height=t}function wr(e){e.nodes().forEach(t=>K(e.node(t))),e.edges().forEach(t=>{var r;let n=e.edge(t);(r=n.points)==null||r.forEach(K),Object.hasOwn(n,"y")&&K(n)})}function K(e){e.y=-e.y}function Er(e){e.nodes().forEach(t=>Q(e.node(t))),e.edges().forEach(t=>{var r;let n=e.edge(t);(r=n.points)==null||r.forEach(Q),Object.hasOwn(n,"x")&&Q(n)})}function Q(e){let t=e.x;e.x=e.y,e.y=t}function br(e,t=null){let r={},n=e.nodes().filter(d=>!e.children(d).length),i=n.map(d=>e.node(d).rank),o=T(Math.max,i),s=A(o+1).map(()=>[]);function l(d){if(r[d])return;r[d]=!0;let u=e.node(d);s[u.rank].push(d);let h=e.successors(d);h&&[...h].sort((c,f)=>a(c,f)).forEach(l)}n.sort((d,u)=>e.node(d).rank-e.node(u).rank).forEach(l);function a(d,u){let h=e.node(d),c=e.node(u);return Re(t,h,c)}return s}function yr(e,t){let r=0;for(let n=1;n<t.length;++n)r+=_r(e,t[n-1],t[n]);return r}function _r(e,t,r){let n=Mt(r,r.map((d,u)=>u)),i=t.flatMap(d=>{let u=e.outEdges(d);return u?u.map(h=>({pos:n[h.w],weight:e.edge(h).weight})).sort((h,c)=>h.pos-c.pos):[]}),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;o-=1;let l=new Array(s).fill(0),a=0;return i.forEach(d=>{let u=d.pos+o;l[u]+=d.weight;let h=0;for(;u>0;)u%2&&(h+=l[u+1]),u=u-1>>1,l[u]+=d.weight;a+=d.weight*h}),a}function kr(e,t=[]){return t.map(r=>{let n=e.inEdges(r);if(!n||!n.length)return{v:r};{let i=n.reduce((o,s)=>{let l=e.edge(s),a=e.node(s.v);return{sum:o.sum+l.weight*a.order,weight:o.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}})}function Or(e,t){let r={};e.forEach((i,o)=>{let s={indegree:0,in:[],out:[],vs:[i.v],i:o};i.barycenter!==void 0&&(s.barycenter=i.barycenter,s.weight=i.weight),r[i.v]=s}),t.edges().forEach(i=>{let o=r[i.v],s=r[i.w];o!==void 0&&s!==void 0&&(s.indegree++,o.out.push(s))});let n=Object.values(r).filter(i=>!i.indegree);return Nr(n)}function Nr(e){let t=[];function r(i){return o=>{o.merged||(o.barycenter===void 0||i.barycenter===void 0||o.barycenter>=i.barycenter)&&xr(i,o)}}function n(i){return o=>{o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(r(i)),i.out.forEach(n(i))}return t.filter(i=>!i.merged).map(i=>z(i,["vs","i","barycenter","weight"]))}function xr(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}function jr(e,t,r,n,i){let o={},s=null,l=null,a=i;typeof t=="boolean"?(a=t,o={}):t&&(o=t,s=r??null,l=n??null);let d=jt(e,w=>Object.hasOwn(w,"barycenter")),u=d.lhs,h=d.rhs.sort((w,g)=>g.i-w.i),c=[],f=0,p=0,b=0;u.sort(Ir(l,s,!!a));for(let[w,g]of Object.entries(o)){let v=u.findIndex(m=>m.vs[0]===w);u.splice(v+1,0,g)}b=pe(c,h,b),u.forEach(w=>{b+=w.vs.length,c.push(w.vs),f+=w.barycenter*w.weight,p+=w.weight,b=pe(c,h,b)});let y={vs:c.flat(1)};return p&&(y.barycenter=f/p,y.weight=p),y}function pe(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Ir(e,t,r){return(n,i)=>{if(n.barycenter<i.barycenter)return-1;if(n.barycenter>i.barycenter)return 1;if(e&&(typeof n.vs[0]=="string"||typeof i.vs[0]=="string")){let o=e.node(n.vs[0]),s=e.node(i.vs[0]),l=Re(t,o,s);if(l!==0)return l}return r?i.i-n.i:n.i-i.i}}function $e(e,t,r,n,i){var o,s,l,a,d,u,h,c,f,p,b;let y=null,w=i;typeof n=="boolean"?(w=n,y=null):n!==void 0&&(y=n);let g=e.children(t),v=e.node(t),m=v?v.borderLeft:void 0,E=v?v.borderRight:void 0,N={};m&&(g=g.filter(O=>O!==m&&O!==E));let L=kr(e,g);L.forEach(O=>{if(e.children(O.v).length){let{result:I}=$e(e,O.v,r,y,w);N[O.v]=I,Object.hasOwn(I,"barycenter")&&Mr(O,I)}});let _=Or(L,r);Cr(_,N);let M={},S=!1;for(let O=0;O<_.length;O++)for(let I=O+1;I<_.length;I++)if(!(!_[O]||!_[I]||!((o=_[O])!=null&&o.barycenter)||!((s=_[I])!=null&&s.barycenter))&&((l=_[O])==null?void 0:l.barycenter)===_[I].barycenter){let x=(d=(a=_[O])==null?void 0:a.vs[0])!=null?d:"",k=(h=(u=_[I])==null?void 0:u.vs[0])!=null?h:"",C=e.node(x),R=e.node(k);if(C.dummy==="edge"&&R.dummy==="edge"&&((c=C.edgeObj)==null?void 0:c.v)===((f=R.edgeObj)==null?void 0:f.v)&&((p=C.edgeObj)==null?void 0:p.w)===((b=R.edgeObj)==null?void 0:b.w))if(C.edgeLabel.reversed){M[k]=_[O],_.splice(O,1),O--;break}else M[x]=_[I],_.splice(I,1),I--;else S=!0}let j=jr(_,M,y,e,w);if(m&&E){j.vs=[m,j.vs,E].flat(1);let O=e.predecessors(m);if(O&&O.length){let I=e.node(O[0]),x=e.predecessors(E),k=e.node(x[0]);Object.hasOwn(j,"barycenter")||(j.barycenter=0,j.weight=0),j.barycenter=(j.barycenter*j.weight+I.order+k.order)/(j.weight+2),j.weight+=2}}return Object.defineProperty(j,"result",{value:j,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(j,"usedBias",{value:S,enumerable:!1,configurable:!0,writable:!0}),j}function Cr(e,t){e.forEach(r=>{r.vs=r.vs.flatMap(n=>t[n]?t[n].vs:n)})}function Mr(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function Lr(e,t,r,n){n||(n=e.nodes());let i=Sr(e),o=new P({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(s=>e.node(s));return n.forEach(s=>{let l=e.node(s),a=e.parent(s);if(l.rank===t||l.minRank<=t&&t<=l.maxRank){o.setNode(s),o.setParent(s,a||i);let d=e[r](s);d&&d.forEach(u=>{let h=u.v===s?u.w:u.v,c=o.edge(h,s),f=c!==void 0?c.weight:0;o.setEdge(h,s,{weight:e.edge(u).weight+f})}),Object.hasOwn(l,"minRank")&&o.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]})}}),o}function Sr(e){let t;for(;e.hasNode(t=re("_root")););return t}function Tr(e,t,r){let n={},i;r.forEach(o=>{let s=e.parent(o),l,a;for(;s;){if(l=e.parent(s),l?(a=n[l],n[l]=s):(a=i,i=s),a&&a!==s){t.setEdge(a,s);return}s=l}})}function Xe(e,t={},r=null){if(typeof t.customOrder=="function"){t.customOrder(e,Xe);return}let n=Fe(e),i=ve(e,A(1,n+1),"inEdges"),o=ve(e,A(n-1,-1,-1),"outEdges"),s=br(e,r);if(me(e,s),t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,a,d=t.constraints||[];for(let u=0,h=0;h<4;++u,++h){Pr(u%2?i:o,u%4>=2,d,r),s=q(e);let c=yr(e,s);c<l?(h=0,a=Object.assign({},s),l=c):c===l&&(a=structuredClone(s))}me(e,a)}function ve(e,t,r){let n=new Map,i=(o,s)=>{n.has(o)||n.set(o,[]),n.get(o).push(s)};for(let o of e.nodes()){let s=e.node(o);if(typeof s.rank=="number"&&i(s.rank,o),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&i(l,o)}return t.map(function(o){return Lr(e,o,r,n.get(o)||[])})}function Pr(e,t,r,n){let i=!0,o=new P;e.forEach(function(s){r.forEach(u=>o.setEdge(u.left,u.right));let l=s.graph().root,{result:a,usedBias:d}=$e(s,l,o,n,i);t&&d&&(i=!i),a.vs.forEach((u,h)=>s.node(u).order=h),Tr(s,o,a.vs)})}function me(e,t){Object.values(t).forEach(r=>r.forEach((n,i)=>e.node(n).order=i))}function Fr(e,t){let r={};function n(i,o){let s=0,l=0,a=i.length,d=o[o.length-1];return o.forEach((u,h)=>{let c=Dr(e,u),f=c?e.node(c).order:a;(c||u===d)&&(o.slice(l,h+1).forEach(p=>{let b=e.predecessors(p);b&&b.forEach(y=>{let w=e.node(y),g=w.order;(g<s||f<g)&&!(w.dummy&&e.node(p).dummy)&&We(r,y,p)})}),l=h+1,s=f)}),o}return t.length&&t.reduce(n),r}function Rr(e,t){let r={};function n(o,s,l,a,d){A(s,l).forEach(u=>{let h=o[u];if(h!==void 0&&e.node(h).dummy){let c=e.predecessors(h);c&&c.forEach(f=>{if(f===void 0)return;let p=e.node(f);p.dummy&&(p.order<a||p.order>d)&&We(r,f,h)})}})}function i(o,s){let l=-1,a=-1,d=0;return s.forEach((u,h)=>{if(e.node(u).dummy==="border"){let c=e.predecessors(u);if(c&&c.length){let f=c[0];if(f===void 0)return;a=e.node(f).order,n(s,d,h,l,a),d=h,l=a}}n(s,d,s.length,a,o.length)}),s}return t.length&&t.reduce(i),r}function Dr(e,t){if(e.node(t).dummy){let r=e.predecessors(t);if(r)return r.find(n=>e.node(n).dummy)}}function We(e,t,r){if(t>r){let i=t;t=r,r=i}let n=e[t];n||(e[t]=n={}),n[r]=!0}function Yr(e,t,r){if(t>r){let i=t;t=r,r=i}let n=e[t];return n!==void 0&&Object.hasOwn(n,r)}function Vr(e,t,r,n,i){let o={},s={},l={};return t.forEach(a=>{a.forEach((d,u)=>{o[d]=d,s[d]=d,l[d]=u})}),t.forEach(a=>{let d=-1,u=-1,h=!1,c=a,f=a.findIndex(p=>i?.includes(p)||we(p,e,i));f>0&&(c=[a[f],...a.slice(0,f),...a.slice(f+1)],h=!0),c.forEach(p=>{var b;let y=n(p);if(y&&y.length){i!=null&&i.includes(p)&&(y=y.filter(v=>we(v,e,i)));let w=y.sort((v,m)=>{let E=l[v],N=l[m];return(E!==void 0?E:0)-(N!==void 0?N:0)}),g=(w.length-1)/2;for(let v=Math.floor(g),m=Math.ceil(g);v<=m;++v){let E=w[v];if(E===void 0)continue;let N=l[E];if(N!==void 0&&s[p]===p&&d<N&&l[E]!==u&&!Yr(r,p,E)){let L=o[E];L!==void 0&&(s[E]=p,s[p]=o[p]=L,d=N,h&&(d=-1,u=(b=l[E])!=null?b:-1,h=!1))}}}})}),{root:o,align:s}}function Ar(e,t,r,n,i=!1){let o={},s=Gr(e,t,r,i),l=i?"borderLeft":"borderRight";function a(f,p){let b=s.nodes().slice(),y={},w=b.pop();for(;w;){if(y[w])f(w);else{y[w]=!0,b.push(w);for(let g of p(w))b.push(g)}w=b.pop()}}function d(f){let p=s.inEdges(f);p?o[f]=p.reduce((b,y)=>{var w;let g=(w=o[y.v])!=null?w:0,v=s.edge(y);return Math.max(b,g+(v!==void 0?v:0))},0):o[f]=0}function u(f){let p=s.outEdges(f),b=Number.POSITIVE_INFINITY;p&&(b=p.reduce((w,g)=>{let v=o[g.w],m=s.edge(g);return Math.min(w,(v!==void 0?v:0)-(m!==void 0?m:0))},Number.POSITIVE_INFINITY));let y=e.node(f);b!==Number.POSITIVE_INFINITY&&y.borderType!==l&&(o[f]=Math.max(o[f]!==void 0?o[f]:0,b))}function h(f){return s.predecessors(f)||[]}function c(f){return s.successors(f)||[]}return a(d,h),a(u,c),Object.keys(n).forEach(f=>{var p;let b=r[f];b!==void 0&&(o[f]=(p=o[b])!=null?p:0)}),o}function Gr(e,t,r,n){let i=new P,o=e.graph(),s=Xr(o.nodesep,o.edgesep,n);return t.forEach(l=>{let a;l.forEach(d=>{let u=r[d];if(u!==void 0){if(i.setNode(u),a!==void 0){let h=r[a];if(h!==void 0){let c=i.edge(h,u);i.setEdge(h,u,Math.max(s(e,d,a),c||0))}}a=d}})}),i}function Br(e,t){return Object.values(t).reduce((r,n)=>{let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([l,a])=>{let d=Wr(e,l)/2;i=Math.max(a+d,i),o=Math.min(a-d,o)});let s=i-o;return s<r[0]&&(r=[s,n]),r},[Number.POSITIVE_INFINITY,null])[1]}function zr(e,t){let r=Object.values(t),n=T(Math.min,r),i=T(Math.max,r);["u","d"].forEach(o=>{["l","r"].forEach(s=>{let l=o+s,a=e[l];if(!a||a===t)return;let d=Object.values(a),u=n-T(Math.min,d);s!=="l"&&(u=i-T(Math.max,d)),u&&(e[l]=$(a,h=>h+u))})})}function qr(e,t=void 0){let r=e.ul;return r?$(r,(n,i)=>{var o,s;if(t){let a=t.toLowerCase(),d=e[a];if(d&&d[i]!==void 0)return d[i]}let l=Object.values(e).map(a=>{let d=a[i];return d!==void 0?d:0}).sort((a,d)=>a-d);return(((o=l[1])!=null?o:0)+((s=l[2])!=null?s:0))/2}):{}}function $r(e,t){let r=q(e),n=Object.assign(Fr(e,r),Rr(e,r)),i={},o;["u","d"].forEach(l=>{o=l==="u"?r:Object.values(r).reverse(),["l","r"].forEach(a=>{a==="r"&&(o=o.map(h=>Object.values(h).reverse()));let d=Vr(e,o,n,h=>(l==="u"?e.predecessors(h):e.successors(h))||[],t),u=Ar(e,o,d.root,d.align,a==="r");a==="r"&&(u=$(u,h=>-h)),i[l+a]=u})});let s=Br(e,i);return zr(i,s),qr(i,e.graph().align)}function Xr(e,t,r){return(n,i,o)=>{let s=n.node(i),l=n.node(o),a=0,d;if(a+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":d=-s.width/2;break;case"r":d=s.width/2;break}if(d&&(a+=r?d:-d),d=void 0,a+=(s.dummy?t:e)/2,a+=(l.dummy?t:e)/2,a+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":d=l.width/2;break;case"r":d=-l.width/2;break}return d&&(a+=r?d:-d),a}}function Wr(e,t){return e.node(t).width}function we(e,t,r){var n;if(!r)return!1;let i=(n=t.node(e))==null?void 0:n.edgeObj;if(!i||t.node(e).edgeLabel.reversed)return!1;let o=r.indexOf(i?.v),s=r.indexOf(i?.w);return o!==-1&&s!==-1&&o===(s+1)%r.length||o===(s-1)%r.length}function Jr(e,t){e=Te(e),Kr(e),Object.entries($r(e,t)).forEach(([r,n])=>e.node(r).x=n)}function Kr(e){let t=q(e),r=e.graph(),n=r.ranksep,i=r.rankalign,o=0;t.forEach(s=>{let l=s.reduce((a,d)=>{var u;let h=(u=e.node(d).height)!=null?u:0;return a>h?a:h},0);s.forEach(a=>{let d=e.node(a);i==="top"?d.y=o+d.height/2:i==="bottom"?d.y=o+l-d.height/2:d.y=o+l/2}),o+=l+n})}var Ee=new WeakMap;function vn(e,t={}){return Je(e,It,t),e}function be(e,t,r){let n=t;for(;n!==void 0;){let i=e.parent(n);if(i===r)return n;n=i}}function Je(e,t,r){var n;let i=e.nodes().filter(g=>e.children(g).length),o={};i.forEach(g=>{let v=e.node(g);if(v&&v.rankdir){let m=new P({multigraph:!0,compound:!0});m.setGraph({rankdir:v.rankdir});let E=e.children(g);E.forEach(x=>{let k={...e.node(x)};m.setNode(x,k);let C=e.parent(x);C&&C!==g&&E.includes(C)&&m.setParent(x,C)});let N=new Set;e.edges().forEach(x=>{let k=be(e,x.v,g),C=be(e,x.w,g);if(k&&C&&k!==C){let R=`${k}\0${C}`;N.has(R)||(N.add(R),m.setEdge(k,C,{...e.edge(x)}))}}),Je(m,t,r);let L=Oe(m);ye(L,t,r,null),_e(m,L);let _=1/0,M=1/0,S=-1/0,j=-1/0;m.nodes().forEach(x=>{if(x===g)return;let k=m.node(x);k&&typeof k.x=="number"&&typeof k.y=="number"&&typeof k.width=="number"&&typeof k.height=="number"&&(_=Math.min(_,k.x-k.width/2),S=Math.max(S,k.x+k.width/2),M=Math.min(M,k.y-k.height/2),j=Math.max(j,k.y+k.height/2))}),(!isFinite(_)||!isFinite(M)||!isFinite(S)||!isFinite(j))&&(_=M=0,S=j=0);let O=S-_,I=j-M;o[g]={minX:_,minY:M,maxX:S,maxY:j,width:O,height:I,offsetX:_,offsetY:M},v._dagreClusterSubgraph=m}});let s=[],l=g=>{let v=[],m=(e.children(g)||[]).filter(E=>E!==g);for(;m.length>0;){let E=m.shift();v.push(E),(e.children(E)||[]).filter(N=>N!==E).forEach(N=>m.push(N))}return v},a=new Map;i.forEach(g=>{let v=e.node(g);v&&v.rankdir&&o[g]&&a.set(g,(e.children(g)||[]).filter(m=>m!==g))});let d=new Set([...a.values()].flat()),u=new Map;a.forEach((g,v)=>{d.has(v)||u.set(v,l(v))});let h=new Set([...u.values()].flat()),c=g=>{for(let[v,m]of u)if(m.includes(g))return v;return g},f=[];e.edges().forEach(g=>{(h.has(g.v)||h.has(g.w))&&f.push({edge:g,label:e.edge(g)})});let p=new Map;h.forEach(g=>{let v=e.parent(g);p.set(g,typeof v=="string"?v:void 0)}),u.forEach((g,v)=>{let m=e.node(v),E=[];g.forEach(_=>{let M=e.node(_);M&&(E.push({id:_,node:M,parent:p.get(_)}),e.removeNode(_))});let N=f.filter(({edge:_})=>g.includes(_.v)||g.includes(_.w)),L=o[v];m&&(s.push({clusterId:v,subgraph:m._dagreClusterSubgraph,bounds:L,children:g,removedNodes:E,removedEdges:N}),m.width=L.width,m.height=L.height)});let b=new Set;f.forEach(({edge:g,label:v})=>{let m=c(g.v),E=c(g.w);if(m!==E&&e.hasNode(m)&&e.hasNode(E)){let N=`${m}\0${E}`;b.has(N)||(b.add(N),e.setEdge(m,E,{...v,width:0,height:0}))}});let y=Oe(e),w=ye(y,t,r,(n=Ee.get(e))!=null?n:null);Ee.set(e,w),_e(e,y),b.forEach(g=>{let v=g.indexOf("\0"),m=g.slice(0,v),E=g.slice(v+1);e.hasEdge(m,E)&&e.removeEdge(m,E)}),s.forEach(({clusterId:g,subgraph:v,bounds:m,removedNodes:E,removedEdges:N})=>{var L,_;let M=e.node(g),S=(L=M?.x)!=null?L:0,j=(_=M?.y)!=null?_:0,O=(m.minX+m.maxX)/2,I=(m.minY+m.maxY)/2;E.forEach(({id:x,node:k,parent:C})=>{e.setNode(x,k),C!==void 0&&e.setParent(x,C)}),N.forEach(({edge:x,label:k})=>{e.setEdge(x,k)}),v.nodes().forEach(x=>{if(x===g)return;let k=v.node(x),C=e.node(x);C&&k&&typeof k.x=="number"&&typeof k.y=="number"&&(C.x=S+(k.x-O),C.y=j+(k.y-I))}),delete M._dagreClusterSubgraph}),i.forEach(g=>{var v,m;let E=e.node(g),N=o[g];if(E&&E.rankdir&&E._dagreClusterSubgraph&&N){let L=E._dagreClusterSubgraph,_=(v=E.x)!=null?v:0,M=(m=E.y)!=null?m:0,S=(N.minX+N.maxX)/2,j=(N.minY+N.maxY)/2;L.nodes().forEach(O=>{if(O===g)return;let I=L.node(O),x=e.node(O);if(x&&I&&typeof I.x=="number"&&typeof I.y=="number"){let k=I.x-S,C=I.y-j;x.x=_+k,x.y=M+C}}),delete E._dagreClusterSubgraph}})}function ye(e,t,r,n=null){var i,o;let s=r?.useDynamic!==!1,l=s&&(i=n?.graph)!=null?i:null,a=s&&(o=n?.rawNodes)!=null?o:null;t(" makeSpaceForEdgeLabels",()=>nn(e)),t(" removeSelfEdges",()=>fn(e)),t(" acyclic",()=>Vt(e,l)),t(" nestingGraph.run",()=>ur(e)),t(" rank",()=>rr(Te(e))),t(" injectEdgeLabelProxies",()=>on(e)),t(" removeEmptyRanks",()=>Nt(e)),t(" nestingGraph.cleanup",()=>fr(e)),t(" normalizeRanks",()=>Ot(e)),t(" assignRankMinMax",()=>sn(e)),t(" removeEdgeLabelProxies",()=>ln(e)),t(" normalize.run",()=>zt(e)),t(" parentDummyChains",()=>sr(e)),t(" addBorderSegments",()=>gr(e)),t(" order",()=>Xe(e,r,a)),t(" insertSelfEdges",()=>gn(e)),t(" adjustCoordinateSystem",()=>vr(e)),t(" position",()=>Jr(e,r.corePath)),t(" positionSelfEdges",()=>pn(e));let d=JSON.parse(JSON.stringify(e._nodes));return t(" removeBorderNodes",()=>cn(e)),t(" normalize.undo",()=>$t(e)),t(" fixupEdgeLabelCoords",()=>un(e)),t(" undoCoordinateSystem",()=>mr(e)),t(" translateGraph",()=>dn(e)),t(" assignNodeIntersects",()=>an(e)),t(" reversePoints",()=>hn(e)),t(" acyclic.undo",()=>Gt(e)),{graph:e,rawNodes:d}}function _e(e,t){e.nodes().forEach(r=>{let n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,n.order=i.order,n.rank=i.rank,t.children(r).length&&(n.width=i.width,n.height=i.height))}),e.edges().forEach(r=>{let n=e.edge(r),i=t.edge(r);n.points=i.points,Object.hasOwn(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Qr=["nodesep","edgesep","ranksep","marginx","marginy"],Ur={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},Hr=["acyclicer","ranker","rankdir","align","rankalign"],Zr=["width","height","rank"],ke={width:0,height:0},en=["minlen","weight","width","height","labeloffset"],tn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rn=["labelpos"];function Oe(e){let t=new P({multigraph:!0,compound:!0}),r=H(e.graph());return t.setGraph(Object.assign({},Ur,U(r,Qr),z(r,Hr))),e.nodes().forEach(n=>{let i=H(e.node(n)),o=U(i,Zr);Object.keys(ke).forEach(l=>{o[l]===void 0&&(o[l]=ke[l])}),t.setNode(n,o);let s=e.parent(n);s!==void 0&&t.setParent(n,s)}),e.edges().forEach(n=>{let i=H(e.edge(n));t.setEdge(n,Object.assign({},tn,U(i,en),z(i,rn)))}),t}function nn(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(r=>{var n;let i=e.edge(r);i.minlen*=2,((n=i.labelpos)!=null?n:"r").toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function on(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.width&&r.height){let n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};Y(e,"edge-proxy",i,"_ep")}})}function sn(e){let t=0;e.nodes().forEach(r=>{let n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank))}),e.graph().maxRank=t}function ln(e){e.nodes().forEach(t=>{let r=e.node(t);if(r.dummy==="edge-proxy"){let n=r;e.edge(n.e).labelRank=r.rank,e.removeNode(t)}})}function dn(e){let t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),s=o.marginx||0,l=o.marginy||0;function a(d){let u=d.x,h=d.y,c=d.width,f=d.height;t=Math.min(t,u-c/2),r=Math.max(r,u+c/2),n=Math.min(n,h-f/2),i=Math.max(i,h+f/2)}e.nodes().forEach(d=>a(e.node(d))),e.edges().forEach(d=>{let u=e.edge(d);Object.hasOwn(u,"x")&&a(u)}),t-=s,n-=l,e.nodes().forEach(d=>{let u=e.node(d);u.x-=t,u.y-=n}),e.edges().forEach(d=>{let u=e.edge(d);u.points.forEach(h=>{h.x-=t,h.y-=n}),Object.hasOwn(u,"x")&&(u.x-=t),Object.hasOwn(u,"y")&&(u.y-=n)}),o.width=r-t+s,o.height=i-n+l}function an(e){e.edges().forEach(t=>{if(t.v===t.w)return;let r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,s;r.points?(o=r.points[0],s=r.points[r.points.length-1]):(r.points=[],o=i,s=n),r.points.unshift(de(n,o)),r.points.push(de(i,s))})}function un(e){e.edges().forEach(t=>{let r=e.edge(t);if(Object.hasOwn(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function hn(e){e.edges().forEach(t=>{let r=e.edge(t);r.reversed&&r.points.reverse()})}function cn(e){e.nodes().forEach(t=>{if(e.children(t).length){let r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(r.borderLeft[r.borderLeft.length-1]),s=e.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(s.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function fn(e){e.edges().forEach(t=>{if(t.v===t.w){let r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function gn(e){q(e).forEach(t=>{let r=0;t.forEach((n,i)=>{let o=e.node(n);typeof o.rank!="number"&&(o.rank=0),o.order=i+r,(o.selfEdges||[]).forEach(s=>{Y(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:i+ ++r,e:s.e,edgeLabel:s.label},"_se"),(!Array.isArray(s.label.points)||s.label.points.length!==7)&&(s.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete o.selfEdges})})}function pn(e){e.nodes().forEach(t=>{let r=e.node(t),n=i=>typeof i=="number"&&isFinite(i);if(r.dummy==="selfedge"){let i=r,o=e.node(i.e.v),s=n(o?.x)?o.x:0,l=n(o?.y)?o.y:0,a=n(o?.width)?o.width:0,d=n(o?.height)?o.height:0,u=n(r.x)?r.x:s,h=n(r.y)?r.y:l,c=a/2,f=d/2;i.edgeLabel.points=[{x:u+c,y:h-f},{x:u+c,y:h-f},{x:u,y:h},{x:u-c,y:h+f},{x:u-c,y:h+f},{x:u,y:h},{x:u,y:h}],i.edgeLabel.x=u,i.edgeLabel.y=h,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else r&&Array.isArray(r.selfEdges)&&r.selfEdges.forEach(i=>{if(!Array.isArray(i.label.points)||i.label.points.length!==7){let o=n(r.x)?r.x:0,s=n(r.y)?r.y:0,l=n(r.width)?r.width:0,a=n(r.height)?r.height:0,d=l/2,u=a/2;i.label.points=[{x:o+d,y:s-u},{x:o+d,y:s-u},{x:o,y:s},{x:o-d,y:s+u},{x:o-d,y:s+u},{x:o,y:s},{x:o,y:s}]}})})}function U(e,t){return $(z(e,t),Number)}function H(e){let t={};return e&&Object.entries(e).forEach(([r,n])=>{typeof r=="string"&&(r=r.toLowerCase()),t[r]=n}),t}export{He as a,vn as b};
2
+ /*! For license information please see chunk-5CTTY5BQ.js.LEGAL.txt */