import{sortTransformProps as r}from"./transform.js";import{zeroLayout as t}from"../../utils/state.js";var a={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function e(t,e,n,o){var i=t.transform,s=t.transformKeys,l=e.enableHardwareAcceleration,v=void 0===l||l,f=e.allowTransformNone,c=void 0===f||f,m="";s.sort(r);for(var d=!1,u=s.length,p=0;p<u;p++){var x=s[p];m+=(a[x]||x)+"("+i[x]+") ","z"===x&&(d=!0)}return!d&&v?m+="translateZ(0)":m=m.trim(),o?m=o(i,n?"":m):c&&n&&(m="none"),m}function n(r){var t=r.originX,a=void 0===t?"50%":t,e=r.originY,n=void 0===e?"50%":e,o=r.originZ;return a+" "+n+" "+(void 0===o?0:o)}function o(r,t,a){var e=r.x,n=r.y,o="translate3d("+e.translate/t.x+"px, "+n.translate/t.y+"px, 0) ";if(a){var i=a.rotate,l=a.rotateX,v=a.rotateY;i&&(o+="rotate("+i+") "),l&&(o+="rotateX("+l+") "),v&&(o+="rotateY("+v+") ")}return o+="scale("+e.scale+", "+n.scale+")",a||o!==s?o:""}function i(r){var t=r.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var s=o(t.delta,t.treeScale,{x:1,y:1});export{o as buildLayoutProjectionTransform,i as buildLayoutProjectionTransformOrigin,e as buildTransform,n as buildTransformOrigin,s as identityProjection};
//# sourceMappingURL=build-transform.js.map
