This commit is contained in:
lovebird 2026-04-08 10:18:03 +02:00
parent 5fd4f83ce4
commit a667fa70af
7 changed files with 4203 additions and 226 deletions

View File

@ -18,6 +18,8 @@ export { PrivacyPolicyPage } from './policies/PrivacyPolicyPage';
export type { PrivacyPolicyPageProps } from './policies/PrivacyPolicyPage';
export { TermsPage } from './policies/TermsPage';
export type { TermsPageProps } from './policies/TermsPage';
export { ImpressumPage } from './policies/ImpressumPage';
export type { ImpressumPageProps } from './policies/ImpressumPage';
export { PolicyLinks } from './policies/PolicyLinks';
export type { PolicyLinksProps, PolicyLink } from './policies/PolicyLinks';
export { CheckoutFlow } from './checkout/CheckoutFlow';

View File

@ -2052,6 +2052,46 @@ function yn({
) } })
] });
}
function vn({
company: e = "Company Name",
representative: t = "Representative Name",
address: r = "Street, City, Country",
email: n = "info@example.com",
phone: a = "",
vatId: i = "",
register: l = "",
responsibleContent: c = "",
t: s,
className: m
}) {
const h = s || ((f) => f);
return /* @__PURE__ */ u(we, { title: h("Impressum — Legal Disclosure"), className: m, children: [
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Information pursuant to § 5 DDG</h3><p><strong>${e}</strong><br/>${r}</p><p><strong>Represented by:</strong><br/>${t}</p>`
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Contact</h3><p>Email: <a href="mailto:${n}" class="text-primary underline">${n}</a>` + (a ? `<br/>Phone: ${a}` : "") + "</p>"
) } }),
i && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>VAT ID</h3><p>VAT identification number pursuant to § 27a UStG:<br/><strong>${i}</strong></p>`
) } }),
l && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Commercial Register</h3><p>${l}</p>`
) } }),
c && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Responsible for Content</h3><p>${c}</p>`
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
'<h3>EU Dispute Resolution</h3><p>The European Commission provides a platform for online dispute resolution (ODR): <a href="https://ec.europa.eu/consumers/odr/" target="_blank" rel="noopener noreferrer" class="text-primary underline">https://ec.europa.eu/consumers/odr/</a>. We are not willing or obliged to participate in dispute resolution proceedings before a consumer arbitration board.</p>'
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
"<h3>Liability for Content</h3><p>As a service provider, we are responsible for our own content on these pages in accordance with general legislation pursuant to § 7(1) DDG. According to §§ 8 to 10 DDG, however, we are not obliged as a service provider to monitor transmitted or stored third-party information or to investigate circumstances that indicate illegal activity.</p>"
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
"<h3>Liability for Links</h3><p>Our website contains links to external third-party websites over whose content we have no influence. We therefore cannot accept any liability for this third-party content. The respective provider or operator of the linked pages is always responsible for the content of the linked pages.</p>"
) } })
] });
}
function xe(e) {
"@babel/helpers - typeof";
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? xe = function(t) {
@ -2060,41 +2100,41 @@ function xe(e) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, xe(e);
}
var Wt = "clover", vn = function(t) {
var Wt = "clover", gn = function(t) {
return t === 3 ? "v3" : t;
}, Ut = "https://js.stripe.com", gn = "".concat(Ut, "/").concat(Wt, "/stripe.js"), bn = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, xn = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, gt = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", wn = function(t) {
return bn.test(t) || xn.test(t);
}, Sn = function() {
}, Ut = "https://js.stripe.com", bn = "".concat(Ut, "/").concat(Wt, "/stripe.js"), xn = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, wn = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, gt = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Sn = function(t) {
return xn.test(t) || wn.test(t);
}, Nn = function() {
for (var t = document.querySelectorAll('script[src^="'.concat(Ut, '"]')), r = 0; r < t.length; r++) {
var n = t[r];
if (wn(n.src))
if (Sn(n.src))
return n;
}
return null;
}, bt = function(t) {
var r = t && !t.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
n.src = "".concat(gn).concat(r);
n.src = "".concat(bn).concat(r);
var a = document.head || document.body;
if (!a)
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
return a.appendChild(n), n;
}, Nn = function(t, r) {
}, Cn = function(t, r) {
!t || !t._registerWrapper || t._registerWrapper({
name: "stripe-js",
version: "8.8.0",
startTime: r
});
}, be = null, Ee = null, Pe = null, Cn = function(t) {
}, be = null, Ee = null, Pe = null, En = function(t) {
return function(r) {
t(new Error("Failed to load Stripe.js", {
cause: r
}));
};
}, En = function(t, r) {
}, Pn = function(t, r) {
return function() {
window.Stripe ? t(window.Stripe) : r(new Error("Stripe.js not available"));
};
}, Pn = function(t) {
}, _n = function(t) {
return be !== null ? be : (be = new Promise(function(r, n) {
if (typeof window > "u" || typeof document > "u") {
r(null);
@ -2105,7 +2145,7 @@ var Wt = "clover", vn = function(t) {
return;
}
try {
var a = Sn();
var a = Nn();
if (a && t)
console.warn(gt);
else if (!a)
@ -2114,7 +2154,7 @@ var Wt = "clover", vn = function(t) {
var i;
a.removeEventListener("load", Pe), a.removeEventListener("error", Ee), (i = a.parentNode) === null || i === void 0 || i.removeChild(a), a = bt(t);
}
Pe = En(r, n), Ee = Cn(n), a.addEventListener("load", Pe), a.addEventListener("error", Ee);
Pe = Pn(r, n), Ee = En(n), a.addEventListener("load", Pe), a.addEventListener("error", Ee);
} catch (l) {
n(l);
return;
@ -2122,16 +2162,16 @@ var Wt = "clover", vn = function(t) {
}), be.catch(function(r) {
return be = null, Promise.reject(r);
}));
}, _n = function(t, r, n) {
}, Tn = function(t, r, n) {
if (t === null)
return null;
var a = r[0];
if (typeof a != "string")
throw new Error("Expected publishable key to be of type string, got type ".concat(xe(a), " instead."));
var i = a.match(/^pk_test/), l = vn(t.version), c = Wt;
var i = a.match(/^pk_test/), l = gn(t.version), c = Wt;
i && l !== c && console.warn("Stripe.js@".concat(l, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(c, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
var s = t.apply(void 0, r);
return Nn(s, n), s;
return Cn(s, n), s;
}, xt = function(t) {
var r = `invalid load parameters; expected object of shape
@ -2151,8 +2191,8 @@ but received
r[n] = arguments[n];
Ye = !0;
var a = Date.now();
return Pn(ke).then(function(i) {
return _n(i, r, a);
return _n(ke).then(function(i) {
return Tn(i, r, a);
});
};
zt.setLoadParameters = function(e) {
@ -2168,7 +2208,7 @@ zt.setLoadParameters = function(e) {
throw new Error("You cannot change load parameters after calling loadStripe");
ke = xt(e);
};
function Tn({
function kn({
userId: e,
userDisplayName: t,
userEmail: r,
@ -2272,7 +2312,7 @@ function Tn({
}
);
}
const kn = Be(
const Rn = Be(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
@ -2288,8 +2328,8 @@ const kn = Be(
}
}
);
function Rn({ className: e, variant: t, ...r }) {
return /* @__PURE__ */ o("div", { className: U(kn({ variant: t }), e), ...r });
function On({ className: e, variant: t, ...r }) {
return /* @__PURE__ */ o("div", { className: U(Rn({ variant: t }), e), ...r });
}
const wt = {
pending: { label: "Pending", variant: "secondary", icon: /* @__PURE__ */ o(He, { className: "h-3.5 w-3.5" }) },
@ -2300,7 +2340,7 @@ const wt = {
refunded: { label: "Refunded", variant: "outline", icon: /* @__PURE__ */ o(qe, { className: "h-3.5 w-3.5" }) },
cancelled: { label: "Cancelled", variant: "destructive", icon: /* @__PURE__ */ o(Fe, { className: "h-3.5 w-3.5" }) }
};
function On({ onFetchTransactions: e, onNavigate: t, toast: r }) {
function In({ onFetchTransactions: e, onNavigate: t, toast: r }) {
const [n, a] = ae([]), [i, l] = ae(!0);
return _e(() => {
let c = !0;
@ -2346,7 +2386,7 @@ function On({ onFetchTransactions: e, onNavigate: t, toast: r }) {
/* @__PURE__ */ o("p", { className: "text-xs text-muted-foreground", children: h })
] }),
/* @__PURE__ */ u("div", { className: "flex items-center gap-3", children: [
/* @__PURE__ */ u(Rn, { variant: m.variant, className: "flex items-center gap-1", children: [
/* @__PURE__ */ u(On, { variant: m.variant, className: "flex items-center gap-1", children: [
m.icon,
m.label
] }),
@ -2456,51 +2496,11 @@ function On({ onFetchTransactions: e, onNavigate: t, toast: r }) {
}) })
] });
}
function In({
company: e = "Company Name",
representative: t = "Representative Name",
address: r = "Street, City, Country",
email: n = "info@example.com",
phone: a = "",
vatId: i = "",
register: l = "",
responsibleContent: c = "",
t: s,
className: m
}) {
const h = s || ((f) => f);
return /* @__PURE__ */ u(we, { title: h("Impressum — Legal Disclosure"), className: m, children: [
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Information pursuant to § 5 DDG</h3><p><strong>${e}</strong><br/>${r}</p><p><strong>Represented by:</strong><br/>${t}</p>`
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Contact</h3><p>Email: <a href="mailto:${n}" class="text-primary underline">${n}</a>` + (a ? `<br/>Phone: ${a}` : "") + "</p>"
) } }),
i && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>VAT ID</h3><p>VAT identification number pursuant to § 27a UStG:<br/><strong>${i}</strong></p>`
) } }),
l && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Commercial Register</h3><p>${l}</p>`
) } }),
c && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
`<h3>Responsible for Content</h3><p>${c}</p>`
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
'<h3>EU Dispute Resolution</h3><p>The European Commission provides a platform for online dispute resolution (ODR): <a href="https://ec.europa.eu/consumers/odr/" target="_blank" rel="noopener noreferrer" class="text-primary underline">https://ec.europa.eu/consumers/odr/</a>. We are not willing or obliged to participate in dispute resolution proceedings before a consumer arbitration board.</p>'
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
"<h3>Liability for Content</h3><p>As a service provider, we are responsible for our own content on these pages in accordance with general legislation pursuant to § 7(1) DDG. According to §§ 8 to 10 DDG, however, we are not obliged as a service provider to monitor transmitted or stored third-party information or to investigate circumstances that indicate illegal activity.</p>"
) } }),
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: h(
"<h3>Liability for Links</h3><p>Our website contains links to external third-party websites over whose content we have no influence. We therefore cannot accept any liability for this third-party content. The respective provider or operator of the linked pages is always responsible for the content of the linked pages.</p>"
) } })
] });
}
const Wn = (e) => {
var n, a, i, l;
const { pathname: t } = lr(), r = e.t || ((c) => c);
return ue("/cart/*", t) ? /* @__PURE__ */ o(Tr, { onCheckout: () => e.onNavigate("/checkout") }) : ue("/checkout/*", t) ? /* @__PURE__ */ o(
Tn,
kn,
{
userId: (n = e.user) == null ? void 0 : n.id,
userDisplayName: (i = (a = e.user) == null ? void 0 : a.user_metadata) == null ? void 0 : i.display_name,
@ -2519,25 +2519,26 @@ const Wn = (e) => {
locale: e.locale
}
) : ue("/purchases/*", t) ? /* @__PURE__ */ o(
On,
In,
{
onFetchTransactions: e.onFetchTransactions,
onNavigate: e.onNavigate,
toast: e.toast
}
) : ue("/shipping/*", t) ? /* @__PURE__ */ o(pn, { t: r }) : ue("/returns/*", t) ? /* @__PURE__ */ o(mn, { t: r }) : ue("/privacy/*", t) ? /* @__PURE__ */ o(hn, { siteName: e.siteName || "PolyMech", contactEmail: e.contactEmail || "privacy@polymech.org", t: r }) : ue("/terms/*", t) ? /* @__PURE__ */ o(yn, { siteName: e.siteName || "PolyMech", contactEmail: e.contactEmail || "legal@polymech.org", t: r }) : ue("/impressum/*", t) ? /* @__PURE__ */ o(In, { ...e.impressum || {}, t: r }) : null;
) : ue("/shipping/*", t) ? /* @__PURE__ */ o(pn, { t: r }) : ue("/returns/*", t) ? /* @__PURE__ */ o(mn, { t: r }) : ue("/privacy/*", t) ? /* @__PURE__ */ o(hn, { siteName: e.siteName || "PolyMech", contactEmail: e.contactEmail || "privacy@polymech.org", t: r }) : ue("/terms/*", t) ? /* @__PURE__ */ o(yn, { siteName: e.siteName || "PolyMech", contactEmail: e.contactEmail || "legal@polymech.org", t: r }) : ue("/impressum/*", t) ? /* @__PURE__ */ o(vn, { ...e.impressum || {}, t: r }) : null;
};
export {
xr as CartItemRow,
Tr as CartPage,
Tn as CheckoutFlow,
kn as CheckoutFlow,
dn as CheckoutPage,
Wn as EcommerceBundle,
vn as ImpressumPage,
kr as OrderSummary,
kt as PolicyLinks,
we as PolicyPage,
hn as PrivacyPolicyPage,
On as PurchasesList,
In as PurchasesList,
mn as ReturnsPage,
pn as ShippingPage,
yn as TermsPage,

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -100,6 +100,7 @@
"playwright": "^1.55.1",
"prismjs": "^1.30.0",
"tailwind-merge": "^3.5.0",
"vite-plugin-pwa": "^1.2.0",
"zod": "^3.25.76",
"zod-to-json-schema": "^3.24.6"
},

View File

@ -67,27 +67,6 @@
"node": ">=12"
}
},
"node_modules/@isaacs/balanced-match": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
"integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
"license": "MIT",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/@isaacs/brace-expansion": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
"integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
"license": "MIT",
"dependencies": {
"@isaacs/balanced-match": "^4.0.1"
},
"engines": {
"node": "20 || >=22"
}
},
"node_modules/@isaacs/cliui": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
@ -268,9 +247,9 @@
"license": "MIT"
},
"node_modules/brace-expansion": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz",
"integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==",
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
@ -497,12 +476,12 @@
}
},
"node_modules/glob/node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
"brace-expansion": "^2.0.2"
},
"engines": {
"node": ">=16 || 14 >=14.17"
@ -606,20 +585,41 @@
}
},
"node_modules/minimatch": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
"integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/brace-expansion": "^5.0.0"
"brace-expansion": "^5.0.5"
},
"engines": {
"node": "20 || >=22"
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/minimatch/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/minimatch/node_modules/brace-expansion": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
"integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/minipass": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",

File diff suppressed because it is too large Load Diff