import{__rest as r,__assign as t}from"../../../../node_modules/tslib/tslib.es6.js";import{getBoundingBox as e}from"../dom/projection/measure.js";import{getDefaultValueType as o}from"../dom/utils/value-types.js";import{getOrigin as s,checkTargetForNewValues as i}from"../utils/setters.js";import{isTransformProp as n}from"./utils/transform.js";import{isCSSVariable as a}from"../dom/utils/is-css-variable.js";import{buildHTMLStyles as m}from"./utils/build-styles.js";import{visualElement as l}from"../index.js";import{scrapeMotionValuesFromProps as u}from"./utils/scrape-motion-values.js";import{parseDomVariant as f}from"../dom/utils/parse-dom-variant.js";function d(r){return window.getComputedStyle(r)}var v={treeType:"dom",readValueFromInstance:function(r,t){if(n(t)){var e=o(t);return e&&e.default||0}var s=d(r);return(a(t)?s.getPropertyValue(t):s[t])||0},sortNodePosition:function(r,t){return 2&r.compareDocumentPosition(t)?1:-1},getBaseTarget:function(r,t){var e;return null===(e=r.style)||void 0===e?void 0:e[t]},measureViewportBox:function(r,t){var o=t.transformPagePoint;return e(r,o)},resetTransform:function(r,t,e){r.suspendHoverEvents();var o=e.transformTemplate;t.style.transform=o?o({},""):"none",r.scheduleRender()},restoreTransform:function(r,t){r.style.transform=t.style.transform},removeValueFromRenderState:function(r,t){var e=t.vars,o=t.style;delete e[r],delete o[r]},makeTargetAnimatable:function(e,o,n,a){var m=n.transformValues;void 0===a&&(a=!0);var l=o.transition,u=o.transitionEnd,d=r(o,["transition","transitionEnd"]),v=s(d,l||{},e);if(m&&(u&&(u=m(u)),d&&(d=m(d)),v&&(v=m(v))),a){i(e,d,v);var p=f(e,d,v,u);u=p.transitionEnd,d=p.target}return t({transition:l,transitionEnd:u},d)},scrapeMotionValuesFromProps:u,build:function(r,t,e,o,s,i,n){void 0!==r.isVisible&&(t.style.visibility=r.isVisible?"visible":"hidden"),m(t,e,o,s,i,n.transformTemplate)},render:function(r,t){var e=t.style,o=t.vars;for(var s in Object.assign(r.style,e),o)r.style.setProperty(s,o[s])}},p=l(v);export{d as getComputedStyle,v as htmlConfig,p as htmlVisualElement};
//# sourceMappingURL=visual-element.js.map
