import{Presence as r}from"../types.js";var t={measureLayout:function(r){return r.updateLayoutMeasurement()},layoutReady:function(r){return r.notifyLayoutReady()}};function e(){var e=new Set;return{add:function(r){return e.add(r)},flush:function(n){var o=void 0===n?t:n,a=o.measureLayout,u=o.layoutReady,f=o.parent,c=Array.from(e).sort((function(r,t){return r.depth-t.depth})),i=function(){c.forEach((function(r){return r.resetTransform()})),c.forEach(a)};f?f.withoutTransform(i):i(),c.forEach(u),c.forEach((function(t){t.isPresent&&(t.presence=r.Present)})),e.clear()}}}export{e as createBatcher};
//# sourceMappingURL=batcher.js.map
