import { a2 as push, ap as push_element, ar as pop_element, a4 as pop, au as validate_snippet_args, a0 as FILENAME } from './exports-5bDEyudc.js';
import { p as prevent_snippet_stringification } from './validate-DIfOr8HB.js';
import { F as Form, I as Input, B as Button } from './Tabs.svelte_svelte_type_style_lang-Dnl7UCWg.js';
import { g as globalState } from './globalState.svelte-DvsudVyF.js';
import { g as goto } from './client-CmENaDmn.js';
import { p as page } from './index2-Chi8GOpd.js';
import './utils2-BNPuf_o4.js';

_page[FILENAME] = "src/routes/sign-up/+page.svelte";
function _page($$payload, $$props) {
  push(_page);
  const CLIENT_PW_MIN_LENGTH = 8;
  $$payload.out.push(`<div class="grid gap.4">`);
  push_element($$payload, "div", 10, 0);
  $$payload.out.push(`<h1>`);
  push_element($$payload, "h1", 11, 2);
  $$payload.out.push(`Sign Up</h1>`);
  pop_element();
  $$payload.out.push(` <p>`);
  push_element($$payload, "p", 13, 2);
  $$payload.out.push(`NOTE: Registration is currently only open for private beta users, but feel
    free to use this registration form to be added to the waitlist.</p>`);
  pop_element();
  $$payload.out.push(` `);
  {
    let content = function($$payload2, form) {
      validate_snippet_args($$payload2);
      Input($$payload2, { label: "Name", name: "name", required: true });
      $$payload2.out.push(`<!----> `);
      Input($$payload2, { label: "Email", name: "email", type: "email", required: true });
      $$payload2.out.push(`<!----> `);
      Input($$payload2, {
        label: "Password",
        name: "password",
        type: "password",
        required: true,
        minlength: CLIENT_PW_MIN_LENGTH
      });
      $$payload2.out.push(`<!----> `);
      Input($$payload2, {
        label: "Repeat Password",
        name: "repeatPassword",
        type: "password",
        required: true,
        minlength: CLIENT_PW_MIN_LENGTH
      });
      $$payload2.out.push(`<!----> <div>`);
      push_element($$payload2, "div", 48, 6);
      Button($$payload2, {
        type: "submit",
        loading: form.isLoading,
        children: prevent_snippet_stringification(($$payload3) => {
          $$payload3.out.push(`<!---->Submit`);
        }),
        $$slots: { default: true }
      });
      $$payload2.out.push(`<!----></div>`);
      pop_element();
    };
    prevent_snippet_stringification(content);
    Form($$payload, {
      class: "d.contents",
      onresponse: (r) => {
        if (r.result.error) {
          alert(r.result.error.message);
          return;
        }
        globalState.user = r.result.data?.user;
        page.url.searchParams.get("goto");
        return goto();
      },
      content,
      $$slots: { content: true }
    });
  }
  $$payload.out.push(`<!----></div>`);
  pop_element();
  pop();
}
_page.render = function() {
  throw new Error("Component.render(...) is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information");
};

export { _page as default };
//# sourceMappingURL=_page.svelte-CUP7qFFF.js.map
