@marimo-team/frontend 0.14.18-dev29 → 0.14.18-dev30
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-ByyTMxAe.js → ConnectedDataExplorerComponent-oOiI8-Is.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-BEvMtMGK.js → ImageComparisonComponent-CrBtZ5gk.js} +1 -1
- package/dist/assets/{VegaLite-B6ZXw089.js → VegaLite-BruLY7Yo.js} +1 -1
- package/dist/assets/{_baseEach-BM02cWfw.js → _baseEach-Dtl0u6a9.js} +1 -1
- package/dist/assets/_baseMap-BbSMx7sO.js +1 -0
- package/dist/assets/{_baseUniq-B3VNhTaG.js → _baseUniq-oH3tH_Lx.js} +1 -1
- package/dist/assets/{_createAggregator-CBRdQRkQ.js → _createAggregator-DVbCk7I8.js} +1 -1
- package/dist/assets/{any-language-editor-EOMlEVeL.js → any-language-editor-DNTe-hGh.js} +1 -1
- package/dist/assets/{architectureDiagram-SUXI7LT5-Bz_etWhT.js → architectureDiagram-SUXI7LT5-BNE5Ocu0.js} +1 -1
- package/dist/assets/{blockDiagram-6J76NXCF-C3NjjGV1.js → blockDiagram-6J76NXCF-BkAnLDAP.js} +1 -1
- package/dist/assets/{c4Diagram-6F6E4RAY-Cfcu16fD.js → c4Diagram-6F6E4RAY-CMvcINsX.js} +1 -1
- package/dist/assets/channel-AZKaNSLi.js +1 -0
- package/dist/assets/{chunk-353BL4L5-D_x_But5.js → chunk-353BL4L5-DZ6k9BBV.js} +1 -1
- package/dist/assets/{chunk-67H74DCK-B78ctzkW.js → chunk-67H74DCK-Btl2ATCi.js} +1 -1
- package/dist/assets/{chunk-AACKK3MU-C_X3yBIA.js → chunk-AACKK3MU-Di82a8tq.js} +1 -1
- package/dist/assets/{chunk-BFAMUDN2-CmT_5Wnf.js → chunk-BFAMUDN2-C6ACh81N.js} +1 -1
- package/dist/assets/{chunk-E2GYISFI-TLOBmOmy.js → chunk-E2GYISFI-BGhna3Tu.js} +1 -1
- package/dist/assets/{chunk-OW32GOEJ-C1x0Lb_3.js → chunk-OW32GOEJ-BvQbpZtP.js} +6 -6
- package/dist/assets/{chunk-SKB7J2MH-t9L60ESv.js → chunk-SKB7J2MH-B5xc8b3Z.js} +1 -1
- package/dist/assets/{chunk-SZ463SBG-OsFZC8Fm.js → chunk-SZ463SBG-DqkT0n2R.js} +1 -1
- package/dist/assets/{circle-play-Coa1pbLo.js → circle-play-DPIHEaaR.js} +1 -1
- package/dist/assets/classDiagram-M3E45YP4-B7yw2nKS.js +1 -0
- package/dist/assets/classDiagram-v2-YAWTLIQI-B7yw2nKS.js +1 -0
- package/dist/assets/clone-4KJc73U3.js +1 -0
- package/dist/assets/common-keywords-Dg3Y2cJS.js +1 -0
- package/dist/assets/{compile-kBFbLKtC.js → compile-DiFbtiAE.js} +1 -1
- package/dist/assets/{dagre-JOIXM2OF-KIVae2Ja.js → dagre-JOIXM2OF-1P_Dgkjl.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-ClaYc6AL.js → data-grid-overlay-editor-Dghfz964.js} +1 -1
- package/dist/assets/{diagram-5UYTHUR4-CAegkM8o.js → diagram-5UYTHUR4-56oBr9Mj.js} +1 -1
- package/dist/assets/{diagram-VMROVX33-COZimksW.js → diagram-VMROVX33-Bg7PYU8p.js} +1 -1
- package/dist/assets/{diagram-ZTM2IBQH-RPzV6IQt.js → diagram-ZTM2IBQH-CPzEgjbH.js} +1 -1
- package/dist/assets/duckdb-keywords-CFYiiNsB.js +1 -0
- package/dist/assets/{edit-page-Bj7J0vUV.js → edit-page-DCrlym3M.js} +4 -4
- package/dist/assets/{erDiagram-3M52JZNH-DyyQZo2F.js → erDiagram-3M52JZNH-T300kYM8.js} +1 -1
- package/dist/assets/{flowDiagram-KYDEHFYC-BY45MXHx.js → flowDiagram-KYDEHFYC-BYZfYSI2.js} +1 -1
- package/dist/assets/{ganttDiagram-EK5VF46D-D0SJ9Vb8.js → ganttDiagram-EK5VF46D-BEDi_5bs.js} +1 -1
- package/dist/assets/{gitGraphDiagram-GW3U2K7C-DQIrG7Ne.js → gitGraphDiagram-GW3U2K7C-Cu1vg-Ae.js} +1 -1
- package/dist/assets/{glide-data-editor-CvbrMET8.js → glide-data-editor-lK9K3ps-.js} +4 -4
- package/dist/assets/{graph-BvDRm3kJ.js → graph-CDj368Ef.js} +1 -1
- package/dist/assets/{home-page-StH-FqwP.js → home-page-Bke3YQtW.js} +2 -2
- package/dist/assets/{index-FjwIsM4E.js → index-BIamDpT3.js} +1 -1
- package/dist/assets/{index-BxpEkFHY.js → index-BdPIybcd.js} +1 -1
- package/dist/assets/{index-BMlE8K6G.js → index-BfMKs8fK.js} +188 -179
- package/dist/assets/{index-DeBpKt6z.js → index-BgN5JveD.js} +1 -1
- package/dist/assets/{index-D6ttr-M5.js → index-BlIpJJ1s.js} +1 -1
- package/dist/assets/{index-B2AnidM8.js → index-C1sif23O.js} +1 -1
- package/dist/assets/{index-Dl0aViKc.js → index-C5zHu97c.js} +1 -1
- package/dist/assets/{index-C1Ev5kmm.js → index-CHUAhpF9.js} +1 -1
- package/dist/assets/{index-nhAJG0Zq.js → index-CHvSTvku.js} +1 -1
- package/dist/assets/{index-BklcjKLc.js → index-CV-cT8XZ.js} +1 -1
- package/dist/assets/{index-DqW_iv-8.js → index-CVJgiMKT.js} +1 -1
- package/dist/assets/index-Cd8lKjXa.js +68 -0
- package/dist/assets/{index-DcCjqlwv.js → index-D2wUEqSr.js} +1 -1
- package/dist/assets/{index-BSAd1_jA.js → index-DQeLlRNN.js} +1 -1
- package/dist/assets/{index-D9fGE-pM.js → index-DdE5sj7B.js} +1 -1
- package/dist/assets/{index-DWx68F4W.js → index-DpaljNVK.js} +1 -1
- package/dist/assets/{index-BqgXsw2X.js → index-DskNGo48.js} +1 -1
- package/dist/assets/{index-v9Rqt1AL.js → index-PXSGnTt_.js} +1 -1
- package/dist/assets/{index-QQV-w55W.js → index-UakLQEhR.js} +1 -1
- package/dist/assets/{index-DXQK0dbr.js → index-uLE7UQoA.js} +1 -1
- package/dist/assets/infoDiagram-LHK5PUON-DvKYogid.js +2 -0
- package/dist/assets/{journeyDiagram-EWQZEKCU-Cv34gpl9.js → journeyDiagram-EWQZEKCU-qFhtMoPK.js} +1 -1
- package/dist/assets/{kanban-definition-ZSS6B67P-FTq3yb2c.js → kanban-definition-ZSS6B67P-d4c_bpNj.js} +1 -1
- package/dist/assets/{layout-DGo16j-R.js → layout-B1YrGZ5o.js} +1 -1
- package/dist/assets/{linear-0J3_DIzy.js → linear-Ce9Ln0y7.js} +1 -1
- package/dist/assets/{links-h2K0p6lB.js → links--FJRrKkU.js} +12 -12
- package/dist/assets/{mermaid-BfTGIKjH.js → mermaid-TIsLiY_c.js} +26 -26
- package/dist/assets/min-pEaRzhJa.js +1 -0
- package/dist/assets/{mindmap-definition-6CBA2TL7-BFWeE5l4.js → mindmap-definition-6CBA2TL7-NzRV0KhB.js} +1 -1
- package/dist/assets/{number-overlay-editor-nJ_uE4OC.js → number-overlay-editor-wIfVoa2g.js} +2 -2
- package/dist/assets/{pieDiagram-NIOCPIFQ-CIPNZnyq.js → pieDiagram-NIOCPIFQ-DLjq0P3e.js} +3 -3
- package/dist/assets/{quadrantDiagram-2OG54O6I-DFTpGGxg.js → quadrantDiagram-2OG54O6I-9Oz1n3p6.js} +1 -1
- package/dist/assets/{react-plotly-BHmRdjjS.js → react-plotly-CpyIgXbT.js} +1 -1
- package/dist/assets/{requirementDiagram-QOLK2EJ7-bhqWzDfk.js → requirementDiagram-QOLK2EJ7-efmOhh-Y.js} +1 -1
- package/dist/assets/{run-page-C08qMCRH.js → run-page-CigF14nw.js} +1 -1
- package/dist/assets/{sankeyDiagram-4UZDY2LN-CaS2yE0B.js → sankeyDiagram-4UZDY2LN-C8d1HP5D.js} +1 -1
- package/dist/assets/{sequenceDiagram-SKLFT4DO-B7DEVd4j.js → sequenceDiagram-SKLFT4DO-YYvQS_Ez.js} +1 -1
- package/dist/assets/{slides-component-CT3uDvEm.js → slides-component-DaIiszro.js} +1 -1
- package/dist/assets/sortBy-DPhCeare.js +1 -0
- package/dist/assets/{stateDiagram-MI5ZYTHO-DcIY6HTB.js → stateDiagram-MI5ZYTHO-BUsXwOkv.js} +1 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-C0_3uVRU.js +1 -0
- package/dist/assets/{storage-Ciru-sFj.js → storage-DVfCYCuA.js} +5 -5
- package/dist/assets/{terminal-Pn5QVsJZ.js → terminal-WkSrTXmZ.js} +1 -1
- package/dist/assets/time-CMDJBHm4.js +1 -0
- package/dist/assets/{timeline-definition-MYPXXCX6-Cd626Lgg.js → timeline-definition-MYPXXCX6-D6F16eAY.js} +1 -1
- package/dist/assets/{tracing-B1pgg2Ra.js → tracing-Bs9fWQQg.js} +2 -2
- package/dist/assets/{trash-CKCjDfOY.js → trash-BotaB4h_.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-D6IH2czJ.js → treemap-75Q7IDZK-ReN7RgbK.js} +1 -1
- package/dist/assets/{vega-component-BbGjjrAW.js → vega-component-LxHHxxVY.js} +1 -1
- package/dist/assets/{xychartDiagram-H2YORKM3-Dk39Tmbz.js → xychartDiagram-H2YORKM3-BBA6XWcv.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +3 -2
- package/src/components/app-config/user-config-form.tsx +25 -0
- package/src/components/chat/markdown-renderer.tsx +1 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +1 -1
- package/src/components/editor/cell/CreateCellButton.tsx +1 -1
- package/src/components/editor/cell/code/language-toggle.tsx +1 -1
- package/src/components/editor/renderers/CellArray.tsx +1 -1
- package/src/core/codemirror/language/LanguageAdapters.ts +1 -1
- package/src/core/codemirror/language/__tests__/sql.test.ts +5 -5
- package/src/core/codemirror/language/extension.ts +1 -1
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
- package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
- package/src/core/codemirror/language/languages/{sql.ts → sql/sql.ts} +124 -248
- package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
- package/src/core/codemirror/language/panel/panel.tsx +1 -1
- package/src/core/config/feature-flag.tsx +2 -0
- package/src/theme/useTheme.ts +1 -1
- package/dist/assets/_baseMap-CrbS00BX.js +0 -1
- package/dist/assets/channel-U5X5dN6K.js +0 -1
- package/dist/assets/classDiagram-M3E45YP4-7u91LcR8.js +0 -1
- package/dist/assets/classDiagram-v2-YAWTLIQI-7u91LcR8.js +0 -1
- package/dist/assets/clone-DltB19IA.js +0 -1
- package/dist/assets/infoDiagram-LHK5PUON-BI8vgvHA.js +0 -2
- package/dist/assets/min-BN2Aip45.js +0 -1
- package/dist/assets/sortBy-_N03fOwk.js +0 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-BbbtK1gk.js +0 -1
- package/dist/assets/time-CzUrup3A.js +0 -1
- package/src/core/codemirror/language/languages/sql-dialects/README.md +0 -5
- package/src/core/codemirror/language/languages/sql-dialects/duckdb.ts +0 -22
- package/src/core/codemirror/language/languages/sql-dialects/spec_duckdb.py +0 -257
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as m,ad as M,ae as j,af as L,ag as Y,l as i,c as H,ah as _,ai as $,a0 as q,a5 as z,a1 as O,$ as K,aj as Q,ak as U,al as V}from"./mermaid-
|
|
1
|
+
import{_ as m,ad as M,ae as j,af as L,ag as Y,l as i,c as H,ah as _,ai as $,a0 as q,a5 as z,a1 as O,$ as K,aj as Q,ak as U,al as V}from"./mermaid-TIsLiY_c.js";import{G as k}from"./graph-CDj368Ef.js";import{l as W}from"./layout-B1YrGZ5o.js";import{i as x}from"./_baseUniq-oH3tH_Lx.js";import{c as Z}from"./clone-4KJc73U3.js";import{m as G}from"./min-pEaRzhJa.js";import"./index-BfMKs8fK.js";import"./transform-B8bpuzxV.js";import"./timer-BwIYMJWC.js";import"./step-BwsUM5iJ.js";import"./_baseEach-Dtl0u6a9.js";import"./sortBy-DPhCeare.js";import"./_baseMap-BbSMx7sO.js";function X(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:te(e)};return x(e.graph())||(r.value=Z(e.graph())),r}function ee(e){return G(e.nodes(),function(r){var t=e.node(r),o=e.parent(r),d={v:r};return x(t)||(d.value=t),x(o)||(d.parent=o),d})}function te(e){return G(e.edges(),function(r){var t=e.edge(r),o={v:r.v,w:r.w};return x(r.name)||(o.name=r.name),x(t)||(o.value=t),o})}var l=new Map,b=new Map,P=new Map,re=m(()=>{b.clear(),P.clear(),l.clear()},"clear"),D=m((e,r)=>{const t=b.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),ne=m((e,r)=>{const t=b.get(r)||[];return i.info("Descendants of ",r," is ",t),i.info("Edge is ",e),e.v!==r&&e.w!==r&&(t?t.includes(e.v)||D(e.v,r)||D(e.w,r)||t.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1))},"edgeInCluster"),B=m((e,r,t,o)=>{i.warn("Copying children of ",e,"root",o,"data",r.node(e),o);const d=r.children(e)||[];e!==o&&d.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",d),d.forEach(s=>{if(r.children(s).length>0)B(s,r,t,o);else{const a=r.node(s);i.info("cp ",s," to ",o," with parent ",e),t.setNode(s,a),o!==r.parent(s)&&(i.warn("Setting parent",s,r.parent(s)),t.setParent(s,r.parent(s))),e!==o&&s!==e?(i.debug("Setting parent",s,e),t.setParent(s,e)):(i.info("In copy ",e,"root",o,"data",r.node(e),o),i.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==o,"node!==clusterId",s!==e));const c=r.edges(s);i.debug("Copying Edges",c),c.forEach(f=>{i.info("Edge",f);const E=r.edge(f.v,f.w,f.name);i.info("Edge data",E,o);try{ne(f,o)?(i.info("Copying as ",f.v,f.w,E,f.name),t.setEdge(f.v,f.w,E,f.name),i.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):i.info("Skipping copy of edge ",f.v,"-->",f.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",s),r.removeNode(s)})},"copy"),J=m((e,r)=>{const t=r.children(e);let o=[...t];for(const d of t)P.set(d,e),o=[...o,...J(d,r)];return o},"extractDescendants"),ie=m((e,r,t)=>{const o=e.edges().filter(c=>c.v===r||c.w===r),d=e.edges().filter(c=>c.v===t||c.w===t),s=o.map(c=>({v:c.v===r?t:c.v,w:c.w===r?r:c.w})),a=d.map(c=>({v:c.v,w:c.w}));return s.filter(c=>a.some(f=>c.v===f.v&&c.w===f.w))},"findCommonEdges"),I=m((e,r,t)=>{const o=r.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let d;for(const s of o){const a=I(s,r,t),c=ie(r,t,a);if(a){if(!(c.length>0))return a;d=a}}return d},"findNonClusterChild"),A=m(e=>l.has(e)&&l.get(e).externalConnections&&l.has(e)?l.get(e).id:e,"getAnchorId"),ae=m((e,r)=>{if(!e||r>10)i.debug("Opting out, no graph ");else{i.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(i.warn("Cluster identified",t," Replacement id in edges: ",I(t,e,t)),b.set(t,J(t,e)),l.set(t,{id:I(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const o=e.children(t),d=e.edges();o.length>0?(i.debug("Cluster identified",t,b),d.forEach(s=>{D(s.v,t)^D(s.w,t)&&(i.warn("Edge: ",s," leaves cluster ",t),i.warn("Descendants of XXX ",t,": ",b.get(t)),l.get(t).externalConnections=!0)})):i.debug("Not a cluster ",t,b)});for(let t of l.keys()){const o=l.get(t).id,d=e.parent(o);d!==t&&l.has(d)&&!l.get(d).externalConnections&&(l.get(t).id=d)}e.edges().forEach(function(t){const o=e.edge(t);i.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),i.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let d=t.v,s=t.w;if(i.warn("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(i.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),d=A(t.v),s=A(t.w),e.removeEdge(t.v,t.w,t.name),d!==t.v){const a=e.parent(d);l.get(a).externalConnections=!0,o.fromCluster=t.v}if(s!==t.w){const a=e.parent(s);l.get(a).externalConnections=!0,o.toCluster=t.w}i.warn("Fix Replacing with XXX",d,s,t.name),e.setEdge(d,s,o,t.name)}}),i.warn("Adjusted Graph",X(e)),T(e,0),i.trace(l)}},"adjustClustersAndEdges"),T=m((e,r)=>{var d,s;if(i.warn("extractor - ",r,X(e),e.children("D")),r>10)return void i.error("Bailing out");let t=e.nodes(),o=!1;for(const a of t){const c=e.children(a);o=o||c.length>0}if(o){i.debug("Nodes = ",t,r);for(const a of t)if(i.debug("Extracting node",a,l,l.has(a)&&!l.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",r),l.has(a))if(!l.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){i.warn("Cluster without external connections, without a parent and with children",a,r);let c=e.graph().rankdir==="TB"?"LR":"TB";(s=(d=l.get(a))==null?void 0:d.clusterData)!=null&&s.dir&&(c=l.get(a).clusterData.dir,i.warn("Fixing dir",l.get(a).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",X(e)),B(a,e,f,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:l.get(a).clusterData,label:l.get(a).label,graph:f}),i.warn("New graph after copy node: (",a,")",X(f)),i.debug("Old graph after copy",X(e))}else i.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!l.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),r),i.debug(l);else i.debug("Not a cluster",a,r);t=e.nodes(),i.warn("New list of nodes",t);for(const a of t){const c=e.node(a);i.warn(" Now next level",a,c),c!=null&&c.clusterNode&&T(c.graph,r+1)}}else i.debug("Done, no node has children",e.nodes())},"extractor"),R=m((e,r)=>{if(r.length===0)return[];let t=Object.assign([],r);return r.forEach(o=>{const d=e.children(o),s=R(e,d);t=[...t,...s]}),t},"sorter"),oe=m(e=>R(e,e.children()),"sortNodesByHierarchy"),F=m(async(e,r,t,o,d,s)=>{i.warn("Graph in recursive render:XAX",X(r),d);const a=r.graph().rankdir;i.trace("Dir in recursive render - dir:",a);const c=e.insert("g").attr("class","root");r.nodes()?i.info("Recursive render XXX",r.nodes()):i.info("No nodes found for",r),r.edges().length>0&&i.info("Recursive edges",r.edge(r.edges()[0]));const f=c.insert("g").attr("class","clusters"),E=c.insert("g").attr("class","edgePaths"),C=c.insert("g").attr("class","edgeLabels"),p=c.insert("g").attr("class","nodes");await Promise.all(r.nodes().map(async function(g){const n=r.node(g);if(d!==void 0){const h=JSON.parse(JSON.stringify(d.clusterData));i.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,g,`
|
|
3
3
|
data=`,h.height,`
|
|
4
4
|
Parent cluster`,d.height),r.setNode(d.id,h),r.parent(g)||(i.trace("Setting parent",g,d.id),r.setParent(g,d.id,h))}if(i.info("(Insert) Node XXX"+g+": "+JSON.stringify(r.node(g))),n==null?void 0:n.clusterNode){i.info("Cluster identified XBX",g,n.width,r.node(g));const{ranksep:h,nodesep:u}=r.graph();n.graph.setGraph({...n.graph.graph(),ranksep:h+25,nodesep:u});const N=await F(p,n.graph,t,o,r.node(g),s),S=N.elem;_(n,S),n.diff=N.diff||0,i.info("New compound node after recursive render XAX",g,"width",n.width,"height",n.height),$(S,n)}else r.children(g).length>0?(i.trace("Cluster - the non recursive path XBX",g,n.id,n,n.width,"Graph:",r),i.trace(I(n.id,r)),l.set(n.id,{id:I(n.id,r),node:n})):(i.trace("Node - the non recursive path XAX",g,p,r.node(g),a),await q(p,r.node(g),{config:s,dir:a}))})),await m(async()=>{const g=r.edges().map(async function(n){const h=r.edge(n.v,n.w,n.name);i.info("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.info("Edge "+n.v+" -> "+n.w+": ",n," ",JSON.stringify(r.edge(n))),i.info("Fix",l,"ids:",n.v,n.w,"Translating: ",l.get(n.v),l.get(n.w)),await V(C,h)});await Promise.all(g)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(X(r))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),W(r),i.info("Graph after layout:",JSON.stringify(X(r)));let y=0,{subGraphTitleTotalMargin:v}=z(s);return await Promise.all(oe(r).map(async function(g){var h;const n=r.node(g);if(i.info("Position XBX => "+g+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n==null?void 0:n.clusterNode)n.y+=v,i.info("A tainted cluster node XBX1",g,n.id,n.width,n.height,n.x,n.y,r.parent(g)),l.get(n.id).node=n,O(n);else if(r.children(g).length>0){i.info("A pure cluster node XBX1",g,n.id,n.x,n.y,n.width,n.height,r.parent(g)),n.height+=v,r.node(n.parentId);const u=(n==null?void 0:n.padding)/2||0,N=((h=n==null?void 0:n.labelBBox)==null?void 0:h.height)||0,S=N-u||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",u),await K(f,n),l.get(n.id).node=n}else{const u=r.node(n.parentId);n.y+=v/2,i.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",u,u==null?void 0:u.offsetY,n),O(n)}})),r.edges().forEach(function(g){const n=r.edge(g);i.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(n),n),n.points.forEach(S=>S.y+=v/2);const h=r.node(g.v);var u=r.node(g.w);const N=Q(E,n,l,t,h,u,o);U(n,N)}),r.nodes().forEach(function(g){const n=r.node(g);i.info(g,n.type,n.diff),n.isGroup&&(y=n.diff)}),i.warn("Returning from recursive render XAX",c,y),{elem:c,diff:y}},"recursiveRender"),se=m(async(e,r)=>{var s,a,c,f,E,C;const t=new k({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((s=e.config)==null?void 0:s.nodeSpacing)||((c=(a=e.config)==null?void 0:a.flowchart)==null?void 0:c.nodeSpacing)||e.nodeSpacing,ranksep:((f=e.config)==null?void 0:f.rankSpacing)||((C=(E=e.config)==null?void 0:E.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=r.select("g");M(o,e.markers,e.type,e.diagramId),j(),L(),Y(),re(),e.nodes.forEach(p=>{t.setNode(p.id,{...p}),p.parentId&&t.setParent(p.id,p.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(p=>{if(p.start===p.end){const w=p.start,y=w+"---"+w+"---1",v=w+"---"+w+"---2",g=t.node(w);t.setNode(y,{domId:y,id:y,parentId:g.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(y,g.parentId),t.setNode(v,{domId:v,id:v,parentId:g.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(v,g.parentId);const n=structuredClone(p),h=structuredClone(p),u=structuredClone(p);n.label="",n.arrowTypeEnd="none",n.id=w+"-cyclic-special-1",h.arrowTypeStart="none",h.arrowTypeEnd="none",h.id=w+"-cyclic-special-mid",u.label="",g.isGroup&&(n.fromCluster=w,u.toCluster=w),u.id=w+"-cyclic-special-2",u.arrowTypeStart="none",t.setEdge(w,y,n,w+"-cyclic-special-0"),t.setEdge(y,v,h,w+"-cyclic-special-1"),t.setEdge(v,w,u,w+"-cyc<lic-special-2")}else t.setEdge(p.start,p.end,{...p},p.id)}),i.warn("Graph at first:",JSON.stringify(X(t))),ae(t),i.warn("Graph after XAX:",JSON.stringify(X(t)));const d=H();await F(o,t,e.type,e.diagramId,void 0,d)},"render");export{se as render};
|
package/dist/assets/{data-grid-overlay-editor-ClaYc6AL.js → data-grid-overlay-editor-Dghfz964.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as t,ay as J}from"./index-
|
|
1
|
+
import{U as t,ay as J}from"./index-BfMKs8fK.js";import{s as Q,i as N,a as Z,b as _,T as ee,C as te,m as re}from"./glide-data-editor-lK9K3ps-.js";import"./trash-BotaB4h_.js";const ie=Q("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[r=>r.targetY,"px"],"d19meir1-1":[r=>r.targetX,"px"],"d19meir1-2":[r=>r.targetWidth,"px"],"d19meir1-3":[r=>r.targetHeight,"px"],"d19meir1-4":[r=>r.targetY+10,"px"],"d19meir1-5":[r=>Math.max(0,(r.targetHeight-28)/2),"px"]}});function ae(){const[r,s]=function(){const[n,o]=t.useState();return[n??void 0,o]}(),[a,p]=t.useState(0),[v,k]=t.useState(!0);return t.useLayoutEffect(()=>{if(r===void 0||!("IntersectionObserver"in window))return;const n=new IntersectionObserver(o=>{o.length!==0&&k(o[0].isIntersecting)},{threshold:1});return n.observe(r),()=>n.disconnect()},[r]),t.useEffect(()=>{if(v||r===void 0)return;let n;const o=()=>{const{right:O}=r.getBoundingClientRect();p(x=>Math.min(x+window.innerWidth-O-10,0)),n=requestAnimationFrame(o)};return n=requestAnimationFrame(o),()=>{n!==void 0&&cancelAnimationFrame(n)}},[r,v]),{ref:s,style:t.useMemo(()=>({transform:`translateX(${a}px)`}),[a])}}const ne=r=>{const{target:s,content:a,onFinishEditing:p,forceEditMode:v,initialValue:k,imageEditorOverride:n,markdownDivCreateNode:o,highlight:O,className:x,theme:S,id:W,cell:f,bloom:u,validateCell:d,getCellRenderer:R,provideEditor:h,isOutsideClick:X,customEventTarget:Y}=r,[l,q]=t.useState(v?a:void 0),w=t.useRef(l??a);w.current=l??a;const[y,P]=t.useState(()=>d===void 0||!(N(a)&&(d==null?void 0:d(f,a,w.current))===!1)),g=t.useCallback((e,i)=>{p(y?e:void 0,i)},[y,p]),B=t.useCallback(e=>{if(d!==void 0&&e!==void 0&&N(e)){const i=d(f,e,w.current);i===!1?P(!1):(typeof i=="object"&&(e=i),P(!0))}q(e)},[f,d]),E=t.useRef(!1),m=t.useRef(void 0),G=t.useCallback(()=>{g(l,[0,0]),E.current=!0},[l,g]),j=t.useCallback((e,i)=>{g(e,i??m.current??[0,0]),E.current=!0},[g]),L=t.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key!=="Enter"||e.shiftKey?e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0):(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0),window.setTimeout(()=>{E.current||m.current===void 0||(g(i?l:void 0,m.current),E.current=!0)},0)},[g,l]),D=l??a,[c,U]=t.useMemo(()=>{var C,V;if(Z(a))return[];const e={...a,location:f},i=h==null?void 0:h(e);return i!==void 0?[i,!1]:[(V=(C=R(a))==null?void 0:C.provideEditor)==null?void 0:V.call(C,e),!1]},[f,a,R,h]),{ref:$,style:z}=ae();let F,b,I=!0,T=!0;if(c!==void 0){I=c.disablePadding!==!0,T=c.disableStyling!==!0;const e=_(c);e&&(b=c.styleOverride);const i=e?c.editor:c;F=t.createElement(i,{isHighlighted:O,onChange:B,value:D,initialValue:k,onFinishedEditing:j,validatedSelection:N(D)?D.selectionRange:void 0,forceEditMode:v,target:s,imageEditorOverride:n,markdownDivCreateNode:o,isValid:y,theme:S})}b={...b,...z};const A=document.getElementById("portal");if(A===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let M=T?"gdg-style":"gdg-unstyle";y||(M+=" gdg-invalid"),I&&(M+=" gdg-pad");const H=(u==null?void 0:u[0])??1,K=(u==null?void 0:u[1])??1;return J.createPortal(t.createElement(ee.Provider,{value:S},t.createElement(te,{style:re(S),className:x,onClickOutside:G,isOutsideClick:X,customEventTarget:Y},t.createElement(ie,{ref:$,id:W,className:M,style:b,as:U===!0?"label":void 0,targetX:s.x-H,targetY:s.y-K,targetWidth:s.width+2*H,targetHeight:s.height+2*K},t.createElement("div",{className:"gdg-clip-region",onKeyDown:L},F)))),A)};export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./chunk-353BL4L5-
|
|
1
|
+
import{p as B}from"./chunk-353BL4L5-DZ6k9BBV.js";import{_ as l,s as v,g as P,q as z,p as F,a as S,b as W,E as w,I as E,d as T,y as D,F as A,G as R,l as x}from"./mermaid-TIsLiY_c.js";import{p as Y}from"./treemap-75Q7IDZK-ReN7RgbK.js";import"./index-BfMKs8fK.js";import"./transform-B8bpuzxV.js";import"./timer-BwIYMJWC.js";import"./step-BwsUM5iJ.js";import"./_baseEach-Dtl0u6a9.js";import"./_baseUniq-oH3tH_Lx.js";import"./min-pEaRzhJa.js";import"./_baseMap-BbSMx7sO.js";import"./clone-4KJc73U3.js";import"./_createAggregator-DVbCk7I8.js";var $={packet:[]},u=structuredClone($),H=R.packet,I=l(()=>{const t=w({...H,...A().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),L=l(()=>u.packet,"getPacket"),m={pushWord:l(t=>{t.length>0&&u.packet.push(t)},"pushWord"),getPacket:L,getConfig:I,clear:l(()=>{D(),u=structuredClone($)},"clear"),setAccTitle:W,getAccTitle:S,setDiagramTitle:F,getDiagramTitle:z,getAccDescription:P,setAccDescription:v},j=l(t=>{B(t,m);let e=-1,o=[],n=1;const{bitsPerRow:i}=m.getConfig();for(let{start:a,end:r,bits:d,label:k}of t.blocks){if(a!==void 0&&r!==void 0&&r<a)throw new Error(`Packet block ${a} - ${r} is invalid. End must be greater than start.`);if(a??(a=e+1),a!==e+1)throw new Error(`Packet block ${a} - ${r??a} is not contiguous. It should start from ${e+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(r??(r=a+(d??1)-1),d??(d=r-a+1),e=r,x.debug(`Packet block ${a} - ${e} with label ${k}`);o.length<=i+1&&m.getPacket().length<1e4;){const[c,p]=q({start:a,end:r,bits:d,label:k},n,i);if(o.push(c),c.end+1===n*i&&(m.pushWord(o),o=[],n++),!p)break;({start:a,end:r,bits:d,label:k}=p)}}m.pushWord(o)},"populate"),q=l((t,e,o)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*o)return[t,void 0];const n=e*o-1,i=e*o;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),G={parse:l(async t=>{const e=await Y("packet",t);x.debug(e),j(e)},"parse")},M=l((t,e,o,n)=>{const i=n.db,a=i.getConfig(),{rowHeight:r,paddingY:d,bitWidth:k,bitsPerRow:c}=a,p=i.getPacket(),s=i.getDiagramTitle(),h=r+d,b=h*(p.length+1)-(s?0:r),g=k*c+2,f=E(e);f.attr("viewbox",`0 0 ${g} ${b}`),T(f,b,g,a.useMaxWidth);for(const[y,C]of p.entries())N(f,C,y,a);f.append("text").text(s).attr("x",g/2).attr("y",b-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),N=l((t,e,o,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:d,showBits:k})=>{const c=t.append("g"),p=o*(n+a)+a;for(const s of e){const h=s.start%d*r+1,b=(s.end-s.start+1)*r-i;if(c.append("rect").attr("x",h).attr("y",p).attr("width",b).attr("height",n).attr("class","packetBlock"),c.append("text").attr("x",h+b/2).attr("y",p+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!k)continue;const g=s.end===s.start,f=p-2;c.append("text").attr("x",h+(g?b/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(s.start),g||c.append("text").attr("x",h+b).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),X={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},_={parser:G,db:m,renderer:{draw:M},styles:l(({packet:t}={})=>{const e=w(X,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${e.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var v;import{s as X}from"./chunk-SKB7J2MH-t9L60ESv.js";import{_ as m,E as j,F as H,I as Y,d as Z,l as D,a9 as C,b as tt,a as et,p as at,q as lt,g as st,s as rt,G as nt,aa as ot,y as it}from"./mermaid-BfTGIKjH.js";import{p as ct}from"./chunk-353BL4L5-D_x_But5.js";import{p as dt}from"./treemap-75Q7IDZK-D6IH2czJ.js";import{s as N}from"./transform-B8bpuzxV.js";import{y as k}from"./index-BMlE8K6G.js";import{o as A}from"./ordinal-DDUp3AbE.js";import{h as pt,t as ht}from"./index-BEQfoZiP.js";import"./step-BwsUM5iJ.js";import"./_baseEach-BM02cWfw.js";import"./_baseUniq-B3VNhTaG.js";import"./min-BN2Aip45.js";import"./_baseMap-CrbS00BX.js";import"./clone-DltB19IA.js";import"./_createAggregator-CBRdQRkQ.js";import"./timer-BwIYMJWC.js";import"./init-DLRA0X12.js";var G=(v=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=tt,this.getAccTitle=et,this.setDiagramTitle=at,this.getDiagramTitle=lt,this.getAccDescription=st,this.setAccDescription=rt}getNodes(){return this.nodes}getConfig(){const a=nt,n=H();return j({...a.treemap,...n.treemap??{}})}addNode(a,n){this.nodes.push(a),this.levels.set(a,n),n===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,n){const s=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=n.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(r=>{ot(r)&&(s!=null&&s.textStyles?s.textStyles.push(r):s.textStyles=[r]),s!=null&&s.styles?s.styles.push(r):s.styles=[r]}),this.classes.set(a,s)}getClasses(){return this.classes}getStylesForClass(a){var n;return((n=this.classes.get(a))==null?void 0:n.styles)??[]}clear(){it(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},m(v,"TreeMapDB"),v);function q(c){if(!c.length)return[];const a=[],n=[];return c.forEach(s=>{const o={name:s.name,children:s.type==="Leaf"?void 0:[]};for(o.classSelector=s==null?void 0:s.classSelector,s!=null&&s.cssCompiledStyles&&(o.cssCompiledStyles=[s.cssCompiledStyles]),s.type==="Leaf"&&s.value!==void 0&&(o.value=s.value);n.length>0&&n[n.length-1].level>=s.level;)n.pop();if(n.length===0)a.push(o);else{const r=n[n.length-1].node;r.children?r.children.push(o):r.children=[o]}s.type!=="Leaf"&&n.push({node:o,level:s.level})}),a}m(q,"buildHierarchy");var mt=m((c,a)=>{ct(c,a);const n=[];for(const r of c.TreemapRows??[])r.$type==="ClassDefStatement"&&a.addClass(r.className??"",r.styleText??"");for(const r of c.TreemapRows??[]){const d=r.item;if(!d)continue;const f=r.indent?parseInt(r.indent):0,M=yt(d),l=d.classSelector?a.getStylesForClass(d.classSelector):[],$=l.length>0?l.join(";"):void 0,x={level:f,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:$};n.push(x)}const s=q(n),o=m((r,d)=>{for(const f of r)a.addNode(f,d),f.children&&f.children.length>0&&o(f.children,d+1)},"addNodesRecursively");o(s,0)},"populate"),yt=m(c=>c.name?String(c.name):"","getItemName"),_={parser:{yy:void 0},parse:m(async c=>{var a;try{const n=dt,s=await n("treemap",c);D.debug("Treemap AST:",s);const o=(a=_.parser)==null?void 0:a.yy;if(!(o instanceof G))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mt(s,o)}catch(n){throw D.error("Error parsing treemap:",n),n}},"parse")},T=10,ft={draw:m((c,a,n,s)=>{const o=s.db,r=o.getConfig(),d=r.padding??10,f=o.getDiagramTitle(),M=o.getRoot(),{themeVariables:l}=H();if(!M)return;const $=f?30:0,x=Y(a),V=r.nodeWidth?r.nodeWidth*T:960,E=r.nodeHeight?r.nodeHeight*T:500,W=V,R=E+$;let b;x.attr("viewBox",`0 0 ${W} ${R}`),Z(x,R,W,r.useMaxWidth);try{const t=r.valueFormat||",";if(t==="$0,0")b=m(e=>"$"+k(",")(e),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const e=/\.\d+/.exec(t),p=e?e[0]:"";b=m(u=>"$"+k(","+p)(u),"valueFormat")}else if(t.startsWith("$")){const e=t.substring(1);b=m(p=>"$"+k(e||"")(p),"valueFormat")}else b=k(t)}catch(t){D.error("Error creating format function:",t),b=k(",")}const w=A().range(["transparent",l.cScale0,l.cScale1,l.cScale2,l.cScale3,l.cScale4,l.cScale5,l.cScale6,l.cScale7,l.cScale8,l.cScale9,l.cScale10,l.cScale11]),J=A().range(["transparent",l.cScalePeer0,l.cScalePeer1,l.cScalePeer2,l.cScalePeer3,l.cScalePeer4,l.cScalePeer5,l.cScalePeer6,l.cScalePeer7,l.cScalePeer8,l.cScalePeer9,l.cScalePeer10,l.cScalePeer11]),z=A().range([l.cScaleLabel0,l.cScaleLabel1,l.cScaleLabel2,l.cScaleLabel3,l.cScaleLabel4,l.cScaleLabel5,l.cScaleLabel6,l.cScaleLabel7,l.cScaleLabel8,l.cScaleLabel9,l.cScaleLabel10,l.cScaleLabel11]);f&&x.append("text").attr("x",W/2).attr("y",$/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);const I=x.append("g").attr("transform",`translate(0, ${$})`).attr("class","treemapContainer"),K=pt(M).sum(t=>t.value??0).sort((t,e)=>(e.value??0)-(t.value??0)),B=ht().size([V,E]).paddingTop(t=>t.children&&t.children.length>0?35:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?T:0).paddingRight(t=>t.children&&t.children.length>0?T:0).paddingBottom(t=>t.children&&t.children.length>0?T:0).round(!0)(K),O=B.descendants().filter(t=>t.children&&t.children.length>0),L=I.selectAll(".treemapSection").data(O).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);L.append("rect").attr("width",t=>t.x1-t.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),L.append("clipPath").attr("id",(t,e)=>`clip-section-${a}-${e}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",25),L.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,e)=>`treemapSection section${e}`).attr("fill",t=>w(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>J(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const e=C({cssCompiledStyles:t.data.cssCompiledStyles});return e.nodeStyles+";"+e.borderStyles.join(";")}),L.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>t.depth===0?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+z(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(t){if(t.depth===0)return;const e=N(this),p=t.data.name;e.text(p);const u=t.x1-t.x0;let g;r.showValues!==!1&&t.value?g=u-10-30-10-6:g=u-6-6;const y=Math.max(15,g),S=e.node();if(S.getComputedTextLength()>y){const i="...";let h=p;for(;h.length>0;){if(h=p.substring(0,h.length-1),h.length===0){e.text(i),S.getComputedTextLength()>y&&e.text("");break}if(e.text(h+i),S.getComputedTextLength()<=y)break}}}),r.showValues!==!1&&L.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?b(t.value):"").attr("font-style","italic").attr("style",t=>t.depth===0?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+z(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"));const Q=B.leaves(),F=I.selectAll(".treemapLeafGroup").data(Q).enter().append("g").attr("class",(t,e)=>`treemapNode treemapLeafGroup leaf${e}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);F.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?w(t.parent.data.name):w(t.data.name)).attr("style",t=>C({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?w(t.parent.data.name):w(t.data.name)).attr("stroke-width",3),F.append("clipPath").attr("id",(t,e)=>`clip-${a}-${e}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),F.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+z(t.data.name)+";"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,e)=>`url(#clip-${a}-${e})`).text(t=>t.data.name).each(function(t){const e=N(this),p=t.x1-t.x0,u=t.y1-t.y0,g=e.node(),y=p-8,S=u-8;if(y<10||S<10)return void e.style("display","none");let i=parseInt(e.style("font-size"),10);for(;g.getComputedTextLength()>y&&i>8;)i--,e.style("font-size",`${i}px`);let h=Math.max(6,Math.min(28,Math.round(.6*i))),P=i+2+h;for(;P>S&&i>8&&(i--,h=Math.max(6,Math.min(28,Math.round(.6*i))),!(h<6&&i===8));)e.style("font-size",`${i}px`),P=i+2+h;e.style("font-size",`${i}px`),(g.getComputedTextLength()>y||i<8||S<i)&&e.style("display","none")}),r.showValues!==!1&&F.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+z(t.data.name)+";"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,e)=>`url(#clip-${a}-${e})`).text(t=>t.value?b(t.value):"").each(function(t){const e=N(this),p=this.parentNode;if(!p)return void e.style("display","none");const u=N(p).select(".treemapLabel");if(u.empty()||u.style("display")==="none")return void e.style("display","none");const g=parseFloat(u.style("font-size")),y=Math.max(6,Math.min(28,Math.round(.6*g)));e.style("font-size",`${y}px`);const S=(t.y1-t.y0)/2+g/2+2;e.attr("y",S);const i=t.x1-t.x0,h=t.y1-t.y0-4,P=i-8;e.node().getComputedTextLength()>P||S+y>h||y<6?e.style("display","none"):e.style("display",null)});const U=r.diagramPadding??8;X(x,U,"flowchart",(r==null?void 0:r.useMaxWidth)||!1)},"draw"),getClasses:m(function(c,a){return a.db.getClasses()},"getClasses")},ut={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},St=m(({treemap:c}={})=>{const a=j(ut,c);return`
|
|
1
|
+
var v;import{s as X}from"./chunk-SKB7J2MH-B5xc8b3Z.js";import{_ as m,E as j,F as H,I as Y,d as Z,l as D,a9 as C,b as tt,a as et,p as at,q as lt,g as st,s as rt,G as nt,aa as ot,y as it}from"./mermaid-TIsLiY_c.js";import{p as ct}from"./chunk-353BL4L5-DZ6k9BBV.js";import{p as dt}from"./treemap-75Q7IDZK-ReN7RgbK.js";import{s as N}from"./transform-B8bpuzxV.js";import{y as k}from"./index-BfMKs8fK.js";import{o as A}from"./ordinal-DDUp3AbE.js";import{h as pt,t as ht}from"./index-BEQfoZiP.js";import"./step-BwsUM5iJ.js";import"./_baseEach-Dtl0u6a9.js";import"./_baseUniq-oH3tH_Lx.js";import"./min-pEaRzhJa.js";import"./_baseMap-BbSMx7sO.js";import"./clone-4KJc73U3.js";import"./_createAggregator-DVbCk7I8.js";import"./timer-BwIYMJWC.js";import"./init-DLRA0X12.js";var G=(v=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=tt,this.getAccTitle=et,this.setDiagramTitle=at,this.getDiagramTitle=lt,this.getAccDescription=st,this.setAccDescription=rt}getNodes(){return this.nodes}getConfig(){const a=nt,n=H();return j({...a.treemap,...n.treemap??{}})}addNode(a,n){this.nodes.push(a),this.levels.set(a,n),n===0&&(this.outerNodes.push(a),this.root??(this.root=a))}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,n){const s=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=n.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(r=>{ot(r)&&(s!=null&&s.textStyles?s.textStyles.push(r):s.textStyles=[r]),s!=null&&s.styles?s.styles.push(r):s.styles=[r]}),this.classes.set(a,s)}getClasses(){return this.classes}getStylesForClass(a){var n;return((n=this.classes.get(a))==null?void 0:n.styles)??[]}clear(){it(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},m(v,"TreeMapDB"),v);function q(c){if(!c.length)return[];const a=[],n=[];return c.forEach(s=>{const o={name:s.name,children:s.type==="Leaf"?void 0:[]};for(o.classSelector=s==null?void 0:s.classSelector,s!=null&&s.cssCompiledStyles&&(o.cssCompiledStyles=[s.cssCompiledStyles]),s.type==="Leaf"&&s.value!==void 0&&(o.value=s.value);n.length>0&&n[n.length-1].level>=s.level;)n.pop();if(n.length===0)a.push(o);else{const r=n[n.length-1].node;r.children?r.children.push(o):r.children=[o]}s.type!=="Leaf"&&n.push({node:o,level:s.level})}),a}m(q,"buildHierarchy");var mt=m((c,a)=>{ct(c,a);const n=[];for(const r of c.TreemapRows??[])r.$type==="ClassDefStatement"&&a.addClass(r.className??"",r.styleText??"");for(const r of c.TreemapRows??[]){const d=r.item;if(!d)continue;const f=r.indent?parseInt(r.indent):0,M=yt(d),l=d.classSelector?a.getStylesForClass(d.classSelector):[],$=l.length>0?l.join(";"):void 0,x={level:f,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:$};n.push(x)}const s=q(n),o=m((r,d)=>{for(const f of r)a.addNode(f,d),f.children&&f.children.length>0&&o(f.children,d+1)},"addNodesRecursively");o(s,0)},"populate"),yt=m(c=>c.name?String(c.name):"","getItemName"),_={parser:{yy:void 0},parse:m(async c=>{var a;try{const n=dt,s=await n("treemap",c);D.debug("Treemap AST:",s);const o=(a=_.parser)==null?void 0:a.yy;if(!(o instanceof G))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mt(s,o)}catch(n){throw D.error("Error parsing treemap:",n),n}},"parse")},T=10,ft={draw:m((c,a,n,s)=>{const o=s.db,r=o.getConfig(),d=r.padding??10,f=o.getDiagramTitle(),M=o.getRoot(),{themeVariables:l}=H();if(!M)return;const $=f?30:0,x=Y(a),V=r.nodeWidth?r.nodeWidth*T:960,E=r.nodeHeight?r.nodeHeight*T:500,W=V,R=E+$;let b;x.attr("viewBox",`0 0 ${W} ${R}`),Z(x,R,W,r.useMaxWidth);try{const t=r.valueFormat||",";if(t==="$0,0")b=m(e=>"$"+k(",")(e),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const e=/\.\d+/.exec(t),p=e?e[0]:"";b=m(u=>"$"+k(","+p)(u),"valueFormat")}else if(t.startsWith("$")){const e=t.substring(1);b=m(p=>"$"+k(e||"")(p),"valueFormat")}else b=k(t)}catch(t){D.error("Error creating format function:",t),b=k(",")}const w=A().range(["transparent",l.cScale0,l.cScale1,l.cScale2,l.cScale3,l.cScale4,l.cScale5,l.cScale6,l.cScale7,l.cScale8,l.cScale9,l.cScale10,l.cScale11]),J=A().range(["transparent",l.cScalePeer0,l.cScalePeer1,l.cScalePeer2,l.cScalePeer3,l.cScalePeer4,l.cScalePeer5,l.cScalePeer6,l.cScalePeer7,l.cScalePeer8,l.cScalePeer9,l.cScalePeer10,l.cScalePeer11]),z=A().range([l.cScaleLabel0,l.cScaleLabel1,l.cScaleLabel2,l.cScaleLabel3,l.cScaleLabel4,l.cScaleLabel5,l.cScaleLabel6,l.cScaleLabel7,l.cScaleLabel8,l.cScaleLabel9,l.cScaleLabel10,l.cScaleLabel11]);f&&x.append("text").attr("x",W/2).attr("y",$/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);const I=x.append("g").attr("transform",`translate(0, ${$})`).attr("class","treemapContainer"),K=pt(M).sum(t=>t.value??0).sort((t,e)=>(e.value??0)-(t.value??0)),B=ht().size([V,E]).paddingTop(t=>t.children&&t.children.length>0?35:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?T:0).paddingRight(t=>t.children&&t.children.length>0?T:0).paddingBottom(t=>t.children&&t.children.length>0?T:0).round(!0)(K),O=B.descendants().filter(t=>t.children&&t.children.length>0),L=I.selectAll(".treemapSection").data(O).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);L.append("rect").attr("width",t=>t.x1-t.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),L.append("clipPath").attr("id",(t,e)=>`clip-section-${a}-${e}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",25),L.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,e)=>`treemapSection section${e}`).attr("fill",t=>w(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>J(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const e=C({cssCompiledStyles:t.data.cssCompiledStyles});return e.nodeStyles+";"+e.borderStyles.join(";")}),L.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>t.depth===0?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+z(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(t){if(t.depth===0)return;const e=N(this),p=t.data.name;e.text(p);const u=t.x1-t.x0;let g;r.showValues!==!1&&t.value?g=u-10-30-10-6:g=u-6-6;const y=Math.max(15,g),S=e.node();if(S.getComputedTextLength()>y){const i="...";let h=p;for(;h.length>0;){if(h=p.substring(0,h.length-1),h.length===0){e.text(i),S.getComputedTextLength()>y&&e.text("");break}if(e.text(h+i),S.getComputedTextLength()<=y)break}}}),r.showValues!==!1&&L.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?b(t.value):"").attr("font-style","italic").attr("style",t=>t.depth===0?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+z(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"));const Q=B.leaves(),F=I.selectAll(".treemapLeafGroup").data(Q).enter().append("g").attr("class",(t,e)=>`treemapNode treemapLeafGroup leaf${e}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);F.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?w(t.parent.data.name):w(t.data.name)).attr("style",t=>C({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?w(t.parent.data.name):w(t.data.name)).attr("stroke-width",3),F.append("clipPath").attr("id",(t,e)=>`clip-${a}-${e}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),F.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+z(t.data.name)+";"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,e)=>`url(#clip-${a}-${e})`).text(t=>t.data.name).each(function(t){const e=N(this),p=t.x1-t.x0,u=t.y1-t.y0,g=e.node(),y=p-8,S=u-8;if(y<10||S<10)return void e.style("display","none");let i=parseInt(e.style("font-size"),10);for(;g.getComputedTextLength()>y&&i>8;)i--,e.style("font-size",`${i}px`);let h=Math.max(6,Math.min(28,Math.round(.6*i))),P=i+2+h;for(;P>S&&i>8&&(i--,h=Math.max(6,Math.min(28,Math.round(.6*i))),!(h<6&&i===8));)e.style("font-size",`${i}px`),P=i+2+h;e.style("font-size",`${i}px`),(g.getComputedTextLength()>y||i<8||S<i)&&e.style("display","none")}),r.showValues!==!1&&F.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+z(t.data.name)+";"+C({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,e)=>`url(#clip-${a}-${e})`).text(t=>t.value?b(t.value):"").each(function(t){const e=N(this),p=this.parentNode;if(!p)return void e.style("display","none");const u=N(p).select(".treemapLabel");if(u.empty()||u.style("display")==="none")return void e.style("display","none");const g=parseFloat(u.style("font-size")),y=Math.max(6,Math.min(28,Math.round(.6*g)));e.style("font-size",`${y}px`);const S=(t.y1-t.y0)/2+g/2+2;e.attr("y",S);const i=t.x1-t.x0,h=t.y1-t.y0-4,P=i-8;e.node().getComputedTextLength()>P||S+y>h||y<6?e.style("display","none"):e.style("display",null)});const U=r.diagramPadding??8;X(x,U,"flowchart",(r==null?void 0:r.useMaxWidth)||!1)},"draw"),getClasses:m(function(c,a){return a.db.getClasses()},"getClasses")},ut={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},St=m(({treemap:c}={})=>{const a=j(ut,c);return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${a.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${a.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as k}from"./chunk-353BL4L5-
|
|
1
|
+
import{p as k}from"./chunk-353BL4L5-DZ6k9BBV.js";import{_ as l,s as O,g as S,q as I,p as E,a as F,b as z,I as P,y as R,E as v,F as w,G as D,l as G,L as B}from"./mermaid-TIsLiY_c.js";import{p as _}from"./treemap-75Q7IDZK-ReN7RgbK.js";import"./index-BfMKs8fK.js";import"./transform-B8bpuzxV.js";import"./timer-BwIYMJWC.js";import"./step-BwsUM5iJ.js";import"./_baseEach-Dtl0u6a9.js";import"./_baseUniq-oH3tH_Lx.js";import"./min-pEaRzhJa.js";import"./_baseMap-BbSMx7sO.js";import"./clone-4KJc73U3.js";import"./_createAggregator-DVbCk7I8.js";var u={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},b={axes:[],curves:[],options:u},m=structuredClone(b),j=D.radar,V=l(()=>v({...j,...w().radar}),"getConfig"),C=l(()=>m.axes,"getAxes"),W=l(()=>m.curves,"getCurves"),q=l(()=>m.options,"getOptions"),H=l(e=>{m.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=l(e=>{m.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:J(t.entries)}))},"setCurves"),J=l(e=>{if(e[0].axis==null)return e.map(a=>a.value);const t=C();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(a=>{const r=e.find(n=>{var s;return((s=n.axis)==null?void 0:s.$refText)===a.name});if(r===void 0)throw new Error("Missing entry for axis "+a.label);return r.value})},"computeCurveEntries"),$={getAxes:C,getCurves:W,getOptions:q,setAxes:H,setCurves:Z,setOptions:l(e=>{var a,r,n,s,o;const t=e.reduce((i,c)=>(i[c.name]=c,i),{});m.options={showLegend:((a=t.showLegend)==null?void 0:a.value)??u.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??u.ticks,max:((n=t.max)==null?void 0:n.value)??u.max,min:((s=t.min)==null?void 0:s.value)??u.min,graticule:((o=t.graticule)==null?void 0:o.value)??u.graticule}},"setOptions"),getConfig:V,clear:l(()=>{R(),m=structuredClone(b)},"clear"),setAccTitle:z,getAccTitle:F,setDiagramTitle:E,getDiagramTitle:I,getAccDescription:S,setAccDescription:O},K=l(e=>{k(e,$);const{axes:t,curves:a,options:r}=e;$.setAxes(t),$.setCurves(a),$.setOptions(r)},"populate"),N={parse:l(async e=>{const t=await _("radar",e);G.debug(t),K(t)},"parse")},Q=l((e,t,a,r)=>{const n=r.db,s=n.getAxes(),o=n.getCurves(),i=n.getOptions(),c=n.getConfig(),g=n.getDiagramTitle(),p=P(t),d=U(p,c),h=i.max??Math.max(...o.map(f=>Math.max(...f.entries))),y=i.min,x=Math.min(c.width,c.height)/2;X(d,s,x,i.ticks,i.graticule),Y(d,s,x,c),M(d,s,o,y,h,i.graticule,c),A(d,o,i.showLegend,c),d.append("text").attr("class","radarTitle").text(g).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),U=l((e,t)=>{const a=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,n=t.marginLeft+t.width/2,s=t.marginTop+t.height/2;return e.attr("viewbox",`0 0 ${a} ${r}`).attr("width",a).attr("height",r),e.append("g").attr("transform",`translate(${n}, ${s})`)},"drawFrame"),X=l((e,t,a,r,n)=>{if(n==="circle")for(let s=0;s<r;s++){const o=a*(s+1)/r;e.append("circle").attr("r",o).attr("class","radarGraticule")}else if(n==="polygon"){const s=t.length;for(let o=0;o<r;o++){const i=a*(o+1)/r,c=t.map((g,p)=>{const d=2*p*Math.PI/s-Math.PI/2;return`${i*Math.cos(d)},${i*Math.sin(d)}`}).join(" ");e.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),Y=l((e,t,a,r)=>{const n=t.length;for(let s=0;s<n;s++){const o=t[s].label,i=2*s*Math.PI/n-Math.PI/2;e.append("line").attr("x1",0).attr("y1",0).attr("x2",a*r.axisScaleFactor*Math.cos(i)).attr("y2",a*r.axisScaleFactor*Math.sin(i)).attr("class","radarAxisLine"),e.append("text").text(o).attr("x",a*r.axisLabelFactor*Math.cos(i)).attr("y",a*r.axisLabelFactor*Math.sin(i)).attr("class","radarAxisLabel")}},"drawAxes");function M(e,t,a,r,n,s,o){const i=t.length,c=Math.min(o.width,o.height)/2;a.forEach((g,p)=>{if(g.entries.length!==i)return;const d=g.entries.map((h,y)=>{const x=2*Math.PI*y/i-Math.PI/2,f=L(h,r,n,c);return{x:f*Math.cos(x),y:f*Math.sin(x)}});s==="circle"?e.append("path").attr("d",T(d,o.curveTension)).attr("class",`radarCurve-${p}`):s==="polygon"&&e.append("polygon").attr("points",d.map(h=>`${h.x},${h.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}function L(e,t,a,r){return r*(Math.min(Math.max(e,t),a)-t)/(a-t)}function T(e,t){const a=e.length;let r=`M${e[0].x},${e[0].y}`;for(let n=0;n<a;n++){const s=e[(n-1+a)%a],o=e[n],i=e[(n+1)%a],c=e[(n+2)%a],g={x:o.x+(i.x-s.x)*t,y:o.y+(i.y-s.y)*t},p={x:i.x-(c.x-o.x)*t,y:i.y-(c.y-o.y)*t};r+=` C${g.x},${g.y} ${p.x},${p.y} ${i.x},${i.y}`}return`${r} Z`}function A(e,t,a,r){if(!a)return;const n=3*(r.width/2+r.marginRight)/4,s=3*-(r.height/2+r.marginTop)/4;t.forEach((o,i)=>{const c=e.append("g").attr("transform",`translate(${n}, ${s+20*i})`);c.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),c.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}l(M,"drawCurves"),l(L,"relativeRadius"),l(T,"closedRoundCurve"),l(A,"drawLegend");var tt={draw:Q},at=l((e,t)=>{let a="";for(let r=0;r<e.THEME_COLOR_LIMIT;r++){const n=e[`cScale${r}`];a+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${n};
|
|
4
4
|
fill: ${n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=JSON.parse(`{"array_agg":{"description":"Returns a LIST containing all the values of a column.","example":"list(A)"},"array_aggr":{"description":"Executes the aggregate function name on the elements of list","example":"list_aggregate([1, 2, NULL], 'min')"},"array_aggregate":{"description":"Executes the aggregate function name on the elements of list","example":"list_aggregate([1, 2, NULL], 'min')"},"array_apply":{"description":"Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details","example":"list_transform([1, 2, 3], x -> x + 1)"},"array_cat":{"description":"Concatenates two lists.","example":"list_concat([2, 3], [4, 5, 6])"},"array_concat":{"description":"Concatenates two lists.","example":"list_concat([2, 3], [4, 5, 6])"},"array_contains":{"description":"Returns true if the list contains the element.","example":"list_contains([1, 2, NULL], 1)"},"array_cosine_distance":{"description":"Compute the cosine distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_cosine_distance([1, 2, 3], [1, 2, 3])"},"array_cosine_similarity":{"description":"Compute the cosine similarity between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_cosine_similarity([1, 2, 3], [1, 2, 3])"},"array_cross_product":{"description":"Compute the cross product of two arrays of size 3. The array elements can not be NULL.","example":"array_cross_product([1, 2, 3], [1, 2, 3])"},"array_distance":{"description":"Compute the distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_distance([1, 2, 3], [1, 2, 3])"},"array_distinct":{"description":"Removes all duplicates and NULLs from a list. Does not preserve the original order","example":"list_distinct([1, 1, NULL, -3, 1, 5])"},"array_dot_product":{"description":"Compute the inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_inner_product([1, 2, 3], [1, 2, 3])"},"array_extract":{"description":"Extract the indexth (1-based) value from the array.","example":"array_extract('DuckDB', 2)"},"array_filter":{"description":"Constructs a list from those elements of the input list for which the lambda function returns true","example":"list_filter([3, 4, 5], x -> x > 4)"},"array_grade_up":{"description":"Returns the index of their sorted position.","example":"list_grade_up([3, 6, 1, 2])"},"array_has":{"description":"Returns true if the list contains the element.","example":"list_contains([1, 2, NULL], 1)"},"array_has_all":{"description":"Returns true if all elements of l2 are in l1. NULLs are ignored.","example":"list_has_all([1, 2, 3], [2, 3])"},"array_has_any":{"description":"Returns true if the lists have any element in common. NULLs are ignored.","example":"list_has_any([1, 2, 3], [2, 3, 4])"},"array_indexof":{"description":"Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.","example":"list_position([1, 2, NULL], 2)"},"array_inner_product":{"description":"Compute the inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_inner_product([1, 2, 3], [1, 2, 3])"},"array_length":{"description":"Returns the length of the \`list\`.","example":"array_length([1,2,3])"},"array_negative_dot_product":{"description":"Compute the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_negative_inner_product([1, 2, 3], [1, 2, 3])"},"array_negative_inner_product":{"description":"Compute the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.","example":"array_negative_inner_product([1, 2, 3], [1, 2, 3])"},"array_position":{"description":"Returns the index of the element if the list contains the element. If the element is not found, it returns NULL.","example":"list_position([1, 2, NULL], 2)"},"array_reduce":{"description":"Returns a single value that is the result of applying the lambda function to each element of the input list, starting with the first element and then repeatedly applying the lambda function to the result of the previous application and the next element of the list. When an initial value is provided, it is used as the first argument to the lambda function","example":"list_reduce([1, 2, 3], (x, y) -> x + y)"},"array_resize":{"description":"Resizes the list to contain size elements. Initializes new elements with value or NULL if value is not set.","example":"list_resize([1, 2, 3], 5, 0)"},"array_reverse_sort":{"description":"Sorts the elements of the list in reverse order","example":"list_reverse_sort([3, 6, 1, 2])"},"array_select":{"description":"Returns a list based on the elements selected by the index_list.","example":"list_select([10, 20, 30, 40], [1, 4])"},"array_slice":{"description":"list_slice with added step feature.","example":"list_slice([4, 5, 6], 2, 3)"},"array_sort":{"description":"Sorts the elements of the list","example":"list_sort([3, 6, 1, 2])"},"array_transform":{"description":"Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details","example":"list_transform([1, 2, 3], x -> x + 1)"},"array_unique":{"description":"Counts the unique elements of a list","example":"list_unique([1, 1, NULL, -3, 1, 5])"},"array_value":{"description":"Create an ARRAY containing the argument values.","example":"array_value(4, 5, 6)"},"array_where":{"description":"Returns a list with the BOOLEANs in mask_list applied as a mask to the value_list.","example":"list_where([10, 20, 30, 40], [true, false, false, true])"},"array_zip":{"description":"Zips k LISTs to a new LIST whose length will be that of the longest list. Its elements are structs of k elements from each list list_1, \u2026, list_k, missing elements are replaced with NULL. If truncate is set, all lists are truncated to the smallest list length.","example":"list_zip([1, 2], [3, 4], [5, 6])"},"cast_to_type":{"description":"Casts the first argument to the type of the second argument","example":"cast_to_type('42', NULL::INTEGER)"},"concat":{"description":"Concatenates many strings together.","example":"concat('Hello', ' ', 'World')"},"concat_ws":{"description":"Concatenates strings together separated by the specified separator.","example":"concat_ws(', ', 'Banana', 'Apple', 'Melon')"},"contains":{"description":"Returns true if the \`list\` contains the \`element\`.","example":"contains([1, 2, NULL], 1)"},"count":{"description":"Returns the number of non-null values in arg.","example":"count(A)"},"count_if":{"description":"Counts the total number of TRUE values for a boolean column","example":"count_if(A)"},"countif":{"description":"Counts the total number of TRUE values for a boolean column","example":"count_if(A)"},"date_diff":{"description":"The number of partition boundaries between the timestamps","example":"date_diff('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"date_part":{"description":"Get subfield (equivalent to extract)","example":"date_part('minute', TIMESTAMP '1992-09-20 20:38:40')"},"date_sub":{"description":"The number of complete partitions between the timestamps","example":"date_sub('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"date_trunc":{"description":"Truncate to specified precision","example":"date_trunc('hour', TIMESTAMPTZ '1992-09-20 20:38:40')"},"datediff":{"description":"The number of partition boundaries between the timestamps","example":"date_diff('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"datepart":{"description":"Get subfield (equivalent to extract)","example":"date_part('minute', TIMESTAMP '1992-09-20 20:38:40')"},"datesub":{"description":"The number of complete partitions between the timestamps","example":"date_sub('hour', TIMESTAMPTZ '1992-09-30 23:59:59', TIMESTAMPTZ '1992-10-01 01:58:00')"},"datetrunc":{"description":"Truncate to specified precision","example":"date_trunc('hour', TIMESTAMPTZ '1992-09-20 20:38:40')"},"day":{"description":"Extract the day component from a date or timestamp","example":"day(timestamp '2021-08-03 11:59:44.123456')"},"dayname":{"description":"The (English) name of the weekday","example":"dayname(TIMESTAMP '1992-03-22')"},"dayofmonth":{"description":"Extract the dayofmonth component from a date or timestamp","example":"dayofmonth(timestamp '2021-08-03 11:59:44.123456')"},"dayofweek":{"description":"Extract the dayofweek component from a date or timestamp","example":"dayofweek(timestamp '2021-08-03 11:59:44.123456')"},"dayofyear":{"description":"Extract the dayofyear component from a date or timestamp","example":"dayofyear(timestamp '2021-08-03 11:59:44.123456')"},"generate_series":{"description":"Create a list of values between start and stop - the stop parameter is inclusive","example":"generate_series(2, 5, 3)"},"histogram":{"description":"Returns a LIST of STRUCTs with the fields bucket and count.","example":"histogram(A)"},"histogram_exact":{"description":"Returns a LIST of STRUCTs with the fields bucket and count matching the buckets exactly.","example":"histogram_exact(A, [0, 1, 2])"},"string_agg":{"description":"Concatenates the column string values with an optional separator.","example":"string_agg(A, '-')"},"string_split":{"description":"Splits the \`string\` along the \`separator\`","example":"string_split('hello-world', '-')"},"string_split_regex":{"description":"Splits the \`string\` along the \`regex\`","example":"string_split_regex('hello world; 42', ';? ')"},"string_to_array":{"description":"Splits the \`string\` along the \`separator\`","example":"string_split('hello-world', '-')"},"struct_concat":{"description":"Merge the multiple STRUCTs into a single STRUCT.","example":"struct_concat(struct_pack(i := 4), struct_pack(s := 'string'))"},"struct_extract":{"description":"Extract the named entry from the STRUCT.","example":"struct_extract({'i': 3, 'v2': 3, 'v3': 0}, 'i')"},"struct_extract_at":{"description":"Extract the entry from the STRUCT by position (starts at 1!).","example":"struct_extract_at({'i': 3, 'v2': 3, 'v3': 0}, 2)"},"struct_insert":{"description":"Adds field(s)/value(s) to an existing STRUCT with the argument values. The entry name(s) will be the bound variable name(s)","example":"struct_insert({'a': 1}, b := 2)"},"struct_pack":{"description":"Create a STRUCT containing the argument values. The entry name will be the bound variable name.","example":"struct_pack(i := 4, s := 'string')"},"substring":{"description":"Extract substring of \`length\` characters starting from character \`start\`. Note that a start value of 1 refers to the first character of the \`string\`.","example":"substring('Hello', 2, 2)"},"substring_grapheme":{"description":"Extract substring of \`length\` grapheme clusters starting from character \`start\`. Note that a start value of 1 refers to the first character of the \`string\`.","example":"substring_grapheme('\u{1F986}\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F\u{1F926}\u{1F3FD}\u200D\u2640\uFE0F\u{1F986}', 3, 2)"},"to_base":{"description":"Converts a value to a string in the given base radix, optionally padding with leading zeros to the minimum length","example":"to_base(42, 16)"},"to_base64":{"description":"Converts a \`blob\` to a base64 encoded \`string\`.","example":"base64('A'::BLOB)"},"to_binary":{"description":"Converts the value to binary representation","example":"bin(42)"},"to_centuries":{"description":"Construct a century interval","example":"to_centuries(5)"},"to_days":{"description":"Construct a day interval","example":"to_days(5)"},"to_decades":{"description":"Construct a decade interval","example":"to_decades(5)"},"to_hex":{"description":"Converts the value to hexadecimal representation.","example":"hex(42)"},"to_hours":{"description":"Construct a hour interval","example":"to_hours(5)"},"to_microseconds":{"description":"Construct a microsecond interval","example":"to_microseconds(5)"},"to_millennia":{"description":"Construct a millennium interval","example":"to_millennia(1)"},"to_milliseconds":{"description":"Construct a millisecond interval","example":"to_milliseconds(5.5)"},"to_minutes":{"description":"Construct a minute interval","example":"to_minutes(5)"},"to_months":{"description":"Construct a month interval","example":"to_months(5)"},"to_quarters":{"description":"Construct a quarter interval","example":"to_quarters(5)"},"to_seconds":{"description":"Construct a second interval","example":"to_seconds(5.5)"},"to_timestamp":{"description":"Converts secs since epoch to a timestamp with time zone","example":"to_timestamp(1284352323.5)"},"to_weeks":{"description":"Construct a week interval","example":"to_weeks(5)"},"to_years":{"description":"Construct a year interval","example":"to_years(5)"},"trim":{"description":"Removes any spaces from either side of the string.","example":"trim('>>>>test<<', '><')"}}`),t={keywords:e};export{t as default,e as keywords};
|