(function(s,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react"),require("@wix/builder-state-react")):typeof define=="function"&&define.amd?define(["exports","react","@wix/builder-state-react"],n):(s=typeof globalThis<"u"?globalThis:s||self,n(s["Builder-velo-react"]={},s.React,s.builderStateReact))})(this,function(s,n,u){"use strict";const l=t=>{if(!(t instanceof Promise))return;const e=t;switch(e.status){case"pending":throw e;case"fulfilled":return;case"rejected":throw e.reason;default:throw e.status="pending",e.then(r=>{e.status="fulfilled",e.value=r},r=>{e.status="rejected",e.reason=r}),e}},a=({onReadyPromise:t,children:e})=>(l(t),n.createElement(n.Fragment,null,e)),i=({fallback:t,onReadyPromise:e,children:r})=>n.createElement(n.Suspense,{fallback:t},n.createElement(a,{onReadyPromise:e},r)),c=(t,e)=>{const r=Object.keys(t);return r.length===Object.keys(e).length&&r.every(o=>t[o]===e[o])},d=n.memo(({props:t,onPropsChanged:e})=>{const r=n.useRef(null);return r.current&&e(r.current,t),r.current=t,null},(t,e)=>c(t.props,e.props)),p=({children:t,fallback:e,appDefinitionId:r,invokeOnPropsChanged:o,invokeOnReady:m,...h})=>{const w=n.useMemo(()=>m(),[]);return n.createElement(i,{onReadyPromise:w,fallback:e},n.createElement(d,{onPropsChanged:o,props:h}),t)},f=t=>e=>{const[r={},o]=u.useStateOverrides(e.nickname);return o?null:n.createElement(t,{...e,...r})};s.SuspenseWrapper=i,s.VeloRuntime=p,s.withVelo=f,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
//# sourceMappingURL=builder-velo-react.js.map