lookatstudy-mobile 0.31.2 → 0.31.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.cjs +63 -6
- package/web/assets/{CanvasStage-BbqLSbD4.js → CanvasStage-BoukoDwf.js} +1 -1
- package/web/assets/{CommandPalette-DQ5w84ic.js → CommandPalette-BMww5JAo.js} +1 -1
- package/web/assets/{CourseSearchPanel-ThxY4JL1.js → CourseSearchPanel-CVpYbTq-.js} +1 -1
- package/web/assets/{ExamView-DVLRcljJ.js → ExamView-DK4OHuUE.js} +1 -1
- package/web/assets/{ReviewPanel-D1jKVMQK.js → ReviewPanel-CqBHz98x.js} +1 -1
- package/web/assets/{SettingsView-BHoTkY38.js → SettingsView-Dgz69zxP.js} +2 -2
- package/web/assets/{VoicePanel-BP1Ur7sF.js → VoicePanel-CyEYsYkv.js} +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-Ca-5zS8J.js → abnfDiagram-VCTEODGH-Dh3bIpdV.js} +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-ODA7YWAP-ZI6_0Jfq.js → abnfDiagram-VCTEODGH-ODA7YWAP-CNin0cdC.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-C4PU3XN7-B2bOUqy0.js → architectureDiagram-5GKGNRK7-C4PU3XN7-sJvUJcT8.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-DCEYr1uX.js → architectureDiagram-5GKGNRK7-ChCL-5TX.js} +1 -1
- package/web/assets/{arrow-right---oCZhx2.js → arrow-right-Bl9PmQY3.js} +1 -1
- package/web/assets/{blockDiagram-I7D4REHJ-Dx9xiTwp.js → blockDiagram-I7D4REHJ-g5xcoQv1.js} +1 -1
- package/web/assets/{blockDiagram-NRAW4CY4-UMJ6PMQQ-Do5yGQuh.js → blockDiagram-NRAW4CY4-UMJ6PMQQ-B-xCs0mT.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-DXh9Ebug.js → c4Diagram-7LVT6UL2-DHfApXFV.js} +1 -1
- package/web/assets/{c4Diagram-UCG6FXSJ-75X3U2P3-DH7ShBLp.js → c4Diagram-UCG6FXSJ-75X3U2P3-Bft2Y-d8.js} +1 -1
- package/web/assets/channel-44SQWgTG.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-Bbluh_im.js → chunk-2Q5K7J3B-GYjnjq20.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-CwJZ1eAQ.js → chunk-5VM5RSS4-Cv1cnwH0.js} +1 -1
- package/web/assets/{chunk-7XDTSPCN-3TtQfLC2.js → chunk-7XDTSPCN-C9bekxeU.js} +1 -1
- package/web/assets/{chunk-CTNIYPP6--48noAMq.js → chunk-CTNIYPP6-BMTEnJs0.js} +1 -1
- package/web/assets/{chunk-CXNFBKHE-BMfLUSYr.js → chunk-CXNFBKHE-Cr_h3Gbb.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-DQz5Eh8R.js → chunk-F27PBJKO-Ak5DbW8f.js} +1 -1
- package/web/assets/{chunk-IMKFNOWR-mEHtzDJe.js → chunk-IMKFNOWR-gjvI_IJ_.js} +1 -1
- package/web/assets/{chunk-ISA7TJRJ-Cua7d2fi.js → chunk-ISA7TJRJ-BIyF4xnX.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-DqWkk9f8.js → chunk-JWPE2WC7-pYmvrIpX.js} +1 -1
- package/web/assets/{chunk-LV3HUYFY-BCzMQT8Q.js → chunk-LV3HUYFY-BNiJDpB8.js} +1 -1
- package/web/assets/{chunk-M3IUQBOH-B-r9ydC6.js → chunk-M3IUQBOH-8zTuxw5p.js} +1 -1
- package/web/assets/{chunk-NDIOYS4C-DkAwrWHj.js → chunk-NDIOYS4C-BZzyuIZR.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-BjpioqkZ.js → chunk-POPQ4Y6H-DuUpuCuZ.js} +1 -1
- package/web/assets/{chunk-RE4WF27V-CJEnGv6g.js → chunk-RE4WF27V-UTSsxioN.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-DGaiaQgi.js → chunk-SVP7TREG-D4zIp-oD.js} +1 -1
- package/web/assets/{chunk-TICWLB2K-DqXyoflV.js → chunk-TICWLB2K-B4OixT8N.js} +1 -1
- package/web/assets/{chunk-VII2H2IX-CHqS8QXi.js → chunk-VII2H2IX-BVHpCn1I.js} +1 -1
- package/web/assets/{chunk-X5GNSKZ3-CPiurspk.js → chunk-X5GNSKZ3-C4lplB-A.js} +1 -1
- package/web/assets/{chunk-XCWWM2C3-CnpRc-BX.js → chunk-XCWWM2C3-B3QpTOdl.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-xXPgDheN.js → chunk-XXDRQBXY-Bq8-aHoG.js} +1 -1
- package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-DGcIO73k.js +1 -0
- package/web/assets/classDiagram-ZZMXUADV-B6SRETVc.js +1 -0
- package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-DGcIO73k.js +1 -0
- package/web/assets/classDiagram-v2-VYDZK3BY-B6SRETVc.js +1 -0
- package/web/assets/{core-iYZpQJa6.js → core-3u_r5gY7.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-OB24KH3T-CQsWVK5X.js → cose-bilkent-JH36ORCC-OB24KH3T-CRbyrBy4.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-Dr_WUhVB.js → cose-bilkent-JH36ORCC-U5hobSh4.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-fybCqBi3.js → cynefin-OW5HDTMX-D9H3MYKf.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-GVF3BKWE-DwLRaQ37.js → cynefin-OW5HDTMX-GVF3BKWE-Bk0A2gWj.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-BLqywzF8.js → cynefinDiagram-5FMLGOSQ-Bq0FEfO-.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-H3WIRU3N-D7Mzcgjs.js → cynefinDiagram-5FMLGOSQ-H3WIRU3N-Bz2LGNP2.js} +1 -1
- package/web/assets/{dagre-3AP2YEHR-DCERTXHT-C3dpohva.js → dagre-3AP2YEHR-DCERTXHT-DAmfSLkb.js} +1 -1
- package/web/assets/{dagre-GXQ25YYZ-QPjECY_W.js → dagre-GXQ25YYZ-D1URaPw6.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-CwZRApeF.js → diagram-S7CK7UJ4-BfCN6aAc.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-MULGZGEL-Czqn_Fna.js → diagram-S7CK7UJ4-MULGZGEL-BNcLgwMu.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-Bo8gzrdx.js → diagram-UQ7AKVKN-BLaUOgNV.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-YQBY353J-CgDXcRAT.js → diagram-UQ7AKVKN-YQBY353J-DAY6IduI.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-0w4db5zY.js → diagram-VSXAHHWV-DL0wgMXQ.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-WLNH2ELY-DbTl04rE.js → diagram-VSXAHHWV-WLNH2ELY-B-ttfhQa.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-DJvH_pmt.js → diagram-VX7I27RA-DFDo0pQX.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-XW6YQV5G-fzWHr6UJ.js → diagram-VX7I27RA-XW6YQV5G-DufLVQwf.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-DsT5qGVe.js → diagram-Z3DM3KII-CJx5z01d.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-HG7RF65D-CDqb1-LL.js → diagram-Z3DM3KII-HG7RF65D-CqYdmF0j.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-BoB0yBxV.js → ebnfDiagram-PWID7BFC-C3BUrnNQ.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-OKY4VHYD-Dl7tZHv0.js → ebnfDiagram-PWID7BFC-OKY4VHYD-5bLS1mMe.js} +1 -1
- package/web/assets/{erDiagram-RLTQ6QDP-TcPkrxxF.js → erDiagram-RLTQ6QDP-evqxdaX1.js} +1 -1
- package/web/assets/{erDiagram-SSCWMZ5O-PIPKOIK7-C13XODn3.js → erDiagram-SSCWMZ5O-PIPKOIK7-B0W-o43I.js} +1 -1
- package/web/assets/{flowDiagram-A5DVABFB-2Z4AVO5R-DNbmNTnm.js → flowDiagram-A5DVABFB-2Z4AVO5R-D8IK_LT1.js} +1 -1
- package/web/assets/{flowDiagram-HODETNUW-D2o5XxIm.js → flowDiagram-HODETNUW-BZiGcgj6.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-JZNG7GOG-C5IgtJLL.js → ganttDiagram-EL5Y4UJY-JZNG7GOG-D9wKfel1.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-D36iMZvH.js → ganttDiagram-EL5Y4UJY-Ksq3NSld.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-DMWMLL3G-BA7YVBKU.js → gitGraphDiagram-WWUBYQGX-DMWMLL3G-DcftSsCu.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-DoayvLMW.js → gitGraphDiagram-WWUBYQGX-UQFgu3MJ.js} +1 -1
- package/web/assets/{index-DtMB_WdP.js → index-BMDSDGOG.js} +1 -1
- package/web/assets/{index-Zmq94tKz.js → index-BpU0b0Tl.js} +3 -3
- package/web/assets/{index-5UvRMS_e.js → index-CzVW-FHu.js} +1 -1
- package/web/assets/{infoDiagram-27XIBGKW-DbMBXMvx.js → infoDiagram-27XIBGKW-j60ZSNR5.js} +1 -1
- package/web/assets/{infoDiagram-RXCK75RN-HANS5KVC-NdEBDyb0.js → infoDiagram-RXCK75RN-HANS5KVC-dX8UtVYl.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-7GCIT7WU-CzqV69s-.js → ishikawaDiagram-5VMMS53U-7GCIT7WU-CXBp8dVI.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-j9THtiQE.js → ishikawaDiagram-5VMMS53U-CVcFv511.js} +1 -1
- package/web/assets/{journeyDiagram-3NMN7TZE-C3h3msUP.js → journeyDiagram-3NMN7TZE-aoh88NC8.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-OAPELBT7-ChETfPiS.js → journeyDiagram-EYS64GPL-OAPELBT7-BWaSuQEG.js} +1 -1
- package/web/assets/{kanban-definition-3QL26DDD-I7RKWQQY-Wjr70XLu.js → kanban-definition-3QL26DDD-I7RKWQQY-BzkEox3k.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-C1b6cL5N.js → kanban-definition-UXKFOSKX-rYS3uleP.js} +1 -1
- package/web/assets/{katex-N6JRN4PM-BIpBcqrZ.js → katex-N6JRN4PM-8UbXnj3Z.js} +1 -1
- package/web/assets/{layout-D2XzcM9d.js → layout-ZD0I5vck.js} +1 -1
- package/web/assets/{main-Dj875aWF.js → main--EWP6PLx.js} +8 -8
- package/web/assets/{mermaid-layout-elk.core-CNNSrMhF.js → mermaid-layout-elk.core-Cn4RnA6V.js} +2 -2
- package/web/assets/{mermaid.core-CnNeOEec.js → mermaid.core-CbfcuuAo.js} +5 -5
- package/web/assets/{mindmap-definition-FBJOCRG2-KIYZG64Y-CE91aZQc.js → mindmap-definition-FBJOCRG2-KIYZG64Y-D_O77mMT.js} +1 -1
- package/web/assets/{mindmap-definition-YA3MSWOX-Dz0JwUgH.js → mindmap-definition-YA3MSWOX-DL0LZEHX.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-BEOg8IHd.js → pegDiagram-XKGWAZYB-BIUINyPA.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-OIP57N6J-CB6_i_dk.js → pegDiagram-XKGWAZYB-OIP57N6J-B1kW1fcf.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-2UOTW327-C_aP-GDD.js → pieDiagram-E7YTZNPT-2UOTW327-kILE7PGP.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-Btcl-uz0.js → pieDiagram-E7YTZNPT-CH_-MNV8.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-CA7HBTBO.js → quadrantDiagram-AXDQQJYC-CesMUFzU.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-SN3ASJJK-CAd5tIhG.js → quadrantDiagram-AXDQQJYC-SN3ASJJK-DWkE-EtN.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-34742W6X-CLWiLZG6.js → railroadDiagram-O6MQD6OU-34742W6X-_kA1kPP1.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-B7dkMwzi.js → railroadDiagram-O6MQD6OU-CFUBibfU.js} +1 -1
- package/web/assets/{render-O7CIS3YK-DQb_czkx.js → render-O7CIS3YK-CFl0TSy3.js} +7 -7
- package/web/assets/{requirementDiagram-BXWQKSXE-C70GJhMZ.js → requirementDiagram-BXWQKSXE-C3qcJtQ8.js} +1 -1
- package/web/assets/{requirementDiagram-EFPCY7ZU-NGAFFSMB-Bc0CRxi2.js → requirementDiagram-EFPCY7ZU-NGAFFSMB-C844r0sS.js} +1 -1
- package/web/assets/{rotate-ccw-JEjtXKlH.js → rotate-ccw-B-Vp-q5_.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-3D3M4XPB-B9PL6--N.js → sankeyDiagram-P5KCCOFB-3D3M4XPB-CyphuwLo.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-BJl2AqaQ.js → sankeyDiagram-P5KCCOFB-C7lYPtEY.js} +1 -1
- package/web/assets/{sequenceDiagram-WJ2MYXX4-DtmTM2Q1.js → sequenceDiagram-WJ2MYXX4-DrYPYBck.js} +1 -1
- package/web/assets/{sequenceDiagram-WJ2MYXX4-Q2IOPB4R-DH1L8a7Q.js → sequenceDiagram-WJ2MYXX4-Q2IOPB4R-oXT63bIm.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-e9akerky.js → sizeCapture-INFHLROL-Y7k-O0qI.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-PSGVOMYM-CSyLq32l.js → sizeCapture-X5ZJPWSS-PSGVOMYM-CoNUIFn_.js} +1 -1
- package/web/assets/{stateDiagram-D77RDMKH-Dc057ccO.js → stateDiagram-D77RDMKH-D6WoCMik.js} +1 -1
- package/web/assets/{stateDiagram-HBIQ2CUA-4M2S6MAN-D_uV5i1Q.js → stateDiagram-HBIQ2CUA-4M2S6MAN-uXt3ao2l.js} +1 -1
- package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-Cay00vhN.js +1 -0
- package/web/assets/stateDiagram-v2-MP3YSRHH-BdphEx8Z.js +1 -0
- package/web/assets/{swimlanes-42K2YHIH-ILKBiMPk.js → swimlanes-42K2YHIH-BnPHscat.js} +1 -1
- package/web/assets/{swimlanes-XN3QIQJK-N6N2CCQ6-CJ7qUhPg.js → swimlanes-XN3QIQJK-N6N2CCQ6-CW0cVUeR.js} +1 -1
- package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-BNfPyLDt.js +8 -0
- package/web/assets/swimlanesDiagram-VR7AAH4N-sMtGDxR7.js +8 -0
- package/web/assets/{timeline-definition-24CTP7MA-KN7RSRVM-DxSbNuQs.js → timeline-definition-24CTP7MA-KN7RSRVM-N_WfBi05.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-BckRkRye.js → timeline-definition-24CTP7MA-LvdK7dvf.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-AKJ7LXAN-hG9roRh0.js → vennDiagram-4TSXK5OY-AKJ7LXAN-BWgm8fzn.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-Bxkq0y0p.js → vennDiagram-4TSXK5OY-piMICF2q.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-3B6A3BN5-CLmKLRJP.js → wardleyDiagram-VM6X3IG4-3B6A3BN5-Cu6V9ROS.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-CaTbamBI.js → wardleyDiagram-VM6X3IG4-D8EBsCf9.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-CHtC3u6M.js → xychartDiagram-S5SC5T6Z-DqOdN5uZ.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-OBDNV6WG-ZjDcqfTl.js → xychartDiagram-S5SC5T6Z-OBDNV6WG-0yCr7Fhv.js} +1 -1
- package/web/index.html +1 -1
- package/web/assets/channel-CNRWz7VW.js +0 -1
- package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-C5s2iR9J.js +0 -1
- package/web/assets/classDiagram-ZZMXUADV-Cjli-tvb.js +0 -1
- package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-C5s2iR9J.js +0 -1
- package/web/assets/classDiagram-v2-VYDZK3BY-Cjli-tvb.js +0 -1
- package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-DBkBTIqA.js +0 -1
- package/web/assets/stateDiagram-v2-MP3YSRHH-D6iIkIH3.js +0 -1
- package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-lkgr5sGZ.js +0 -8
- package/web/assets/swimlanesDiagram-VR7AAH4N-D-ke9u7H.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ke,s as ye,p as ge,o as ve,a as pe,b as xe,_ as l,c as dt,d as Te,aS as U,l as ot,j as be,n as we,q as _e,y as De}from"./mermaid.core-CnNeOEec.js";import{g as Et}from"./index-CJuEfFQr.js";import{s as pt}from"./transform-Bd_a5eGM.js";import{t as Se,m as Ce,a as Ee,i as Me,b as Ie,c as Gt,d as jt,e as Ye,f as $e,g as Fe,h as Le,j as Ae,k as Oe,l as We,n as Xt,o as Ut,p as Zt,s as Qt,q as Kt,r as Pe}from"./time-C0TNQg6r.js";import{l as Re}from"./linear-CZIIlCMp.js";import"./main-Dj875aWF.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-5voVPcsN.js";var xt={exports:{}},Ve=xt.exports,Jt;function Ne(){return Jt||(Jt=1,(function(t,r){(function(i,e){t.exports=e()})(Ve,(function(){var i="day";return function(e,a,g){var v=function(L){return L.add(4-L.isoWeekday(),i)},b=a.prototype;b.isoWeekYear=function(){return v(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),i);var w,P,A,V,j=v(this),z=(w=this.isoWeekYear(),P=this.$u,A=(P?g.utc:g)().year(w).startOf("year"),V=4-A.isoWeekday(),A.isoWeekday()>4&&(V+=7),A.add(V,i));return j.diff(z,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var F=b.startOf;b.startOf=function(L,w){var P=this.$utils(),A=!!P.u(w)||w;return P.p(L)==="isoweek"?A?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(L,w)}}}))})(xt)),xt.exports}var ze=Ne();const He=Et(ze);var Tt={exports:{}},Be=Tt.exports,te;function qe(){return te||(te=1,(function(t,r){(function(i,e){t.exports=e()})(Be,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,g=/\d\d/,v=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,F={},L=function(k){return(k=+k)+(k>68?1900:2e3)},w=function(k){return function(M){this[k]=+M}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var O=M.match(/([+-]|\d\d)/g),$=60*O[1]+(+O[2]||0);return $===0?0:O[0]==="+"?-$:$})(k)}],A=function(k){var M=F[k];return M&&(M.indexOf?M:M.s.concat(M.f))},V=function(k,M){var O,$=F.meridiem;if($){for(var X=1;X<=24;X+=1)if(k.indexOf($(X,0,M))>-1){O=X>12;break}}else O=k===(M?"pm":"PM");return O},j={A:[b,function(k){this.afternoon=V(k,!1)}],a:[b,function(k){this.afternoon=V(k,!0)}],Q:[a,function(k){this.month=3*(k-1)+1}],S:[a,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[v,w("seconds")],ss:[v,w("seconds")],m:[v,w("minutes")],mm:[v,w("minutes")],H:[v,w("hours")],h:[v,w("hours")],HH:[v,w("hours")],hh:[v,w("hours")],D:[v,w("day")],DD:[g,w("day")],Do:[b,function(k){var M=F.ordinal,O=k.match(/\d+/);if(this.day=O[0],M)for(var $=1;$<=31;$+=1)M($).replace(/\[|\]/g,"")===k&&(this.day=$)}],w:[v,w("week")],ww:[g,w("week")],M:[v,w("month")],MM:[g,w("month")],MMM:[b,function(k){var M=A("months"),O=(A("monthsShort")||M.map((function($){return $.slice(0,3)}))).indexOf(k)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[b,function(k){var M=A("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,w("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function z(k){var M,O;M=k,O=F&&F.formats;for(var $=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,x,p){var y=p&&p.toUpperCase();return x||O[p]||i[p]||O[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,d,f){return d||f.slice(1)}))}))).match(e),X=$.length,B=0;B<X;B+=1){var Y=$[B],T=j[Y],h=T&&T[0],I=T&&T[1];$[B]=I?{regex:h,parser:I}:Y.replace(/^\[|\]$/g,"")}return function(m){for(var x={},p=0,y=0;p<X;p+=1){var n=$[p];if(typeof n=="string")y+=n.length;else{var d=n.regex,f=n.parser,u=m.slice(y),_=d.exec(u)[0];f.call(x,_),m=m.replace(_,"")}}return(function(s){var D=s.afternoon;if(D!==void 0){var o=s.hours;D?o<12&&(s.hours+=12):o===12&&(s.hours=0),delete s.afternoon}})(x),x}}return function(k,M,O){O.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var $=M.prototype,X=$.parse;$.parse=function(B){var Y=B.date,T=B.utc,h=B.args;this.$u=T;var I=h[1];if(typeof I=="string"){var m=h[2]===!0,x=h[3]===!0,p=m||x,y=h[2];x&&(y=h[2]),F=this.$locale(),!m&&y&&(F=O.Ls[y]),this.$d=(function(u,_,s,D){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*u);var o=z(_)(u),H=o.year,c=o.month,S=o.day,C=o.hours,R=o.minutes,E=o.seconds,N=o.milliseconds,W=o.zone,rt=o.week,nt=new Date,yt=S||(H||c?1:nt.getDate()),lt=H||nt.getFullYear(),q=0;H&&!c||(q=c>0?c-1:nt.getMonth());var K,Z=C||0,at=R||0,J=E||0,it=N||0;return W?new Date(Date.UTC(lt,q,yt,Z,at,J,it+60*W.offset*1e3)):s?new Date(Date.UTC(lt,q,yt,Z,at,J,it)):(K=new Date(lt,q,yt,Z,at,J,it),rt&&(K=D(K).week(rt).toDate()),K)}catch{return new Date("")}})(Y,I,T,O),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),p&&Y!=this.format(I)&&(this.$d=new Date("")),F={}}else if(I instanceof Array)for(var n=I.length,d=1;d<=n;d+=1){h[1]=I[d-1];var f=O.apply(this,h);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}d===n&&(this.$d=new Date(""))}else X.call(this,B)}}}))})(Tt)),Tt.exports}var Ge=qe();const je=Et(Ge);var bt={exports:{}},Xe=bt.exports,ee;function Ue(){return ee||(ee=1,(function(t,r){(function(i,e){t.exports=e()})(Xe,(function(){return function(i,e){var a=e.prototype,g=a.format;a.format=function(v){var b=this,F=this.$locale();if(!this.isValid())return g.bind(this)(v);var L=this.$utils(),w=(v||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return F.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return F.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),P==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),P==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return P}}));return g.bind(this)(w)}}}))})(bt)),bt.exports}var Ze=Ue();const Qe=Et(Ze);var wt={exports:{}},Ke=wt.exports,se;function Je(){return se||(se=1,(function(t,r){(function(i,e){t.exports=e()})(Ke,(function(){var i,e,a=1e3,g=6e4,v=36e5,b=864e5,F=31536e6,L=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,A={years:F,months:L,days:b,hours:v,minutes:g,seconds:a,milliseconds:1,weeks:6048e5},V=function(Y){return Y instanceof X},j=function(Y,T,h){return new X(Y,h,T.$l)},z=function(Y){return e.p(Y)+"s"},k=function(Y){return Y<0},M=function(Y){return k(Y)?Math.ceil(Y):Math.floor(Y)},O=function(Y){return Math.abs(Y)},$=function(Y,T){return Y?k(Y)?{negative:!0,format:""+O(Y)+T}:{negative:!1,format:""+Y+T}:{negative:!1,format:""}},X=(function(){function Y(h,I,m){var x=this;if(this.$d={},this.$l=m,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return j(h*A[z(I)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(n){x.$d[z(n)]=h[n]})),this.calMilliseconds(),this;if(typeof h=="string"){var p=h.match(w);if(p){var y=p.slice(2).map((function(n){return n!=null?Number(n):0}));return this.$d.years=y[0],this.$d.months=y[1],this.$d.weeks=y[2],this.$d.days=y[3],this.$d.hours=y[4],this.$d.minutes=y[5],this.$d.seconds=y[6],this.calMilliseconds(),this}}return this}var T=Y.prototype;return T.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(I,m){return I+(h.$d[m]||0)*A[m]}),0)},T.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/F),h%=F,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/v),h%=v,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/a),h%=a,this.$d.milliseconds=h},T.toISOString=function(){var h=$(this.$d.years,"Y"),I=$(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var x=$(m,"D"),p=$(this.$d.hours,"H"),y=$(this.$d.minutes,"M"),n=this.$d.seconds||0;this.$d.milliseconds&&(n+=this.$d.milliseconds/1e3,n=Math.round(1e3*n)/1e3);var d=$(n,"S"),f=h.negative||I.negative||x.negative||p.negative||y.negative||d.negative,u=p.format||y.format||d.format?"T":"",_=(f?"-":"")+"P"+h.format+I.format+x.format+u+p.format+y.format+d.format;return _==="P"||_==="-P"?"P0D":_},T.toJSON=function(){return this.toISOString()},T.format=function(h){var I=h||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return I.replace(P,(function(x,p){return p||String(m[x])}))},T.as=function(h){return this.$ms/A[z(h)]},T.get=function(h){var I=this.$ms,m=z(h);return m==="milliseconds"?I%=1e3:I=m==="weeks"?M(I/A[m]):this.$d[m],I||0},T.add=function(h,I,m){var x;return x=I?h*A[z(I)]:V(h)?h.$ms:j(h,this).$ms,j(this.$ms+x*(m?-1:1),this)},T.subtract=function(h,I){return this.add(h,I,!0)},T.locale=function(h){var I=this.clone();return I.$l=h,I},T.clone=function(){return j(this.$ms,this)},T.humanize=function(h){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},T.valueOf=function(){return this.asMilliseconds()},T.milliseconds=function(){return this.get("milliseconds")},T.asMilliseconds=function(){return this.as("milliseconds")},T.seconds=function(){return this.get("seconds")},T.asSeconds=function(){return this.as("seconds")},T.minutes=function(){return this.get("minutes")},T.asMinutes=function(){return this.as("minutes")},T.hours=function(){return this.get("hours")},T.asHours=function(){return this.as("hours")},T.days=function(){return this.get("days")},T.asDays=function(){return this.as("days")},T.weeks=function(){return this.get("weeks")},T.asWeeks=function(){return this.as("weeks")},T.months=function(){return this.get("months")},T.asMonths=function(){return this.as("months")},T.years=function(){return this.get("years")},T.asYears=function(){return this.as("years")},Y})(),B=function(Y,T,h){return Y.add(T.years()*h,"y").add(T.months()*h,"M").add(T.days()*h,"d").add(T.hours()*h,"h").add(T.minutes()*h,"m").add(T.seconds()*h,"s").add(T.milliseconds()*h,"ms")};return function(Y,T,h){i=h,e=h().$utils(),h.duration=function(x,p){var y=h.locale();return j(x,{$l:y},p)},h.isDuration=V;var I=T.prototype.add,m=T.prototype.subtract;T.prototype.add=function(x,p){return V(x)?B(this,x,1):I.bind(this)(x,p)},T.prototype.subtract=function(x,p){return V(x)?B(this,x,-1):m.bind(this)(x,p)}}}))})(wt)),wt.exports}var ts=Je();const es=Et(ts);var Yt=(function(){var t=l(function(y,n,d,f){for(d=d||{},f=y.length;f--;d[y[f]]=n);return d},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],e=[1,27],a=[1,28],g=[1,29],v=[1,30],b=[1,31],F=[1,32],L=[1,33],w=[1,34],P=[1,9],A=[1,10],V=[1,11],j=[1,12],z=[1,13],k=[1,14],M=[1,15],O=[1,16],$=[1,19],X=[1,20],B=[1,21],Y=[1,22],T=[1,23],h=[1,25],I=[1,35],m={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(n,d,f,u,_,s,D){var o=s.length-1;switch(_){case 1:return s[o-1];case 2:this.$=[];break;case 3:s[o-1].push(s[o]),this.$=s[o-1];break;case 4:case 5:this.$=s[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=s[o].substr(18);break;case 19:u.TopAxis(),this.$=s[o].substr(8);break;case 20:u.setAxisFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 21:u.setTickInterval(s[o].substr(13)),this.$=s[o].substr(13);break;case 22:u.setExcludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 23:u.setIncludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 24:u.setTodayMarker(s[o].substr(12)),this.$=s[o].substr(12);break;case 27:u.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 28:this.$=s[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 33:u.addTask(s[o-1],s[o]),this.$="task";break;case 34:this.$=s[o-1],u.setClickEvent(s[o-1],s[o],null);break;case 35:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],s[o]);break;case 36:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],null),u.setLink(s[o-2],s[o]);break;case 37:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-2],s[o-1]),u.setLink(s[o-3],s[o]);break;case 38:this.$=s[o-2],u.setClickEvent(s[o-2],s[o],null),u.setLink(s[o-2],s[o-1]);break;case 39:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-1],s[o]),u.setLink(s[o-3],s[o-2]);break;case 40:this.$=s[o-1],u.setLink(s[o-1],s[o]);break;case 41:case 47:this.$=s[o-1]+" "+s[o];break;case 42:case 43:case 45:this.$=s[o-2]+" "+s[o-1]+" "+s[o];break;case 44:case 46:this.$=s[o-3]+" "+s[o-2]+" "+s[o-1]+" "+s[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:l(function(n,d){if(d.recoverable)this.trace(n);else{var f=new Error(n);throw f.hash=d,f}},"parseError"),parse:l(function(n){var d=this,f=[0],u=[],_=[null],s=[],D=this.table,o="",H=0,c=0,S=2,C=1,R=s.slice.call(arguments,1),E=Object.create(this.lexer),N={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(N.yy[W]=this.yy[W]);E.setInput(n,N.yy),N.yy.lexer=E,N.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var rt=E.yylloc;s.push(rt);var nt=E.options&&E.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){f.length=f.length-2*Q,_.length=_.length-Q,s.length=s.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||E.lex()||C,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var q,K,Z,at,J={},it,tt,qt,vt;;){if(K=f[f.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((q===null||typeof q>"u")&&(q=lt()),Z=D[K]&&D[K][q]),typeof Z>"u"||!Z.length||!Z[0]){var Mt="";vt=[];for(it in D[K])this.terminals_[it]&&it>S&&vt.push("'"+this.terminals_[it]+"'");E.showPosition?Mt="Parse error on line "+(H+1)+`:
|
|
1
|
+
import{g as ke,s as ye,p as ge,o as ve,a as pe,b as xe,_ as l,c as dt,d as Te,aS as U,l as ot,j as be,n as we,q as _e,y as De}from"./mermaid.core-CbfcuuAo.js";import{g as Et}from"./index-CJuEfFQr.js";import{s as pt}from"./transform-Bd_a5eGM.js";import{t as Se,m as Ce,a as Ee,i as Me,b as Ie,c as Gt,d as jt,e as Ye,f as $e,g as Fe,h as Le,j as Ae,k as Oe,l as We,n as Xt,o as Ut,p as Zt,s as Qt,q as Kt,r as Pe}from"./time-C0TNQg6r.js";import{l as Re}from"./linear-CZIIlCMp.js";import"./main--EWP6PLx.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-5voVPcsN.js";var xt={exports:{}},Ve=xt.exports,Jt;function Ne(){return Jt||(Jt=1,(function(t,r){(function(i,e){t.exports=e()})(Ve,(function(){var i="day";return function(e,a,g){var v=function(L){return L.add(4-L.isoWeekday(),i)},b=a.prototype;b.isoWeekYear=function(){return v(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),i);var w,P,A,V,j=v(this),z=(w=this.isoWeekYear(),P=this.$u,A=(P?g.utc:g)().year(w).startOf("year"),V=4-A.isoWeekday(),A.isoWeekday()>4&&(V+=7),A.add(V,i));return j.diff(z,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var F=b.startOf;b.startOf=function(L,w){var P=this.$utils(),A=!!P.u(w)||w;return P.p(L)==="isoweek"?A?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(L,w)}}}))})(xt)),xt.exports}var ze=Ne();const He=Et(ze);var Tt={exports:{}},Be=Tt.exports,te;function qe(){return te||(te=1,(function(t,r){(function(i,e){t.exports=e()})(Be,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,g=/\d\d/,v=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,F={},L=function(k){return(k=+k)+(k>68?1900:2e3)},w=function(k){return function(M){this[k]=+M}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var O=M.match(/([+-]|\d\d)/g),$=60*O[1]+(+O[2]||0);return $===0?0:O[0]==="+"?-$:$})(k)}],A=function(k){var M=F[k];return M&&(M.indexOf?M:M.s.concat(M.f))},V=function(k,M){var O,$=F.meridiem;if($){for(var X=1;X<=24;X+=1)if(k.indexOf($(X,0,M))>-1){O=X>12;break}}else O=k===(M?"pm":"PM");return O},j={A:[b,function(k){this.afternoon=V(k,!1)}],a:[b,function(k){this.afternoon=V(k,!0)}],Q:[a,function(k){this.month=3*(k-1)+1}],S:[a,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[v,w("seconds")],ss:[v,w("seconds")],m:[v,w("minutes")],mm:[v,w("minutes")],H:[v,w("hours")],h:[v,w("hours")],HH:[v,w("hours")],hh:[v,w("hours")],D:[v,w("day")],DD:[g,w("day")],Do:[b,function(k){var M=F.ordinal,O=k.match(/\d+/);if(this.day=O[0],M)for(var $=1;$<=31;$+=1)M($).replace(/\[|\]/g,"")===k&&(this.day=$)}],w:[v,w("week")],ww:[g,w("week")],M:[v,w("month")],MM:[g,w("month")],MMM:[b,function(k){var M=A("months"),O=(A("monthsShort")||M.map((function($){return $.slice(0,3)}))).indexOf(k)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[b,function(k){var M=A("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,w("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function z(k){var M,O;M=k,O=F&&F.formats;for(var $=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,x,p){var y=p&&p.toUpperCase();return x||O[p]||i[p]||O[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,d,f){return d||f.slice(1)}))}))).match(e),X=$.length,B=0;B<X;B+=1){var Y=$[B],T=j[Y],h=T&&T[0],I=T&&T[1];$[B]=I?{regex:h,parser:I}:Y.replace(/^\[|\]$/g,"")}return function(m){for(var x={},p=0,y=0;p<X;p+=1){var n=$[p];if(typeof n=="string")y+=n.length;else{var d=n.regex,f=n.parser,u=m.slice(y),_=d.exec(u)[0];f.call(x,_),m=m.replace(_,"")}}return(function(s){var D=s.afternoon;if(D!==void 0){var o=s.hours;D?o<12&&(s.hours+=12):o===12&&(s.hours=0),delete s.afternoon}})(x),x}}return function(k,M,O){O.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var $=M.prototype,X=$.parse;$.parse=function(B){var Y=B.date,T=B.utc,h=B.args;this.$u=T;var I=h[1];if(typeof I=="string"){var m=h[2]===!0,x=h[3]===!0,p=m||x,y=h[2];x&&(y=h[2]),F=this.$locale(),!m&&y&&(F=O.Ls[y]),this.$d=(function(u,_,s,D){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*u);var o=z(_)(u),H=o.year,c=o.month,S=o.day,C=o.hours,R=o.minutes,E=o.seconds,N=o.milliseconds,W=o.zone,rt=o.week,nt=new Date,yt=S||(H||c?1:nt.getDate()),lt=H||nt.getFullYear(),q=0;H&&!c||(q=c>0?c-1:nt.getMonth());var K,Z=C||0,at=R||0,J=E||0,it=N||0;return W?new Date(Date.UTC(lt,q,yt,Z,at,J,it+60*W.offset*1e3)):s?new Date(Date.UTC(lt,q,yt,Z,at,J,it)):(K=new Date(lt,q,yt,Z,at,J,it),rt&&(K=D(K).week(rt).toDate()),K)}catch{return new Date("")}})(Y,I,T,O),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),p&&Y!=this.format(I)&&(this.$d=new Date("")),F={}}else if(I instanceof Array)for(var n=I.length,d=1;d<=n;d+=1){h[1]=I[d-1];var f=O.apply(this,h);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}d===n&&(this.$d=new Date(""))}else X.call(this,B)}}}))})(Tt)),Tt.exports}var Ge=qe();const je=Et(Ge);var bt={exports:{}},Xe=bt.exports,ee;function Ue(){return ee||(ee=1,(function(t,r){(function(i,e){t.exports=e()})(Xe,(function(){return function(i,e){var a=e.prototype,g=a.format;a.format=function(v){var b=this,F=this.$locale();if(!this.isValid())return g.bind(this)(v);var L=this.$utils(),w=(v||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return F.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return F.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),P==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),P==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return P}}));return g.bind(this)(w)}}}))})(bt)),bt.exports}var Ze=Ue();const Qe=Et(Ze);var wt={exports:{}},Ke=wt.exports,se;function Je(){return se||(se=1,(function(t,r){(function(i,e){t.exports=e()})(Ke,(function(){var i,e,a=1e3,g=6e4,v=36e5,b=864e5,F=31536e6,L=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,A={years:F,months:L,days:b,hours:v,minutes:g,seconds:a,milliseconds:1,weeks:6048e5},V=function(Y){return Y instanceof X},j=function(Y,T,h){return new X(Y,h,T.$l)},z=function(Y){return e.p(Y)+"s"},k=function(Y){return Y<0},M=function(Y){return k(Y)?Math.ceil(Y):Math.floor(Y)},O=function(Y){return Math.abs(Y)},$=function(Y,T){return Y?k(Y)?{negative:!0,format:""+O(Y)+T}:{negative:!1,format:""+Y+T}:{negative:!1,format:""}},X=(function(){function Y(h,I,m){var x=this;if(this.$d={},this.$l=m,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return j(h*A[z(I)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(n){x.$d[z(n)]=h[n]})),this.calMilliseconds(),this;if(typeof h=="string"){var p=h.match(w);if(p){var y=p.slice(2).map((function(n){return n!=null?Number(n):0}));return this.$d.years=y[0],this.$d.months=y[1],this.$d.weeks=y[2],this.$d.days=y[3],this.$d.hours=y[4],this.$d.minutes=y[5],this.$d.seconds=y[6],this.calMilliseconds(),this}}return this}var T=Y.prototype;return T.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(I,m){return I+(h.$d[m]||0)*A[m]}),0)},T.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/F),h%=F,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/v),h%=v,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/a),h%=a,this.$d.milliseconds=h},T.toISOString=function(){var h=$(this.$d.years,"Y"),I=$(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var x=$(m,"D"),p=$(this.$d.hours,"H"),y=$(this.$d.minutes,"M"),n=this.$d.seconds||0;this.$d.milliseconds&&(n+=this.$d.milliseconds/1e3,n=Math.round(1e3*n)/1e3);var d=$(n,"S"),f=h.negative||I.negative||x.negative||p.negative||y.negative||d.negative,u=p.format||y.format||d.format?"T":"",_=(f?"-":"")+"P"+h.format+I.format+x.format+u+p.format+y.format+d.format;return _==="P"||_==="-P"?"P0D":_},T.toJSON=function(){return this.toISOString()},T.format=function(h){var I=h||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return I.replace(P,(function(x,p){return p||String(m[x])}))},T.as=function(h){return this.$ms/A[z(h)]},T.get=function(h){var I=this.$ms,m=z(h);return m==="milliseconds"?I%=1e3:I=m==="weeks"?M(I/A[m]):this.$d[m],I||0},T.add=function(h,I,m){var x;return x=I?h*A[z(I)]:V(h)?h.$ms:j(h,this).$ms,j(this.$ms+x*(m?-1:1),this)},T.subtract=function(h,I){return this.add(h,I,!0)},T.locale=function(h){var I=this.clone();return I.$l=h,I},T.clone=function(){return j(this.$ms,this)},T.humanize=function(h){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},T.valueOf=function(){return this.asMilliseconds()},T.milliseconds=function(){return this.get("milliseconds")},T.asMilliseconds=function(){return this.as("milliseconds")},T.seconds=function(){return this.get("seconds")},T.asSeconds=function(){return this.as("seconds")},T.minutes=function(){return this.get("minutes")},T.asMinutes=function(){return this.as("minutes")},T.hours=function(){return this.get("hours")},T.asHours=function(){return this.as("hours")},T.days=function(){return this.get("days")},T.asDays=function(){return this.as("days")},T.weeks=function(){return this.get("weeks")},T.asWeeks=function(){return this.as("weeks")},T.months=function(){return this.get("months")},T.asMonths=function(){return this.as("months")},T.years=function(){return this.get("years")},T.asYears=function(){return this.as("years")},Y})(),B=function(Y,T,h){return Y.add(T.years()*h,"y").add(T.months()*h,"M").add(T.days()*h,"d").add(T.hours()*h,"h").add(T.minutes()*h,"m").add(T.seconds()*h,"s").add(T.milliseconds()*h,"ms")};return function(Y,T,h){i=h,e=h().$utils(),h.duration=function(x,p){var y=h.locale();return j(x,{$l:y},p)},h.isDuration=V;var I=T.prototype.add,m=T.prototype.subtract;T.prototype.add=function(x,p){return V(x)?B(this,x,1):I.bind(this)(x,p)},T.prototype.subtract=function(x,p){return V(x)?B(this,x,-1):m.bind(this)(x,p)}}}))})(wt)),wt.exports}var ts=Je();const es=Et(ts);var Yt=(function(){var t=l(function(y,n,d,f){for(d=d||{},f=y.length;f--;d[y[f]]=n);return d},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],e=[1,27],a=[1,28],g=[1,29],v=[1,30],b=[1,31],F=[1,32],L=[1,33],w=[1,34],P=[1,9],A=[1,10],V=[1,11],j=[1,12],z=[1,13],k=[1,14],M=[1,15],O=[1,16],$=[1,19],X=[1,20],B=[1,21],Y=[1,22],T=[1,23],h=[1,25],I=[1,35],m={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(n,d,f,u,_,s,D){var o=s.length-1;switch(_){case 1:return s[o-1];case 2:this.$=[];break;case 3:s[o-1].push(s[o]),this.$=s[o-1];break;case 4:case 5:this.$=s[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=s[o].substr(18);break;case 19:u.TopAxis(),this.$=s[o].substr(8);break;case 20:u.setAxisFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 21:u.setTickInterval(s[o].substr(13)),this.$=s[o].substr(13);break;case 22:u.setExcludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 23:u.setIncludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 24:u.setTodayMarker(s[o].substr(12)),this.$=s[o].substr(12);break;case 27:u.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 28:this.$=s[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 33:u.addTask(s[o-1],s[o]),this.$="task";break;case 34:this.$=s[o-1],u.setClickEvent(s[o-1],s[o],null);break;case 35:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],s[o]);break;case 36:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],null),u.setLink(s[o-2],s[o]);break;case 37:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-2],s[o-1]),u.setLink(s[o-3],s[o]);break;case 38:this.$=s[o-2],u.setClickEvent(s[o-2],s[o],null),u.setLink(s[o-2],s[o-1]);break;case 39:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-1],s[o]),u.setLink(s[o-3],s[o-2]);break;case 40:this.$=s[o-1],u.setLink(s[o-1],s[o]);break;case 41:case 47:this.$=s[o-1]+" "+s[o];break;case 42:case 43:case 45:this.$=s[o-2]+" "+s[o-1]+" "+s[o];break;case 44:case 46:this.$=s[o-3]+" "+s[o-2]+" "+s[o-1]+" "+s[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:l(function(n,d){if(d.recoverable)this.trace(n);else{var f=new Error(n);throw f.hash=d,f}},"parseError"),parse:l(function(n){var d=this,f=[0],u=[],_=[null],s=[],D=this.table,o="",H=0,c=0,S=2,C=1,R=s.slice.call(arguments,1),E=Object.create(this.lexer),N={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(N.yy[W]=this.yy[W]);E.setInput(n,N.yy),N.yy.lexer=E,N.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var rt=E.yylloc;s.push(rt);var nt=E.options&&E.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){f.length=f.length-2*Q,_.length=_.length-Q,s.length=s.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||E.lex()||C,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var q,K,Z,at,J={},it,tt,qt,vt;;){if(K=f[f.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((q===null||typeof q>"u")&&(q=lt()),Z=D[K]&&D[K][q]),typeof Z>"u"||!Z.length||!Z[0]){var Mt="";vt=[];for(it in D[K])this.terminals_[it]&&it>S&&vt.push("'"+this.terminals_[it]+"'");E.showPosition?Mt="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+E.showPosition()+`
|
|
3
3
|
Expecting `+vt.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Mt="Parse error on line "+(H+1)+": Unexpected "+(q==C?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Mt,{text:E.match,token:this.terminals_[q]||q,line:E.yylineno,loc:rt,expected:vt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+q);switch(Z[0]){case 1:f.push(q),_.push(E.yytext),s.push(E.yylloc),f.push(Z[1]),q=null,c=E.yyleng,o=E.yytext,H=E.yylineno,rt=E.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=_[_.length-tt],J._$={first_line:s[s.length-(tt||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(tt||1)].first_column,last_column:s[s.length-1].last_column},nt&&(J._$.range=[s[s.length-(tt||1)].range[0],s[s.length-1].range[1]]),at=this.performAction.apply(J,[o,c,H,N.yy,Z[1],_,s].concat(R)),typeof at<"u")return at;tt&&(f=f.slice(0,-1*tt*2),_=_.slice(0,-1*tt),s=s.slice(0,-1*tt)),f.push(this.productions_[Z[1]][0]),_.push(J.$),s.push(J._$),qt=D[f[f.length-2]][f[f.length-1]],f.push(qt);break;case 3:return!0}}return!0},"parse")},x=(function(){var y={EOF:1,parseError:l(function(d,f){if(this.yy.parser)this.yy.parser.parseError(d,f);else throw new Error(d)},"parseError"),setInput:l(function(n,d){return this.yy=d||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var d=n.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var d=n.length,f=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;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),f.length-1&&(this.yylineno-=f.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===u.length?this.yylloc.first_column:0)+u[u.length-f.length].length-f[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),d=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as $e}from"./chunk-RE4WF27V-CJEnGv6g.js";import{p as fe}from"./chunk-VII2H2IX-CHqS8QXi.js";import{p as ge}from"./cynefin-OW5HDTMX-GVF3BKWE-DwLRaQ37.js";import{o as ue,n as ye,s as xe,g as me,a as pe,b as be,_ as $,A as ee,l as k,c as z,z as we,B as ke,p as ve,i as L,C as Ce,D as Ee,E as Be}from"./render-O7CIS3YK-DQb_czkx.js";import{_ as X}from"./mermaid-layout-elk.core-CNNSrMhF.js";import{s as Te}from"./transform-Bd_a5eGM.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Le=Ee.gitGraph,D=$(()=>Ce({...Le,...ee().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Be({length:7})}X(Y,"getID");$(Y,"getID");function re(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}X(re,"uniqBy");$(re,"uniqBy");var Me=$(function(e){i.records.direction=e},"setDirection"),Ie=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),_e=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+Y(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),se(r),k.debug("in createBranch")},"branch"),Ge=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${Y()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),He=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+Y(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),se=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function U(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}X(U,"upsert");$(U,"upsert");function J(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);U(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);U(e,r,s)}}e=re(e,s=>s.id),J(e)}X(J,"prettyPrintCommitHistory");$(J,"prettyPrintCommitHistory");var Ae=$(function(){k.debug(i.records.commits);const e=oe()[0];J([e])},"prettyPrint"),Se=$(function(){i.reset(),ve()},"clear"),De=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Pe=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),oe=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),Ne=$(function(){return i.records.direction},"getDirection"),Fe=$(function(){return i.records.head},"getHead"),ce={commitType:p,getConfig:D,setDirection:Me,setOptions:Ie,getOptions:Re,commit:_e,branch:Oe,merge:Ge,cherryPick:He,checkout:se,prettyPrint:Ae,clear:Se,getBranchesAsObjArray:De,getBranches:Pe,getCommits:qe,getCommitsArray:oe,getCurrentBranch:We,getDirection:Ne,getHead:Fe,setAccTitle:be,getAccTitle:pe,getAccDescription:me,setAccDescription:xe,setDiagramTitle:ye,getDiagramTitle:ue},ze=$((e,r)=>{fe(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Ye(t,r)},"populate"),Ye=$((e,r)=>{const o={Commit:$(s=>r.commit(je(s)),"Commit"),Branch:$(s=>r.branch(Ue(s)),"Branch"),Merge:$(s=>r.merge(Ke(s)),"Merge"),Checkout:$(s=>r.checkout(Ve(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Xe(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),je=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ue=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ke=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ve=$(e=>e.branch,"parseCheckout"),Xe=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Je={parse:$(async e=>{const r=await ge("gitGraph",e);k.debug(r),ze(r,ce)},"parse")},G=10,H=40,M=4,R=2,A=8,Q=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Z=12,te=new Set(["redux-color","redux-dark-color"]),Qe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,K=30,N=new Map,V=[],_=0,y="LR",Ze=$(()=>{B.clear(),T.clear(),N.clear(),_=0,V=[],y="LR"},"clear"),ie=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),de=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),er=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),rr=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=ar(a),s=Math.max(o,s)):d.push(a),nr(a,o)}),o=s,d.forEach(n=>{sr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=er(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),tr=$(e=>{var o;const r=de(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),ar=$(e=>tr(e)+H,"calculateCommitPosition"),nr=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),sr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),or=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=Q.has(n??""),l=te.has(n??""),h=Qe.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),cr=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-R).attr("y",t.y+13.5).attr("width",h.width+2*R).attr("height",h.height+2*R),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),ir=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as $e}from"./chunk-RE4WF27V-UTSsxioN.js";import{p as fe}from"./chunk-VII2H2IX-BVHpCn1I.js";import{p as ge}from"./cynefin-OW5HDTMX-GVF3BKWE-Bk0A2gWj.js";import{o as ue,n as ye,s as xe,g as me,a as pe,b as be,_ as $,A as ee,l as k,c as z,z as we,B as ke,p as ve,i as L,C as Ce,D as Ee,E as Be}from"./render-O7CIS3YK-CFl0TSy3.js";import{_ as X}from"./mermaid-layout-elk.core-Cn4RnA6V.js";import{s as Te}from"./transform-Bd_a5eGM.js";import"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Le=Ee.gitGraph,D=$(()=>Ce({...Le,...ee().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Be({length:7})}X(Y,"getID");$(Y,"getID");function re(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}X(re,"uniqBy");$(re,"uniqBy");var Me=$(function(e){i.records.direction=e},"setDirection"),Ie=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),_e=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+Y(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),se(r),k.debug("in createBranch")},"branch"),Ge=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${Y()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),He=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+Y(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),se=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function U(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}X(U,"upsert");$(U,"upsert");function J(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);U(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);U(e,r,s)}}e=re(e,s=>s.id),J(e)}X(J,"prettyPrintCommitHistory");$(J,"prettyPrintCommitHistory");var Ae=$(function(){k.debug(i.records.commits);const e=oe()[0];J([e])},"prettyPrint"),Se=$(function(){i.reset(),ve()},"clear"),De=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Pe=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),oe=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),Ne=$(function(){return i.records.direction},"getDirection"),Fe=$(function(){return i.records.head},"getHead"),ce={commitType:p,getConfig:D,setDirection:Me,setOptions:Ie,getOptions:Re,commit:_e,branch:Oe,merge:Ge,cherryPick:He,checkout:se,prettyPrint:Ae,clear:Se,getBranchesAsObjArray:De,getBranches:Pe,getCommits:qe,getCommitsArray:oe,getCurrentBranch:We,getDirection:Ne,getHead:Fe,setAccTitle:be,getAccTitle:pe,getAccDescription:me,setAccDescription:xe,setDiagramTitle:ye,getDiagramTitle:ue},ze=$((e,r)=>{fe(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Ye(t,r)},"populate"),Ye=$((e,r)=>{const o={Commit:$(s=>r.commit(je(s)),"Commit"),Branch:$(s=>r.branch(Ue(s)),"Branch"),Merge:$(s=>r.merge(Ke(s)),"Merge"),Checkout:$(s=>r.checkout(Ve(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Xe(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),je=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ue=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ke=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ve=$(e=>e.branch,"parseCheckout"),Xe=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Je={parse:$(async e=>{const r=await ge("gitGraph",e);k.debug(r),ze(r,ce)},"parse")},G=10,H=40,M=4,R=2,A=8,Q=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Z=12,te=new Set(["redux-color","redux-dark-color"]),Qe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,K=30,N=new Map,V=[],_=0,y="LR",Ze=$(()=>{B.clear(),T.clear(),N.clear(),_=0,V=[],y="LR"},"clear"),ie=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),de=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),er=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),rr=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=ar(a),s=Math.max(o,s)):d.push(a),nr(a,o)}),o=s,d.forEach(n=>{sr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=er(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),tr=$(e=>{var o;const r=de(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),ar=$(e=>tr(e)+H,"calculateCommitPosition"),nr=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),sr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),or=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=Q.has(n??""),l=te.has(n??""),h=Qe.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),cr=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-R).attr("y",t.y+13.5).attr("width",h.width+2*R).attr("height",h.height+2*R),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),ir=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${o-n/2-M/2},${u+R}
|
|
3
3
|
${o-n/2-M/2},${u-R}
|
|
4
4
|
${t.posWithOffset-n/2-M},${u-x-R}
|
package/web/assets/{gitGraphDiagram-WWUBYQGX-DoayvLMW.js → gitGraphDiagram-WWUBYQGX-UQFgu3MJ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as he}from"./chunk-2Q5K7J3B-Bbluh_im.js";import{p as $e}from"./chunk-JWPE2WC7-DqWkk9f8.js";import{p as fe,o as ge,s as ue,g as ye,a as xe,b as me,_ as $,z as Q,l as k,c as z,y as pe,A as be,q as we,j as L,B as ke,D as ve,E as Ee}from"./mermaid.core-CnNeOEec.js";import{p as Be}from"./cynefin-OW5HDTMX-fybCqBi3.js";import{s as Ce}from"./transform-Bd_a5eGM.js";import"./main-Dj875aWF.js";import"./index-CJuEfFQr.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=ve.gitGraph,D=$(()=>ke({...Te,...Q().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),we()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{C.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=C.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=C.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as he}from"./chunk-2Q5K7J3B-GYjnjq20.js";import{p as $e}from"./chunk-JWPE2WC7-pYmvrIpX.js";import{p as fe,o as ge,s as ue,g as ye,a as xe,b as me,_ as $,z as Q,l as k,c as z,y as pe,A as be,q as we,j as L,B as ke,D as ve,E as Ee}from"./mermaid.core-CbfcuuAo.js";import{p as Be}from"./cynefin-OW5HDTMX-D9H3MYKf.js";import{s as Ce}from"./transform-Bd_a5eGM.js";import"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=ve.gitGraph,D=$(()=>ke({...Te,...Q().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),we()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{C.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=C.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=C.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${o-n/2-M/2},${u+I}
|
|
3
3
|
${o-n/2-M/2},${u-I}
|
|
4
4
|
${t.posWithOffset-n/2-M},${u-x-I}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as Qe,x as o1,y as u1,z as h1,A as c1,D as m1}from"./main
|
|
1
|
+
import{w as Qe,x as o1,y as u1,z as h1,A as c1,D as m1}from"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";function d1(r,e){return Qr(r,{})||{type:"root",children:[]}}function Qr(r,e){const t=f1(r,e);return t&&e.afterTransform&&e.afterTransform(r,t),t}function f1(r,e){switch(r.nodeType){case 1:return b1(r,e);case 3:return v1(r);case 8:return g1(r);case 9:return lr(r,e);case 10:return p1();case 11:return lr(r,e);default:return}}function lr(r,e){return{type:"root",children:_r(r,e)}}function p1(){return{type:"doctype"}}function v1(r){return{type:"text",value:r.nodeValue||""}}function g1(r){return{type:"comment",value:r.nodeValue||""}}function b1(r,e){const t=r.namespaceURI,a=t===Qe.svg?o1:u1,n=t===Qe.html?r.tagName.toLowerCase():r.tagName,s=t===Qe.html&&n==="template"?r.content:r,o=r.getAttributeNames(),h={};let c=-1;for(;++c<o.length;)h[o[c]]=r.getAttribute(o[c])||"";return a(n,h,_r(s,e))}function _r(r,e){const t=r.childNodes,a=[];let n=-1;for(;++n<t.length;){const s=Qr(t[n],e);s!==void 0&&a.push(s)}return a}new DOMParser;function y1(r,e){const t=x1(r);return d1(t)}function x1(r){const e=document.createElement("template");return e.innerHTML=r,e.content}const or=(function(r,e,t){const a=h1(t);if(!r||!r.type||!r.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=r.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<r.children.length;)if(a(r.children[e],e,r))return r.children[e]}),W0=(function(r){if(r==null)return S1;if(typeof r=="string")return k1(r);if(typeof r=="object")return w1(r);if(typeof r=="function")return Rt(r);throw new Error("Expected function, string, or array as `test`")});function w1(r){const e=[];let t=-1;for(;++t<r.length;)e[t]=W0(r[t]);return Rt(a);function a(...n){let s=-1;for(;++s<e.length;)if(e[s].apply(this,n))return!0;return!1}}function k1(r){return Rt(e);function e(t){return t.tagName===r}}function Rt(r){return e;function e(t,a,n){return!!(z1(t)&&r.call(this,t,typeof a=="number"?a:void 0,n||void 0))}}function S1(r){return!!(r&&typeof r=="object"&&"type"in r&&r.type==="element"&&"tagName"in r&&typeof r.tagName=="string")}function z1(r){return r!==null&&typeof r=="object"&&"type"in r&&"tagName"in r}const ur=/\n/g,hr=/[\t ]+/g,pt=W0("br"),cr=W0(E1),A1=W0("p"),mr=W0("tr"),M1=W0(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",q1,N1]),ea=W0(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T1(r,e){const t=e||{},a="children"in r?r.children:[],n=ea(r),s=aa(r,{whitespace:t.whitespace||"normal"}),o=[];(r.type==="text"||r.type==="comment")&&o.push(...ra(r,{breakBefore:!0,breakAfter:!0}));let h=-1;for(;++h<a.length;)o.push(...ta(a[h],r,{whitespace:s,breakBefore:h?void 0:n,breakAfter:h<a.length-1?pt(a[h+1]):n}));const c=[];let f;for(h=-1;++h<o.length;){const v=o[h];typeof v=="number"?f!==void 0&&v>f&&(f=v):v&&(f!==void 0&&f>-1&&c.push(`
|
|
2
2
|
`.repeat(f)||" "),f=-1,c.push(v))}return c.join("")}function ta(r,e,t){return r.type==="element"?B1(r,e,t):r.type==="text"?t.whitespace==="normal"?ra(r,t):C1(r):[]}function B1(r,e,t){const a=aa(r,t),n=r.children||[];let s=-1,o=[];if(M1(r))return o;let h,c;for(pt(r)||mr(r)&&or(e,r,mr)?c=`
|
|
3
3
|
`:A1(r)?(h=2,c=2):ea(r)&&(h=1,c=1);++s<n.length;)o=o.concat(ta(n[s],r,{whitespace:a,breakBefore:s?void 0:h,breakAfter:s<n.length-1?pt(n[s+1]):c}));return cr(r)&&or(e,r,cr)&&o.push(" "),h&&o.unshift(h),c&&o.push(c),o}function ra(r,e){const t=String(r.value),a=[],n=[];let s=0;for(;s<=t.length;){ur.lastIndex=s;const c=ur.exec(t),f=c&&"index"in c?c.index:t.length;a.push(D1(t.slice(s,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?e.breakBefore:!0,f===t.length?e.breakAfter:!0)),s=f+1}let o=-1,h;for(;++o<a.length;)a[o].charCodeAt(a[o].length-1)===8203||o<a.length-1&&a[o+1].charCodeAt(0)===8203?(n.push(a[o]),h=void 0):a[o]?(typeof h=="number"&&n.push(h),n.push(a[o]),h=0):(o===0||o===a.length-1)&&n.push(0);return n}function C1(r){return[String(r.value)]}function D1(r,e,t){const a=[];let n=0,s;for(;n<r.length;){hr.lastIndex=n;const o=hr.exec(r);s=o?o.index:r.length,!n&&!s&&o&&!e&&a.push(""),n!==s&&a.push(r.slice(n,s)),n=o?s+o[0].length:s}return n!==s&&!t&&a.push(""),a.join(" ")}function aa(r,e){if(r.type==="element"){const t=r.properties||{};switch(r.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function q1(r){return!!(r.properties||{}).hidden}function E1(r){return r.tagName==="td"||r.tagName==="th"}function N1(r){return r.tagName==="dialog"&&!(r.properties||{}).open}class S extends Error{constructor(e,t){var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&̲"),f;n>15?f="…"+h.slice(n-15,n):f=h.slice(0,n);var v;s+15<h.length?v=h.slice(s,s+15)+"…":v=h.slice(s),a+=f+c+v}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,S.prototype),this.position=n,n!=null&&s!=null&&(this.length=s-n),this.rawMessage=e}}var I1=/([A-Z])/g,R1=r=>r.replace(I1,"-$1").toLowerCase(),F1={"&":"&",">":">","<":"<",'"':""","'":"'"},O1=/[&><"']/g,n0=r=>String(r).replace(O1,e=>F1[e]),De=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?De(r.body[0]):r:r.type==="font"?De(r.body):r,H1=new Set(["mathord","textord","atom"]),D0=r=>H1.has(De(r).type),L1=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},vt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function P1(r){if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function G1(r){if(r.default!==void 0)return r.default;var e=Array.isArray(r.type)?r.type[0]:r.type;return P1(e)}function U1(r,e,t,a){var n=t[e];r[e]=n!==void 0?a.processor?a.processor(n):n:G1(a)}class Ft{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(vt)){var a=vt[t];a&&U1(this,t,e,a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new S("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=L1(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class F0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return w0[V1[this.id]]}sub(){return w0[X1[this.id]]}fracNum(){return w0[Y1[this.id]]}fracDen(){return w0[$1[this.id]]}cramp(){return w0[W1[this.id]]}text(){return w0[j1[this.id]]}isTight(){return this.size>=2}}var Ot=0,Ee=1,ee=2,B0=3,me=4,v0=5,te=6,l0=7,w0=[new F0(Ot,0,!1),new F0(Ee,0,!0),new F0(ee,1,!1),new F0(B0,1,!0),new F0(me,2,!1),new F0(v0,2,!0),new F0(te,3,!1),new F0(l0,3,!0)],V1=[me,v0,me,v0,te,l0,te,l0],X1=[v0,v0,v0,v0,l0,l0,l0,l0],Y1=[ee,B0,me,v0,te,l0,te,l0],$1=[B0,B0,v0,v0,l0,l0,l0,l0],W1=[Ee,Ee,B0,B0,v0,v0,l0,l0],j1=[Ot,Ee,ee,B0,ee,B0,ee,B0],R={DISPLAY:w0[Ot],TEXT:w0[ee],SCRIPT:w0[me],SCRIPTSCRIPT:w0[te]},gt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Z1(r){for(var e=0;e<gt.length;e++)for(var t=gt[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var qe=[];gt.forEach(r=>r.blocks.forEach(e=>qe.push(...e)));function na(r){for(var e=0;e<qe.length;e+=2)if(r>=qe[e]&&r<=qe[e+1])return!0;return!1}var r0=r=>r+" "+r,_0=80,K1=function(e,t){return"M95,"+(622+e+t)+`
|
|
4
4
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk.bundled-Fo5ndUql.js","./index-CJuEfFQr.js","./index-CvvLDKMx.css","./_commonjs-dynamic-modules-TDtrdbi3.js","./mermaid.core-
|
|
2
|
-
import{r as h,j as e,c as de}from"./index-CJuEfFQr.js";import{c as Q,u as L,b as me,r as ue,X as J,_ as U,E as he,H as O,I as fe,N as xe,k as ge,J as be,K as pe,i as Y,O as we,Q as je,R as ye,V as ke}from"./main
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk.bundled-Fo5ndUql.js","./index-CJuEfFQr.js","./index-CvvLDKMx.css","./_commonjs-dynamic-modules-TDtrdbi3.js","./mermaid.core-CbfcuuAo.js","./main--EWP6PLx.js","./main-D9IB7N5p.css","./transform-Bd_a5eGM.js","./mermaid-layout-elk.core-Cn4RnA6V.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as h,j as e,c as de}from"./index-CJuEfFQr.js";import{c as Q,u as L,b as me,r as ue,X as J,_ as U,E as he,H as O,I as fe,N as xe,k as ge,J as be,K as pe,i as Y,O as we,Q as je,R as ye,V as ke}from"./main--EWP6PLx.js";import{M as H,C as F}from"./CanvasStage-BoukoDwf.js";import{A as ve}from"./arrow-right-Bl9PmQY3.js";import{R as Ne}from"./rotate-ccw-B-Vp-q5_.js";/**
|
|
3
3
|
* @license lucide-react v0.468.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
@@ -17,5 +17,5 @@ import{r as h,j as e,c as de}from"./index-CJuEfFQr.js";import{c as Q,u as L,b as
|
|
|
17
17
|
*/const Se=Q("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);function K({title:t,onClose:r,children:a}){const n=L(),s=h.useRef(null);return me(s,!0),h.useEffect(()=>{const i=o=>{o.key==="Escape"&&r()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[r]),ue.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-black/80","data-testid":"diagram-viewer-modal","data-noswipe":"",role:"dialog","aria-modal":"true","aria-label":t,children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2.5 shrink-0",onClick:i=>i.stopPropagation(),children:[e.jsx("h3",{className:"text-body font-bold text-white truncate",children:t}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.jsx("span",{className:"text-caption text-white/50 hidden sm:inline",children:n("artifact.viewer.hint")}),e.jsx("button",{onClick:r,"data-testid":"diagram-viewer-close","aria-label":n("action.close"),"data-tooltip":n("action.close"),className:"text-white/70 hover:text-white w-9 h-9 flex items-center justify-center rounded-lg hover:bg-white/10 transition-colors",children:e.jsx(J,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 min-h-0 px-2 pb-2",onClick:r,children:e.jsx("div",{ref:s,className:"h-full w-full",onClick:i=>i.stopPropagation(),children:a})})]}),document.body)}function T(t,r=13){let a=0;for(const n of t)a+=/[\u2e80-\u9fff\uf900-\ufaff\uff00-\uffef\u3000-\u303f]/.test(n)?r:r*.58;return a}const q=118;function Ee(t){if(T(t)<=q)return[t];const r=[];for(let l=0;l<t.length;l++)/[\s/\-—·]/.test(t[l]??"")&&r.push(l);const a=t.length/2;let n=-1,s=1/0;for(const l of r){const g=Math.abs(l+1-a);g<s&&(s=g,n=l)}let i,o;if(n>=0)i=t.slice(0,n+1).trim(),o=t.slice(n+1).trim();else{let l=0,g=0;for(const w of t)if(l+=T(w),g++,l>=T(t)/2)break;i=t.slice(0,g),o=t.slice(g)}if(T(i)<=q&&T(o)<=q)return[i,o];const c=l=>{let g="";for(const w of l){if(T(g+w+"…")>q)break;g+=w}return g+"…"};return[T(i)>q?c(i):i,T(o)>q?c(o):o]}function ie(t,r){const a=Ee(t),n=r?14:13,s=Math.max(...a.map(l=>T(l,n))),i=r?30:24,o=17,c=r?18:14;return{width:Math.min(r?200:180,Math.max(r?92:76,s+i)),height:c+a.length*o,lines:a}}function ze(t,r,a){const n=new Set(t.map(s=>s.id));if(Array.isArray(a)&&a.length>0){const s=new Set,i=[];for(const o of a){if(!o||typeof o.id!="string"||!o.id)continue;const c=Array.isArray(o.nodeIds)?[...new Set(o.nodeIds.filter(l=>typeof l=="string"&&n.has(l)&&!s.has(l)))]:[];c.length<2||(c.forEach(l=>s.add(l)),i.push({id:o.id,label:typeof o.label=="string"&&o.label?o.label:"分组",nodeIds:c}))}if(i.length>0&&!(i.length===1&&s.size===t.length&&t.length>2))return{groups:i,fallback:!1}}return{groups:$e(t,r),fallback:!0}}function $e(t,r){if(t.length<4)return[];const a=new Map(t.map((m,d)=>[m.id,d])),n=new Map;for(const m of t)n.set(m.id,[]);const s=new Set;for(const m of r){if(!a.has(m.from)||!a.has(m.to)||m.from===m.to)continue;const d=[m.from,m.to].sort().join("→");s.has(d)||(s.add(d),n.get(m.from).push(m.to),n.get(m.to).push(m.from))}const i=[...t].sort((m,d)=>{const f=n.get(m.id).length,C=n.get(d.id).length;return f!==C?C-f:(a.get(m.id)??0)-(a.get(d.id)??0)}),o=Math.min(3,Math.max(1,Math.ceil(t.length/4))),c=i.slice(0,o).filter(m=>{var d;return(((d=n.get(m.id))==null?void 0:d.length)??0)>0});if(c.length===0)return[];const l=new Map;c.forEach((m,d)=>l.set(m.id,d));const g=c.map(m=>m.id);for(;g.length;){const m=g.shift(),d=l.get(m);for(const f of n.get(m)??[])l.has(f)||(l.set(f,d),g.push(f))}const w=[];return c.forEach((m,d)=>{const f=t.filter(C=>l.get(C.id)===d).map(C=>C.id);f.length<2||w.push({id:`grp-${m.id}`,label:m.label.length<=5?`${m.label}相关`:m.label,nodeIds:f})}),w}const W=34;function Ie(t,r,a){var m;const n=new Set(t.map(d=>d.id)),s=new Map;for(const d of t)s.set(d.id,0);const i=new Set,o=[];for(const d of r){if(!n.has(d.from)||!n.has(d.to)||d.from===d.to)continue;const f=[d.from,d.to].sort().join("→");i.has(f)||(i.add(f),o.push(d),s.set(d.from,s.get(d.from)+1),s.set(d.to,s.get(d.to)+1))}let c=((m=t[0])==null?void 0:m.id)??"";for(const d of t)(s.get(d.id)??0)>(s.get(c)??0)&&(c=d.id);const l=new Map;for(const d of a)for(const f of d.nodeIds)n.has(f)&&!l.has(f)&&l.set(f,d.id);const g=d=>{const f=ie(d.label,d.id===c||(s.get(d.id)??0)>=4);return{id:d.id,width:Math.ceil(f.width),height:Math.ceil(f.height)}},w=[];for(const d of a){const f=d.nodeIds.filter(C=>l.get(C)===d.id&&n.has(C));f.length!==0&&w.push({id:`g:${d.id}`,layoutOptions:{"elk.padding":`[top=${W},left=14,bottom=12,right=14]`},children:f.map(C=>g(t.find(p=>p.id===C)))})}for(const d of t)l.has(d.id)||w.push(g(d));return{id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.edgeRouting":"ORTHOGONAL","elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":"34","elk.spacing.edgeNode":"26","elk.spacing.componentComponent":"48","elk.layered.spacing.nodeNodeBetweenLayers":"56"},children:w,edges:o.map((d,f)=>({id:`e${f}`,sources:[d.from],targets:[d.to]}))}}function Te(t){if(t.length===0)return{x:0,y:0};if(t.length===1)return t[0];const r=[];let a=0;for(let s=1;s<t.length;s++){const i=Math.hypot(t[s].x-t[s-1].x,t[s].y-t[s-1].y);r.push(i),a+=i}let n=a/2;for(let s=0;s<r.length;s++){if(n<=r[s]||s===r.length-1){const i=r[s]===0?0:n/r[s];return{x:t[s].x+(t[s+1].x-t[s].x)*i,y:t[s].y+(t[s+1].y-t[s].y)*i}}n-=r[s]}return t[t.length-1]}function Le(t,r,a,n,s,i){var b;const o=new Map(r.map(u=>[u.id,u])),c=new Map;n.forEach((u,x)=>c.set(u.id,x%5));const l=new Map(n.map(u=>[u.id,u])),g=new Map;for(const u of n)for(const x of u.nodeIds)g.has(x)||g.set(x,u.id);const w=[],m=[],d=[],f=new Map([["root",{x:0,y:0}]]),C=[],p=(u,x,y,E)=>{var M;for(const S of u.children??[]){const z=x+(S.x??0),I=y+(S.y??0);if((M=S.children)!=null&&M.length){const k=S.id.startsWith("g:")?S.id.slice(2):S.id,v=l.get(k);m.push({id:k,label:(v==null?void 0:v.label)??"分组",x:z,y:I,w:S.width??0,h:S.height??0,colorIdx:c.get(k)??0}),f.set(S.id,{x:z,y:I}),p(S,z,I,k)}else{const k=o.get(S.id);if(!k)continue;const v=ie(k.label,k.id===i),$=g.get(k.id)??null;w.push({id:k.id,x:z,y:I,w:S.width??Math.ceil(v.width),h:S.height??Math.ceil(v.height),lines:v.lines,hub:k.id===i,groupId:E,colorIdx:$!=null?c.get($)??0:-1})}}for(const S of u.edges??[])C.push({e:S,fallback:{x,y}})};p(t,0,0,null);for(const{e:u,fallback:x}of C){const y=(b=u.sections)==null?void 0:b[0];if(!y)continue;const E=(u.container!=null?f.get(u.container):void 0)??x,M=[y.startPoint,...y.bendPoints??[],y.endPoint].map(I=>({x:I.x+E.x,y:I.y+E.y})),S=Number(u.id.slice(1)),z=a[S];z&&d.push({from:z.from,to:z.to,label:z.label,pts:M,labelPt:z.label?Te(M):null})}return{width:Math.ceil(t.width??0),height:Math.ceil(t.height??0),nodes:w,groups:m,edges:d,hubId:i,groupsFallback:s}}let ae=null;function Re(){return ae??(ae=U(()=>import("./elk.bundled-Fo5ndUql.js").then(t=>t.e),__vite__mapDeps([0,1,2,3]),import.meta.url).then(t=>{const r=t,a=r.default??r;return new a})),ae}async function _e(t,r,a){const n=ze(t,r,a),s=Ie(t,r,n.groups),i=qe(t,r),c=await(await Re()).layout(s);return Le(c,t,r,n.groups,n.fallback,i)}function qe(t,r){var o;const a=new Set(t.map(c=>c.id)),n=new Map;for(const c of t)n.set(c.id,0);const s=new Set;for(const c of r){if(!a.has(c.from)||!a.has(c.to)||c.from===c.to)continue;const l=[c.from,c.to].sort().join("→");s.has(l)||(s.add(l),n.set(c.from,n.get(c.from)+1),n.set(c.to,n.get(c.to)+1))}let i=((o=t[0])==null?void 0:o.id)??"";for(const c of t)(n.get(c.id)??0)>(n.get(i)??0)&&(i=c.id);return i}const A=.4,V=2.5,B=.2;function Oe(t){return t.map((r,a)=>`${a===0?"M":"L"} ${r.x.toFixed(1)} ${r.y.toFixed(1)}`).join(" ")}function X({layout:t}){return e.jsxs("svg",{width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,style:{display:"block"},"data-testid":"conceptmap-svg",children:[e.jsx("defs",{children:e.jsx("marker",{id:"cm-arrow",viewBox:"0 0 10 10",refX:9,refY:5,markerWidth:6.5,markerHeight:6.5,orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-ink-faint"})})}),t.groups.map((r,a)=>e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${a*60}ms`},children:[e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:r.h,rx:14,className:"cm-group-box",style:{fill:`var(--cm-c${r.colorIdx}-fill)`,stroke:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:W,rx:14,className:"cm-group-head",style:{fill:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("rect",{x:r.x,y:r.y+W/2,width:r.w,height:W/2,className:"cm-group-head",style:{fill:`var(--cm-c${r.colorIdx}-line)`}}),e.jsx("text",{x:r.x+14,y:r.y+22,fontSize:12,fontWeight:600,fill:`var(--cm-c${r.colorIdx}-line)`,"data-testid":"conceptmap-group-label",children:r.label})]},`g-${r.id}`)),t.edges.map((r,a)=>{const n=r.label?{width:T(r.label,12)+16,height:19}:null;return e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${(t.groups.length+1)*60+a*30}ms`},children:[e.jsx("path",{d:Oe(r.pts),className:"fill-none stroke-ink-faint/80",strokeWidth:1.6,markerEnd:"url(#cm-arrow)"}),r.label&&n&&r.labelPt&&e.jsxs("g",{children:[e.jsx("rect",{x:r.labelPt.x-n.width/2,y:r.labelPt.y-n.height/2,width:n.width,height:n.height,rx:n.height/2,className:"fill-surface-0/95 stroke-[var(--border-faint)]",strokeWidth:1}),e.jsx("text",{x:r.labelPt.x,y:r.labelPt.y+3.5,textAnchor:"middle",fontSize:12,className:"fill-ink-muted font-medium",style:{paintOrder:"stroke"},stroke:"var(--surface-0)",strokeWidth:3,children:r.label})]})]},`e-${a}`)}),t.nodes.map((r,a)=>{const n=r.colorIdx>=0?`var(--cm-c${r.colorIdx}-fill)`:"var(--surface-3)",s=r.colorIdx>=0?`var(--cm-c${r.colorIdx}-line)`:"var(--border)",i=r.hub?14:13;return e.jsxs("g",{className:"cm-enter",style:{animationDelay:`${(t.groups.length+2)*60+a*35}ms`},children:[e.jsx("rect",{x:r.x,y:r.y,width:r.w,height:r.h,rx:r.hub?12:10,fill:n,stroke:s,strokeWidth:r.hub?1.8:1.4}),r.lines.map((o,c)=>e.jsx("text",{x:r.x+r.w/2,y:r.y+r.h/2+(c-(r.lines.length-1)/2)*17+4.5,textAnchor:"middle",fontSize:i,className:r.hub?"fill-ink-strong font-bold":"fill-ink",children:o},c))]},r.id)})]})}function Ae({data:t,variant:r="card"}){const a=t,n=L(),s=h.useMemo(()=>JSON.stringify({n:a.nodes,e:a.edges,g:a.groups??null}),[a.nodes,a.edges,a.groups]),[i,o]=h.useState(null);h.useEffect(()=>{let b=!0;return o(null),_e(a.nodes,a.edges,a.groups??null).then(u=>{b&&o(u)}).catch(()=>{}),()=>{b=!1}},[s]);const[c,l]=h.useState(1),[g,w]=h.useState(!1),m=h.useRef(null);h.useEffect(()=>{const b=m.current;if(!b||!i)return;const u=()=>{const y=(b.clientWidth-16)/i.width;y<1&&l(Math.max(A,+y.toFixed(2)))};u();const x=new ResizeObserver(u);return x.observe(b),()=>x.disconnect()},[i==null?void 0:i.width,i]);const d=h.useCallback(()=>l(b=>Math.min(V,+(b+B).toFixed(2))),[]),f=h.useCallback(()=>l(b=>Math.max(A,+(b-B).toFixed(2))),[]),C=h.useCallback(()=>l(1),[]),p=h.useCallback(b=>{if(!b.ctrlKey&&!b.metaKey)return;b.preventDefault();const u=b.deltaY>0?-B:B;l(x=>Math.min(V,Math.max(A,+(x+u).toFixed(2))))},[]);return r==="canvas"?e.jsx("div",{"data-testid":"conceptmap-canvas-content",children:i?e.jsx(X,{layout:i}):e.jsx("div",{style:{minWidth:320,minHeight:160}})}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-concept-map",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(he,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-1","data-testid":"conceptmap-zoom-controls",children:[e.jsx("button",{onClick:f,disabled:c<=A,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),children:"−"}),e.jsxs("button",{onClick:C,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),children:[Math.round(c*100),"%"]}),e.jsx("button",{onClick:d,disabled:c>=V,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),children:"+"})]}),e.jsx("button",{onClick:()=>w(!0),"data-testid":"conceptmap-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]})]}),e.jsx("div",{ref:m,onClick:()=>w(!0),onWheel:p,className:"bg-surface-0/40 rounded-lg p-2 overflow-auto min-h-[160px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"conceptmap-render-area","data-noswipe":"",children:i?e.jsx("div",{style:{width:i.width*c,height:i.height*c,margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${c})`,transformOrigin:"top left",width:i.width,height:i.height},children:e.jsx(X,{layout:i})})}):e.jsx("div",{className:"h-[152px] flex items-center justify-center text-caption text-ink-muted","data-testid":"conceptmap-loading",children:"…"})}),e.jsx("div",{className:"mt-1.5 flex items-center justify-between text-caption text-ink-muted",children:e.jsx("span",{children:n("artifact.conceptmap.stats",{nodes:a.nodes.length,edges:a.edges.length})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-1 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),g&&e.jsx(K,{title:a.title,onClose:()=>w(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"conceptmap-modal-stage",children:i?e.jsx(X,{layout:i}):e.jsx("div",{className:"min-w-[320px] min-h-[160px]"})})})})]})}function Be(t,r){const{correct:a,total:n}=t,s=n>0&&a===n,i=n>0&&a<n,o=r!=null&&r>=fe,c=r!=null&&r>=xe;return i?[{id:"explain-wrong"},{id:"retry"}]:s&&o?[{id:"next-topic"},{id:"go-deeper"}]:s&&c?[{id:"mark-mastered",advancesMastery:!0},{id:"next-topic"},{id:"go-deeper"}]:[{id:"go-deeper"},{id:"retry"}]}const Pe="ls-quiz-progress:";function We(t){const r=t.questions.map(n=>`${n.prompt}|${(n.options??[]).join("/")}#${n.answer??""}`).join(`
|
|
18
18
|
`);let a=2166136261;for(let n=0;n<r.length;n++)a^=r.charCodeAt(n),a=Math.imul(a,16777619);return`${Pe}${(a>>>0).toString(36)}`}function De(t){var r,a;try{const n=localStorage.getItem(t);if(!n)return null;const s=JSON.parse(n);return typeof(s==null?void 0:s.current)=="number"&&s.current>=0&&typeof((r=s==null?void 0:s.score)==null?void 0:r.correct)=="number"&&typeof((a=s==null?void 0:s.score)==null?void 0:a.total)=="number"?s:null}catch{return null}}function He(t,r){try{localStorage.setItem(t,JSON.stringify(r))}catch{}}const Fe={"explain-wrong":{icon:Ce,labelKey:"quiz.action.explainWrong",message:"我刚才有题答错了,帮我讲讲为什么错、正确的思路是什么。"},retry:{icon:Ne,labelKey:"quiz.action.retry",message:"再来一组类似的题巩固一下。"},"go-deeper":{icon:be,labelKey:"quiz.action.goDeeper",message:"这组我答得不错,帮我深入讲讲背后的原理和容易混淆的地方。"},"mark-mastered":{icon:ge,labelKey:"quiz.action.markMastered",message:"这课我觉得掌握了,帮我确认一下——出个综合题检验,通过了就标记为掌握。"},"next-topic":{icon:ve,labelKey:"quiz.action.nextTopic",message:"进入下一个知识点。"}};function Ke({data:t,onAnswered:r,quizMastery:a,onPickAction:n,onQuizCompleted:s}){const i=t,o=L(),c=h.useMemo(()=>We(i),[i]),l=h.useMemo(()=>De(c),[c]),[g,w]=h.useState((l==null?void 0:l.current)??0),[m,d]=h.useState(null),[f,C]=h.useState(!1),[p,b]=h.useState((l==null?void 0:l.score)??{correct:0,total:0}),u=h.useRef([]),x=h.useRef(null);h.useEffect(()=>{He(c,{current:g,score:p})},[c,g,p]);const[y,E]=h.useState(!1);if(g>=i.questions.length){const k=!!n&&!s;if(s)return e.jsxs("div",{className:"surface-card p-4 text-center","data-testid":"artifact-quiz-done",children:[e.jsx("div",{className:"text-2xl mb-2",children:p.correct===p.total?"🎉":"📚"}),e.jsx("div",{className:"text-body font-bold text-ink",children:o("quiz.scoreSummary",{correct:p.correct,total:p.total})}),y?e.jsx("div",{className:"text-label text-ink-muted mt-1","data-testid":"quiz-hook-sent",children:o("quiz.hook.sent")}):e.jsx("button",{onClick:()=>{E(!0),s({title:i.title??"",correct:p.correct,total:p.total,detail:[...u.current]})},"data-testid":"quiz-hook-finish",className:"btn-3d-brand mt-3 px-5 py-2 text-body",children:o("quiz.hook.finish")})]});const v=k?Be(p,a??null):[];return e.jsxs("div",{className:"surface-card p-4 text-center","data-testid":"artifact-quiz-done",children:[e.jsx("div",{className:"text-2xl mb-2",children:p.correct===p.total?"🎉":"📚"}),e.jsx("div",{className:"text-body font-bold text-ink",children:o("quiz.scoreSummary",{correct:p.correct,total:p.total})}),e.jsx("div",{className:"text-label text-ink-muted mt-1",children:p.correct===p.total?o("quiz.allCorrectHint"):o("quiz.tryAgainHint")}),v.length>0&&e.jsxs("div",{className:"mt-3 space-y-2 text-left","data-testid":"quiz-next-actions",children:[e.jsx("div",{className:"text-label text-ink-muted",children:o("quiz.action.nextPrompt")}),v.map(($,j)=>{const N=Fe[$.id],R=N.icon;return e.jsxs("button",{onClick:()=>n==null?void 0:n(N.message),"data-testid":`quiz-action-${$.id}`,className:`${j===0?"btn-3d-brand":"btn-3d-neutral"} w-full py-2 text-body flex items-center justify-center gap-1.5`,children:[e.jsx(R,{className:"w-4 h-4"}),o(N.labelKey)]},$.id)})]})]})}const M=i.questions[g],S=f&&m===M.answer,z=()=>{if(m===null)return;C(!0);const k=m===M.answer;b(v=>({correct:v.correct+(k?1:0),total:v.total+1})),r==null||r(M,m,k),u.current.push({prompt:M.prompt,chosen:M.options[m]??"?",answerText:M.options[M.answer]??"?",correct:k}),de(k?"correct":"wrong",{origin:k&&x.current?(()=>{const v=x.current.getBoundingClientRect();return{x:v.right-48,y:v.top+24}})():void 0})},I=()=>{g===i.questions.length-1&&s&&!y&&(E(!0),s({title:i.title??"",correct:p.correct,total:p.total,detail:[...u.current]})),w(k=>k+1),d(null),C(!1)};return e.jsxs("div",{ref:x,className:"surface-card p-4","data-testid":"artifact-quiz",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"w-4 h-4 text-brand"}),e.jsx("span",{className:"text-label font-bold text-brand",children:o("quiz.questionProgress",{cur:g+1,total:i.questions.length})})]}),e.jsx("span",{className:"text-label text-ink-muted",children:o("quiz.answeredCorrect",{n:p.correct})})]}),e.jsx("div",{className:"text-body text-ink font-medium mb-3 leading-relaxed",children:M.prompt}),e.jsx("div",{className:"space-y-2 mb-3",children:M.options.map((k,v)=>{const $=m===v,j=f&&v===M.answer,N=f&&$&&!j;return e.jsxs("button",{onClick:()=>!f&&d(v),disabled:f,"data-testid":`quiz-option-${v}`,className:`w-full text-left text-body p-2.5 rounded-lg border-2 font-medium transition-colors ${j?"border-brand bg-brand/10 text-brand animate-answer-correct":N?"border-warning bg-warning/10 text-warning animate-answer-wrong":$?"border-accent bg-accent/10 text-accent":"border-[var(--border)] text-ink-muted hover:border-[var(--border)]"} ${f?"cursor-default":"cursor-pointer"}`,children:[e.jsx("span",{className:"font-bold mr-2",children:String.fromCharCode(65+v)}),k,j&&e.jsx("span",{className:"float-right",children:e.jsx(Y,{className:"w-4 h-4 inline-block"})}),N&&e.jsx("span",{className:"float-right",children:e.jsx(J,{className:"w-4 h-4 inline-block"})})]},v)})}),f&&e.jsxs("div",{className:`rounded-lg p-3 mb-3 text-body leading-relaxed animate-artifact-render ${S?"bg-brand/10 border border-brand/30 text-brand":"bg-warning/10 border border-warning/30 text-warning"}`,"data-testid":"quiz-explanation",children:[e.jsxs("div",{className:"font-bold mb-1 flex items-center gap-1.5",children:[S?e.jsx(Y,{className:"w-4 h-4"}):e.jsx(J,{className:"w-4 h-4"}),e.jsx("span",{children:o(S?"quiz.correct":"quiz.wrong")})]}),e.jsx("div",{className:"text-ink-muted",children:M.explanation})]}),f?e.jsx("button",{onClick:I,"data-testid":"quiz-next",className:"btn-3d-brand w-full py-2 text-body",children:g+1<i.questions.length?o("exercise.next"):o("quiz.finish")}):e.jsx("button",{onClick:z,disabled:m===null,"data-testid":"quiz-submit",className:"btn-3d-brand w-full py-2 text-body disabled:opacity-40",children:o("exercise.submit")}),i.warnings&&i.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:i.warnings.join("; ")})]})]})}function oe({data:t,variant:r="card"}){const a=t,n=L(),[s,i]=h.useState(!1),o=e.jsxs("table",{className:"text-body",style:{width:"max-content",minWidth:"100%"},children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-surface-3/60",children:a.headers.map((c,l)=>e.jsx("th",{className:`px-3 py-2.5 text-left font-bold border-b border-[var(--border)] ${l===0?"text-ink-strong":"text-ink"}`,children:c},l))})}),e.jsx("tbody",{children:a.rows.map((c,l)=>e.jsx("tr",{className:l%2===0?"bg-surface-0/40":"",children:c.map((g,w)=>e.jsx("td",{className:`px-3 py-2.5 border-b border-[var(--border-faint)] align-top leading-relaxed ${w===0?"font-bold text-ink-strong whitespace-nowrap bg-surface-1/40":"text-ink-muted"}`,style:w===0?void 0:{maxWidth:260,overflowWrap:"anywhere"},children:g},w))},l))})]});return r==="canvas"?e.jsx("div",{className:"w-fit","data-testid":"comparetable-canvas-content",children:o}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-compare-table",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(we,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title})]}),e.jsx("button",{onClick:()=>i(!0),"data-testid":"comparetable-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center shrink-0",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsx("div",{className:"overflow-x-auto rounded-lg border border-[var(--border-faint)]",onClick:()=>i(!0),style:{touchAction:"pan-x pan-y"},"data-noswipe":"",children:o}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),s&&e.jsx(K,{title:a.title,onClose:()=>i(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"comparetable-modal-stage",children:e.jsx("div",{className:"p-2 surface-card",children:e.jsx(oe,{data:t,variant:"canvas"})})})})})]})}function Ve(t){const r=t.split(`
|
|
19
19
|
`);for(let a=0;a<r.length;a++){const n=r[a]??"",s=n.trim();if(!(!s||s.startsWith("%%")))return/^flowchart-elk\b/i.test(s)?t:/^(flowchart|graph)\b/i.test(s)?(r[a]=n.replace(/^(\s*)(flowchart|graph)\b/i,"$1flowchart-elk"),r.join(`
|
|
20
|
-
`)):t}return t}let D=null;function Xe(){return D||(D=U(()=>import("./mermaid.core-CnNeOEec.js").then(t=>t.bI),__vite__mapDeps([4,5,1,2,6,7]),import.meta.url).then(async t=>{const r=t.default,{default:a}=await U(async()=>{const{default:n}=await import("./mermaid-layout-elk.core-CNNSrMhF.js").then(s=>s.m);return{default:n}},__vite__mapDeps([8,5,1,2,6]),import.meta.url);return r.registerLayoutLoaders(a),r.initialize({startOnLoad:!1,theme:"base",securityLevel:"loose",themeVariables:Ge(),flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",nodeSpacing:42,rankSpacing:54,padding:10},sequence:{useMaxWidth:!0,boxMargin:8,noteMargin:8,messageMargin:32}}),r})),D}function Ge(){const t=(a,n)=>{if(typeof document>"u")return n;const s=getComputedStyle(document.documentElement).getPropertyValue(a).trim();return s?`rgb(${s})`:n};return{background:"transparent",fontFamily:typeof document<"u"&&getComputedStyle(document.body).fontFamily||"ui-sans-serif, system-ui, sans-serif",fontSize:"14px",primaryColor:t("--surface-3-rgb","rgb(42 43 46)"),primaryBorderColor:t("--border-rgb","rgb(37 38 41)"),primaryTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),secondaryColor:t("--surface-2-rgb","rgb(32 33 36)"),secondaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),secondaryTextColor:t("--ink-rgb","rgb(245 245 250)"),tertiaryColor:t("--surface-1-rgb","rgb(24 25 27)"),tertiaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),tertiaryTextColor:t("--ink-rgb","rgb(245 245 250)"),lineColor:t("--ink-faint-rgb","rgb(117 117 126)"),textColor:t("--ink-rgb","rgb(245 245 250)"),edgeLabelBackground:t("--surface-0-rgb","rgb(12 13 15)"),clusterBkg:t("--surface-1-rgb","rgb(24 25 27)"),clusterBorder:t("--border-faint-rgb","rgb(26 26 29)"),nodeBorder:t("--border-rgb","rgb(37 38 41)"),mainBkg:t("--surface-3-rgb","rgb(42 43 46)"),nodeTextColor:t("--ink-rgb","rgb(245 245 250)"),arrowheadColor:t("--ink-faint-rgb","rgb(117 117 126)"),actorBkg:t("--surface-3-rgb","rgb(42 43 46)"),actorBorder:t("--border-rgb","rgb(37 38 41)"),actorTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),activationBkgColor:t("--surface-3-rgb","rgb(42 43 46)"),activationBorderColor:t("--border-rgb","rgb(37 38 41)"),signalColor:t("--ink-rgb","rgb(245 245 250)"),signalTextColor:t("--ink-rgb","rgb(245 245 250)"),labelBoxBkgColor:t("--surface-2-rgb","rgb(32 33 36)"),labelBoxBorderColor:t("--border-rgb","rgb(37 38 41)"),labelTextColor:t("--ink-rgb","rgb(245 245 250)"),loopTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),noteBkgColor:"rgb(255 200 0 / 0.12)",noteBorderColor:"rgb(255 200 0 / 0.4)",noteTextColor:t("--ink-rgb","rgb(245 245 250)")}}typeof window<"u"&&window.addEventListener("theme-changed",()=>{D=null});async function Ze(t,r){const a=await Xe(),n=Ve(r);try{await a.parse(n)}catch(i){throw new Error(`mermaid 语法校验失败: ${i instanceof Error?i.message:String(i)}`)}const{svg:s}=await a.render(t,n);if(s.includes('aria-roledescription="error"')||s.includes('class="error-text"')||s.includes("Syntax error"))throw new Error("mermaid 渲染失败(语法错误或节点 label 含未转义特殊字符)");return s}function ne(t){let r=5381;for(let a=0;a<t.length;a++)r=(r<<5)+r+t.charCodeAt(a)>>>0;return r.toString(36)}const G=.3,Z=3,P=.2;function ce({data:t,variant:r="card"}){const a=t,n=L(),s={flowchart:n("artifact.diagram.flowchart"),sequence:n("artifact.diagram.sequence"),state:n("artifact.diagram.state")},i=h.useId().replace(/[:]/g,"_"),[o,c]=h.useState({status:"loading"}),[l,g]=h.useState(()=>{try{return sessionStorage.getItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`)??a.mermaid}catch{return a.mermaid}}),[w,m]=h.useState(!1),[d,f]=h.useState(!1),[C,p]=h.useState(0);h.useEffect(()=>{const j=()=>p(N=>N+1);return window.addEventListener("theme-changed",j),()=>window.removeEventListener("theme-changed",j)},[]);const[b,u]=h.useState(null),[x,y]=h.useState(1),[E,M]=h.useState(!1);h.useEffect(()=>{let j=!1;return c({status:"loading"}),u(null),Ze(`mmd-${i}`,l).then(N=>{if(!j&&(c({status:"rendered",svg:N}),l!==a.mermaid))try{sessionStorage.setItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`,l)}catch{}}).catch(N=>{j||(console.error("[MermaidArtifact] render failed:",N),c({status:"error",message:N instanceof Error?N.message:String(N)}))}),()=>{j=!0}},[l,i,C,a.mermaid]),h.useEffect(()=>{var j;o.status!=="error"||w||(m(!0),l===a.mermaid&&(j=window.api)!=null&&j.repairMermaidDiagram&&(f(!0),window.api.repairMermaidDiagram({mermaid:l,errorMessage:o.message,diagramType:a.diagramType}).then(N=>{N.ok&&N.mermaid.trim()&&g(N.mermaid)}).catch(()=>{}).finally(()=>f(!1))))},[o,w,l,a.mermaid,a.diagramType]);const S=`https://mermaid.live/edit#${encodeURIComponent(l)}`,z=h.useCallback(()=>y(j=>Math.min(Z,+(j+P).toFixed(2))),[]),I=h.useCallback(()=>y(j=>Math.max(G,+(j-P).toFixed(2))),[]),k=h.useCallback(()=>y(1),[]),v=h.useCallback(j=>{if(!j.ctrlKey&&!j.metaKey)return;j.preventDefault();const N=j.deltaY>0?-P:P;y(R=>Math.min(Z,Math.max(G,+(R+N).toFixed(2))))},[]),$=o.status==="rendered"?e.jsx("div",{ref:j=>{var N;if(j&&!b){const R=j.querySelector("svg");if(R){const ee=R.getBoundingClientRect(),_=(N=R.viewBox)==null?void 0:N.baseVal,te=_&&_.width?_.width:ee.width,re=_&&_.height?_.height:ee.height;te>0&&re>0&&u({width:te,height:re})}}},style:{width:(b==null?void 0:b.width)??void 0,height:(b==null?void 0:b.height)??void 0},dangerouslySetInnerHTML:{__html:o.svg},"data-testid":"mermaid-svg"}):null;return r==="canvas"?e.jsx("div",{"data-testid":"mermaid-canvas-content",children:$}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-mermaid",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Se,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title}),e.jsx("span",{className:"text-caption font-bold px-1.5 py-0.5 rounded bg-accent/15 text-accent shrink-0",children:s[a.diagramType]??a.diagramType})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[o.status==="rendered"&&e.jsxs("div",{className:"flex items-center gap-1","data-testid":"mermaid-zoom-controls",children:[e.jsx("button",{onClick:I,disabled:x<=G,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),"data-testid":"mermaid-zoom-out",children:"−"}),e.jsxs("button",{onClick:k,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),"data-testid":"mermaid-zoom-reset",children:[Math.round(x*100),"%"]}),e.jsx("button",{onClick:z,disabled:x>=Z,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),"data-testid":"mermaid-zoom-in",children:"+"})]}),o.status==="rendered"&&e.jsx("button",{onClick:()=>M(!0),"data-testid":"mermaid-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsx("button",{onClick:()=>window.open(S,"_blank"),className:"text-caption text-accent hover:underline font-bold shrink-0","data-testid":"mermaid-open-live",title:n("artifact.mermaid.openLive"),children:"mermaid.live ↗"})]}),e.jsxs("div",{onClick:()=>{o.status==="rendered"&&M(!0)},onWheel:v,className:"bg-surface-0/40 rounded-lg p-3 overflow-auto min-h-[120px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"mermaid-render-area","data-noswipe":"",children:[o.status==="loading"&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-loading",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.rendering")})]}),o.status==="rendered"&&e.jsx("div",{style:{width:b?b.width*x:"auto",height:b?b.height*x:"auto",margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${x})`,transformOrigin:"top left"},children:$})}),o.status==="error"&&d&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-repairing",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.repairing")})]}),o.status==="error"&&!d&&e.jsxs("div",{className:"w-full text-center my-4","data-testid":"mermaid-fallback",children:[e.jsxs("div",{className:"text-body text-warning mb-2 flex items-center justify-center gap-1.5",children:[e.jsx(O,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:n("artifact.mermaid.renderFailed")})]}),e.jsx("pre",{className:"text-label bg-surface-1/60 rounded p-2 overflow-x-auto text-ink-muted font-mono text-left",children:l}),e.jsx("div",{className:"text-caption text-ink-muted mt-2",children:n("artifact.mermaid.errorPrefix",{msg:o.message})})]})]}),o.status==="rendered"&&e.jsx("div",{className:"mt-1.5 text-caption text-ink-muted flex items-center gap-2",children:e.jsx("span",{children:n("artifact.mermaid.hint")})}),E&&o.status==="rendered"&&e.jsx(K,{title:a.title,onClose:()=>M(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"mermaid-modal-stage",children:e.jsx(ce,{data:t,variant:"canvas"})})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]})]})}function le({data:t,variant:r="card"}){const a=t,n=L(),[s,i]=h.useState(null),[o,c]=h.useState(!1),l=h.useRef([]),g=h.useRef([]),w=a.code.split(`
|
|
20
|
+
`)):t}return t}let D=null;function Xe(){return D||(D=U(()=>import("./mermaid.core-CbfcuuAo.js").then(t=>t.bI),__vite__mapDeps([4,5,1,2,6,7]),import.meta.url).then(async t=>{const r=t.default,{default:a}=await U(async()=>{const{default:n}=await import("./mermaid-layout-elk.core-Cn4RnA6V.js").then(s=>s.m);return{default:n}},__vite__mapDeps([8,5,1,2,6]),import.meta.url);return r.registerLayoutLoaders(a),r.initialize({startOnLoad:!1,theme:"base",securityLevel:"loose",themeVariables:Ge(),flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",nodeSpacing:42,rankSpacing:54,padding:10},sequence:{useMaxWidth:!0,boxMargin:8,noteMargin:8,messageMargin:32}}),r})),D}function Ge(){const t=(a,n)=>{if(typeof document>"u")return n;const s=getComputedStyle(document.documentElement).getPropertyValue(a).trim();return s?`rgb(${s})`:n};return{background:"transparent",fontFamily:typeof document<"u"&&getComputedStyle(document.body).fontFamily||"ui-sans-serif, system-ui, sans-serif",fontSize:"14px",primaryColor:t("--surface-3-rgb","rgb(42 43 46)"),primaryBorderColor:t("--border-rgb","rgb(37 38 41)"),primaryTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),secondaryColor:t("--surface-2-rgb","rgb(32 33 36)"),secondaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),secondaryTextColor:t("--ink-rgb","rgb(245 245 250)"),tertiaryColor:t("--surface-1-rgb","rgb(24 25 27)"),tertiaryBorderColor:t("--border-faint-rgb","rgb(26 26 29)"),tertiaryTextColor:t("--ink-rgb","rgb(245 245 250)"),lineColor:t("--ink-faint-rgb","rgb(117 117 126)"),textColor:t("--ink-rgb","rgb(245 245 250)"),edgeLabelBackground:t("--surface-0-rgb","rgb(12 13 15)"),clusterBkg:t("--surface-1-rgb","rgb(24 25 27)"),clusterBorder:t("--border-faint-rgb","rgb(26 26 29)"),nodeBorder:t("--border-rgb","rgb(37 38 41)"),mainBkg:t("--surface-3-rgb","rgb(42 43 46)"),nodeTextColor:t("--ink-rgb","rgb(245 245 250)"),arrowheadColor:t("--ink-faint-rgb","rgb(117 117 126)"),actorBkg:t("--surface-3-rgb","rgb(42 43 46)"),actorBorder:t("--border-rgb","rgb(37 38 41)"),actorTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),activationBkgColor:t("--surface-3-rgb","rgb(42 43 46)"),activationBorderColor:t("--border-rgb","rgb(37 38 41)"),signalColor:t("--ink-rgb","rgb(245 245 250)"),signalTextColor:t("--ink-rgb","rgb(245 245 250)"),labelBoxBkgColor:t("--surface-2-rgb","rgb(32 33 36)"),labelBoxBorderColor:t("--border-rgb","rgb(37 38 41)"),labelTextColor:t("--ink-rgb","rgb(245 245 250)"),loopTextColor:t("--ink-strong-rgb","rgb(250 250 250)"),noteBkgColor:"rgb(255 200 0 / 0.12)",noteBorderColor:"rgb(255 200 0 / 0.4)",noteTextColor:t("--ink-rgb","rgb(245 245 250)")}}typeof window<"u"&&window.addEventListener("theme-changed",()=>{D=null});async function Ze(t,r){const a=await Xe(),n=Ve(r);try{await a.parse(n)}catch(i){throw new Error(`mermaid 语法校验失败: ${i instanceof Error?i.message:String(i)}`)}const{svg:s}=await a.render(t,n);if(s.includes('aria-roledescription="error"')||s.includes('class="error-text"')||s.includes("Syntax error"))throw new Error("mermaid 渲染失败(语法错误或节点 label 含未转义特殊字符)");return s}function ne(t){let r=5381;for(let a=0;a<t.length;a++)r=(r<<5)+r+t.charCodeAt(a)>>>0;return r.toString(36)}const G=.3,Z=3,P=.2;function ce({data:t,variant:r="card"}){const a=t,n=L(),s={flowchart:n("artifact.diagram.flowchart"),sequence:n("artifact.diagram.sequence"),state:n("artifact.diagram.state")},i=h.useId().replace(/[:]/g,"_"),[o,c]=h.useState({status:"loading"}),[l,g]=h.useState(()=>{try{return sessionStorage.getItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`)??a.mermaid}catch{return a.mermaid}}),[w,m]=h.useState(!1),[d,f]=h.useState(!1),[C,p]=h.useState(0);h.useEffect(()=>{const j=()=>p(N=>N+1);return window.addEventListener("theme-changed",j),()=>window.removeEventListener("theme-changed",j)},[]);const[b,u]=h.useState(null),[x,y]=h.useState(1),[E,M]=h.useState(!1);h.useEffect(()=>{let j=!1;return c({status:"loading"}),u(null),Ze(`mmd-${i}`,l).then(N=>{if(!j&&(c({status:"rendered",svg:N}),l!==a.mermaid))try{sessionStorage.setItem(`mmdfix:${a.mermaid.length}:${ne(a.mermaid)}`,l)}catch{}}).catch(N=>{j||(console.error("[MermaidArtifact] render failed:",N),c({status:"error",message:N instanceof Error?N.message:String(N)}))}),()=>{j=!0}},[l,i,C,a.mermaid]),h.useEffect(()=>{var j;o.status!=="error"||w||(m(!0),l===a.mermaid&&(j=window.api)!=null&&j.repairMermaidDiagram&&(f(!0),window.api.repairMermaidDiagram({mermaid:l,errorMessage:o.message,diagramType:a.diagramType}).then(N=>{N.ok&&N.mermaid.trim()&&g(N.mermaid)}).catch(()=>{}).finally(()=>f(!1))))},[o,w,l,a.mermaid,a.diagramType]);const S=`https://mermaid.live/edit#${encodeURIComponent(l)}`,z=h.useCallback(()=>y(j=>Math.min(Z,+(j+P).toFixed(2))),[]),I=h.useCallback(()=>y(j=>Math.max(G,+(j-P).toFixed(2))),[]),k=h.useCallback(()=>y(1),[]),v=h.useCallback(j=>{if(!j.ctrlKey&&!j.metaKey)return;j.preventDefault();const N=j.deltaY>0?-P:P;y(R=>Math.min(Z,Math.max(G,+(R+N).toFixed(2))))},[]),$=o.status==="rendered"?e.jsx("div",{ref:j=>{var N;if(j&&!b){const R=j.querySelector("svg");if(R){const ee=R.getBoundingClientRect(),_=(N=R.viewBox)==null?void 0:N.baseVal,te=_&&_.width?_.width:ee.width,re=_&&_.height?_.height:ee.height;te>0&&re>0&&u({width:te,height:re})}}},style:{width:(b==null?void 0:b.width)??void 0,height:(b==null?void 0:b.height)??void 0},dangerouslySetInnerHTML:{__html:o.svg},"data-testid":"mermaid-svg"}):null;return r==="canvas"?e.jsx("div",{"data-testid":"mermaid-canvas-content",children:$}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-mermaid",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Se,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title}),e.jsx("span",{className:"text-caption font-bold px-1.5 py-0.5 rounded bg-accent/15 text-accent shrink-0",children:s[a.diagramType]??a.diagramType})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[o.status==="rendered"&&e.jsxs("div",{className:"flex items-center gap-1","data-testid":"mermaid-zoom-controls",children:[e.jsx("button",{onClick:I,disabled:x<=G,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomOut"),"data-testid":"mermaid-zoom-out",children:"−"}),e.jsxs("button",{onClick:k,className:"px-1.5 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 text-caption font-bold tabular-nums",title:n("artifact.zoomReset"),"data-testid":"mermaid-zoom-reset",children:[Math.round(x*100),"%"]}),e.jsx("button",{onClick:z,disabled:x>=Z,className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-1 hover:bg-surface-3 disabled:opacity-30 text-label font-bold flex items-center justify-center",title:n("artifact.zoomIn"),"data-testid":"mermaid-zoom-in",children:"+"})]}),o.status==="rendered"&&e.jsx("button",{onClick:()=>M(!0),"data-testid":"mermaid-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsx("button",{onClick:()=>window.open(S,"_blank"),className:"text-caption text-accent hover:underline font-bold shrink-0","data-testid":"mermaid-open-live",title:n("artifact.mermaid.openLive"),children:"mermaid.live ↗"})]}),e.jsxs("div",{onClick:()=>{o.status==="rendered"&&M(!0)},onWheel:v,className:"bg-surface-0/40 rounded-lg p-3 overflow-auto min-h-[120px] max-h-[500px] select-none",style:{touchAction:"pan-x pan-y"},"data-testid":"mermaid-render-area","data-noswipe":"",children:[o.status==="loading"&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-loading",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.rendering")})]}),o.status==="rendered"&&e.jsx("div",{style:{width:b?b.width*x:"auto",height:b?b.height*x:"auto",margin:"0 auto"},children:e.jsx("div",{style:{transform:`scale(${x})`,transformOrigin:"top left"},children:$})}),o.status==="error"&&d&&e.jsxs("div",{className:"flex items-center gap-2 text-body text-ink-muted my-8 justify-center","data-testid":"mermaid-repairing",children:[e.jsx("span",{className:"typing-dot w-1.5 h-1.5 bg-accent rounded-full inline-block"}),e.jsx("span",{children:n("artifact.mermaid.repairing")})]}),o.status==="error"&&!d&&e.jsxs("div",{className:"w-full text-center my-4","data-testid":"mermaid-fallback",children:[e.jsxs("div",{className:"text-body text-warning mb-2 flex items-center justify-center gap-1.5",children:[e.jsx(O,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{children:n("artifact.mermaid.renderFailed")})]}),e.jsx("pre",{className:"text-label bg-surface-1/60 rounded p-2 overflow-x-auto text-ink-muted font-mono text-left",children:l}),e.jsx("div",{className:"text-caption text-ink-muted mt-2",children:n("artifact.mermaid.errorPrefix",{msg:o.message})})]})]}),o.status==="rendered"&&e.jsx("div",{className:"mt-1.5 text-caption text-ink-muted flex items-center gap-2",children:e.jsx("span",{children:n("artifact.mermaid.hint")})}),E&&o.status==="rendered"&&e.jsx(K,{title:a.title,onClose:()=>M(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"mermaid-modal-stage",children:e.jsx(ce,{data:t,variant:"canvas"})})})}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]})]})}function le({data:t,variant:r="card"}){const a=t,n=L(),[s,i]=h.useState(null),[o,c]=h.useState(!1),l=h.useRef([]),g=h.useRef([]),w=a.code.split(`
|
|
21
21
|
`),[m,d]=h.useState(null);h.useEffect(()=>{let u=!0;return je(a.code,a.language).then(x=>{u&&x&&d(x)}),()=>{u=!1}},[a.code,a.language]);const f=u=>{if(s===null)return!1;const x=a.annotations[s];return x&&u>=x.lineStart&&u<=x.lineEnd},C=u=>{const x=s===u?null:u;if(i(x),x!==null){const y=a.annotations[x],E=(o?g:l).current[y.lineStart-1];E==null||E.scrollIntoView({behavior:"smooth",block:"center"})}},p=u=>e.jsx("div",{className:"bg-neutral-950 rounded-lg overflow-hidden border border-neutral-800 max-h-[420px] overflow-y-auto",children:e.jsx("pre",{className:"text-label font-mono leading-relaxed overflow-x-auto",children:e.jsx("code",{children:w.map((x,y)=>{const E=y+1;return e.jsxs("div",{ref:M=>{u.current[y]=M},className:`flex ${f(E)?"bg-brand/15":""}`,children:[e.jsx("span",{className:"select-none text-neutral-600 pr-3 pl-3 text-right w-10 shrink-0 border-r border-neutral-800 tabular-nums",children:E}),m&&m[y]!=null?e.jsx("span",{className:"pl-3 whitespace-pre text-neutral-200","data-testid":"walk-shiki-line",dangerouslySetInnerHTML:{__html:m[y]||" "}}):e.jsx("span",{className:"text-neutral-200 pl-3 whitespace-pre",children:x||" "})]},y)})})})}),b=e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-caption font-bold text-ink-muted",children:n("artifact.codewalk.sectionLabel")}),a.annotations.map((u,x)=>e.jsxs("button",{onClick:()=>C(x),"data-testid":`annotation-${x}`,className:`w-full text-left p-2.5 rounded-lg border transition-colors ${s===x?"border-brand bg-brand/10":"border-[var(--border-faint)] hover:border-[var(--border)]"}`,children:[e.jsx("div",{className:"text-caption font-bold text-brand mb-0.5",children:u.lineEnd!==u.lineStart?n("artifact.codewalk.lineRange",{a:u.lineStart,b:u.lineEnd}):n("artifact.codewalk.lineSingle",{n:u.lineStart})}),e.jsx("div",{className:"text-body text-ink-muted leading-relaxed",children:u.note})]},x))]});return r==="canvas"?e.jsx("div",{className:"w-fit","data-testid":"codewalk-canvas-content",children:p(g)}):e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-code-walkthrough",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ye,{className:"w-4 h-4 text-ink-muted shrink-0"}),e.jsx("h3",{className:"text-body font-bold text-ink truncate",children:a.title}),e.jsx("span",{className:"text-caption font-bold px-1.5 py-0.5 rounded bg-surface-3 text-ink-muted font-mono shrink-0",children:a.language})]}),e.jsx("button",{onClick:()=>c(!0),"data-testid":"codewalk-expand","aria-label":n("artifact.viewer.open"),"data-tooltip":n("artifact.viewer.open"),className:"w-6 h-6 rounded border border-[var(--border)] text-ink-muted hover:bg-surface-3 flex items-center justify-center shrink-0",children:e.jsx(H,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[e.jsx("div",{onClick:()=>{o||c(!0)},style:{touchAction:"pan-x pan-y"},"data-noswipe":"",children:p(l)}),b]}),a.warnings&&a.warnings.length>0&&e.jsxs("div",{className:"mt-2 text-caption text-warning flex items-start gap-1","data-testid":"artifact-warnings",children:[e.jsx(O,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"}),e.jsx("span",{children:a.warnings.join("; ")})]}),o&&e.jsx(K,{title:a.title,onClose:()=>c(!1),children:e.jsx("div",{className:"h-full w-full rounded-xl overflow-hidden bg-surface-0/60",children:e.jsx(F,{testid:"codewalk-modal-stage",children:e.jsx(le,{data:t,variant:"canvas"})})})})]})}function Je({data:t,onPickAction:r}){const a=t,n=L(),[s,i]=h.useState(null),o=c=>{s||(i(c.id),r==null||r(`${n("guess.pickedPrefix")}${c.label}`))};return e.jsxs("div",{className:"surface-card p-4","data-testid":"artifact-guess",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(Me,{className:"w-4 h-4 text-accent"}),e.jsx("span",{className:"text-label font-bold text-accent",children:n("guess.header")})]}),e.jsx("div",{className:"text-body text-ink font-medium mb-3 leading-relaxed",children:a.prompt}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 mb-2",children:a.options.map(c=>{const l=s===c.id,g=s!==null;return e.jsxs("button",{onClick:()=>o(c),disabled:g,"data-testid":`guess-option-${c.id}`,className:`text-body p-2.5 rounded-lg border-2 font-medium transition-colors text-left flex items-center justify-between gap-2 ${l?"border-accent bg-accent/10 text-accent":g?"border-[var(--border-faint)] text-ink-faint cursor-default":"border-[var(--border)] text-ink-muted hover:border-accent hover:text-accent cursor-pointer"}`,children:[e.jsx("span",{children:c.label}),l&&e.jsx(Y,{className:"w-4 h-4 shrink-0"})]},c.id)})}),s&&e.jsx("div",{className:"text-label text-ink-muted mt-1","data-testid":"guess-picked-hint",children:n("guess.waitReveal")}),a.warnings&&a.warnings.length>0&&e.jsx("div",{className:"mt-2 text-caption text-warning","data-testid":"artifact-warnings",children:a.warnings.join("; ")})]})}function rt({data:t,onQuizAnswered:r,quizMastery:a,onPickAction:n,onQuizCompleted:s,variant:i="card"}){const o=t;if(!o||!o.artifactType)return e.jsx(se,{data:t});switch(o.artifactType){case"concept_map":return e.jsx(Ae,{data:t,variant:i});case"quiz":return e.jsx(Ke,{data:t,onAnswered:r,quizMastery:a,onPickAction:n,onQuizCompleted:s});case"compare_table":return e.jsx(oe,{data:t,variant:i});case"diagram":return e.jsx(ce,{data:t,variant:i});case"code_walkthrough":return e.jsx(le,{data:t,variant:i});case"guess":return e.jsx(Je,{data:t,onPickAction:n});default:return e.jsx(se,{data:t})}}function se({data:t}){var a;const r=L();return e.jsxs("div",{className:"surface-card p-4 text-body text-ink-muted","data-testid":"artifact-unknown",children:[e.jsxs("div",{className:"font-bold mb-1 flex items-center gap-1.5",children:[e.jsx(ke,{className:"w-4 h-4"}),r("artifact.unknownHeader")]}),e.jsx("pre",{className:"text-caption overflow-x-auto text-ink-muted",children:(a=JSON.stringify(t,null,2))==null?void 0:a.slice(0,200)})]})}export{rt as ArtifactRenderer,le as CodeWalkthroughArtifact,oe as CompareTableArtifact,Ae as ConceptMapArtifact,Je as GuessArtifact,ce as MermaidArtifact,Ke as QuizArtifact};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as M,l as b,j as k,m as g}from"./main
|
|
1
|
+
import{o as M,l as b,j as k,m as g}from"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";function P(){return{enter:{mathFlow:t,mathFlowFenceMeta:u,mathText:c},exit:{mathFlow:e,mathFlowFence:i,mathFlowFenceMeta:o,mathFlowValue:m,mathText:s,mathTextData:m}};function t(r){const l={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[l]}},r)}function u(){this.buffer()}function o(){const r=this.resume(),l=this.stack[this.stack.length-1];M(l.type==="math"),l.meta=r}function i(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function e(r){const l=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];M(h.type==="math"),this.exit(r),h.value=l;const x=h.data.hChildren[0];M(x.type==="element"),M(x.tagName==="code"),x.children.push({type:"text",value:l}),this.data.mathFlowInside=void 0}function c(r){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},r),this.buffer()}function s(r){const l=this.resume(),h=this.stack[this.stack.length-1];M(h.type==="inlineMath"),this.exit(r),h.value=l,h.data.hChildren.push({type:"text",value:l})}function m(r){this.config.enter.data.call(this,r),this.config.exit.data.call(this,r)}}function D(t){let u=(t||{}).singleDollarTextMath;return u==null&&(u=!0),i.peek=e,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
2
2
|
`,inConstruct:"mathFlowMeta"},{character:"$",after:u?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:o,inlineMath:i}};function o(c,s,m,r){const l=c.value||"",h=m.createTracker(r),x="$".repeat(Math.max(b(l,"$")+1,2)),w=m.enter("mathFlow");let p=h.move(x);if(c.meta){const F=m.enter("mathFlowMeta");p+=h.move(m.safe(c.meta,{after:`
|
|
3
3
|
`,before:p,encode:["$"],...h.current()})),F()}return p+=h.move(`
|
|
4
4
|
`),l&&(p+=h.move(l+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,l as s,F as n,d as i}from"./mermaid.core-
|
|
1
|
+
import{_ as e,l as s,F as n,d as i}from"./mermaid.core-CbfcuuAo.js";import{p}from"./cynefin-OW5HDTMX-D9H3MYKf.js";import"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";import"./transform-Bd_a5eGM.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},d={version:"11.17.2"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,o)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},y={parser:g,db:m,renderer:l};export{y as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as i}from"./cynefin-OW5HDTMX-GVF3BKWE-
|
|
1
|
+
import{p as i}from"./cynefin-OW5HDTMX-GVF3BKWE-Bk0A2gWj.js";import{_ as e,l as o,G as n,d as p}from"./render-O7CIS3YK-CFl0TSy3.js";import"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";import"./mermaid-layout-elk.core-Cn4RnA6V.js";import"./transform-Bd_a5eGM.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var g={parse:e(async r=>{const a=await i("info",r);o.debug(a)},"parse")},d={version:"11.17.0"},m=e(()=>d.version,"getVersion"),v={getVersion:m},c=e((r,a,s)=>{o.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=n(a);p(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),l={draw:c},z={parser:g,db:v,renderer:l};export{z as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as o,c as ht,H as dt,G as yt,aI as pt,p as ft,i as gt,n as st,a as kt,b as mt,g as wt,s as _t,o as xt,d as bt}from"./render-O7CIS3YK-
|
|
1
|
+
import{_ as o,c as ht,H as dt,G as yt,aI as pt,p as ft,i as gt,n as st,a as kt,b as mt,g as wt,s as _t,o as xt,d as bt}from"./render-O7CIS3YK-CFl0TSy3.js";import{_ as $}from"./mermaid-layout-elk.core-Cn4RnA6V.js";import"./main--EWP6PLx.js";import"./index-CJuEfFQr.js";import"./transform-Bd_a5eGM.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var et=(function(){var e=o(function(P,t,s,i){for(s=s||{},i=P.length;i--;s[P[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],p=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],b=[1,6,7,11,13,14],D={trace:o($(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o($(function(t,s,i,u,f,n,v){var w=n.length-1;switch(f){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:p,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:p,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(b,[2,11]),e(b,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o($(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),"parseError"),parse:o($(function(t){var s=this,i=[0],u=[],f=[null],n=[],v=this.table,w="",L=0,E=0,T=2,I=1,V=n.slice.call(arguments,1),x=Object.create(this.lexer),R={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(R.yy[G]=this.yy[G]);x.setInput(t,R.yy),R.yy.lexer=x,R.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var M=x.yylloc;n.push(M);var O=x.options&&x.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(B){i.length=i.length-2*B,f.length=f.length-B,n.length=n.length-B}$(z,"popStack"),o(z,"popStack");function F(){var B;return B=u.pop()||x.lex()||I,typeof B!="number"&&(B instanceof Array&&(u=B,B=u.pop()),B=s.symbols_[B]||B),B}$(F,"lex"),o(F,"lex");for(var A,j,N,Q,U={},Y,W,it,K;;){if(j=i[i.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=F()),N=v[j]&&v[j][A]),typeof N>"u"||!N.length||!N[0]){var J="";K=[];for(Y in v[j])this.terminals_[Y]&&Y>T&&K.push("'"+this.terminals_[Y]+"'");x.showPosition?J="Parse error on line "+(L+1)+`:
|
|
2
2
|
`+x.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[A]||A)+"'":J="Parse error on line "+(L+1)+": Unexpected "+(A==I?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(J,{text:x.match,token:this.terminals_[A]||A,line:x.yylineno,loc:M,expected:K})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(N[0]){case 1:i.push(A),f.push(x.yytext),n.push(x.yylloc),i.push(N[1]),A=null,E=x.yyleng,w=x.yytext,L=x.yylineno,M=x.yylloc;break;case 2:if(W=this.productions_[N[1]][1],U.$=f[f.length-W],U._$={first_line:n[n.length-(W||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(W||1)].first_column,last_column:n[n.length-1].last_column},O&&(U._$.range=[n[n.length-(W||1)].range[0],n[n.length-1].range[1]]),Q=this.performAction.apply(U,[w,E,L,R.yy,N[1],f,n].concat(V)),typeof Q<"u")return Q;W&&(i=i.slice(0,-1*W*2),f=f.slice(0,-1*W),n=n.slice(0,-1*W)),i.push(this.productions_[N[1]][0]),f.push(U.$),n.push(U._$),it=v[i[i.length-2]][i[i.length-1]],i.push(it);break;case 3:return!0}}return!0},"parse"),"parse")},C=(function(){var P={EOF:1,parseError:o($(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;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),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|