This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
var _layout_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null
|
||||
});
|
||||
|
||||
const index = 0;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_layout.svelte-WdtjNdpU.js')).default;
|
||||
const universal_id = "src/routes/+layout.ts";
|
||||
const imports = ["_app/immutable/nodes/0.Cxu0NOCO.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/Bbbv1kr5.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/CeetFYTo.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/CrWOhwmr.js"];
|
||||
const stylesheets = ["_app/immutable/assets/0.B2oeYf4F.css"];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets, _layout_ts as universal, universal_id };
|
||||
//# sourceMappingURL=0-DnWjnlZZ.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"0-DnWjnlZZ.js","sources":["../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["import * as universal from '../entries/pages/_layout.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/+layout.ts\";\nexport const imports = [\"_app/immutable/nodes/0.Cxu0NOCO.js\",\"_app/immutable/chunks/D4nn9Y_6.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/Bbbv1kr5.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/CeetFYTo.js\",\"_app/immutable/chunks/Qgf5A_kA.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/CrWOhwmr.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.B2oeYf4F.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAElG,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChV,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -1,14 +0,0 @@
|
||||
var _layout_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null
|
||||
});
|
||||
|
||||
const index = 0;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_layout.svelte-CBQcLaNr.js')).default;
|
||||
const universal_id = "src/routes/+layout.ts";
|
||||
const imports = ["_app/immutable/nodes/0.BXv9ZfXj.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/hqfhVoHF.js","_app/immutable/chunks/Dexp9pM5.js"];
|
||||
const stylesheets = ["_app/immutable/assets/0.DbRKE6YE.css"];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets, _layout_ts as universal, universal_id };
|
||||
//# sourceMappingURL=0-pFHonfwH.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"0-pFHonfwH.js","sources":["../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["import * as universal from '../entries/pages/_layout.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/+layout.ts\";\nexport const imports = [\"_app/immutable/nodes/0.BXv9ZfXj.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/hqfhVoHF.js\",\"_app/immutable/chunks/Dexp9pM5.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.DbRKE6YE.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAElG,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 1;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./error.svelte--Ra93cKZ.js')).default;
|
||||
const imports = ["_app/immutable/nodes/1.C7nmeG9W.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/Bbbv1kr5.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/CrWOhwmr.js","_app/immutable/chunks/mylYChEY.js","_app/immutable/chunks/CeetFYTo.js","_app/immutable/chunks/iYSIr-5j.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=1-CPj2P69l.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"1-CPj2P69l.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.C7nmeG9W.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/Bbbv1kr5.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/Qgf5A_kA.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/CrWOhwmr.js\",\"_app/immutable/chunks/mylYChEY.js\",\"_app/immutable/chunks/CeetFYTo.js\",\"_app/immutable/chunks/iYSIr-5j.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -1,9 +0,0 @@
|
||||
const index = 1;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./error.svelte-BRgFNICv.js')).default;
|
||||
const imports = ["_app/immutable/nodes/1.BT8sl3NL.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/hqfhVoHF.js","_app/immutable/chunks/Dexp9pM5.js","_app/immutable/chunks/DZmckTjd.js","_app/immutable/chunks/agKGoZF1.js","_app/immutable/chunks/BapE3c1q.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=1-p02jFeMq.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"1-p02jFeMq.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.BT8sl3NL.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/hqfhVoHF.js\",\"_app/immutable/chunks/Dexp9pM5.js\",\"_app/immutable/chunks/DZmckTjd.js\",\"_app/immutable/chunks/agKGoZF1.js\",\"_app/immutable/chunks/BapE3c1q.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,93 @@
|
||||
import { f as fail, r as redirect, e as error } from './index-B2LGyy1l.js';
|
||||
|
||||
const COLLECTION = "Stackq_Items";
|
||||
function parseNum(val) {
|
||||
if (val === "" || val === null || val === void 0) return void 0;
|
||||
const n = Number(val);
|
||||
return Number.isFinite(n) ? n : void 0;
|
||||
}
|
||||
function parseBool(val) {
|
||||
return val === "on" || val === "true" || val === true;
|
||||
}
|
||||
const load = async ({ params, locals }) => {
|
||||
const id = params.id;
|
||||
if (!id) throw error(404, "Item not found");
|
||||
try {
|
||||
const item = await locals.pb.collection(COLLECTION).getOne(id, { expand: "Parent" });
|
||||
const list = await locals.pb.collection(COLLECTION).getFullList({ sort: "-created", expand: "Parent" }).catch(() => []);
|
||||
const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));
|
||||
return { item, itemsForParent };
|
||||
} catch {
|
||||
throw error(404, "Item not found");
|
||||
}
|
||||
};
|
||||
const actions = {
|
||||
update: async ({ request, locals, params }) => {
|
||||
const id = params.id;
|
||||
if (!id) return fail(400, { error: "Missing id", form: "update" });
|
||||
const form = await request.formData();
|
||||
const Item = form.get("Item")?.trim() ?? "";
|
||||
const SKU = form.get("SKU")?.trim() ?? "";
|
||||
const Description = form.get("Description")?.trim() ?? "";
|
||||
const UOM = form.get("UOM")?.trim() ?? "";
|
||||
const Cost = parseNum(form.get("Cost"));
|
||||
const Vendor = form.get("Vendor")?.trim() ?? "";
|
||||
const Catagory = form.get("Catagory")?.trim() ?? "";
|
||||
const Sub_Catagory = form.get("Sub_Catagory")?.trim() ?? "";
|
||||
const Has_Parent = parseBool(form.get("Has_Parent"));
|
||||
const Parent = form.get("Parent")?.trim() ?? "";
|
||||
const Stock = parseBool(form.get("Stock"));
|
||||
const Image = form.get("Image");
|
||||
const imageFile = Image && Image.size > 0 ? Image : void 0;
|
||||
if (!Item) return fail(400, { error: "Item name is required", form: "update" });
|
||||
try {
|
||||
const body = {
|
||||
Item,
|
||||
SKU,
|
||||
Description,
|
||||
UOM: UOM || void 0,
|
||||
Cost: Cost ?? 0,
|
||||
Vendor,
|
||||
Catagory: Catagory || void 0,
|
||||
Sub_Catagory: Sub_Catagory || void 0,
|
||||
Has_Parent: !!Has_Parent,
|
||||
Parent: Parent || null,
|
||||
Stock: !!Stock
|
||||
};
|
||||
if (imageFile) body.Image = imageFile;
|
||||
await locals.pb.collection(COLLECTION).update(id, body);
|
||||
} catch (e) {
|
||||
const message = e && typeof e === "object" && "message" in e ? String(e.message) : "Update failed";
|
||||
return fail(500, { error: message, form: "update" });
|
||||
}
|
||||
return { success: true };
|
||||
},
|
||||
delete: async ({ locals, params }) => {
|
||||
const id = params.id;
|
||||
if (!id) return fail(400, { error: "Missing id", form: "delete" });
|
||||
try {
|
||||
await locals.pb.collection(COLLECTION).delete(id);
|
||||
} catch (e) {
|
||||
const message = e && typeof e === "object" && "message" in e ? String(e.message) : "Delete failed";
|
||||
return fail(500, { error: message, form: "delete" });
|
||||
}
|
||||
throw redirect(303, "/items");
|
||||
}
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
actions: actions,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 10;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-BsXYacKi.js')).default;
|
||||
const server_id = "src/routes/items/[id]/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/10.Bk0Y3XDZ.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/BR6tTwie.js","_app/immutable/chunks/Cf_fsnlT.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/CCY2d7sc.js","_app/immutable/chunks/mylYChEY.js","_app/immutable/chunks/CeetFYTo.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/BzfwckE1.js","_app/immutable/chunks/CBjBL7Hz.js","_app/immutable/chunks/Cr7vHN1I.js","_app/immutable/chunks/C3TONo7J.js","_app/immutable/chunks/D4nn9Y_6.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=10-SJ35hfdn.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -36,13 +36,13 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 5;
|
||||
const index = 11;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-3rk2vnq3.js')).default;
|
||||
const server_id = "src/routes/login/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/5.u4tkKrg-.js","_app/immutable/chunks/CRDN6Mh7.js","_app/immutable/chunks/Dexp9pM5.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/DcVg5zjO.js","_app/immutable/chunks/25AjRaeI.js"];
|
||||
const imports = ["_app/immutable/nodes/11.CjZazW5Z.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/BHRsrugl.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/Cf_fsnlT.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=5-BEJSjzl2.js.map
|
||||
//# sourceMappingURL=11-DmkTZ8Z7.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"11-DmkTZ8Z7.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/login/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/11.js"],"sourcesContent":["import { fail, redirect } from \"@sveltejs/kit\";\nfunction safeRedirectTo(searchParams) {\n const to = searchParams.get(\"redirectTo\");\n if (!to || typeof to !== \"string\") return \"/items\";\n if (!to.startsWith(\"/\") || to.startsWith(\"//\")) return \"/items\";\n return to;\n}\nconst load = ({ url, locals }) => {\n if (locals.user) {\n throw redirect(303, safeRedirectTo(url.searchParams));\n }\n};\nconst actions = {\n login: async ({ request, locals, url }) => {\n const data = await request.formData();\n const email = data.get(\"email\")?.trim() ?? \"\";\n const password = data.get(\"password\") ?? \"\";\n if (!email || !password) {\n return fail(400, { error: \"Email and password are required.\", email });\n }\n try {\n await locals.pb.collection(\"users\").authWithPassword(email, password);\n } catch (err) {\n const message = err && typeof err === \"object\" && \"message\" in err ? String(err.message) : \"Invalid email or password.\";\n return fail(401, { error: message, email });\n }\n const redirectTo = safeRedirectTo(url.searchParams);\n throw redirect(303, redirectTo);\n }\n};\nexport {\n actions,\n load\n};\n","import * as server from '../entries/pages/login/_page.server.ts.js';\n\nexport const index = 11;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/login/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/login/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/11.CjZazW5Z.js\",\"_app/immutable/chunks/D4nn9Y_6.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/BHRsrugl.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/Cf_fsnlT.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC;AAC3C,EAAE,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,OAAO,QAAQ;AACpD,EAAE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,QAAQ;AACjE,EAAE,OAAO,EAAE;AACX;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK;AAClC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE;AACnB,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACzD,EAAE;AACF,CAAC;AACD,MAAM,OAAO,GAAG;AAChB,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC7C,IAAI,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;AACjD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;AAC/C,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE;AAC7B,MAAM,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,CAAC;AAC5E,IAAI;AACJ,IAAI,IAAI;AACR,MAAM,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC3E,IAAI,CAAC,CAAC,OAAO,GAAG,EAAE;AAClB,MAAM,MAAM,OAAO,GAAG,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,4BAA4B;AAC7H,MAAM,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACjD,IAAI;AACJ,IAAI,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC;AACvD,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;AACnC,EAAE;AACF,CAAC;;;;;;;;AC3BW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE;AAEtG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,qCAAqC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACzQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -2,7 +2,7 @@ const COLLECTION = "Stackq_Items";
|
||||
const load = async ({ locals }) => {
|
||||
const list = await locals.pb.collection(COLLECTION).getFullList({ sort: "-created", expand: "Parent" }).catch(() => []);
|
||||
const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));
|
||||
return { itemsForParent };
|
||||
return { items: list, itemsForParent };
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
@@ -12,11 +12,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
|
||||
const index = 2;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-BBZV9Anf.js')).default;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-DGoi0dKh.js')).default;
|
||||
const server_id = "src/routes/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/2.OkkHA0lV.js","_app/immutable/chunks/CRDN6Mh7.js","_app/immutable/chunks/Dexp9pM5.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/hqfhVoHF.js","_app/immutable/chunks/DcVg5zjO.js","_app/immutable/chunks/B12dZE2q.js","_app/immutable/chunks/BKSreT2u.js","_app/immutable/chunks/agKGoZF1.js","_app/immutable/chunks/jOLfEXYH.js"];
|
||||
const imports = ["_app/immutable/nodes/2.DgrjDafZ.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/BHRsrugl.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/Cf_fsnlT.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=2-CIfUOxeL.js.map
|
||||
//# sourceMappingURL=2-BkZHtq_F.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"2-BkZHtq_F.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["const COLLECTION = \"Stackq_Items\";\nconst load = async ({ locals }) => {\n const list = await locals.pb.collection(COLLECTION).getFullList({ sort: \"-created\", expand: \"Parent\" }).catch(() => []);\n const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));\n return { items: list, itemsForParent };\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/_page.server.ts.js';\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/2.DgrjDafZ.js\",\"_app/immutable/chunks/D4nn9Y_6.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/BHRsrugl.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/Cf_fsnlT.js\",\"_app/immutable/chunks/BkOB8zes.js\",\"_app/immutable/chunks/Dw-PWoyz.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/Bysmuwvg.js\",\"_app/immutable/chunks/iYSIr-5j.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,cAAc;AACjC,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK;AACnC,EAAE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;AACzH,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAClF,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE;AACxC,CAAC;;;;;;;ACHW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAEhG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5b,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"2-CIfUOxeL.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["const COLLECTION = \"Stackq_Items\";\nconst load = async ({ locals }) => {\n const list = await locals.pb.collection(COLLECTION).getFullList({ sort: \"-created\", expand: \"Parent\" }).catch(() => []);\n const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));\n return { itemsForParent };\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/_page.server.ts.js';\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/2.OkkHA0lV.js\",\"_app/immutable/chunks/CRDN6Mh7.js\",\"_app/immutable/chunks/Dexp9pM5.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/hqfhVoHF.js\",\"_app/immutable/chunks/DcVg5zjO.js\",\"_app/immutable/chunks/B12dZE2q.js\",\"_app/immutable/chunks/BKSreT2u.js\",\"_app/immutable/chunks/agKGoZF1.js\",\"_app/immutable/chunks/jOLfEXYH.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,cAAc;AACjC,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,KAAK;AACnC,EAAE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;AACzH,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAClF,EAAE,OAAO,EAAE,cAAc,EAAE;AAC3B,CAAC;;;;;;;ACHW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAEhG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,19 @@
|
||||
const load = async () => {
|
||||
return { receipts: [] };
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 3;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-BKSoWKy6.js')).default;
|
||||
const server_id = "src/routes/receipts/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/3.Db4iBzV-.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/BR6tTwie.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/BzfwckE1.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=3-cCn0mqix.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"3-cCn0mqix.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/receipts/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["const load = async () => {\n return { receipts: [] };\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/receipts/_page.server.ts.js';\n\nexport const index = 3;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/receipts/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/receipts/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/3.Db4iBzV-.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/Qgf5A_kA.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/BR6tTwie.js\",\"_app/immutable/chunks/CgtTdn_a.js\",\"_app/immutable/chunks/Dw-PWoyz.js\",\"_app/immutable/chunks/BkOB8zes.js\",\"_app/immutable/chunks/Bysmuwvg.js\",\"_app/immutable/chunks/iYSIr-5j.js\",\"_app/immutable/chunks/BzfwckE1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,YAAY;AACzB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;AACzB,CAAC;;;;;;;ACAW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA2C,CAAC,EAAE;AAEzG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChe,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 4;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-B3y30gHG.js')).default;
|
||||
const imports = ["_app/immutable/nodes/4._j5PA9Ai.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/Bbbv1kr5.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/BzfwckE1.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=4-BCRSHdes.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"4-BCRSHdes.js","sources":["../../../.svelte-kit/adapter-node/nodes/4.js"],"sourcesContent":["\n\nexport const index = 4;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/receipts/new/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/4._j5PA9Ai.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/Bbbv1kr5.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/CgtTdn_a.js\",\"_app/immutable/chunks/BkOB8zes.js\",\"_app/immutable/chunks/Dw-PWoyz.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/Bysmuwvg.js\",\"_app/immutable/chunks/iYSIr-5j.js\",\"_app/immutable/chunks/BzfwckE1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA+C,CAAC,EAAE;AAC7G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5b,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"5-BEJSjzl2.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/login/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["import { fail, redirect } from \"@sveltejs/kit\";\nfunction safeRedirectTo(searchParams) {\n const to = searchParams.get(\"redirectTo\");\n if (!to || typeof to !== \"string\") return \"/items\";\n if (!to.startsWith(\"/\") || to.startsWith(\"//\")) return \"/items\";\n return to;\n}\nconst load = ({ url, locals }) => {\n if (locals.user) {\n throw redirect(303, safeRedirectTo(url.searchParams));\n }\n};\nconst actions = {\n login: async ({ request, locals, url }) => {\n const data = await request.formData();\n const email = data.get(\"email\")?.trim() ?? \"\";\n const password = data.get(\"password\") ?? \"\";\n if (!email || !password) {\n return fail(400, { error: \"Email and password are required.\", email });\n }\n try {\n await locals.pb.collection(\"users\").authWithPassword(email, password);\n } catch (err) {\n const message = err && typeof err === \"object\" && \"message\" in err ? String(err.message) : \"Invalid email or password.\";\n return fail(401, { error: message, email });\n }\n const redirectTo = safeRedirectTo(url.searchParams);\n throw redirect(303, redirectTo);\n }\n};\nexport {\n actions,\n load\n};\n","import * as server from '../entries/pages/login/_page.server.ts.js';\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/login/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/login/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/5.u4tkKrg-.js\",\"_app/immutable/chunks/CRDN6Mh7.js\",\"_app/immutable/chunks/Dexp9pM5.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/DcVg5zjO.js\",\"_app/immutable/chunks/25AjRaeI.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC;AAC3C,EAAE,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,OAAO,QAAQ;AACpD,EAAE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,QAAQ;AACjE,EAAE,OAAO,EAAE;AACX;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK;AAClC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE;AACnB,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACzD,EAAE;AACF,CAAC;AACD,MAAM,OAAO,GAAG;AAChB,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC7C,IAAI,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;AACjD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;AAC/C,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE;AAC7B,MAAM,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,CAAC;AAC5E,IAAI;AACJ,IAAI,IAAI;AACR,MAAM,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC3E,IAAI,CAAC,CAAC,OAAO,GAAG,EAAE;AAClB,MAAM,MAAM,OAAO,GAAG,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,4BAA4B;AAC7H,MAAM,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACjD,IAAI;AACJ,IAAI,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC;AACvD,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;AACnC,EAAE;AACF,CAAC;;;;;;;;AC3BW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE;AAEtG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpO,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 5;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-yq5AuaSQ.js')).default;
|
||||
const imports = ["_app/immutable/nodes/5.C8BgfNn-.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/BzfwckE1.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=5-nPlzqYVr.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"5-nPlzqYVr.js","sources":["../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/receipts/_id_/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/5.C8BgfNn-.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/Qgf5A_kA.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/CgtTdn_a.js\",\"_app/immutable/chunks/BkOB8zes.js\",\"_app/immutable/chunks/Dw-PWoyz.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/Bysmuwvg.js\",\"_app/immutable/chunks/iYSIr-5j.js\",\"_app/immutable/chunks/BzfwckE1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAgD,CAAC,EAAE;AAC9G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5b,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -10,11 +10,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 3;
|
||||
const index = 6;
|
||||
const server_id = "src/routes/logout/+page.server.ts";
|
||||
const imports = [];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=3-DEGBOxIZ.js.map
|
||||
//# sourceMappingURL=6-B7vtizRa.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"3-DEGBOxIZ.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/logout/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nconst load = ({ locals }) => {\n locals.pb.authStore.clear();\n throw redirect(303, \"/login\");\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/logout/_page.server.ts.js';\n\nexport const index = 3;\nexport { server };\nexport const server_id = \"src/routes/logout/+page.server.ts\";\nexport const imports = [];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK;AAC7B,EAAE,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE;AAC7B,EAAE,MAAM,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC/B,CAAC;;;;;;;ACFW,MAAC,KAAK,GAAG;AAET,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG;AACX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
{"version":3,"file":"6-B7vtizRa.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/logout/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/6.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nconst load = ({ locals }) => {\n locals.pb.authStore.clear();\n throw redirect(303, \"/login\");\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/logout/_page.server.ts.js';\n\nexport const index = 6;\nexport { server };\nexport const server_id = \"src/routes/logout/+page.server.ts\";\nexport const imports = [];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK;AAC7B,EAAE,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE;AAC7B,EAAE,MAAM,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC/B,CAAC;;;;;;;ACFW,MAAC,KAAK,GAAG;AAET,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG;AACX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 7;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-D6nbmHpS.js')).default;
|
||||
const imports = ["_app/immutable/nodes/7.BT0w3m9a.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/Bbbv1kr5.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/BzfwckE1.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=7-CshkMU4-.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"7-CshkMU4-.js","sources":["../../../.svelte-kit/adapter-node/nodes/7.js"],"sourcesContent":["\n\nexport const index = 7;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/transactions/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/7.BT0w3m9a.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/Bbbv1kr5.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/CgtTdn_a.js\",\"_app/immutable/chunks/BkOB8zes.js\",\"_app/immutable/chunks/Dw-PWoyz.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/Bysmuwvg.js\",\"_app/immutable/chunks/iYSIr-5j.js\",\"_app/immutable/chunks/BzfwckE1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA+C,CAAC,EAAE;AAC7G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5b,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 8;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-BqTuDfh4.js')).default;
|
||||
const imports = ["_app/immutable/nodes/8.B6WLTWPS.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/Bbbv1kr5.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/BkOB8zes.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/BzfwckE1.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=8-BqdZXKab.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"8-BqdZXKab.js","sources":["../../../.svelte-kit/adapter-node/nodes/8.js"],"sourcesContent":["\n\nexport const index = 8;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/accounts/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/8.B6WLTWPS.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/Bbbv1kr5.js\",\"_app/immutable/chunks/BH97ETpZ.js\",\"_app/immutable/chunks/CgtTdn_a.js\",\"_app/immutable/chunks/BkOB8zes.js\",\"_app/immutable/chunks/Dw-PWoyz.js\",\"_app/immutable/chunks/UvStrNyM.js\",\"_app/immutable/chunks/BD8q7RHQ.js\",\"_app/immutable/chunks/Bysmuwvg.js\",\"_app/immutable/chunks/iYSIr-5j.js\",\"_app/immutable/chunks/BzfwckE1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA2C,CAAC,EAAE;AACzG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5b,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -119,13 +119,13 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 4;
|
||||
const index = 9;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-DV7w38Ax.js')).default;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-Czy7gJ3N.js')).default;
|
||||
const server_id = "src/routes/items/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/4.Bn1qLW0B.js","_app/immutable/chunks/BxPgF2w2.js","_app/immutable/chunks/CRDN6Mh7.js","_app/immutable/chunks/Dexp9pM5.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/DcVg5zjO.js","_app/immutable/chunks/25AjRaeI.js","_app/immutable/chunks/BKSreT2u.js","_app/immutable/chunks/agKGoZF1.js","_app/immutable/chunks/BC20z61P.js","_app/immutable/chunks/jOLfEXYH.js"];
|
||||
const imports = ["_app/immutable/nodes/9.BuXJ1sn8.js","_app/immutable/chunks/CTXwJjmZ.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/BHRsrugl.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/Cf_fsnlT.js","_app/immutable/chunks/CgtTdn_a.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/chunks/mylYChEY.js","_app/immutable/chunks/CeetFYTo.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/Dw-PWoyz.js","_app/immutable/chunks/C3TONo7J.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=4-BhMW4SH8.js.map
|
||||
//# sourceMappingURL=9-DoFOzLEw.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +0,0 @@
|
||||
import { c as slot } from './index-DV2ddKt_.js';
|
||||
import 'clsx';
|
||||
|
||||
function _layout($$renderer, $$props) {
|
||||
$$renderer.push(`<!--[-->`);
|
||||
slot($$renderer, $$props, "default", {});
|
||||
$$renderer.push(`<!--]-->`);
|
||||
}
|
||||
|
||||
export { _layout as default };
|
||||
//# sourceMappingURL=_layout.svelte-CBQcLaNr.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"_layout.svelte-CBQcLaNr.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { s as slot } from \"../../chunks/index.js\";\nfunction _layout($$renderer, $$props) {\n $$renderer.push(`<!--[-->`);\n slot($$renderer, $$props, \"default\", {});\n $$renderer.push(`<!--]-->`);\n}\nexport {\n _layout as default\n};\n"],"names":[],"mappings":";;;AACA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC7B,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;AAC1C,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC7B;;;;"}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { d as slot } from './index2-DP7VISHE.js';
|
||||
import 'clsx';
|
||||
|
||||
function _layout($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
$$renderer2.push(`<div class="app-shell"><!--[-->`);
|
||||
slot($$renderer2, $$props, "default", {});
|
||||
$$renderer2.push(`<!--]--></div>`);
|
||||
});
|
||||
}
|
||||
|
||||
export { _layout as default };
|
||||
//# sourceMappingURL=_layout.svelte-WdtjNdpU.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_layout.svelte-WdtjNdpU.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { i as slot } from \"../../chunks/index2.js\";\nfunction _layout($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<div class=\"app-shell\"><!--[-->`);\n slot($$renderer2, $$props, \"default\", {});\n $$renderer2.push(`<!--]--></div>`);\n });\n}\nexport {\n _layout as default\n};\n"],"names":[],"mappings":";;;AACA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,+BAA+B,CAAC,CAAC;AACvD,IAAI,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;AAC7C,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACtC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
@@ -0,0 +1,47 @@
|
||||
import { k as head } from './index2-DP7VISHE.js';
|
||||
import { B as Button } from './button-DuIDS2hH.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'clsx';
|
||||
import './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer) {
|
||||
head("1mqc1bt", $$renderer, ($$renderer2) => {
|
||||
$$renderer2.title(($$renderer3) => {
|
||||
$$renderer3.push(`<title>New receipt – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
$$renderer.push(`<main class="container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8"><div class="flex items-center gap-3"><a href="/receipts" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to receipts">Back</a> <h1 class="text-xl font-semibold sm:text-2xl">New receipt</h1></div> `);
|
||||
Card($$renderer, {
|
||||
children: ($$renderer2) => {
|
||||
Card_content($$renderer2, {
|
||||
class: "flex flex-col gap-4 py-8",
|
||||
children: ($$renderer3) => {
|
||||
$$renderer3.push(`<p class="text-muted-foreground text-center text-sm">Receipt creation will be available here.</p> <div class="flex justify-center gap-2"><a href="/receipts">`);
|
||||
Button($$renderer3, {
|
||||
variant: "outline",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<!---->Back to receipts`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----></a> <a href="/">`);
|
||||
Button($$renderer3, {
|
||||
variant: "ghost",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<!---->Home`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----></a></div>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></main>`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-B3y30gHG.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-B3y30gHG.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/receipts/new/_page.svelte.js"],"sourcesContent":["import { h as head } from \"../../../../chunks/index2.js\";\nimport { B as Button } from \"../../../../chunks/button.js\";\nimport { C as Card, a as Card_content } from \"../../../../chunks/card-content.js\";\nimport \"clsx\";\nfunction _page($$renderer) {\n head(\"1mqc1bt\", $$renderer, ($$renderer2) => {\n $$renderer2.title(($$renderer3) => {\n $$renderer3.push(`<title>New receipt – Stackq</title>`);\n });\n });\n $$renderer.push(`<main class=\"container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8\"><div class=\"flex items-center gap-3\"><a href=\"/receipts\" class=\"text-muted-foreground hover:text-foreground shrink-0 text-sm\" title=\"Back to receipts\">Back</a> <h1 class=\"text-xl font-semibold sm:text-2xl\">New receipt</h1></div> `);\n Card($$renderer, {\n children: ($$renderer2) => {\n Card_content($$renderer2, {\n class: \"flex flex-col gap-4 py-8\",\n children: ($$renderer3) => {\n $$renderer3.push(`<p class=\"text-muted-foreground text-center text-sm\">Receipt creation will be available here.</p> <div class=\"flex justify-center gap-2\"><a href=\"/receipts\">`);\n Button($$renderer3, {\n variant: \"outline\",\n children: ($$renderer4) => {\n $$renderer4.push(`<!---->Back to receipts`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(`<!----></a> <a href=\"/\">`);\n Button($$renderer3, {\n variant: \"ghost\",\n children: ($$renderer4) => {\n $$renderer4.push(`<!---->Home`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(`<!----></a></div>`);\n },\n $$slots: { default: true }\n });\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></main>`);\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;AAIA,SAAS,KAAK,CAAC,UAAU,EAAE;AAC3B,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,WAAW,KAAK;AAC/C,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACvC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,mCAAmC,CAAC,CAAC;AAC7D,IAAI,CAAC,CAAC;AACN,EAAE,CAAC,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,mTAAmT,CAAC,CAAC;AACxU,EAAE,IAAI,CAAC,UAAU,EAAE;AACnB,IAAI,QAAQ,EAAE,CAAC,WAAW,KAAK;AAC/B,MAAM,YAAY,CAAC,WAAW,EAAE;AAChC,QAAQ,KAAK,EAAE,0BAA0B;AACzC,QAAQ,QAAQ,EAAE,CAAC,WAAW,KAAK;AACnC,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,6JAA6J,CAAC,CAAC;AAC3L,UAAU,MAAM,CAAC,WAAW,EAAE;AAC9B,YAAY,OAAO,EAAE,SAAS;AAC9B,YAAY,QAAQ,EAAE,CAAC,WAAW,KAAK;AACvC,cAAc,WAAW,CAAC,IAAI,CAAC,CAAC,uBAAuB,CAAC,CAAC;AACzD,YAAY,CAAC;AACb,YAAY,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AACpC,WAAW,CAAC;AACZ,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,wBAAwB,CAAC,CAAC;AACtD,UAAU,MAAM,CAAC,WAAW,EAAE;AAC9B,YAAY,OAAO,EAAE,OAAO;AAC5B,YAAY,QAAQ,EAAE,CAAC,WAAW,KAAK;AACvC,cAAc,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC;AAC7C,YAAY,CAAC;AACb,YAAY,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AACpC,WAAW,CAAC;AACZ,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAC/C,QAAQ,CAAC;AACT,QAAQ,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAChC,OAAO,CAAC;AACR,IAAI,CAAC;AACL,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC5B,GAAG,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACnC;;;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,82 @@
|
||||
import { k as head, l as ensure_array_like, m as attr, o as stringify, f as escape_html } from './index2-DP7VISHE.js';
|
||||
import { B as Button } from './button-DuIDS2hH.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'clsx';
|
||||
import './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let { data } = $$props;
|
||||
const receipts = data?.receipts ?? [];
|
||||
head("16kr07e", $$renderer2, ($$renderer3) => {
|
||||
$$renderer3.title(($$renderer4) => {
|
||||
$$renderer4.push(`<title>Receipts – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
$$renderer2.push(`<main class="container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8"><div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"><div class="flex items-center gap-3"><a href="/" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to main">Back</a> <h1 class="text-xl font-semibold sm:text-2xl">Receipts</h1></div> <a href="/receipts/new" class="block shrink-0">`);
|
||||
Button($$renderer2, {
|
||||
class: "w-full sm:w-auto",
|
||||
children: ($$renderer3) => {
|
||||
$$renderer3.push(`<!---->New receipt`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer2.push(`<!----></a></div> `);
|
||||
if (receipts.length === 0) {
|
||||
$$renderer2.push("<!--[-->");
|
||||
Card($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
Card_content($$renderer3, {
|
||||
class: "flex flex-col items-center justify-center gap-4 py-12",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<p class="text-muted-foreground text-center text-sm">No receipts yet.</p> <p class="text-muted-foreground text-center text-xs">Create a receipt to get started.</p> <a href="/receipts/new">`);
|
||||
Button($$renderer4, {
|
||||
variant: "outline",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->New receipt`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----></a> <a href="/">`);
|
||||
Button($$renderer4, {
|
||||
variant: "ghost",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Back to home`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----></a>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<div class="flex flex-col gap-2"><!--[-->`);
|
||||
const each_array = ensure_array_like(receipts);
|
||||
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
||||
let receipt = each_array[$$index];
|
||||
Card($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
Card_content($$renderer3, {
|
||||
class: "p-4",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<a${attr("href", `/receipts/${stringify(receipt.id)}`)} class="font-medium hover:underline">Receipt ${escape_html(receipt.id)}</a>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
}
|
||||
$$renderer2.push(`<!--]--></div>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]--></main>`);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-BKSoWKy6.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,39 @@
|
||||
import { k as head } from './index2-DP7VISHE.js';
|
||||
import { B as Button } from './button-DuIDS2hH.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'clsx';
|
||||
import './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer) {
|
||||
head("11yx1mx", $$renderer, ($$renderer2) => {
|
||||
$$renderer2.title(($$renderer3) => {
|
||||
$$renderer3.push(`<title>Accounts – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
$$renderer.push(`<main class="container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8"><div class="flex items-center gap-3"><a href="/" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to main">Back</a> <h1 class="text-xl font-semibold sm:text-2xl">Accounts</h1></div> `);
|
||||
Card($$renderer, {
|
||||
children: ($$renderer2) => {
|
||||
Card_content($$renderer2, {
|
||||
class: "flex flex-col items-center justify-center gap-4 py-12",
|
||||
children: ($$renderer3) => {
|
||||
$$renderer3.push(`<p class="text-muted-foreground text-center text-sm">No accounts yet.</p> <p class="text-muted-foreground text-center text-xs">Accounts will appear here once this feature is available.</p> <a href="/">`);
|
||||
Button($$renderer3, {
|
||||
variant: "outline",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<!---->Back to home`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----></a>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></main>`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-BqTuDfh4.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-BqTuDfh4.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/accounts/_page.svelte.js"],"sourcesContent":["import { h as head } from \"../../../chunks/index2.js\";\nimport { B as Button } from \"../../../chunks/button.js\";\nimport { C as Card, a as Card_content } from \"../../../chunks/card-content.js\";\nimport \"clsx\";\nfunction _page($$renderer) {\n head(\"11yx1mx\", $$renderer, ($$renderer2) => {\n $$renderer2.title(($$renderer3) => {\n $$renderer3.push(`<title>Accounts – Stackq</title>`);\n });\n });\n $$renderer.push(`<main class=\"container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8\"><div class=\"flex items-center gap-3\"><a href=\"/\" class=\"text-muted-foreground hover:text-foreground shrink-0 text-sm\" title=\"Back to main\">Back</a> <h1 class=\"text-xl font-semibold sm:text-2xl\">Accounts</h1></div> `);\n Card($$renderer, {\n children: ($$renderer2) => {\n Card_content($$renderer2, {\n class: \"flex flex-col items-center justify-center gap-4 py-12\",\n children: ($$renderer3) => {\n $$renderer3.push(`<p class=\"text-muted-foreground text-center text-sm\">No accounts yet.</p> <p class=\"text-muted-foreground text-center text-xs\">Accounts will appear here once this feature is available.</p> <a href=\"/\">`);\n Button($$renderer3, {\n variant: \"outline\",\n children: ($$renderer4) => {\n $$renderer4.push(`<!---->Back to home`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(`<!----></a>`);\n },\n $$slots: { default: true }\n });\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></main>`);\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;AAIA,SAAS,KAAK,CAAC,UAAU,EAAE;AAC3B,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,WAAW,KAAK;AAC/C,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACvC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,gCAAgC,CAAC,CAAC;AAC1D,IAAI,CAAC,CAAC;AACN,EAAE,CAAC,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,oSAAoS,CAAC,CAAC;AACzT,EAAE,IAAI,CAAC,UAAU,EAAE;AACnB,IAAI,QAAQ,EAAE,CAAC,WAAW,KAAK;AAC/B,MAAM,YAAY,CAAC,WAAW,EAAE;AAChC,QAAQ,KAAK,EAAE,uDAAuD;AACtE,QAAQ,QAAQ,EAAE,CAAC,WAAW,KAAK;AACnC,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,yMAAyM,CAAC,CAAC;AACvO,UAAU,MAAM,CAAC,WAAW,EAAE;AAC9B,YAAY,OAAO,EAAE,SAAS;AAC9B,YAAY,QAAQ,EAAE,CAAC,WAAW,KAAK;AACvC,cAAc,WAAW,CAAC,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC;AACrD,YAAY,CAAC;AACb,YAAY,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AACpC,WAAW,CAAC;AACZ,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC;AACzC,QAAQ,CAAC;AACT,QAAQ,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAChC,OAAO,CAAC;AACR,IAAI,CAAC;AACL,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC5B,GAAG,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACnC;;;;"}
|
||||
@@ -0,0 +1,166 @@
|
||||
import { k as head, f as escape_html, v as attributes, w as clsx, t as bind_props, m as attr, l as ensure_array_like, o as stringify } from './index2-DP7VISHE.js';
|
||||
import './button-DuIDS2hH.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'clsx';
|
||||
import { c as cn } from './index-DWasNFG9.js';
|
||||
import './root-DBd7NWpv.js';
|
||||
import './state.svelte-DWNB1VSO.js';
|
||||
import PocketBase from 'pocketbase';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function Card_header($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-header",
|
||||
class: clsx(cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
const POCKETBASE_URL = "https://pocketbase.ccllc.pro";
|
||||
const POCKETBASE_BASE_URL = POCKETBASE_URL;
|
||||
let _pb = null;
|
||||
function getPb() {
|
||||
if (typeof window === "undefined") {
|
||||
throw new Error("PocketBase client is only available in the browser. Use load/actions for server data.");
|
||||
}
|
||||
if (!_pb) _pb = new PocketBase(POCKETBASE_URL);
|
||||
return _pb;
|
||||
}
|
||||
new Proxy({}, {
|
||||
get(_, prop) {
|
||||
if (prop === "baseUrl") return POCKETBASE_BASE_URL;
|
||||
return getPb()[prop];
|
||||
}
|
||||
});
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let { data } = $$props;
|
||||
const item = data?.item;
|
||||
data?.itemsForParent ?? [];
|
||||
const PB_BASE = "https://pocketbase.ccllc.pro";
|
||||
const COLLECTION = "Stackq_Items";
|
||||
function imageUrl(i) {
|
||||
if (!i?.Image) return null;
|
||||
return `${PB_BASE}/api/files/${COLLECTION}/${i.id}/${i.Image}`;
|
||||
}
|
||||
function asList(val) {
|
||||
if (val == null) return [];
|
||||
return Array.isArray(val) ? val : [val];
|
||||
}
|
||||
function formatDate(iso) {
|
||||
if (!iso) return "—";
|
||||
try {
|
||||
return new Date(iso).toLocaleDateString(void 0, { dateStyle: "short", timeStyle: "short" });
|
||||
} catch {
|
||||
return iso;
|
||||
}
|
||||
}
|
||||
data?.form === "update" ? data?.error ?? null : null;
|
||||
let $$settled = true;
|
||||
let $$inner_renderer;
|
||||
function $$render_inner($$renderer3) {
|
||||
head("1r2vy7b", $$renderer3, ($$renderer4) => {
|
||||
$$renderer4.title(($$renderer5) => {
|
||||
$$renderer5.push(`<title>${escape_html(item?.Item ?? "Item")} – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
if (item) {
|
||||
$$renderer3.push("<!--[-->");
|
||||
$$renderer3.push(`<main class="container mx-auto flex flex-col gap-4 px-4 py-6 sm:gap-6 sm:px-6 sm:py-8"><div class="flex flex-wrap items-center gap-2 sm:gap-4 min-w-0"><a href="/" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to main">Home</a> <a href="/items" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to items">Back to items</a> <h1 class="text-xl font-semibold truncate min-w-0 flex-1 sm:text-2xl">${escape_html(item.Item ?? "—")}</h1> `);
|
||||
{
|
||||
$$renderer3.push("<!--[!-->");
|
||||
}
|
||||
$$renderer3.push(`<!--]--></div> <div class="grid gap-6 md:grid-cols-2">`);
|
||||
Card($$renderer3, {
|
||||
children: ($$renderer4) => {
|
||||
Card_header($$renderer4, {
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<h2 class="text-lg font-medium">Details</h2>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----> `);
|
||||
Card_content($$renderer4, {
|
||||
class: "space-y-4",
|
||||
children: ($$renderer5) => {
|
||||
if (imageUrl(item)) {
|
||||
$$renderer5.push("<!--[-->");
|
||||
$$renderer5.push(`<div><a${attr("href", imageUrl(item))} target="_blank" rel="noopener noreferrer" class="block overflow-hidden rounded-lg border"><img${attr("src", imageUrl(item))} alt="" class="max-h-64 w-full object-contain"/></a></div>`);
|
||||
} else {
|
||||
$$renderer5.push("<!--[!-->");
|
||||
}
|
||||
$$renderer5.push(`<!--]--> <dl class="grid gap-2 text-sm"><div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">SKU</dt> <dd class="font-mono">${escape_html(item.SKU ?? "—")}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Description</dt> <dd>${escape_html(item.Description ?? "—")}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">UOM</dt> <dd>${escape_html(item.UOM ?? "—")}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Cost</dt> <dd>${escape_html(item.Cost != null ? Number(item.Cost).toLocaleString() : "—")}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Vendor</dt> <dd>${escape_html(item.Vendor ?? "—")}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Category</dt> <dd><!--[-->`);
|
||||
const each_array = ensure_array_like(asList(item.Catagory));
|
||||
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
||||
let cat = each_array[$$index];
|
||||
$$renderer5.push(`<span class="mr-1 rounded bg-muted px-1.5 py-0.5 text-xs">${escape_html(cat)}</span>`);
|
||||
}
|
||||
$$renderer5.push(`<!--]--> `);
|
||||
if (asList(item.Catagory).length === 0) {
|
||||
$$renderer5.push("<!--[-->");
|
||||
$$renderer5.push(`—`);
|
||||
} else {
|
||||
$$renderer5.push("<!--[!-->");
|
||||
}
|
||||
$$renderer5.push(`<!--]--></dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Sub-category</dt> <dd><!--[-->`);
|
||||
const each_array_1 = ensure_array_like(asList(item.Sub_Catagory));
|
||||
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
||||
let sub = each_array_1[$$index_1];
|
||||
$$renderer5.push(`<span class="mr-1 rounded border px-1.5 py-0.5 text-xs">${escape_html(sub)}</span>`);
|
||||
}
|
||||
$$renderer5.push(`<!--]--> `);
|
||||
if (asList(item.Sub_Catagory).length === 0) {
|
||||
$$renderer5.push("<!--[-->");
|
||||
$$renderer5.push(`—`);
|
||||
} else {
|
||||
$$renderer5.push("<!--[!-->");
|
||||
}
|
||||
$$renderer5.push(`<!--]--></dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Has Parent</dt> <dd>${escape_html(item.Has_Parent ? "Yes" : "No")}</dd></div> `);
|
||||
if (item.Has_Parent && item.expand?.Parent) {
|
||||
$$renderer5.push("<!--[-->");
|
||||
$$renderer5.push(`<div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Parent</dt> <dd><a${attr("href", `/items/${stringify(item.Parent)}`)} class="text-primary hover:underline">${escape_html(item.expand.Parent.Item ?? item.expand.Parent.SKU ?? item.Parent)}</a></dd></div>`);
|
||||
} else {
|
||||
$$renderer5.push("<!--[!-->");
|
||||
}
|
||||
$$renderer5.push(`<!--]--> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Stock</dt> <dd>${escape_html(item.Stock ? "Yes" : "No")}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Created</dt> <dd>${escape_html(formatDate(item.created))}</dd></div> <div class="flex gap-2"><dt class="text-muted-foreground w-24 shrink-0">Updated</dt> <dd>${escape_html(formatDate(item.updated))}</dd></div></dl>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----></div></main> `);
|
||||
{
|
||||
$$renderer3.push("<!--[!-->");
|
||||
}
|
||||
$$renderer3.push(`<!--]-->`);
|
||||
} else {
|
||||
$$renderer3.push("<!--[!-->");
|
||||
$$renderer3.push(`<main class="container mx-auto py-8"><p class="text-muted-foreground">Item not found.</p></main>`);
|
||||
}
|
||||
$$renderer3.push(`<!--]-->`);
|
||||
}
|
||||
do {
|
||||
$$settled = true;
|
||||
$$inner_renderer = $$renderer2.copy();
|
||||
$$render_inner($$inner_renderer);
|
||||
} while (!$$settled);
|
||||
$$renderer2.subsume($$inner_renderer);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-BsXYacKi.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,174 @@
|
||||
import { p as store_get, k as head, f as escape_html, l as ensure_array_like, q as unsubscribe_stores, m as attr, o as stringify, r as element, t as bind_props, h as getContext, v as attributes, w as clsx } from './index2-DP7VISHE.js';
|
||||
import 'clsx';
|
||||
import './root-DBd7NWpv.js';
|
||||
import './state.svelte-DWNB1VSO.js';
|
||||
import { t as tv, c as cn } from './index-DWasNFG9.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
const getStores = () => {
|
||||
const stores$1 = getContext("__svelte__");
|
||||
return {
|
||||
/** @type {typeof page} */
|
||||
page: {
|
||||
subscribe: stores$1.page.subscribe
|
||||
},
|
||||
/** @type {typeof navigating} */
|
||||
navigating: {
|
||||
subscribe: stores$1.navigating.subscribe
|
||||
},
|
||||
/** @type {typeof updated} */
|
||||
updated: stores$1.updated
|
||||
};
|
||||
};
|
||||
const page = {
|
||||
subscribe(fn) {
|
||||
const store = getStores().page;
|
||||
return store.subscribe(fn);
|
||||
}
|
||||
};
|
||||
const badgeVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
||||
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
||||
destructive: "bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",
|
||||
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
||||
}
|
||||
},
|
||||
defaultVariants: { variant: "default" }
|
||||
});
|
||||
function Badge($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
href,
|
||||
class: className,
|
||||
variant = "default",
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
element(
|
||||
$$renderer2,
|
||||
href ? "a" : "span",
|
||||
() => {
|
||||
$$renderer2.push(`${attributes({
|
||||
"data-slot": "badge",
|
||||
href,
|
||||
class: clsx(cn(badgeVariants({ variant }), className)),
|
||||
...restProps
|
||||
})}`);
|
||||
},
|
||||
() => {
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!---->`);
|
||||
}
|
||||
);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
var $$store_subs;
|
||||
let { data } = $$props;
|
||||
store_get($$store_subs ??= {}, "$page", page).url.searchParams.get("q") ?? "";
|
||||
const items = data?.items ?? [];
|
||||
const PB_BASE = "https://pocketbase.ccllc.pro";
|
||||
const COLLECTION = "Stackq_Items";
|
||||
function imageUrl(item) {
|
||||
if (!item.Image) return null;
|
||||
return `${PB_BASE}/api/files/${COLLECTION}/${item.id}/${item.Image}`;
|
||||
}
|
||||
head("rk8na7", $$renderer2, ($$renderer3) => {
|
||||
$$renderer3.title(($$renderer4) => {
|
||||
$$renderer4.push(`<title>Items – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
{
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<main class="container mx-auto flex flex-col gap-6 px-4 py-8"><div class="flex items-center justify-between"><h1 class="text-2xl font-semibold">Stackq Items</h1> <span class="text-muted-foreground text-sm">${escape_html(items.length)} items</span></div> `);
|
||||
if (items.length === 0) {
|
||||
$$renderer2.push("<!--[-->");
|
||||
Card($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
Card_content($$renderer3, {
|
||||
class: "flex h-32 items-center justify-center",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<p class="text-muted-foreground text-sm">No items.</p>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<div class="flex flex-col gap-2"><!--[-->`);
|
||||
const each_array = ensure_array_like(items);
|
||||
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
||||
let item = each_array[$$index];
|
||||
Card($$renderer2, {
|
||||
class: "overflow-hidden",
|
||||
children: ($$renderer3) => {
|
||||
Card_content($$renderer3, {
|
||||
class: "flex flex-row items-center gap-3 p-3",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<div class="size-12 shrink-0 overflow-hidden rounded border">`);
|
||||
if (imageUrl(item)) {
|
||||
$$renderer4.push("<!--[-->");
|
||||
$$renderer4.push(`<img${attr("src", imageUrl(item))} alt="" class="size-full object-cover" loading="lazy"/>`);
|
||||
} else {
|
||||
$$renderer4.push("<!--[!-->");
|
||||
$$renderer4.push(`<span class="text-muted-foreground flex size-full items-center justify-center text-xs">—</span>`);
|
||||
}
|
||||
$$renderer4.push(`<!--]--></div> <div class="min-w-0 flex-1"><a${attr("href", `/items/${stringify(item.id)}`)} class="font-medium hover:underline">${escape_html(item.Item ?? "—")}</a> <span class="text-muted-foreground font-mono text-xs">· ${escape_html(item.SKU ?? "—")}</span> `);
|
||||
if (item.Description) {
|
||||
$$renderer4.push("<!--[-->");
|
||||
$$renderer4.push(`<span class="text-muted-foreground ml-1 truncate text-xs">· ${escape_html(item.Description)}</span>`);
|
||||
} else {
|
||||
$$renderer4.push("<!--[!-->");
|
||||
}
|
||||
$$renderer4.push(`<!--]--></div> <div class="flex shrink-0 items-center gap-2 text-xs">`);
|
||||
Badge($$renderer4, {
|
||||
variant: "outline",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->${escape_html(item.UOM ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----> <span class="tabular-nums">${escape_html(item.Cost != null ? Number(item.Cost).toLocaleString() : "—")}</span> `);
|
||||
if (item.Stock) {
|
||||
$$renderer4.push("<!--[-->");
|
||||
Badge($$renderer4, {
|
||||
variant: "default",
|
||||
class: "text-xs",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Stock`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer4.push("<!--[!-->");
|
||||
}
|
||||
$$renderer4.push(`<!--]--></div>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
}
|
||||
$$renderer2.push(`<!--]--></div>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]--></main>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
if ($$store_subs) unsubscribe_stores($$store_subs);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-Czy7gJ3N.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,39 @@
|
||||
import { k as head } from './index2-DP7VISHE.js';
|
||||
import { B as Button } from './button-DuIDS2hH.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'clsx';
|
||||
import './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer) {
|
||||
head("1q0dtg6", $$renderer, ($$renderer2) => {
|
||||
$$renderer2.title(($$renderer3) => {
|
||||
$$renderer3.push(`<title>Transactions – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
$$renderer.push(`<main class="container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8"><div class="flex items-center gap-3"><a href="/" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to main">Back</a> <h1 class="text-xl font-semibold sm:text-2xl">Transactions</h1></div> `);
|
||||
Card($$renderer, {
|
||||
children: ($$renderer2) => {
|
||||
Card_content($$renderer2, {
|
||||
class: "flex flex-col items-center justify-center gap-4 py-12",
|
||||
children: ($$renderer3) => {
|
||||
$$renderer3.push(`<p class="text-muted-foreground text-center text-sm">No transactions yet.</p> <p class="text-muted-foreground text-center text-xs">Transactions will appear here once this feature is available.</p> <a href="/">`);
|
||||
Button($$renderer3, {
|
||||
variant: "outline",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<!---->Back to home`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----></a>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></main>`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-D6nbmHpS.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-D6nbmHpS.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/transactions/_page.svelte.js"],"sourcesContent":["import { h as head } from \"../../../chunks/index2.js\";\nimport { B as Button } from \"../../../chunks/button.js\";\nimport { C as Card, a as Card_content } from \"../../../chunks/card-content.js\";\nimport \"clsx\";\nfunction _page($$renderer) {\n head(\"1q0dtg6\", $$renderer, ($$renderer2) => {\n $$renderer2.title(($$renderer3) => {\n $$renderer3.push(`<title>Transactions – Stackq</title>`);\n });\n });\n $$renderer.push(`<main class=\"container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8\"><div class=\"flex items-center gap-3\"><a href=\"/\" class=\"text-muted-foreground hover:text-foreground shrink-0 text-sm\" title=\"Back to main\">Back</a> <h1 class=\"text-xl font-semibold sm:text-2xl\">Transactions</h1></div> `);\n Card($$renderer, {\n children: ($$renderer2) => {\n Card_content($$renderer2, {\n class: \"flex flex-col items-center justify-center gap-4 py-12\",\n children: ($$renderer3) => {\n $$renderer3.push(`<p class=\"text-muted-foreground text-center text-sm\">No transactions yet.</p> <p class=\"text-muted-foreground text-center text-xs\">Transactions will appear here once this feature is available.</p> <a href=\"/\">`);\n Button($$renderer3, {\n variant: \"outline\",\n children: ($$renderer4) => {\n $$renderer4.push(`<!---->Back to home`);\n },\n $$slots: { default: true }\n });\n $$renderer3.push(`<!----></a>`);\n },\n $$slots: { default: true }\n });\n },\n $$slots: { default: true }\n });\n $$renderer.push(`<!----></main>`);\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;AAIA,SAAS,KAAK,CAAC,UAAU,EAAE;AAC3B,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,WAAW,KAAK;AAC/C,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACvC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC,oCAAoC,CAAC,CAAC;AAC9D,IAAI,CAAC,CAAC;AACN,EAAE,CAAC,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,wSAAwS,CAAC,CAAC;AAC7T,EAAE,IAAI,CAAC,UAAU,EAAE;AACnB,IAAI,QAAQ,EAAE,CAAC,WAAW,KAAK;AAC/B,MAAM,YAAY,CAAC,WAAW,EAAE;AAChC,QAAQ,KAAK,EAAE,uDAAuD;AACtE,QAAQ,QAAQ,EAAE,CAAC,WAAW,KAAK;AACnC,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,iNAAiN,CAAC,CAAC;AAC/O,UAAU,MAAM,CAAC,WAAW,EAAE;AAC9B,YAAY,OAAO,EAAE,SAAS;AAC9B,YAAY,QAAQ,EAAE,CAAC,WAAW,KAAK;AACvC,cAAc,WAAW,CAAC,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC;AACrD,YAAY,CAAC;AACb,YAAY,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AACpC,WAAW,CAAC;AACZ,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC;AACzC,QAAQ,CAAC;AACT,QAAQ,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAChC,OAAO,CAAC;AACR,IAAI,CAAC;AACL,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC5B,GAAG,CAAC;AACJ,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACnC;;;;"}
|
||||
@@ -0,0 +1,79 @@
|
||||
import 'clsx';
|
||||
import { B as Button } from './button-DuIDS2hH.js';
|
||||
import './index2-DP7VISHE.js';
|
||||
import './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer, $$props) {
|
||||
let { data } = $$props;
|
||||
{
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push(`<main class="flex min-h-screen flex-col items-center justify-center gap-6 p-6 sm:p-8"><h1 class="text-2xl font-semibold">Stackq</h1> <div class="flex w-full max-w-xs flex-col gap-3"><a href="/items" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 w-full min-h-12",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Scan`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/transactions" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->New Transaction`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/items" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->New Item`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a></div> <div class="text-muted-foreground w-full max-w-xs border-t pt-4 text-center text-sm">Go to</div> <div class="flex w-full max-w-xs flex-col gap-2"><a href="/items" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Items`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/transactions" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Transactions`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/accounts" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Accounts`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/logout" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "h-12 min-h-12 w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Log out`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a></div></main>`);
|
||||
}
|
||||
$$renderer.push(`<!--]-->`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-DGoi0dKh.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,647 +0,0 @@
|
||||
import { a9 as head, d as escape_html, a6 as attributes, a7 as clsx, a8 as bind_props, aa as ensure_array_like, ab as attr, ac as element } from './index-DV2ddKt_.js';
|
||||
import { c as cn, t as tv } from './index-DWasNFG9.js';
|
||||
import 'clsx';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function Table($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div data-slot="table-container" class="relative w-full overflow-x-auto"><table${attributes({
|
||||
"data-slot": "table",
|
||||
class: clsx(cn("w-full caption-bottom text-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></table></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_body($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<tbody${attributes({
|
||||
"data-slot": "table-body",
|
||||
class: clsx(cn("[&_tr:last-child]:border-0", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></tbody>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_cell($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<td${attributes({
|
||||
"data-slot": "table-cell",
|
||||
class: clsx(cn("bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></td>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_head($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<th${attributes({
|
||||
"data-slot": "table-head",
|
||||
class: clsx(cn("text-foreground h-10 bg-clip-padding px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></th>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_header($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<thead${attributes({
|
||||
"data-slot": "table-header",
|
||||
class: clsx(cn("[&_tr]:border-b", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></thead>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_row($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<tr${attributes({
|
||||
"data-slot": "table-row",
|
||||
class: clsx(cn("hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></tr>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
const badgeVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
||||
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
||||
destructive: "bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",
|
||||
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
||||
}
|
||||
},
|
||||
defaultVariants: { variant: "default" }
|
||||
});
|
||||
function Badge($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
href,
|
||||
class: className,
|
||||
variant = "default",
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
element(
|
||||
$$renderer2,
|
||||
href ? "a" : "span",
|
||||
() => {
|
||||
$$renderer2.push(`${attributes({
|
||||
"data-slot": "badge",
|
||||
href,
|
||||
class: clsx(cn(badgeVariants({ variant }), className)),
|
||||
...restProps
|
||||
})}`);
|
||||
},
|
||||
() => {
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!---->`);
|
||||
}
|
||||
);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card",
|
||||
class: clsx(cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_content($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-content",
|
||||
class: clsx(cn("px-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let { data } = $$props;
|
||||
function asList(val) {
|
||||
if (val == null) return [];
|
||||
return Array.isArray(val) ? val : [val];
|
||||
}
|
||||
function formatDate(iso) {
|
||||
if (!iso) return "—";
|
||||
try {
|
||||
return new Date(iso).toLocaleDateString(void 0, { dateStyle: "short", timeStyle: "short" });
|
||||
} catch {
|
||||
return iso;
|
||||
}
|
||||
}
|
||||
const items = data?.items ?? [];
|
||||
const PB_BASE = "https://pocketbase.ccllc.pro";
|
||||
const COLLECTION = "Stackq_Items";
|
||||
function imageUrl(item) {
|
||||
if (!item.Image) return null;
|
||||
return `${PB_BASE}/api/files/${COLLECTION}/${item.id}/${item.Image}`;
|
||||
}
|
||||
head("rk8na7", $$renderer2, ($$renderer3) => {
|
||||
$$renderer3.title(($$renderer4) => {
|
||||
$$renderer4.push(`<title>Items – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
{
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<main class="container mx-auto flex flex-col gap-6 py-8"><div class="flex items-center justify-between"><h1 class="text-2xl font-semibold">Stackq Items</h1> <span class="text-muted-foreground text-sm">${escape_html(items.length)} items</span></div> `);
|
||||
Card($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
Card_content($$renderer3, {
|
||||
class: "p-0",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push("<!---->");
|
||||
Table?.($$renderer4, {
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push("<!---->");
|
||||
Table_header?.($$renderer5, {
|
||||
children: ($$renderer6) => {
|
||||
$$renderer6.push("<!---->");
|
||||
Table_row?.($$renderer6, {
|
||||
children: ($$renderer7) => {
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Image`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Item`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->SKU`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "max-w-[200px]",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Description`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->UOM`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "text-right",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Cost`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Vendor`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Catagory`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Sub_Catagory`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Has Parent`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Parent`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Stock`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->created`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->updated`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer6.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer5.push(`<!----> `);
|
||||
$$renderer5.push("<!---->");
|
||||
Table_body?.($$renderer5, {
|
||||
children: ($$renderer6) => {
|
||||
if (items.length === 0) {
|
||||
$$renderer6.push("<!--[-->");
|
||||
$$renderer6.push("<!---->");
|
||||
Table_row?.($$renderer6, {
|
||||
children: ($$renderer7) => {
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
colspan: "14",
|
||||
class: "h-24 text-center text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->No items.`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer6.push(`<!---->`);
|
||||
} else {
|
||||
$$renderer6.push("<!--[!-->");
|
||||
$$renderer6.push(`<!--[-->`);
|
||||
const each_array = ensure_array_like(items);
|
||||
for (let $$index_2 = 0, $$length = each_array.length; $$index_2 < $$length; $$index_2++) {
|
||||
let item = each_array[$$index_2];
|
||||
$$renderer6.push("<!---->");
|
||||
Table_row?.($$renderer6, {
|
||||
children: ($$renderer7) => {
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "w-16",
|
||||
children: ($$renderer8) => {
|
||||
if (imageUrl(item)) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`<img${attr("src", imageUrl(item))} alt="" class="size-14 rounded border object-cover" loading="lazy"/>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground text-xs">—</span>`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "font-medium",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Item ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "font-mono text-xs",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.SKU ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "max-w-[200px] truncate",
|
||||
title: item.Description ?? "",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Description ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
Badge($$renderer8, {
|
||||
variant: "outline",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->${escape_html(item.UOM ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-right tabular-nums",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Cost != null ? Number(item.Cost).toLocaleString() : "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Vendor ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!--[-->`);
|
||||
const each_array_1 = ensure_array_like(asList(item.Catagory));
|
||||
for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {
|
||||
let cat = each_array_1[$$index];
|
||||
Badge($$renderer8, {
|
||||
variant: "secondary",
|
||||
class: "mr-1 text-xs",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->${escape_html(cat)}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
}
|
||||
$$renderer8.push(`<!--]--> `);
|
||||
if (asList(item.Catagory).length === 0) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">—</span>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!--[-->`);
|
||||
const each_array_2 = ensure_array_like(asList(item.Sub_Catagory));
|
||||
for (let $$index_1 = 0, $$length2 = each_array_2.length; $$index_1 < $$length2; $$index_1++) {
|
||||
let sub = each_array_2[$$index_1];
|
||||
Badge($$renderer8, {
|
||||
variant: "outline",
|
||||
class: "mr-1 text-xs",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->${escape_html(sub)}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
}
|
||||
$$renderer8.push(`<!--]--> `);
|
||||
if (asList(item.Sub_Catagory).length === 0) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">—</span>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
if (item.Has_Parent) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
Badge($$renderer8, {
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->Yes`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">No</span>`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
if (item.expand?.Parent) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`${escape_html(item.expand.Parent.Item ?? item.expand.Parent.SKU ?? item.Parent)}`);
|
||||
} else if (item.Parent) {
|
||||
$$renderer8.push("<!--[1-->");
|
||||
$$renderer8.push(`<span class="font-mono text-xs">${escape_html(item.Parent)}</span>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`—`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
if (item.Stock) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
Badge($$renderer8, {
|
||||
variant: "default",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->Stock`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">—</span>`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground text-xs",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(formatDate(item.created))}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground text-xs",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(formatDate(item.updated))}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer6.push(`<!---->`);
|
||||
}
|
||||
$$renderer6.push(`<!--]-->`);
|
||||
}
|
||||
$$renderer6.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer5.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer2.push(`<!----></main>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-DV7w38Ax.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,42 @@
|
||||
import { k as head, f as escape_html } from './index2-DP7VISHE.js';
|
||||
import { B as Button } from './button-DuIDS2hH.js';
|
||||
import { C as Card, a as Card_content } from './card-content-BgIZ9vTn.js';
|
||||
import 'clsx';
|
||||
import './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let { data, params } = $$props;
|
||||
head("8mhk6q", $$renderer2, ($$renderer3) => {
|
||||
$$renderer3.title(($$renderer4) => {
|
||||
$$renderer4.push(`<title>Receipt – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
$$renderer2.push(`<main class="container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8"><div class="flex items-center gap-3"><a href="/receipts" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to receipts">Back</a> <h1 class="text-xl font-semibold sm:text-2xl">Receipt</h1></div> `);
|
||||
Card($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
Card_content($$renderer3, {
|
||||
class: "flex flex-col gap-4 py-8",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push(`<p class="text-muted-foreground text-sm">Receipt ${escape_html(params.id)}</p> <a href="/receipts">`);
|
||||
Button($$renderer4, {
|
||||
variant: "outline",
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Back to receipts`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----></a>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer2.push(`<!----></main>`);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-yq5AuaSQ.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-yq5AuaSQ.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/receipts/_id_/_page.svelte.js"],"sourcesContent":["import { h as head, c as escape_html } from \"../../../../chunks/index2.js\";\nimport { B as Button } from \"../../../../chunks/button.js\";\nimport { C as Card, a as Card_content } from \"../../../../chunks/card-content.js\";\nimport \"clsx\";\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { data, params } = $$props;\n head(\"8mhk6q\", $$renderer2, ($$renderer3) => {\n $$renderer3.title(($$renderer4) => {\n $$renderer4.push(`<title>Receipt – Stackq</title>`);\n });\n });\n $$renderer2.push(`<main class=\"container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8\"><div class=\"flex items-center gap-3\"><a href=\"/receipts\" class=\"text-muted-foreground hover:text-foreground shrink-0 text-sm\" title=\"Back to receipts\">Back</a> <h1 class=\"text-xl font-semibold sm:text-2xl\">Receipt</h1></div> `);\n Card($$renderer2, {\n children: ($$renderer3) => {\n Card_content($$renderer3, {\n class: \"flex flex-col gap-4 py-8\",\n children: ($$renderer4) => {\n $$renderer4.push(`<p class=\"text-muted-foreground text-sm\">Receipt ${escape_html(params.id)}</p> <a href=\"/receipts\">`);\n Button($$renderer4, {\n variant: \"outline\",\n children: ($$renderer5) => {\n $$renderer5.push(`<!---->Back to receipts`);\n },\n $$slots: { default: true }\n });\n $$renderer4.push(`<!----></a>`);\n },\n $$slots: { default: true }\n });\n },\n $$slots: { default: true }\n });\n $$renderer2.push(`<!----></main>`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;;AAIA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO;AAClC,IAAI,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC,WAAW,KAAK;AACjD,MAAM,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACzC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,+BAA+B,CAAC,CAAC;AAC3D,MAAM,CAAC,CAAC;AACR,IAAI,CAAC,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,+SAA+S,CAAC,CAAC;AACvU,IAAI,IAAI,CAAC,WAAW,EAAE;AACtB,MAAM,QAAQ,EAAE,CAAC,WAAW,KAAK;AACjC,QAAQ,YAAY,CAAC,WAAW,EAAE;AAClC,UAAU,KAAK,EAAE,0BAA0B;AAC3C,UAAU,QAAQ,EAAE,CAAC,WAAW,KAAK;AACrC,YAAY,WAAW,CAAC,IAAI,CAAC,CAAC,iDAAiD,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,yBAAyB,CAAC,CAAC;AACnI,YAAY,MAAM,CAAC,WAAW,EAAE;AAChC,cAAc,OAAO,EAAE,SAAS;AAChC,cAAc,QAAQ,EAAE,CAAC,WAAW,KAAK;AACzC,gBAAgB,WAAW,CAAC,IAAI,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAC3D,cAAc,CAAC;AACf,cAAc,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AACtC,aAAa,CAAC;AACd,YAAY,WAAW,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC;AAC3C,UAAU,CAAC;AACX,UAAU,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAClC,SAAS,CAAC;AACV,MAAM,CAAC;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACtC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
+3
-38
@@ -1,7 +1,5 @@
|
||||
import 'clsx';
|
||||
import { a6 as attributes, a7 as clsx, a8 as bind_props } from './index-DV2ddKt_.js';
|
||||
import { v as attributes, w as clsx, t as bind_props } from './index2-DP7VISHE.js';
|
||||
import { c as cn, t as tv } from './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
const buttonVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
@@ -69,39 +67,6 @@ function Button($$renderer, $$props) {
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function _page($$renderer) {
|
||||
{
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push(`<main class="flex min-h-screen flex-col items-center justify-center gap-6 p-8"><h1 class="text-2xl font-semibold">Stackq</h1> <p class="text-muted-foreground">Svelte 5 + shadcn-svelte + PocketBase</p> <div class="flex w-full max-w-xs flex-col gap-2"><a href="/items" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "w-full",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Items table`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/items" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->New item`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/logout" class="block">`);
|
||||
Button($$renderer, {
|
||||
class: "w-full",
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Log out`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a></div></main>`);
|
||||
}
|
||||
$$renderer.push(`<!--]-->`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-BBZV9Anf.js.map
|
||||
export { Button as B };
|
||||
//# sourceMappingURL=button-DuIDS2hH.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,46 @@
|
||||
import { v as attributes, w as clsx, t as bind_props } from './index2-DP7VISHE.js';
|
||||
import { c as cn } from './index-DWasNFG9.js';
|
||||
|
||||
function Card($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card",
|
||||
class: clsx(cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_content($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-content",
|
||||
class: clsx(cn("px-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
|
||||
export { Card as C, Card_content as a };
|
||||
//# sourceMappingURL=card-content-BgIZ9vTn.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"card-content-BgIZ9vTn.js","sources":["../../../.svelte-kit/adapter-node/chunks/card-content.js"],"sourcesContent":["import { d as attributes, f as clsx, g as bind_props } from \"./index2.js\";\nimport { c as cn } from \"./utils.js\";\nfunction Card($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n ref = null,\n class: className,\n children,\n $$slots,\n $$events,\n ...restProps\n } = $$props;\n $$renderer2.push(`<div${attributes({\n \"data-slot\": \"card\",\n class: clsx(cn(\"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\", className)),\n ...restProps\n })}>`);\n children?.($$renderer2);\n $$renderer2.push(`<!----></div>`);\n bind_props($$props, { ref });\n });\n}\nfunction Card_content($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n ref = null,\n class: className,\n children,\n $$slots,\n $$events,\n ...restProps\n } = $$props;\n $$renderer2.push(`<div${attributes({\n \"data-slot\": \"card-content\",\n class: clsx(cn(\"px-6\", className)),\n ...restProps\n })}>`);\n children?.($$renderer2);\n $$renderer2.push(`<!----></div>`);\n bind_props($$props, { ref });\n });\n}\nexport {\n Card as C,\n Card_content as a\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE;AACnC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI;AACR,MAAM,GAAG,GAAG,IAAI;AAChB,MAAM,KAAK,EAAE,SAAS;AACtB,MAAM,QAAQ;AACd,MAAM,OAAO;AACb,MAAM,QAAQ;AACd,MAAM,GAAG;AACT,KAAK,GAAG,OAAO;AACf,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC;AACvC,MAAM,WAAW,EAAE,MAAM;AACzB,MAAM,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,mFAAmF,EAAE,SAAS,CAAC,CAAC;AACrH,MAAM,GAAG;AACT,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,IAAI,QAAQ,GAAG,WAAW,CAAC;AAC3B,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,CAAC;AACrC,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;AACA,SAAS,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE;AAC3C,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI;AACR,MAAM,GAAG,GAAG,IAAI;AAChB,MAAM,KAAK,EAAE,SAAS;AACtB,MAAM,QAAQ;AACd,MAAM,OAAO;AACb,MAAM,QAAQ;AACd,MAAM,GAAG;AACT,KAAK,GAAG,OAAO;AACf,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC;AACvC,MAAM,WAAW,EAAE,cAAc;AACjC,MAAM,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACxC,MAAM,GAAG;AACT,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,IAAI,QAAQ,GAAG,WAAW,CAAC;AAC3B,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,CAAC;AACrC,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
+5
-9
@@ -1,6 +1,8 @@
|
||||
import { d as escape_html, f as getContext, n as noop } from './index-DV2ddKt_.js';
|
||||
import { f as escape_html, h as getContext } from './index2-DP7VISHE.js';
|
||||
import 'clsx';
|
||||
import { l as writable } from './exports-t4TpQnRz.js';
|
||||
import './state.svelte-DWNB1VSO.js';
|
||||
import './root-DBd7NWpv.js';
|
||||
import { w as writable } from './index-CHCwDMOw.js';
|
||||
|
||||
function create_updated_store() {
|
||||
const { set, subscribe } = writable(false);
|
||||
@@ -12,12 +14,6 @@ function create_updated_store() {
|
||||
};
|
||||
}
|
||||
}
|
||||
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
|
||||
if (is_legacy) {
|
||||
({
|
||||
url: new URL("https://example.com")
|
||||
});
|
||||
}
|
||||
const stores = {
|
||||
updated: /* @__PURE__ */ create_updated_store()
|
||||
};
|
||||
@@ -43,4 +39,4 @@ function Error$1($$renderer, $$props) {
|
||||
}
|
||||
|
||||
export { Error$1 as default };
|
||||
//# sourceMappingURL=error.svelte-BRgFNICv.js.map
|
||||
//# sourceMappingURL=error.svelte--Ra93cKZ.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"error.svelte--Ra93cKZ.js","sources":["../../../.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { j as getContext, c as escape_html } from \"../../chunks/index2.js\";\nimport \"clsx\";\nimport \"../../chunks/state.svelte.js\";\nimport \"@sveltejs/kit/internal\";\nimport \"../../chunks/exports.js\";\nimport \"../../chunks/utils2.js\";\nimport { w as writable } from \"../../chunks/index.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../chunks/root.js\";\nfunction create_updated_store() {\n const { set, subscribe } = writable(false);\n {\n return {\n subscribe,\n // eslint-disable-next-line @typescript-eslint/require-await\n check: async () => false\n };\n }\n}\nconst stores = {\n updated: /* @__PURE__ */ create_updated_store()\n};\n({\n check: stores.updated.check\n});\nfunction context() {\n return getContext(\"__request__\");\n}\nconst page$1 = {\n get error() {\n return context().page.error;\n },\n get status() {\n return context().page.status;\n }\n};\nconst page = page$1;\nfunction Error$1($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n });\n}\nexport {\n Error$1 as default\n};\n"],"names":[],"mappings":";;;;;;AASA,SAAS,oBAAoB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE;AACF,IAAI,OAAO;AACX,MAAM,SAAS;AACf;AACA,MAAM,KAAK,EAAE,YAAY;AACzB,KAAK;AACL,EAAE;AACF;AACA,MAAM,MAAM,GAAG;AACf,EAAE,OAAO,kBAAkB,oBAAoB;AAC/C,CAAC;AACD,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC;AAClC;AACA,MAAM,MAAM,GAAG;AACf,EAAE,IAAI,KAAK,GAAG;AACd,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC/B,EAAE,CAAC;AACH,EAAE,IAAI,MAAM,GAAG;AACf,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAChC,EAAE;AACF,CAAC;AACD,MAAM,IAAI,GAAG,MAAM;AACnB,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACvG,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"error.svelte-BRgFNICv.js","sources":["../../../.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { n as noop, g as getContext, e as escape_html } from \"../../chunks/index.js\";\nimport \"clsx\";\nimport { w as writable } from \"../../chunks/exports.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../chunks/root.js\";\nimport \"@sveltejs/kit/internal\";\nimport \"../../chunks/utils.js\";\nfunction create_updated_store() {\n const { set, subscribe } = writable(false);\n {\n return {\n subscribe,\n // eslint-disable-next-line @typescript-eslint/require-await\n check: async () => false\n };\n }\n}\nconst is_legacy = noop.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop.toString());\nif (is_legacy) {\n ({\n data: {},\n form: null,\n error: null,\n params: {},\n route: { id: null },\n state: {},\n status: -1,\n url: new URL(\"https://example.com\")\n });\n}\nconst stores = {\n updated: /* @__PURE__ */ create_updated_store()\n};\n({\n check: stores.updated.check\n});\nfunction context() {\n return getContext(\"__request__\");\n}\nconst page$1 = {\n get error() {\n return context().page.error;\n },\n get status() {\n return context().page.status;\n }\n};\nconst page = page$1;\nfunction Error$1($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n });\n}\nexport {\n Error$1 as default\n};\n"],"names":[],"mappings":";;;;AAOA,SAAS,oBAAoB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE;AACF,IAAI,OAAO;AACX,MAAM,SAAS;AACf;AACA,MAAM,KAAK,EAAE,YAAY;AACzB,KAAK;AACL,EAAE;AACF;AACA,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjG,IAAI,SAAS,EAAE;AACf,EAAE,CAAC;AACH,IAOI,GAAG,EAAE,IAAI,GAAG,CAAC,qBAAqB;AACtC,GAAG;AACH;AACA,MAAM,MAAM,GAAG;AACf,EAAE,OAAO,kBAAkB,oBAAoB;AAC/C,CAAC;AACD,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC;AAClC;AACA,MAAM,MAAM,GAAG;AACf,EAAE,IAAI,KAAK,GAAG;AACd,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC/B,EAAE,CAAC;AACH,EAAE,IAAI,MAAM,GAAG;AACf,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAChC,EAAE;AACF,CAAC;AACD,MAAM,IAAI,GAAG,MAAM;AACnB,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACvG,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,59 @@
|
||||
import { n as noop, j as safe_not_equal } from './index2-DP7VISHE.js';
|
||||
import 'clsx';
|
||||
|
||||
const subscriber_queue = [];
|
||||
function readable(value, start) {
|
||||
return {
|
||||
subscribe: writable(value, start).subscribe
|
||||
};
|
||||
}
|
||||
function writable(value, start = noop) {
|
||||
let stop = null;
|
||||
const subscribers = /* @__PURE__ */ new Set();
|
||||
function set(new_value) {
|
||||
if (safe_not_equal(value, new_value)) {
|
||||
value = new_value;
|
||||
if (stop) {
|
||||
const run_queue = !subscriber_queue.length;
|
||||
for (const subscriber of subscribers) {
|
||||
subscriber[1]();
|
||||
subscriber_queue.push(subscriber, value);
|
||||
}
|
||||
if (run_queue) {
|
||||
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
||||
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
||||
}
|
||||
subscriber_queue.length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function update(fn) {
|
||||
set(fn(
|
||||
/** @type {T} */
|
||||
value
|
||||
));
|
||||
}
|
||||
function subscribe(run, invalidate = noop) {
|
||||
const subscriber = [run, invalidate];
|
||||
subscribers.add(subscriber);
|
||||
if (subscribers.size === 1) {
|
||||
stop = start(set, update) || noop;
|
||||
}
|
||||
run(
|
||||
/** @type {T} */
|
||||
value
|
||||
);
|
||||
return () => {
|
||||
subscribers.delete(subscriber);
|
||||
if (subscribers.size === 0 && stop) {
|
||||
stop();
|
||||
stop = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
return { set, update, subscribe };
|
||||
}
|
||||
|
||||
export { readable as r, writable as w };
|
||||
//# sourceMappingURL=index-CHCwDMOw.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-CHCwDMOw.js","sources":["../../../.svelte-kit/adapter-node/chunks/index.js"],"sourcesContent":["import { n as noop, s as safe_not_equal } from \"./index2.js\";\nimport \"clsx\";\nconst subscriber_queue = [];\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\nfunction writable(value, start = noop) {\n let stop = null;\n const subscribers = /* @__PURE__ */ new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) {\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(\n /** @type {T} */\n value\n ));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set, update) || noop;\n }\n run(\n /** @type {T} */\n value\n );\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0 && stop) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nexport {\n readable as r,\n writable as w\n};\n"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG,EAAE;AAC3B,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE;AAChC,EAAE,OAAO;AACT,IAAI,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,GAAG;AACH;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE;AACvC,EAAE,IAAI,IAAI,GAAG,IAAI;AACjB,EAAE,MAAM,WAAW,mBAAmB,IAAI,GAAG,EAAE;AAC/C,EAAE,SAAS,GAAG,CAAC,SAAS,EAAE;AAC1B,IAAI,IAAI,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;AAC1C,MAAM,KAAK,GAAG,SAAS;AACvB,MAAM,IAAI,IAAI,EAAE;AAChB,QAAQ,MAAM,SAAS,GAAG,CAAC,gBAAgB,CAAC,MAAM;AAClD,QAAQ,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;AAC9C,UAAU,UAAU,CAAC,CAAC,CAAC,EAAE;AACzB,UAAU,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;AAClD,QAAQ;AACR,QAAQ,IAAI,SAAS,EAAE;AACvB,UAAU,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;AAC/D,YAAY,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3D,UAAU;AACV,UAAU,gBAAgB,CAAC,MAAM,GAAG,CAAC;AACrC,QAAQ;AACR,MAAM;AACN,IAAI;AACJ,EAAE;AACF,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE;AACtB,IAAI,GAAG,CAAC,EAAE;AACV;AACA,MAAM;AACN,KAAK,CAAC;AACN,EAAE;AACF,EAAE,SAAS,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,EAAE;AAC7C,IAAI,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC;AACxC,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;AAC/B,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE;AAChC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI;AACvC,IAAI;AACJ,IAAI,GAAG;AACP;AACA,MAAM;AACN,KAAK;AACL,IAAI,OAAO,MAAM;AACjB,MAAM,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;AACpC,MAAM,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE;AAC1C,QAAQ,IAAI,EAAE;AACd,QAAQ,IAAI,GAAG,IAAI;AACnB,MAAM;AACN,IAAI,CAAC;AACL,EAAE;AACF,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE;AACnC;;;;"}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1666
-1162
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
|
||||
import 'clsx';
|
||||
import { n as noop } from './index2-DP7VISHE.js';
|
||||
import './root-DBd7NWpv.js';
|
||||
|
||||
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
|
||||
if (is_legacy) {
|
||||
({
|
||||
url: new URL("https://example.com")
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=state.svelte-DWNB1VSO.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.svelte-DWNB1VSO.js","sources":["../../../.svelte-kit/adapter-node/chunks/state.svelte.js"],"sourcesContent":["import \"clsx\";\nimport { n as noop } from \"./index2.js\";\nimport \"./exports.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"./root.js\";\nconst is_legacy = noop.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop.toString());\nif (is_legacy) {\n ({\n data: {},\n form: null,\n error: null,\n params: {},\n route: { id: null },\n state: {},\n status: -1,\n url: new URL(\"https://example.com\")\n });\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjG,IAAI,SAAS,EAAE;AACf,EAAE,CAAC;AACH,IAOI,GAAG,EAAE,IAAI,GAAG,CAAC,qBAAqB;AACtC,GAAG;AACH"}
|
||||
+24
-11
@@ -1,6 +1,7 @@
|
||||
import { w as with_request_store, t as text_decoder, b as base64_decode, r as root, d as decode_pathname, D as DEV, n as normalize_path, a as disable_search, c as decode_params, v as validate_layout_server_exports, e as validate_layout_exports, f as validate_page_server_exports, g as validate_page_exports, h as text_encoder, i as resolve, m as make_trackable, j as get_relative_path, k as base64_encode, l as writable, o as readable } from './chunks/exports-t4TpQnRz.js';
|
||||
import { D as DevalueError, i as is_primitive, g as get_type, a as is_plain_object, e as enumerable_symbols, s as stringify_key, b as stringify_string, c as browser, u as uneval } from './chunks/index2-DP7VISHE.js';
|
||||
import { H as HttpError, j as json, t as text, S as SvelteKitError, R as Redirect, e as error, A as ActionFailure } from './chunks/index-B2LGyy1l.js';
|
||||
import { D as DevalueError, i as is_primitive, g as get_type, a as is_plain_object, e as enumerable_symbols, s as stringify_key, b as stringify_string, u as uneval } from './chunks/index-DV2ddKt_.js';
|
||||
import { w as with_request_store, t as text_decoder, b as base64_decode, r as root, d as decode_pathname, n as normalize_path, a as disable_search, c as decode_params, v as validate_layout_server_exports, e as validate_layout_exports, f as validate_page_server_exports, g as validate_page_exports, h as text_encoder, i as resolve, m as make_trackable, j as get_relative_path, k as base64_encode } from './chunks/root-DBd7NWpv.js';
|
||||
import { w as writable, r as readable } from './chunks/index-CHCwDMOw.js';
|
||||
import 'clsx';
|
||||
|
||||
/**
|
||||
@@ -1182,7 +1183,19 @@ const options = {
|
||||
service_worker: false,
|
||||
service_worker_options: void 0,
|
||||
templates: {
|
||||
app: ({ head, body, assets, nonce, env }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
||||
app: ({ head, body, assets, nonce, env }) => `<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='4' fill='%231e293b'/><text x='16' y='22' font-size='18' font-family='system-ui' fill='%2394a3b8' text-anchor='middle'>S</text></svg>" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, viewport-fit=cover" />
|
||||
<meta name="theme-color" content="#0f172a" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="Stackq" />
|
||||
<link rel="apple-touch-icon" href="/icon.svg" />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
` + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
||||
error: ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
|
||||
|
||||
<style>
|
||||
@@ -1254,7 +1267,7 @@ const options = {
|
||||
<div class="error">
|
||||
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
||||
},
|
||||
version_hash: "1cw4viz"
|
||||
version_hash: "1lkqwc1"
|
||||
};
|
||||
async function get_hooks() {
|
||||
let handle;
|
||||
@@ -2015,7 +2028,7 @@ async function handle_action_json_request(event, event_state, options2, server)
|
||||
check_named_default_separate(actions);
|
||||
try {
|
||||
const data = await call_action(event, event_state, actions);
|
||||
if (DEV) ;
|
||||
if (browser) ;
|
||||
if (data instanceof ActionFailure) {
|
||||
return action_json({
|
||||
type: "failure",
|
||||
@@ -2100,7 +2113,7 @@ async function handle_action_request(event, event_state, server) {
|
||||
check_named_default_separate(actions);
|
||||
try {
|
||||
const data = await call_action(event, event_state, actions);
|
||||
if (DEV) ;
|
||||
if (browser) ;
|
||||
if (data instanceof ActionFailure) {
|
||||
return {
|
||||
type: "failure",
|
||||
@@ -3391,7 +3404,7 @@ async function render_response({
|
||||
csp: csp.script_needs_nonce ? { nonce: csp.nonce } : { hash: csp.script_needs_hash }
|
||||
};
|
||||
try {
|
||||
if (DEV) ;
|
||||
if (browser) ;
|
||||
rendered = await with_request_store({ event, state: event_state }, async () => {
|
||||
if (relative) override({ base: base$1, assets: assets$1 });
|
||||
const maybe_promise = options2.root.render(props, render_opts);
|
||||
@@ -4257,7 +4270,7 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
||||
const ssr = nodes.ssr();
|
||||
const csr = nodes.csr();
|
||||
if (ssr === false && !(state.prerendering && should_prerender_data)) {
|
||||
if (DEV && action_result && !event.request.headers.has("x-sveltekit-action")) ;
|
||||
if (browser && action_result && !event.request.headers.has("x-sveltekit-action")) ;
|
||||
return await render_response({
|
||||
branch: [],
|
||||
fetched,
|
||||
@@ -5110,12 +5123,12 @@ async function internal_respond(request, options2, manifest, state) {
|
||||
if (url.pathname === base || url.pathname === base + "/") {
|
||||
trailing_slash = "always";
|
||||
} else if (page_nodes) {
|
||||
if (DEV) ;
|
||||
if (browser) ;
|
||||
trailing_slash = page_nodes.trailing_slash();
|
||||
} else if (route.endpoint) {
|
||||
const node = await route.endpoint();
|
||||
trailing_slash = node.trailingSlash ?? "never";
|
||||
if (DEV) ;
|
||||
if (browser) ;
|
||||
}
|
||||
if (!is_data_request) {
|
||||
const normalized = normalize_path(url.pathname, trailing_slash);
|
||||
@@ -5375,7 +5388,7 @@ async function internal_respond(request, options2, manifest, state) {
|
||||
});
|
||||
}
|
||||
if (state.depth === 0) {
|
||||
if (DEV && event2.url.pathname === "/.well-known/appspecific/com.chrome.devtools.json") ;
|
||||
if (browser && event2.url.pathname === "/.well-known/appspecific/com.chrome.devtools.json") ;
|
||||
return await respond_with_error({
|
||||
event: event2,
|
||||
event_state,
|
||||
|
||||
File diff suppressed because one or more lines are too long
+59
-11
@@ -7,17 +7,23 @@ function __memo(fn) {
|
||||
return {
|
||||
appDir: "_app",
|
||||
appPath: "_app",
|
||||
assets: new Set([]),
|
||||
mimeTypes: {},
|
||||
assets: new Set(["icon.svg"]),
|
||||
mimeTypes: {".svg":"image/svg+xml"},
|
||||
_: {
|
||||
client: {start:"_app/immutable/entry/start.BXvCRdku.js",app:"_app/immutable/entry/app.c69iw9ai.js",imports:["_app/immutable/entry/start.BXvCRdku.js","_app/immutable/chunks/BapE3c1q.js","_app/immutable/chunks/DZmckTjd.js","_app/immutable/chunks/Dexp9pM5.js","_app/immutable/chunks/agKGoZF1.js","_app/immutable/entry/app.c69iw9ai.js","_app/immutable/chunks/CRDN6Mh7.js","_app/immutable/chunks/Dexp9pM5.js","_app/immutable/chunks/DZmckTjd.js","_app/immutable/chunks/agKGoZF1.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/25AjRaeI.js","_app/immutable/chunks/jOLfEXYH.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
||||
client: {start:"_app/immutable/entry/start.DFCcf04d.js",app:"_app/immutable/entry/app.CjPPJjga.js",imports:["_app/immutable/entry/start.DFCcf04d.js","_app/immutable/chunks/mylYChEY.js","_app/immutable/chunks/CeetFYTo.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/iYSIr-5j.js","_app/immutable/entry/app.CjPPJjga.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/BH97ETpZ.js","_app/immutable/chunks/Qgf5A_kA.js","_app/immutable/chunks/BD8q7RHQ.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/CeetFYTo.js","_app/immutable/chunks/UvStrNyM.js","_app/immutable/chunks/Cf_fsnlT.js","_app/immutable/chunks/Bysmuwvg.js","_app/immutable/chunks/iYSIr-5j.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
|
||||
nodes: [
|
||||
__memo(() => import('./chunks/0-pFHonfwH.js')),
|
||||
__memo(() => import('./chunks/1-p02jFeMq.js')),
|
||||
__memo(() => import('./chunks/2-CIfUOxeL.js')),
|
||||
__memo(() => import('./chunks/3-DEGBOxIZ.js')),
|
||||
__memo(() => import('./chunks/4-BhMW4SH8.js')),
|
||||
__memo(() => import('./chunks/5-BEJSjzl2.js'))
|
||||
__memo(() => import('./chunks/0-DnWjnlZZ.js')),
|
||||
__memo(() => import('./chunks/1-CPj2P69l.js')),
|
||||
__memo(() => import('./chunks/2-BkZHtq_F.js')),
|
||||
__memo(() => import('./chunks/3-cCn0mqix.js')),
|
||||
__memo(() => import('./chunks/4-BCRSHdes.js')),
|
||||
__memo(() => import('./chunks/5-nPlzqYVr.js')),
|
||||
__memo(() => import('./chunks/6-B7vtizRa.js')),
|
||||
__memo(() => import('./chunks/7-CshkMU4-.js')),
|
||||
__memo(() => import('./chunks/8-BqdZXKab.js')),
|
||||
__memo(() => import('./chunks/9-DoFOzLEw.js')),
|
||||
__memo(() => import('./chunks/10-SJ35hfdn.js')),
|
||||
__memo(() => import('./chunks/11-DmkTZ8Z7.js'))
|
||||
],
|
||||
remotes: {
|
||||
|
||||
@@ -30,26 +36,68 @@ return {
|
||||
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/accounts",
|
||||
pattern: /^\/accounts\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 8 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/items",
|
||||
pattern: /^\/items\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 4 },
|
||||
page: { layouts: [0,], errors: [1,], leaf: 9 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/items/[id]",
|
||||
pattern: /^\/items\/([^/]+?)\/?$/,
|
||||
params: [{"name":"id","optional":false,"rest":false,"chained":false}],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 10 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/login",
|
||||
pattern: /^\/login\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 5 },
|
||||
page: { layouts: [0,], errors: [1,], leaf: 11 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/logout",
|
||||
pattern: /^\/logout\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 6 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/receipts",
|
||||
pattern: /^\/receipts\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 3 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/receipts/new",
|
||||
pattern: /^\/receipts\/new\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 4 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/receipts/[id]",
|
||||
pattern: /^\/receipts\/([^/]+?)\/?$/,
|
||||
params: [{"name":"id","optional":false,"rest":false,"chained":false}],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 5 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/transactions",
|
||||
pattern: /^\/transactions\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 7 },
|
||||
endpoint: null
|
||||
}
|
||||
],
|
||||
prerendered_routes: new Set([]),
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user