import { createElement as h, startTransition, StrictMode } from "react";import { hydrateRoot } from "react-dom/client";
const requestIdleCallbackUltra = (typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window)) || function (cb) { const start = Date.now(); return setTimeout(function () { cb({ didTimeout: false, timeRemaining() { return Math.max(0, 50 - (Date.now() - start)); }, }); }, 1); };
export default function hydrate(container, element, options) { requestIdleCallbackUltra(() => { startTransition(() => { hydrateRoot( container, h(StrictMode, { children: element }), options, ); }); });}