var __async = (__this, __arguments, generator) => {
  return new Promise((resolve, reject) => {
    var fulfilled = (value) => {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    };
    var rejected = (value) => {
      try {
        step(generator.throw(value));
      } catch (e) {
        reject(e);
      }
    };
    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
    step((generator = generator.apply(__this, __arguments)).next());
  });
};

// index.ts
import * as rrweb from "rrweb";
console.log("react-scanner-client");
window.getReactDomComponent = function(dom) {
  console.log("getReactDomComponent", dom);
  const internalInstance = (
    // @ts-ignore
    dom[Object.keys(dom != null ? dom : {}).find((key) => key.startsWith("__react"))]
  );
  if (!internalInstance)
    return null;
  return {
    internalInstance,
    props: internalInstance.memoizedProps,
    state: internalInstance.memoizedState
  };
};
var events = [];
var stop = rrweb.record({
  emit(event) {
    events.push(event);
  }
});
setInterval(() => {
  console.log({ events });
}, 1e3);
function init() {
  return __async(this, null, function* () {
    console.log("rrweb", rrweb);
    let events2 = [];
    const stop2 = rrweb.record({
      emit(event) {
        events2.push(event);
      }
    });
    setInterval(() => {
      console.log({ events: events2 });
    }, 1e3);
  });
}
var react_scanner_client_default = init;
var add = (a, b) => {
  return a + b;
};
export {
  add,
  react_scanner_client_default as default
};
