import { c as config } from './config-BHx687w1.js'; import './index-Ddp2AB5f.js'; import './stores-Cv0rQqhp.js'; import './index-CUXxL1oq.js'; import { s as superValidate, z as zod, f as fail } from './zod-D1iX83g6.js'; import { f as formSchema } from './schema-BQhPA6Gl.js'; import './shared-server-i79vVjEm.js'; import './lifecycle-px-3doLe.js'; import './exports-DuWZopOC.js'; import './index2-D4yenS_5.js'; import './stringify-D5iWhcfN.js'; import './scheduler-1Ju9dhbL.js'; import 'zod'; const actions = { default: async (event) => { const form = await superValidate(event, zod(formSchema)); if (!form.valid) { return fail(400, { form }); } await event.fetch(config.api_url + "/blog/signup", { method: "POST", body: JSON.stringify({ email: form.data.email, site_id: event.params.site_id, source: extractSlug(form.data.source) }), headers: { "content-type": "application/json" } }); return { form }; } }; function extractSlug(url) { const path = new URL(url).pathname; const parts = path.split("/").filter((x) => x); return parts[3]; } var _page_server = /*#__PURE__*/Object.freeze({ __proto__: null, actions: actions }); const index = 9; let component_cache; const component = async () => component_cache ??= (await import('./_page.svelte-Cge_lzPV.js')).default; const server_id = "src/routes/site/[site_id]/+page.server.js"; const imports = ["_app/immutable/nodes/9.e6ud5F9Z.js","_app/immutable/chunks/scheduler.TiWp2jL2.js","_app/immutable/chunks/each.BM-upbTq.js","_app/immutable/chunks/index.BGG1x4jY.js"]; const stylesheets = []; const fonts = []; export { component, fonts, imports, index, _page_server as server, server_id, stylesheets }; //# sourceMappingURL=9-DePxtqzy.js.map