@marimo-team/frontend 0.13.15-dev94621 → 0.13.15-dev95169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ConnectedDataExplorerComponent-DMbAMOE2.js +19 -0
- package/dist/assets/{ImageComparisonComponent-Dbj__lai.js → ImageComparisonComponent-Dt2c0WI0.js} +1 -1
- package/dist/assets/VegaLite-BC6OiOdc.js +189 -0
- package/dist/assets/{_baseEach-BqAvOD8c.js → _baseEach-xrSKUL6D.js} +1 -1
- package/dist/assets/_baseMap-Co5Ctxc-.js +1 -0
- package/dist/assets/{_baseUniq-B0Npei9m.js → _baseUniq-tXYh6-hn.js} +1 -1
- package/dist/assets/{_createAggregator-BKA_Ss1e.js → _createAggregator-OgVuAWwe.js} +1 -1
- package/dist/assets/{any-language-editor-DTaSEcVG.js → any-language-editor-BfurezbZ.js} +2 -2
- package/dist/assets/arc-Cuwikxov.js +1 -0
- package/dist/assets/architectureDiagram-IEHRJDOE-B0hSM5NU.js +36 -0
- package/dist/assets/{blockDiagram-JOT3LUYC-Bnf2UxpD.js → blockDiagram-JOT3LUYC-DgC3NNDI.js} +2 -2
- package/dist/assets/{c4Diagram-VJAJSXHY-QxUdLc-K.js → c4Diagram-VJAJSXHY-D683l2ZX.js} +2 -2
- package/dist/assets/channel-cHKKjSyd.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-H7EEQl6q.js → chunk-4BMEZGHF-B3HxruSo.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-D13pJwJM.js → chunk-A2AXSNBT-Ci2DD3Bw.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-BWCVlBB5.js → chunk-AEK57VVT-tVa1eJrk.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-C62AHwHx.js → chunk-D6G4REZN-DOUGMytM.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-CmPMfSaj.js → chunk-RZ5BOZE2-CrRBfGxp.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-GHZeRWxO.js → chunk-XZIHB7SX-D7gtlskS.js} +1 -1
- package/dist/assets/{circle-play-BvX3Ulrl.js → circle-play-aLPCmGWb.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-B701bM1H.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-B701bM1H.js +1 -0
- package/dist/assets/clone-DOhAYwvT.js +1 -0
- package/dist/assets/compile-Bmr75iPx.js +10 -0
- package/dist/assets/{cytoscape.esm-C11VZyMT.js → cytoscape.esm-C5gjFiAL.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-CtuQChdp.js → dagre-OKDRZEBW-wTmEuHGH.js} +1 -1
- package/dist/assets/{data-editor-3Ux39S9C.js → data-editor-BFY1-e4L.js} +3 -3
- package/dist/assets/{diagram-SSKATNLV-BqcJFrNF.js → diagram-SSKATNLV-CKu0fGwH.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-Cs8fyIXd.js → diagram-VNBRO52H-DxtPa1lw.js} +1 -1
- package/dist/assets/edit-page-OL6bLqPt.js +144 -0
- package/dist/assets/edit-page-jDQVLtmt.css +1 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-BMgqLKmD.js → erDiagram-Q7BY3M3F-B1g7wlXr.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-DciiR0rj.js → flowDiagram-4HSFHLVR-CxhoMzRq.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-BpEW8IYZ.js → ganttDiagram-APWFNJXF-DBTZJFAx.js} +3 -3
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-BaSDKKIa.js → gitGraphDiagram-7IBYFJ6S-C266q9QJ.js} +3 -3
- package/dist/assets/{graph-DL39zUTR.js → graph-CyYfFYfg.js} +1 -1
- package/dist/assets/home-page-B7cbUfJl.js +9 -0
- package/dist/assets/{index-FqMljUBK.js → index-3k9JrDIu.js} +1 -1
- package/dist/assets/{index-DB5cKm7z.js → index-3lKcEd4T.js} +1 -1
- package/dist/assets/{index-Doh84EGk.js → index-7cpS98VS.js} +1 -1
- package/dist/assets/{index-Pi193pwF.js → index-B2hYczV1.js} +1 -1
- package/dist/assets/index-BHCV7iZe.js +1 -0
- package/dist/assets/{index-CrCsM3ik.js → index-B_dRl7Km.js} +1 -1
- package/dist/assets/index-Bs5GWuAv.js +1 -0
- package/dist/assets/index-ByFAVbrc.js +498 -0
- package/dist/assets/{index-Bm_ScR8y.js → index-CAzz96VI.js} +1 -1
- package/dist/assets/{index-q272cbnk.js → index-CD9p0BAM.js} +1 -1
- package/dist/assets/{index--agldwX6.js → index-CDEi0MFT.js} +1 -1
- package/dist/assets/{index-BKtaZn1Q.js → index-CLi3elum.js} +1 -1
- package/dist/assets/{index-Bal79f_9.js → index-CVAd0sqi.js} +1 -1
- package/dist/assets/{index-BCFYFtQv.js → index-Czxzx51b.js} +1 -1
- package/dist/assets/{index-KDcItMxX.js → index-D_TLJ-v4.js} +1 -1
- package/dist/assets/{index-DbDeTxOP.js → index-DtCGXDXQ.js} +1 -1
- package/dist/assets/index-N-a4M2pk.css +1 -0
- package/dist/assets/{index-gMYKBEpG.js → index-Qr_sLZh_.js} +1 -1
- package/dist/assets/{index-Ct_PXOmA.js → index-uZdlLtIL.js} +1 -1
- package/dist/assets/{index-CbJeiKW0.js → index-xoF5D1eb.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-CivcoKxu.js +2 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-CuqLlejI.js → journeyDiagram-U35MCT3I-CH8869D9.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-DgKxUGj4.js → kanban-definition-NDS4AKOZ-Bnb6zVFB.js} +1 -1
- package/dist/assets/layout-BIwj_D7w.js +1 -0
- package/dist/assets/{linear-pbz19uUF.js → linear-DMCeXg_c.js} +1 -1
- package/dist/assets/{mermaid-WxgDr0hv.js → mermaid-B0jSmOfJ.js} +5 -5
- package/dist/assets/{min-DdE4sYeY.js → min-CkHnq4VQ.js} +1 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-BI9VR8Cf.js +95 -0
- package/dist/assets/panels-DcAzAz16.css +1 -0
- package/dist/assets/panels-cAXK7Jyh.js +27 -0
- package/dist/assets/{pieDiagram-IB7DONF6-DgEbYdHg.js → pieDiagram-IB7DONF6-D8VINHB_.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-BSWFuF0Y.js → quadrantDiagram-7GDLP6J5-BFS28tw4.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-BJDjrXWM.js → radar-MK3ICKWK-DSVT3cXG.js} +1 -1
- package/dist/assets/{react-plotly-C5U3mvED.js → react-plotly-BNW3vCgp.js} +20 -20
- package/dist/assets/{requirementDiagram-KVF5MWMF-D8uDxIAJ.js → requirementDiagram-KVF5MWMF-CfI13owT.js} +1 -1
- package/dist/assets/run-page-DjmUhHLl.js +1 -0
- package/dist/assets/{sankeyDiagram-QLVOVGJD-73tcIslD.js → sankeyDiagram-QLVOVGJD-BeJLaDns.js} +3 -3
- package/dist/assets/save-worker-CULn6QYm.js +1 -0
- package/dist/assets/{sequenceDiagram-X6HHIX6F-r3ic9pyn.js → sequenceDiagram-X6HHIX6F-B1RwH1-2.js} +1 -1
- package/dist/assets/slides-component-CVrMbfwN.js +1 -0
- package/dist/assets/{sortBy-BpSlonWp.js → sortBy-BiofcvTm.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-Mpm66CPm.js → stateDiagram-DGXRK772-CIUlnvCJ.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-kL9s1PVF.js +1 -0
- package/dist/assets/{terminal-BQOcln6v.js → terminal-C62pbxD3.js} +4 -4
- package/dist/assets/{time-Cn-0oAKv.js → time-B4kWZB7X.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-CA21Dmu1.js → timeline-definition-BDJGKUSR-DhI3tww5.js} +1 -1
- package/dist/assets/timer-DFzT7np-.js +1 -0
- package/dist/assets/tracing-DRxcEDwj.js +2 -0
- package/dist/assets/{transform-BzDy4yXW.js → transform-Cyp0GDF-.js} +1 -1
- package/dist/assets/tree-BeiPW5VN.js +17 -0
- package/dist/assets/vega-component-DZaNq-Dj.js +1 -0
- package/dist/assets/worker-C9vrNVln.js +1 -0
- package/dist/assets/worker-DsmMBHp1.js +1 -0
- package/dist/assets/{xychartDiagram-VJFVF3MP-DxgSMkAS.js → xychartDiagram-VJFVF3MP-Dww8gmBA.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +21 -20
- package/dist/assets/ConnectedDataExplorerComponent-Df1FbiME.js +0 -19
- package/dist/assets/VegaLite-CsQpZRnQ.js +0 -189
- package/dist/assets/_baseMap-BHbCXxiE.js +0 -1
- package/dist/assets/arc-ZB5pDULS.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-epLkXczD.js +0 -36
- package/dist/assets/channel-DZbCNlo_.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-BlRHqMM8.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-BlRHqMM8.js +0 -1
- package/dist/assets/clone-DVCFP2SD.js +0 -1
- package/dist/assets/compile-CH1soqis.js +0 -10
- package/dist/assets/edit-page-B7tjWZiy.css +0 -1
- package/dist/assets/edit-page-DUsEwG2Y.js +0 -144
- package/dist/assets/home-page-DTShNiLM.js +0 -9
- package/dist/assets/index-2MzWRy4i.js +0 -1
- package/dist/assets/index-BVPr58uH.js +0 -1
- package/dist/assets/index-DC0qQbhv.css +0 -1
- package/dist/assets/index-DR-WqNxT.js +0 -499
- package/dist/assets/infoDiagram-PH2N3AL5-B_fFvotD.js +0 -2
- package/dist/assets/layout-CxQYfzbu.js +0 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-Da3RK7Bo.js +0 -95
- package/dist/assets/run-page-B7ZRDNoo.js +0 -1
- package/dist/assets/save-worker-BDcz2hJn.js +0 -1
- package/dist/assets/shutdown-button-B8rKQT9U.js +0 -17
- package/dist/assets/slides-component-CbtSDUoE.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-BqskMlhw.js +0 -1
- package/dist/assets/storage-Co1CXoG3.js +0 -27
- package/dist/assets/storage-De8XnUVS.css +0 -1
- package/dist/assets/timer-B5eI7Tcu.js +0 -1
- package/dist/assets/tracing-BdpCs0Te.js +0 -2
- package/dist/assets/vega-component-ldxTiMcn.js +0 -1
- package/dist/assets/worker-BoGc2ntD.js +0 -1
- package/dist/assets/worker-D9uxCaRv.js +0 -1
- /package/dist/assets/{shutdown-button-C1rhMrxo.css → tree-C1rhMrxo.css} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
var J;import{g as He,s as Ke}from"./chunk-RZ5BOZE2-CmPMfSaj.js";import{_ as u,b as We,a as je,s as Ge,g as ze,p as Xe,q as Je,c as Te,l as be,y as Ze,B as et,o as tt,r as st,u as it}from"./mermaid-WxgDr0hv.js";import"./transform-BzDy4yXW.js";import"./timer-B5eI7Tcu.js";import"./index-DR-WqNxT.js";import"./step-BwsUM5iJ.js";var ke=function(){var e=u(function(i,m,a,s){for(a=a||{},s=i.length;s--;a[i[s]]=m);return a},"o"),n=[1,3],h=[1,4],c=[1,5],y=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],p=[1,22],R=[2,7],o=[1,26],E=[1,27],I=[1,28],b=[1,29],C=[1,33],A=[1,34],v=[1,35],L=[1,36],O=[1,37],x=[1,38],w=[1,24],D=[1,31],M=[1,32],$=[1,30],f=[1,39],S=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],z=[89,90],Ne=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],qe=[1,70],Ce=[1,71],Ae=[1,72],ve=[1,73],Le=[1,74],Oe=[1,75],xe=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],ne=[1,88],re=[1,89],ae=[1,90],le=[1,91],ce=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],we=[1,101],De=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[1,110],B=[1,106],Q=[1,107],H=[1,108],K=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[1,115],Se={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(i,m,a,s,_,t,me){var r=t.length-1;switch(_){case 4:this.$=t[r].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[r].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[r-3],t[r-4]);break;case 22:s.addRequirement(t[r-5],t[r-6]),s.setClass([t[r-5]],t[r-3]);break;case 23:s.setNewReqId(t[r-2]);break;case 24:s.setNewReqText(t[r-2]);break;case 25:s.setNewReqRisk(t[r-2]);break;case 26:s.setNewReqVerifyMethod(t[r-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[r-3]);break;case 43:s.addElement(t[r-5]),s.setClass([t[r-5]],t[r-3]);break;case 44:s.setNewElementType(t[r-2]);break;case 45:s.setNewElementDocRef(t[r-2]);break;case 48:s.addRelationship(t[r-2],t[r],t[r-4]);break;case 49:s.addRelationship(t[r-2],t[r-4],t[r]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[r-2],s.defineClass(t[r-1],t[r]);break;case 58:s.setClass(t[r-1],t[r]);break;case 59:s.setClass([t[r-2]],t[r]);break;case 60:case 62:case 65:this.$=[t[r]];break;case 61:case 63:this.$=t[r-2].concat([t[r]]);break;case 64:this.$=t[r-2],s.setCssStyle(t[r-1],t[r]);break;case 66:t[r-2].push(t[r]),this.$=t[r-2];break;case 68:this.$=t[r-1]+t[r]}},"anonymous"),table:[{3:1,4:2,6:n,9:h,11:c,13:y},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:h,11:c,13:y},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:n,9:h,11:c,13:y},{1:[2,2]},{4:17,5:p,7:13,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:p,7:42,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:43,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:44,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:45,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:46,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:47,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:48,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:49,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:50,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:f,90:S},{30:63,33:62,75:P,89:f,90:S},{30:64,33:62,75:P,89:f,90:S},e(z,[2,29]),e(z,[2,30]),e(z,[2,31]),e(z,[2,32]),e(z,[2,33]),e(z,[2,34]),e(Ne,[2,81]),e(Ne,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{62:77,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{30:78,33:62,75:P,89:f,90:S},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:f,90:S},{5:[1,95]},{30:96,33:62,75:P,89:f,90:S},{5:[1,97]},{30:98,33:62,75:P,89:f,90:S},{63:[1,99]},e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(V,[2,54]),e(V,[2,55]),e(V,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:we}),{33:103,75:[1,102],89:f,90:S},e(De,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(d,[2,57],{76:we}),e(d,[2,58],{76:U}),{5:Y,28:105,31:B,34:Q,36:H,38:K,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:U},{33:119,89:f,90:S},{33:120,89:f,90:S},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(pe,[2,61]),e(pe,[2,63]),e(k,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Y,28:126,31:B,34:Q,36:H,38:K,40:W},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(De,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),{33:132,89:f,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:Y,28:145,31:B,34:Q,36:H,38:K,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:Y,28:159,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:160,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:161,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:162,31:B,34:Q,36:H,38:K,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(i,m){if(!m.recoverable){var a=new Error(i);throw a.hash=m,a}this.trace(i)},"parseError"),parse:u(function(i){var m=this,a=[0],s=[],_=[null],t=[],me=this.table,r="",de=0,Me=0,Be=t.slice.call(arguments,1),g=Object.create(this.lexer),j={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(j.yy[ge]=this.yy[ge]);g.setInput(i,j.yy),j.yy.lexer=g,j.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var Ie=g.yylloc;t.push(Ie);var Qe=g.options&&g.options.ranges;function $e(){var q;return typeof(q=s.pop()||g.lex()||1)!="number"&&(q instanceof Array&&(q=(s=q).pop()),q=m.symbols_[q]||q),q}typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(q){a.length=a.length-2*q,_.length=_.length-q,t.length=t.length-q},"popStack"),u($e,"lex");for(var T,G,N,Fe,_e,F,Pe,fe,X={};;){if(G=a[a.length-1],this.defaultActions[G]?N=this.defaultActions[G]:(T==null&&(T=$e()),N=me[G]&&me[G][T]),N===void 0||!N.length||!N[0]){var Ue="";for(_e in fe=[],me[G])this.terminals_[_e]&&_e>2&&fe.push("'"+this.terminals_[_e]+"'");Ue=g.showPosition?"Parse error on line "+(de+1)+`:
|
1
|
+
var J;import{g as He,s as Ke}from"./chunk-RZ5BOZE2-CrRBfGxp.js";import{_ as u,b as We,a as je,s as Ge,g as ze,p as Xe,q as Je,c as Te,l as be,y as Ze,B as et,o as tt,r as st,u as it}from"./mermaid-B0jSmOfJ.js";import"./transform-Cyp0GDF-.js";import"./timer-DFzT7np-.js";import"./index-ByFAVbrc.js";import"./step-BwsUM5iJ.js";var ke=function(){var e=u(function(i,m,a,s){for(a=a||{},s=i.length;s--;a[i[s]]=m);return a},"o"),n=[1,3],h=[1,4],c=[1,5],y=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],p=[1,22],R=[2,7],o=[1,26],E=[1,27],I=[1,28],b=[1,29],C=[1,33],A=[1,34],v=[1,35],L=[1,36],O=[1,37],x=[1,38],w=[1,24],D=[1,31],M=[1,32],$=[1,30],f=[1,39],S=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],z=[89,90],Ne=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],qe=[1,70],Ce=[1,71],Ae=[1,72],ve=[1,73],Le=[1,74],Oe=[1,75],xe=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],ne=[1,88],re=[1,89],ae=[1,90],le=[1,91],ce=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],we=[1,101],De=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[1,110],B=[1,106],Q=[1,107],H=[1,108],K=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[1,115],Se={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(i,m,a,s,_,t,me){var r=t.length-1;switch(_){case 4:this.$=t[r].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[r].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[r-3],t[r-4]);break;case 22:s.addRequirement(t[r-5],t[r-6]),s.setClass([t[r-5]],t[r-3]);break;case 23:s.setNewReqId(t[r-2]);break;case 24:s.setNewReqText(t[r-2]);break;case 25:s.setNewReqRisk(t[r-2]);break;case 26:s.setNewReqVerifyMethod(t[r-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[r-3]);break;case 43:s.addElement(t[r-5]),s.setClass([t[r-5]],t[r-3]);break;case 44:s.setNewElementType(t[r-2]);break;case 45:s.setNewElementDocRef(t[r-2]);break;case 48:s.addRelationship(t[r-2],t[r],t[r-4]);break;case 49:s.addRelationship(t[r-2],t[r-4],t[r]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[r-2],s.defineClass(t[r-1],t[r]);break;case 58:s.setClass(t[r-1],t[r]);break;case 59:s.setClass([t[r-2]],t[r]);break;case 60:case 62:case 65:this.$=[t[r]];break;case 61:case 63:this.$=t[r-2].concat([t[r]]);break;case 64:this.$=t[r-2],s.setCssStyle(t[r-1],t[r]);break;case 66:t[r-2].push(t[r]),this.$=t[r-2];break;case 68:this.$=t[r-1]+t[r]}},"anonymous"),table:[{3:1,4:2,6:n,9:h,11:c,13:y},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:h,11:c,13:y},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:n,9:h,11:c,13:y},{1:[2,2]},{4:17,5:p,7:13,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:p,7:42,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:43,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:44,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:45,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:46,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:47,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:48,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:49,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:p,7:50,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:E,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:f,90:S},{30:63,33:62,75:P,89:f,90:S},{30:64,33:62,75:P,89:f,90:S},e(z,[2,29]),e(z,[2,30]),e(z,[2,31]),e(z,[2,32]),e(z,[2,33]),e(z,[2,34]),e(Ne,[2,81]),e(Ne,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{62:77,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{30:78,33:62,75:P,89:f,90:S},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:f,90:S},{5:[1,95]},{30:96,33:62,75:P,89:f,90:S},{5:[1,97]},{30:98,33:62,75:P,89:f,90:S},{63:[1,99]},e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(V,[2,54]),e(V,[2,55]),e(V,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:we}),{33:103,75:[1,102],89:f,90:S},e(De,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(d,[2,57],{76:we}),e(d,[2,58],{76:U}),{5:Y,28:105,31:B,34:Q,36:H,38:K,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:U},{33:119,89:f,90:S},{33:120,89:f,90:S},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(pe,[2,61]),e(pe,[2,63]),e(k,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Y,28:126,31:B,34:Q,36:H,38:K,40:W},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(De,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),{33:132,89:f,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:Y,28:145,31:B,34:Q,36:H,38:K,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:Y,28:159,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:160,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:161,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:162,31:B,34:Q,36:H,38:K,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(i,m){if(!m.recoverable){var a=new Error(i);throw a.hash=m,a}this.trace(i)},"parseError"),parse:u(function(i){var m=this,a=[0],s=[],_=[null],t=[],me=this.table,r="",de=0,Me=0,Be=t.slice.call(arguments,1),g=Object.create(this.lexer),j={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(j.yy[ge]=this.yy[ge]);g.setInput(i,j.yy),j.yy.lexer=g,j.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var Ie=g.yylloc;t.push(Ie);var Qe=g.options&&g.options.ranges;function $e(){var q;return typeof(q=s.pop()||g.lex()||1)!="number"&&(q instanceof Array&&(q=(s=q).pop()),q=m.symbols_[q]||q),q}typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(q){a.length=a.length-2*q,_.length=_.length-q,t.length=t.length-q},"popStack"),u($e,"lex");for(var T,G,N,Fe,_e,F,Pe,fe,X={};;){if(G=a[a.length-1],this.defaultActions[G]?N=this.defaultActions[G]:(T==null&&(T=$e()),N=me[G]&&me[G][T]),N===void 0||!N.length||!N[0]){var Ue="";for(_e in fe=[],me[G])this.terminals_[_e]&&_e>2&&fe.push("'"+this.terminals_[_e]+"'");Ue=g.showPosition?"Parse error on line "+(de+1)+`:
|
2
2
|
`+g.showPosition()+`
|
3
3
|
Expecting `+fe.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(de+1)+": Unexpected "+(T==1?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(Ue,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:Ie,expected:fe})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+T);switch(N[0]){case 1:a.push(T),_.push(g.yytext),t.push(g.yylloc),a.push(N[1]),T=null,Me=g.yyleng,r=g.yytext,de=g.yylineno,Ie=g.yylloc;break;case 2:if(F=this.productions_[N[1]][1],X.$=_[_.length-F],X._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},Qe&&(X._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),(Fe=this.performAction.apply(X,[r,Me,de,j.yy,N[1],_,t].concat(Be)))!==void 0)return Fe;F&&(a=a.slice(0,-1*F*2),_=_.slice(0,-1*F),t=t.slice(0,-1*F)),a.push(this.productions_[N[1]][0]),_.push(X.$),t.push(X._$),Pe=me[a[a.length-2]][a[a.length-1]],a.push(Pe);break;case 3:return!0}}return!0},"parse")},Ye=function(){return{EOF:1,parseError:u(function(i,m){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,m)},"parseError"),setInput:u(function(i,m){return this.yy=m||this.yy||{},this._input=i,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:u(function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.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),i},"input"),unput:u(function(i){var m=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;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),a.length-1&&(this.yylineno-=a.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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).
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:u(function(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),m=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
@@ -0,0 +1 @@
|
|
1
|
+
import{d as S,a8 as K,Q as $,Z as q,a9 as AA,j as c,aa as cA,ab as dA,ac as HA,ad as U,ae as J,af as zA,ag as xA,ah as eA,ai as fA,W as T,aj as YA,ak as jA,al as oA,am as tA,an as MA,ao as rA,ap as iA,aq as NA,ar as aA,as as nA,at as mA,au as sA,av as lA}from"./index-ByFAVbrc.js";import{a as hA,A as pA,R as _,b as PA,C as vA,c as bA,P as ZA}from"./panels-cAXK7Jyh.js";import"./index-xoF5D1eb.js";import"./index-CDEi0MFT.js";import"./index-3lKcEd4T.js";import"./index-DtCGXDXQ.js";import"./index-CAzz96VI.js";import"./index-B_dRl7Km.js";import"./index-uZdlLtIL.js";import"./index-7cpS98VS.js";import"./index-CVAd0sqi.js";import"./index-D_TLJ-v4.js";import"./index-Bs5GWuAv.js";import"./index-CD9p0BAM.js";import"./index-3k9JrDIu.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-CHJ5qNM_.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-D7xaZ7Da.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-Dri_5nFc.js";import"./fortran-DL7KluxX.js";import"./gas-5kEe4nk0.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CmdsSjFB.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-FFvkTduk.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-OdhglgkO.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-BQXy8elZ.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";const BA=z=>{const A=S.c(14),{appConfig:H}=z,{setCells:d}=K();let x,t,e;A[0]===Symbol.for("react.memo_cache_sentinel")?(x=[],A[0]=x):x=A[0],$.useEffect(gA,x),A[1]===Symbol.for("react.memo_cache_sentinel")?(t=dA(),A[1]=t):t=A[1],A[2]!==d?(e={autoInstantiate:!0,setCells:d,sessionId:t},A[2]=d,A[3]=e):e=A[3];const{connection:f}=hA(e),Y=q(AA);let j,o,M;return A[4]!==f?(j=c.jsx(PA,{connection:f,className:"sm:pt-8"}),A[4]=f,A[5]=j):j=A[5],A[6]!==H?(o=c.jsx(vA,{appConfig:H,mode:"read"}),A[6]=H,A[7]=o):o=A[7],A[8]!==H.width||A[9]!==f||A[10]!==Y||A[11]!==j||A[12]!==o?(M=c.jsxs(pA,{connection:f,isRunning:Y,width:H.width,children:[j,o]}),A[8]=H.width,A[9]=f,A[10]=Y,A[11]=j,A[12]=o,A[13]=M):M=A[13],M};function XA(){_.INSTANCE.stop()}function gA(){return _.INSTANCE.start(cA),XA}const kA=()=>{const z=S.c(4),A=q(HA);if(!U()||!A)return null;let H,d,x;return z[0]===Symbol.for("react.memo_cache_sentinel")?(H=c.jsx("a",{href:J.githubPage,target:"_blank",className:"underline",children:"marimo"}),z[0]=H):H=z[0],z[1]===Symbol.for("react.memo_cache_sentinel")?(d=c.jsxs("span",{children:["This is a static Python notebook built using"," ",H,".",c.jsx("br",{}),"Some interactive features may not work, see ways to run or edit this."]}),z[1]=d):d=z[1],z[2]!==A?(x=c.jsxs("div",{className:"px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print","data-testid":"static-notebook-banner",children:[d,c.jsx("span",{className:"flex-shrink-0",children:c.jsx(FA,{code:A})})]}),z[2]=A,z[3]=x):x=z[3],x},FA=z=>{const A=S.c(84),{code:H}=z;let d;d=zA()||"notebook.py";const x=d.lastIndexOf("/");x!==-1&&(d=d.slice(x+1));const t=window.location.href;let e,f,Y,j,o,M,r,l,i,N,a,h,p,n,m,P,v,b,Z,B,X,g,s,k,W,G,F,y,u,O,Q,R,D,w,I,C,E;if(A[0]!==H||A[1]!==d){const L=xA({code:H});let V;j=eA,A[25]===Symbol.for("react.memo_cache_sentinel")?(m=c.jsx(fA,{asChild:!0,children:c.jsx(T,{"data-testid":"static-notebook-dialog-trigger",variant:"secondary",children:"Run or edit this notebook"})}),A[25]=m):m=A[25],Y=YA,f=jA,A[26]!==d?(n=c.jsx(oA,{children:d}),A[26]=d,A[27]=n):n=A[27],e=tA,B="pt-4 text-md text-left",X="This is a static notebook built using",g=" ",A[28]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsx("a",{href:J.githubPage,target:"_blank",className:"text-link hover:underline",children:"marimo"}),A[28]=s):s=A[28],M=". marimo is an open-source next-generation Python notebook.",A[29]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx("hr",{className:"my-3"}),A[29]=r):r=A[29],l="In order to edit this notebook, you will need to download the code locally, install marimo, and run the following in your terminal:",A[30]===Symbol.for("react.memo_cache_sentinel")?(V=c.jsx("br",{}),A[30]=V):V=A[30],A[31]!==d?(i=c.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)]",children:["pip install marimo",V,"marimo edit ",d]}),A[31]=d,A[32]=i):i=A[32],A[33]===Symbol.for("react.memo_cache_sentinel")?(N=!t.endsWith(".html")&&c.jsxs(c.Fragment,{children:["or",c.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)] break-all",children:["marimo edit ",window.location.href]})]}),a=c.jsx("hr",{className:"my-3"}),A[33]=N,A[34]=a):(N=A[33],a=A[34]),h="You may also be able to run this notebook entirely in the browser via WebAssembly at:",p=" ",o=L,P="_blank",v="text-link hover:underline",b="noreferrer",Z=L.slice(0,40),A[0]=H,A[1]=d,A[2]=e,A[3]=f,A[4]=Y,A[5]=j,A[6]=o,A[7]=M,A[8]=r,A[9]=l,A[10]=i,A[11]=N,A[12]=a,A[13]=h,A[14]=p,A[15]=n,A[16]=m,A[17]=P,A[18]=v,A[19]=b,A[20]=Z,A[21]=B,A[22]=X,A[23]=g,A[24]=s}else e=A[2],f=A[3],Y=A[4],j=A[5],o=A[6],M=A[7],r=A[8],l=A[9],i=A[10],N=A[11],a=A[12],h=A[13],p=A[14],n=A[15],m=A[16],P=A[17],v=A[18],b=A[19],Z=A[20],B=A[21],X=A[22],g=A[23],s=A[24];return A[35]!==o||A[36]!==P||A[37]!==v||A[38]!==b||A[39]!==Z?(k=c.jsxs("a",{href:o,target:P,className:v,rel:b,children:[Z,"..."]}),A[35]=o,A[36]=P,A[37]=v,A[38]=b,A[39]=Z,A[40]=k):k=A[40],A[41]===Symbol.for("react.memo_cache_sentinel")?(W=c.jsx("br",{}),A[41]=W):W=A[41],A[42]===Symbol.for("react.memo_cache_sentinel")?(G=c.jsxs("div",{className:"text-sm text-muted-foreground pt-2",children:[c.jsx("strong",{children:"Note:"})," This feature is experimental and may not work for all notebooks. Additionally, some dependencies may not be available in the browser."]}),A[42]=G):G=A[42],A[43]!==e||A[44]!==M||A[45]!==r||A[46]!==l||A[47]!==i||A[48]!==N||A[49]!==a||A[50]!==h||A[51]!==p||A[52]!==k||A[53]!==B||A[54]!==X||A[55]!==g||A[56]!==s?(F=c.jsxs(e,{className:B,children:[X,g,s,M,r,l,i,N,a,h,p,k,W,G]}),A[43]=e,A[44]=M,A[45]=r,A[46]=l,A[47]=i,A[48]=N,A[49]=a,A[50]=h,A[51]=p,A[52]=k,A[53]=B,A[54]=X,A[55]=g,A[56]=s,A[57]=F):F=A[57],A[58]!==f||A[59]!==n||A[60]!==F?(y=c.jsxs(f,{children:[n,F]}),A[58]=f,A[59]=n,A[60]=F,A[61]=y):y=A[61],A[62]!==H?(u=async()=>{await MA(H),rA({title:"Copied to clipboard"})},A[62]=H,A[63]=u):u=A[63],A[64]===Symbol.for("react.memo_cache_sentinel")?(O=c.jsx(iA,{className:"w-4 h-4 mr-1"}),A[64]=O):O=A[64],A[65]!==u?(Q=c.jsxs(T,{"data-testid":"copy-static-notebook-dialog-button",variant:"secondary",onClick:u,children:[O,"Copy code"]}),A[65]=u,A[66]=Q):Q=A[66],A[67]!==H||A[68]!==d?(R=()=>{NA(new Blob([H],{type:"text/plain"}),d)},A[67]=H,A[68]=d,A[69]=R):R=A[69],A[70]===Symbol.for("react.memo_cache_sentinel")?(D=c.jsx(aA,{className:"w-4 h-4 mr-1"}),A[70]=D):D=A[70],A[71]!==R?(w=c.jsxs(T,{"data-testid":"download-static-notebook-dialog-button",variant:"secondary",onClick:R,children:[D,"Download code"]}),A[71]=R,A[72]=w):w=A[72],A[73]!==Q||A[74]!==w?(I=c.jsxs("div",{className:"flex gap-4 flex-wrap",children:[Q,w]}),A[73]=Q,A[74]=w,A[75]=I):I=A[75],A[76]!==Y||A[77]!==y||A[78]!==I?(C=c.jsxs(Y,{children:[y,I]}),A[76]=Y,A[77]=y,A[78]=I,A[79]=C):C=A[79],A[80]!==j||A[81]!==m||A[82]!==C?(E=c.jsxs(j,{children:[m,C]}),A[80]=j,A[81]=m,A[82]=C,A[83]=E):E=A[83],E},yA=nA()||U(),uA=z=>{const A=S.c(10);let H,d,x,t,e,f,Y;return A[0]===Symbol.for("react.memo_cache_sentinel")?(H=bA(),A[0]=H):H=A[0],A[1]===Symbol.for("react.memo_cache_sentinel")?(d=c.jsx(kA,{}),A[1]=d):d=A[1],A[2]!==z.appConfig?(x=c.jsx(BA,{appConfig:z.appConfig}),A[2]=z.appConfig,A[3]=x):x=A[3],A[4]===Symbol.for("react.memo_cache_sentinel")?(t=yA&&c.jsx(QA,{}),A[4]=t):t=A[4],A[5]!==x?(e=c.jsxs(mA,{children:[d,x,t]}),A[5]=x,A[6]=e):e=A[6],A[7]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsx(sA,{}),A[7]=f):f=A[7],A[8]!==e?(Y=c.jsx(ZA,{children:c.jsxs(lA,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",storage:H,children:[e,f]})}),A[8]=e,A[9]=Y):Y=A[9],Y},QA=()=>{const z=S.c(1);let A;return z[0]===Symbol.for("react.memo_cache_sentinel")?(A=c.jsx("div",{className:"fixed bottom-0 right-0 z-50","data-testid":"watermark",children:c.jsxs("a",{href:J.githubPage,target:"_blank",className:"text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2",children:[c.jsx("span",{className:"pb-[2px]",children:"made with marimo"}),c.jsx("img",{src:"data:image/x-icon;base64,AAABAAMAEBAAAAEAIABoBAAANgAAACAgAAABACAAKBEAAJ4EAAAwMAAAAQAgAGgmAADGFQAAKAAAABAAAAAgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkcB8pY3MdjmN0HsZjdB7YZHQezWNzHa9ichx/YXAfMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFVVAANkcx2FZHQd+2V1IP9qeSf/Y3Md/2NzHf9jcx3vY3Md/GNzHf9jcx22aHEcGwAAAAAAAAAAAAAAAP//AAFjdB6iY3Md/2NzHf9vfi//ipZV/6Ksef+wuIz/tb2U/6myg/90gjX/Y3Md/2NzHeJoeCAgAAAAAAAAAABjcx5vY3Md/2NzHf9/jEb/6+3i////////////////////////////+vv4/6+3i/9kdB7/ZHQdyoCAQARjcRwSY3Me8XKAMv9zgTT/7e/l////////////////////////////////////////////s7uR/2NzHf9idh9bZHUda2NzHf9/jEb/sbmP//r7+P/M0rb/3uLQ/+ns4P/M0rb/7/Ho/9ndyf/N0rf///////n59v9peSb/Y3Qdt2R0Ha5jcx3/Z3cj/+7w5//w8en/YXMc/5mkbf+8w5//YXMc/83TuP+JllX/YnQd////////////g49L/2R0HulkdB7NY3Md/3yJQf//////8PHp/2FzHP+ZpG3/vMOf/2FzHP/N07j/iZZV/2J0Hf///////////4WRTv9kcx32Y3MdzGV0H/+NmVr///////Dx6f9hcxz/gY9K/5mkbP9hcxz/pK59/3aGOv9jdR////////7+/v9vfi7/Y3Qd5WNzHa95hjz/hpJP///////w8en/YXMc/3KCNf9idB3/anso/4COSf9hcxz/iJZU///////c38z/Y3Md/2NzHsZjcx52bHsp/4WST//x8+v//f39/+7w5//09vD/6Ovf//Dx6f/6+/j/4OPS//r7+P//////l6Fo/2NzHf9idB6RZG8hF2NzHvGOmVv/nadx//7//v//////////////////////////////////////1dnD/2R0Hv9jcx3+Y3gfMQAAAABldB5EaHgk842YWv+0u5H/19vG////////////////////////////5eja/3B/MP9jcx3/Y3QdlQAAAAAAAAAAAAAAAWN0HoZldSD/v8aj/+Tn2f/////////////////5+fb/vcSg/299Lv9jcx3/ZHMeq2aZMwUAAAAAAAAAAAAAAAAAAAAAZHMemWNzHf9rein/iZVV/5OeZP+Hk1H/aXkm/2d2Iv9ldR/wZHQecICAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAFldB5WY3QduWNzHe1jcx38Y3Qd6mNzHbpkdB5uaXgeEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAACAAAABAAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABtbSQHZHMeRWNzHXxjcx2fY3QdsGNzHbFjdB2nY3MekGJyHXJmdB9LZHYbHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkbyEXZHMdjGNzHe5jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md32NyHZNkcx4zAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZXYdaGR0HvBjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9kdB3eZHQd4WRzHfNjcx3/Y3Md/2NzHf9kcx24YXMeKgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZoAaCmR0Hqtjcx3/Y3Md/2NzHf9jcx3/anko/32KQ/9ldSD/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx34ZHUdawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGJ2Jw1jdB3EY3Md/2NzHf9jcx3/Y3Md/3SBNf92hDn/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9mdiH/a3op/2x7K/9oeCX/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3QdjQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgEAEZHMdumNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/3B/MP+fqXX/wsim/9ndyP/q7OH/+Pn1//////////////////7+/v/d4c7/oap3/2h3JP9jcx3/Y3Md/2NzHf9jcx3/ZHQegAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGN0Hohjcx3/Y3Md/2NzHf9jcx3/Y3Md/2Z1If+0vJL/+vv4////////////////////////////////////////////////////////////7e/l/5ahZ/9jcx3/Y3Md/2NzHf9jcx3+ZHIfSgAAAAAAAAAAAAAAAAAAAABmdBw3Y3Md/WNzHf9jcx3/Y3Md/2NzHf9mdSH/ztO4/////////////////////////////////////////////////////////////////////////////////8PJqP9ndiL/Y3Md/2NzHf9jdB3jYIAgEAAAAAAAAAAAAAAAAWRzHcdjcx3/Y3Md/2R0H/93hTr/Y3Md/7i/mP///////////////////////////////////////////////////////////////////////////////////////////8zRtf9kdB7/Y3Md/2NzHf9idB5/AAAAAAAAAABkcx5FY3Md/2NzHf9jcx3/nKZw/2p5J/+Gk1D//v79/////////////////////////////////////////////////////////////////////////////////////////////////52ncv9jcx3/Y3Md/2NzHuhVgCoGAAAAAGN0Hqxjcx3/Y3Md/2l4Jf+fqXT/Y3Md/9zfzP//////////////////////////////////////////////////////////////////////////////////////////////////////5+nc/2NzHf9jcx3/Y3Md/2N0H0tddBcLZHMd9mNzHf9jcx3/h5NS/2x7K/+IlFP////////////s7uT/mqVu/5qlbv+apW7/4uXV//////+ps4T/mqVu/5qlbv/Ax6T//////83Tt/+apW7/mqVu/5umb///////////////////////fIlB/2NzHf9jcx3/ZHMekmRzHkVjcx3/Y3Md/2NzHf9wfzH/Y3Md/8bMrP///////////+Hk1P9hcxz/YXMc/2FzHP/R1r3//////3mIP/9hcxz/YXMc/5yncf//////sbqO/2FzHP9hcxz/YnQe//////////////////////+bpW7/Y3Md/2NzHf9kdB7EY3MedmNzHf9jcx3/Y3Md/2NzHf9mdiL/9vfy////////////4eTU/2FzHP9hcxz/YXMc/9HWvf//////eYg//2FzHP9hcxz/nKdx//////+xuo7/YXMc/2FzHP9idB7//////////////////////6qzhP9jcx3/Y3Md/2R0HeNjcx2VY3Md/2NzHf9jcx3/Y3Md/4aSUP/////////////////h5NT/YXMc/2FzHP9hcxz/0da9//////95iD//YXMc/2FzHP+cp3H//////7G6jv9hcxz/YXMc/2J0Hv//////////////////////rLSH/2NzHf9jcx3/Y3Md72R0HqNjcx3/Y3Md/2NzHf9jcx3/o616/////////////////+Hk1P9hcxz/YXMc/2FzHP/R1r3//////3mIP/9hcxz/YXMc/5yncf//////sbqO/2FzHP9hcxz/YnQe//////////////////////+hq3f/Y3Md/2NzHf9jdB3qZHQdoWNzHf9jcx3/Y3Md/2NzHf+1vJT/////////////////4eTU/2FzHP9hcxz/YXMc/8zStv//////dIM3/2FzHP9hcxz/lqJp//////+rtYf/YXMc/2FzHP9idB7//////////////////////4qWVv9jcx3/Y3Md/2N0HthjcxyQY3Md/2NzHf9peCX/Y3Md/7rBm//////////////////h5NT/YXMc/2FzHP9hcxz/dYQ4/4+bXv9hcxz/YXMc/2FzHP9ldyL/laFo/2t8Kv9hcxz/YXMc/2d4JP/////////////////8/Pr/a3oo/2NzHf9jcx3/Y3Mdv2J0HXJjcx3/Y3Md/3KAM/9jcx3/sbmN/////////////////+Hk1P9hcxz/YXMc/2FzHP9idB7/YXMc/2FzHP9hcxz/YXMc/2d4Jf9hcxz/YXMc/2FzHP9hcxz/hJJO/////////////////9XZwv9jcx3/Y3Md/2NzHf9jcx2gY3QfS2NzHf9jcx3/qrKD/2t6KP+Yomr/////////////////4eTU/2FzHP9hcxz/YXMc/6Svfv9kdiH/YXMc/2FzHP+DkU3/0te+/2Z3I/9hcxz/YXMc/2Z4I//V2sP/////////////////nKZv/2NzHf9jcx3/Y3Md/2JzHXpheSQVZHMd/WNzHf+EkE3/kZxg/3B/MP/8/fv////////////5+fb/3uLQ/97i0P/e4tD/9vfx/+fp3P+9xaH/yM6v//n69///////6+7j/8DHpP/ByKb/7O7j/////////////////+7w5/9ndyP/Y3Md/2NzHf9jcx3/YnUdRgAAAABkdB7EY3Md/2R0Hv+xuY//Y3Md/8vQs///////////////////////////////////////////////////////////////////////////////////////////////////////o6x5/2NzHf9jcx3/Y3Md/2NzHfRmgBoKAAAAAGRzHVljcx3/Y3Md/5ymcP99ikL/eoc+//n69////////////////////////////////////////////////////////////////////////////////////////////+Dj0/9ldSD/Y3Md/2NzHf9jcx3/ZHQdngAAAAAAAAAAgIAAAmNzHcljcx3/ZXQf/7nAmv9ndiL/maRs//3+/f/////////////////////////////////////////////////////////////////////////////////5+fb/fotE/2NzHf9jcx3/Y3Md/2NzHvpidiEnAAAAAAAAAAAAAAAAZXIiJmNzHt5jcx3/dYM3/7i/mP9mdiL/kp1h//P07f///////////////////////////////////////////////////////////////////////v79/5eiaf9jcx3/Y3Md/2NzHf9jcx3/Y3QeiAAAAAAAAAAAAAAAAAAAAAAAAAAAYnYnDWNzHs5jcx3/anoo/6uzhf+ttYf/nadx/3aEOf/q7OH///////////////////////////////////////////////////////z8+/+dp3H/Y3Md/2NzHf9jcx3/Y3Md/2N0HsaAgCoGAAAAAAAAAAAAAAAAAAAAAAAAAABVVQADY3UegWNzHf9jcx3/a3op/+vt4//8/Pr/tb2V//Lz7P/////////////////////////////////////////////////q7OD/iJRS/2NzHv9jcx3/Y3Md/2NzHf9jcx7VYXkkFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgAACY3QemGNzHf9jcx3/anoo/621iP/s7uT////////////////////////////////////////////m6Nr/pa59/2h3JP9odyT/aHck/2NzHf9jcx3/ZHMexWFtJBUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wABZHMeh2NzHf9jcx3/Y3Md/2R0Hv+Cj0r/pK58/7vCnP/Fy6v/w8mp/7e+l/+fqXT/fIlA/2NzHf9mdiL/bHsq/2h3JP9jcx3/Y3Md/WN0HY1tbSQHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABheSQVY3MdyWNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Me/2V1IP9jcx3/Y3Md/2N0HsRhdBw3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgEAEZXMebWN0HeVjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md+WR0Ha1kdB9CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZpkzBWNzHVBkdB2WY3Qdy2N0Hexkcx76ZHMd+GN0HeVjdB7EZHMdlGJ0HlZgcCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAADAAAABgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFddBcLaHEcG2R2HylidR1GZHMeZmN0HnlkdB5/ZHIdfWNzHXFjcxtdZHQgQGRwHyloeCAgZG8hF2qAKgyAgAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZnUdI2RzHmZjcx2gZHQcz2NzHfNjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHfdjcx7fY3QdxGRzHqRichx/ZHMeVGZ1HSNVVQADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHZ2FA1kdB6AY3Md22JzHfZjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx38Y3Md8GNzHd5kcx2mZHIgOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABddBcLZHYeRWRzHtdjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/mNzHdBjdB7GZHQd7mNzHvpjcx3+Y3Md/2NzHf9jcx3/Y3Md/mNzHa9jdhw2gIAqBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGZwHxljcx2OY3Me8WNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx38Y3Qd6mNzHvBjcx38Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3lY3QehmJ2HRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZHYbHGN0HMZjdB35Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/d4Q6/5eiaf91gzf/ZHQe/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md+2R0HsZndxsvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAFichsvY3Qd1WNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2l5Jv9/jEb/f4xG/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/ZHQf/2V1If9mdiL/ZnYh/2V1IP9kdB7/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3TYnEdNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGZzGihjcx3DY3Id/mNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/29+Lv9peSb/Y3Md/2NzHf9odyT/eIY8/4iUUv+Un2T/n6l0/6ixgf+vt4v/tbyU/7jAmf+6wZv/usGb/7e/l/+osYH/h5NQ/2d2Iv9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/ZHMc12NzHT4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaoAVDGNzHsZjcx39Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9kdB//hZFO/7zDnv/g49P/7O7j//Hz6//19vH/+fr2//z8+//+/v7////////////////////////////7/Pr/8fLq/9jbxv+Qm17/ZnUh/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2RzHdRmcRwtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmgBoKZHQeo2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/ZHQf/4CNRv/O07n//P37///////////////////////////////////////////////////////////////////////////////////////9/fz/z9S6/4CMRv9ndyP/Y3Md/2NzHf9jcx3/Y3Md/2NzHf5kcx6oYHAgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFVVAANjdR1iY3Me8mNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9ndiL/nqhz/+zt4/////////////////////////////////////////////////////////////////////////////////////////////////////////////Dy6v+vt4v/bnwt/2NzHf9jcx3/Y3Md/2NzHf9jdB33YnUfawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF5xHBtjdB7PY3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2R0H/+eqHL/8/Xu///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////6+/j/0te+/218LP9jcx3/Y3Md/2NzHf9jcx3/Y3Qd7mB3Ii0AAAAAAAAAAAAAAAAAAAAAAAAAAGNzHH5jcx3/Y3Md/2NzHf9jcx3/ZHQe/3B+L/9mdSD/Y3Md/4KPSv/s7uT//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ndyP9zgTT/Y3Md/2NzHf9jcx3/Y3Md/2R0Ha5mZjMFAAAAAAAAAAAAAAAAZnUdI2N0Hexjcx3/Y3Md/2NzHf9jcx3/i5dX/4yYWP9jcx3/bX0s/9reyv////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////z8+v+7wZz/aXkm/2NzHf9jcx3/Y3Md/2NzHedkciA4AAAAAAAAAAAAAAAAZHMekmNzHf9jcx3/Y3Md/2NzHf9zgjX/ucCZ/2d2Iv9jcx3/t76W//7+/v/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////19vD/g5BL/2NzHf9jcx3/Y3Md/2NzHfxkdB5/VVUAAwAAAABqexodY3Md3mNzHf9jcx3/Y3Md/2R0Hv+dp3L/hZJP/2NzHf+BjUj/7/Dn////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////xsyt/2NzHf9jcx3/Y3Md/2NzHf9kdB69YW0YFQAAAABjdBxaY3Me8mNzHf9jcx3/Y3Md/2t6KP+cpnH/b34u/2Z2Iv+zu5L//P37////////////+Pn1/+nr3//p69//6evf/+nr3//u8Ob//f38///////3+PT/6uzh/+nr3//p69//6evf/+zu4//8/Pv///////v8+v/p7OD/6evf/+nr3//p69//6ezg////////////////////////////9/jz/3B/MP9jcx3/Y3Md/2NzHf9jcx3tYXMeKlWAKgZjcx2OY3Md/mNzHf9jcx3/Y3Md/3B+L/+MmFn/ZHQf/3OCNf/h5NT/////////////////09jB/3SEOP90hDj/dIQ4/3SEOP+RnmL/8fPs///////O1Lr/e4pC/3SEOP90hDj/dIQ4/4aTUf/t7+X//////+jr3v91hTj/dIQ4/3SEOP90hDj/doU6/////////////////////////////////5iiaf9jcx3/Y3Md/2NzHf9jcx3+YnMfW2ZzGhRjcx66Y3Md/2NzHf9jcx3/Y3Md/2l5Jv92hDn/Y3Md/5KdYf/+/v7/////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/8PHp///////HzrD/aXoo/2FzHP9hcxz/YXMc/3WEOP/r7eL//////+Xo2f9idB3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////7nBmv9jcx3/Y3Md/2NzHf9jcx3/Y3Idk2BwICBjcx7fY3Md/2NzHf9jcx3/Y3Md/2R0Hv9ldSD/Y3Md/83Stv//////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/8PHp///////HzrD/aXoo/2FzHP9hcxz/YXMc/3WEOP/r7eL//////+Xo2f9idB3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////9DUu/9jcx3/Y3Md/2NzHf9jcx3/ZHQeu2N0HSxjcx76Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/bHsq//n69///////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/8PHp///////HzrD/aXoo/2FzHP9hcxz/YXMc/3WEOP/r7eL//////+Xo2f9idB3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////9zgzf9jcx3/Y3Md/2NzHf9jcx3/ZHMe12JzH0ljcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/k55j////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/8PHp///////HzrD/aXoo/2FzHP9hcxz/YXMc/3WEOP/r7eL//////+Xo2f9idB3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////97hz/9jcx3/Y3Md/2NzHf9jcx3/YnMd5GR1Hl5jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/uL+Y////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/8PHp///////HzrD/aXoo/2FzHP9hcxz/YXMc/3WEOP/r7eL//////+Xo2f9idB3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////9baxP9jcx3/Y3Md/2NzHf9jcx3/ZHMd5GVzHWhjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/1NnB////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/8PHp///////HzrD/aXoo/2FzHP9hcxz/YXMc/3WEOP/r7eL//////+Xo2f9idB3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////8bMrP9jcx3/Y3Md/2NzHf9jcx3/Y3Md2WJ0HGVjcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9ldSH/5eja////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+Aj0r/7/Ho///////GzK3/aHkn/2FzHP9hcxz/YXMc/3SEOP/p6+D//////+Ll1f9hcx3/YXMc/2FzHP9hcxz/Y3Uf/////////////////////////////////6y0h/9jcx3/Y3Md/2NzHf9jcx3/ZHMexWRyHVdjcx3/Y3Md/2NzHf9ldB//ZHMe/2NzHf9rein/6Ord////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP9tfS3/x82u/+Xo2v+hq3j/Y3Uf/2FzHP9hcxz/YXMc/2t7Kv++xaH/5unb/6u1h/9hcxz/YXMc/2FzHP9hcxz/ZHYg/////////////////////////////////4qVVf9jcx3/Y3Md/2NzHf9jcx3/ZHQcq2RwHEBjcx3/Y3Md/2NzHf9qeSf/ZXUg/2NzHf9seyn/6Ord////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP9hcxz/bH0s/3ODNv9neCT/YXMc/2FzHP9hcxz/YXMc/2FzHf9rfCr/c4M2/2Z4JP9hcxz/YXMc/2FzHP9hcxz/bX4u////////////////////////////9vfy/2h3JP9jcx3/Y3Md/2NzHf9jcx3/Y3QdjWRwHyljdB33Y3Md/2NzHf9wfzH/aHck/2NzHf9mdiL/5efZ////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP9hcx3/YXMc/2FzHP9hcxz/YXMc/2FzHP9hcxz/YXMc/2R2If9hcxz/YXMc/2FzHP9hcxz/YXMc/2FzHP9hcxz/jZpc////////////////////////////x82v/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Mdamh4ICBjcx7fY3Md/2NzHf9vfi7/oKp2/2R0Hv9jcx3/09i/////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP9ygjT/bn8v/2FzHP9hcxz/YXMc/2FzHP9hcxz/Zngk/6iygf9meCP/YXMc/2FzHP9hcxz/YXMc/2FzHP9neCT/ys+y///////////////////////7/Pr/kJxf/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3IeQ2h0IxZkdB3CY3Md/2NzHf9kdB//09e+/3eFO/9jcx3/srqP////////////////////////////zdO4/2FzHP9hcxz/YXMc/2FzHP+CkEz/xMur/2l7KP9hcxz/YXMc/2FzHP9kdiD/tb2T//X28f+hrHj/ZHUg/2FzHP9hcxz/YXMc/2R2IP+irXr/9/jz///////////////////////f4tH/c4E0/2NzHf9jcx3/Y3Md/2NzHf9jcx3xYHMgKGaAGgpicx2eY3Md/2NzHf9jcx3/p7CA/6Ksef9jcx3/hJFN//7+/f//////////////////////7vDn/8nPsv/Jz7L/yc+y/8nPsv/V2cL/+vr3/+rs4f+psoP/jptd/5mkbP/P1Ln//Pz6///////8/Pr/zdO4/5umcP+Om13/nahz/87Uuf/8/Pr///////////////////////39/P+xuY7/ZXUg/2NzHf9jcx3/Y3Md/2NzHf9kdB7PXnEcGwD/AAFlcx5vY3Md+WNzHf9jcx3/dYM3/87TuP9odyT/ZXUg/9/i0P///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+zu5P9/jEb/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jdB2lYnYnDQAAAABjcRw2Y3Md5mNzHf9jcx3/Y3Md/7e/l/+Hk1H/Y3Md/5ahZ//9/fz//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7O7kf9ldB//Y3Md/2NzHf9jcx3/Y3Md/2NzHfljcx1xAP8AAQAAAABVVQADY3MesWNzHf9jcx3/Y3Md/4GOSP+wuI3/Z3cj/29+L//T17///v7+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5eja/2l5Jf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2N0HeNhdR8yAAAAAAAAAAAAAAAAYnEdNGNzHfFjcx3/Y3Md/2p5J/+wuI3/hZJP/2R0Hv+NmFr/7/Ho///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////x8ur/jZla/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2R0HqBmZjMFAAAAAAAAAAAAAAAAAP8AAWNzHXxjcx3/Y3Md/2NzHf9/jEX/z9W7/218LP9ldSD/laBm//v8+f////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////z8+v+zupD/Z3cj/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Id82BwICAAAAAAAAAAAAAAAAAAAAAAAAAAAGFtGBVjdB6yY3Md+2NzHf9jcx3/laBm/8nPsf9ygDL/Y3Me/4+aXf/o697//v79/////////////////////////////////////////////////////////////////////////////////////////////////////////////v7+/9HWvf9tfCz/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx35ZHIecAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdB8hY3IeiGNzHfljcx3/Y3Md/5SfZP+nsID/fotD/2R0H/+Kllb/usGb/7nAmv/l6Nr//v79///////////////////////////////////////////////////////////////////////////////////////9/v3/ztK4/3OCNf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf1kdB2uY3EcEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbW0kB2N1HoFjcx3+Y3Md/2R0Hv9zgTT/xsyt/9ncyP/l6Nr/ipZW/2Z2If+apW3/9fbx//////////////////////////////////////////////////////////////////////////////////39/f/IzbD/c4E0/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHd1kdBwuAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbW0kB2NzHXFjcx3mY3Md/2NzHf9jcx3/eYc+//T17///////9vfz/5CbX/+psoL/+Pn0//////////////////////////////////////////////////////////////////////////7/9PXv/7zDnv9reyn/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/ZHMe5mVyHzoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGF5GBVjcx2dY3Md+WNzHf9jcx3/Y3Md/5SfZP/T2MD/+/z5//3+/f/8/Pr///////////////////////////////////////////////////////////////////////n59v/M0bb/kZxg/2R0H/9ldSD/ZnYi/2NzHf9jcx3/Y3Md/2NzHf5jcx3RZHQfQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjcRwSZHQfnmNzHf9jcx3/Y3Md/2R0Hv9vfi7/kJte/9HWvf/6+/n////////////////////////////////////////////////////////////29/L/xcus/4eTUP9tfCv/ZHQe/2Z2Iv9tfCz/ZXUg/2NzHf9jcx3/Y3Md/2RzHdJkcx4zgIAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAAmV0HZNjcx30Y3Md/2NzHf9jcx3/Y3Md/2NzHv91hDj/oat4/8jOsP/h5NT/6evf/+vt4v/s7uP/6+3h/+jq3f/c38z/v8ai/5eiaf9vfS7/Y3Md/2NzHv9ldSH/bn4u/29+MP9jcx3/Y3Md/2NzHf9jch3zY3IerGNxHBIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGNxHBJjcx60Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9mdiH/cH4v/3aEOf94hTv/dII2/2x7K/9kdB//Y3Md/2NzHf9jcx3/Y3Me/2d3I/9reij/ZnYi/2NzHf9jcx3/Y3Md/2R0Hs1jcx9kXXQXCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICAAAJidB85ZHMd0mNzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2R0Hv9jcx3/Y3Md/2NzHf9jch3qY3IeeWJ2HRpVVQADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXXQXC2N0HYtjcx3jZHMd+2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf5kcx3zY3Md3WNzH45geCAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFVVAANjch8xZHQdfWR0HcBjdB7yY3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx3/Y3Md/2NzHf9jcx7yYnMdymRzHZdkch5eZncaHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVVUAA110IxZkdBwuY3UdYmNzHZ1jcx3IY3Qd5WRzHfZkcx74ZHMe8GNzHdxjcx68YnMekmNzHl1gcRwtZnAfGVVxHAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",alt:"marimo",className:"h-4 w-auto"})]})}),z[0]=A):A=z[0],A};export{uA as default};
|
package/dist/assets/{sankeyDiagram-QLVOVGJD-73tcIslD.js → sankeyDiagram-QLVOVGJD-BeJLaDns.js}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
|
-
var z,F,O;import{_,p as pt,q as dt,s as _t,g as mt,b as xt,a as kt,c as R,z as vt,S as bt,y as wt,j as St}from"./mermaid-WxgDr0hv.js";import{s as Y}from"./transform-BzDy4yXW.js";import{o as Et}from"./ordinal-DDUp3AbE.js";import{c as At}from"./colors-bszWmPJw.js";import"./index-DR-WqNxT.js";import"./step-BwsUM5iJ.js";import"./timer-B5eI7Tcu.js";import"./init-DLRA0X12.js";const Lt=At("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function it(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var B,st;function rt(t,e){var i,l,o=t.length,r=-1;if(e==null){for(;++r<o;)if((i=t[r])!=null&&i>=i)for(l=i;++r<o;)(i=t[r])!=null&&i>l&&(l=i)}else for(;++r<o;)if((i=e(t[r],r,t))!=null&&i>=i)for(l=i;++r<o;)(i=e(t[r],r,t))!=null&&i>l&&(l=i);return l}function ot(t,e){var i,l,o=t.length,r=-1;if(e==null){for(;++r<o;)if((i=t[r])!=null&&i>=i)for(l=i;++r<o;)(i=t[r])!=null&&l>i&&(l=i)}else for(;++r<o;)if((i=e(t[r],r,t))!=null&&i>=i)for(l=i;++r<o;)(i=e(t[r],r,t))!=null&&l>i&&(l=i);return l}function K(t,e){var i,l=t.length,o=-1,r=0;if(e==null)for(;++o<l;)(i=+t[o])&&(r+=i);else for(;++o<l;)(i=+e(t[o],o,t))&&(r+=i);return r}function Mt(t){return t.target.depth}function at(t,e){return t.sourceLinks.length?t.depth:e-1}function W(t){return function(){return t}}function ct(t,e){return G(t.source,e.source)||t.index-e.index}function lt(t,e){return G(t.target,e.target)||t.index-e.index}function G(t,e){return t.y0-e.y0}function Z(t){return t.value}function It(t){return t.index}function Tt(t){return t.nodes}function Nt(t){return t.links}function ht(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function ut({nodes:t}){for(const e of t){let i=e.y0,l=i;for(const o of e.sourceLinks)o.y0=i+o.width/2,i+=o.width;for(const o of e.targetLinks)o.y1=l+o.width/2,l+=o.width}}function Pt(){let t,e,i,l=0,o=0,r=1,k=1,s=24,y=8,c=It,d=at,x=Tt,p=Nt,L=6;function v(){const n={nodes:x.apply(null,arguments),links:p.apply(null,arguments)};return function({nodes:h,links:u}){for(const[f,a]of h.entries())a.index=f,a.sourceLinks=[],a.targetLinks=[];const g=new Map(h.map((f,a)=>[c(f,a,h),f]));for(const[f,a]of u.entries()){a.index=f;let{source:b,target:m}=a;typeof b!="object"&&(b=a.source=ht(g,b)),typeof m!="object"&&(m=a.target=ht(g,m)),b.sourceLinks.push(a),m.targetLinks.push(a)}if(i!=null)for(const{sourceLinks:f,targetLinks:a}of h)f.sort(i),a.sort(i)}(n),function({nodes:h}){for(const u of h)u.value=u.fixedValue===void 0?Math.max(K(u.sourceLinks,Z),K(u.targetLinks,Z)):u.fixedValue}(n),function({nodes:h}){const u=h.length;let g=new Set(h),f=new Set,a=0;for(;g.size;){for(const b of g){b.depth=a;for(const{target:m}of b.sourceLinks)f.add(m)}if(++a>u)throw new Error("circular link");g=f,f=new Set}}(n),function({nodes:h}){const u=h.length;let g=new Set(h),f=new Set,a=0;for(;g.size;){for(const b of g){b.height=a;for(const{source:m}of b.targetLinks)f.add(m)}if(++a>u)throw new Error("circular link");g=f,f=new Set}}(n),function(h){const u=function({nodes:g}){const f=rt(g,m=>m.depth)+1,a=(r-l-s)/(f-1),b=new Array(f);for(const m of g){const S=Math.max(0,Math.min(f-1,Math.floor(d.call(null,m,f))));m.layer=S,m.x0=l+S*a,m.x1=m.x0+s,b[S]?b[S].push(m):b[S]=[m]}if(e)for(const m of b)m.sort(e);return b}(h);t=Math.min(y,(k-o)/(rt(u,g=>g.length)-1)),function(g){const f=ot(g,a=>(k-o-(a.length-1)*t)/K(a,Z));for(const a of g){let b=o;for(const m of a){m.y0=b,m.y1=b+m.value*f,b=m.y1+t;for(const S of m.sourceLinks)S.width=S.value*f}b=(k-b+t)/(a.length+1);for(let m=0;m<a.length;++m){const S=a[m];S.y0+=b*(m+1),S.y1+=b*(m+1)}C(a)}}(u);for(let g=0;g<L;++g){const f=Math.pow(.99,g),a=Math.max(1-f,(g+1)/L);I(u,f,a),T(u,f,a)}}(n),ut(n),n}function T(n,h,u){for(let g=1,f=n.length;g<f;++g){const a=n[g];for(const b of a){let m=0,S=0;for(const{source:A,value:U}of b.targetLinks){let et=U*(b.layer-A.layer);m+=$(A,b)*et,S+=et}if(!(S>0))continue;let D=(m/S-b.y0)*h;b.y0+=D,b.y1+=D,N(b)}e===void 0&&a.sort(G),M(a,u)}}function I(n,h,u){for(let g=n.length-2;g>=0;--g){const f=n[g];for(const a of f){let b=0,m=0;for(const{target:D,value:A}of a.sourceLinks){let U=A*(D.layer-a.layer);b+=P(a,D)*U,m+=U}if(!(m>0))continue;let S=(b/m-a.y0)*h;a.y0+=S,a.y1+=S,N(a)}e===void 0&&f.sort(G),M(f,u)}}function M(n,h){const u=n.length>>1,g=n[u];E(n,g.y0-t,u-1,h),w(n,g.y1+t,u+1,h),E(n,k,n.length-1,h),w(n,o,0,h)}function w(n,h,u,g){for(;u<n.length;++u){const f=n[u],a=(h-f.y0)*g;a>1e-6&&(f.y0+=a,f.y1+=a),h=f.y1+t}}function E(n,h,u,g){for(;u>=0;--u){const f=n[u],a=(f.y1-h)*g;a>1e-6&&(f.y0-=a,f.y1-=a),h=f.y0-t}}function N({sourceLinks:n,targetLinks:h}){if(i===void 0){for(const{source:{sourceLinks:u}}of h)u.sort(lt);for(const{target:{targetLinks:u}}of n)u.sort(ct)}}function C(n){if(i===void 0)for(const{sourceLinks:h,targetLinks:u}of n)h.sort(lt),u.sort(ct)}function $(n,h){let u=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:g,width:f}of n.sourceLinks){if(g===h)break;u+=f+t}for(const{source:g,width:f}of h.targetLinks){if(g===n)break;u-=f}return u}function P(n,h){let u=h.y0-(h.targetLinks.length-1)*t/2;for(const{source:g,width:f}of h.targetLinks){if(g===n)break;u+=f+t}for(const{target:g,width:f}of n.sourceLinks){if(g===h)break;u-=f}return u}return v.update=function(n){return ut(n),n},v.nodeId=function(n){return arguments.length?(c=typeof n=="function"?n:W(n),v):c},v.nodeAlign=function(n){return arguments.length?(d=typeof n=="function"?n:W(n),v):d},v.nodeSort=function(n){return arguments.length?(e=n,v):e},v.nodeWidth=function(n){return arguments.length?(s=+n,v):s},v.nodePadding=function(n){return arguments.length?(y=t=+n,v):y},v.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:W(n),v):x},v.links=function(n){return arguments.length?(p=typeof n=="function"?n:W(n),v):p},v.linkSort=function(n){return arguments.length?(i=n,v):i},v.size=function(n){return arguments.length?(l=o=0,r=+n[0],k=+n[1],v):[r-l,k-o]},v.extent=function(n){return arguments.length?(l=+n[0][0],r=+n[1][0],o=+n[0][1],k=+n[1][1],v):[[l,o],[r,k]]},v.iterations=function(n){return arguments.length?(L=+n,v):L},v}(B=it).length===1&&(st=B,B=function(t,e){return it(st(t),e)});var H=Math.PI,J=2*H,j=1e-6,Ot=J-j;function tt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ft(){return new tt}function yt(t){return function(){return t}}function Ct(t){return t[0]}function Dt(t){return t[1]}tt.prototype=ft.prototype={constructor:tt,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,l){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+l)},bezierCurveTo:function(t,e,i,l,o,r){this._+="C"+ +t+","+ +e+","+ +i+","+ +l+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,e,i,l,o){t=+t,e=+e,i=+i,l=+l,o=+o;var r=this._x1,k=this._y1,s=i-t,y=l-e,c=r-t,d=k-e,x=c*c+d*d;if(o<0)throw new Error("negative radius: "+o);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>j)if(Math.abs(d*s-y*c)>j&&o){var p=i-r,L=l-k,v=s*s+y*y,T=p*p+L*L,I=Math.sqrt(v),M=Math.sqrt(x),w=o*Math.tan((H-Math.acos((v+x-T)/(2*I*M)))/2),E=w/M,N=w/I;Math.abs(E-1)>j&&(this._+="L"+(t+E*c)+","+(e+E*d)),this._+="A"+o+","+o+",0,0,"+ +(d*p>c*L)+","+(this._x1=t+N*s)+","+(this._y1=e+N*y)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,i,l,o,r){t=+t,e=+e,r=!!r;var k=(i=+i)*Math.cos(l),s=i*Math.sin(l),y=t+k,c=e+s,d=1^r,x=r?l-o:o-l;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+y+","+c:(Math.abs(this._x1-y)>j||Math.abs(this._y1-c)>j)&&(this._+="L"+y+","+c),i&&(x<0&&(x=x%J+J),x>Ot?this._+="A"+i+","+i+",0,1,"+d+","+(t-k)+","+(e-s)+"A"+i+","+i+",0,1,"+d+","+(this._x1=y)+","+(this._y1=c):x>j&&(this._+="A"+i+","+i+",0,"+ +(x>=H)+","+d+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=e+i*Math.sin(o))))},rect:function(t,e,i,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +l+"h"+-i+"Z"},toString:function(){return this._}};var $t=Array.prototype.slice;function jt(t){return t.source}function zt(t){return t.target}function Ft(t,e,i,l,o){t.moveTo(e,i),t.bezierCurveTo(e=(e+l)/2,i,e,o,l,o)}function Ut(){return function(t){var e=jt,i=zt,l=Ct,o=Dt,r=null;function k(){var s,y=$t.call(arguments),c=e.apply(this,y),d=i.apply(this,y);if(r||(r=s=ft()),t(r,+l.apply(this,(y[0]=c,y)),+o.apply(this,y),+l.apply(this,(y[0]=d,y)),+o.apply(this,y)),s)return r=null,s+""||null}return k.source=function(s){return arguments.length?(e=s,k):e},k.target=function(s){return arguments.length?(i=s,k):i},k.x=function(s){return arguments.length?(l=typeof s=="function"?s:yt(+s),k):l},k.y=function(s){return arguments.length?(o=typeof s=="function"?s:yt(+s),k):o},k.context=function(s){return arguments.length?(r=s??null,k):r},k}(Ft)}function Wt(t){return[t.source.x1,t.y0]}function Gt(t){return[t.target.x0,t.y1]}var nt=function(){var t=_(function(s,y,c,d){for(c=c||{},d=s.length;d--;c[s[d]]=y);return c},"o"),e=[1,9],i=[1,10],l=[1,5,10,12],o={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:_(function(s,y,c,d,x,p,L){var v=p.length-1;switch(x){case 7:const T=d.findOrCreateNode(p[v-4].trim().replaceAll('""','"')),I=d.findOrCreateNode(p[v-2].trim().replaceAll('""','"')),M=parseFloat(p[v].trim());d.addLink(T,I,M);break;case 8:case 9:case 11:this.$=p[v];break;case 10:this.$=p[v-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:_(function(s,y){if(!y.recoverable){var c=new Error(s);throw c.hash=y,c}this.trace(s)},"parseError"),parse:_(function(s){var y=this,c=[0],d=[],x=[null],p=[],L=this.table,v="",T=0,I=0,M=p.slice.call(arguments,1),w=Object.create(this.lexer),E={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(E.yy[N]=this.yy[N]);w.setInput(s,E.yy),E.yy.lexer=w,E.yy.parser=this,w.yylloc===void 0&&(w.yylloc={});var C=w.yylloc;p.push(C);var $=w.options&&w.options.ranges;function P(){var A;return typeof(A=d.pop()||w.lex()||1)!="number"&&(A instanceof Array&&(A=(d=A).pop()),A=y.symbols_[A]||A),A}typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,_(function(A){c.length=c.length-2*A,x.length=x.length-A,p.length=p.length-A},"popStack"),_(P,"lex");for(var n,h,u,g,f,a,b,m,S={};;){if(h=c[c.length-1],this.defaultActions[h]?u=this.defaultActions[h]:(n==null&&(n=P()),u=L[h]&&L[h][n]),u===void 0||!u.length||!u[0]){var D="";for(f in m=[],L[h])this.terminals_[f]&&f>2&&m.push("'"+this.terminals_[f]+"'");D=w.showPosition?"Parse error on line "+(T+1)+`:
|
1
|
+
var z,F,P;import{_,p as pt,q as dt,s as _t,g as mt,b as xt,a as kt,c as R,z as vt,S as bt,y as wt,j as St}from"./mermaid-B0jSmOfJ.js";import{s as Y}from"./transform-Cyp0GDF-.js";import{o as Et}from"./ordinal-DDUp3AbE.js";import{c as At}from"./colors-bszWmPJw.js";import"./index-ByFAVbrc.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";import"./init-DLRA0X12.js";const Lt=At("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function it(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var B,st;function rt(t,e){var i,l,o=t.length,r=-1;if(e==null){for(;++r<o;)if((i=t[r])!=null&&i>=i)for(l=i;++r<o;)(i=t[r])!=null&&i>l&&(l=i)}else for(;++r<o;)if((i=e(t[r],r,t))!=null&&i>=i)for(l=i;++r<o;)(i=e(t[r],r,t))!=null&&i>l&&(l=i);return l}function ot(t,e){var i,l,o=t.length,r=-1;if(e==null){for(;++r<o;)if((i=t[r])!=null&&i>=i)for(l=i;++r<o;)(i=t[r])!=null&&l>i&&(l=i)}else for(;++r<o;)if((i=e(t[r],r,t))!=null&&i>=i)for(l=i;++r<o;)(i=e(t[r],r,t))!=null&&l>i&&(l=i);return l}function K(t,e){var i,l=t.length,o=-1,r=0;if(e==null)for(;++o<l;)(i=+t[o])&&(r+=i);else for(;++o<l;)(i=+e(t[o],o,t))&&(r+=i);return r}function Mt(t){return t.target.depth}function at(t,e){return t.sourceLinks.length?t.depth:e-1}function W(t){return function(){return t}}function ct(t,e){return G(t.source,e.source)||t.index-e.index}function lt(t,e){return G(t.target,e.target)||t.index-e.index}function G(t,e){return t.y0-e.y0}function Z(t){return t.value}function It(t){return t.index}function Tt(t){return t.nodes}function Nt(t){return t.links}function ht(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function ut({nodes:t}){for(const e of t){let i=e.y0,l=i;for(const o of e.sourceLinks)o.y0=i+o.width/2,i+=o.width;for(const o of e.targetLinks)o.y1=l+o.width/2,l+=o.width}}function Ot(){let t,e,i,l=0,o=0,r=1,k=1,s=24,y=8,c=It,d=at,x=Tt,p=Nt,L=6;function v(){const n={nodes:x.apply(null,arguments),links:p.apply(null,arguments)};return function({nodes:h,links:u}){for(const[f,a]of h.entries())a.index=f,a.sourceLinks=[],a.targetLinks=[];const g=new Map(h.map((f,a)=>[c(f,a,h),f]));for(const[f,a]of u.entries()){a.index=f;let{source:b,target:m}=a;typeof b!="object"&&(b=a.source=ht(g,b)),typeof m!="object"&&(m=a.target=ht(g,m)),b.sourceLinks.push(a),m.targetLinks.push(a)}if(i!=null)for(const{sourceLinks:f,targetLinks:a}of h)f.sort(i),a.sort(i)}(n),function({nodes:h}){for(const u of h)u.value=u.fixedValue===void 0?Math.max(K(u.sourceLinks,Z),K(u.targetLinks,Z)):u.fixedValue}(n),function({nodes:h}){const u=h.length;let g=new Set(h),f=new Set,a=0;for(;g.size;){for(const b of g){b.depth=a;for(const{target:m}of b.sourceLinks)f.add(m)}if(++a>u)throw new Error("circular link");g=f,f=new Set}}(n),function({nodes:h}){const u=h.length;let g=new Set(h),f=new Set,a=0;for(;g.size;){for(const b of g){b.height=a;for(const{source:m}of b.targetLinks)f.add(m)}if(++a>u)throw new Error("circular link");g=f,f=new Set}}(n),function(h){const u=function({nodes:g}){const f=rt(g,m=>m.depth)+1,a=(r-l-s)/(f-1),b=new Array(f);for(const m of g){const S=Math.max(0,Math.min(f-1,Math.floor(d.call(null,m,f))));m.layer=S,m.x0=l+S*a,m.x1=m.x0+s,b[S]?b[S].push(m):b[S]=[m]}if(e)for(const m of b)m.sort(e);return b}(h);t=Math.min(y,(k-o)/(rt(u,g=>g.length)-1)),function(g){const f=ot(g,a=>(k-o-(a.length-1)*t)/K(a,Z));for(const a of g){let b=o;for(const m of a){m.y0=b,m.y1=b+m.value*f,b=m.y1+t;for(const S of m.sourceLinks)S.width=S.value*f}b=(k-b+t)/(a.length+1);for(let m=0;m<a.length;++m){const S=a[m];S.y0+=b*(m+1),S.y1+=b*(m+1)}C(a)}}(u);for(let g=0;g<L;++g){const f=Math.pow(.99,g),a=Math.max(1-f,(g+1)/L);I(u,f,a),T(u,f,a)}}(n),ut(n),n}function T(n,h,u){for(let g=1,f=n.length;g<f;++g){const a=n[g];for(const b of a){let m=0,S=0;for(const{source:A,value:U}of b.targetLinks){let et=U*(b.layer-A.layer);m+=$(A,b)*et,S+=et}if(!(S>0))continue;let D=(m/S-b.y0)*h;b.y0+=D,b.y1+=D,N(b)}e===void 0&&a.sort(G),M(a,u)}}function I(n,h,u){for(let g=n.length-2;g>=0;--g){const f=n[g];for(const a of f){let b=0,m=0;for(const{target:D,value:A}of a.sourceLinks){let U=A*(D.layer-a.layer);b+=O(a,D)*U,m+=U}if(!(m>0))continue;let S=(b/m-a.y0)*h;a.y0+=S,a.y1+=S,N(a)}e===void 0&&f.sort(G),M(f,u)}}function M(n,h){const u=n.length>>1,g=n[u];E(n,g.y0-t,u-1,h),w(n,g.y1+t,u+1,h),E(n,k,n.length-1,h),w(n,o,0,h)}function w(n,h,u,g){for(;u<n.length;++u){const f=n[u],a=(h-f.y0)*g;a>1e-6&&(f.y0+=a,f.y1+=a),h=f.y1+t}}function E(n,h,u,g){for(;u>=0;--u){const f=n[u],a=(f.y1-h)*g;a>1e-6&&(f.y0-=a,f.y1-=a),h=f.y0-t}}function N({sourceLinks:n,targetLinks:h}){if(i===void 0){for(const{source:{sourceLinks:u}}of h)u.sort(lt);for(const{target:{targetLinks:u}}of n)u.sort(ct)}}function C(n){if(i===void 0)for(const{sourceLinks:h,targetLinks:u}of n)h.sort(lt),u.sort(ct)}function $(n,h){let u=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:g,width:f}of n.sourceLinks){if(g===h)break;u+=f+t}for(const{source:g,width:f}of h.targetLinks){if(g===n)break;u-=f}return u}function O(n,h){let u=h.y0-(h.targetLinks.length-1)*t/2;for(const{source:g,width:f}of h.targetLinks){if(g===n)break;u+=f+t}for(const{target:g,width:f}of n.sourceLinks){if(g===h)break;u-=f}return u}return v.update=function(n){return ut(n),n},v.nodeId=function(n){return arguments.length?(c=typeof n=="function"?n:W(n),v):c},v.nodeAlign=function(n){return arguments.length?(d=typeof n=="function"?n:W(n),v):d},v.nodeSort=function(n){return arguments.length?(e=n,v):e},v.nodeWidth=function(n){return arguments.length?(s=+n,v):s},v.nodePadding=function(n){return arguments.length?(y=t=+n,v):y},v.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:W(n),v):x},v.links=function(n){return arguments.length?(p=typeof n=="function"?n:W(n),v):p},v.linkSort=function(n){return arguments.length?(i=n,v):i},v.size=function(n){return arguments.length?(l=o=0,r=+n[0],k=+n[1],v):[r-l,k-o]},v.extent=function(n){return arguments.length?(l=+n[0][0],r=+n[1][0],o=+n[0][1],k=+n[1][1],v):[[l,o],[r,k]]},v.iterations=function(n){return arguments.length?(L=+n,v):L},v}(B=it).length===1&&(st=B,B=function(t,e){return it(st(t),e)});var H=Math.PI,J=2*H,j=1e-6,Pt=J-j;function tt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ft(){return new tt}function yt(t){return function(){return t}}function Ct(t){return t[0]}function Dt(t){return t[1]}tt.prototype=ft.prototype={constructor:tt,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,l){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+l)},bezierCurveTo:function(t,e,i,l,o,r){this._+="C"+ +t+","+ +e+","+ +i+","+ +l+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,e,i,l,o){t=+t,e=+e,i=+i,l=+l,o=+o;var r=this._x1,k=this._y1,s=i-t,y=l-e,c=r-t,d=k-e,x=c*c+d*d;if(o<0)throw new Error("negative radius: "+o);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>j)if(Math.abs(d*s-y*c)>j&&o){var p=i-r,L=l-k,v=s*s+y*y,T=p*p+L*L,I=Math.sqrt(v),M=Math.sqrt(x),w=o*Math.tan((H-Math.acos((v+x-T)/(2*I*M)))/2),E=w/M,N=w/I;Math.abs(E-1)>j&&(this._+="L"+(t+E*c)+","+(e+E*d)),this._+="A"+o+","+o+",0,0,"+ +(d*p>c*L)+","+(this._x1=t+N*s)+","+(this._y1=e+N*y)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,i,l,o,r){t=+t,e=+e,r=!!r;var k=(i=+i)*Math.cos(l),s=i*Math.sin(l),y=t+k,c=e+s,d=1^r,x=r?l-o:o-l;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+y+","+c:(Math.abs(this._x1-y)>j||Math.abs(this._y1-c)>j)&&(this._+="L"+y+","+c),i&&(x<0&&(x=x%J+J),x>Pt?this._+="A"+i+","+i+",0,1,"+d+","+(t-k)+","+(e-s)+"A"+i+","+i+",0,1,"+d+","+(this._x1=y)+","+(this._y1=c):x>j&&(this._+="A"+i+","+i+",0,"+ +(x>=H)+","+d+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=e+i*Math.sin(o))))},rect:function(t,e,i,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +l+"h"+-i+"Z"},toString:function(){return this._}};var $t=Array.prototype.slice;function jt(t){return t.source}function zt(t){return t.target}function Ft(t,e,i,l,o){t.moveTo(e,i),t.bezierCurveTo(e=(e+l)/2,i,e,o,l,o)}function Ut(){return function(t){var e=jt,i=zt,l=Ct,o=Dt,r=null;function k(){var s,y=$t.call(arguments),c=e.apply(this,y),d=i.apply(this,y);if(r||(r=s=ft()),t(r,+l.apply(this,(y[0]=c,y)),+o.apply(this,y),+l.apply(this,(y[0]=d,y)),+o.apply(this,y)),s)return r=null,s+""||null}return k.source=function(s){return arguments.length?(e=s,k):e},k.target=function(s){return arguments.length?(i=s,k):i},k.x=function(s){return arguments.length?(l=typeof s=="function"?s:yt(+s),k):l},k.y=function(s){return arguments.length?(o=typeof s=="function"?s:yt(+s),k):o},k.context=function(s){return arguments.length?(r=s??null,k):r},k}(Ft)}function Wt(t){return[t.source.x1,t.y0]}function Gt(t){return[t.target.x0,t.y1]}var nt=function(){var t=_(function(s,y,c,d){for(c=c||{},d=s.length;d--;c[s[d]]=y);return c},"o"),e=[1,9],i=[1,10],l=[1,5,10,12],o={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:_(function(s,y,c,d,x,p,L){var v=p.length-1;switch(x){case 7:const T=d.findOrCreateNode(p[v-4].trim().replaceAll('""','"')),I=d.findOrCreateNode(p[v-2].trim().replaceAll('""','"')),M=parseFloat(p[v].trim());d.addLink(T,I,M);break;case 8:case 9:case 11:this.$=p[v];break;case 10:this.$=p[v-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:_(function(s,y){if(!y.recoverable){var c=new Error(s);throw c.hash=y,c}this.trace(s)},"parseError"),parse:_(function(s){var y=this,c=[0],d=[],x=[null],p=[],L=this.table,v="",T=0,I=0,M=p.slice.call(arguments,1),w=Object.create(this.lexer),E={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(E.yy[N]=this.yy[N]);w.setInput(s,E.yy),E.yy.lexer=w,E.yy.parser=this,w.yylloc===void 0&&(w.yylloc={});var C=w.yylloc;p.push(C);var $=w.options&&w.options.ranges;function O(){var A;return typeof(A=d.pop()||w.lex()||1)!="number"&&(A instanceof Array&&(A=(d=A).pop()),A=y.symbols_[A]||A),A}typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,_(function(A){c.length=c.length-2*A,x.length=x.length-A,p.length=p.length-A},"popStack"),_(O,"lex");for(var n,h,u,g,f,a,b,m,S={};;){if(h=c[c.length-1],this.defaultActions[h]?u=this.defaultActions[h]:(n==null&&(n=O()),u=L[h]&&L[h][n]),u===void 0||!u.length||!u[0]){var D="";for(f in m=[],L[h])this.terminals_[f]&&f>2&&m.push("'"+this.terminals_[f]+"'");D=w.showPosition?"Parse error on line "+(T+1)+`:
|
2
2
|
`+w.showPosition()+`
|
3
3
|
Expecting `+m.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(T+1)+": Unexpected "+(n==1?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(D,{text:w.match,token:this.terminals_[n]||n,line:w.yylineno,loc:C,expected:m})}if(u[0]instanceof Array&&u.length>1)throw new Error("Parse Error: multiple actions possible at state: "+h+", token: "+n);switch(u[0]){case 1:c.push(n),x.push(w.yytext),p.push(w.yylloc),c.push(u[1]),n=null,I=w.yyleng,v=w.yytext,T=w.yylineno,C=w.yylloc;break;case 2:if(a=this.productions_[u[1]][1],S.$=x[x.length-a],S._$={first_line:p[p.length-(a||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(a||1)].first_column,last_column:p[p.length-1].last_column},$&&(S._$.range=[p[p.length-(a||1)].range[0],p[p.length-1].range[1]]),(g=this.performAction.apply(S,[v,I,T,E.yy,u[1],x,p].concat(M)))!==void 0)return g;a&&(c=c.slice(0,-1*a*2),x=x.slice(0,-1*a),p=p.slice(0,-1*a)),c.push(this.productions_[u[1]][0]),x.push(S.$),p.push(S._$),b=L[c[c.length-2]][c[c.length-1]],c.push(b);break;case 3:return!0}}return!0},"parse")},r=function(){return{EOF:1,parseError:_(function(s,y){if(!this.yy.parser)throw new Error(s);this.yy.parser.parseError(s,y)},"parseError"),setInput:_(function(s,y){return this.yy=y||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:_(function(s){var y=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var d=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),c.length-1&&(this.yylineno-=c.length-1);var x=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-y},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-y]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(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).
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:_(function(s){this.unput(this.match.slice(s))},"less"),pastInput:_(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var s=this.pastInput(),y=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
5
5
|
`+y+"^"},"showPosition"),test_match:_(function(s,y){var c,d,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),(d=s[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],c=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var p in x)this[p]=x[p];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;var s,y,c,d;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),p=0;p<x.length;p++)if((c=this._input.match(this.rules[x[p]]))&&(!y||c[0].length>y[0].length)){if(y=c,d=p,this.options.backtrack_lexer){if((s=this.test_match(c,x[p]))!==!1)return s;if(this._backtrack){y=!1;continue}return!1}if(!this.options.flex)break}return y?(s=this.test_match(y,x[d]))!==!1&&s:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(function(){var s=this.next();return s||this.lex()},"lex"),begin:_(function(s){this.conditionStack.push(s)},"begin"),popState:_(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:_(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:_(function(s){return(s=this.conditionStack.length-1-Math.abs(s||0))>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:_(function(s){this.begin(s)},"pushState"),stateStackSize:_(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:_(function(s,y,c,d){switch(c){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return o.lexer=r,_(k,"Parser"),k.prototype=o,o.Parser=k,new k}();nt.parser=nt;var q=nt,V=[],X=[],Q=new Map,qt=_(()=>{V=[],X=[],Q=new Map,wt()},"clear"),Vt=(z=class{constructor(e,i,l=0){this.source=e,this.target=i,this.value=l}},_(z,"SankeyLink"),z),Xt=_((t,e,i)=>{V.push(new Vt(t,e,i))},"addLink"),Qt=(F=class{constructor(e){this.ID=e}},_(F,"SankeyNode"),F),Rt=_(t=>{t=St.sanitizeText(t,R());let e=Q.get(t);return e===void 0&&(e=new Qt(t),Q.set(t,e),X.push(e)),e},"findOrCreateNode"),Yt=_(()=>X,"getNodes"),Bt=_(()=>V,"getLinks"),Kt=_(()=>({nodes:X.map(t=>({id:t.ID})),links:V.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Zt={nodesMap:Q,getConfig:_(()=>R().sankey,"getConfig"),getNodes:Yt,getLinks:Bt,getGraph:Kt,addLink:Xt,findOrCreateNode:Rt,getAccTitle:kt,setAccTitle:xt,getAccDescription:mt,setAccDescription:_t,getDiagramTitle:dt,setDiagramTitle:pt,clear:qt},gt=(
|
7
|
-
${v}${Math.round(100*h)/100}${T}`:n,"getText");c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(M.nodes).join("text").attr("x",n=>n.x0<d/2?n.x1+6:n.x0-6).attr("y",n=>(n.y1+n.y0)/2).attr("dy",(I?"0":"0.35")+"em").attr("text-anchor",n=>n.x0<d/2?"start":"end").text(N);const C=c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(M.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),$=(r==null?void 0:r.linkColor)??"gradient";if($==="gradient"){const n=C.append("linearGradient").attr("id",h=>(h.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",h=>h.source.x1).attr("x2",h=>h.target.x0);n.append("stop").attr("offset","0%").attr("stop-color",h=>E(h.source.id)),n.append("stop").attr("offset","100%").attr("stop-color",h=>E(h.target.id))}let
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(function(){var s=this.next();return s||this.lex()},"lex"),begin:_(function(s){this.conditionStack.push(s)},"begin"),popState:_(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:_(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:_(function(s){return(s=this.conditionStack.length-1-Math.abs(s||0))>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:_(function(s){this.begin(s)},"pushState"),stateStackSize:_(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:_(function(s,y,c,d){switch(c){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return o.lexer=r,_(k,"Parser"),k.prototype=o,o.Parser=k,new k}();nt.parser=nt;var q=nt,V=[],X=[],Q=new Map,qt=_(()=>{V=[],X=[],Q=new Map,wt()},"clear"),Vt=(z=class{constructor(e,i,l=0){this.source=e,this.target=i,this.value=l}},_(z,"SankeyLink"),z),Xt=_((t,e,i)=>{V.push(new Vt(t,e,i))},"addLink"),Qt=(F=class{constructor(e){this.ID=e}},_(F,"SankeyNode"),F),Rt=_(t=>{t=St.sanitizeText(t,R());let e=Q.get(t);return e===void 0&&(e=new Qt(t),Q.set(t,e),X.push(e)),e},"findOrCreateNode"),Yt=_(()=>X,"getNodes"),Bt=_(()=>V,"getLinks"),Kt=_(()=>({nodes:X.map(t=>({id:t.ID})),links:V.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Zt={nodesMap:Q,getConfig:_(()=>R().sankey,"getConfig"),getNodes:Yt,getLinks:Bt,getGraph:Kt,addLink:Xt,findOrCreateNode:Rt,getAccTitle:kt,setAccTitle:xt,getAccDescription:mt,setAccDescription:_t,getDiagramTitle:dt,setDiagramTitle:pt,clear:qt},gt=(P=class{static next(e){return new P(e+ ++P.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},_(P,"Uid"),P.count=0,P),Ht={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ot(t.sourceLinks,Mt)-1:0},justify:at},Jt=_(function(t,e,i,l){const{securityLevel:o,sankey:r}=R(),k=vt.sankey;let s;o==="sandbox"&&(s=Y("#i"+e));const y=Y(o==="sandbox"?s.nodes()[0].contentDocument.body:"body"),c=o==="sandbox"?y.select(`[id="${e}"]`):Y(`[id="${e}"]`),d=(r==null?void 0:r.width)??k.width,x=(r==null?void 0:r.height)??k.width,p=(r==null?void 0:r.useMaxWidth)??k.useMaxWidth,L=(r==null?void 0:r.nodeAlignment)??k.nodeAlignment,v=(r==null?void 0:r.prefix)??k.prefix,T=(r==null?void 0:r.suffix)??k.suffix,I=(r==null?void 0:r.showValues)??k.showValues,M=l.db.getGraph(),w=Ht[L];Ot().nodeId(n=>n.id).nodeWidth(10).nodePadding(10+(I?15:0)).nodeAlign(w).extent([[0,0],[d,x]])(M);const E=Et(Lt);c.append("g").attr("class","nodes").selectAll(".node").data(M.nodes).join("g").attr("class","node").attr("id",n=>(n.uid=gt.next("node-")).id).attr("transform",function(n){return"translate("+n.x0+","+n.y0+")"}).attr("x",n=>n.x0).attr("y",n=>n.y0).append("rect").attr("height",n=>n.y1-n.y0).attr("width",n=>n.x1-n.x0).attr("fill",n=>E(n.id));const N=_(({id:n,value:h})=>I?`${n}
|
7
|
+
${v}${Math.round(100*h)/100}${T}`:n,"getText");c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(M.nodes).join("text").attr("x",n=>n.x0<d/2?n.x1+6:n.x0-6).attr("y",n=>(n.y1+n.y0)/2).attr("dy",(I?"0":"0.35")+"em").attr("text-anchor",n=>n.x0<d/2?"start":"end").text(N);const C=c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(M.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),$=(r==null?void 0:r.linkColor)??"gradient";if($==="gradient"){const n=C.append("linearGradient").attr("id",h=>(h.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",h=>h.source.x1).attr("x2",h=>h.target.x0);n.append("stop").attr("offset","0%").attr("stop-color",h=>E(h.source.id)),n.append("stop").attr("offset","100%").attr("stop-color",h=>E(h.target.id))}let O;switch($){case"gradient":O=_(n=>n.uid,"coloring");break;case"source":O=_(n=>E(n.source.id),"coloring");break;case"target":O=_(n=>E(n.target.id),"coloring");break;default:O=$}C.append("path").attr("d",Ut().source(Wt).target(Gt)).attr("stroke",O).attr("stroke-width",n=>Math.max(1,n.width)),bt(void 0,c,0,p)},"draw"),tn={draw:Jt},nn=_(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
8
8
|
`).trim(),"prepareTextForParsing"),en=_(t=>`.label {
|
9
9
|
font-family: ${t.fontFamily};
|
10
10
|
}`,"getStyles"),sn=q.parse.bind(q);q.parse=t=>sn(nn(t));var rn={styles:en,parser:q,db:Zt,renderer:tn};export{rn as diagram};
|
@@ -0,0 +1 @@
|
|
1
|
+
var e,t;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(e||(e={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(t||(t={}));const r=e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),n=e=>{switch(typeof e){case"undefined":return r.undefined;case"string":return r.string;case"number":return isNaN(e)?r.nan:r.number;case"boolean":return r.boolean;case"function":return r.function;case"bigint":return r.bigint;case"symbol":return r.symbol;case"object":return Array.isArray(e)?r.array:null===e?r.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?r.promise:"undefined"!=typeof Map&&e instanceof Map?r.map:"undefined"!=typeof Set&&e instanceof Set?r.set:"undefined"!=typeof Date&&e instanceof Date?r.date:r.object;default:return r.unknown}},a=e.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class s extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(n);else if("invalid_return_type"===a.code)n(a.returnTypeError);else if("invalid_arguments"===a.code)n(a.argumentsError);else if(0===a.path.length)r._errors.push(t(a));else{let e=r,n=0;for(;n<a.path.length;){const r=a.path[n];n===a.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(a))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof s))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,e.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}s.create=e=>new s(e);const i=(t,n)=>{let s;switch(t.code){case a.invalid_type:s=t.received===r.undefined?"Required":`Expected ${t.expected}, received ${t.received}`;break;case a.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,e.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:s=`Unrecognized key(s) in object: ${e.joinValues(t.keys,", ")}`;break;case a.invalid_union:s="Invalid input";break;case a.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${e.joinValues(t.options)}`;break;case a.invalid_enum_value:s=`Invalid enum value. Expected ${e.joinValues(t.options)}, received '${t.received}'`;break;case a.invalid_arguments:s="Invalid function arguments";break;case a.invalid_return_type:s="Invalid function return type";break;case a.invalid_date:s="Invalid date";break;case a.invalid_string:"object"==typeof t.validation?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,"number"==typeof t.validation.position&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:e.assertNever(t.validation):s="regex"!==t.validation?`Invalid ${t.validation}`:"Invalid";break;case a.too_small:s="array"===t.type?`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:"string"===t.type?`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:"number"===t.type?`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:"date"===t.type?`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:"Invalid input";break;case a.too_big:s="array"===t.type?`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:"string"===t.type?`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:"number"===t.type?`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:"bigint"===t.type?`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:"date"===t.type?`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:"Invalid input";break;case a.custom:s="Invalid input";break;case a.invalid_intersection_types:s="Intersection results could not be merged";break;case a.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case a.not_finite:s="Number must be finite";break;default:s=n.defaultError,e.assertNever(t)}return{message:s}};let o=i;function d(){return o}const c=e=>{const{data:t,path:r,errorMaps:n,issueData:a}=e,s=[...r,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function u(e,t){const r=d(),n=c({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===i?void 0:i].filter((e=>!!e))});e.common.issues.push(n)}class l{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return p;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const e=await n.key,t=await n.value;r.push({key:e,value:t})}return l.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:a}=n;if("aborted"===t.status)return p;if("aborted"===a.status)return p;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!n.alwaysSet||(r[t.value]=a.value)}return{status:e.value,value:r}}}const p=Object.freeze({status:"aborted"}),h=e=>({status:"dirty",value:e}),f=e=>({status:"valid",value:e}),m=e=>"aborted"===e.status,y=e=>"dirty"===e.status,g=e=>"valid"===e.status,v=e=>"undefined"!=typeof Promise&&e instanceof Promise;function _(e,t,r,n){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function w(e,t,r,n,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var b,k,x;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(b||(b={}));class S{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const T=(e,t)=>{if(g(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new s(e.common.issues);return this._error=t,this._error}}};function E(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:n)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:r)&&void 0!==i?i:a.defaultError}},description:a}}class O{get description(){return this._def.description}_getType(e){return n(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:n(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new l,ctx:{common:e.parent.common,data:e.data,parsedType:n(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(v(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const a={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:n(e)},s=this._parseSync({data:e,path:a.path,parent:a});return T(a,s)}"~validate"(e){var t,r;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:n(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:a});return g(t)?{value:t.value}:{issues:a.common.issues}}catch(s){(null===(r=null===(t=null==s?void 0:s.message)||void 0===t?void 0:t.toLowerCase())||void 0===r?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:a}).then((e=>g(e)?{value:e.value}:{issues:a.common.issues}))}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:n(e)},a=this._parse({data:e,path:r.path,parent:r}),s=await(v(a)?a:Promise.resolve(a));return T(r,s)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),i=()=>n.addIssue({code:a.custom,...r(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(i(),!1))):!!s||(i(),!1)}))}refinement(e,t){return this._refinement(((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1)))}_refinement(e){return new Oe({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ze.create(this,this._def)}nullable(){return Ne.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return de.create(this)}promise(){return Ee.create(this,this._def)}or(e){return le.create([this,e],this._def)}and(e){return me.create(this,e,this._def)}transform(e){return new Oe({...E(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new je({...E(this._def),innerType:this,defaultValue:t,typeName:De.ZodDefault})}brand(){return new Ie({typeName:De.ZodBranded,type:this,...E(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Pe({...E(this._def),innerType:this,catchValue:t,typeName:De.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Re.create(this,e)}readonly(){return Fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Z=/^c[^\s-]{8,}$/i,N=/^[0-9a-z]+$/,j=/^[0-9A-HJKMNP-TV-Z]{26}$/i,P=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,A=/^[a-z0-9_-]{21}$/i,C=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,I=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,R=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let F;const $=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,L=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,M=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,D=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,U=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,z=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,q="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",V=new RegExp(`^${q}$`);function H(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function B(e){let t=`${q}T${H(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function W(e,t){if(!C.test(e))return!1;try{const[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return"object"==typeof a&&null!==a&&(!(!a.typ||!a.alg)&&(!t||a.alg===t))}catch(r){return!1}}function K(e,t){return!("v4"!==t&&t||!L.test(e))||!("v6"!==t&&t||!D.test(e))}class J extends O{_parse(t){this._def.coerce&&(t.data=String(t.data));if(this._getType(t)!==r.string){const e=this._getOrReturnCtx(t);return u(e,{code:a.invalid_type,expected:r.string,received:e.parsedType}),p}const n=new l;let s;for(const r of this._def.checks)if("min"===r.kind)t.data.length<r.value&&(s=this._getOrReturnCtx(t,s),u(s,{code:a.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty());else if("max"===r.kind)t.data.length>r.value&&(s=this._getOrReturnCtx(t,s),u(s,{code:a.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty());else if("length"===r.kind){const e=t.data.length>r.value,i=t.data.length<r.value;(e||i)&&(s=this._getOrReturnCtx(t,s),e?u(s,{code:a.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):i&&u(s,{code:a.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),n.dirty())}else if("email"===r.kind)R.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"email",code:a.invalid_string,message:r.message}),n.dirty());else if("emoji"===r.kind)F||(F=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),F.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"emoji",code:a.invalid_string,message:r.message}),n.dirty());else if("uuid"===r.kind)P.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"uuid",code:a.invalid_string,message:r.message}),n.dirty());else if("nanoid"===r.kind)A.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"nanoid",code:a.invalid_string,message:r.message}),n.dirty());else if("cuid"===r.kind)Z.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"cuid",code:a.invalid_string,message:r.message}),n.dirty());else if("cuid2"===r.kind)N.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"cuid2",code:a.invalid_string,message:r.message}),n.dirty());else if("ulid"===r.kind)j.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"ulid",code:a.invalid_string,message:r.message}),n.dirty());else if("url"===r.kind)try{new URL(t.data)}catch(d){s=this._getOrReturnCtx(t,s),u(s,{validation:"url",code:a.invalid_string,message:r.message}),n.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"regex",code:a.invalid_string,message:r.message}),n.dirty())}else if("trim"===r.kind)t.data=t.data.trim();else if("includes"===r.kind)t.data.includes(r.value,r.position)||(s=this._getOrReturnCtx(t,s),u(s,{code:a.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),n.dirty());else if("toLowerCase"===r.kind)t.data=t.data.toLowerCase();else if("toUpperCase"===r.kind)t.data=t.data.toUpperCase();else if("startsWith"===r.kind)t.data.startsWith(r.value)||(s=this._getOrReturnCtx(t,s),u(s,{code:a.invalid_string,validation:{startsWith:r.value},message:r.message}),n.dirty());else if("endsWith"===r.kind)t.data.endsWith(r.value)||(s=this._getOrReturnCtx(t,s),u(s,{code:a.invalid_string,validation:{endsWith:r.value},message:r.message}),n.dirty());else if("datetime"===r.kind){B(r).test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{code:a.invalid_string,validation:"datetime",message:r.message}),n.dirty())}else if("date"===r.kind){V.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{code:a.invalid_string,validation:"date",message:r.message}),n.dirty())}else if("time"===r.kind){new RegExp(`^${H(r)}$`).test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{code:a.invalid_string,validation:"time",message:r.message}),n.dirty())}else"duration"===r.kind?I.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"duration",code:a.invalid_string,message:r.message}),n.dirty()):"ip"===r.kind?(i=t.data,("v4"!==(o=r.version)&&o||!$.test(i))&&("v6"!==o&&o||!M.test(i))&&(s=this._getOrReturnCtx(t,s),u(s,{validation:"ip",code:a.invalid_string,message:r.message}),n.dirty())):"jwt"===r.kind?W(t.data,r.alg)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"jwt",code:a.invalid_string,message:r.message}),n.dirty()):"cidr"===r.kind?K(t.data,r.version)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"cidr",code:a.invalid_string,message:r.message}),n.dirty()):"base64"===r.kind?U.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"base64",code:a.invalid_string,message:r.message}),n.dirty()):"base64url"===r.kind?z.test(t.data)||(s=this._getOrReturnCtx(t,s),u(s,{validation:"base64url",code:a.invalid_string,message:r.message}),n.dirty()):e.assertNever(r);var i,o;return{status:n.value,value:t.data}}_regex(e,t,r){return this.refinement((t=>e.test(t)),{validation:t,code:a.invalid_string,...b.errToObj(r)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...b.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...b.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...b.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...b.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...b.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...b.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...b.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...b.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...b.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...b.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...b.errToObj(t)})}nonempty(e){return this.min(1,b.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Y(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}J.create=e=>{var t;return new J({checks:[],typeName:De.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...E(e)})};class G extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){this._def.coerce&&(t.data=Number(t.data));if(this._getType(t)!==r.number){const e=this._getOrReturnCtx(t);return u(e,{code:a.invalid_type,expected:r.number,received:e.parsedType}),p}let n;const s=new l;for(const r of this._def.checks)if("int"===r.kind)e.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),u(n,{code:a.invalid_type,expected:"integer",received:"float",message:r.message}),s.dirty());else if("min"===r.kind){(r.inclusive?t.data<r.value:t.data<=r.value)&&(n=this._getOrReturnCtx(t,n),u(n,{code:a.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),s.dirty())}else if("max"===r.kind){(r.inclusive?t.data>r.value:t.data>=r.value)&&(n=this._getOrReturnCtx(t,n),u(n,{code:a.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),s.dirty())}else"multipleOf"===r.kind?0!==Y(t.data,r.value)&&(n=this._getOrReturnCtx(t,n),u(n,{code:a.not_multiple_of,multipleOf:r.value,message:r.message}),s.dirty()):"finite"===r.kind?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),u(n,{code:a.not_finite,message:r.message}),s.dirty()):e.assertNever(r);return{status:s.value,value:t.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,r,n){return new G({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:b.toString(n)}]})}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((t=>"int"===t.kind||"multipleOf"===t.kind&&e.isInteger(t.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}G.create=e=>new G({checks:[],typeName:De.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...E(e)});class X extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch(i){return this._getInvalidInput(t)}if(this._getType(t)!==r.bigint)return this._getInvalidInput(t);let n;const s=new l;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?t.data<r.value:t.data<=r.value)&&(n=this._getOrReturnCtx(t,n),u(n,{code:a.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),s.dirty())}else if("max"===r.kind){(r.inclusive?t.data>r.value:t.data>=r.value)&&(n=this._getOrReturnCtx(t,n),u(n,{code:a.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),s.dirty())}else"multipleOf"===r.kind?t.data%r.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),u(n,{code:a.not_multiple_of,multipleOf:r.value,message:r.message}),s.dirty()):e.assertNever(r);return{status:s.value,value:t.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,r,n){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:b.toString(n)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}X.create=e=>{var t;return new X({checks:[],typeName:De.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...E(e)})};class Q extends O{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==r.boolean){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.boolean,received:t.parsedType}),p}return f(e.data)}}Q.create=e=>new Q({typeName:De.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...E(e)});class ee extends O{_parse(t){this._def.coerce&&(t.data=new Date(t.data));if(this._getType(t)!==r.date){const e=this._getOrReturnCtx(t);return u(e,{code:a.invalid_type,expected:r.date,received:e.parsedType}),p}if(isNaN(t.data.getTime())){return u(this._getOrReturnCtx(t),{code:a.invalid_date}),p}const n=new l;let s;for(const r of this._def.checks)"min"===r.kind?t.data.getTime()<r.value&&(s=this._getOrReturnCtx(t,s),u(s,{code:a.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?t.data.getTime()>r.value&&(s=this._getOrReturnCtx(t,s),u(s,{code:a.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):e.assertNever(r);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ee.create=e=>new ee({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:De.ZodDate,...E(e)});class te extends O{_parse(e){if(this._getType(e)!==r.symbol){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.symbol,received:t.parsedType}),p}return f(e.data)}}te.create=e=>new te({typeName:De.ZodSymbol,...E(e)});class re extends O{_parse(e){if(this._getType(e)!==r.undefined){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.undefined,received:t.parsedType}),p}return f(e.data)}}re.create=e=>new re({typeName:De.ZodUndefined,...E(e)});class ne extends O{_parse(e){if(this._getType(e)!==r.null){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.null,received:t.parsedType}),p}return f(e.data)}}ne.create=e=>new ne({typeName:De.ZodNull,...E(e)});class ae extends O{constructor(){super(...arguments),this._any=!0}_parse(e){return f(e.data)}}ae.create=e=>new ae({typeName:De.ZodAny,...E(e)});class se extends O{constructor(){super(...arguments),this._unknown=!0}_parse(e){return f(e.data)}}se.create=e=>new se({typeName:De.ZodUnknown,...E(e)});class ie extends O{_parse(e){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.never,received:t.parsedType}),p}}ie.create=e=>new ie({typeName:De.ZodNever,...E(e)});class oe extends O{_parse(e){if(this._getType(e)!==r.undefined){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.void,received:t.parsedType}),p}return f(e.data)}}oe.create=e=>new oe({typeName:De.ZodVoid,...E(e)});class de extends O{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==r.array)return u(t,{code:a.invalid_type,expected:r.array,received:t.parsedType}),p;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,r=t.data.length<s.exactLength.value;(e||r)&&(u(t,{code:e?a.too_big:a.too_small,minimum:r?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(u(t,{code:a.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(u(t,{code:a.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>s.type._parseAsync(new S(t,e,t.path,r))))).then((e=>l.mergeArray(n,e)));const i=[...t.data].map(((e,r)=>s.type._parseSync(new S(t,e,t.path,r))));return l.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new de({...this._def,minLength:{value:e,message:b.toString(t)}})}max(e,t){return new de({...this._def,maxLength:{value:e,message:b.toString(t)}})}length(e,t){return new de({...this._def,exactLength:{value:e,message:b.toString(t)}})}nonempty(e){return this.min(1,e)}}function ce(e){if(e instanceof ue){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ze.create(ce(n))}return new ue({...e._def,shape:()=>t})}return e instanceof de?new de({...e._def,type:ce(e.element)}):e instanceof Ze?Ze.create(ce(e.unwrap())):e instanceof Ne?Ne.create(ce(e.unwrap())):e instanceof ye?ye.create(e.items.map((e=>ce(e)))):e}de.create=(e,t)=>new de({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...E(t)});class ue extends O{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const t=this._def.shape(),r=e.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(e){if(this._getType(e)!==r.object){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.object,received:t.parsedType}),p}const{status:t,ctx:n}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof ie&&"strip"===this._def.unknownKeys))for(const r in n.data)i.includes(r)||o.push(r);const d=[];for(const r of i){const e=s[r],t=n.data[r];d.push({key:{status:"valid",value:r},value:e._parse(new S(n,t,n.path,r)),alwaysSet:r in n.data})}if(this._def.catchall instanceof ie){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of o)d.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)o.length>0&&(u(n,{code:a.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const r=n.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new S(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e})).then((e=>l.mergeObjectSync(t,e))):l.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new ue({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,a,s,i;const o=null!==(s=null===(a=(n=this._def).errorMap)||void 0===a?void 0:a.call(n,t,r).message)&&void 0!==s?s:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=b.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new ue({...this._def,unknownKeys:"strip"})}passthrough(){return new ue({...this._def,unknownKeys:"passthrough"})}extend(e){return new ue({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ue({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:De.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ue({...this._def,catchall:e})}pick(t){const r={};return e.objectKeys(t).forEach((e=>{t[e]&&this.shape[e]&&(r[e]=this.shape[e])})),new ue({...this._def,shape:()=>r})}omit(t){const r={};return e.objectKeys(this.shape).forEach((e=>{t[e]||(r[e]=this.shape[e])})),new ue({...this._def,shape:()=>r})}deepPartial(){return ce(this)}partial(t){const r={};return e.objectKeys(this.shape).forEach((e=>{const n=this.shape[e];t&&!t[e]?r[e]=n:r[e]=n.optional()})),new ue({...this._def,shape:()=>r})}required(t){const r={};return e.objectKeys(this.shape).forEach((e=>{if(t&&!t[e])r[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Ze;)t=t._def.innerType;r[e]=t}})),new ue({...this._def,shape:()=>r})}keyof(){return xe(e.objectKeys(this.shape))}}ue.create=(e,t)=>new ue({shape:()=>e,unknownKeys:"strip",catchall:ie.create(),typeName:De.ZodObject,...E(t)}),ue.strictCreate=(e,t)=>new ue({shape:()=>e,unknownKeys:"strict",catchall:ie.create(),typeName:De.ZodObject,...E(t)}),ue.lazycreate=(e,t)=>new ue({shape:e,unknownKeys:"strip",catchall:ie.create(),typeName:De.ZodObject,...E(t)});class le extends O{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const r=e.map((e=>new s(e.ctx.common.issues)));return u(t,{code:a.invalid_union,unionErrors:r}),p}));{let e;const n=[];for(const a of r){const r={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=n.map((e=>new s(e)));return u(t,{code:a.invalid_union,unionErrors:i}),p}}get options(){return this._def.options}}le.create=(e,t)=>new le({options:e,typeName:De.ZodUnion,...E(t)});const pe=t=>t instanceof be?pe(t.schema):t instanceof Oe?pe(t.innerType()):t instanceof ke?[t.value]:t instanceof Se?t.options:t instanceof Te?e.objectValues(t.enum):t instanceof je?pe(t._def.innerType):t instanceof re?[void 0]:t instanceof ne?[null]:t instanceof Ze?[void 0,...pe(t.unwrap())]:t instanceof Ne?[null,...pe(t.unwrap())]:t instanceof Ie||t instanceof Fe?pe(t.unwrap()):t instanceof Pe?pe(t._def.innerType):[];class he extends O{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.object)return u(t,{code:a.invalid_type,expected:r.object,received:t.parsedType}),p;const n=this.discriminator,s=t.data[n],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(u(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const a of t){const t=pe(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,a)}}return new he({typeName:De.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...E(r)})}}function fe(t,a){const s=n(t),i=n(a);if(t===a)return{valid:!0,data:t};if(s===r.object&&i===r.object){const r=e.objectKeys(a),n=e.objectKeys(t).filter((e=>-1!==r.indexOf(e))),s={...t,...a};for(const e of n){const r=fe(t[e],a[e]);if(!r.valid)return{valid:!1};s[e]=r.data}return{valid:!0,data:s}}if(s===r.array&&i===r.array){if(t.length!==a.length)return{valid:!1};const e=[];for(let r=0;r<t.length;r++){const n=fe(t[r],a[r]);if(!n.valid)return{valid:!1};e.push(n.data)}return{valid:!0,data:e}}return s===r.date&&i===r.date&&+t==+a?{valid:!0,data:t}:{valid:!1}}class me extends O{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(m(e)||m(n))return p;const s=fe(e.value,n.value);return s.valid?((y(e)||y(n))&&t.dirty(),{status:t.value,value:s.data}):(u(r,{code:a.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}me.create=(e,t,r)=>new me({left:e,right:t,typeName:De.ZodIntersection,...E(r)});class ye extends O{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.array)return u(n,{code:a.invalid_type,expected:r.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return u(n,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(u(n,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new S(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(s).then((e=>l.mergeArray(t,e))):l.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ye({...this._def,rest:e})}}ye.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ye({items:e,typeName:De.ZodTuple,rest:null,...E(t)})};class ge extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.object)return u(n,{code:a.invalid_type,expected:r.object,received:n.parsedType}),p;const s=[],i=this._def.keyType,o=this._def.valueType;for(const r in n.data)s.push({key:i._parse(new S(n,r,n.path,r)),value:o._parse(new S(n,n.data[r],n.path,r)),alwaysSet:r in n.data});return n.common.async?l.mergeObjectAsync(t,s):l.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,r){return new ge(t instanceof O?{keyType:e,valueType:t,typeName:De.ZodRecord,...E(r)}:{keyType:J.create(),valueType:e,typeName:De.ZodRecord,...E(t)})}}class ve extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.map)return u(n,{code:a.invalid_type,expected:r.map,received:n.parsedType}),p;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map((([e,t],r)=>({key:s._parse(new S(n,e,n.path,[r,"key"])),value:i._parse(new S(n,t,n.path,[r,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of o){const n=await r.key,a=await r.value;if("aborted"===n.status||"aborted"===a.status)return p;"dirty"!==n.status&&"dirty"!==a.status||t.dirty(),e.set(n.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of o){const n=r.key,a=r.value;if("aborted"===n.status||"aborted"===a.status)return p;"dirty"!==n.status&&"dirty"!==a.status||t.dirty(),e.set(n.value,a.value)}return{status:t.value,value:e}}}}ve.create=(e,t,r)=>new ve({valueType:t,keyType:e,typeName:De.ZodMap,...E(r)});class _e extends O{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.set)return u(n,{code:a.invalid_type,expected:r.set,received:n.parsedType}),p;const s=this._def;null!==s.minSize&&n.data.size<s.minSize.value&&(u(n,{code:a.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&n.data.size>s.maxSize.value&&(u(n,{code:a.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const i=this._def.valueType;function o(e){const r=new Set;for(const n of e){if("aborted"===n.status)return p;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const d=[...n.data.values()].map(((e,t)=>i._parse(new S(n,e,n.path,t))));return n.common.async?Promise.all(d).then((e=>o(e))):o(d)}min(e,t){return new _e({...this._def,minSize:{value:e,message:b.toString(t)}})}max(e,t){return new _e({...this._def,maxSize:{value:e,message:b.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}_e.create=(e,t)=>new _e({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...E(t)});class we extends O{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.function)return u(t,{code:a.invalid_type,expected:r.function,received:t.parsedType}),p;function n(e,r){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),i].filter((e=>!!e)),issueData:{code:a.invalid_arguments,argumentsError:r}})}function o(e,r){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,d(),i].filter((e=>!!e)),issueData:{code:a.invalid_return_type,returnTypeError:r}})}const l={errorMap:t.common.contextualErrorMap},h=t.data;if(this._def.returns instanceof Ee){const e=this;return f((async function(...t){const r=new s([]),a=await e._def.args.parseAsync(t,l).catch((e=>{throw r.addIssue(n(t,e)),r})),i=await Reflect.apply(h,this,a);return await e._def.returns._def.type.parseAsync(i,l).catch((e=>{throw r.addIssue(o(i,e)),r}))}))}{const e=this;return f((function(...t){const r=e._def.args.safeParse(t,l);if(!r.success)throw new s([n(t,r.error)]);const a=Reflect.apply(h,this,r.data),i=e._def.returns.safeParse(a,l);if(!i.success)throw new s([o(a,i.error)]);return i.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new we({...this._def,args:ye.create(e).rest(se.create())})}returns(e){return new we({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new we({args:e||ye.create([]).rest(se.create()),returns:t||se.create(),typeName:De.ZodFunction,...E(r)})}}class be extends O{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}be.create=(e,t)=>new be({getter:e,typeName:De.ZodLazy,...E(t)});class ke extends O{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return u(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}function xe(e,t){return new Se({values:e,typeName:De.ZodEnum,...E(t)})}ke.create=(e,t)=>new ke({value:e,typeName:De.ZodLiteral,...E(t)});class Se extends O{constructor(){super(...arguments),k.set(this,void 0)}_parse(t){if("string"!=typeof t.data){const r=this._getOrReturnCtx(t),n=this._def.values;return u(r,{expected:e.joinValues(n),received:r.parsedType,code:a.invalid_type}),p}if(_(this,k)||w(this,k,new Set(this._def.values)),!_(this,k).has(t.data)){const e=this._getOrReturnCtx(t),r=this._def.values;return u(e,{received:e.data,code:a.invalid_enum_value,options:r}),p}return f(t.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Se.create(e,{...this._def,...t})}exclude(e,t=this._def){return Se.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}k=new WeakMap,Se.create=xe;class Te extends O{constructor(){super(...arguments),x.set(this,void 0)}_parse(t){const n=e.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==r.string&&s.parsedType!==r.number){const t=e.objectValues(n);return u(s,{expected:e.joinValues(t),received:s.parsedType,code:a.invalid_type}),p}if(_(this,x)||w(this,x,new Set(e.getValidEnumValues(this._def.values))),!_(this,x).has(t.data)){const t=e.objectValues(n);return u(s,{received:s.data,code:a.invalid_enum_value,options:t}),p}return f(t.data)}get enum(){return this._def.values}}x=new WeakMap,Te.create=(e,t)=>new Te({values:e,typeName:De.ZodNativeEnum,...E(t)});class Ee extends O{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.promise&&!1===t.common.async)return u(t,{code:a.invalid_type,expected:r.promise,received:t.parsedType}),p;const n=t.parsedType===r.promise?t.data:Promise.resolve(t.data);return f(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ee.create=(e,t)=>new Ee({type:e,typeName:De.ZodPromise,...E(t)});class Oe extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,s={addIssue:e=>{u(n,e),e.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===a.type){const e=a.transform(n.data,s);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===r.value)return p;const t=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===t.status?p:"dirty"===t.status||"dirty"===r.value?h(t.value):t}));{if("aborted"===r.value)return p;const t=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===t.status?p:"dirty"===t.status||"dirty"===r.value?h(t.value):t}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const t=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===t.status?p:("dirty"===t.status&&r.dirty(),e(t.value),{status:r.value,value:t.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((t=>"aborted"===t.status?p:("dirty"===t.status&&r.dirty(),e(t.value).then((()=>({status:r.value,value:t.value}))))))}if("transform"===a.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!g(e))return e;const t=a.transform(e.value,s);if(t instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:t}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>g(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:r.value,value:e}))):e))}e.assertNever(a)}}Oe.create=(e,t,r)=>new Oe({schema:e,typeName:De.ZodEffects,effect:t,...E(r)}),Oe.createWithPreprocess=(e,t,r)=>new Oe({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...E(r)});class Ze extends O{_parse(e){return this._getType(e)===r.undefined?f(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ze.create=(e,t)=>new Ze({innerType:e,typeName:De.ZodOptional,...E(t)});class Ne extends O{_parse(e){return this._getType(e)===r.null?f(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:De.ZodNullable,...E(t)});class je extends O{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===r.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}je.create=(e,t)=>new je({innerType:e,typeName:De.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...E(t)});class Pe extends O{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return v(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new s(r.common.issues)},input:r.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new s(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:De.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...E(t)});class Ae extends O{_parse(e){if(this._getType(e)!==r.nan){const t=this._getOrReturnCtx(e);return u(t,{code:a.invalid_type,expected:r.nan,received:t.parsedType}),p}return{status:"valid",value:e.data}}}Ae.create=e=>new Ae({typeName:De.ZodNaN,...E(e)});const Ce=Symbol("zod_brand");class Ie extends O{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Re extends O{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),h(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new Re({in:e,out:t,typeName:De.ZodPipeline})}}class Fe extends O{_parse(e){const t=this._def.innerType._parse(e),r=e=>(g(e)&&(e.value=Object.freeze(e.value)),e);return v(t)?t.then((e=>r(e))):r(t)}unwrap(){return this._def.innerType}}function $e(e,t){const r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function Le(e,t={},r){return e?ae.create().superRefine(((n,a)=>{var s,i;const o=e(n);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=$e(t,n),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=$e(t,n),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):ae.create()}Fe.create=(e,t)=>new Fe({innerType:e,typeName:De.ZodReadonly,...E(t)});const Me={object:ue.lazycreate};var De;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(De||(De={}));const Ue=J.create,ze=G.create,qe=Ae.create,Ve=X.create,He=Q.create,Be=ee.create,We=te.create,Ke=re.create,Je=ne.create,Ye=ae.create,Ge=se.create,Xe=ie.create,Qe=oe.create,et=de.create,tt=ue.create,rt=ue.strictCreate,nt=le.create,at=he.create,st=me.create,it=ye.create,ot=ge.create,dt=ve.create,ct=_e.create,ut=we.create,lt=be.create,pt=ke.create,ht=Se.create,ft=Te.create,mt=Ee.create,yt=Oe.create,gt=Ze.create,vt=Ne.create,_t=Oe.createWithPreprocess,wt=Re.create,bt={string:e=>J.create({...e,coerce:!0}),number:e=>G.create({...e,coerce:!0}),boolean:e=>Q.create({...e,coerce:!0}),bigint:e=>X.create({...e,coerce:!0}),date:e=>ee.create({...e,coerce:!0})},kt=p;var xt=Object.freeze({__proto__:null,defaultErrorMap:i,setErrorMap:function(e){o=e},getErrorMap:d,makeIssue:c,EMPTY_PATH:[],addIssueToContext:u,ParseStatus:l,INVALID:p,DIRTY:h,OK:f,isAborted:m,isDirty:y,isValid:g,isAsync:v,get util(){return e},get objectUtil(){return t},ZodParsedType:r,getParsedType:n,ZodType:O,datetimeRegex:B,ZodString:J,ZodNumber:G,ZodBigInt:X,ZodBoolean:Q,ZodDate:ee,ZodSymbol:te,ZodUndefined:re,ZodNull:ne,ZodAny:ae,ZodUnknown:se,ZodNever:ie,ZodVoid:oe,ZodArray:de,ZodObject:ue,ZodUnion:le,ZodDiscriminatedUnion:he,ZodIntersection:me,ZodTuple:ye,ZodRecord:ge,ZodMap:ve,ZodSet:_e,ZodFunction:we,ZodLazy:be,ZodLiteral:ke,ZodEnum:Se,ZodNativeEnum:Te,ZodPromise:Ee,ZodEffects:Oe,ZodTransformer:Oe,ZodOptional:Ze,ZodNullable:Ne,ZodDefault:je,ZodCatch:Pe,ZodNaN:Ae,BRAND:Ce,ZodBranded:Ie,ZodPipeline:Re,ZodReadonly:Fe,custom:Le,Schema:O,ZodSchema:O,late:Me,get ZodFirstPartyTypeKind(){return De},coerce:bt,any:Ye,array:et,bigint:Ve,boolean:He,date:Be,discriminatedUnion:at,effect:yt,enum:ht,function:ut,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Le((t=>t instanceof e),t),intersection:st,lazy:lt,literal:pt,map:dt,nan:qe,nativeEnum:ft,never:Xe,null:Je,nullable:vt,number:ze,object:tt,oboolean:()=>He().optional(),onumber:()=>ze().optional(),optional:gt,ostring:()=>Ue().optional(),pipeline:wt,preprocess:_t,promise:mt,record:ot,set:ct,strictObject:rt,string:Ue,symbol:We,transformer:yt,tuple:it,undefined:Ke,union:nt,unknown:Ge,void:Qe,NEVER:kt,ZodIssueCode:a,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:s});const St=xt.object({detail:xt.string()}),Tt=xt.object({error:xt.string()});function Et(e){if(!e)return"Unknown error";if(e instanceof Error){const t=St.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const r=St.safeParse(t);if(r.success)return r.data.detail;const n=Tt.safeParse(t);if(n.success)return n.data.error;return e}(e.message)}if("object"==typeof e){const t=St.safeParse(e);if(t.success)return t.data.detail;const r=Tt.safeParse(e);if(r.success)return r.data.error}try{return JSON.stringify(e)}catch{return String(e)}}const Ot=1e3;function Zt(e,t){const r=e.map((e=>`"${e}"`)).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${r}`)}function Nt(e={}){let t={};function r(e){t=e}let n,a={};function s(e){a.unregisterHandler&&a.unregisterHandler(),a=e,a.registerHandler?.(_)}function i(e){n="function"!=typeof e?(t,r)=>{const n=e[t];if(n)return n(r);const a=e._;if(!a)throw new Error(`The requested method has no handler: ${t}`);return a(t,r)}:e}const{maxRequestTime:o=Ot}=e;e.transport&&s(e.transport),e.requestHandler&&i(e.requestHandler),e._debugHooks&&r(e._debugHooks);let d=0;const c=new Map,u=new Map;function l(e,...r){const n=r[0];return new Promise(((r,s)=>{if(!a.send)throw Zt(["send"],"make requests");const i=d<=1e10?++d:d=0,l={type:"request",id:i,method:e,params:n};c.set(i,{resolve:r,reject:s}),o!==1/0&&u.set(i,setTimeout((()=>{u.delete(i),s(new Error("RPC request timed out."))}),o)),t.onSend?.(l),a.send(l)}))}const p=new Proxy(l,{get:(e,t,r)=>t in e?Reflect.get(e,t,r):e=>l(t,e)}),h=p;function f(e,...r){const n=r[0];if(!a.send)throw Zt(["send"],"send messages");const s={type:"message",id:e,payload:n};t.onSend?.(s),a.send(s)}const m=new Proxy(f,{get:(e,t,r)=>t in e?Reflect.get(e,t,r):e=>f(t,e)}),y=m,g=new Map,v=new Set;async function _(e){if(t.onReceive?.(e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!a.send||!n)throw Zt(["send","requestHandler"],"handle requests");const{id:s,method:i,params:o}=e;let d;try{d={type:"response",id:s,success:!0,payload:await n(i,o)}}catch(r){if(!(r instanceof Error))throw r;d={type:"response",id:s,success:!1,error:r.message}}return t.onSend?.(d),void a.send(d)}if("response"!==e.type){if("message"!==e.type)throw new Error(`Unexpected RPC message type: ${e.type}`);{for(const r of v)r(e.id,e.payload);const t=g.get(e.id);if(!t)return;for(const r of t)r(e.payload)}}else{const t=u.get(e.id);null!=t&&clearTimeout(t);const{resolve:r,reject:n}=c.get(e.id)??{};e.success?r?.(e.payload):n?.(new Error(e.error))}}return{setTransport:s,setRequestHandler:i,request:p,requestProxy:h,send:m,sendProxy:y,addMessageListener:function(e,t){if(!a.registerHandler)throw Zt(["registerHandler"],"register message listeners");"*"!==e?(g.has(e)||g.set(e,new Set),g.get(e)?.add(t)):v.add(t)},removeMessageListener:function(e,t){"*"!==e?(g.get(e)?.delete(t),0===g.get(e)?.size&&g.delete(e)):v.delete(t)},proxy:{send:y,request:h},_setDebugHooks:r}}const jt="[transport-id]";function Pt(e,t={}){const{transportId:r,filter:n,remotePort:a}=t,s=e,i=a??e;let o;return{send(e){i.postMessage(function(e,t){const{transportId:r}=t;return null!=r?{[jt]:r,data:e}:e}(e,{transportId:r}))},registerHandler(e){o=t=>{const a=t.data,[s,i]=function(e,t){const{transportId:r,filter:n}=t,a=n?.();if(null!=r&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let s=e;if(r){if(e[jt]!==r)return[!0];s=e.data}return!1===a?[!0]:[!1,s]}(a,{transportId:r,filter:()=>n?.(t)});s||e(i)},s.addEventListener("message",o)},unregisterHandler(){o&&s.removeEventListener("message",o)}}}const At=()=>{},Ct=(e,t)=>{const r=`[${e}]`;return{debug:(...e)=>t.debug(r,...e),log:(...e)=>t.log(r,...e),warn:(...e)=>t.warn(r,...e),error:(...e)=>t.error(r,...e),trace:(...e)=>t.trace(r,...e),get:r=>Ct(`${e}.${r}`,t),disabled:(e=!0)=>e?Rt:t}},It={debug:(...e)=>{},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>Ct(e,It),disabled:(e=!0)=>e?Rt:It},Rt={debug:()=>At,log:()=>At,warn:()=>At,error:()=>At,trace:()=>At,get:()=>Rt,disabled:()=>Rt};const Ft="undefined"!=typeof window&&window.Logger||It;var $t,Lt=Object.defineProperty,Mt=(e,t)=>Lt(e,"name",{value:t,configurable:!0}),Dt=($t=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy($t,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):$t);function Ut(e){return!isNaN(parseFloat(e))&&isFinite(e)}function zt(e){return e.charAt(0).toUpperCase()+e.substring(1)}function qt(e){return function(){return this[e]}}Mt(Ut,"_isNumber"),Mt(zt,"_capitalize"),Mt(qt,"_getter");var Vt,Ht,Bt=["isConstructor","isEval","isNative","isToplevel"],Wt=["columnNumber","lineNumber"],Kt=["fileName","functionName","source"],Jt=Bt.concat(Wt,Kt,["args"],["evalOrigin"]);function Yt(e){if(e)for(var t=0;t<Jt.length;t++)void 0!==e[Jt[t]]&&this["set"+zt(Jt[t])](e[Jt[t]])}for(Mt(Yt,"StackFrame"),Yt.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof Yt)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new Yt(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",r=this.getColumnNumber()||"",n=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+r+")":"[eval]:"+t+":"+r:n?n+" ("+e+":"+t+":"+r+")":e+":"+t+":"+r}},Yt.fromString=Mt((function(e){var t=e.indexOf("("),r=e.lastIndexOf(")"),n=e.substring(0,t),a=e.substring(t+1,r).split(","),s=e.substring(r+1);if(0===s.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s,""),o=i[1],d=i[2],c=i[3];return new Yt({functionName:n,args:a||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})}),"StackFrame$$fromString"),Vt=0;Vt<Bt.length;Vt++)Yt.prototype["get"+zt(Bt[Vt])]=qt(Bt[Vt]),Yt.prototype["set"+zt(Bt[Vt])]=function(e){return function(t){this[e]=!!t}}(Bt[Vt]);for(Ht=0;Ht<Wt.length;Ht++)Yt.prototype["get"+zt(Wt[Ht])]=qt(Wt[Ht]),Yt.prototype["set"+zt(Wt[Ht])]=function(e){return function(t){if(!Ut(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(Wt[Ht]);for(Gt=0;Gt<Kt.length;Gt++)Yt.prototype["get"+zt(Kt[Gt])]=qt(Kt[Gt]),Yt.prototype["set"+zt(Kt[Gt])]=function(e){return function(t){this[e]=String(t)}}(Kt[Gt]);var Gt,Xt=Yt;function Qt(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Mt((function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")}),"ErrorStackParser$$parse"),extractLocation:Mt((function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]}),"ErrorStackParser$$extractLocation"),parseV8OrIE:Mt((function(t){return t.stack.split("\n").filter((function(t){return!!t.match(e)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=t.match(/ (\(.+\)$)/);t=r?t.replace(r[0],""):t;var n=this.extractLocation(r?r[1]:t),a=r&&t||void 0,s=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Xt({functionName:a,fileName:s,lineNumber:n[1],columnNumber:n[2],source:e})}),this)}),"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:Mt((function(e){return e.stack.split("\n").filter((function(e){return!e.match(t)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Xt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,a=this.extractLocation(e.replace(t,""));return new Xt({functionName:n,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})}),this)}),"ErrorStackParser$$parseFFOrSafari")}}Mt(Qt,"ErrorStackParser");var er,tr,rr,nr,ar,sr,ir,or,dr,cr=new Qt,ur="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,lr=ur&&typeof module<"u"&&typeof module.exports<"u"&&typeof Dt<"u"&&typeof __dirname<"u",pr=ur&&!lr,hr=typeof Deno<"u",fr=!ur&&!hr,mr=fr&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,yr=fr&&"function"==typeof importScripts&&"object"==typeof self;async function gr(){if(!ur||(er=(await import("./__vite-browser-external-CIEyP2s7.js")).default,nr=await import("./__vite-browser-external-CIEyP2s7.js"),ar=await import("./__vite-browser-external-CIEyP2s7.js"),rr=(await import("./__vite-browser-external-CIEyP2s7.js")).default,tr=await import("./__vite-browser-external-CIEyP2s7.js"),ir=tr.sep,typeof Dt<"u"))return;let e={fs:nr,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function vr(e,t){return tr.resolve(t||".",e)}function _r(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function wr(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:ar.readFile(e).then((e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}}function br(e,t){let r=new URL(e,location);return{response:fetch(r,t?{integrity:t}:{})}}async function kr(e,t){let{response:r,binary:n}=or(e,t);if(n)return n;let a=await r;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),Mt(gr,"initNodeModules"),Mt(vr,"node_resolvePath"),Mt(_r,"browser_resolvePath"),sr=ur?vr:_r,ur||(ir="/"),Mt(wr,"node_getBinaryResponse"),Mt(br,"browser_getBinaryResponse"),or=ur?wr:br,Mt(kr,"loadBinaryFile"),mr)dr=Mt((async e=>await import(e)),"loadScript");else if(yr)dr=Mt((async e=>{try{globalThis.importScripts(e)}catch(Jr){if(!(Jr instanceof TypeError))throw Jr;await import(e)}}),"loadScript");else{if(!ur)throw new Error("Cannot determine runtime environment");dr=xr}async function xr(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?rr.runInThisContext(await(await fetch(e)).text()):await import(er.pathToFileURL(e).href)}async function Sr(e){if(ur){await gr();let t=await ar.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function Tr(){if(lr)return __dirname;let e;try{throw new Error}catch(n){e=n}let t=cr.parse(e)[0].fileName;if(ur&&!t.startsWith("file://")&&(t=`file://${t}`),pr){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let r=t.lastIndexOf(ir);if(-1===r)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,r)}function Er(e){let t=e.FS,r=e.FS.filesystems.MEMFS,n=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return r.mount.apply(null,arguments)},syncfs:async(e,t,r)=>{try{let n=a.getLocalSet(e),s=await a.getRemoteSet(e),i=t?s:n,o=t?n:s;await a.reconcile(e,i,o),r(null)}catch(n){r(n)}},getLocalSet:e=>{let r=Object.create(null);function a(e){return"."!==e&&".."!==e}function s(e){return t=>n.join2(e,t)}Mt(a,"isRealDir"),Mt(s,"toAbsolute");let i=t.readdir(e.mountpoint).filter(a).map(s(e.mountpoint));for(;i.length;){let e=i.pop(),n=t.stat(e);t.isDir(n.mode)&&i.push.apply(i,t.readdir(e).filter(a).map(s(e))),r[e]={timestamp:n.mtime,mode:n.mode}}return{type:"local",entries:r}},getRemoteSet:async e=>{let t=Object.create(null),r=await Or(e.opts.fileSystemHandle);for(let[s,i]of r)"."!==s&&(t[n.join2(e.mountpoint,s)]={timestamp:"file"===i.kind?new Date((await i.getFile()).lastModified):new Date,mode:"file"===i.kind?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:t,handles:r}},loadLocalEntry:e=>{let n=t.lookupPath(e).node,a=t.stat(e);if(t.isDir(a.mode))return{timestamp:a.mtime,mode:a.mode};if(t.isFile(a.mode))return n.contents=r.getFileDataAsTypedArray(n),{timestamp:a.mtime,mode:a.mode,contents:n.contents};throw new Error("node type not supported")},storeLocalEntry:(e,r)=>{if(t.isDir(r.mode))t.mkdirTree(e,r.mode);else{if(!t.isFile(r.mode))throw new Error("node type not supported");t.writeFile(e,r.contents,{canOwn:!0})}t.chmod(e,r.mode),t.utime(e,r.timestamp,r.timestamp)},removeLocalEntry:e=>{var r=t.stat(e);t.isDir(r.mode)?t.rmdir(e):t.isFile(r.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(t.lastModified)}}if("directory"===e.kind)return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,r,a)=>{let s=e.get(n.dirname(r)),i=t.isFile(a.mode)?await s.getFileHandle(n.basename(r),{create:!0}):await s.getDirectoryHandle(n.basename(r),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(a.contents),await e.close()}e.set(r,i)},removeRemoteEntry:async(e,t)=>{await e.get(n.dirname(t)).removeEntry(n.basename(t)),e.delete(t)},reconcile:async(e,r,s)=>{let i=0,o=[];Object.keys(r.entries).forEach((function(e){let n=r.entries[e],a=s.entries[e];(!a||t.isFile(n.mode)&&n.timestamp.getTime()>a.timestamp.getTime())&&(o.push(e),i++)})),o.sort();let d=[];if(Object.keys(s.entries).forEach((function(e){r.entries[e]||(d.push(e),i++)})),d.sort().reverse(),!i)return;let c="remote"===r.type?r.handles:s.handles;for(let t of o){let r=n.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===s.type){let e=c.get(r),n=await a.loadRemoteEntry(e);a.storeLocalEntry(t,n)}else{let e=a.loadLocalEntry(t);await a.storeRemoteEntry(c,r,e)}}for(let t of d)if("local"===s.type)a.removeLocalEntry(t);else{let r=n.normalize(t.replace(e.mountpoint,"/")).substring(1);await a.removeRemoteEntry(c,r)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}Mt(xr,"nodeLoadScript"),Mt(Sr,"loadLockFile"),Mt(Tr,"calculateDirname"),Mt(Er,"initializeNativeFS");var Or=Mt((async e=>{let t=[];async function r(e){for await(let n of e.values())t.push(n),"directory"===n.kind&&await r(n)}Mt(r,"collect"),await r(e);let n=new Map;n.set(".",e);for(let a of t){let t=(await e.resolve(a)).join("/");n.set(t,a)}return n}),"getFsHandles");function Zr(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Cr(e),quit(e,r){throw t.exited={status:e,toThrow:r},r},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:Ir(e.indexURL)};return t}function Nr(e){return function(t){try{t.FS.mkdirTree(e)}catch(r){console.error(`Error occurred while making a home directory '${e}':`),console.error(r),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function jr(e){return function(t){Object.assign(t.ENV,e)}}function Pr(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}function Ar(e){let t=kr(e);return async e=>{let r=e._py_version_major(),n=e._py_version_minor();e.FS.mkdirTree("/lib"),e.API.sitePackages=`/lib/python${r}.${n}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency("install-stdlib");try{let a=await t;e.FS.writeFile(`/lib/python${r}${n}.zip`,a)}catch(a){console.error("Error occurred while installing the standard library:"),console.error(a)}finally{e.removeRunDependency("install-stdlib")}}}function Cr(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[...Pr(e.fsInit),Ar(t),Nr(e.env.HOME),jr(e.env),Er]}function Ir(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:r}=or(e+"pyodide.asm.wasm");return function(e,n){return async function(){try{let a;a=r?await WebAssembly.instantiateStreaming(r,e):await WebAssembly.instantiate(await t,e);let{instance:s,module:i}=a;n(s,i)}catch(a){console.warn("wasm instantiation failed!"),console.warn(a)}}(),{}}}Mt(Zr,"createSettings"),Mt(Nr,"createHomeDirectory"),Mt(jr,"setEnvironment"),Mt(Pr,"callFsInitHook"),Mt(Ar,"installStdlib"),Mt(Cr,"getFileSystemInitializationFuncs"),Mt(Ir,"getInstantiateWasmFunc");var Rr="0.27.5";async function Fr(e={}){var t,r;await gr();let n=e.indexURL||await Tr();n=sr(n),n.endsWith("/")||(n+="/"),e.indexURL=n;let a={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:n+"pyodide-lock.json",args:[],env:{},packageCacheDir:n,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},s=Object.assign(a,e);(t=s.env).HOME??(t.HOME="/home/pyodide"),(r=s.env).PYTHONINSPECT??(r.PYTHONINSPECT="1");let i,o=Zr(s),d=o.API;if(d.lockFilePromise=Sr(s.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${s.indexURL}pyodide.asm.js`;await dr(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==Rr&&s.checkAPIVersion)throw new Error(`Pyodide version does not match: '${Rr}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,d.config.env.HOME),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(s.stdin,s.stdout,s.stderr),l}Mt(Fr,"loadPyodide");function $r(e){return e.FS}const Lr=e=>(new TextDecoder).decode(e),Mr="notebook.py",Dr="/marimo",Ur=Mr,zr=e=>{const t=$r(e);try{t.mkdirTree(Dr)}catch{}t.chdir(Dr)},qr=e=>{$r(e).mount(e.FS.filesystems.IDBFS,{root:"."},Dr)},Vr=async e=>{await Kr(e,!0)},Hr=async e=>{await Kr(e,!1)},Br=e=>{const t=$r(e),r=`${Dr}/${Mr}`;return Lr(t.readFile(r))},Wr=e=>{const{pyodide:t,filename:r,code:n}=e,a=$r(t);if(r&&r!==Mr){const e=(e=>{try{return Lr(a.readFile(e))}catch{return null}})(r);if(e)return{code:e,filename:r}}return a.writeFile(Mr,n),{code:n,filename:Mr}};function Kr(e,t){return new Promise(((r,n)=>{$r(e).syncfs(t,(e=>{e instanceof Error?n(e):r()}))}))}const Jr=new class{constructor(){this.spans=[]}startSpan(e,t={}){const r={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(r,e)};return this.spans.push(r),r}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,r={}){const n=this.startSpan(t||e.name,r);try{const t=e();return this.endSpan(n),t}catch(a){throw this.endSpan(n,"error"),a}}wrapAsync(e,t,r={}){return async(...n)=>{const a=this.startSpan(t||e.name,r);try{const t=await e(...n);return this.endSpan(a),t}catch(s){throw this.endSpan(a,"error"),s}}}logSpans(){}};globalThis.t=Jr;class Yr{constructor(){this.pyodide=null}get requirePyodide(){return function(e,t){if(!e)throw new Error(t)}(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Fr)throw new Error("loadPyodide is not defined");const t=Jr.startSpan("loadPyodide");try{const r=await Fr({packages:["micropip","marimo-base","Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:false,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=r,t.end("ok"),r}catch(r){throw Ft.error("Failed to load Pyodide",r),r}}async mountFilesystem(e){const t=Jr.startSpan("mountFilesystem");return zr(this.requirePyodide),qr(this.requirePyodide),await Vr(this.requirePyodide),t.end("ok"),Wr({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:r,onMessage:n,queryParameters:a,userConfig:s}=e;self.messenger={callback:n},self.query_params=a,self.user_config=s;const i=Jr.startSpan("startSession.runPython"),o=r||Ur,[d,c,u]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${o}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${o}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);i.end();const l=new Set(u.toJs());return this.loadNotebookDeps(t,l).then((()=>c(s.runtime.auto_instantiate))),d}async loadNotebookDeps(e,t){const r=this.requirePyodide;e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),e=`import pyodide_http\n${e=`import jedi\n${e=`import pygments\n${e=`import docutils\n${e}`}`}`}`;const n=[...t];let a=Jr.startSpan("pyodide.loadPackage");await r.loadPackagesFromImports(e,{errorCallback:Ft.error,messageCallback:Ft.log}),a.end(),a=Jr.startSpan("micropip.install");const s=n.filter((e=>!r.loadedPackages[e]));s.length>0&&await r.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(s)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch((e=>{Ft.error("Failed to load packages from micropip",e)})),a.end()}}const Gr=async function(){try{const e=self.name,t=function(e){return e.includes("dev"),`v${Rr}`}(e),r=await async function(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new Yr}}(e);self.controller=r,self.pyodide=await r.bootstrap({version:e,pyodideVersion:t}),await(r.mountFilesystem?.({code:"",filename:null})),Qr.send.initialized({})}catch(e){Ft.error("Error bootstrapping",e),Qr.send.initializedError({error:Et(e)})}}(),Xr={readFile:async e=>{await Gr;return Lr(self.pyodide.FS.readFile(e))},readNotebook:async()=>(await Gr,Br(self.pyodide)),saveNotebook:async e=>{await Gr;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n\n save_file\n ");await t(JSON.stringify(e),Ur),await Hr(self.pyodide)}},Qr=function(e){return Nt(e)}({transport:(en={transportId:"marimo-transport"},Pt(self,en)),requestHandler:Xr});var en;Qr.send("ready",{});
|