import{u as I}from"./vue-flow-core-BmD2Nfnb.js";import{e as G,b as A,K as g,y as v,h as i,A as f,D as u,f as y,g as w,j as n,U as B,ac as m}from"./jwt-decode.esm-C2n6WQ0J.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="8a3a54ce-d067-478e-9ef4-1a6031984201",e._sentryDebugIdIdentifier="sentry-dbid-8a3a54ce-d067-478e-9ef4-1a6031984201")}catch{}})();var a=(e=>(e.Lines="lines",e.Dots="dots",e))(a||{});const $=function({dimensions:e,size:o,color:l}){return m("path",{stroke:l,"stroke-width":o,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},p=function({radius:e,color:o}){return m("circle",{cx:e,cy:e,r:e,fill:o})};a.Lines+"",a.Dots+"";const L={[a.Dots]:"#81818a",[a.Lines]:"#eee"},S=["id","x","y","width","height","patternTransform"],E={key:2,height:"100",width:"100"},M=["fill"],O=["x","y","fill"],U={name:"Background",compatConfig:{MODE:3}},N=G({...U,props:{id:{},variant:{default:()=>a.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:o,viewport:l}=I(),s=A(()=>{const t=l.value.zoom,[h,D]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],d=[h*t||1,D*t||1],b=e.size*t,[k,z]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],C=[k*t||1+d[0]/2,z*t||1+d[1]/2];return{scaledGap:d,offset:C,size:b}}),r=g(()=>`pattern-${o}${e.id?`-${e.id}`:""}`),c=g(()=>e.color||e.patternColor||L[e.variant||a.Dots]);return(t,h)=>(i(),v("svg",{class:"vue-flow__background vue-flow__container",style:B({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[f(t.$slots,"pattern-container",{id:r.value},()=>[u("pattern",{id:r.value,x:n(l).x%s.value.scaledGap[0],y:n(l).y%s.value.scaledGap[1],width:s.value.scaledGap[0],height:s.value.scaledGap[1],patternTransform:`translate(-${s.value.offset[0]},-${s.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[f(t.$slots,"pattern",{},()=>[t.variant===n(a).Lines?(i(),y(n($),{key:0,size:t.lineWidth,color:c.value,dimensions:s.value.scaledGap},null,8,["size","color","dimensions"])):t.variant===n(a).Dots?(i(),y(n(p),{key:1,color:c.value,radius:s.value.size/2},null,8,["color","radius"])):w("",!0),t.bgColor?(i(),v("svg",E,[u("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,M)])):w("",!0)])],8,S)]),u("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,O),f(t.$slots,"default",{id:r.value})],4))}});export{N as _};
//# sourceMappingURL=vue-flow-background-D2iKHM0m.js.map
