Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
fa86b84
chore: add netlify
Feb 13, 2024
c2337f0
chore: add netlify
Feb 13, 2024
ee111e3
fix: change prerender dest
Feb 13, 2024
4d9d482
fix: change prerender dest
Feb 13, 2024
bf6569e
fix: remove prerender
Feb 13, 2024
8d13bde
fix: id
Feb 13, 2024
9d93b39
fix: cookie
Feb 13, 2024
6a4e76e
fix: cookie
Feb 13, 2024
18818f6
fix: cookie
Feb 13, 2024
fe7fa1b
fix: cookie
Feb 13, 2024
64890c6
fix: cookie
Feb 13, 2024
067123e
fix: cookie
Feb 13, 2024
618524e
fix: cookie
Feb 13, 2024
2947a4e
feat: add chop
Feb 13, 2024
3899cf8
fix: shoe
Feb 14, 2024
c2dabd6
fix: shoe
Feb 14, 2024
ffb07be
fix: form
Feb 14, 2024
b79ffcd
fix: form
Feb 14, 2024
538f7b6
fix: form
Feb 14, 2024
eec2bba
fix: form
Feb 14, 2024
24f9a92
fix: form
Feb 14, 2024
3a621cb
fix: form
Feb 14, 2024
6f55acc
fix: relation
Feb 14, 2024
7b65038
fix: relation
Feb 14, 2024
61e8ee3
fix: relation
Feb 14, 2024
cef3822
fix: relation
Feb 14, 2024
f28f63f
fix: relation
Feb 14, 2024
1af9247
fix: relation
Feb 14, 2024
152cb92
fix: relation
Feb 14, 2024
9ffc463
fix: relation
Feb 14, 2024
2824a18
fix: relation
Feb 14, 2024
c841dd3
fix: relation
Feb 14, 2024
a5e6e18
fix: relation
Feb 14, 2024
9766a7e
fix: relation
Feb 14, 2024
ba9710c
fix: relation
Feb 14, 2024
b4d5ae1
fix: relation
Feb 14, 2024
299039b
fix: change to btn
Feb 14, 2024
1e38c08
fix: change to btn
Feb 14, 2024
a8e7764
fix: change to btn
Feb 14, 2024
42f70bc
fix: change to btn
Feb 14, 2024
6527e29
fix: change to btn
Feb 14, 2024
2130667
fix: change to btn
Feb 14, 2024
deb608f
fix: change to btn
Feb 14, 2024
af91e9d
fix: change to btn
Feb 14, 2024
7f62aa0
fix: change to btn
Feb 14, 2024
a8669d6
fix: change to btn
Feb 14, 2024
e4cfac1
fix: change to btn
Feb 14, 2024
c6cffaa
fix: change to btn
Feb 14, 2024
0c0ea5e
fix: change to btn
Feb 14, 2024
e5f70fd
fix: change to btn
Feb 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .netlify/functions-internal/ssr/_empty-middleware.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const onRequest = undefined;

export { onRequest };
6 changes: 6 additions & 0 deletions .netlify/functions-internal/ssr/chunks/_id__LgEstgdS.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export { renderers } from '../renderers.mjs';
export { onRequest } from '../_empty-middleware.mjs';

const page = () => import('./pages/_id__m9dLpwAO.mjs').then(n => n._);

export { page };
6 changes: 6 additions & 0 deletions .netlify/functions-internal/ssr/chunks/_id__ZyKL6-B1.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export { renderers } from '../renderers.mjs';
export { onRequest } from '../_empty-middleware.mjs';

const page = () => import('./pages/_id__w40geAFS.mjs');

export { page };
Original file line number Diff line number Diff line change
@@ -0,0 +1,368 @@
import { A as AstroError, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as MissingSharp } from '../astro_SZKTg0q5.mjs';

function removeTrailingForwardSlash(path) {
return path.endsWith("/") ? path.slice(0, path.length - 1) : path;
}
function removeLeadingForwardSlash(path) {
return path.startsWith("/") ? path.substring(1) : path;
}
function trimSlashes(path) {
return path.replace(/^\/|\/$/g, "");
}
function isString(path) {
return typeof path === "string" || path instanceof String;
}
function joinPaths(...paths) {
return paths.filter(isString).map((path, i) => {
if (i === 0) {
return removeTrailingForwardSlash(path);
} else if (i === paths.length - 1) {
return removeLeadingForwardSlash(path);
} else {
return trimSlashes(path);
}
}).join("/");
}
function isRemotePath(src) {
return /^(http|ftp|https|ws):?\/\//.test(src) || src.startsWith("data:");
}

const VALID_SUPPORTED_FORMATS = [
"jpeg",
"jpg",
"png",
"tiff",
"webp",
"gif",
"svg",
"avif"
];
const DEFAULT_OUTPUT_FORMAT = "webp";
const DEFAULT_HASH_PROPS = ["src", "width", "height", "format", "quality"];

function isESMImportedImage(src) {
return typeof src === "object";
}
function isRemoteImage(src) {
return typeof src === "string";
}

function matchPattern(url, remotePattern) {
return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
}
function matchPort(url, port) {
return !port || port === url.port;
}
function matchProtocol(url, protocol) {
return !protocol || protocol === url.protocol.slice(0, -1);
}
function matchHostname(url, hostname, allowWildcard) {
if (!hostname) {
return true;
} else if (!allowWildcard || !hostname.startsWith("*")) {
return hostname === url.hostname;
} else if (hostname.startsWith("**.")) {
const slicedHostname = hostname.slice(2);
return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
} else if (hostname.startsWith("*.")) {
const slicedHostname = hostname.slice(1);
const additionalSubdomains = url.hostname.replace(slicedHostname, "").split(".").filter(Boolean);
return additionalSubdomains.length === 1;
}
return false;
}
function matchPathname(url, pathname, allowWildcard) {
if (!pathname) {
return true;
} else if (!allowWildcard || !pathname.endsWith("*")) {
return pathname === url.pathname;
} else if (pathname.endsWith("/**")) {
const slicedPathname = pathname.slice(0, -2);
return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
} else if (pathname.endsWith("/*")) {
const slicedPathname = pathname.slice(0, -1);
const additionalPathChunks = url.pathname.replace(slicedPathname, "").split("/").filter(Boolean);
return additionalPathChunks.length === 1;
}
return false;
}
function isRemoteAllowed(src, {
domains = [],
remotePatterns = []
}) {
if (!isRemotePath(src))
return false;
const url = new URL(src);
return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
}

function isLocalService(service) {
if (!service) {
return false;
}
return "transform" in service;
}
function parseQuality(quality) {
let result = parseInt(quality);
if (Number.isNaN(result)) {
return quality;
}
return result;
}
const baseService = {
propertiesToHash: DEFAULT_HASH_PROPS,
validateOptions(options) {
if (!options.src || typeof options.src !== "string" && typeof options.src !== "object") {
throw new AstroError({
...ExpectedImage,
message: ExpectedImage.message(
JSON.stringify(options.src),
typeof options.src,
JSON.stringify(options, (_, v) => v === void 0 ? null : v)
)
});
}
if (!isESMImportedImage(options.src)) {
if (options.src.startsWith("/@fs/") || !isRemotePath(options.src) && !options.src.startsWith("/")) {
throw new AstroError({
...LocalImageUsedWrongly,
message: LocalImageUsedWrongly.message(options.src)
});
}
let missingDimension;
if (!options.width && !options.height) {
missingDimension = "both";
} else if (!options.width && options.height) {
missingDimension = "width";
} else if (options.width && !options.height) {
missingDimension = "height";
}
if (missingDimension) {
throw new AstroError({
...MissingImageDimension,
message: MissingImageDimension.message(missingDimension, options.src)
});
}
} else {
if (!VALID_SUPPORTED_FORMATS.includes(options.src.format)) {
throw new AstroError({
...UnsupportedImageFormat,
message: UnsupportedImageFormat.message(
options.src.format,
options.src.src,
VALID_SUPPORTED_FORMATS
)
});
}
if (options.widths && options.densities) {
throw new AstroError(IncompatibleDescriptorOptions);
}
if (options.src.format === "svg") {
options.format = "svg";
}
if (options.src.format === "svg" && options.format !== "svg" || options.src.format !== "svg" && options.format === "svg") {
throw new AstroError(UnsupportedImageConversion);
}
}
if (!options.format) {
options.format = DEFAULT_OUTPUT_FORMAT;
}
if (options.width)
options.width = Math.round(options.width);
if (options.height)
options.height = Math.round(options.height);
return options;
},
getHTMLAttributes(options) {
const { targetWidth, targetHeight } = getTargetDimensions(options);
const { src, width, height, format, quality, densities, widths, formats, ...attributes } = options;
return {
...attributes,
width: targetWidth,
height: targetHeight,
loading: attributes.loading ?? "lazy",
decoding: attributes.decoding ?? "async"
};
},
getSrcSet(options) {
const srcSet = [];
const { targetWidth } = getTargetDimensions(options);
const { widths, densities } = options;
const targetFormat = options.format ?? DEFAULT_OUTPUT_FORMAT;
let imageWidth = options.width;
let maxWidth = Infinity;
if (isESMImportedImage(options.src)) {
imageWidth = options.src.width;
maxWidth = imageWidth;
}
const {
width: transformWidth,
height: transformHeight,
...transformWithoutDimensions
} = options;
const allWidths = [];
if (densities) {
const densityValues = densities.map((density) => {
if (typeof density === "number") {
return density;
} else {
return parseFloat(density);
}
});
const densityWidths = densityValues.sort().map((density) => Math.round(targetWidth * density));
allWidths.push(
...densityWidths.map((width, index) => ({
maxTargetWidth: Math.min(width, maxWidth),
descriptor: `${densityValues[index]}x`
}))
);
} else if (widths) {
allWidths.push(
...widths.map((width) => ({
maxTargetWidth: Math.min(width, maxWidth),
descriptor: `${width}w`
}))
);
}
for (const { maxTargetWidth, descriptor } of allWidths) {
const srcSetTransform = { ...transformWithoutDimensions };
if (maxTargetWidth !== imageWidth) {
srcSetTransform.width = maxTargetWidth;
} else {
if (options.width && options.height) {
srcSetTransform.width = options.width;
srcSetTransform.height = options.height;
}
}
srcSet.push({
transform: srcSetTransform,
descriptor,
attributes: {
type: `image/${targetFormat}`
}
});
}
return srcSet;
},
getURL(options, imageConfig) {
const searchParams = new URLSearchParams();
if (isESMImportedImage(options.src)) {
searchParams.append("href", options.src.src);
} else if (isRemoteAllowed(options.src, imageConfig)) {
searchParams.append("href", options.src);
} else {
return options.src;
}
const params = {
w: "width",
h: "height",
q: "quality",
f: "format"
};
Object.entries(params).forEach(([param, key]) => {
options[key] && searchParams.append(param, options[key].toString());
});
const imageEndpoint = joinPaths("/", "/_image");
return `${imageEndpoint}?${searchParams}`;
},
parseURL(url) {
const params = url.searchParams;
if (!params.has("href")) {
return void 0;
}
const transform = {
src: params.get("href"),
width: params.has("w") ? parseInt(params.get("w")) : void 0,
height: params.has("h") ? parseInt(params.get("h")) : void 0,
format: params.get("f"),
quality: params.get("q")
};
return transform;
}
};
function getTargetDimensions(options) {
let targetWidth = options.width;
let targetHeight = options.height;
if (isESMImportedImage(options.src)) {
const aspectRatio = options.src.width / options.src.height;
if (targetHeight && !targetWidth) {
targetWidth = Math.round(targetHeight * aspectRatio);
} else if (targetWidth && !targetHeight) {
targetHeight = Math.round(targetWidth / aspectRatio);
} else if (!targetWidth && !targetHeight) {
targetWidth = options.src.width;
targetHeight = options.src.height;
}
}
return {
targetWidth,
targetHeight
};
}

let sharp;
const qualityTable = {
low: 25,
mid: 50,
high: 80,
max: 100
};
async function loadSharp() {
let sharpImport;
try {
sharpImport = (await import('sharp')).default;
} catch (e) {
throw new AstroError(MissingSharp);
}
return sharpImport;
}
const sharpService = {
validateOptions: baseService.validateOptions,
getURL: baseService.getURL,
parseURL: baseService.parseURL,
getHTMLAttributes: baseService.getHTMLAttributes,
getSrcSet: baseService.getSrcSet,
async transform(inputBuffer, transformOptions, config) {
if (!sharp)
sharp = await loadSharp();
const transform = transformOptions;
if (transform.format === "svg")
return { data: inputBuffer, format: "svg" };
const result = sharp(inputBuffer, {
failOnError: false,
pages: -1,
limitInputPixels: config.service.config.limitInputPixels
});
result.rotate();
if (transform.height && !transform.width) {
result.resize({ height: Math.round(transform.height) });
} else if (transform.width) {
result.resize({ width: Math.round(transform.width) });
}
if (transform.format) {
let quality = void 0;
if (transform.quality) {
const parsedQuality = parseQuality(transform.quality);
if (typeof parsedQuality === "number") {
quality = parsedQuality;
} else {
quality = transform.quality in qualityTable ? qualityTable[transform.quality] : void 0;
}
}
result.toFormat(transform.format, { quality });
}
const { data, info } = await result.toBuffer({ resolveWithObject: true });
return {
data,
format: info.format
};
}
};
var sharp_default = sharpService;

const sharp$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
__proto__: null,
default: sharp_default
}, Symbol.toStringTag, { value: 'Module' }));

export { DEFAULT_HASH_PROPS as D, isLocalService as a, isRemoteImage as b, isRemotePath as c, isRemoteAllowed as d, isESMImportedImage as i, sharp$1 as s };
Loading