import{u as z}from"./index.4ad7e52d.js";import{d as k,c as C,bz as v,o as i,a5 as y,a7 as f,e as c,u as s,a as w,h as b,a6 as I,H as m}from"./jwt-decode.esm.c1356de1.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]="ebd1c689-be96-4a93-a8e9-0b43e17ef13e",e._sentryDebugIdIdentifier="sentry-dbid-ebd1c689-be96-4a93-a8e9-0b43e17ef13e")}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]}`})},D=function({radius:e,color:o}){return m("circle",{cx:e,cy:e,r:e,fill:o})};a.Lines+"",a.Dots+"";const G={[a.Dots]:"#81818a",[a.Lines]:"#eee"},B=["id","x","y","width","height","patternTransform"],L={key:2,height:"100",width:"100"},S=["fill"],E=["x","y","fill"],M={name:"Background",compatConfig:{MODE:3}},A=k({...M,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:2}},setup(e){const{id:o,viewport:l}=z(),n=C(()=>{const[t,g]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],d=[t*l.value.zoom||1,g*l.value.zoom||1],u=e.size*l.value.zoom,p=e.variant===a.Dots?[u/e.offset,u/e.offset]:[d[0]/e.offset,d[1]/e.offset];return{scaledGap:d,offset:p,size:u}}),r=v(()=>`pattern-${o}${e.id?`-${e.id}`:""}`),h=v(()=>e.color||e.patternColor||G[e.variant||a.Dots]);return(t,g)=>(i(),y("svg",{class:"vue-flow__background vue-flow__container",style:I({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[f(t.$slots,"pattern-container",{id:r.value},()=>[c("pattern",{id:r.value,x:s(l).x%n.value.scaledGap[0],y:s(l).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[f(t.$slots,"pattern",{},()=>[t.variant===s(a).Lines?(i(),w(s($),{key:0,size:t.lineWidth,color:h.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):t.variant===s(a).Dots?(i(),w(s(D),{key:1,color:h.value,radius:n.value.size/t.offset},null,8,["color","radius"])):b("",!0),t.bgColor?(i(),y("svg",L,[c("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,S)])):b("",!0)])],8,B)]),c("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,E),f(t.$slots,"default",{id:r.value})],4))}});export{A as _};
//# sourceMappingURL=vue-flow-background.012535a1.js.map
