5import * as Plot from "npm:@observablehq/plot@0.6.14";
6import { d3 } from "npm:d3@7";
7import { parseHTML } from "npm:linkedom@0.15";
8
9const style = `
8
9 // Create a mock document object to prevent undefined errors
10 const { document } = await import("https://cdn.jsdelivr.net/npm/linkedom@0.16.1/+esm").then((m) =>
11 m.parseHTML(`<html><body></body></html>`)
12 );
10 let [Plot, { document }, topojson, quakes, world] = await Promise.all([
11 import("https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.14/+esm"),
12 import("https://cdn.jsdelivr.net/npm/linkedom@0.15/+esm").then((l) => l.parseHTML("<a>")),
13 import("https://cdn.jsdelivr.net/npm/topojson@3/+esm"),
14 fetch(dataUrl).then((r) => r.json()),
4export async function fabw(board) {
5 // Import d3 and Plot with a server-side compatible approach
6 const { document } = await import("https://esm.sh/linkedom@0.16.1").then((m) =>
7 m.parseHTML(`<html><body></body></html>`)
8 );
39
40 // Create a mock document object to prevent undefined errors
41 const { document } = await import("https://cdn.jsdelivr.net/npm/linkedom@0.16.1/+esm").then((m) =>
42 m.parseHTML(`<html><body></body></html>`)
43 );
8
9 // Create a mock document object to prevent undefined errors
10 const { document } = await import("https://cdn.jsdelivr.net/npm/linkedom@0.16.1/+esm").then((m) =>
11 m.parseHTML(`<html><body></body></html>`)
12 );
1import { parseHTML } from 'https://esm.sh/linkedom@0.16.0';
2
3export default async function server(request: Request): Promise<Response> {
1import { DOMParser } from "https://esm.sh/linkedom@0.16.1";
2import { blob } from "https://esm.town/v/std/blob";
3
1import { isProbablyReaderable, Readability } from "npm:@mozilla/readability@^0.5.0";
2import { DOMParser } from "npm:linkedom@0.16.10";
3import { marked } from "npm:marked@12.0.1";
4import { getSubtitles } from "npm:youtube-captions-scraper@^2.0.1";
1import { DOMParser } from "https://esm.sh/linkedom";
2
3export default async function server(request: Request): Promise<Response> {