import"./Shape-CEkNHJX3.js";import{t as h}from"./debounce-Xd493GvO.js";import{_ as x,k as X}from"./index-M_JNBppB.js";import{az as Y,aA as _,r as Z,ax as S,c as d,w as V,B as l,z as s,M as b,a7 as w,y as z,W as j,H as B,J as C}from"./vue-BJk78QHK.js";import"./runAnimation-C0hyQ0Cy.js";import"./element-3_pOinej.js";import"./utils-YI6ye1sf.js";import"./threejs-BafxXW5-.js";import"./vxe-Dx3zSILm.js";const M=Object.assign({name:"Group"},{__name:"Group",props:Y({element:{type:Object,default:()=>{}}},{propValue:{},propValueModifiers:{}}),emits:["update:propValue"],setup(p,{expose:f}){const c=p,m=_(p,"propValue"),u=Z(0),g=S(),v=d(()=>g.state.curComponent),$=d(()=>{const e=c.element.style.width,n=c.element.style.height;return{width:e,height:n}});V($,h(e=>{u.value++},500),{deep:!0});function i(e={},n=[],r=""){const o=["fontSize"],a={};return typeof e!="object"||e===null||(a.transform=`
    perspective(${e.perspective!==void 0?e.perspective:0}px)
    rotateX(${e.rotateX!==void 0?e.rotateX:0}deg)
    rotateY(${e.rotateY!==void 0?e.rotateY:0}deg)
    rotateZ(${r==="edit"?0:e.rotate!==void 0?e.rotate:0}deg)
    translateZ(${e.translateZ!==void 0?e.translateZ:0}px)
    translateX(${e.translateX!==void 0?e.translateX:0}px)
    translateY(${e.translateY!==void 0?e.translateY:0}px)
    scaleZ(${e.scaleZ!==void 0?e.scaleZ:1})
    scaleX(${e.scaleX!==void 0?e.scaleX:1})
    scaleY(${e.scaleY!==void 0?e.scaleY:1})
  `,a["transform-origin"]="center center",a["transform-style"]="preserve-3d",Object.keys(e).forEach(t=>{n.includes(t)||t!=="rotate"&&t!=="rotateX"&&t!=="rotateY"&&t!=="rotateZ"&&t!=="transform-origin"&&t!=="perspective"&&t!=="scaleY"&&t!=="scaleX"&&t!=="scaleZ"&&e&&t in e&&e[t]!==""&&(a[t]=e[t],o.includes(t)&&!String(a[t]).includes("px")&&(a[t]+="px"))})),a}return f({getShapeStyle:X,getStyle:i}),(e,n)=>(s(),l("div",{key:u.value,class:"group"},[(s(!0),l(b,null,w(m.value,(r,o)=>{var a;return s(),z(C(r.component),{id:`component${r.id}`,key:`group${o}${r.style.opacity}`,class:B([{active:((a=v.value)==null?void 0:a.id)===r.id},"component"]),style:j(i(r.groupStyle)),"prop-value":r.propValue,element:r,editorpage:!0,request:r.request},null,8,["id","class","style","prop-value","element","request"])}),128))]))}}),I=x(M,[["__scopeId","data-v-a90a4bc1"]]);export{I as default};
