import{u as d,b as y,R as e,r as f,g as P}from"./index-Bm2SqMk3.js";async function B(r,c){const{height:g,id:l}=r,{overrideHeight:h}=c,u=d.getContainingView(r),{offsetPx:E,roundedDynamicBlocks:p,width:w}=u,x=await Promise.all(p.map(async t=>{const o=y.create({key:t.key,region:t}),n=r.regionCannotBeRenderedText(t)||r.regionCannotBeRendered(t);if(n)return[t,{reactElement:e.createElement(e.Fragment,null,e.createElement("rect",{x:0,y:0,width:w,height:20,fill:"#aaa"}),e.createElement("text",{x:0,y:15},n))}];const{rpcManager:s,renderArgs:m,renderProps:a,rendererType:i}=f(o,r);return[t,await i.renderInClient(s,{...m,...a,viewParams:d.getViewParams(r,!0),exportSVG:c,theme:c.theme||a.theme})]}));return e.createElement(e.Fragment,null,x.map(([t,o],n)=>{const{offsetPx:s,widthPx:m}=t,a=s-E,i=P(l,n);return e.createElement(e.Fragment,{key:`frag-${n}`},e.createElement("defs",null,e.createElement("clipPath",{id:i},e.createElement("rect",{x:0,y:0,width:m,height:h||g}))),e.createElement("g",{transform:`translate(${a} 0)`},e.createElement("g",{clipPath:`url(#${i})`},e.createElement(d.ReactRendering,{rendering:o}))))}))}export{B as renderBaseLinearDisplaySvg};
