@superlc/md-core 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/_baseUniq-BfzcfZ4T.cjs +1 -0
  2. package/dist/_baseUniq-Y3ulau-C.js +477 -0
  3. package/dist/arc-Be_AVKBg.cjs +1 -0
  4. package/dist/arc-Ca7Zrknn.js +83 -0
  5. package/dist/architectureDiagram-VXUJARFQ-4Jx44yBn.cjs +36 -0
  6. package/dist/architectureDiagram-VXUJARFQ-DJeUU_qv.js +4665 -0
  7. package/dist/blockDiagram-VD42YOAC-BimcGKKd.cjs +122 -0
  8. package/dist/blockDiagram-VD42YOAC-D-giXjw6.js +2265 -0
  9. package/dist/c4Diagram-YG6GDRKO-Bl9iUUVb.cjs +10 -0
  10. package/dist/c4Diagram-YG6GDRKO-YxTtvGWw.js +1581 -0
  11. package/dist/channel-DOU_t-A5.js +5 -0
  12. package/dist/channel-DzR_mTuG.cjs +1 -0
  13. package/dist/chunk-4BX2VUAB-BT8x_a4k.cjs +1 -0
  14. package/dist/chunk-4BX2VUAB-qWjx6fvp.js +9 -0
  15. package/dist/chunk-55IACEB6-DRmMNyi7.js +8 -0
  16. package/dist/chunk-55IACEB6-DfzR1I2i.cjs +1 -0
  17. package/dist/chunk-B4BG7PRW-B4vBwkd7.js +1376 -0
  18. package/dist/chunk-B4BG7PRW-k_Ki7ZYa.cjs +165 -0
  19. package/dist/chunk-DI55MBZ5-67zt7BEa.cjs +220 -0
  20. package/dist/chunk-DI55MBZ5-B-Akunv8.js +1382 -0
  21. package/dist/chunk-FMBD7UC4-D-gJ-PKq.cjs +15 -0
  22. package/dist/chunk-FMBD7UC4-D1foMA2H.js +19 -0
  23. package/dist/chunk-QN33PNHL-DBsOH5IO.cjs +1 -0
  24. package/dist/chunk-QN33PNHL-DpeYRHMx.js +20 -0
  25. package/dist/chunk-QZHKN3VN-CWmChvMD.cjs +1 -0
  26. package/dist/chunk-QZHKN3VN-CoINyXCe.js +15 -0
  27. package/dist/chunk-TZMSLE5B-CMo-Qyqp.js +64 -0
  28. package/dist/chunk-TZMSLE5B-Psc_3Gkx.cjs +1 -0
  29. package/dist/classDiagram-2ON5EDUG-BrNHAA-E.js +16 -0
  30. package/dist/classDiagram-2ON5EDUG-CA1gbIW7.cjs +1 -0
  31. package/dist/classDiagram-v2-WZHVMYZB-BrNHAA-E.js +16 -0
  32. package/dist/classDiagram-v2-WZHVMYZB-CA1gbIW7.cjs +1 -0
  33. package/dist/clone-BOyua0mT.js +8 -0
  34. package/dist/clone-D7Rx0g6P.cjs +1 -0
  35. package/dist/cose-bilkent-S5V4N54A-BBcnamAX.cjs +1 -0
  36. package/dist/cose-bilkent-S5V4N54A-xbHM31av.js +2605 -0
  37. package/dist/cytoscape.esm-DkGgpG6d.cjs +331 -0
  38. package/dist/cytoscape.esm-ZmItrg9y.js +18731 -0
  39. package/dist/dagre-6UL2VRFP-B5ZJ9Mmw.cjs +4 -0
  40. package/dist/dagre-6UL2VRFP-lY6fElcy.js +446 -0
  41. package/dist/defaultLocale-BgPVtth8.js +171 -0
  42. package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
  43. package/dist/diagram-PSM6KHXK-DOgpThfE.js +534 -0
  44. package/dist/diagram-PSM6KHXK-NUCrGNCX.cjs +24 -0
  45. package/dist/diagram-QEK2KX5R-CKpcqpBk.js +221 -0
  46. package/dist/diagram-QEK2KX5R-P-pWAYvp.cjs +43 -0
  47. package/dist/diagram-S2PKOQOG-B4PYQerv.cjs +24 -0
  48. package/dist/diagram-S2PKOQOG-CZn9lft8.js +143 -0
  49. package/dist/erDiagram-Q2GNP2WA-D6UL-dgf.js +842 -0
  50. package/dist/erDiagram-Q2GNP2WA-DwYOfnOX.cjs +60 -0
  51. package/dist/flowDiagram-NV44I4VS-BvuqC7lR.cjs +162 -0
  52. package/dist/flowDiagram-NV44I4VS-YPdRK_ji.js +1627 -0
  53. package/dist/ganttDiagram-JELNMOA3-CGnvf7yj.js +2662 -0
  54. package/dist/ganttDiagram-JELNMOA3-wbYrtCNf.cjs +267 -0
  55. package/dist/gitGraphDiagram-NY62KEGX-BnpFLmUy.js +712 -0
  56. package/dist/gitGraphDiagram-NY62KEGX-BzlCJL63.cjs +65 -0
  57. package/dist/graph-Bv0JC_B1.cjs +1 -0
  58. package/dist/graph-DwDboYRQ.js +381 -0
  59. package/dist/index-A-U0gtM4.js +15167 -0
  60. package/dist/index-BC30feOR.cjs +300 -0
  61. package/dist/index.cjs +1 -300
  62. package/dist/index.d.ts +2 -0
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +27 -14816
  65. package/dist/infoDiagram-WHAUD3N6-CPFFyZEz.cjs +2 -0
  66. package/dist/infoDiagram-WHAUD3N6-DF-Kn4KW.js +24 -0
  67. package/dist/init-CHZsXQcr.cjs +1 -0
  68. package/dist/init-DjUOC4st.js +16 -0
  69. package/dist/journeyDiagram-XKPGCS4Q-Bc3YJVQN.cjs +139 -0
  70. package/dist/journeyDiagram-XKPGCS4Q-CqUVbDan.js +836 -0
  71. package/dist/kanban-definition-3W4ZIXB7-BKxpdlfe.cjs +89 -0
  72. package/dist/kanban-definition-3W4ZIXB7-Zx7cVnZF.js +720 -0
  73. package/dist/layout-CrdknE74.js +1441 -0
  74. package/dist/layout-y4Mby5BC.cjs +1 -0
  75. package/dist/linear-D_NLLphh.cjs +1 -0
  76. package/dist/linear-Fqu_aevY.js +259 -0
  77. package/dist/mermaid/darkMode.d.ts +54 -0
  78. package/dist/mermaid/darkMode.d.ts.map +1 -0
  79. package/dist/mermaid/download.d.ts +27 -0
  80. package/dist/mermaid/download.d.ts.map +1 -0
  81. package/dist/mermaid/index.d.ts +9 -0
  82. package/dist/mermaid/index.d.ts.map +1 -0
  83. package/dist/mermaid/renderer.d.ts +36 -0
  84. package/dist/mermaid/renderer.d.ts.map +1 -0
  85. package/dist/mermaid/themes.d.ts +17 -0
  86. package/dist/mermaid/themes.d.ts.map +1 -0
  87. package/dist/mermaid/types.d.ts +117 -0
  88. package/dist/mermaid/types.d.ts.map +1 -0
  89. package/dist/mermaid.core-Buzus1hw.js +15321 -0
  90. package/dist/mermaid.core-CCMj67LO.cjs +255 -0
  91. package/dist/min-BNEwgiip.js +38 -0
  92. package/dist/min-CxfddLJo.cjs +1 -0
  93. package/dist/mindmap-definition-VGOIOE7T-C3sZAv1n.js +786 -0
  94. package/dist/mindmap-definition-VGOIOE7T-Cq9KhFIU.cjs +68 -0
  95. package/dist/ordinal-CagbB1m8.cjs +1 -0
  96. package/dist/ordinal-DfAQgscy.js +61 -0
  97. package/dist/pieDiagram-ADFJNKIX-Bib4GVaz.js +161 -0
  98. package/dist/pieDiagram-ADFJNKIX-CPJ4LdHJ.cjs +30 -0
  99. package/dist/quadrantDiagram-AYHSOK5B-Bw4qbzaI.js +1024 -0
  100. package/dist/quadrantDiagram-AYHSOK5B-Dldq3aFV.cjs +7 -0
  101. package/dist/requirementDiagram-UZGBJVZJ-BiMT5LBm.cjs +64 -0
  102. package/dist/requirementDiagram-UZGBJVZJ-DKt5E9D5.js +852 -0
  103. package/dist/sankeyDiagram-TZEHDZUN-BvqABFTj.cjs +10 -0
  104. package/dist/sankeyDiagram-TZEHDZUN-DPexJVr0.js +810 -0
  105. package/dist/sequenceDiagram-WL72ISMW-JcPuIgsZ.cjs +145 -0
  106. package/dist/sequenceDiagram-WL72ISMW-rx65Aq7k.js +2518 -0
  107. package/dist/stateDiagram-FKZM4ZOC-5jwz-EhH.cjs +1 -0
  108. package/dist/stateDiagram-FKZM4ZOC-D95elPzf.js +263 -0
  109. package/dist/stateDiagram-v2-4FDKWEC3-DKxcP1od.cjs +1 -0
  110. package/dist/stateDiagram-v2-4FDKWEC3-U8OyZJcH.js +16 -0
  111. package/dist/styles.css +370 -0
  112. package/dist/timeline-definition-IT6M3QCI-C_aFXPzu.cjs +61 -0
  113. package/dist/timeline-definition-IT6M3QCI-DzBIcxIH.js +801 -0
  114. package/dist/treemap-KMMF4GRG-CqQBq3TE.js +14157 -0
  115. package/dist/treemap-KMMF4GRG-DJHv4WOZ.cjs +128 -0
  116. package/dist/xychartDiagram-PRI3JC2R-M2dUh85s.cjs +7 -0
  117. package/dist/xychartDiagram-PRI3JC2R-ZNBNeiJf.js +1340 -0
  118. package/package.json +14 -10
package/dist/styles.css CHANGED
@@ -514,9 +514,379 @@
514
514
  color: inherit;
515
515
  }
516
516
 
517
+ /* ========================================
518
+ 代码块复制按钮
519
+ ======================================== */
520
+ :root,
521
+ .md-light {
522
+ --md-copy-button-bg: rgba(0, 0, 0, 0.05);
523
+ --md-copy-button-bg-hover: rgba(0, 0, 0, 0.1);
524
+ --md-copy-button-color: var(--md-color-text-muted);
525
+ --md-copy-button-color-hover: var(--md-color-text);
526
+ --md-copy-button-success: #22c55e;
527
+ }
528
+
529
+ @media (prefers-color-scheme: dark) {
530
+ :root:not(.md-light) {
531
+ --md-copy-button-bg: rgba(255, 255, 255, 0.1);
532
+ --md-copy-button-bg-hover: rgba(255, 255, 255, 0.2);
533
+ --md-copy-button-color: var(--md-color-text-muted);
534
+ --md-copy-button-color-hover: var(--md-color-text);
535
+ --md-copy-button-success: #22c55e;
536
+ }
537
+ }
538
+
539
+ .md-dark {
540
+ --md-copy-button-bg: rgba(255, 255, 255, 0.1);
541
+ --md-copy-button-bg-hover: rgba(255, 255, 255, 0.2);
542
+ --md-copy-button-color: var(--md-color-text-muted);
543
+ --md-copy-button-color-hover: var(--md-color-text);
544
+ --md-copy-button-success: #22c55e;
545
+ }
546
+
547
+ .md-code-block-wrapper {
548
+ position: relative;
549
+ }
550
+
551
+ .md-code-block-wrapper pre {
552
+ margin: 0;
553
+ }
554
+
555
+ .md-copy-button {
556
+ position: absolute;
557
+ top: 8px;
558
+ right: 8px;
559
+ display: flex;
560
+ align-items: center;
561
+ justify-content: center;
562
+ width: 28px;
563
+ height: 28px;
564
+ padding: 0;
565
+ border: none;
566
+ border-radius: var(--md-radius-sm);
567
+ background-color: transparent;
568
+ color: var(--md-copy-button-color);
569
+ cursor: pointer;
570
+ opacity: 0.6;
571
+ transition: opacity 0.2s, background-color 0.2s, color 0.2s;
572
+ }
573
+
574
+ .md-copy-button:hover {
575
+ opacity: 1;
576
+ }
577
+
578
+ .md-copy-button:active {
579
+ transform: scale(0.95);
580
+ }
581
+
582
+ .md-copy-button--copied {
583
+ color: var(--md-copy-button-success);
584
+ }
585
+
586
+ .md-copy-button--copied:hover {
587
+ color: var(--md-copy-button-success);
588
+ }
589
+
590
+ .md-copy-button svg {
591
+ width: 14px;
592
+ height: 14px;
593
+ }
594
+
517
595
  /* ========================================
518
596
  KaTeX 错误样式覆盖
519
597
  ======================================== */
520
598
  .katex-error {
521
599
  color: inherit !important;
600
+ }
601
+
602
+ /* ========================================
603
+ Mermaid 图表块样式
604
+ ======================================== */
605
+
606
+ /* CSS 变量 - 浅色模式 */
607
+ :root,
608
+ .md-light {
609
+ --md-mermaid-bg: var(--md-color-bg-code-block);
610
+ --md-mermaid-border: var(--md-color-border);
611
+ --md-mermaid-toolbar-bg: rgba(0, 0, 0, 0.03);
612
+ --md-mermaid-toolbar-btn-bg: transparent;
613
+ --md-mermaid-toolbar-btn-bg-hover: rgba(0, 0, 0, 0.08);
614
+ --md-mermaid-toolbar-btn-bg-active: rgba(0, 0, 0, 0.12);
615
+ --md-mermaid-toolbar-btn-color: var(--md-color-text-muted);
616
+ --md-mermaid-toolbar-btn-color-hover: var(--md-color-text);
617
+ --md-mermaid-error-bg: rgba(239, 68, 68, 0.1);
618
+ --md-mermaid-error-color: #dc2626;
619
+ }
620
+
621
+ /* CSS 变量 - 暗黑模式 */
622
+ @media (prefers-color-scheme: dark) {
623
+ :root:not(.md-light) {
624
+ --md-mermaid-bg: var(--md-color-bg-code-block);
625
+ --md-mermaid-border: var(--md-color-border);
626
+ --md-mermaid-toolbar-bg: rgba(255, 255, 255, 0.05);
627
+ --md-mermaid-toolbar-btn-bg: transparent;
628
+ --md-mermaid-toolbar-btn-bg-hover: rgba(255, 255, 255, 0.1);
629
+ --md-mermaid-toolbar-btn-bg-active: rgba(255, 255, 255, 0.15);
630
+ --md-mermaid-toolbar-btn-color: var(--md-color-text-muted);
631
+ --md-mermaid-toolbar-btn-color-hover: var(--md-color-text);
632
+ --md-mermaid-error-bg: rgba(239, 68, 68, 0.15);
633
+ --md-mermaid-error-color: #f87171;
634
+ }
635
+ }
636
+
637
+ .md-dark {
638
+ --md-mermaid-bg: var(--md-color-bg-code-block);
639
+ --md-mermaid-border: var(--md-color-border);
640
+ --md-mermaid-toolbar-bg: rgba(255, 255, 255, 0.05);
641
+ --md-mermaid-toolbar-btn-bg: transparent;
642
+ --md-mermaid-toolbar-btn-bg-hover: rgba(255, 255, 255, 0.1);
643
+ --md-mermaid-toolbar-btn-bg-active: rgba(255, 255, 255, 0.15);
644
+ --md-mermaid-toolbar-btn-color: var(--md-color-text-muted);
645
+ --md-mermaid-toolbar-btn-color-hover: var(--md-color-text);
646
+ --md-mermaid-error-bg: rgba(239, 68, 68, 0.15);
647
+ --md-mermaid-error-color: #f87171;
648
+ }
649
+
650
+ /* Mermaid 块容器 */
651
+ .md-mermaid-block {
652
+ position: relative;
653
+ border-radius: var(--md-radius);
654
+ overflow: hidden;
655
+ border: 1px solid var(--md-mermaid-border);
656
+ background-color: var(--md-mermaid-bg);
657
+ }
658
+
659
+ /* Mermaid 工具栏 */
660
+ .md-mermaid-toolbar {
661
+ display: flex;
662
+ align-items: center;
663
+ justify-content: space-between;
664
+ padding: 6px 8px;
665
+ gap: 8px;
666
+ background-color: var(--md-mermaid-toolbar-bg);
667
+ border-bottom: 1px solid var(--md-mermaid-border);
668
+ }
669
+
670
+ .md-mermaid-toolbar-group {
671
+ display: flex;
672
+ align-items: center;
673
+ gap: 4px;
674
+ }
675
+
676
+ .md-mermaid-toolbar-divider {
677
+ width: 1px;
678
+ height: 16px;
679
+ background-color: var(--md-mermaid-border);
680
+ margin: 0 4px;
681
+ }
682
+
683
+ .md-mermaid-mode-switch {
684
+ background-color: var(--md-mermaid-toolbar-btn-bg-hover);
685
+ border-radius: var(--md-radius-sm);
686
+ padding: 2px;
687
+ }
688
+
689
+ /* 工具栏按钮 */
690
+ .md-mermaid-toolbar-btn {
691
+ display: flex;
692
+ align-items: center;
693
+ justify-content: center;
694
+ width: 28px;
695
+ height: 28px;
696
+ padding: 0;
697
+ border: none;
698
+ border-radius: var(--md-radius-sm);
699
+ background-color: var(--md-mermaid-toolbar-btn-bg);
700
+ color: var(--md-mermaid-toolbar-btn-color);
701
+ cursor: pointer;
702
+ transition: background-color 0.15s, color 0.15s;
703
+ }
704
+
705
+ .md-mermaid-toolbar-btn:hover:not(:disabled) {
706
+ background-color: var(--md-mermaid-toolbar-btn-bg-hover);
707
+ color: var(--md-mermaid-toolbar-btn-color-hover);
708
+ }
709
+
710
+ .md-mermaid-toolbar-btn:active:not(:disabled) {
711
+ background-color: var(--md-mermaid-toolbar-btn-bg-active);
712
+ }
713
+
714
+ .md-mermaid-toolbar-btn:disabled {
715
+ opacity: 0.4;
716
+ cursor: not-allowed;
717
+ }
718
+
719
+ .md-mermaid-toolbar-btn--active {
720
+ background-color: var(--md-mermaid-toolbar-btn-bg-active);
721
+ color: var(--md-mermaid-toolbar-btn-color-hover);
722
+ }
723
+
724
+ .md-mermaid-toolbar-btn--success {
725
+ color: var(--md-copy-button-success);
726
+ }
727
+
728
+ .md-mermaid-toolbar-btn--close:hover {
729
+ background-color: rgba(239, 68, 68, 0.2);
730
+ color: #ef4444;
731
+ }
732
+
733
+ .md-mermaid-toolbar-btn svg {
734
+ width: 16px;
735
+ height: 16px;
736
+ }
737
+
738
+ /* 缩放百分比标签 */
739
+ .md-mermaid-zoom-label {
740
+ min-width: 42px;
741
+ text-align: center;
742
+ font-size: 12px;
743
+ font-family: var(--md-font-family-mono);
744
+ color: var(--md-mermaid-toolbar-btn-color);
745
+ user-select: none;
746
+ }
747
+
748
+ /* Mermaid 内容区域 */
749
+ .md-mermaid-content {
750
+ position: relative;
751
+ min-height: 100px;
752
+ }
753
+
754
+ /* 预览模式 */
755
+ .md-mermaid-preview {
756
+ display: flex;
757
+ align-items: center;
758
+ justify-content: center;
759
+ padding: 16px;
760
+ min-height: 120px;
761
+ overflow: hidden;
762
+ }
763
+
764
+ .md-mermaid-svg-container {
765
+ display: flex;
766
+ align-items: center;
767
+ justify-content: center;
768
+ transform-origin: center center;
769
+ }
770
+
771
+ .md-mermaid-svg-container svg {
772
+ max-width: 100%;
773
+ height: auto;
774
+ }
775
+
776
+ /* 代码模式 */
777
+ .md-mermaid-code {
778
+ position: relative;
779
+ }
780
+
781
+ .md-mermaid-code pre {
782
+ margin: 0;
783
+ border-radius: 0;
784
+ background-color: var(--md-mermaid-bg);
785
+ }
786
+
787
+ .md-mermaid-code pre code {
788
+ color: var(--md-color-text);
789
+ }
790
+
791
+ /* 错误提示 */
792
+ .md-mermaid-error {
793
+ padding: 8px 12px;
794
+ font-size: 13px;
795
+ background-color: var(--md-mermaid-error-bg);
796
+ color: var(--md-mermaid-error-color);
797
+ border-top: 1px solid currentColor;
798
+ }
799
+
800
+ /* Loading 骨架屏 */
801
+ .md-mermaid-skeleton {
802
+ padding: 20px;
803
+ display: flex;
804
+ align-items: center;
805
+ justify-content: center;
806
+ }
807
+
808
+ .md-mermaid-skeleton-box {
809
+ width: 100%;
810
+ height: 150px;
811
+ background-color: var(--md-skeleton-bg);
812
+ background-image: linear-gradient(90deg, var(--md-skeleton-bg) 0%, var(--md-skeleton-shine) 50%, var(--md-skeleton-bg) 100%);
813
+ background-size: 200% 100%;
814
+ animation: md-image-shimmer 1.5s linear infinite;
815
+ border-radius: var(--md-radius);
816
+ }
817
+
818
+ /* ========================================
819
+ Mermaid 全屏查看器(使用浏览器原生全屏)
820
+ ======================================== */
821
+
822
+ /* 全屏容器 - 默认隐藏 */
823
+ .md-mermaid-fullscreen-wrapper {
824
+ display: none;
825
+ }
826
+
827
+ /* 全屏激活状态 - 作为全屏元素的根容器 */
828
+ .md-mermaid-fullscreen-wrapper--active {
829
+ display: flex;
830
+ flex-direction: column;
831
+ width: 100%;
832
+ height: 100%;
833
+ background-color: var(--md-color-bg, #ffffff);
834
+ }
835
+
836
+ /* 暗黑模式背景 */
837
+ @media (prefers-color-scheme: dark) {
838
+ :root:not(.md-light) .md-mermaid-fullscreen-wrapper--active {
839
+ background-color: var(--md-color-bg, #1a1a2e);
840
+ }
841
+ }
842
+
843
+ .md-dark .md-mermaid-fullscreen-wrapper--active,
844
+ :root.dark .md-mermaid-fullscreen-wrapper--active,
845
+ [data-theme="dark"] .md-mermaid-fullscreen-wrapper--active {
846
+ background-color: var(--md-color-bg, #1a1a2e);
847
+ }
848
+
849
+ /* 全屏工具栏 */
850
+ .md-mermaid-fullscreen-toolbar {
851
+ display: flex;
852
+ align-items: center;
853
+ justify-content: space-between;
854
+ padding: 12px 16px;
855
+ background-color: var(--md-mermaid-toolbar-bg);
856
+ border-bottom: 1px solid var(--md-mermaid-border);
857
+ }
858
+
859
+ .md-mermaid-fullscreen-toolbar .md-mermaid-toolbar-btn {
860
+ color: var(--md-mermaid-toolbar-btn-color);
861
+ }
862
+
863
+ .md-mermaid-fullscreen-toolbar .md-mermaid-toolbar-btn:hover:not(:disabled) {
864
+ background-color: var(--md-mermaid-toolbar-btn-bg-hover);
865
+ color: var(--md-mermaid-toolbar-btn-color-hover);
866
+ }
867
+
868
+ .md-mermaid-fullscreen-toolbar .md-mermaid-zoom-label {
869
+ color: var(--md-mermaid-toolbar-btn-color);
870
+ }
871
+
872
+ /* 全屏内容区域 */
873
+ .md-mermaid-fullscreen-content {
874
+ flex: 1;
875
+ display: flex;
876
+ align-items: center;
877
+ justify-content: center;
878
+ overflow: hidden;
879
+ padding: 24px;
880
+ }
881
+
882
+ .md-mermaid-fullscreen-svg {
883
+ display: flex;
884
+ align-items: center;
885
+ justify-content: center;
886
+ will-change: transform;
887
+ }
888
+
889
+ .md-mermaid-fullscreen-svg svg {
890
+ max-width: none;
891
+ max-height: none;
522
892
  }
@@ -0,0 +1,61 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./mermaid.core-CCMj67LO.cjs"),tt=require("./arc-Be_AVKBg.cjs");var K=function(){var r=n.__name(function(_,s,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=s);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],y=[1,16],f=[1,17],p={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:n.__name(function(s,a,h,u,g,o,S){var x=o.length-1;switch(g){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:u.addTask(o[x],0,""),this.$=o[x];break;case 16:u.addEvent(o[x].substr(2)),this.$=o[x];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},r(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,7],{1:[2,1]}),r(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,5]),r(t,[2,6]),r(t,[2,8]),{13:[1,19]},{15:[1,20]},r(t,[2,11]),r(t,[2,12]),r(t,[2,13]),r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,4]),r(t,[2,9]),r(t,[2,10])],defaultActions:{},parseError:n.__name(function(s,a){if(a.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=a,h}},"parseError"),parse:n.__name(function(s){var a=this,h=[0],u=[],g=[null],o=[],S=this.table,x="",$=0,A=0,W=2,U=1,B=o.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(I.yy[N]=this.yy[N]);k.setInput(s,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var b=k.yylloc;o.push(b);var L=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function C(E){h.length=h.length-2*E,g.length=g.length-E,o.length=o.length-E}n.__name(C,"popStack");function H(){var E;return E=u.pop()||k.lex()||U,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=a.symbols_[E]||E),E}n.__name(H,"lex");for(var w,M,T,Z,F={},O,P,D,j;;){if(M=h[h.length-1],this.defaultActions[M]?T=this.defaultActions[M]:((w===null||typeof w>"u")&&(w=H()),T=S[M]&&S[M][w]),typeof T>"u"||!T.length||!T[0]){var J="";j=[];for(O in S[M])this.terminals_[O]&&O>W&&j.push("'"+this.terminals_[O]+"'");k.showPosition?J="Parse error on line "+($+1)+`:
2
+ `+k.showPosition()+`
3
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[w]||w)+"'":J="Parse error on line "+($+1)+": Unexpected "+(w==U?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(J,{text:k.match,token:this.terminals_[w]||w,line:k.yylineno,loc:b,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+w);switch(T[0]){case 1:h.push(w),g.push(k.yytext),o.push(k.yylloc),h.push(T[1]),w=null,A=k.yyleng,x=k.yytext,$=k.yylineno,b=k.yylloc;break;case 2:if(P=this.productions_[T[1]][1],F.$=g[g.length-P],F._$={first_line:o[o.length-(P||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(P||1)].first_column,last_column:o[o.length-1].last_column},L&&(F._$.range=[o[o.length-(P||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(F,[x,A,$,I.yy,T[1],g,o].concat(B)),typeof Z<"u")return Z;P&&(h=h.slice(0,-1*P*2),g=g.slice(0,-1*P),o=o.slice(0,-1*P)),h.push(this.productions_[T[1]][0]),g.push(F.$),o.push(F._$),D=S[h[h.length-2]][h[h.length-1]],h.push(D);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:n.__name(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:n.__name(function(s,a){return this.yy=a||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:n.__name(function(s){var a=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:n.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:n.__name(function(s,a){var h,u,g;if(this.options.backtrack_lexer&&(g={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(g.yylloc.range=this.yylloc.range.slice(0))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var o in g)this[o]=g[o];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,h,u;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),o=0;o<g.length;o++)if(h=this._input.match(this.rules[g[o]]),h&&(!a||h[0].length>a[0].length)){if(a=h,u=o,this.options.backtrack_lexer){if(s=this.test_match(h,g[o]),s!==!1)return s;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(s=this.test_match(a,g[u]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n.__name(function(){var a=this.next();return a||this.lex()},"lex"),begin:n.__name(function(a){this.conditionStack.push(a)},"begin"),popState:n.__name(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n.__name(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:n.__name(function(a){this.begin(a)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(a,h,u,g){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return _}();p.lexer=m;function v(){this.yy={}}return n.__name(v,"Parser"),v.prototype=p,p.Parser=v,new v}();K.parser=K;var _t=K,it={};n.__export(it,{addEvent:()=>ut,addSection:()=>ot,addTask:()=>dt,addTaskOrg:()=>pt,clear:()=>lt,default:()=>ft,getCommonDb:()=>at,getSections:()=>ct,getTasks:()=>ht});var z="",st=0,Q=[],G=[],V=[],at=n.__name(()=>n.commonDb_exports,"getCommonDb"),lt=n.__name(function(){Q.length=0,G.length=0,z="",V.length=0,n.clear()},"clear"),ot=n.__name(function(r){z=r,Q.push(r)},"addSection"),ct=n.__name(function(){return Q},"getSections"),ht=n.__name(function(){let r=et();const t=100;let e=0;for(;!r&&e<t;)r=et(),e++;return G.push(...V),G},"getTasks"),dt=n.__name(function(r,t,e){const l={id:st++,section:z,type:z,task:r,score:t||0,events:e?[e]:[]};V.push(l)},"addTask"),ut=n.__name(function(r){V.find(e=>e.id===st-1).events.push(r)},"addEvent"),pt=n.__name(function(r){const t={section:z,type:z,description:r,task:r,classes:[]};G.push(t)},"addTaskOrg"),et=n.__name(function(){const r=n.__name(function(e){return V[e].processed},"compileTask");let t=!0;for(const[e,l]of V.entries())r(e),t=t&&l.processed;return t},"compileTasks"),ft={clear:lt,getCommonDb:at,addSection:ot,getSections:ct,getTasks:ht,addTask:dt,addTaskOrg:pt,addEvent:ut},mt=12,q=n.__name(function(r,t){const e=r.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),xt=n.__name(function(r,t){const l=r.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=r.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(f){const p=tt.d3arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}n.__name(d,"smile");function c(f){const p=tt.d3arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}n.__name(c,"sad");function y(f){f.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return n.__name(y,"ambivalent"),t.score>3?d(i):t.score<3?c(i):y(i),l},"drawFace"),kt=n.__name(function(r,t){const e=r.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),gt=n.__name(function(r,t){const e=t.text.replace(/<br\s*\/?>/gi," "),l=r.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const i=l.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),l},"drawText"),vt=n.__name(function(r,t){function e(i,d,c,y,f){return i+","+d+" "+(i+c)+","+d+" "+(i+c)+","+(d+y-f)+" "+(i+c-f*1.2)+","+(d+y)+" "+i+","+(d+y)}n.__name(e,"genPoints");const l=r.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,gt(r,t)},"drawLabel"),bt=n.__name(function(r,t,e){const l=r.append("g"),i=X();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,q(l,i),yt(e)(t.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),nt=-1,wt=n.__name(function(r,t,e){const l=t.x+e.width/2,i=r.append("g");nt++;const d=300+5*30;i.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",d).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(i,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=X();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,q(i,c),yt(e)(t.task,i,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),St=n.__name(function(r,t){q(r,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Et=n.__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),X=n.__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),yt=function(){function r(i,d,c,y,f,p,m,v){const _=d.append("text").attr("x",c+f/2).attr("y",y+p/2+5).style("font-color",v).style("text-anchor","middle").text(i);l(_,m)}n.__name(r,"byText");function t(i,d,c,y,f,p,m,v,_){const{taskFontSize:s,taskFontFamily:a}=v,h=i.split(/<br\s*\/?>/gi);for(let u=0;u<h.length;u++){const g=u*s-s*(h.length-1)/2,o=d.append("text").attr("x",c+f/2).attr("y",y).attr("fill",_).style("text-anchor","middle").style("font-size",s).style("font-family",a);o.append("tspan").attr("x",c+f/2).attr("dy",g).text(h[u]),o.attr("y",y+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(o,m)}}n.__name(t,"byTspan");function e(i,d,c,y,f,p,m,v){const _=d.append("switch"),a=_.append("foreignObject").attr("x",c).attr("y",y).attr("width",f).attr("height",p).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,c,y,f,p,m,v),l(a,m)}n.__name(e,"byFo");function l(i,d){for(const c in d)c in d&&i.attr(c,d[c])}return n.__name(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?r:t}}(),Tt=n.__name(function(r){r.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function Y(r,t){r.each(function(){var e=n.select(this),l=e.text().split(/(\s+|<br>)/).reverse(),i,d=[],c=1.1,y=e.attr("y"),f=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",f+"em");for(let m=0;m<l.length;m++)i=l[l.length-1-m],d.push(i),p.text(d.join(" ").trim()),(p.node().getComputedTextLength()>t||i==="<br>")&&(d.pop(),p.text(d.join(" ").trim()),i==="<br>"?d=[""]:d=[i],p=e.append("tspan").attr("x",0).attr("y",y).attr("dy",c+"em").text(i))})}n.__name(Y,"wrap");var It=n.__name(function(r,t,e,l){var v;const i=e%mt-1,d=r.append("g");t.section=i,d.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const c=d.append("g"),y=d.append("g"),p=y.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),m=(v=l.fontSize)!=null&&v.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+m*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,y.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),$t(c,t,i,l),t},"drawNode"),Nt=n.__name(function(r,t,e){var y;const l=r.append("g"),d=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),c=(y=e.fontSize)!=null&&y.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),$t=n.__name(function(r,t,e){r.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),r.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),R={drawRect:q,drawCircle:kt,drawSection:bt,drawText:gt,drawLabel:vt,drawTask:wt,drawBackgroundRect:St,getTextObj:Et,getNoteRect:X,initGraphics:Tt,drawNode:It,getVirtualNodeHeight:Nt},Lt=n.__name(function(r,t,e,l){var B,k,I;const i=n.getConfig2(),d=((B=i.timeline)==null?void 0:B.leftMargin)??50;n.log.debug("timeline",l.db);const c=i.securityLevel;let y;c==="sandbox"&&(y=n.select("#i"+t));const p=(c==="sandbox"?n.select(y.nodes()[0].contentDocument.body):n.select("body")).select("#"+t);p.append("g");const m=l.db.getTasks(),v=l.db.getCommonDb().getDiagramTitle();n.log.debug("task",m),R.initGraphics(p);const _=l.db.getSections();n.log.debug("sections",_);let s=0,a=0,h=0,u=0,g=50+d,o=50;u=50;let S=0,x=!0;_.forEach(function(N){const b={number:S,descr:N,section:S,width:150,padding:20,maxHeight:s},L=R.getVirtualNodeHeight(p,b,i);n.log.debug("sectionHeight before draw",L),s=Math.max(s,L+20)});let $=0,A=0;n.log.debug("tasks.length",m.length);for(const[N,b]of m.entries()){const L={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:a},C=R.getVirtualNodeHeight(p,L,i);n.log.debug("taskHeight before draw",C),a=Math.max(a,C+20),$=Math.max($,b.events.length);let H=0;for(const w of b.events){const M={descr:w,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};H+=R.getVirtualNodeHeight(p,M,i)}b.events.length>0&&(H+=(b.events.length-1)*10),A=Math.max(A,H)}n.log.debug("maxSectionHeight before draw",s),n.log.debug("maxTaskHeight before draw",a),_&&_.length>0?_.forEach(N=>{const b=m.filter(w=>w.section===N),L={number:S,descr:N,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:s};n.log.debug("sectionNode",L);const C=p.append("g"),H=R.drawNode(C,L,S,i);n.log.debug("sectionNode output",H),C.attr("transform",`translate(${g}, ${u})`),o+=s+50,b.length>0&&rt(p,b,S,g,o,a,i,$,A,s,!1),g+=200*Math.max(b.length,1),o=u,S++}):(x=!1,rt(p,m,S,g,o,a,i,$,A,s,!0));const W=p.node().getBBox();n.log.debug("bounds",W),v&&p.append("text").text(v).attr("x",W.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),h=x?s+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",h).attr("x2",W.width+3*d).attr("y2",h).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n.setupGraphViewbox(void 0,p,((k=i.timeline)==null?void 0:k.padding)??50,((I=i.timeline)==null?void 0:I.useMaxWidth)??!1)},"draw"),rt=n.__name(function(r,t,e,l,i,d,c,y,f,p,m){var v;for(const _ of t){const s={descr:_.task,section:e,number:e,width:150,padding:20,maxHeight:d};n.log.debug("taskNode",s);const a=r.append("g").attr("class","taskWrapper"),u=R.drawNode(a,s,e,c).height;if(n.log.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${i})`),d=Math.max(d,u),_.events){const g=r.append("g").attr("class","lineWrapper");let o=d;i+=100,o=o+Mt(r,_.events,e,l,i,c),i-=100,g.append("line").attr("x1",l+190/2).attr("y1",i+d).attr("x2",l+190/2).attr("y2",i+d+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,m&&!((v=c.timeline)!=null&&v.disableMulticolor)&&e++}i=i-10},"drawTasks"),Mt=n.__name(function(r,t,e,l,i,d){let c=0;const y=i;i=i+100;for(const f of t){const p={descr:f,section:e,number:e,width:150,padding:20,maxHeight:50};n.log.debug("eventNode",p);const m=r.append("g").attr("class","eventWrapper"),_=R.drawNode(m,p,e,d).height;c=c+_,m.attr("transform",`translate(${l}, ${i})`),i=i+10+_}return i=y,c},"drawEvents"),Pt={setConf:n.__name(()=>{},"setConf"),draw:Lt},Ht=n.__name(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],n.isDark(r["lineColor"+e])?r["lineColor"+e]=n.lighten(r["lineColor"+e],20):r["lineColor"+e]=n.darken(r["lineColor"+e],20);for(let e=0;e<r.THEME_COLOR_LIMIT;e++){const l=""+(17-3*e);t+=`
7
+ .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
8
+ fill: ${r["cScale"+e]};
9
+ }
10
+ .section-${e-1} text {
11
+ fill: ${r["cScaleLabel"+e]};
12
+ }
13
+ .node-icon-${e-1} {
14
+ font-size: 40px;
15
+ color: ${r["cScaleLabel"+e]};
16
+ }
17
+ .section-edge-${e-1}{
18
+ stroke: ${r["cScale"+e]};
19
+ }
20
+ .edge-depth-${e-1}{
21
+ stroke-width: ${l};
22
+ }
23
+ .section-${e-1} line {
24
+ stroke: ${r["cScaleInv"+e]} ;
25
+ stroke-width: 3;
26
+ }
27
+
28
+ .lineWrapper line{
29
+ stroke: ${r["cScaleLabel"+e]} ;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ `}return t},"genSections"),At=n.__name(r=>`
39
+ .edge {
40
+ stroke-width: 3;
41
+ }
42
+ ${Ht(r)}
43
+ .section-root rect, .section-root path, .section-root circle {
44
+ fill: ${r.git0};
45
+ }
46
+ .section-root text {
47
+ fill: ${r.gitBranchLabel0};
48
+ }
49
+ .icon-container {
50
+ height:100%;
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ }
55
+ .edge {
56
+ fill: none;
57
+ }
58
+ .eventWrapper {
59
+ filter: brightness(120%);
60
+ }
61
+ `,"getStyles"),Ct=At,Rt={db:it,renderer:Pt,parser:_t,styles:Ct};exports.diagram=Rt;