import {
  require_client
} from "/build/_shared/chunk-SKARZQ6Y.js";
import "/build/_shared/chunk-Q4RXG3XC.js";
import {
  require_jsx_dev_runtime
} from "/build/_shared/chunk-D5XSJF2M.js";
import {
  RemixBrowser,
  init_esm2 as init_esm
} from "/build/_shared/chunk-VJFCZKPM.js";
import "/build/_shared/chunk-OCFPP4X2.js";
import {
  require_react
} from "/build/_shared/chunk-HWKMUXRS.js";
import {
  Routes
} from "/build/_shared/chunk-5222SY3A.js";
import {
  createHotContext,
  init_remix_hmr
} from "/build/_shared/chunk-4FTV3JJX.js";
import "/build/_shared/chunk-YLRAJVC6.js";
import {
  __toESM
} from "/build/_shared/chunk-RODUX5XG.js";

// app/entry.client.tsx
init_remix_hmr();
init_esm();
var import_react2 = __toESM(require_react(), 1);
var import_client = __toESM(require_client(), 1);
var import_jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
if (!window.$RefreshReg$ || !window.$RefreshSig$ || !window.$RefreshRuntime$) {
  console.warn("remix:hmr: React Fast Refresh only works when the Remix compiler is running in development mode.");
} else {
  prevRefreshReg = window.$RefreshReg$;
  prevRefreshSig = window.$RefreshSig$;
  window.$RefreshReg$ = (type, id) => {
    window.$RefreshRuntime$.register(type, '"app/entry.client.tsx"' + id);
  };
  window.$RefreshSig$ = window.$RefreshRuntime$.createSignatureFunctionForTransform;
}
var prevRefreshReg;
var prevRefreshSig;
var _s = $RefreshSig$();
var _s2 = $RefreshSig$();
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/entry.client.tsx"
  );
  import.meta.hot.lastModified = "1711693820122.0837";
}
function PosthogInit() {
  _s();
  (0, import_react2.useEffect)(() => {
    if (false) {
      posthog.init("phc_iZ0VLonpOMLBi7z9cljlvKHXODB1udna8oQbtFDlBbQ", {
        api_host: "https://app.posthog.com"
      });
    }
  }, []);
  return null;
}
_s(PosthogInit, "OD7bBpZva5O2jO+Puf00hKivP7c=");
_c = PosthogInit;
function CookieTZInit() {
  _s2();
  (0, import_react2.useEffect)(() => {
    const setTimeZoneCookie = async () => {
      const timezoneCookie = document.cookie.split("; ").find((row) => row.startsWith("timezone="));
      if (!timezoneCookie) {
        const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
        try {
          await fetch(Routes.actions.setTZ, {
            method: "POST",
            headers: {
              "Content-Type": "application/json"
            },
            body: JSON.stringify({
              timezone
            })
          });
        } catch (error) {
          console.error("Error setting timezone", error);
        }
      }
    };
    void setTimeZoneCookie();
  }, []);
  return null;
}
_s2(CookieTZInit, "OD7bBpZva5O2jO+Puf00hKivP7c=");
_c2 = CookieTZInit;
(0, import_react2.startTransition)(() => {
  (0, import_client.hydrateRoot)(document, /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(import_react2.StrictMode, { children: [
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(RemixBrowser, {}, void 0, false, {
      fileName: "app/entry.client.tsx",
      lineNumber: 74,
      columnNumber: 7
    }, this),
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(PosthogInit, {}, void 0, false, {
      fileName: "app/entry.client.tsx",
      lineNumber: 75,
      columnNumber: 7
    }, this),
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(CookieTZInit, {}, void 0, false, {
      fileName: "app/entry.client.tsx",
      lineNumber: 76,
      columnNumber: 7
    }, this)
  ] }, void 0, true, {
    fileName: "app/entry.client.tsx",
    lineNumber: 73,
    columnNumber: 25
  }, this));
});
var _c;
var _c2;
$RefreshReg$(_c, "PosthogInit");
$RefreshReg$(_c2, "CookieTZInit");
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;
//# sourceMappingURL=/build/entry.client-ET5HE643.js.map
