@juki-team/base-ui 1.5.19 → 1.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/esm/{BarChart-BvTDut5Q.js → BarChart-iS9A5dpq.js} +1 -1
  2. package/dist/esm/{CartesianChart-DXJUzdHO.js → CartesianChart-DRkVAUTl.js} +1 -1
  3. package/dist/esm/{ChangePasswordModal-CWpZcVtX.js → ChangePasswordModal-DWcV41bD.js} +1 -1
  4. package/dist/esm/{CodeEditor-Y_Y_KGwk.js → CodeEditor-BIbu4VxL.js} +1 -1
  5. package/dist/esm/{CodeViewer-0wZyL6Bq.js → CodeViewer-BUV-dalv.js} +1 -1
  6. package/dist/esm/{Collapse-B1DPGlnv.js → Collapse-paq7oWgG.js} +1 -1
  7. package/dist/esm/{DataViewer-BfSurhEG.js → DataViewer-CMI27AMZ.js} +1 -1
  8. package/dist/esm/{DrawerView-DSBtwsMA.js → DrawerView-WQzHX5l-.js} +1 -1
  9. package/dist/esm/{ExcalidrawButton-yv6E00bG.js → ExcalidrawButton-Dkt-wFZK.js} +1 -1
  10. package/dist/esm/{GraphvizViewer-DakATts5.js → GraphvizViewer-CYGvah6j.js} +1 -1
  11. package/dist/esm/{ImageLoaderCropper-C8OKbFOn.js → ImageLoaderCropper-DIEHTOiU.js} +1 -1
  12. package/dist/esm/{InputCellPhoneNumber-BEXEJTBK.js → InputCellPhoneNumber-DgviNp4t.js} +1 -1
  13. package/dist/esm/{InputColor-CbPh2iDK.js → InputColor-BSBlv1oE.js} +1 -1
  14. package/dist/esm/{LineChart-COzz604R.js → LineChart-BdYnYefg.js} +1 -1
  15. package/dist/esm/{MdMath-DtFnLyF6.js → MdMath-KE8c-hVy.js} +1 -1
  16. package/dist/esm/{MdMathEditor-MfrmiBkf.js → MdMathEditor-DbH_jI7Y.js} +1 -1
  17. package/dist/esm/{Popover-rAcowqkt.js → Popover-BLy0OI8L.js} +1 -1
  18. package/dist/esm/{SlideDeck-BNzpTHHg.js → SlideDeck-o1krblz8.js} +1 -1
  19. package/dist/esm/{TableOfContents-BReKKYKJ.js → TableOfContents-DPsfG1VD.js} +1 -1
  20. package/dist/esm/{Tooltip-RM4-Vd-G.js → Tooltip-BI0Xe-XW.js} +1 -1
  21. package/dist/esm/{UserCodeEditor-BCEc8t_t.js → UserCodeEditor-CcaAG5g_.js} +2 -2
  22. package/dist/esm/{VirtualizedRowsFixed-CJ-W5Lx9.js → VirtualizedRowsFixed-VrMhZ4XD.js} +1 -1
  23. package/dist/esm/{WorksheetAsSlides-B11okTdK.js → WorksheetAsSlides-kPK5Z2vF.js} +1 -1
  24. package/dist/esm/{WorksheetBodies-d_OdcX-s.js → WorksheetBodies-CxDz0Rxa.js} +1 -1
  25. package/dist/esm/{WorksheetContents-BTVure1H.js → WorksheetContents-Dxo5Xc3Y.js} +1 -1
  26. package/dist/esm/{WorksheetEditor-EvB90uEy.js → WorksheetEditor-CvFYzeZC.js} +1 -1
  27. package/dist/esm/{WorksheetNode-Bi_SPWLG.js → WorksheetNode-DgQD3PMR.js} +1 -1
  28. package/dist/esm/{WorksheetViewer-bf0RET7d.js → WorksheetViewer-DR45PXUH.js} +1 -1
  29. package/dist/esm/{abnfDiagram-WEYOIA3C-DUulIW8V.js → abnfDiagram-WEYOIA3C-2vvvjt5F.js} +1 -1
  30. package/dist/esm/{arc-DFzzPj4i.js → arc-C-pwTbE4.js} +1 -1
  31. package/dist/esm/{architectureDiagram-ZHVYKT53-CgOYCH5f.js → architectureDiagram-ZHVYKT53-Njrg16Bb.js} +1 -1
  32. package/dist/esm/{blockDiagram-RJAE7QA3-Dx--ga4x.js → blockDiagram-RJAE7QA3-OuYPx21T.js} +1 -1
  33. package/dist/esm/{c4Diagram-XDPPPE54-COXzepKB.js → c4Diagram-XDPPPE54-C4-sgPqw.js} +1 -1
  34. package/dist/esm/channel-3HQcLN5a.js +1 -0
  35. package/dist/esm/{chunk-2E7WHVMD-DVZL7NAY.js → chunk-2E7WHVMD-BeozrAac.js} +1 -1
  36. package/dist/esm/{chunk-2Q5K7J3B-eykHmSYq.js → chunk-2Q5K7J3B-4_3njuk_.js} +1 -1
  37. package/dist/esm/{chunk-4EMNKR2T-BiH2YqCm.js → chunk-4EMNKR2T-DwE6V67-.js} +1 -1
  38. package/dist/esm/{chunk-55XCU76K-DkZ5SylO.js → chunk-55XCU76K-CpG64yyk.js} +1 -1
  39. package/dist/esm/{chunk-5VM5RSS4-od-ppdXO.js → chunk-5VM5RSS4-CkeQhgn7.js} +1 -1
  40. package/dist/esm/{chunk-JWPE2WC7-Ban7escN.js → chunk-JWPE2WC7-CVtFylX6.js} +1 -1
  41. package/dist/esm/{chunk-NQOKRVIF-DFUjH0uz.js → chunk-NQOKRVIF-CYlkwWmJ.js} +1 -1
  42. package/dist/esm/{chunk-VQ5W62QI-8RFxNRa_.js → chunk-VQ5W62QI-Be8I4VMn.js} +1 -1
  43. package/dist/esm/{chunk-XXDRQBXY-BLNKkmc0.js → chunk-XXDRQBXY-0jU-YNFU.js} +1 -1
  44. package/dist/esm/{chunk-ZCHMQSOR-BhhsuCkN.js → chunk-ZCHMQSOR-Cwl9AHIQ.js} +1 -1
  45. package/dist/esm/{classDiagram-v2-4MYWR3UA-CeKl1zzm.js → classDiagram-v2-4MYWR3UA-CgLXcYDZ.js} +1 -1
  46. package/dist/esm/{cose-bilkent-JH36ORCC-DM7-KVzj.js → cose-bilkent-JH36ORCC-BUYPdwFO.js} +1 -1
  47. package/dist/esm/{cynefinDiagram-WF24UDRP-Cbf70uGf.js → cynefinDiagram-WF24UDRP-DFlv0vTF.js} +1 -1
  48. package/dist/esm/{dagre-NK4GIZVX-WvANG2YF.js → dagre-NK4GIZVX-D3hfxWjC.js} +1 -1
  49. package/dist/esm/{diagram-CBK3MWTC-czBpYiMW.js → diagram-CBK3MWTC-Dz3S8vtv.js} +1 -1
  50. package/dist/esm/{diagram-I5XIIV2D-D0K29cS6.js → diagram-I5XIIV2D-CWQZNyHk.js} +1 -1
  51. package/dist/esm/{diagram-ODIL2UCW-DJOtGvRy.js → diagram-ODIL2UCW-RwcoAn2X.js} +1 -1
  52. package/dist/esm/{diagram-PFBEJUXE-Bb7d4gy5.js → diagram-PFBEJUXE-BQ65i8Sl.js} +1 -1
  53. package/dist/esm/{diagram-RJA3I4VV-766WDxVQ.js → diagram-RJA3I4VV-D3wAXEKx.js} +1 -1
  54. package/dist/esm/{diagram-TYUNFSNR-jxQ7Yf7F.js → diagram-TYUNFSNR-CQpNNmke.js} +1 -1
  55. package/dist/esm/{ebnfDiagram-V4P3TTPT-CmQb2zv4.js → ebnfDiagram-V4P3TTPT-x6yeSo0p.js} +1 -1
  56. package/dist/esm/{elk-QONTBCTQ-ed5QeBRk.js → elk-QONTBCTQ-BKyCSI5O.js} +1 -1
  57. package/dist/esm/{erDiagram-KYQIGQAA-DeToaAJo.js → erDiagram-KYQIGQAA-C9n_JA_w.js} +1 -1
  58. package/dist/esm/flowDiagram-IUGLLWBU-BS8vlVHT.js +1 -0
  59. package/dist/esm/{ganttDiagram-R7GPNTJY-DFWpMgXx.js → ganttDiagram-R7GPNTJY-CKebGhU7.js} +1 -1
  60. package/dist/esm/{gitGraphDiagram-PDYL7XHY-CoobcIfr.js → gitGraphDiagram-PDYL7XHY-Bvp1UcgM.js} +1 -1
  61. package/dist/esm/helpers.js +1 -1
  62. package/dist/esm/{index-D1LsGPMS.js → index-BwpxQGdp.js} +1 -1
  63. package/dist/esm/{index-CJ0mP3Zm.js → index-C2_E6s4y.js} +1 -1
  64. package/dist/esm/{infoDiagram-MVDRKAX5-BrsWRbGW.js → infoDiagram-MVDRKAX5-DrROCapb.js} +1 -1
  65. package/dist/esm/{ishikawaDiagram-HPEHV2GE-BAmx-YEw.js → ishikawaDiagram-HPEHV2GE-BGSVKWhg.js} +1 -1
  66. package/dist/esm/{journeyDiagram-BOSHW7O7-CnBSpLoa.js → journeyDiagram-BOSHW7O7-ogVQbHp2.js} +1 -1
  67. package/dist/esm/{kanban-definition-FNSA4HC5-4yCo11oy.js → kanban-definition-FNSA4HC5-lQM4fHQE.js} +1 -1
  68. package/dist/esm/main.js +1 -1
  69. package/dist/esm/{mermaid.core-Dj1WAzSy.js → mermaid.core-CvFWfSA0.js} +2 -2
  70. package/dist/esm/{mindmap-definition-6OY57UG3-Bd4Y4GbF.js → mindmap-definition-6OY57UG3-D8l0C3RA.js} +1 -1
  71. package/dist/esm/{pegDiagram-ECIUJNBX-CK56FMnc.js → pegDiagram-ECIUJNBX-D8xo2dyF.js} +1 -1
  72. package/dist/esm/{pieDiagram-GNMPY74T-BJ1Np7Iw.js → pieDiagram-GNMPY74T-gHG-R83G.js} +1 -1
  73. package/dist/esm/{quadrantDiagram-D57K4MC3-tOVWqHZx.js → quadrantDiagram-D57K4MC3-DDHGqMWG.js} +1 -1
  74. package/dist/esm/{railroadDiagram-Y72NRBL7-BvwPAju5.js → railroadDiagram-Y72NRBL7-BNcAWVzf.js} +1 -1
  75. package/dist/esm/{requirementDiagram-EQYSW5RA-D7P8RO2c.js → requirementDiagram-EQYSW5RA-D0TQZTve.js} +1 -1
  76. package/dist/esm/{sankeyDiagram-SY24JHO5-Hasf32Sf.js → sankeyDiagram-SY24JHO5-BgXxfdaz.js} +1 -1
  77. package/dist/esm/{sequenceDiagram-BLEHNHQU-CVjBG1oF.js → sequenceDiagram-BLEHNHQU-BoejQXUR.js} +1 -1
  78. package/dist/esm/{sizeCapture-INFHLROL-CiSMSiOI.js → sizeCapture-INFHLROL-sNhkxZSt.js} +1 -1
  79. package/dist/esm/{stateDiagram-v2-A6IESKWZ-z0hJGPOR.js → stateDiagram-v2-A6IESKWZ-sy3VIzCQ.js} +1 -1
  80. package/dist/esm/{swimlanes-B3ENRKFQ-CBNFNgNt.js → swimlanes-B3ENRKFQ-BMvTnJVa.js} +1 -1
  81. package/dist/esm/{swimlanesDiagram-AYQRV4AK-Bf9aZNHn.js → swimlanesDiagram-AYQRV4AK-CBA7l1Zm.js} +1 -1
  82. package/dist/esm/{timeline-definition-JXYKGLGB-Cug_uWko.js → timeline-definition-JXYKGLGB-B9uS-p90.js} +1 -1
  83. package/dist/esm/{types-DIz4kTf7.js → types-CdWZmDRI.js} +1 -1
  84. package/dist/esm/{usecaseDiagram-WPOLBNNX-DvMBgn3t.js → usecaseDiagram-WPOLBNNX-55ERmenj.js} +1 -1
  85. package/dist/esm/{vennDiagram-Q3Y3IDCW-BkU3qp5r.js → vennDiagram-Q3Y3IDCW-M46hCRun.js} +1 -1
  86. package/dist/esm/{wardleyDiagram-IVAIDKWA-BgQww2R8.js → wardleyDiagram-IVAIDKWA-DiF93Bmd.js} +1 -1
  87. package/dist/esm/websocket-KESFarc3.js +1 -0
  88. package/dist/esm/{xychartDiagram-4URNHDU4-Dk_dIDtn.js → xychartDiagram-4URNHDU4-epgUCY99.js} +1 -1
  89. package/dist/module-types/src/components/helpers/websocket.d.ts +0 -8
  90. package/package.json +2 -2
  91. package/dist/esm/channel-_i3jSBTX.js +0 -1
  92. package/dist/esm/flowDiagram-IUGLLWBU-XbuBBhyN.js +0 -1
  93. package/dist/esm/websocket-Cz_aqdkJ.js +0 -1
@@ -1 +1 @@
1
- import{s as t,g as i,x as e,v as s,a,b as n,_ as o,l as h,T as r,d as l,C as c,O as g,j as u,Q as x,R as d,a7 as p,a8 as f}from"./mermaid.core-Dj1WAzSy.js";import{b as m}from"./band-D2afako6.js";import{l as y}from"./linear-BCwRtKK9.js";import{l as b}from"./string-DPJhNSkw.js";import"./index-D1LsGPMS.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-C-9EFvh4.js";import"./settings-DzQM72QE.js";import"./index-Zvckkvpn.js";import"./LoaderLayer-CWElgcGs.js";import"./websocket-Cz_aqdkJ.js";import"./index-DpobNvg5.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./init-DLRA0X12.js";import"./ordinal-zwWoQKz9.js";import"./defaultLocale-HOdfsG1x.js";var w=function(){var t=o(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],r=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],w=[1,37],S=[1,43],A=[1,42],C=[1,47],k=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],_=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:o(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,36]),t(r,[2,37]),t(r,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:h}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:h}),{11:23,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:39,13:38,24:S,29:A,30:l,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:45,15:44,29:C,30:l,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:49,17:48,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:52,17:51,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{20:[1,53]},{22:[1,54]},t(R,[2,18]),{1:[2,2]},t(R,[2,8]),t(R,[2,9]),t(T,[2,39],{41:55,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w}),t(T,[2,40]),t(T,[2,41]),t(_,[2,42]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(_,[2,52]),t(_,[2,53]),t(R,[2,10]),t(R,[2,24],{32:41,31:56,24:S,29:A}),t(R,[2,26]),t(R,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(R,[2,11]),t(R,[2,32],{35:60,29:C}),t(R,[2,34]),{33:[1,61]},t(R,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(R,[2,14]),{17:66,24:k},t(R,[2,16]),t(R,[2,17]),t(_,[2,43]),t(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(R,[2,33]),{29:[1,70]},t(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(R,[2,15]),t(R,[2,28]),t(R,[2,29]),{11:59,30:l,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(R,[2,35]),t(R,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:o(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:o(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,r="",l=0,c=0,g=n.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(x.yy[d]=this.yy[d]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;n.push(p);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),o(m,"lex");for(var y,b,w,S,A,C,k,R,T={};;){if(b=e[e.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==y&&(y=m()),w=h[b]&&h[b][y]),void 0===w||!w.length||!w[0]){var _="";for(A in R=[],h[b])this.terminals_[A]&&A>2&&R.push("'"+this.terminals_[A]+"'");_=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(_,{text:u.match,token:this.terminals_[y]||y,line:u.yylineno,loc:p,expected:R})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(w[0]){case 1:e.push(y),a.push(u.yytext),n.push(u.yylloc),e.push(w[1]),y=null,c=u.yyleng,r=u.yytext,l=u.yylineno,p=u.yylloc;break;case 2:if(C=this.productions_[w[1]][1],T.$=a[a.length-C],T._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},f&&(T._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(T,[r,c,l,x.yy,w[1],a,n].concat(g))))return S;C&&(e=e.slice(0,-1*C*2),a=a.slice(0,-1*C),n=n.slice(0,-1*C)),e.push(this.productions_[w[1]][0]),a.push(T.$),n.push(T._$),k=h[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:o(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:o(function(t,i){return this.yy=i||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"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(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:o(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var t=this.next();return t||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return P.lexer=v,o(E,"Parser"),E.prototype=P,P.Parser=E,new E}();w.parser=w;var S=w;function A(t){return"bar"===t.type}function C(t){return"band"===t.type}function k(t){return"linear"===t.type}o(A,"isBarPlot"),o(C,"isBandAxisData"),o(k,"isLinearAxisData");var R=class{constructor(t){this.parentGroup=t}static{o(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i),a=s.node()?.getScreenCTM?.(),n=o(t=>t&&t>0?t:1,"toScale"),h=n(a?.a),r=n(a?.d);for(const a of t){const t=f(s,1,a),n=t?t.width/h:a.length*i,o=t?t.height/r:i;e.width=Math.max(e.width,n),e.height=Math.max(e.height,o)}return s.remove(),e}},T=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{o(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},_=class extends T{static{o(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=m().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=m().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},D=class extends T{static{o(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=y().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=y().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function L(t,i,e,s){const a=new R(s);return C(t)?new _(i,e,t.categories,t.title,a):new D(i,e,[t.min,t.max],t.title,a)}o(L,"getAxis");var P=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{o(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return s<=t.height&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.titleWidth=i.width,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,i){const e=Math.min(this.titleWidth,this.chartConfig.width)/2,s=Math.min(Math.max((t+i)/2,e),this.chartConfig.width-e);this.boundingRect.x=s-e,this.boundingRect.width=2*e}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function v(t,i,e,s){const a=new R(s);return new P(a,t,i,e)}o(v,"getChartTitleComponent");function E(t){return{fontSize:t,markerSize:.75*t,markerSpacing:.35*t,itemSpacing:.5*t}}o(E,"getLegendLayout");var M=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{o(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(t=>t.title):[],0===this.visiblePlots.length)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};const{fontSize:i,markerSize:e,markerSpacing:s,itemSpacing:a}=E(this.chartConfig.legendFontSize),n=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(t=>t.title),i),o=2*this.chartConfig.legendPadding+e+s+n.width,h=2*this.chartConfig.legendPadding+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;return o<=t.width&&h<=t.height?(this.boundingRect.width=o,this.boundingRect.height=h):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(0===this.visiblePlots.length)return[];const{fontSize:t,markerSize:i,markerSpacing:e,itemSpacing:s}=E(this.chartConfig.legendFontSize),a=t+s,n=this.boundingRect.x+this.chartConfig.legendPadding,o=this.boundingRect.y+this.chartConfig.legendPadding,h=[],r=[];for(const[t,e]of this.visiblePlots.entries())if(A(e))h.push({x:n,y:o+t*a,width:i,height:i,fill:e.fill,strokeFill:e.fill,strokeWidth:0});else{const s=o+t*a+i/2;r.push({path:`M ${n},${s} L ${n+i},${s}`,strokeFill:e.strokeFill,strokeWidth:e.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:h},{groupTexts:["legend","markers"],type:"path",data:r},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((s,h)=>({text:s.title,x:n+i+e,y:o+h*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function z(t,i,e,s){const a=new R(s);return new M(a,t,i,e)}o(z,"getChartLegendComponent");var I=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{o(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?b().y(t=>t[0]).x(t=>t[1])(t):b().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},$=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{o(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},B=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{o(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new I(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new $(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function W(t,i,e){return new B(t,i,e)}o(W,"getPlotComponent");var F,O=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:v(t,i,e,s),plot:W(t,i,e),legend:z(t,i,e,s),xAxis:L(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:L(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{o(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a={width:0,height:0},n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,a=this.componentStore.legend.calculateSpace({width:t,height:o}),t-=a.width,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.title.alignTo(e,e+n),this.componentStore.legend.setBoundingBoxXY({x:e+n,y:s+Math.max((o-a.height)/2,0)}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+o}),this.componentStore.yAxis.setRange([s,s+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>A(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n={width:0,height:0},o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),r=this.componentStore.plot.calculateSpace({width:o,height:h});t-=r.width,i-=r.height,r=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=r.height,i-=r.height,this.componentStore.xAxis.setAxisPosition("left"),r=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=r.width,s=r.width,this.componentStore.yAxis.setAxisPosition("top"),r=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=r.height,a=e+r.height,n=this.componentStore.legend.calculateSpace({width:t,height:h}),t-=n.width,t>0&&(o+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.title.alignTo(s,s+o),this.componentStore.legend.setBoundingBoxXY({x:s+o,y:a+Math.max((h-n.height)/2,0)}),this.componentStore.yAxis.setRange([s,s+o]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>A(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},X=class{static{o(this,"XYChartBuilder")}static build(t,i,e,s){return new O(t,i,e,s).getDrawableElement()}},N=0,V=K(),Y=Q(),j=Z(),H=Y.plotColorPalette.split(",").map(t=>t.trim()),U=!1,G=!1;function Q(){const t=p(),i=g();return x(t.xyChart,i.themeVariables.xyChart)}function K(){const t=g();return x(d.xyChart,t.xyChart)}function Z(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function q(t){const i=g();return u(t.trim(),i)}function J(t){F=t}function tt(t){V.chartOrientation="horizontal"===t?"horizontal":"vertical"}function it(t){j.xAxis.title=q(t.text)}function et(t,i){j.xAxis={type:"linear",title:j.xAxis.title,min:t,max:i},U=!0}function st(t){j.xAxis={type:"band",title:j.xAxis.title,categories:t.map(t=>q(t.text))},U=!0}function at(t){j.yAxis.title=q(t.text)}function nt(t,i){j.yAxis={type:"linear",title:j.yAxis.title,min:t,max:i},G=!0}function ot(t){const i=Math.min(...t),e=Math.max(...t),s=k(j.yAxis)?j.yAxis.min:1/0,a=k(j.yAxis)?j.yAxis.max:-1/0;j.yAxis={type:"linear",title:j.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function ht(t){let i=[];if(0===t.length)return i;if(!U){const i=k(j.xAxis)?j.xAxis.min:1/0,e=k(j.xAxis)?j.xAxis.max:-1/0;et(Math.min(i,1),Math.max(e,t.length))}if(C(j.xAxis)&&t.length>j.xAxis.categories.length&&(t=t.slice(0,j.xAxis.categories.length)),G||ot(t),C(j.xAxis)&&(i=j.xAxis.categories.map((i,e)=>[i,t[e]])),k(j.xAxis)){const e=j.xAxis.min,s=j.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{const a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function rt(t){return H[0===t?0:t%H.length]}function lt(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?q(t.label):""),a=ht(e),n=s.some(t=>""!==t);j.plots.push({type:"line",title:q(t.text),strokeFill:rt(N),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),N++}function ct(t,i){const e=ht(i.map(t=>t.value));j.plots.push({type:"bar",title:q(t.text),fill:rt(N),data:e}),N++}function gt(){if(0===j.plots.length)throw Error("No Plot to render, please provide a plot with some data");return j.title=e(),X.build(V,j,Y,F)}function ut(){return Y}function xt(){return V}function dt(){return j}o(Q,"getChartDefaultThemeConfig"),o(K,"getChartDefaultConfig"),o(Z,"getChartDefaultData"),o(q,"textSanitizer"),o(J,"setTmpSVGG"),o(tt,"setOrientation"),o(it,"setXAxisTitle"),o(et,"setXAxisRangeData"),o(st,"setXAxisBand"),o(at,"setYAxisTitle"),o(nt,"setYAxisRangeData"),o(ot,"setYAxisRangeFromPlotData"),o(ht,"transformDataWithoutCategory"),o(rt,"getPlotColorFromPalette"),o(lt,"setLineData"),o(ct,"setBarData"),o(gt,"getDrawableElem"),o(ut,"getChartThemeConfig"),o(xt,"getChartConfig"),o(dt,"getXYChartData");var pt={parser:S,db:{getDrawableElem:gt,clear:o(function(){c(),N=0,V=K(),j={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},Y=Q(),H=Y.plotColorPalette.split(",").map(t=>t.trim()),U=!1,G=!1},"clear"),setAccTitle:n,getAccTitle:a,setDiagramTitle:s,getDiagramTitle:e,getAccDescription:i,setAccDescription:t,setOrientation:tt,setXAxisTitle:it,setXAxisRangeData:et,setXAxisBand:st,setYAxisTitle:at,setYAxisRangeData:nt,setLineData:lt,setBarData:ct,setTmpSVGG:J,getChartThemeConfig:ut,getChartConfig:xt,getXYChartData:dt},renderer:{draw:o((t,i,e,s)=>{const a=s.db,n=a.getChartThemeConfig(),c=a.getChartConfig(),g=a.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(u,"getDominantBaseLine"),o(x,"getTextAnchor"),o(d,"getTextTransformation"),h.debug("Rendering xychart chart\n"+t);const p=r(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");l(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",n.backgroundColor),a.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));const y=a.getDrawableElem(),b={};function w(t){let i=f,e="";for(const[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],i=b[e],i||(i=b[e]=a.append("g").attr("class",t[s]))}return i}o(w,"getGroup");for(const t of y){if(0===t.data.length)continue;const i=w(t.groupTexts);switch(t.type){case"rect":if(i.selectAll("rect").data(t.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){const e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-h};o(s,"fitsHorizontally");const a=.7,h=10,r=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),l=r.map(t=>{const{data:i}=t;let e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}),c=Math.floor(Math.min(...l)),u=o(t=>e?t.data.x+t.data.width+h:t.data.x+t.data.width-h,"determineLabelXPosition");i.selectAll("text").data(r).enter().append("text").attr("x",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",n.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}else{let s=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};o(s,"fitsInBar");const a=10,h=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=h.map(t=>{const{data:i,label:e}=t;let n=i.width/(.7*e.length);for(;!s(t,n,a)&&n>0;)n-=1;return n}),l=Math.floor(Math.min(...r)),c=o(t=>e?t.data.y-a:t.data.y+a,"determineLabelYPosition");i.selectAll("text").data(h).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",c).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",n.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}}break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};export{pt as diagram};
1
+ import{s as t,g as i,x as e,v as s,a,b as n,_ as o,l as h,T as r,d as l,C as c,O as g,j as u,Q as x,R as d,a7 as p,a8 as f}from"./mermaid.core-CvFWfSA0.js";import{b as m}from"./band-D2afako6.js";import{l as y}from"./linear-BCwRtKK9.js";import{l as b}from"./string-DPJhNSkw.js";import"./index-BwpxQGdp.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-C-9EFvh4.js";import"./settings-DzQM72QE.js";import"./index-Zvckkvpn.js";import"./LoaderLayer-CWElgcGs.js";import"./websocket-KESFarc3.js";import"./index-DpobNvg5.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./init-DLRA0X12.js";import"./ordinal-zwWoQKz9.js";import"./defaultLocale-HOdfsG1x.js";var w=function(){var t=o(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],r=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],w=[1,37],S=[1,43],A=[1,42],C=[1,47],k=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],_=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:o(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,36]),t(r,[2,37]),t(r,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:h}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:h}),{11:23,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:39,13:38,24:S,29:A,30:l,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:45,15:44,29:C,30:l,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:49,17:48,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:52,17:51,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{20:[1,53]},{22:[1,54]},t(R,[2,18]),{1:[2,2]},t(R,[2,8]),t(R,[2,9]),t(T,[2,39],{41:55,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w}),t(T,[2,40]),t(T,[2,41]),t(_,[2,42]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(_,[2,52]),t(_,[2,53]),t(R,[2,10]),t(R,[2,24],{32:41,31:56,24:S,29:A}),t(R,[2,26]),t(R,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(R,[2,11]),t(R,[2,32],{35:60,29:C}),t(R,[2,34]),{33:[1,61]},t(R,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(R,[2,14]),{17:66,24:k},t(R,[2,16]),t(R,[2,17]),t(_,[2,43]),t(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(R,[2,33]),{29:[1,70]},t(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(R,[2,15]),t(R,[2,28]),t(R,[2,29]),{11:59,30:l,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(R,[2,35]),t(R,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:o(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:o(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,r="",l=0,c=0,g=n.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(x.yy[d]=this.yy[d]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;n.push(p);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),o(m,"lex");for(var y,b,w,S,A,C,k,R,T={};;){if(b=e[e.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==y&&(y=m()),w=h[b]&&h[b][y]),void 0===w||!w.length||!w[0]){var _="";for(A in R=[],h[b])this.terminals_[A]&&A>2&&R.push("'"+this.terminals_[A]+"'");_=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(_,{text:u.match,token:this.terminals_[y]||y,line:u.yylineno,loc:p,expected:R})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(w[0]){case 1:e.push(y),a.push(u.yytext),n.push(u.yylloc),e.push(w[1]),y=null,c=u.yyleng,r=u.yytext,l=u.yylineno,p=u.yylloc;break;case 2:if(C=this.productions_[w[1]][1],T.$=a[a.length-C],T._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},f&&(T._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(T,[r,c,l,x.yy,w[1],a,n].concat(g))))return S;C&&(e=e.slice(0,-1*C*2),a=a.slice(0,-1*C),n=n.slice(0,-1*C)),e.push(this.productions_[w[1]][0]),a.push(T.$),n.push(T._$),k=h[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:o(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:o(function(t,i){return this.yy=i||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];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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 i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"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(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:o(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var t=this.next();return t||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return P.lexer=v,o(E,"Parser"),E.prototype=P,P.Parser=E,new E}();w.parser=w;var S=w;function A(t){return"bar"===t.type}function C(t){return"band"===t.type}function k(t){return"linear"===t.type}o(A,"isBarPlot"),o(C,"isBandAxisData"),o(k,"isLinearAxisData");var R=class{constructor(t){this.parentGroup=t}static{o(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i),a=s.node()?.getScreenCTM?.(),n=o(t=>t&&t>0?t:1,"toScale"),h=n(a?.a),r=n(a?.d);for(const a of t){const t=f(s,1,a),n=t?t.width/h:a.length*i,o=t?t.height/r:i;e.width=Math.max(e.width,n),e.height=Math.max(e.height,o)}return s.remove(),e}},T=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{o(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},_=class extends T{static{o(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=m().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=m().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},D=class extends T{static{o(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=y().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=y().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function L(t,i,e,s){const a=new R(s);return C(t)?new _(i,e,t.categories,t.title,a):new D(i,e,[t.min,t.max],t.title,a)}o(L,"getAxis");var P=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{o(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return s<=t.height&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.titleWidth=i.width,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,i){const e=Math.min(this.titleWidth,this.chartConfig.width)/2,s=Math.min(Math.max((t+i)/2,e),this.chartConfig.width-e);this.boundingRect.x=s-e,this.boundingRect.width=2*e}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function v(t,i,e,s){const a=new R(s);return new P(a,t,i,e)}o(v,"getChartTitleComponent");function E(t){return{fontSize:t,markerSize:.75*t,markerSpacing:.35*t,itemSpacing:.5*t}}o(E,"getLegendLayout");var M=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{o(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(t=>t.title):[],0===this.visiblePlots.length)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};const{fontSize:i,markerSize:e,markerSpacing:s,itemSpacing:a}=E(this.chartConfig.legendFontSize),n=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(t=>t.title),i),o=2*this.chartConfig.legendPadding+e+s+n.width,h=2*this.chartConfig.legendPadding+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;return o<=t.width&&h<=t.height?(this.boundingRect.width=o,this.boundingRect.height=h):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(0===this.visiblePlots.length)return[];const{fontSize:t,markerSize:i,markerSpacing:e,itemSpacing:s}=E(this.chartConfig.legendFontSize),a=t+s,n=this.boundingRect.x+this.chartConfig.legendPadding,o=this.boundingRect.y+this.chartConfig.legendPadding,h=[],r=[];for(const[t,e]of this.visiblePlots.entries())if(A(e))h.push({x:n,y:o+t*a,width:i,height:i,fill:e.fill,strokeFill:e.fill,strokeWidth:0});else{const s=o+t*a+i/2;r.push({path:`M ${n},${s} L ${n+i},${s}`,strokeFill:e.strokeFill,strokeWidth:e.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:h},{groupTexts:["legend","markers"],type:"path",data:r},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((s,h)=>({text:s.title,x:n+i+e,y:o+h*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function z(t,i,e,s){const a=new R(s);return new M(a,t,i,e)}o(z,"getChartLegendComponent");var I=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{o(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?b().y(t=>t[0]).x(t=>t[1])(t):b().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},$=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{o(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},B=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{o(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new I(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new $(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function W(t,i,e){return new B(t,i,e)}o(W,"getPlotComponent");var F,O=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:v(t,i,e,s),plot:W(t,i,e),legend:z(t,i,e,s),xAxis:L(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:L(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{o(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a={width:0,height:0},n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,a=this.componentStore.legend.calculateSpace({width:t,height:o}),t-=a.width,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.title.alignTo(e,e+n),this.componentStore.legend.setBoundingBoxXY({x:e+n,y:s+Math.max((o-a.height)/2,0)}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+o}),this.componentStore.yAxis.setRange([s,s+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>A(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n={width:0,height:0},o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),r=this.componentStore.plot.calculateSpace({width:o,height:h});t-=r.width,i-=r.height,r=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=r.height,i-=r.height,this.componentStore.xAxis.setAxisPosition("left"),r=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=r.width,s=r.width,this.componentStore.yAxis.setAxisPosition("top"),r=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=r.height,a=e+r.height,n=this.componentStore.legend.calculateSpace({width:t,height:h}),t-=n.width,t>0&&(o+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.title.alignTo(s,s+o),this.componentStore.legend.setBoundingBoxXY({x:s+o,y:a+Math.max((h-n.height)/2,0)}),this.componentStore.yAxis.setRange([s,s+o]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>A(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},X=class{static{o(this,"XYChartBuilder")}static build(t,i,e,s){return new O(t,i,e,s).getDrawableElement()}},N=0,V=K(),Y=Q(),j=Z(),H=Y.plotColorPalette.split(",").map(t=>t.trim()),U=!1,G=!1;function Q(){const t=p(),i=g();return x(t.xyChart,i.themeVariables.xyChart)}function K(){const t=g();return x(d.xyChart,t.xyChart)}function Z(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function q(t){const i=g();return u(t.trim(),i)}function J(t){F=t}function tt(t){V.chartOrientation="horizontal"===t?"horizontal":"vertical"}function it(t){j.xAxis.title=q(t.text)}function et(t,i){j.xAxis={type:"linear",title:j.xAxis.title,min:t,max:i},U=!0}function st(t){j.xAxis={type:"band",title:j.xAxis.title,categories:t.map(t=>q(t.text))},U=!0}function at(t){j.yAxis.title=q(t.text)}function nt(t,i){j.yAxis={type:"linear",title:j.yAxis.title,min:t,max:i},G=!0}function ot(t){const i=Math.min(...t),e=Math.max(...t),s=k(j.yAxis)?j.yAxis.min:1/0,a=k(j.yAxis)?j.yAxis.max:-1/0;j.yAxis={type:"linear",title:j.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function ht(t){let i=[];if(0===t.length)return i;if(!U){const i=k(j.xAxis)?j.xAxis.min:1/0,e=k(j.xAxis)?j.xAxis.max:-1/0;et(Math.min(i,1),Math.max(e,t.length))}if(C(j.xAxis)&&t.length>j.xAxis.categories.length&&(t=t.slice(0,j.xAxis.categories.length)),G||ot(t),C(j.xAxis)&&(i=j.xAxis.categories.map((i,e)=>[i,t[e]])),k(j.xAxis)){const e=j.xAxis.min,s=j.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{const a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function rt(t){return H[0===t?0:t%H.length]}function lt(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?q(t.label):""),a=ht(e),n=s.some(t=>""!==t);j.plots.push({type:"line",title:q(t.text),strokeFill:rt(N),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),N++}function ct(t,i){const e=ht(i.map(t=>t.value));j.plots.push({type:"bar",title:q(t.text),fill:rt(N),data:e}),N++}function gt(){if(0===j.plots.length)throw Error("No Plot to render, please provide a plot with some data");return j.title=e(),X.build(V,j,Y,F)}function ut(){return Y}function xt(){return V}function dt(){return j}o(Q,"getChartDefaultThemeConfig"),o(K,"getChartDefaultConfig"),o(Z,"getChartDefaultData"),o(q,"textSanitizer"),o(J,"setTmpSVGG"),o(tt,"setOrientation"),o(it,"setXAxisTitle"),o(et,"setXAxisRangeData"),o(st,"setXAxisBand"),o(at,"setYAxisTitle"),o(nt,"setYAxisRangeData"),o(ot,"setYAxisRangeFromPlotData"),o(ht,"transformDataWithoutCategory"),o(rt,"getPlotColorFromPalette"),o(lt,"setLineData"),o(ct,"setBarData"),o(gt,"getDrawableElem"),o(ut,"getChartThemeConfig"),o(xt,"getChartConfig"),o(dt,"getXYChartData");var pt={parser:S,db:{getDrawableElem:gt,clear:o(function(){c(),N=0,V=K(),j={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},Y=Q(),H=Y.plotColorPalette.split(",").map(t=>t.trim()),U=!1,G=!1},"clear"),setAccTitle:n,getAccTitle:a,setDiagramTitle:s,getDiagramTitle:e,getAccDescription:i,setAccDescription:t,setOrientation:tt,setXAxisTitle:it,setXAxisRangeData:et,setXAxisBand:st,setYAxisTitle:at,setYAxisRangeData:nt,setLineData:lt,setBarData:ct,setTmpSVGG:J,getChartThemeConfig:ut,getChartConfig:xt,getXYChartData:dt},renderer:{draw:o((t,i,e,s)=>{const a=s.db,n=a.getChartThemeConfig(),c=a.getChartConfig(),g=a.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(u,"getDominantBaseLine"),o(x,"getTextAnchor"),o(d,"getTextTransformation"),h.debug("Rendering xychart chart\n"+t);const p=r(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");l(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",n.backgroundColor),a.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));const y=a.getDrawableElem(),b={};function w(t){let i=f,e="";for(const[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],i=b[e],i||(i=b[e]=a.append("g").attr("class",t[s]))}return i}o(w,"getGroup");for(const t of y){if(0===t.data.length)continue;const i=w(t.groupTexts);switch(t.type){case"rect":if(i.selectAll("rect").data(t.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){const e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-h};o(s,"fitsHorizontally");const a=.7,h=10,r=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),l=r.map(t=>{const{data:i}=t;let e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}),c=Math.floor(Math.min(...l)),u=o(t=>e?t.data.x+t.data.width+h:t.data.x+t.data.width-h,"determineLabelXPosition");i.selectAll("text").data(r).enter().append("text").attr("x",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",n.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}else{let s=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};o(s,"fitsInBar");const a=10,h=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=h.map(t=>{const{data:i,label:e}=t;let n=i.width/(.7*e.length);for(;!s(t,n,a)&&n>0;)n-=1;return n}),l=Math.floor(Math.min(...r)),c=o(t=>e?t.data.y-a:t.data.y+a,"determineLabelYPosition");i.selectAll("text").data(h).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",c).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",n.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}}break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};export{pt as diagram};
@@ -7,14 +7,6 @@ export declare function getKeyWebSocketEventDto(event: WebSocketSubscribeEventDt
7
7
  length: 24;
8
8
  }}|${string}-${string}` | `SEND_DATA_-${string & {
9
9
  length: 24;
10
- }}|${string}-${string}` | `SEND_DATA_ECS_TASK_DEFINITIONS_LIST-${string & {
11
- length: 24;
12
- }}|${string}-${string}` | `SEND_DATA_ECS_TASKS_LIST-${string & {
13
- length: 24;
14
- }}|${string}-${string}` | `SEND_DATA_EC2_INSTANCES_LIST-${string & {
15
- length: 24;
16
- }}|${string}-${string}` | `SEND_DATA_SSM_SESSIONS_LIST-${string & {
17
- length: 24;
18
10
  }}|${string}-${string}` | `SEND_DATA_RUN_COMMAND-${string & {
19
11
  length: 24;
20
12
  }}|${string}-${string}` | `PROBLEM_CRAWLED-${string & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juki-team/base-ui",
3
- "version": "1.5.19",
3
+ "version": "1.5.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/juki-team/base-ui"
@@ -91,7 +91,7 @@
91
91
  "@floating-ui/react": "^0.27.20",
92
92
  "@handsontable/react-wrapper": "^18.1.2",
93
93
  "@hookform/resolvers": "^6.0.2",
94
- "@juki-team/commons": "0.1.49",
94
+ "@juki-team/commons": "0.1.50",
95
95
  "@mdx-js/mdx": "^3.1.1",
96
96
  "@milkdown/components": "^7.23.0",
97
97
  "@milkdown/core": "^7.23.0",
@@ -1 +0,0 @@
1
- import{U as r,K as a}from"./mermaid.core-Dj1WAzSy.js";const o=(o,s)=>r.lang.round(a.parse(o)[s]);export{o as c};
@@ -1 +0,0 @@
1
- import{d as r}from"./chunk-NQOKRVIF-DFUjH0uz.js";export{c as createFlowDiagram}from"./chunk-NQOKRVIF-DFUjH0uz.js";import"./mermaid.core-Dj1WAzSy.js";import"./chunk-5VM5RSS4-od-ppdXO.js";import"./chunk-XXDRQBXY-BLNKkmc0.js";import"./chunk-VQ5W62QI-8RFxNRa_.js";import"./chunk-55XCU76K-DkZ5SylO.js";import"./channel-_i3jSBTX.js";import"./index-D1LsGPMS.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-C-9EFvh4.js";import"./settings-DzQM72QE.js";import"./index-Zvckkvpn.js";import"./LoaderLayer-CWElgcGs.js";import"./websocket-Cz_aqdkJ.js";import"./index-DpobNvg5.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";export{r as diagram};
@@ -1 +0,0 @@
1
- import{i as e,f as s,j as t,H as a,g as o,c as n,b as r,S as i,a as R,h as l,k as u,l as E,m as c}from"./settings-DzQM72QE.js";import{QueryParamKey as S}from"./enums.js";import{E as d,H as m,j as g}from"./index-DpobNvg5.js";import{i as I,d as p,f as T}from"./commons-C-9EFvh4.js";import{b as _,c as N,d as A,e as U,f as h,g as v,h as C,M as b,L as f}from"./index-Zvckkvpn.js";import{jsx as O}from"react/jsx-runtime";import{Fragment as B}from"react";var w,y,D,M,L,$,G;!function(e){e.FREE="FREE",e.STANDARD="STANDARD",e.PREMIUM="PREMIUM",e.CUSTOM="CUSTOM"}(w||(w={})),function(e){e.HORIZONTAL_WHITE="horizontal-white",e.HORIZONTAL_COLOR="horizontal-color",e.VERTICAL_WHITE="vertical-white",e.VERTICAL_COLOR="vertical-color"}(y||(y={})),function(e){e.SUBSCRIBE_CODE_RUN_STATUS="SUBSCRIBE_CODE_RUN_STATUS",e.UNSUBSCRIBE_CODE_RUN_STATUS="UNSUBSCRIBE_CODE_RUN_STATUS",e.SUBSCRIBE_SUBMISSION_RUN_STATUS="SUBSCRIBE_SUBMISSION_RUN_STATUS",e.UNSUBSCRIBE_SUBMISSION_RUN_STATUS="UNSUBSCRIBE_SUBMISSION_RUN_STATUS",e.SUBSCRIBE_GET_DATA="SUBSCRIBE_GET_DATA",e.UNSUBSCRIBE_GET_DATA="SUBSCRIBE_GET_DATA",e.SUBSCRIBE_PROBLEM_CRAWLED="SUBSCRIBE_PROBLEM_CRAWLED",e.UNSUBSCRIBE_PROBLEM_CRAWLED="UNSUBSCRIBE_PROBLEM_CRAWLED",e.SUBSCRIBE_SUBMISSIONS_CRAWL="SUBSCRIBE_SUBMISSIONS_CRAWL",e.UNSUBSCRIBE_SUBMISSIONS_CRAWL="UNSUBSCRIBE_SUBMISSIONS_CRAWL",e.SUBSCRIBE_CONTEST_CHANGES="SUBSCRIBE_CONTEST_CHANGES",e.UNSUBSCRIBE_CONTEST_CHANGES="UNSUBSCRIBE_CONTEST_CHANGES",e.SUBSCRIBE_USER_NOTIFICATION="SUBSCRIBE_USER_NOTIFICATION",e.UNSUBSCRIBE_USER_NOTIFICATION="UNSUBSCRIBE_USER_NOTIFICATION",e.SUBSCRIBE_SUBMISSIONS_JUDGING="SUBSCRIBE_SUBMISSIONS_JUDGING",e.UNSUBSCRIBE_SUBMISSIONS_JUDGING="UNSUBSCRIBE_SUBMISSIONS_JUDGING"}(D||(D={})),function(e){e.CODE_RUN_STATUS="CODE_RUN_STATUS",e.SUBMISSION_RUN_STATUS="SUBMISSION_RUN_STATUS",e.USER_MESSAGE="USER_MESSAGE",e.SEND_DATA_="SEND_DATA_",e.SEND_DATA_ECS_TASK_DEFINITIONS_LIST="SEND_DATA_ECS_TASK_DEFINITIONS_LIST",e.SEND_DATA_ECS_TASKS_LIST="SEND_DATA_ECS_TASKS_LIST",e.SEND_DATA_EC2_INSTANCES_LIST="SEND_DATA_EC2_INSTANCES_LIST",e.SEND_DATA_SSM_SESSIONS_LIST="SEND_DATA_SSM_SESSIONS_LIST",e.SEND_DATA_RUN_COMMAND="SEND_DATA_RUN_COMMAND",e.PROBLEM_CRAWLED="PROBLEM_CRAWLED",e.SUBMISSIONS_CRAWL="SUBMISSIONS_CRAWL",e.CONTEST_CHANGES="CONTEST_CHANGES",e.USER_NOTIFICATION_="USER_NOTIFICATION_",e.USER_NOTIFICATION_SUBMISSION="USER_NOTIFICATION_SUBMISSION",e.USER_NOTIFICATION_CONTEST_CLARIFICATION="USER_NOTIFICATION_CONTEST_CLARIFICATION",e.SUBMISSION_JUDGING="SUBMISSION_JUDGING"}(M||(M={})),function(e){e.ADMINISTRATORS="administrators",e.MANAGERS="managers",e.PARTICIPANTS="participants",e.GUESTS="guests",e.SPECTATORS="spectators"}(L||(L={})),function(e){e.ADMINISTRATORS="administrators",e.MANAGERS="managers",e.SPECTATORS="spectators"}($||($={})),function(e){e.SPECTATORS="spectators"}(G||(G={}));w.FREE,w.FREE,w.STANDARD,w.STANDARD,w.PREMIUM,w.PREMIUM,w.CUSTOM,w.CUSTOM,A.STANDARD,A.STANDARD,A.INTERACTIVE,A.INTERACTIVE,U.STANDARD,U.STANDARD,U.DYNAMIC,U.DYNAMIC,U.INTERACTIVE,U.INTERACTIVE;const P=[N.TOTAL,N.SUBTASK,N.PARTIAL],j={[N.TOTAL]:{value:N.TOTAL,label:"total",description:"if all test cases are Accepted the result is Accepted otherwise it will be Runtime Error, Time Limited Exceeded, Memory Limited Exceeded, Wrong Answer or Presentation Error in that order."},[N.SUBTASK]:{value:N.SUBTASK,label:"subtask",description:"the test cases are grouped and each group of test cases is assigned a score, if all test cases in a group are Accepted then the score assigned to that group of test cases is added to total score, if total score is equal to the sum of the assigned scores of all groups of test cases then the result is Accepted, otherwise if the total score is greater than zero the result is Partial Accepted with the total accumulated score, otherwise it will be Runtime Error, Time Limited Exceeded, Memory Limited Exceeded, Wrong Answer or Presentation Error in that order."},[N.PARTIAL]:{value:N.PARTIAL,label:"partial",description:"the test cases are grouped and each group is associated with X points, and each test case in a group scores X points "}};_.STANDARD,_.DYNAMIC,_.INTERACTIVE;const K={[_.STANDARD]:{value:_.STANDARD,label:"standard",description:"The contestant submit a single source code in one of the allowed programming languages. The source code is either standalone or to be compiled. The resulting user's executable does I/O standard input and output. The output produced by the contestant's program is then compared to the correct output using a simple diff algorithm."},[_.INTERACTIVE]:{value:_.INTERACTIVE,label:"interactive",description:"developing.."},[_.DYNAMIC]:{value:_.DYNAMIC,label:"dynamic",description:"The contestant submit a single source code in one of the allowed programming languages. The user's source code is either standalone or to be compiled. The resulting user's executable does I/O standard input and output. The output produced by the contestant's program is saved. The problem editor save a single source code in C++ 17. The editor's source code can read judge input filepath argv[1], judge output filepath argv[2], user's output filepath argv[3], user's error filepath argv[4], user's log filepath argv[5], user's source filepath argv[6] and submission information filepath argv[7] (one value per line: organizationId, userId, userNickname, problemId, contestId, submitId, language, timestamp, runId). The resulting editor's executable should be \"AC\" or a number between 1 and 100 for partial accepted"}};h.RESTRICTED,h.RESTRICTED,h.GUEST,h.GUEST,h.REGULAR,h.REGULAR,h.CREATOR,h.CREATOR,h.MANAGER,h.MANAGER,h.MASTER,h.MASTER,h.ADMIN,h.ADMIN,h.SUPER_ADMIN,h.SUPER_ADMIN;const F={[d.ERR500]:{value:d.ERR500,message:"internal server error",status:500},[d.ERR400]:{value:d.ERR400,message:"bad request",status:400},[d.ERR401]:{value:d.ERR401,message:"unauthorized",status:401},[d.ERR403]:{value:d.ERR403,message:"forbidden",status:403},[d.ERR404]:{value:d.ERR404,message:"not found",status:404},[d.ERR405]:{value:d.ERR405,message:"method not allowed",status:405},[d.ERR9997]:{value:d.ERR9997,message:"aborted request",status:400},[d.ERR9998]:{value:d.ERR9998,message:"error on response",status:400},[d.ERR9999]:{value:d.ERR9999,message:"service no found",status:400},[d.ERR9900]:{value:d.ERR9900,message:"internal server error on organization service",status:500},[d.ERR9910]:{value:d.ERR9910,message:"organization not created",status:500},[d.ERR9911]:{value:d.ERR9911,message:"organization not found",status:500},[d.ERR9912]:{value:d.ERR9912,message:"organization not updated",status:500},[d.ERR9913]:{value:d.ERR9913,message:"organization not deleted",status:500},[d.ERR9914]:{value:d.ERR9914,message:"not allowed to create the organization",status:400},[d.ERR9915]:{value:d.ERR9915,message:"not allowed to view the organization",status:400},[d.ERR9916]:{value:d.ERR9916,message:"not allowed to updated the organization",status:400},[d.ERR9917]:{value:d.ERR9917,message:"not allowed to deleted the organization",status:400},[d.ERR0000]:{value:d.ERR0000,message:"internal server error on users service",status:500},[d.ERR0010]:{value:d.ERR0010,message:"user not created",status:500},[d.ERR0011]:{value:d.ERR0011,message:"user not found",status:500},[d.ERR0012]:{value:d.ERR0012,message:"user not updated",status:500},[d.ERR0013]:{value:d.ERR0013,message:"user not deleted",status:500},[d.ERR0014]:{value:d.ERR0014,message:"not allowed to create the user",status:400},[d.ERR0015]:{value:d.ERR0015,message:"not allowed to view the user",status:400},[d.ERR0016]:{value:d.ERR0016,message:"not allowed to updated the user",status:400},[d.ERR0017]:{value:d.ERR0017,message:"not allowed to deleted the user",status:400},[d.ERR0018]:{value:d.ERR0018,message:"user is reported",status:400},[d.ERR0019]:{value:d.ERR0019,message:"user is archived",status:400},[d.ERR0020]:{value:d.ERR0020,message:"user with email requested not found",status:400},[d.ERR0021]:{value:d.ERR0021,message:"user with nickname requested not found",status:400},[d.ERR0022]:{value:d.ERR0022,message:"the email is already registered",status:400},[d.ERR0023]:{value:d.ERR0023,message:"the nickname is already taken",status:400},[d.ERR0024]:{value:d.ERR0024,message:"incorrect password",status:400},[d.ERR0050]:{value:d.ERR0050,message:"user session not created",status:500},[d.ERR0051]:{value:d.ERR0051,message:"user session not found",status:500},[d.ERR0052]:{value:d.ERR0052,message:"user session not updated",status:500},[d.ERR0053]:{value:d.ERR0053,message:"user session not deleted",status:500},[d.ERR0100]:{value:d.ERR0100,message:"internal server error on problems service",status:500},[d.ERR0110]:{value:d.ERR0110,message:"problem not created",status:500},[d.ERR0111]:{value:d.ERR0111,message:"problem not found",status:500},[d.ERR0112]:{value:d.ERR0112,message:"problem not updated",status:500},[d.ERR0113]:{value:d.ERR0113,message:"problem not deleted",status:500},[d.ERR0114]:{value:d.ERR0114,message:"not allowed to create the problem",status:400},[d.ERR0115]:{value:d.ERR0115,message:"not allowed to view the problem",status:400},[d.ERR0116]:{value:d.ERR0116,message:"not allowed to updated the problem",status:400},[d.ERR0117]:{value:d.ERR0117,message:"not allowed to deleted the problem",status:400},[d.ERR0118]:{value:d.ERR0118,message:"problem mode not supported",status:500},[d.ERR0119]:{value:d.ERR0119,message:"problem type not supported",status:500},[d.ERR0120]:{value:d.ERR0120,message:"problem time limit must be a number",status:500},[d.ERR0121]:{value:d.ERR0121,message:"problem memory limit must be number",status:500},[d.ERR0122]:{value:d.ERR0122,message:"test case file empty",status:400},[d.ERR0200]:{value:d.ERR0200,message:"internal server error on contests service",status:500},[d.ERR0210]:{value:d.ERR0210,message:"contest not created",status:500},[d.ERR0211]:{value:d.ERR0211,message:"contest not found",status:500},[d.ERR0212]:{value:d.ERR0212,message:"contest not updated",status:500},[d.ERR0213]:{value:d.ERR0213,message:"contest not deleted",status:500},[d.ERR0214]:{value:d.ERR0214,message:"not allowed to create the contest",status:400},[d.ERR0215]:{value:d.ERR0215,message:"not allowed to view the contest",status:400},[d.ERR0216]:{value:d.ERR0216,message:"not allowed to updated the contest",status:400},[d.ERR0217]:{value:d.ERR0217,message:"not allowed to deleted the contest",status:400},[d.ERR0218]:{value:d.ERR0218,message:"not allowed to register to the contest",status:400},[d.ERR0219]:{value:d.ERR0219,message:"is already registered",status:400},[d.ERR0220]:{value:d.ERR0220,message:"not allowed to view contests",status:400},[d.ERR0230]:{value:d.ERR0230,message:"scoreboard not created",status:500},[d.ERR0231]:{value:d.ERR0231,message:"scoreboard not found",status:500},[d.ERR0232]:{value:d.ERR0232,message:"scoreboard not updated",status:500},[d.ERR0233]:{value:d.ERR0233,message:"scoreboard not deleted",status:500},[d.ERR0234]:{value:d.ERR0234,message:"not allowed to create the scoreboard",status:400},[d.ERR0235]:{value:d.ERR0235,message:"not allowed to view the scoreboard",status:400},[d.ERR0236]:{value:d.ERR0236,message:"not allowed to update the scoreboard",status:400},[d.ERR0237]:{value:d.ERR0237,message:"not allowed to delete the scoreboard",status:400},[d.ERR0240]:{value:d.ERR0240,message:"clarification not created",status:500},[d.ERR0241]:{value:d.ERR0241,message:"clarification not found",status:500},[d.ERR0242]:{value:d.ERR0242,message:"clarification not updated",status:500},[d.ERR0243]:{value:d.ERR0243,message:"clarification not deleted",status:500},[d.ERR0244]:{value:d.ERR0244,message:"not allowed to submit clarification",status:400},[d.ERR0245]:{value:d.ERR0245,message:"not allowed to view clarification",status:400},[d.ERR0246]:{value:d.ERR0246,message:"not allowed to update clarification",status:400},[d.ERR0247]:{value:d.ERR0247,message:"not allowed to delete clarification",status:400},[d.ERR0300]:{value:d.ERR0300,message:"internal server error on submissions service",status:500},[d.ERR0301]:{value:d.ERR0301,message:"submission not found",status:500},[d.ERR0302]:{value:d.ERR0302,message:"submission not created",status:500},[d.ERR0303]:{value:d.ERR0303,message:"submission not updated",status:500},[d.ERR0310]:{value:d.ERR0310,message:"source empty",status:400},[d.ERR0311]:{value:d.ERR0311,message:"programming language not supported",status:400},[d.ERR0321]:{value:d.ERR0321,message:"not allowed submit the problem in the contest",status:400},[d.ERR0331]:{value:d.ERR0331,message:"judgement unavailable",status:400},[d.ERR0400]:{value:d.ERR0400,message:"internal server error on utils services",status:500},[d.ERR0410]:{value:d.ERR0410,message:"empty image",status:400},[d.ERR0420]:{value:d.ERR0420,message:"",status:400},[d.ERR0421]:{value:d.ERR0421,message:"compilation failed",status:400},[d.ERR0430]:{value:d.ERR0430,message:"",status:400},[d.ERR0440]:{value:d.ERR0440,message:"the email could not be sent",status:400},[d.ERR0600]:{value:d.ERR0600,message:"internal server error on teams service",status:500},[d.ERR0610]:{value:d.ERR0610,message:"team not created",status:400},[d.ERR0611]:{value:d.ERR0611,message:"team not found",status:400},[d.ERR0612]:{value:d.ERR0612,message:"team not updated",status:400},[d.ERR0613]:{value:d.ERR0613,message:"team not deleted",status:400},[d.ERR0614]:{value:d.ERR0614,message:"not allowed to create the team",status:400},[d.ERR0615]:{value:d.ERR0615,message:"not allowed to view the team",status:400},[d.ERR0616]:{value:d.ERR0616,message:"not allowed to updated the team",status:400},[d.ERR0617]:{value:d.ERR0617,message:"not allowed to deleted the team",status:400},[d.ERR0618]:{value:d.ERR0618,message:"team is reported",status:400},[d.ERR0619]:{value:d.ERR0619,message:"team is archived",status:400},[d.ERR0800]:{value:d.ERR0800,message:"internal server error on files service",status:500},[d.ERR0810]:{value:d.ERR0810,message:"file not created",status:400},[d.ERR0811]:{value:d.ERR0811,message:"file not found",status:400},[d.ERR0812]:{value:d.ERR0812,message:"file not updated",status:400},[d.ERR0813]:{value:d.ERR0813,message:"file not deleted",status:400},[d.ERR0814]:{value:d.ERR0814,message:"not allowed to create the file",status:400},[d.ERR0815]:{value:d.ERR0815,message:"not allowed to view the file",status:400},[d.ERR0816]:{value:d.ERR0816,message:"not allowed to updated the file",status:400},[d.ERR0817]:{value:d.ERR0817,message:"not allowed to deleted the file",status:400},[d.ERR0818]:{value:d.ERR0818,message:"file is reserved",status:400},[d.ERR0819]:{value:d.ERR0819,message:"file is private",status:400},[d.ERR0820]:{value:d.ERR0820,message:"file is archived",status:400}},k=e=>encodeURIComponent(e),W=(e,s)=>`contest:${k(e)}:${s}`,x=e=>`presence:organization:${k(e)}`;G.SPECTATORS;const H=e=>{const[s,t,a,...o]=e.split(":");return"contest"===s&&t&&!o.length&&Object.values(L).includes(a)?{contestKey:decodeURIComponent(t),role:a}:null},J=e=>{const[s,t,a,...o]=e.split(":");return"problem"===s&&t&&!o.length&&Object.values($).includes(a)?{problemKey:decodeURIComponent(t),role:a}:null};class V extends Error{code;data;constructor(e,s){const t=s?.message||F[e].message;super(t),this.message=t,this.code=e,s?.stack&&(this.stack=s.stack),s?.data&&(this.data=s.data)}}const z=(e,s,t="0")=>`${e}`.padStart(s,t),q=t=>{if(!e(t)){const e={success:!1,message:F[d.ERR9999].message,errors:[{code:d.ERR9999,detail:"",message:F[d.ERR9999].message}]};return s({message:"response is not string json, success false on cleaning request",responseText:t,response:e}),e}const a=JSON.parse(t);if("boolean"==typeof a.success){if(!0===a.success&&"string"==typeof a.message&&a.content)return{success:!0,message:a.message,content:a.content};if(!0===a.success&&"string"==typeof a.message&&Array.isArray(a.contents)&&a.meta)return{success:!0,message:a.message,contents:a.contents,meta:a.meta};if(!1===a.success&&"string"==typeof a.message&&Array.isArray(a.errors)){const e={success:!1,message:a.message,errors:a.errors};return s({message:"success false on cleaning request",responseText:t,response:e}),e}}const o={success:!1,message:F[d.ERR9998].message,errors:[{code:d.ERR9998,detail:"",message:F[d.ERR9998].message}]};return s({message:"success false on cleaning request",responseText:t,response:o}),o},Y=e=>Object.values(D).includes(e?.event)&&"string"==typeof e?.clientId&&!!e.clientId,X=e=>Y(e)&&e?.event===D.SUBSCRIBE_CODE_RUN_STATUS&&"string"==typeof e?.runId&&!!e.runId,Z=e=>Y(e)&&e?.event===D.SUBSCRIBE_SUBMISSION_RUN_STATUS&&"string"==typeof e?.submitId&&!!e.submitId,Q=e=>Y(e)&&e?.event===D.SUBSCRIBE_GET_DATA,ee=e=>Y(e)&&e?.event===D.SUBSCRIBE_PROBLEM_CRAWLED,se=e=>Y(e)&&e?.event===D.SUBSCRIBE_SUBMISSIONS_CRAWL,te=e=>Y(e)&&e?.event===D.SUBSCRIBE_CONTEST_CHANGES,ae=e=>Y(e)&&e?.event===D.SUBSCRIBE_USER_NOTIFICATION,oe=e=>"string"==typeof e&&!!e,ne=e=>1===[e?.problemKey,e?.contestKey,e?.userKey].filter(oe).length,re=e=>Y(e)&&e?.event===D.SUBSCRIBE_SUBMISSIONS_JUDGING&&ne(e),ie=e=>Object.values(M).includes(e?.event)&&"string"==typeof e?.key&&"string"==typeof e?.connectionId&&"number"==typeof e?.createdAt&&!!e.createdAt,Re=e=>ie(e)&&e?.event===M.CODE_RUN_STATUS&&"string"==typeof e?.runId&&!!e.runId&&e?.status in v,le=e=>ie(e)&&e?.event===M.SUBMISSION_RUN_STATUS&&"string"==typeof e?.submitId&&!!e.submitId&&e?.status in v&&e?.verdict in C&&"number"==typeof e?.points,ue=e=>ie(e)&&e?.event===M.SUBMISSION_JUDGING&&oe(e?.submitId)&&oe(e?.problemKey)&&(null===e?.contestKey||oe(e?.contestKey))&&oe(e?.userKey)&&"boolean"==typeof e?.judging&&e?.status in v&&e?.verdict in C&&"number"==typeof e?.points,Ee=(e,s,t)=>`${e}-${s}-${t}`,ce=(e,s)=>{return Re(e)?Ee(M.CODE_RUN_STATUS,s,e.runId):le(e)?Ee(M.SUBMISSION_RUN_STATUS,s,e.submitId):(a=e,[M.SEND_DATA_ECS_TASK_DEFINITIONS_LIST,M.SEND_DATA_EC2_INSTANCES_LIST,M.SEND_DATA_ECS_TASKS_LIST,M.SEND_DATA_SSM_SESSIONS_LIST,M.SEND_DATA_RUN_COMMAND].includes(a?.event)&&"string"==typeof a?.dataId&&a.dataId&&a?.content?Ee(M.SEND_DATA_,s,e.dataId):(e=>ie(e)&&e?.event===M.CONTEST_CHANGES&&!!e?.content)(e)?Ee(M.CONTEST_CHANGES,s,e.content.contestKey):(e=>ie(e)&&e?.event===M.PROBLEM_CRAWLED&&!!e?.content)(e)?Ee(M.PROBLEM_CRAWLED,s,e.content.problemKey):(e=>ie(e)&&e?.event===M.SUBMISSIONS_CRAWL&&!!e?.content)(e)?Ee(M.SUBMISSIONS_CRAWL,s,t([e.content.contestKey,e.content.problemKeys])):(e=>[M.USER_NOTIFICATION_SUBMISSION,M.USER_NOTIFICATION_CONTEST_CLARIFICATION].includes(e?.event)&&!!e?.content)(e)?Ee(M.USER_NOTIFICATION_,s,"*"):ue(e)?Ee(M.SUBMISSION_JUDGING,s,"*"):null);var a},Se=e=>{if(Z(e))return s=e.submitId,`submission:${k(s)}`;var s,t,a;if(te(e)||se(e))return W(e.contestKey,L.SPECTATORS);if(re(e)){if("problemKey"in e&&e.problemKey)return t=e.problemKey,a=$.SPECTATORS,`problem:${k(t)}:${a}`;if("contestKey"in e&&e.contestKey)return W(e.contestKey,L.SPECTATORS);if("userKey"in e&&e.userKey)return((e,s)=>`user:${k(e)}:${s}`)(e.userKey,G.SPECTATORS)}return null},de=e=>te(e)||se(e)||re(e)&&"contestKey"in e&&e.contestKey?e.contestKey:null,me=e=>re(e)&&"problemKey"in e&&e.problemKey?e.problemKey:null;const ge=e=>e.isGlobal?{order:0,label:"global",bc:"bc-io"}:e.isEndless?{order:1,label:"endless",bc:"bc-io"}:e.isPast?{order:2,label:"past",bc:"bc-sf-md"}:e.isLive?{order:3,label:"live",bc:"bc-er"}:e.isFuture?{order:4,label:"upcoming",bc:"bc-ss"}:{order:5,label:"-",bc:"bc-sf-md"},Ie=async e=>{"undefined"!=typeof navigator&&await navigator.clipboard.writeText(e)},pe=e=>{const s=e.includes("milliseconds"),t=e.includes("seconds"),a=e.includes("minutes"),o=e.includes("hours"),n=e.includes("day"),r=e.includes("month");return{showYears:e.includes("year"),showMonths:r,showDays:n,showHours:o,showMinutes:a,showSeconds:t,showMilliseconds:s}},Te=e=>({showWeeks:e.includes("weeks"),showDays:e.includes("days"),showHours:e.includes("hours"),showMinutes:e.includes("minutes"),showSeconds:e.includes("seconds"),showMilliseconds:e.includes("milliseconds")}),_e=(e,s,t)=>{const{showYears:a,showMonths:o,showDays:n,showHours:r,showMinutes:i,showSeconds:R,showMilliseconds:l}=pe(s);return(n?e.getDate():"")+(o?" "+t(b[e.getMonth()]||""):"")+(a?" "+e.getFullYear():"")+(r?", "+z(e.getHours(),2)+(i?":"+z(e.getMinutes(),2):"")+(R?":"+z(e.getSeconds(),2):"")+(l?"."+z(e.getMilliseconds(),3):""):"")},Ne=new RegExp("^[0-9a-fA-F]{24}$");function Ae(){let e="";return I()&&(e=new URLSearchParams(window.location.search).get(S.TOKEN)??""),24===(s=e).length&&Ne.test(s)?e:"";var s}function Ue(){return"undefined"!=typeof localStorage?Ae()||localStorage.getItem(r)||"":Ae()||""}const he=async(e,s,t)=>Ce(e,s,t),ve=async(e,s,t)=>Ce(e,s,t),Ce=async(e,s,t)=>{const{method:r=m.GET,body:i,signal:R,responseType:l,headers:u,cache:E,next:c}=s||{},S=new Headers(u??{});S.set("accept","application/json"),i instanceof FormData||S.set("content-type","application/json"),I()&&S.set(a,window.location?.host);const g=Ue();g&&S.set(o,g);try{const s=await fetch(e,{method:r,headers:S,credentials:"include",...i?{body:i}:{},...R?{signal:R}:{},cache:E,next:c});try{return"blob"===l?await s.blob():await s.text()}catch(s){n("error on get data",{url:e,error:s,responseType:l})}return"blob"===l?new Blob:""}catch(s){if(n("error on fetch",{url:e,error:s}),R?.aborted)return"blob"===l?new Blob:JSON.stringify({success:!1,message:F[d.ERR9997].message,errors:[{code:d.ERR9997,detail:`[${r}] ${e} \n ${i}`}]});if(!1===t)throw s;return"blob"===l?new Blob:JSON.stringify({success:!1,message:F[d.ERR9998].message,errors:[{code:d.ERR9998,detail:"FETCH CATCH ERROR : "+JSON.stringify({method:r,url:e,body:i,error:s})}]})}},be=e=>({origin:I()?window.location.origin:"https://juki.app",referer:I()?window.location.origin+"/":"https://juki.app/",[o]:e,[a]:"juki.app"}),fe=()=>({origin:I()?window.location.origin:"https://juki.app",referer:I()?window.location.origin+"/":"https://juki.app/",[u]:"true",[a]:"juki.app"}),Oe=async e=>{const{url:s,...t}=g.API_V2.note.publish({body:{source:e.trim()}}),a=q(await he(s,t));return a?.success&&a?.content.sourceUrl?a.content.sourceUrl:(n("error on publish note",{request:a}),"")},Be=async(e,s)=>{try{const{url:t,...a}=g.API_V2.image.publish({body:{contentType:e.type,isPublic:s}}),o=q(await he(t,a));return o.success?(await fetch(o.content.signedUrl,{method:m.PUT,headers:{"Content-Type":e.type},body:e}),{status:i.SUCCESS,message:"image uploaded successfully",content:o.content}):(console.error("response not success on handleUploadImage",{response:o}),{status:i.ERROR,message:"Ups, please try again",content:null})}catch(e){return console.error(e),{status:i.ERROR,message:"Ups, please try again",content:null}}},we=async(e,t)=>{try{const{url:a,...o}=g.API_V2.file.publish({body:{contentType:e.type,folder:t}}),n=q(await he(a,o));return n.success?(await fetch(n.content.signedUrl,{method:m.PUT,headers:{"Content-Type":e.type},body:e}),{status:i.SUCCESS,message:"image uploaded successfully",content:n.content}):(s("response not success on handleUploadImage",{response:n}),{status:i.ERROR,message:"Ups, please try again",content:null})}catch(e){return s(e),{status:i.ERROR,message:"Ups, please try again",content:null}}},ye=async(e,s,t)=>{const{url:a,...o}=g.API_V2.export.websiteToPdf({params:{url:e,footerTemplate:t?.footerTemplate?.split("\n").join(""),headerTemplate:t?.headerTemplate?.split("\n").join(""),format:t?.format,margin:t?.margin}}),n=q(await he(a,o));if(!n.success)throw new Error("error on download pdf");await T("https://"+n.content.urlExportedPDF,s)},De=async(e,s,t)=>{const{url:a,...o}=g.API_V2.note.createPdf({body:{source:e,theme:s}}),n=await he(a,{responseType:"blob",...o});if("string"==typeof n){if(l(n)){const e=JSON.parse(n);if(e.errors.length)throw new V(e.errors[0].code,{message:e.errors[0].detail})}throw new V(d.ERR9997,{message:"error generating the pdf"})}p(n,t)},Me=async(e,t,a)=>{const o=Ue(),n=I()?window.location:new Location;s("Error to report",{error:e,errorInfo:t,location:n,visitorSessionId:o,data:a});try{const{url:r,...i}=g.API_V2.log.error({body:{location:n,visitorSessionId:o,errorName:e?.name||"",errorMessage:e?.message||"",errorStack:e?.stack||"",errorInfo:t,data:{error:e,...a||{}}}}),l=q(await he(r,i));l.success?R("Error reported"):s("Error reported failed",{error:e,errorInfo:t,location:n,visitorSessionId:o,response:l})}catch(a){s("error on log error",{error:e,errorInfo:t,location:n,visitorSessionId:o,errorOnLog:a})}},Le=e=>`jk-editor-settings-store/${e}`,$e=e=>`jk-problem-storage/${e}`,Ge=e=>`jk-sources-storage/${e}`,Pe=e=>`jk-code-editor-settings-storage/${e}`,je=e=>`jk-test-cases-storage/${e}`,Ke=(e,{statement:s,settings:t},a,o)=>{const n=(s?.description?.[a]||s?.description?.[f.EN]||s?.description?.[f.ES]||"").trim(),r=(s?.input[a]||s?.input[f.EN]||s?.input[f.ES]||"").trim(),i=(s?.output[a]||s?.output[f.EN]||s?.output[f.ES]||"").trim(),R=(s?.note?.[a]||s?.note?.[f.EN]||s?.note?.[f.ES]||"").trim(),l=s?.sampleCases||[],u=Object.values(t?.byProgrammingLanguage||{});return{statementDescription:n,statementInput:r,statementOutput:i,statementNote:R,mdStatement:`\n# \\textAlign=center ${o}\n\n\\textAlign=center **${e("type")}:** ${K[t?.type]?.label}, **${e("mode")}:** ${j[t?.scoringMode]?.label}\n\n|${e("language")}|${e("time limit")}|${e("memory limit")}|\n|--|--|--|\n| ${e("general")} | ${(t?.timeLimit/1e3).toFixed(1)} ${e("seconds")} | ${(t?.memoryLimit/1e3).toFixed(1)} ${e("MB")} |\n${u.map(s=>`| ${E[s.language]?.label} | ${(s?.timeLimit/1e3).toFixed(1)} ${e("seconds")} | ${(s?.memoryLimit/1e3).toFixed(1)} ${e("MB")}|`).join("\n")}\n\n# ${e("description")}\n\n${n}\n\n# ${e("input")}\n\n${r}\n\n# ${e("output")}\n\n${i}\n\n# ${e("subtasks description")}\n\n${t.scoringMode===N.SUBTASK?Object.values(t.pointsByGroups).map(s=>`### ${e("group")} ${s.group} (${s.points} ${e("points")})\n\n${s.description?.[a]}\n `).join("\n"):""}\n\n${l.map((s,t)=>`### ${e("input sample")} ${t+1}\n\`\`\`\n${s.input}\n\`\`\`\n### ${e("output sample")} ${t+1}\n\`\`\`\n${s.output}\n\`\`\`\n`).join("")}\n\n# ${e("note")}\n\n${R}\n`,shouldViewPDF:!(""!==n.trim()||""!==r.trim()||""!==i.trim()||""!==R.trim()||!s.pdfUrl[f.ES]&&!s.pdfUrl[f.EN])}},Fe=()=>{if(!I())return!1;const{origin:e}=window.location;return"https://judge.juki.app"===e||e.endsWith(".judge.juki.app")||e.endsWith(".jukijudge.com")||"https://judge.local.juki.app"===e||"http://localhost:3070"===e},ke=(e,s)=>{if(Fe()||s===e)return"";let t=`https://${e}.jukijudge.com`;return"juki-app"===e&&(t="https://judge.juki.app"),t},We=(e,s)=>{const t="function"==typeof e?e():e;return void 0!==s?O(B,{children:t},s):t},xe=(e,s,t)=>{const a="function"==typeof e?e(s):e;return void 0!==t?O(B,{children:a},t):a},He=e=>{let s="";return Object.entries(e).forEach(([e,t])=>{t&&(s&&(s+="&"),s+=`${e}=${encodeURIComponent(t.toString())}`)}),s},Je=e=>{let s="";return Object.entries(e).forEach(([e,t])=>{!s||-1!==t&&1!==t||(s+=c),-1===t&&(s+=encodeURIComponent(`-${e}`)),1===t&&(s+=encodeURIComponent(`+${e}`))}),s?"sort="+s:""},Ve=e=>{let s,t;if("string"==typeof e){const[a,o]=e.split("?");s=a||"",t=new URLSearchParams(o||"")}else s=e?.pathname||"",t=e?.searchParams||new URLSearchParams;const a=t.toString();return{pathname:s,searchParams:t,path:`${s}${a?"?"+a:""}`}},ze=e=>"string"==typeof e?"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)):"",qe=(e,s,t,a,o,n)=>{const r=function(e){const s=[],t=1e3,a=6e4,o=36e5,n=864e5,r=6048e5,i=Math.floor(e/r);s.push({remaining:i,label:1===i?"week":"weeks",abbreviatedLabel:"w",milliseconds:r,digits:2});const R=Math.floor(e%r/n);s.push({remaining:R,label:1===R?"day":"days",abbreviatedLabel:"d",milliseconds:n,digits:2});const l=Math.floor(e%n/o);s.push({remaining:l,label:1===l?"hour":"hours",abbreviatedLabel:"h",milliseconds:o,digits:2});const u=Math.floor(e%o/a);s.push({remaining:u,label:1===u?"minute":"minutes",abbreviatedLabel:"m",milliseconds:a,digits:2});const E=Math.floor(e%a/t);s.push({remaining:E,label:1===E?"second":"seconds",abbreviatedLabel:"s",milliseconds:t,digits:2});const c=Math.floor(e%t);return s.push({remaining:c,label:1===c?"millisecond":"milliseconds",abbreviatedLabel:"ms",milliseconds:1,digits:3}),s}(Math.max(e,0)),{showWeeks:i,showDays:R,showHours:l,showMinutes:u,showSeconds:E,showMilliseconds:c}=Te(s);for(i||(r[1].remaining+=r[0].milliseconds*r[0].remaining/r[1].milliseconds,r[1].label=1===r[1].remaining?"day":"days",r.shift(),R||(r[1].remaining+=r[0].milliseconds*r[0].remaining/r[1].milliseconds,r[1].label=1===r[1].remaining?"hour":"hours",r.shift(),l||(r[1].remaining+=r[0].milliseconds*r[0].remaining/r[1].milliseconds,r[1].label=1===r[1].remaining?"minute":"minutes",r.shift(),u||(r[1].remaining+=r[0].milliseconds*r[0].remaining/r[1].milliseconds,r[1].label=1===r[1].remaining?"second":"seconds",r.shift(),E||(r[1].remaining+=r[0].milliseconds*r[0].remaining/r[1].milliseconds,r[1].label=1===r[1].remaining?"millisecond":"milliseconds",r.shift()))))),c||(r.pop(),E||(r.pop(),u||(r.pop(),l||(r.pop(),R||r.pop()))));r.length>n&&(t||r.length>o)&&r.length&&0===r[0].remaining;)r.shift();for(;r.length>n&&(a||r.length>o)&&r.length&&0===r[r.length-1]?.remaining;)r.pop();for(;r.length>n&&r.length>o;)r.pop();return r};function Ye(e){return X(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_CODE_RUN_STATUS&&"string"==typeof e?.runId&&!!e.runId)(e)?Ee(M.CODE_RUN_STATUS,e.clientId,e.runId):Z(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_SUBMISSION_RUN_STATUS&&"string"==typeof e?.submitId&&!!e.submitId)(e)?Ee(M.SUBMISSION_RUN_STATUS,e.clientId,e.submitId):Q(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_GET_DATA)(e)?Ee(M.SEND_DATA_,e.clientId,e.dataId):ae(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_USER_NOTIFICATION)(e)?Ee(M.USER_NOTIFICATION_,e.clientId,"*"):ee(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_PROBLEM_CRAWLED)(e)?Ee(M.PROBLEM_CRAWLED,e.clientId,e.problemKey):se(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_SUBMISSIONS_CRAWL)(e)?Ee(M.SUBMISSIONS_CRAWL,e.clientId,t([e.contestKey,e.problemKeys])):te(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_CONTEST_CHANGES)(e)?Ee(M.CONTEST_CHANGES,e.clientId,e.contestKey):re(e)||(e=>Y(e)&&e?.event===D.UNSUBSCRIBE_SUBMISSIONS_JUDGING&&ne(e))(e)?Ee(M.SUBMISSION_JUDGING,e.clientId,"*"):""}function Xe(e){return X(e)?{...e,event:D.UNSUBSCRIBE_CODE_RUN_STATUS}:Z(e)?{...e,event:D.UNSUBSCRIBE_SUBMISSION_RUN_STATUS}:Q(e)?{...e,event:D.UNSUBSCRIBE_GET_DATA}:ee(e)?{...e,event:D.UNSUBSCRIBE_PROBLEM_CRAWLED}:se(e)?{...e,event:D.UNSUBSCRIBE_SUBMISSIONS_CRAWL}:te(e)?{...e,event:D.UNSUBSCRIBE_CONTEST_CHANGES}:ae(e)?{...e,event:D.UNSUBSCRIBE_USER_NOTIFICATION}:re(e)?{...e,event:D.UNSUBSCRIBE_SUBMISSIONS_JUDGING}:e}export{Oe as A,We as B,Me as C,pe as D,Te as E,He as F,Je as G,ze as H,q as I,j as J,Re as K,z as L,Se as M,de as N,me as O,K as P,x as Q,H as R,J as S,ce as T,ne as U,ue as V,D as W,le as X,P as Y,he as a,qe as b,Ie as c,De as d,ye as e,ve as f,Ae as g,ge as h,_e as i,Le as j,be as k,Ve as l,ke as m,Ye as n,fe as o,$e as p,Pe as q,xe as r,Ge as s,Ke as t,je as u,Xe as v,Ue as w,we as x,Be as y,Fe as z};