julien-c HF staff commited on
Commit
2dfc950
1 Parent(s): 313c51c

npm run build

Browse files
.gitignore CHANGED
@@ -1,5 +1,4 @@
1
  .DS_Store
2
- dist/
3
  docs/.observablehq/cache/
4
  node_modules/
5
  yarn-error.log
 
1
  .DS_Store
 
2
  docs/.observablehq/cache/
3
  node_modules/
4
  yarn-error.log
dist/_file/data/events.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"name":"Sputnik 1","year":2020,"y":1},{"name":"Apollo 11","year":2021,"y":2},{"name":"Viking 1 and 2","year":2022,"y":4},{"name":"Space Shuttle Columbia","year":2023,"y":8},{"name":"Hubble Space Telescope","year":2024,"y":16},{"name":"ISS Construction","year":2025,"y":32}]
dist/_file/data/tags.json ADDED
@@ -0,0 +1 @@
 
 
1
+ ["region/region:us","region/region:eu","other/endpoints_compatible","other/autotrain_compatible","other/text-generation-inference","other/model-index","other/has_space","other/custom_code","other/4-bit","other/merge","other/co2_eq_emissions","other/8-bit","other/moe","library/pytorch","library/tf","library/jax","library/transformers","library/tensorboard","library/safetensors","library/diffusers","library/peft","library/stable-baselines3","library/onnx","library/ml-agents","library/gguf","library/sentence-transformers","library/keras","library/timm","library/flair","library/sample-factory","library/setfit","library/adapter-transformers","library/transformers.js","library/spacy","library/espnet","library/fastai","library/coreml","library/nemo","library/rust","library/joblib","library/fasttext","library/bertopic","library/sklearn","license/license:apache-2.0","license/license:mit","license/license:openrail","license/license:creativeml-openrail-m","license/license:other","license/license:cc-by-nc-4.0","license/license:llama2","license/license:cc-by-4.0","license/license:afl-3.0","license/license:cc-by-nc-sa-4.0","license/license:openrail++","license/license:cc-by-sa-4.0","license/license:gpl-3.0","license/license:cc","license/license:artistic-2.0","license/license:bigscience-openrail-m","license/license:bsd-3-clause","license/license:bigscience-bloom-rail-1.0","license/license:wtfpl","license/license:cc-by-nc-nd-4.0","license/license:bigcode-openrail-m","license/license:cc0-1.0","license/license:cc-by-sa-3.0","license/license:agpl-3.0","license/license:unlicense","license/license:gpl","license/license:bsd","license/license:cc-by-3.0","license/license:cc-by-2.0","license/license:cc-by-nc-2.0","language/en","language/zh","language/fr","language/de","language/es","language/ja","language/ko","language/ru","language/it","language/pt","language/ar","language/hi","language/tr","language/nl","language/sv","language/pl","language/multilingual","language/id","language/vi","language/fi","language/unk","language/ro","language/th","language/uk","language/fa","language/bn","language/ca","language/da","language/cs","language/ta","dataset/dataset:glue","dataset/dataset:squad","dataset/dataset:mozilla-foundation/common_voice_7_0","dataset/dataset:imdb","dataset/dataset:imagenet-1k","dataset/dataset:xtreme","dataset/dataset:wikipedia","dataset/dataset:mozilla-foundation/common_voice_11_0","dataset/dataset:common_voice","dataset/dataset:conll2003","dataset/dataset:squad_v2","dataset/dataset:Open-Orca/OpenOrca","dataset/dataset:marsyas/gtzan","dataset/dataset:bookcorpus","dataset/dataset:samsum","dataset/dataset:fka/awesome-chatgpt-prompts","dataset/dataset:clinc_oos","dataset/dataset:OpenAssistant/oasst1","dataset/dataset:c4","dataset/dataset:cnn_dailymail","dataset/dataset:facebook/voxpopuli","dataset/dataset:jondurbin/airoboros-2.2.1","dataset/dataset:super_glue","dataset/dataset:garage-bAInd/Open-Platypus","dataset/dataset:LDJnr/Capybara","dataset/dataset:Intel/orca_dpo_pairs","dataset/dataset:mozilla-foundation/common_voice_13_0","dataset/dataset:bigcode/starcoderdata","dataset/dataset:PolyAI/minds14","dataset/dataset:billsum","pipeline_tag/text-classification","pipeline_tag/token-classification","pipeline_tag/table-question-answering","pipeline_tag/question-answering","pipeline_tag/zero-shot-classification","pipeline_tag/translation","pipeline_tag/summarization","pipeline_tag/conversational","pipeline_tag/feature-extraction","pipeline_tag/text-generation","pipeline_tag/text2text-generation","pipeline_tag/fill-mask","pipeline_tag/sentence-similarity","pipeline_tag/text-to-speech","pipeline_tag/text-to-audio","pipeline_tag/automatic-speech-recognition","pipeline_tag/audio-to-audio","pipeline_tag/audio-classification","pipeline_tag/voice-activity-detection","pipeline_tag/depth-estimation","pipeline_tag/image-classification","pipeline_tag/object-detection","pipeline_tag/image-segmentation","pipeline_tag/text-to-image","pipeline_tag/image-to-text","pipeline_tag/image-to-image","pipeline_tag/image-to-video","pipeline_tag/unconditional-image-generation","pipeline_tag/video-classification","pipeline_tag/reinforcement-learning"]
dist/_import/components/timeline.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as Plot from "https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.13/+esm";
2
+
3
+ export function timeline(events, {width, height} = {}) {
4
+ return Plot.plot({
5
+ width,
6
+ height,
7
+ marginTop: 30,
8
+ x: {nice: true, label: null, tickFormat: ""},
9
+ y: {axis: null},
10
+ marks: [
11
+ Plot.ruleX(events, {x: "year", y: "y", markerEnd: "dot", strokeWidth: 2.5}),
12
+ Plot.ruleY([0]),
13
+ // Plot.text(events, {x: "year", y: "y", text: "name", lineAnchor: "bottom", dy: -10, lineWidth: 10, fontSize: 12})
14
+ ]
15
+ });
16
+ }
dist/_import/components/tree.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as Plot from "https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.13/+esm";
2
+
3
+ export function tree(tags, {width, height} = {}) {
4
+ return Plot.plot({
5
+ axis: null,
6
+ width,
7
+ height,
8
+ margin: 10,
9
+ marginLeft: 40,
10
+ marginRight: 120,
11
+ marks: [
12
+ Plot.tree(tags, {textStroke: "white"})
13
+ ]
14
+ });
15
+ }
dist/_observablehq/client.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{Inspector as v,Runtime as S}from"./runtime.js";import{Generators as d,resize as L,FileAttachment as x,Mutable as E,registerFile as _}from"./stdlib.js";const g=document.createElement("template");g.innerHTML='<button title="Copy code" class="observablehq-pre-copy"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 6C2 5.44772 2.44772 5 3 5H10C10.5523 5 11 5.44772 11 6V13C11 13.5523 10.5523 14 10 14H3C2.44772 14 2 13.5523 2 13V6Z M4 2.00004L12 2.00001C13.1046 2 14 2.89544 14 4.00001V12"></path></svg></button>',$();function $(){for(const e of document.querySelectorAll("pre:not([data-copy=none])")){const t=e.parentNode;if(t.classList.contains("observablehq-pre-container"))continue;const a=t.insertBefore(document.createElement("div"),e);a.className="observablehq-pre-container",Object.assign(a.dataset,e.dataset),a.appendChild(g.content.cloneNode(!0).firstChild).addEventListener("click",A),a.appendChild(e)}}async function A({currentTarget:e}){await navigator.clipboard.writeText(e.parentElement.textContent.trimEnd())}const i=document.querySelector("#observablehq-sidebar-toggle");if(i){let e=i.indeterminate;i.onclick=()=>{const a=matchMedia("(min-width: calc(640px + 6rem + 272px))").matches;e?(i.checked=!a,e=!1):i.checked===a&&(e=!0),i.indeterminate=e,e?sessionStorage.removeItem("observablehq-sidebar"):sessionStorage.setItem("observablehq-sidebar",i.checked)},addEventListener("keypress",a=>{a.code==="KeyB"&&(a.metaKey||a.altKey)&&!a.ctrlKey&&(a.target===document.body||a.target===i||a.target?.closest("#observablehq-sidebar"))&&(i.click(),a.preventDefault())});const t=`Toggle sidebar ${/Mac|iPhone/.test(navigator.platform)?/Firefox/.test(navigator.userAgent)?"\u2325":"\u2318":"Alt-"}B`;for(const a of document.querySelectorAll("#observablehq-sidebar-toggle, label[for='observablehq-sidebar-toggle']"))a.title=t}function D(e){e.detail>1&&e.preventDefault()}function B(){sessionStorage.setItem(`observablehq-sidebar:${this.firstElementChild.textContent}`,this.open)}for(const e of document.querySelectorAll("#observablehq-sidebar summary"))e.onmousedown=D,e.parentElement.ontoggle=B;const u=document.querySelector("#observablehq-toc");if(u){const e=u.appendChild(document.createElement("div"));e.classList.add("observablehq-secondary-link-highlight");const t=Array.from(document.querySelectorAll(u.dataset.selector)).reverse(),a=u.querySelectorAll(".observablehq-secondary-link"),l=()=>{for(const c of a)c.classList.remove("observablehq-secondary-link-active");if(location.hash)for(const c of t){const f=c.querySelector("a[href]")?.hash;if(f===location.hash){const n=c.getBoundingClientRect().top;if(0<n&&n<40){for(const r of a)if(r.querySelector("a[href]")?.hash===f)return r.classList.add("observablehq-secondary-link-active"),r;return}break}}for(const c of t){if(c.getBoundingClientRect().top>=innerHeight*.5)continue;const f=c.querySelector("a[href]")?.hash;for(const n of a)if(n.querySelector("a[href]")?.hash===f)return n.classList.add("observablehq-secondary-link-active"),n;break}},b=()=>{const c=l();e.style.cssText=c?`top: ${c.offsetTop}px; height: ${c.offsetHeight}px;`:""},p=new IntersectionObserver(b,{rootMargin:"0px 0px -50% 0px"});for(const c of t)p.observe(c)}function M(e){const t=new v(document.createElement("div"));return t.fulfilled(e),t._node.firstChild}function z(e){const t=new v(document.createElement("div"));t.rejected(e);const a=t._node.firstChild;return a.classList.add("observablehq--error"),a}const j=()=>import("https://cdn.jsdelivr.net/npm/lodash@4.17.21/+esm").then(e=>e.default),I=()=>import("https://cdn.jsdelivr.net/npm/arquero@5.4.0/+esm"),T=()=>import("https://cdn.jsdelivr.net/npm/apache-arrow@13.0.0/+esm"),H=()=>import("https://cdn.jsdelivr.net/npm/d3@7.8.5/+esm"),O=()=>import("./stdlib/dot.js").then(e=>e.default),P=()=>import("https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.28.0/+esm"),Q=()=>import("./stdlib/duckdb.js").then(e=>e.DuckDBClient),F=()=>import("https://cdn.jsdelivr.net/npm/htl@0.3.1/+esm"),K=()=>import("https://cdn.jsdelivr.net/npm/htl@0.3.1/+esm").then(e=>e.html),N=()=>import("https://cdn.jsdelivr.net/npm/htl@0.3.1/+esm").then(e=>e.svg),R=()=>import("./stdlib/inputs.js"),V=()=>import("https://cdn.jsdelivr.net/npm/leaflet@1.9.4/+esm"),G=()=>import("https://cdn.jsdelivr.net/npm/mapbox-gl@3.1.2/+esm").then(e=>e.default),Z=()=>import("./stdlib/mermaid.js").then(e=>e.default),J=()=>import("https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.13/+esm"),U=()=>import("./stdlib/sqlite.js").then(e=>e.default),W=()=>import("./stdlib/sqlite.js").then(e=>e.SQLiteDatabaseClient),X=()=>import("./stdlib/tex.js").then(e=>e.default),Y=()=>import("https://cdn.jsdelivr.net/npm/topojson-client@3.1.0/+esm"),ee=()=>import("./stdlib/vega-lite.js").then(e=>e.default);var te=Object.freeze({__proto__:null,Arrow:T,DuckDBClient:Q,Inputs:R,L:V,Plot:J,SQLite:U,SQLiteDatabaseClient:W,_:j,aq:I,d3:H,dot:O,duckdb:P,htl:F,html:K,mapboxgl:G,mermaid:Z,svg:N,tex:X,topojson:Y,vl:ee});const ae=()=>s("https://static.observableusercontent.com/files/3ccff97fd2d93da734e76829b2b066eafdaac6a1fafdec0faf6ebc443271cfc109d29e80dd217468fcb2aff1e6bffdc73f356cc48feb657f35378e6abbbb63b9",!0),oe=()=>s("https://static.observableusercontent.com/files/75d52e6c3130b1cae83cda89305e17b50f33e7420ef205587a135e8562bcfd22e483cf4fa2fb5df6dff66f9c5d19740be1cfaf47406286e2eb6574b49ffc685d",!0),ce=()=>s("https://static.observableusercontent.com/files/048ec3dfd528110c0665dfa363dd28bc516ffb7247231f3ab25005036717f5c4c232a5efc7bb74bc03037155cb72b1abe85a33d86eb9f1a336196030443be4f6",!0),ne=()=>s("https://static.observableusercontent.com/files/39837ec5121fcc163131dbc2fe8c1a2e0b3423a5d1e96b5ce371e2ac2e20a290d78b71a4fb08b9fa6a0107776e17fb78af313b8ea70f4cc6648fad68ddf06f7a",!0),se=()=>s("https://static.observableusercontent.com/files/87942b1f5d061a21fa4bb8f2162db44e3ef0f7391301f867ab5ba718b225a63091af20675f0bfe7f922db097b217b377135203a7eab34651e21a8d09f4e37252",!0),re=()=>s("https://static.observableusercontent.com/files/a6b0d94a7f5828fd133765a934f4c9746d2010e2f342d335923991f31b14120de96b5cb4f160d509d8dc627f0107d7f5b5070d2516f01e4c862b5b4867533000",!0),ie=()=>s("https://static.observableusercontent.com/files/76f13741128340cc88798c0a0b7fa5a2df8370f57554000774ab8ee9ae785ffa2903010cad670d4939af3e9c17e5e18e7e05ed2b38b848ac2fc1a0066aa0005f",!0),fe=()=>pe("https://static.observableusercontent.com/files/31d904f6e21d42d4963ece9c8cc4fbd75efcbdc404bf511bc79906f0a1be68b5a01e935f65123670ed04e35ca8cae3c2b943f82bf8db49c5a67c85cbb58db052"),le=()=>s("https://static.observableusercontent.com/files/31ca24545a0603dce099d10ee89ee5ae72d29fa55e8fc7c9ffb5ded87ac83060d80f1d9e21f4ae8eb04c1e8940b7287d179fe8060d887fb1f055f430e210007c",!0),be=()=>s("https://static.observableusercontent.com/files/715db1223e067f00500780077febc6cebbdd90c151d3d78317c802732252052ab0e367039872ab9c77d6ef99e5f55a0724b35ddc898a1c99cb14c31a379af80a",!0),de=()=>s("https://static.observableusercontent.com/files/c653108ab176088cacbb338eaf2344c4f5781681702bd6afb55697a3f91b511c6686ff469f3e3a27c75400001a2334dbd39a4499fe46b50a8b3c278b7d2f7fb5",!0),ue=()=>s("https://static.observableusercontent.com/files/693a46b22b33db0f042728700e0c73e836fa13d55446df89120682d55339c6db7cc9e574d3d73f24ecc9bc7eb9ac9a1e7e104a1ee52c00aab1e77eb102913c1f",!0);async function pe(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.json()}async function he(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.text()}async function s(e,t){const[a,l]=await Promise.all([he(e),import("https://cdn.jsdelivr.net/npm/d3-dsv@3.0.1/+esm")]);return l.csvParse(a,t&&l.autoType)}var me=Object.freeze({__proto__:null,aapl:ae,alphabet:oe,cars:ce,citywages:ne,diamonds:se,flare:re,industries:ie,miserables:fe,olympians:le,penguins:be,pizza:de,weather:ue});const ve={now:()=>d.now(),width:()=>d.width(document.querySelector("main")),resize:()=>L,FileAttachment:()=>x,Generators:()=>d,Mutable:()=>E,...te,...me},ge=new S(ve),y=ge.module(),q=new Map;function ye(e){const{id:t,inline:a,inputs:l=[],outputs:b=[],files:p=[],body:c}=e,f=[];q.get(t)?.variables.forEach(o=>o.delete()),q.set(t,{cell:e,variables:f});const n=document.querySelector(`#cell-${t}`);let r=null;const C=()=>(n.innerHTML="",n.classList.remove("observablehq--loading"),r=null),h=a?o=>(r?.(),w(o)||typeof o=="string"||!o?.[Symbol.iterator]?n.append(o):n.append(...o),o):o=>(r?.(),n.append(w(o)?o:M(o)),o),m=y.variable({_node:n,pending:()=>r=C,fulfilled:()=>r?.(),rejected:o=>(r?.(),console.error(o),n.append(z(o)))},{shadow:{display:()=>h,view:()=>o=>d.input(h(o))}});m.define(b.length?`cell ${t}`:null,l,c),f.push(m);for(const o of b)f.push(y.variable(!0).define(o,[`cell ${t}`],k=>k[o]));for(const o of p)_(o.name,o)}function w(e){return e instanceof Node&&e instanceof e.constructor}export{ye as define};
dist/_observablehq/runtime.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ // @observablehq/runtime v5.9.7 Copyright 2023 Observable, Inc.
2
+ function e(e,t,n){n=n||{};var r=e.ownerDocument,a=r.defaultView.CustomEvent;"function"==typeof a?a=new a(t,{detail:n}):((a=r.createEvent("Event")).initEvent(t,!1,!1),a.detail=n),e.dispatchEvent(a)}function t(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function n(e){return e===(0|e)+""}function r(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}const a=Symbol.prototype.toString;function o(e){return a.call(e)}const{getOwnPropertySymbols:i,prototype:{hasOwnProperty:s}}=Object,{toStringTag:c}=Symbol,l={},u=i;function f(e,t){return s.call(e,t)}function d(e){return e[c]||e.constructor&&e.constructor.name||"Object"}function p(e,t){try{const n=e[t];return n&&n.constructor,n}catch(e){return l}}const m=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function h(e){try{let t=m.filter((({symbol:t})=>!0===e[t]));if(!t.length)return;const n=t.find((e=>!e.modifier)),r="Map"===n.name&&t.find((e=>e.modifier&&e.prefix)),a=t.some((e=>e.arrayish)),o=t.some((e=>e.setish));return{name:`${r?r.name:""}${n.name}`,symbols:t,arrayish:a&&!o,setish:o}}catch(e){return null}}const{getPrototypeOf:b,getOwnPropertyDescriptors:w}=Object,v=b({});function y(n,a,o,i){let s,c,l,u,f=t(n);n instanceof Map?n instanceof n.constructor?(s=`Map(${n.size})`,c=_):(s="Map()",c=T):n instanceof Set?n instanceof n.constructor?(s=`Set(${n.size})`,c=g):(s="Set()",c=T):f?(s=`${n.constructor.name}(${n.length})`,c=C):(u=h(n))?(s=`Immutable.${u.name}${"Record"===u.name?"":`(${n.size})`}`,f=u.arrayish,c=u.arrayish?N:u.setish?E:A):i?(s=d(n),c=x):(s=d(n),c=T);const p=document.createElement("span");p.className="observablehq--expanded",o&&p.appendChild(r(o));const m=p.appendChild(document.createElement("a"));m.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n <path d='M4 7L0 1h8z' fill='currentColor' />\n </svg>",m.appendChild(document.createTextNode(`${s}${f?" [":" {"}`)),m.addEventListener("mouseup",(function(e){e.stopPropagation(),ie(p,L(n,null,o,i))})),c=c(n);for(let e=0;!(l=c.next()).done&&e<20;++e)p.appendChild(l.value);if(!l.done){const t=p.appendChild(document.createElement("a"));t.className="observablehq--field",t.style.display="block",t.appendChild(document.createTextNode(" … more")),t.addEventListener("mouseup",(function(t){t.stopPropagation(),p.insertBefore(l.value,p.lastChild.previousSibling);for(let e=0;!(l=c.next()).done&&e<19;++e)p.insertBefore(l.value,p.lastChild.previousSibling);l.done&&p.removeChild(p.lastChild.previousSibling),e(p,"load")}))}return p.appendChild(document.createTextNode(f?"]":"}")),p}function*_(e){for(const[t,n]of e)yield S(t,n);yield*T(e)}function*g(e){for(const t of e)yield q(t);yield*T(e)}function*E(e){for(const t of e)yield q(t)}function*C(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield $(t,p(e,t),"observablehq--index"));for(const t in e)!n(t)&&f(e,t)&&(yield $(t,p(e,t),"observablehq--key"));for(const t of u(e))yield $(o(t),p(e,t),"observablehq--symbol")}function*N(e){let t=0;for(const n=e.size;t<n;++t)yield $(t,e.get(t),!0)}function*x(e){for(const t in w(e))yield $(t,p(e,t),"observablehq--key");for(const t of u(e))yield $(o(t),p(e,t),"observablehq--symbol");const t=b(e);t&&t!==v&&(yield j(t))}function*T(e){for(const t in e)f(e,t)&&(yield $(t,p(e,t),"observablehq--key"));for(const t of u(e))yield $(o(t),p(e,t),"observablehq--symbol");const t=b(e);t&&t!==v&&(yield j(t))}function*A(e){for(const[t,n]of e)yield $(t,n,"observablehq--key")}function j(e){const t=document.createElement("div"),n=t.appendChild(document.createElement("span"));return t.className="observablehq--field",n.className="observablehq--prototype-key",n.textContent=" <prototype>",t.appendChild(document.createTextNode(": ")),t.appendChild(oe(e,void 0,void 0,void 0,!0)),t}function $(e,t,n){const r=document.createElement("div"),a=r.appendChild(document.createElement("span"));return r.className="observablehq--field",a.className=n,a.textContent=` ${e}`,r.appendChild(document.createTextNode(": ")),r.appendChild(oe(t)),r}function S(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode(" ")),n.appendChild(oe(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(oe(t)),n}function q(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(oe(e)),t}function O(e){const t=window.getSelection();return"Range"===t.type&&(t.containsNode(e,!0)||t.anchorNode.isSelfOrDescendant(e)||t.focusNode.isSelfOrDescendant(e))}function L(e,n,a,o){let i,s,c,l,u=t(e);if(e instanceof Map?e instanceof e.constructor?(i=`Map(${e.size})`,s=k):(i="Map()",s=U):e instanceof Set?e instanceof e.constructor?(i=`Set(${e.size})`,s=M):(i="Set()",s=U):u?(i=`${e.constructor.name}(${e.length})`,s=R):(l=h(e))?(i=`Immutable.${l.name}${"Record"===l.name?"":`(${e.size})`}`,u=l.arrayish,s=l.arrayish?P:l.setish?I:D):(i=d(e),s=U),n){const t=document.createElement("span");return t.className="observablehq--shallow",a&&t.appendChild(r(a)),t.appendChild(document.createTextNode(i)),t.addEventListener("mouseup",(function(n){O(t)||(n.stopPropagation(),ie(t,L(e)))})),t}const f=document.createElement("span");f.className="observablehq--collapsed",a&&f.appendChild(r(a));const p=f.appendChild(document.createElement("a"));p.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n <path d='M7 4L1 8V0z' fill='currentColor' />\n </svg>",p.appendChild(document.createTextNode(`${i}${u?" [":" {"}`)),f.addEventListener("mouseup",(function(t){O(f)||(t.stopPropagation(),ie(f,y(e,0,a,o)))}),!0),s=s(e);for(let e=0;!(c=s.next()).done&&e<20;++e)e>0&&f.appendChild(document.createTextNode(", ")),f.appendChild(c.value);return c.done||f.appendChild(document.createTextNode(", …")),f.appendChild(document.createTextNode(u?"]":"}")),f}function*k(e){for(const[t,n]of e)yield z(t,n);yield*U(e)}function*M(e){for(const t of e)yield oe(t,!0);yield*U(e)}function*I(e){for(const t of e)yield oe(t,!0)}function*P(e){let t=-1,n=0;for(const r=e.size;n<r;++n)n>t+1&&(yield F(n-t-1)),yield oe(e.get(n),!0),t=n;n>t+1&&(yield F(n-t-1))}function*R(e){let t=-1,r=0;for(const n=e.length;r<n;++r)r in e&&(r>t+1&&(yield F(r-t-1)),yield oe(p(e,r),!0),t=r);r>t+1&&(yield F(r-t-1));for(const t in e)!n(t)&&f(e,t)&&(yield B(t,p(e,t),"observablehq--key"));for(const t of u(e))yield B(o(t),p(e,t),"observablehq--symbol")}function*U(e){for(const t in e)f(e,t)&&(yield B(t,p(e,t),"observablehq--key"));for(const t of u(e))yield B(o(t),p(e,t),"observablehq--symbol")}function*D(e){for(const[t,n]of e)yield B(t,n,"observablehq--key")}function F(e){const t=document.createElement("span");return t.className="observablehq--empty",t.textContent=1===e?"empty":`empty × ${e}`,t}function B(e,t,n){const r=document.createDocumentFragment(),a=r.appendChild(document.createElement("span"));return a.className=n,a.textContent=e,r.appendChild(document.createTextNode(": ")),r.appendChild(oe(t,!0)),r}function z(e,t){const n=document.createDocumentFragment();return n.appendChild(oe(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(oe(t,!0)),n}function W(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(e))return"function"==typeof t?t(e):t;const n=e.getUTCHours(),r=e.getUTCMinutes(),a=e.getUTCSeconds(),o=e.getUTCMilliseconds();return`${i=e.getUTCFullYear(),i<0?`-${H(-i,6)}`:i>9999?`+${H(i,6)}`:H(i,4)}-${H(e.getUTCMonth()+1,2)}-${H(e.getUTCDate(),2)}${n||r||a||o?`T${H(n,2)}:${H(r,2)}${a||o?`:${H(a,2)}${o?`.${H(o,3)}`:""}`:""}Z`:""}`;var i}function H(e,t){return`${e}`.padStart(t,"0")}var V=Error.prototype.toString;var G=RegExp.prototype.toString;function Y(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,Z)}function Z(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function J(e,t){for(var n=0;t.exec(e);)++n;return n}var K=Function.prototype.toString,X={prefix:"async ƒ"},Q={prefix:"async ƒ*"},ee={prefix:"class"},te={prefix:"ƒ"},ne={prefix:"ƒ*"};function re(e,t,n){var a=document.createElement("span");a.className="observablehq--function",n&&a.appendChild(r(n));var o=a.appendChild(document.createElement("span"));return o.className="observablehq--keyword",o.textContent=e.prefix,a.appendChild(document.createTextNode(t)),a}const{prototype:{toString:ae}}=Object;function oe(e,t,n,a,i){let s=typeof e;switch(s){case"boolean":case"undefined":e+="";break;case"number":e=0===e&&1/e<0?"-0":e+"";break;case"bigint":e+="n";break;case"symbol":e=o(e);break;case"function":return function(e,t){var n,r,a=K.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=X;break;case"AsyncGeneratorFunction":n=Q;break;case"GeneratorFunction":n=ne;break;default:n=/^class\b/.test(a)?ee:te}return n===ee?re(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(a))?re(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(a))||(r=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(a))?re(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):re(n,"(…)",t)}(e,a);case"string":return function(e,t,n,a){if(!1===t){if(J(e,/["\n]/g)<=J(e,/`|\${/g)){const t=document.createElement("span");a&&t.appendChild(r(a));const n=t.appendChild(document.createElement("span"));return n.className="observablehq--string",n.textContent=JSON.stringify(e),t}const o=e.split("\n");if(o.length>20&&!n){const n=document.createElement("div");a&&n.appendChild(r(a));const i=n.appendChild(document.createElement("span"));i.className="observablehq--string",i.textContent="`"+Y(o.slice(0,20).join("\n"));const s=n.appendChild(document.createElement("span")),c=o.length-20;return s.textContent=`Show ${c} truncated line${c>1?"s":""}`,s.className="observablehq--string-expand",s.addEventListener("mouseup",(function(r){r.stopPropagation(),ie(n,oe(e,t,!0,a))})),n}const i=document.createElement("span");a&&i.appendChild(r(a));const s=i.appendChild(document.createElement("span"));return s.className="observablehq--string"+(n?" observablehq--expanded":""),s.textContent="`"+Y(e)+"`",i}const o=document.createElement("span");a&&o.appendChild(r(a));const i=o.appendChild(document.createElement("span"));return i.className="observablehq--string",i.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}…${e.slice(-49)}`:e),o}(e,t,n,a);default:if(null===e){s=null,e="null";break}if(e instanceof Date){s="date",e=W(e,"Invalid Date");break}if(e===l){s="forbidden",e="[forbidden]";break}switch(ae.call(e)){case"[object RegExp]":s="regexp",e=function(e){return G.call(e)}(e);break;case"[object Error]":case"[object DOMException]":s="error",e=function(e){return e.stack||V.call(e)}(e);break;default:return(n?y:L)(e,t,a,i)}}const c=document.createElement("span");a&&c.appendChild(r(a));const u=c.appendChild(document.createElement("span"));return u.className=`observablehq--${s}`,u.textContent=e,c}function ie(t,n){t.classList.contains("observablehq--inspect")&&n.classList.add("observablehq--inspect"),t.parentNode.replaceChild(n,t),e(n,"load")}const se=/\s+\(\d+:\d+\)$/m;class Inspector{constructor(e){if(!e)throw new Error("invalid node");this._node=e,e.classList.add("observablehq")}pending(){const{_node:e}=this;e.classList.remove("observablehq--error"),e.classList.add("observablehq--running")}fulfilled(t,n){const{_node:r}=this;if((!function(e){return(e instanceof Element||e instanceof Text)&&e instanceof e.constructor}(t)||t.parentNode&&t.parentNode!==r)&&(t=oe(t,!1,r.firstChild&&r.firstChild.classList&&r.firstChild.classList.contains("observablehq--expanded"),n)).classList.add("observablehq--inspect"),r.classList.remove("observablehq--running","observablehq--error"),r.firstChild!==t)if(r.firstChild){for(;r.lastChild!==r.firstChild;)r.removeChild(r.lastChild);r.replaceChild(t,r.firstChild)}else r.appendChild(t);e(r,"update")}rejected(t,n){const{_node:a}=this;for(a.classList.remove("observablehq--running"),a.classList.add("observablehq--error");a.lastChild;)a.removeChild(a.lastChild);var o=document.createElement("div");o.className="observablehq--inspect",n&&o.appendChild(r(n)),o.appendChild(document.createTextNode((t+"").replace(se,""))),a.appendChild(o),e(a,"error",{error:t})}}Inspector.into=function(e){if("string"==typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new Inspector(e.appendChild(document.createElement("div")))}};var ce={},le={};function ue(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function fe(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function de(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function pe(e){var t,n=e.getUTCHours(),r=e.getUTCMinutes(),a=e.getUTCSeconds(),o=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":((t=e.getUTCFullYear())<0?"-"+de(-t,6):t>9999?"+"+de(t,6):de(t,4))+"-"+de(e.getUTCMonth()+1,2)+"-"+de(e.getUTCDate(),2)+(o?"T"+de(n,2)+":"+de(r,2)+":"+de(a,2)+"."+de(o,3)+"Z":a?"T"+de(n,2)+":"+de(r,2)+":"+de(a,2)+"Z":r||n?"T"+de(n,2)+":"+de(r,2)+"Z":"")}function me(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,a=[],o=e.length,i=0,s=0,c=o<=0,l=!1;function u(){if(c)return le;if(l)return l=!1,ce;var t,r,a=i;if(34===e.charCodeAt(a)){for(;i++<o&&34!==e.charCodeAt(i)||34===e.charCodeAt(++i););return(t=i)>=o?c=!0:10===(r=e.charCodeAt(i++))?l=!0:13===r&&(l=!0,10===e.charCodeAt(i)&&++i),e.slice(a+1,t-1).replace(/""/g,'"')}for(;i<o;){if(10===(r=e.charCodeAt(t=i++)))l=!0;else if(13===r)l=!0,10===e.charCodeAt(i)&&++i;else if(r!==n)continue;return e.slice(a,t)}return c=!0,e.slice(a,o)}for(10===e.charCodeAt(o-1)&&--o,13===e.charCodeAt(o-1)&&--o;(r=u())!==le;){for(var f=[];r!==ce&&r!==le;)f.push(r),r=u();t&&null==(f=t(f,s++))||a.push(f)}return a}function a(t,n){return t.map((function(t){return n.map((function(e){return i(t[e])})).join(e)}))}function o(t){return t.map(i).join(e)}function i(e){return null==e?"":e instanceof Date?pe(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,a,o=r(e,(function(e,r){if(n)return n(e,r-1);a=e,n=t?function(e,t){var n=ue(e);return function(r,a){return t(n(r),a,e)}}(e,t):ue(e)}));return o.columns=a||[],o},parseRows:r,format:function(t,n){return null==n&&(n=fe(t)),[n.map(i).join(e)].concat(a(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=fe(e)),a(e,t).join("\n")},formatRows:function(e){return e.map(o).join("\n")},formatRow:o,formatValue:i}}var he=me(","),be=he.parse,we=he.parseRows,ve=me("\t"),ye=ve.parse,_e=ve.parseRows;function ge(e){for(var t in e){var n,r,a=e[t].trim();if(a)if("true"===a)a=!0;else if("false"===a)a=!1;else if("NaN"===a)a=NaN;else if(isNaN(n=+a)){if(!(r=a.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Ee&&r[4]&&!r[7]&&(a=a.replace(/-/g,"/").replace(/T/," ")),a=new Date(a)}else a=n;else a=null;e[t]=a}return e}const Ee=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Ce(e,t,n){return{resolve:(r=n)=>`${e}@${t}/${r}`}}const Ne=Ce("d3","7.8.5","dist/d3.min.js"),xe=Ce("@observablehq/inputs","0.10.6","dist/inputs.min.js"),Te=Ce("@observablehq/plot","0.6.13","dist/plot.umd.min.js"),Ae=Ce("@observablehq/graphviz","0.2.1","dist/graphviz.min.js"),je=Ce("@observablehq/highlight.js","2.0.0","highlight.min.js"),$e=Ce("@observablehq/katex","0.11.1","dist/katex.min.js"),Se=Ce("lodash","4.17.21","lodash.min.js"),qe=Ce("htl","0.3.1","dist/htl.min.js"),Oe=Ce("jszip","3.10.1","dist/jszip.min.js"),Le=Ce("marked","0.3.12","marked.min.js"),ke=Ce("sql.js","1.8.0","dist/sql-wasm.js"),Me=Ce("vega","5.22.1","build/vega.min.js"),Ie=Ce("vega-lite","5.6.0","build/vega-lite.min.js"),Pe=Ce("vega-lite-api","5.0.0","build/vega-lite-api.min.js"),Re=Ce("apache-arrow","4.0.1","Arrow.es2015.min.js"),Ue=Ce("apache-arrow","9.0.0","+esm"),De=Ce("apache-arrow","11.0.0","+esm"),Fe=Ce("arquero","4.8.8","dist/arquero.min.js"),Be=Ce("topojson-client","3.1.0","dist/topojson-client.min.js"),ze=Ce("exceljs","4.3.0","dist/exceljs.min.js"),We=Ce("mermaid","9.2.2","dist/mermaid.min.js"),He=Ce("leaflet","1.9.3","dist/leaflet.js"),Ve=Ce("@duckdb/duckdb-wasm","1.24.0","+esm"),Ge=new Map,Ye=[],Ze=Ye.map,Je=Ye.some,Ke=Ye.hasOwnProperty,Xe=/^((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(?:\/(.*))?$/,Qe=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,et=/(?:\.[^/]*|\/)$/;class RequireError extends Error{constructor(e){super(e)}}function tt(e){const t=Xe.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function nt(e="https://cdn.jsdelivr.net/npm/",t=["unpkg","jsdelivr","browser","main"]){if(!/\/$/.test(e))throw new Error("origin lacks trailing slash");function n(t){const n=`${e}${t.name}${t.version?`@${t.version}`:""}/package.json`;let r=Ge.get(n);return r||Ge.set(n,r=fetch(n).then((e=>{if(!e.ok)throw new RequireError("unable to load package.json");return e.redirected&&!Ge.has(e.url)&&Ge.set(e.url,r),e.json()}))),r}return async function(r,a){if(r.startsWith(e)&&(r=r.substring(e.length)),/^(\w+:)|\/\//i.test(r))return r;if(/^[.]{0,2}\//i.test(r))return new URL(r,null==a?location:a).href;if(!r.length||/^[\s._]/.test(r)||/\s$/.test(r))throw new RequireError("illegal name");const o=tt(r);if(!o)return`${e}${r}`;if(!o.version&&null!=a&&a.startsWith(e)){const t=await n(tt(a.substring(e.length)));o.version=t.dependencies&&t.dependencies[o.name]||t.peerDependencies&&t.peerDependencies[o.name]}if(o.path&&!et.test(o.path)&&(o.path+=".js"),o.path&&o.version&&Qe.test(o.version))return`${e}${o.name}@${o.version}/${o.path}`;const i=await n(o);return`${e}${i.name}@${i.version}/${o.path||function(e){for(const n of t){let t=e[n];if("string"==typeof t)return t.startsWith("./")&&(t=t.slice(2)),et.test(t)?t:`${t}.js`}}(i)||"index.js"}`}}RequireError.prototype.name=RequireError.name;var rt=at(nt());function at(e){const t=new Map,n=a(null);function r(e){if("string"!=typeof e)return e;let n=t.get(e);return n||t.set(e,n=new Promise(((t,n)=>{const r=document.createElement("script");r.onload=()=>{try{t(Ye.pop()(a(e)))}catch(e){n(new RequireError("invalid module"))}r.remove()},r.onerror=()=>{n(new RequireError("unable to load module")),r.remove()},r.async=!0,r.src=e,window.define=ct,document.head.appendChild(r)}))),n}function a(t){return n=>Promise.resolve(e(n,t)).then(r)}function o(e){return arguments.length>1?Promise.all(Ze.call(arguments,n)).then(ot):n(e)}return o.alias=function(t){return at(((n,r)=>n in t&&(r=null,"string"!=typeof(n=t[n]))?n:e(n,r)))},o.resolve=e,o}function ot(e){const t={};for(const n of e)for(const e in n)Ke.call(n,e)&&(null==n[e]?Object.defineProperty(t,e,{get:it(n,e)}):t[e]=n[e]);return t}function it(e,t){return()=>e[t]}function st(e){return"exports"===(e+="")||"module"===e}function ct(e,t,n){const r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"==typeof e?[]:e),Ye.push(Je.call(t,st)?e=>{const r={},a={exports:r};return Promise.all(Ze.call(t,(t=>"exports"===(t+="")?r:"module"===t?a:e(t)))).then((e=>(n.apply(null,e),a.exports)))}:e=>Promise.all(Ze.call(t,e)).then((e=>"function"==typeof n?n.apply(null,e):n)))}ct.amd={};const lt="https://cdn.observableusercontent.com/npm/";let ut,ft=rt;async function dt(e){const[t,n]=await Promise.all([e(ke.resolve()),e.resolve(ke.resolve("dist/"))]);return t({locateFile:e=>`${n}${e}`})}class SQLiteDatabaseClient{constructor(e){Object.defineProperties(this,{_db:{value:e}})}static async open(e){const[t,n]=await Promise.all([dt(ft),Promise.resolve(e).then(mt)]);return new SQLiteDatabaseClient(new t.Database(n))}async query(e,t){return await async function(e,t,n){const[r]=await e.exec(t,n);if(!r)return[];const{columns:a,values:o}=r,i=o.map((e=>Object.fromEntries(e.map(((e,t)=>[a[t],e])))));return i.columns=a,i}(this._db,e,t)}async queryRow(e,t){return(await this.query(e,t))[0]||null}async explain(e,t){return ht("pre",{className:"observablehq--inspect"},[bt((await this.query(`EXPLAIN QUERY PLAN ${e}`,t)).map((e=>e.detail)).join("\n"))])}async describeTables({schema:e}={}){return this.query(`SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${null==e?"":" AND schema = ?"} AND name NOT LIKE 'sqlite_%' ORDER BY schema, name`,null==e?[]:[e])}async describeColumns({schema:e,table:t}={}){if(null==t)throw new Error("missing table");const n=await this.query(`SELECT name, type, "notnull" FROM pragma_table_info(?${null==e?"":", ?"}) ORDER BY cid`,null==e?[t]:[t,e]);if(!n.length)throw new Error(`table not found: ${t}`);return n.map((({name:e,type:t,notnull:n})=>({name:e,type:pt(t),databaseType:t,nullable:!n})))}async describe(e){const t=await(void 0===e?this.query("SELECT name FROM sqlite_master WHERE type = 'table'"):this.query("SELECT * FROM pragma_table_info(?)",[e]));if(!t.length)throw new Error("Not found");const{columns:n}=t;return ht("table",{value:t},[ht("thead",[ht("tr",n.map((e=>ht("th",[bt(e)]))))]),ht("tbody",t.map((e=>ht("tr",n.map((t=>ht("td",[bt(e[t])])))))))])}async sql(){return this.query(...this.queryTag.apply(this,arguments))}queryTag(e,...t){return[e.join("?"),t]}}function pt(e){switch(e){case"NULL":return"null";case"INT":case"INTEGER":case"TINYINT":case"SMALLINT":case"MEDIUMINT":case"BIGINT":case"UNSIGNED BIG INT":case"INT2":case"INT8":return"integer";case"TEXT":case"CLOB":case"DATE":case"DATETIME":return"string";case"REAL":case"DOUBLE":case"DOUBLE PRECISION":case"FLOAT":case"NUMERIC":return"number";case"BLOB":return"buffer";default:return/^(?:(?:(?:VARYING|NATIVE) )?CHARACTER|(?:N|VAR|NVAR)CHAR)\(/.test(e)?"string":/^(?:DECIMAL|NUMERIC)\(/.test(e)?"number":"other"}}function mt(e){return"string"==typeof e?fetch(e).then(mt):e instanceof Response||e instanceof Blob?e.arrayBuffer().then(mt):e instanceof ArrayBuffer?new Uint8Array(e):e}function ht(e,t,n){2===arguments.length&&(n=t,t=void 0);const r=document.createElement(e);if(void 0!==t)for(const e in t)r[e]=t[e];if(void 0!==n)for(const e of n)r.appendChild(e);return r}function bt(e){return document.createTextNode(e)}function wt(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function vt(e,t=wt){let n,r=!1;if(1===t.length){let a;for(const o of e){const e=t(o);(r?wt(e,a)>0:0===wt(e,e))&&(n=o,a=e,r=!0)}}else for(const a of e)(r?t(a,n)>0:0===t(a,a))&&(n=a,r=!0);return n}function yt(e){return e&&"function"==typeof e.toArrowBuffer}function _t(e){return e&&"function"==typeof e.getChild&&"function"==typeof e.toArray&&e.schema&&Array.isArray(e.schema.fields)}function gt(e){return{name:e.name,type:Et(e.type),nullable:e.nullable,databaseType:String(e.type)}}function Et(e){switch(e.typeId){case 2:return"integer";case 3:case 7:return"number";case 4:case 15:return"buffer";case 5:return"string";case 6:return"boolean";case 8:case 9:case 10:return"date";case 12:case 16:return"array";case 13:case 14:return"object";default:return"other"}}async function Ct(){return await import(`${lt}${De.resolve()}`)}Object.defineProperty(SQLiteDatabaseClient.prototype,"dialect",{value:"sqlite"});class DuckDBClient{constructor(e){Object.defineProperties(this,{_db:{value:e}})}async queryStream(e,t){const n=await this._db.connect();let r,a;try{if(t?.length>0){const a=await n.prepare(e);r=await a.send(...t)}else r=await n.send(e);if(a=await r.next(),a.done)throw new Error("missing first batch")}catch(e){throw await n.close(),e}return{schema:(o=a.value,o.schema.fields.map(gt)),async*readRows(){try{for(;!a.done;)yield a.value.toArray(),a=await r.next()}finally{await n.close()}}};var o}async query(e,t){const n=await this.queryStream(e,t),r=[];for await(const e of n.readRows())for(const t of e)r.push(t);return r.schema=n.schema,r}async queryRow(e,t){const n=(await this.queryStream(e,t)).readRows();try{const{done:e,value:t}=await n.next();return e||!t.length?null:t[0]}finally{await n.return()}}async sql(e,...t){return await this.query(e.join("?"),t)}queryTag(e,...t){return[e.join("?"),t]}escape(e){return`"${e}"`}async describeTables(){return(await this.query("SHOW TABLES")).map((({name:e})=>({name:e})))}async describeColumns({table:e}={}){return(await this.query(`DESCRIBE ${this.escape(e)}`)).map((({column_name:e,column_type:t,null:n})=>({name:e,type:At(t),nullable:"NO"!==n,databaseType:t})))}static async of(e={},t={}){const n=await async function(){void 0===ut&&(ut=async function(){const e=await import(`${lt}${Ve.resolve()}`),t=await e.selectBundle({mvp:{mainModule:`${lt}${Ve.resolve("dist/duckdb-mvp.wasm")}`,mainWorker:`${lt}${Ve.resolve("dist/duckdb-browser-mvp.worker.js")}`},eh:{mainModule:`${lt}${Ve.resolve("dist/duckdb-eh.wasm")}`,mainWorker:`${lt}${Ve.resolve("dist/duckdb-browser-eh.worker.js")}`}}),n=new e.ConsoleLogger;return{module:e,bundle:t,logger:n}}());const{module:e,bundle:t,logger:n}=await ut,r=await e.createWorker(t.mainWorker),a=new e.AsyncDuckDB(n,r);return await a.instantiate(t.mainModule),a}();return void 0===t.query?.castTimestampToDate&&(t={...t,query:{...t.query,castTimestampToDate:!0}}),void 0===t.query?.castBigIntToDouble&&(t={...t,query:{...t.query,castBigIntToDouble:!0}}),await n.open(t),await Promise.all(Object.entries(e).map((async([e,t])=>{if(t instanceof FileAttachment)await Nt(n,e,t);else if(_t(t))await xt(n,e,t);else if(Array.isArray(t))await Tt(n,e,t);else if(yt(t))await async function(e,t,n){const r=(await Ct()).tableFromIPC(n.toArrowBuffer());return await xt(e,t,r)}(n,e,t);else if("data"in t){const{data:r,...a}=t;_t(r)?await xt(n,e,r,a):await Tt(n,e,r,a)}else{if(!("file"in t))throw new Error(`invalid source: ${t}`);{const{file:r,...a}=t;await Nt(n,e,r,a)}}}))),new DuckDBClient(n)}}async function Nt(e,t,n,r){const a=await n.url();if(a.startsWith("blob:")){const t=await n.arrayBuffer();await e.registerFileBuffer(n.name,new Uint8Array(t))}else await e.registerFileURL(n.name,new URL(a,location).href,4);const o=await e.connect();try{switch(n.mimeType){case"text/csv":case"text/tab-separated-values":return await o.insertCSVFromPath(n.name,{name:t,schema:"main",...r}).catch((async e=>{if(e.toString().includes("Could not convert"))return await async function(e,t,n){const r=await e.prepare(`CREATE TABLE '${n}' AS SELECT * FROM read_csv_auto(?, ALL_VARCHAR=TRUE)`);return await r.send(t.name)}(o,n,t);throw e}));case"application/json":return await o.insertJSONFromPath(n.name,{name:t,schema:"main",...r});default:if(/\.arrow$/i.test(n.name)){const e=new Uint8Array(await n.arrayBuffer());return await o.insertArrowFromIPCStream(e,{name:t,schema:"main",...r})}if(/\.parquet$/i.test(n.name))return await o.query(`CREATE VIEW '${t}' AS SELECT * FROM parquet_scan('${n.name}')`);throw new Error(`unknown file type: ${n.mimeType}`)}}finally{await o.close()}}async function xt(e,t,n,r){const a=await e.connect();try{await a.insertArrowTable(n,{name:t,schema:"main",...r})}finally{await a.close()}}async function Tt(e,t,n,r){const a=(await Ct()).tableFromJSON(n);return await xt(e,t,a,r)}function At(e){switch(e){case"BIGINT":case"HUGEINT":case"UBIGINT":return"bigint";case"DOUBLE":case"REAL":case"FLOAT":return"number";case"INTEGER":case"SMALLINT":case"TINYINT":case"USMALLINT":case"UINTEGER":case"UTINYINT":return"integer";case"BOOLEAN":return"boolean";case"DATE":case"TIMESTAMP":case"TIMESTAMP WITH TIME ZONE":return"date";case"VARCHAR":case"UUID":return"string";default:return/^DECIMAL\(/.test(e)?"integer":"other"}}Object.defineProperty(DuckDBClient.prototype,"dialect",{value:"duckdb"});function jt(e){return Array.isArray(e)&&($t(e.schema)||St(e.columns)||function(e){const t=Math.min(20,e.length);for(let n=0;n<t;++n){const t=e[n];if(null===t||"object"!=typeof t)return!1}return t>0&&function(e){for(const t in e)return!0;return!1}(e[0])}(e)||Lt(e)||kt(e))||Mt(e)}function $t(e){return Array.isArray(e)&&e.every(qt)}function St(e){return Array.isArray(e)&&e.every((e=>"string"==typeof e))}function qt(e){return e&&"string"==typeof e.name&&"string"==typeof e.type}function Ot(e){return Mt(e)||Lt(e)||kt(e)}function Lt(e){const t=Math.min(20,e.length);if(!(t>0))return!1;let n,r=!1;for(let a=0;a<t;++a){const t=e[a];if(null==t)continue;const o=typeof t;if(void 0===n)switch(o){case"number":case"boolean":case"string":case"bigint":n=o;break;default:return!1}else if(o!==n)return!1;r=!0}return r}function kt(e){const t=Math.min(20,e.length);if(!(t>0))return!1;let n=!1;for(let r=0;r<t;++r){const t=e[r];if(null!=t){if(!(t instanceof Date))return!1;n=!0}}return n}function Mt(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}const It=Object.assign((async(e,t,n,r)=>{if(e=await Rt(await e,r),(a=e)&&("function"==typeof a.sql||"function"==typeof a.queryTag&&("function"==typeof a.query||"function"==typeof a.queryStream))&&("table"!==o||"function"==typeof a.describeColumns)&&a!==It)return Ft(e,function(e,t){const n="function"==typeof t.escape?t.escape:e=>e,{select:r,from:a,filter:o,sort:i,slice:s}=e;if(!a.table)throw new Error("missing from table");if(r.columns&&0===r.columns.length)throw new Error("at least one column must be selected");const c=new Map(e.names?.map((({column:e,name:t})=>[e,t]))),l=[[`SELECT ${r.columns?r.columns.map((e=>{const t=c.get(e);return t?`${n(e)} AS ${n(t)}`:n(e)})).join(", "):"*"} FROM ${Bt(a.table,n)}`]];for(let e=0;e<o.length;++e)zt(e?"\nAND ":"\nWHERE ",l),Ht(o[e],l,n);for(let e=0;e<i.length;++e)zt(e?", ":"\nORDER BY ",l),Wt(i[e],l,n);if("mssql"===t.dialect||"oracle"===t.dialect){if(null!==s.to||null!==s.from){if(!i.length){if(!r.columns)throw new Error("at least one column must be explicitly specified. Received '*'.");zt("\nORDER BY ",l),Wt({column:r.columns[0],direction:"ASC"},l,n)}zt(`\nOFFSET ${s.from||0} ROWS`,l),zt(`\nFETCH NEXT ${null!==s.to?s.to-(s.from||0):1e9} ROWS ONLY`,l)}}else null===s.to&&null===s.from||zt("\nLIMIT "+(null!==s.to?s.to-(s.from||0):1e9),l),null!==s.from&&zt(` OFFSET ${s.from}`,l);return l}(t,e),n);var a,o;if(jt(e))return function(e,t){const n=new Map,r=e,a=un(e,t);e=a.source;let o=a.schema;if(t.derive){const r=[];t.derive.map((({name:a,value:o})=>{let i=[];fn(e,t).map(((e,t)=>{let n;try{n=o(e)}catch(e){i.push({index:t,error:e}),n=void 0}r[t]?r[t]={...r[t],[a]:n}:r.push({[a]:n})})),i.length&&n.set(a,i)}));const a=un(r,t);e=e.map(((e,t)=>({...e,...a.source[t]}))),o=[...o,...a.schema]}for(const{type:n,operands:r}of t.filter){const[{value:t}]=r,a=r.slice(1).map((({value:e})=>e));switch(n){case"v":{const[n]=a,r=sn(n);e=e.filter((e=>r(e[t])));break}case"nv":{const[n]=a,r=sn(n);e=e.filter((e=>!r(e[t])));break}case"eq":{const[n]=a;if(n instanceof Date){const r=+n;e=e.filter((e=>+e[t]===r))}else e=e.filter((e=>e[t]===n));break}case"ne":{const[n]=a;e=e.filter((e=>e[t]!==n));break}case"c":{const[n]=a;e=e.filter((e=>"string"==typeof e[t]&&e[t].includes(n)));break}case"nc":{const[n]=a;e=e.filter((e=>"string"==typeof e[t]&&!e[t].includes(n)));break}case"in":{const n=new Set(a);e=e.filter((e=>n.has(e[t])));break}case"nin":{const n=new Set(a);e=e.filter((e=>!n.has(e[t])));break}case"n":e=e.filter((e=>null==e[t]));break;case"nn":e=e.filter((e=>null!=e[t]));break;case"lt":{const[n]=a;e=e.filter((e=>e[t]<n));break}case"lte":{const[n]=a;e=e.filter((e=>e[t]<=n));break}case"gt":{const[n]=a;e=e.filter((e=>e[t]>n));break}case"gte":{const[n]=a;e=e.filter((e=>e[t]>=n));break}default:throw new Error(`unknown filter type: ${n}`)}}for(const{column:n,direction:a}of function(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()}(t.sort)){const t="desc"===a?Zt:Yt;e===r&&(e=e.slice()),e.sort(((e,r)=>t(e[n],r[n])))}let{from:i,to:s}=t.slice;i=null==i?0:Math.max(0,i),s=null==s?1/0:Math.max(0,s),(i>0||s<1/0)&&(e=e.slice(Math.max(0,i),Math.max(0,s)));let c=o.slice();if(t.select.columns){if(o){const e=new Map(o.map((e=>[e.name,e])));o=t.select.columns.map((t=>e.get(t)))}e=e.map((e=>Object.fromEntries(t.select.columns.map((t=>[t,e[t]])))))}if(t.names){const n=new Map(t.names.map((e=>[e.column,e])));o&&(o=o.map((e=>{const t=n.get(e.name);return{...e,...t?{name:t.name}:null}}))),c&&(c=c.map((e=>{const t=n.get(e.name);return{...e,...t?{name:t.name}:null}}))),e=fn(e,t)}e!==r&&o&&(e.schema=o);return e.fullSchema=c,e.errors=n,e}(e,t);if(!e)throw new Error("missing data source");throw new Error("invalid data source")}),{sql:(e,t,n)=>async function(){return Ft(await Ut(await e,n),arguments,t)}});function Pt(e){const t=new WeakMap;return(n,r)=>{if(!n||"object"!=typeof n)throw new Error("invalid data source");let a=t.get(n);return(!a||jt(n)&&n.length!==a._numRows)&&(a=e(n,r),a._numRows=n.length,t.set(n,a)),a}}const Rt=Pt((async(e,t)=>{if(e instanceof FileAttachment){switch(e.mimeType){case"text/csv":return e.csv();case"text/tab-separated-values":return e.tsv();case"application/json":return e.json();case"application/x-sqlite3":return e.sqlite()}if(/\.(arrow|parquet)$/i.test(e.name))return Dt(e,t);throw new Error(`unsupported file type: ${e.mimeType}`)}return _t(e)||yt(e)?Dt(e,t):jt(e)&&Ot(e)?Array.from(e,(e=>({value:e}))):e})),Ut=Pt((async(e,t)=>{if(e instanceof FileAttachment){switch(e.mimeType){case"text/csv":case"text/tab-separated-values":case"application/json":return Dt(e,t);case"application/x-sqlite3":return e.sqlite()}if(/\.(arrow|parquet)$/i.test(e.name))return Dt(e,t);throw new Error(`unsupported file type: ${e.mimeType}`)}return jt(e)?Dt(await async function(e,t){const n=await Ct();return Ot(e)?n.tableFromArrays({[t]:e}):n.tableFromJSON(e)}(e,t),t):_t(e)||yt(e)?Dt(e,t):e}));function Dt(e,t=(e instanceof FileAttachment?function(e){return e.name.replace(/@\d+(?=\.|$)/,"").replace(/\.\w+$/,"")}(e):"__table")){return DuckDBClient.of({[t]:e})}async function Ft(e,t,n){if(!e)throw new Error("missing data source");if("function"==typeof e.queryTag){const r=new AbortController,a={signal:r.signal};if(n.then((()=>r.abort("invalidated"))),"function"==typeof e.queryStream)return async function*(e){let t=performance.now();const n=await e,r=[];r.done=!1,r.error=null,r.schema=n.schema;try{for await(const e of n.readRows()){performance.now()-t>150&&r.length>0&&(yield r,t=performance.now());for(const t of e)r.push(t)}r.done=!0,yield r}catch(e){r.error=e,yield r}}(e.queryStream(...e.queryTag.apply(e,t),a));if("function"==typeof e.query)return e.query(...e.queryTag.apply(e,t),a)}if("function"==typeof e.sql)return e.sql.apply(e,t);throw new Error("source does not implement query, queryStream, or sql")}function Bt(e,t){if("object"==typeof e){let n="";return null!=e.database&&(n+=t(e.database)+"."),null!=e.schema&&(n+=t(e.schema)+"."),n+=t(e.table),n}return t(e)}function zt(e,t){const n=t[0];n[n.length-1]+=e}function Wt({column:e,direction:t},n,r){zt(`${r(e)} ${t.toUpperCase()}`,n)}function Ht({type:e,operands:t},n,r){if(t.length<1)throw new Error("Invalid operand length");if(1===t.length||"v"===e||"nv"===e)switch(Vt(t[0],n,r),e){case"n":case"nv":return void zt(" IS NULL",n);case"nn":case"v":return void zt(" IS NOT NULL",n);default:throw new Error("Invalid filter operation")}if(2!==t.length||["in","nin"].includes(e)){var a;switch(Vt(t[0],n,r),e){case"in":zt(" IN (",n);break;case"nin":zt(" NOT IN (",n);break;default:throw new Error("Invalid filter operation")}!function(e,t){let n=!0;for(const r of e)n?n=!1:zt(",",t),t.push(r.value),t[0].push("")}(t.slice(1),n),zt(")",n)}else{if(["c","nc"].includes(e)){switch(Vt(t[0],n,r),e){case"c":zt(" LIKE ",n);break;case"nc":zt(" NOT LIKE ",n)}return void Vt((a=t[1],{...a,value:`%${a.value}%`}),n,r)}switch(Vt(t[0],n,r),e){case"eq":zt(" = ",n);break;case"ne":zt(" <> ",n);break;case"gt":zt(" > ",n);break;case"lt":zt(" < ",n);break;case"gte":zt(" >= ",n);break;case"lte":zt(" <= ",n);break;default:throw new Error("Invalid filter operation")}Vt(t[1],n,r)}}function Vt(e,t,n){"column"===e.type?zt(n(e.value),t):(t.push(e.value),t[0].push(""))}function Gt(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))}function Yt(e,t){return Gt(e,t)||(e<t?-1:e>t?1:0)}function Zt(e,t){return Gt(e,t)||(e>t?-1:e<t?1:0)}const Jt=e=>"number"==typeof e&&!Number.isNaN(e),Kt=e=>Number.isInteger(e)&&!Number.isNaN(e),Xt=e=>"string"==typeof e,Qt=e=>"boolean"==typeof e,en=e=>"bigint"==typeof e,tn=e=>e instanceof Date&&!isNaN(e),nn=e=>e instanceof ArrayBuffer,rn=e=>Array.isArray(e),an=e=>"object"==typeof e&&null!==e,on=e=>null!=e;function sn(e){switch(e){case"string":return Xt;case"bigint":return en;case"boolean":return Qt;case"number":return Jt;case"integer":return Kt;case"date":return tn;case"buffer":return nn;case"array":return rn;case"object":return an;default:return on}}const cn=/^(([-+]\d{2})?\d{4}(-\d{2}(-\d{2}))|(\d{1,2})\/(\d{1,2})\/(\d{2,4}))([T ]\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/;function ln(e,t){switch(t){case"string":return"string"==typeof e||null==e?e:String(e);case"boolean":if("string"==typeof e){const t=e.trim().toLowerCase();return"true"===t||"false"!==t&&null}return"boolean"==typeof e||null==e?e:Boolean(e);case"bigint":return"bigint"==typeof e||null==e?e:Number.isInteger("string"!=typeof e||e.trim()?+e:NaN)?BigInt(e):void 0;case"integer":case"number":return"number"==typeof e?e:null==e||"string"==typeof e&&!e.trim()?NaN:Number(e);case"date":{if(e instanceof Date||null==e)return e;if("number"==typeof e)return new Date(e);const t=String(e).trim();return"string"!=typeof e||t?new Date(cn.test(t)?t:NaN):null}case"array":case"object":case"buffer":case"other":return e;default:throw new Error(`Unable to coerce to type: ${t}`)}}function un(e,t){const n=e;let{schema:r,inferred:a}=function(e){const{columns:t}=e;let{schema:n}=e;return $t(n)?{schema:n,inferred:!1}:(n=mn(e,St(t)?t:void 0),{schema:n,inferred:!0})}(e);const o=new Map(r.map((({name:e,type:t})=>[e,t])));if(t.types){for(const{name:e,type:a}of t.types){o.set(e,a),r===n.schema&&(r=r.slice());const t=r.findIndex((t=>t.name===e));t>-1&&(r[t]={...r[t],type:a})}e=e.map((e=>dn(e,o,r)))}else a&&(e=e.map((e=>dn(e,o,r))));return{source:e,schema:r}}function fn(e,t){if(!t.names)return e;const n=new Map(t.names.map((e=>[e.column,e])));return e.map((e=>Object.fromEntries(Object.keys(e).map((t=>[n.get(t)?.name??t,e[t]])))))}function dn(e,t,n){const r={};for(const a of n){const n=t.get(a.name),o=e[a.name];r[a.name]="raw"===n?o:ln(o,n)}return r}const pn=["boolean","integer","number","date","bigint","array","object","buffer"];function mn(e,t=function(e){const t=new Set;for(const n of e)if(n)for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.add(e);return Array.from(t)}(e)){const n=[],r=e.slice(0,100);for(const e of t){const t={boolean:0,integer:0,number:0,date:0,string:0,array:0,object:0,bigint:0,buffer:0,defined:0};for(const n of r){let r=n[e];if(null==r)continue;const a=typeof r;if("string"!==a)++t.defined,Array.isArray(r)?++t.array:r instanceof Date?++t.date:r instanceof ArrayBuffer?++t.buffer:"number"===a?(++t.number,Number.isInteger(r)&&++t.integer):a in t&&++t[a];else{if(r=r.trim(),!r)continue;++t.defined,++t.string,/^(true|false)$/i.test(r)?++t.boolean:r&&!isNaN(r)?(++t.number,Number.isInteger(+r)&&++t.integer):cn.test(r)&&++t.date}}const a=Math.max(1,.9*t.defined),o=vt(pn,(e=>t[e]>=a?t[e]:NaN))??(t.string>=a?"string":"other");n.push({name:e,type:o,inferred:o})}return n}class Workbook{constructor(e){Object.defineProperties(this,{_:{value:e},sheetNames:{value:e.worksheets.map((e=>e.name)),enumerable:!0}})}sheet(e,t){const n="number"==typeof e?this.sheetNames[e]:this.sheetNames.includes(e+="")?e:null;if(null==n)throw new Error(`Sheet not found: ${e}`);return function(e,{range:t,headers:n}={}){let[[r,a],[o,i]]=function(e=":",{columnCount:t,rowCount:n}){if(!(e+="").match(/^[A-Z]*\d*:[A-Z]*\d*$/))throw new Error("Malformed range specifier");const[[r=0,a=0],[o=t-1,i=n-1]]=e.split(":").map(vn);return[[r,a],[o,i]]}(t,e);const s=n?e._rows[a++]:null;let c=new Set(["#"]);for(let e=r;e<=o;e++){const t=s?hn(s.findCell(e+1)):null;let n=t&&t+""||wn(e);for(;c.has(n);)n+="_";c.add(n)}c=new Array(r).concat(Array.from(c));const l=new Array(i-a+1);for(let t=a;t<=i;t++){const n=l[t-a]=Object.create(null,{"#":{value:t+1}}),i=e.getRow(t+1);if(i.hasValues)for(let e=r;e<=o;e++){const t=hn(i.findCell(e+1));null!=t&&(n[c[e+1]]=t)}}return l.columns=c.filter((()=>!0)),l}(this._.getWorksheet(n),t)}}function hn(e){if(!e)return;const{value:t}=e;if(t&&"object"==typeof t&&!(t instanceof Date)){if(t.formula||t.sharedFormula)return t.result&&t.result.error?NaN:t.result;if(t.richText)return bn(t);if(t.text){let{text:e}=t;return e.richText&&(e=bn(e)),t.hyperlink&&t.hyperlink!==e?`${t.hyperlink} ${e}`:e}return t}return t}function bn(e){return e.richText.map((e=>e.text)).join("")}function wn(e){let t="";e++;do{t=String.fromCharCode(64+(e%26||26))+t}while(e=Math.floor((e-1)/26));return t}function vn(e){const[,t,n]=e.match(/^([A-Z]*)(\d*)$/);let r=0;if(t)for(let e=0;e<t.length;e++)r+=Math.pow(26,t.length-e-1)*(t.charCodeAt(e)-64);return[r?r-1:void 0,n?+n-1:void 0]}async function yn(e){const t=await fetch(await e.url());if(!t.ok)throw new Error(`Unable to load file: ${e.name}`);return t}async function _n(e,t,{array:n=!1,typed:r=!1}={}){const a=await e.text(),o="\t"===t?n?_e:ye:n?we:be;if("auto"===r&&!n){const e=o(a);return function(e,t){const n=new Map(t.map((({name:e,type:t})=>[e,t])));return Object.assign(e.map((e=>dn(e,n,t))),{schema:t})}(e,mn(e,e.columns))}return o(a,r&&ge)}class gn{constructor(e,t){Object.defineProperty(this,"name",{value:e,enumerable:!0}),void 0!==t&&Object.defineProperty(this,"mimeType",{value:t+"",enumerable:!0})}async blob(){return(await yn(this)).blob()}async arrayBuffer(){return(await yn(this)).arrayBuffer()}async text(){return(await yn(this)).text()}async json(){return(await yn(this)).json()}async stream(){return(await yn(this)).body}async csv(e){return _n(this,",",e)}async tsv(e){return _n(this,"\t",e)}async image(e){const t=await this.url();return new Promise(((n,r)=>{const a=new Image;new URL(t,document.baseURI).origin!==new URL(location).origin&&(a.crossOrigin="anonymous"),Object.assign(a,e),a.onload=()=>n(a),a.onerror=()=>r(new Error(`Unable to load file: ${this.name}`)),a.src=t}))}async arrow({version:e=4}={}){switch(e){case 4:{const[e,t]=await Promise.all([ft(Re.resolve()),yn(this)]);return e.Table.from(t)}case 9:{const[e,t]=await Promise.all([import(`${lt}${Ue.resolve()}`),yn(this)]);return e.tableFromIPC(t)}case 11:{const[e,t]=await Promise.all([import(`${lt}${De.resolve()}`),yn(this)]);return e.tableFromIPC(t)}default:throw new Error(`unsupported arrow version: ${e}`)}}async sqlite(){return SQLiteDatabaseClient.open(yn(this))}async zip(){const[e,t]=await Promise.all([ft(Oe.resolve()),this.arrayBuffer()]);return new ZipArchive(await e.loadAsync(t))}async xml(e="application/xml"){return(new DOMParser).parseFromString(await this.text(),e)}async html(){return this.xml("text/html")}async xlsx(){const[e,t]=await Promise.all([ft(ze.resolve()),this.arrayBuffer()]);return new Workbook(await(new e.Workbook).xlsx.load(t))}}class FileAttachment extends gn{constructor(e,t,n){super(t,n),Object.defineProperty(this,"_url",{value:e})}async url(){return await this._url+""}}function En(e){throw new Error(`File not found: ${e}`)}class ZipArchive{constructor(e){Object.defineProperty(this,"_",{value:e}),this.filenames=Object.keys(e.files).filter((t=>!e.files[t].dir))}file(e){const t=this._.file(e+="");if(!t||t.dir)throw new Error(`file not found: ${e}`);return new ZipArchiveEntry(t)}}class ZipArchiveEntry extends gn{constructor(e){super(e.name),Object.defineProperty(this,"_",{value:e}),Object.defineProperty(this,"_url",{writable:!0})}async url(){return this._url||(this._url=this.blob().then(URL.createObjectURL))}async blob(){return this._.async("blob")}async arrayBuffer(){return this._.async("arraybuffer")}async text(){return this._.async("text")}async json(){return JSON.parse(await this.text())}}var Cn={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var Nn=0;function xn(e){return new Tn("O-"+(null==e?"":e+"-")+ ++Nn)}function Tn(e){this.id=e,this.href=new URL(`#${e}`,location)+""}Tn.prototype.toString=function(){return"url("+this.href+")"};var An=Object.freeze({__proto__:null,canvas:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},context2d:function(e,t,n){null==n&&(n=devicePixelRatio);var r=document.createElement("canvas");r.width=e*n,r.height=t*n,r.style.width=e+"px";var a=r.getContext("2d");return a.scale(n,n),a},download:function(e,t="untitled",n="Save"){const r=document.createElement("a"),a=r.appendChild(document.createElement("button"));async function o(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(r.href),r.removeAttribute("href"),a.textContent=n,a.disabled=!1}return a.textContent=n,r.download=t,r.onclick=async t=>{if(a.disabled=!0,r.href)return o();a.textContent="Saving…";try{const t=await("function"==typeof e?e():e);a.textContent="Download",r.href=URL.createObjectURL(t)}catch(e){a.textContent=n}if(t.eventPhase)return o();a.disabled=!1},r},element:function(e,t){var n,r=e+="",a=r.indexOf(":");a>=0&&"xmlns"!==(r=e.slice(0,a))&&(e=e.slice(a+1));var o=Cn.hasOwnProperty(r)?document.createElementNS(Cn[r],e):document.createElement(e);if(t)for(var i in t)a=(r=i).indexOf(":"),n=t[i],a>=0&&"xmlns"!==(r=i.slice(0,a))&&(i=i.slice(a+1)),Cn.hasOwnProperty(r)?o.setAttributeNS(Cn[r],i,n):o.setAttribute(i,n);return o},input:function(e){var t=document.createElement("input");return null!=e&&(t.type=e),t},range:function(e,t,n){1===arguments.length&&(t=e,e=null);var r=document.createElement("input");return r.min=e=null==e?0:+e,r.max=t=null==t?1:+t,r.step=null==n?"any":n=+n,r.type="range",r},select:function(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,(function(e){var n=document.createElement("option");n.value=n.textContent=e,t.appendChild(n)})),t},svg:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("viewBox",[0,0,e,t]),n.setAttribute("width",e),n.setAttribute("height",t),n},text:function(e){return document.createTextNode(e)},uid:xn});var jn=Object.freeze({__proto__:null,buffer:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsArrayBuffer(e)}))},text:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e)}))},url:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsDataURL(e)}))}});function $n(){return this}function Sn(e,t){let n=!1;if("function"!=typeof t)throw new Error("dispose is not a function");return{[Symbol.iterator]:$n,next:()=>n?{done:!0}:(n=!0,{done:!1,value:e}),return:()=>(n=!0,t(e),{done:!0}),throw:()=>({done:n=!0})}}function qn(e){let t,n,r=!1;const a=e((function(e){n?(n(e),n=null):r=!0;return t=e}));if(null!=a&&"function"!=typeof a)throw new Error("function"==typeof a.then?"async initializers are not supported":"initializer returned something, but not a dispose function");return{[Symbol.iterator]:$n,throw:()=>({done:!0}),return:()=>(null!=a&&a(),{done:!0}),next:function(){return{done:!1,value:r?(r=!1,Promise.resolve(t)):new Promise((e=>n=e))}}}}function On(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];case"select-multiple":return Array.from(e.selectedOptions,(e=>e.value));default:return e.value}}var Ln=Object.freeze({__proto__:null,disposable:Sn,filter:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)t(n.value,++r)&&(yield n.value)},input:function(e){return qn((function(t){var n=function(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}(e),r=On(e);function a(){t(On(e))}return e.addEventListener(n,a),void 0!==r&&t(r),function(){e.removeEventListener(n,a)}}))},map:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)yield t(n.value,++r)},observe:qn,queue:function(e){let t;const n=[],r=e((function(e){n.push(e),t&&(t(n.shift()),t=null);return e}));if(null!=r&&"function"!=typeof r)throw new Error("function"==typeof r.then?"async initializers are not supported":"initializer returned something, but not a dispose function");return{[Symbol.iterator]:$n,throw:()=>({done:!0}),return:()=>(null!=r&&r(),{done:!0}),next:function(){return{done:!1,value:n.length?Promise.resolve(n.shift()):new Promise((e=>t=e))}}}},range:function*(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n));++r<a;)yield e+r*n},valueAt:function(e,t){if(!(!isFinite(t=+t)||t<0||t!=t|0))for(var n,r=-1;!(n=e.next()).done;)if(++r===t)return n.value},worker:function(e){const t=URL.createObjectURL(new Blob([e],{type:"text/javascript"})),n=new Worker(t);return Sn(n,(()=>{n.terminate(),URL.revokeObjectURL(t)}))}});function kn(e,t){return function(n){var r,a,o,i,s,c,l,u,f=n[0],d=[],p=null,m=-1;for(s=1,c=arguments.length;s<c;++s){if((r=arguments[s])instanceof Node)d[++m]=r,f+="\x3c!--o:"+m+"--\x3e";else if(Array.isArray(r)){for(l=0,u=r.length;l<u;++l)(a=r[l])instanceof Node?(null===p&&(d[++m]=p=document.createDocumentFragment(),f+="\x3c!--o:"+m+"--\x3e"),p.appendChild(a)):(p=null,f+=a);p=null}else f+=r;f+=n[s]}if(p=e(f),++m>0){for(o=new Array(m),i=document.createTreeWalker(p,NodeFilter.SHOW_COMMENT,null,!1);i.nextNode();)a=i.currentNode,/^o:/.test(a.nodeValue)&&(o[+a.nodeValue.slice(2)]=a);for(s=0;s<m;++s)(a=o[s])&&a.parentNode.replaceChild(d[s],a)}return 1===p.childNodes.length?p.removeChild(p.firstChild):11===p.nodeType?((a=t()).appendChild(p),a):p}}const Mn=kn((function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)}),(function(){return document.createElement("span")}));function In(e){let t;Object.defineProperties(this,{generator:{value:qn((e=>{t=e}))},value:{get:()=>e,set:n=>t(e=n)}}),void 0!==e&&t(e)}function*Pn(){for(;;)yield Date.now()}var Rn=new Map;function Un(e,t){var n;return(n=Rn.get(e=+e))?n.then((()=>t)):(n=Date.now())>=e?Promise.resolve(t):function(e,t){var n=new Promise((function(n){Rn.delete(t);var r=t-e;if(!(r>0))throw new Error("invalid time");if(r>2147483647)throw new Error("too long to wait");setTimeout(n,r)}));return Rn.set(t,n),n}(n,e).then((()=>t))}var Dn=Object.freeze({__proto__:null,delay:function(e,t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))},tick:function(e,t){return Un(Math.ceil((Date.now()+1)/e)*e,t)},when:Un});function Fn(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}const Bn=kn((function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t}),(function(){return document.createElementNS("http://www.w3.org/2000/svg","g")}));var zn=String.raw;function Wn(e){return new Promise((function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onerror=n,r.onload=t,document.head.appendChild(r)}))}function Hn(){return qn((function(e){var t=e(document.body.clientWidth);function n(){var n=document.body.clientWidth;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}}))}const Library=Object.assign(Object.defineProperties((function(e){const t=function(e){return null==e?ft:at(e)}(e);var n;Object.defineProperties(this,(n={FileAttachment:()=>En,Mutable:()=>In,now:Pn,width:Hn,dot:()=>t(Ae.resolve()),htl:()=>t(qe.resolve()),html:()=>Mn,md:()=>function(e){return e(Le.resolve()).then((function(t){return kn((function(n){var r=document.createElement("div");r.innerHTML=t(n,{langPrefix:""}).trim();var a=r.querySelectorAll("pre code[class]");return a.length>0&&e(je.resolve()).then((function(t){a.forEach((function(n){function r(){t.highlightBlock(n),n.parentNode.classList.add("observablehq--md-pre")}t.getLanguage(n.className)?r():e(je.resolve("async-languages/index.js")).then((r=>{if(r.has(n.className))return e(je.resolve("async-languages/"+r.get(n.className))).then((e=>{t.registerLanguage(n.className,e)}))})).then(r,r)}))})),r}),(function(){return document.createElement("div")}))}))}(t),svg:()=>Bn,tex:()=>function(e){return Promise.all([e($e.resolve()),e.resolve($e.resolve("dist/katex.min.css")).then(Wn)]).then((function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(zn.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n}))}(t),_:()=>t(Se.resolve()),aq:()=>t.alias({"apache-arrow":Re.resolve()})(Fe.resolve()),Arrow:()=>t(Re.resolve()),d3:()=>t(Ne.resolve()),DuckDBClient:()=>DuckDBClient,Inputs:()=>t(xe.resolve()).then((e=>({...e,file:e.fileOf(gn)}))),L:()=>async function(e){const t=await e(He.resolve());if(!t._style){const n=document.createElement("link");n.rel="stylesheet",n.href=await e.resolve(He.resolve("dist/leaflet.css")),t._style=document.head.appendChild(n)}return t}(t),mermaid:()=>async function(e){const t=await e(We.resolve());return t.initialize({securityLevel:"loose",theme:"neutral"}),function(){const e=document.createElement("div");return e.innerHTML=t.render(xn().id,String.raw.apply(String,arguments)),e.removeChild(e.firstChild)}}(t),Plot:()=>t(Te.resolve()),__query:()=>It,require:()=>t,resolve:()=>Fn,SQLite:()=>dt(t),SQLiteDatabaseClient:()=>SQLiteDatabaseClient,topojson:()=>t(Be.resolve()),vl:()=>async function(e){const[t,n,r]=await Promise.all([Me,Ie,Pe].map((t=>e(t.resolve()))));return r.register(t,n)}(t),aapl:()=>new FileAttachment("https://static.observableusercontent.com/files/3ccff97fd2d93da734e76829b2b066eafdaac6a1fafdec0faf6ebc443271cfc109d29e80dd217468fcb2aff1e6bffdc73f356cc48feb657f35378e6abbbb63b9").csv({typed:!0}),alphabet:()=>new FileAttachment("https://static.observableusercontent.com/files/75d52e6c3130b1cae83cda89305e17b50f33e7420ef205587a135e8562bcfd22e483cf4fa2fb5df6dff66f9c5d19740be1cfaf47406286e2eb6574b49ffc685d").csv({typed:!0}),cars:()=>new FileAttachment("https://static.observableusercontent.com/files/048ec3dfd528110c0665dfa363dd28bc516ffb7247231f3ab25005036717f5c4c232a5efc7bb74bc03037155cb72b1abe85a33d86eb9f1a336196030443be4f6").csv({typed:!0}),citywages:()=>new FileAttachment("https://static.observableusercontent.com/files/39837ec5121fcc163131dbc2fe8c1a2e0b3423a5d1e96b5ce371e2ac2e20a290d78b71a4fb08b9fa6a0107776e17fb78af313b8ea70f4cc6648fad68ddf06f7a").csv({typed:!0}),diamonds:()=>new FileAttachment("https://static.observableusercontent.com/files/87942b1f5d061a21fa4bb8f2162db44e3ef0f7391301f867ab5ba718b225a63091af20675f0bfe7f922db097b217b377135203a7eab34651e21a8d09f4e37252").csv({typed:!0}),flare:()=>new FileAttachment("https://static.observableusercontent.com/files/a6b0d94a7f5828fd133765a934f4c9746d2010e2f342d335923991f31b14120de96b5cb4f160d509d8dc627f0107d7f5b5070d2516f01e4c862b5b4867533000").csv({typed:!0}),industries:()=>new FileAttachment("https://static.observableusercontent.com/files/76f13741128340cc88798c0a0b7fa5a2df8370f57554000774ab8ee9ae785ffa2903010cad670d4939af3e9c17e5e18e7e05ed2b38b848ac2fc1a0066aa0005f").csv({typed:!0}),miserables:()=>new FileAttachment("https://static.observableusercontent.com/files/31d904f6e21d42d4963ece9c8cc4fbd75efcbdc404bf511bc79906f0a1be68b5a01e935f65123670ed04e35ca8cae3c2b943f82bf8db49c5a67c85cbb58db052").json(),olympians:()=>new FileAttachment("https://static.observableusercontent.com/files/31ca24545a0603dce099d10ee89ee5ae72d29fa55e8fc7c9ffb5ded87ac83060d80f1d9e21f4ae8eb04c1e8940b7287d179fe8060d887fb1f055f430e210007c").csv({typed:!0}),penguins:()=>new FileAttachment("https://static.observableusercontent.com/files/715db1223e067f00500780077febc6cebbdd90c151d3d78317c802732252052ab0e367039872ab9c77d6ef99e5f55a0724b35ddc898a1c99cb14c31a379af80a").csv({typed:!0}),pizza:()=>new FileAttachment("https://static.observableusercontent.com/files/c653108ab176088cacbb338eaf2344c4f5781681702bd6afb55697a3f91b511c6686ff469f3e3a27c75400001a2334dbd39a4499fe46b50a8b3c278b7d2f7fb5").csv({typed:!0}),weather:()=>new FileAttachment("https://static.observableusercontent.com/files/693a46b22b33db0f042728700e0c73e836fa13d55446df89120682d55339c6db7cc9e574d3d73f24ecc9bc7eb9ac9a1e7e104a1ee52c00aab1e77eb102913c1f").csv({typed:!0}),DOM:An,Files:jn,Generators:Ln,Promises:Dn},Object.fromEntries(Object.entries(n).map(Vn))))}),{resolve:{get:()=>ft.resolve,enumerable:!0,configurable:!0},require:{get:()=>ft,set:function(e){ft=e},enumerable:!0,configurable:!0}}),{resolveFrom:nt,requireFrom:at});function Vn([e,t]){return[e,{value:t,writable:!0,enumerable:!0}]}class RuntimeError extends Error{constructor(e,t){super(e),this.input=t}}function Gn(e){return()=>e}function Yn(e){return e}RuntimeError.prototype.name="RuntimeError";const Zn=Array.prototype.map;function Jn(){}const Kn=Symbol("no-observer");function Variable(e,t,n,r){var a;n||(n=Kn),Object.defineProperties(this,{_observer:{value:n,writable:!0},_definition:{value:tr,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:NaN,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:Jn,writable:!0},_module:{value:t},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:n!==Kn,writable:!0},_rejector:{value:(a=this,e=>{if(e===nr)throw e;if(e===tr)throw new RuntimeError(`${a._name} is not defined`,a._name);if(e instanceof Error&&e.message)throw new RuntimeError(e.message,a._name);throw new RuntimeError(`${a._name} could not be resolved`,a._name)})},_shadow:{value:Xn(t,r)},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}function Xn(e,t){return t?.shadow?new Map(Object.entries(t.shadow).map((([t,n])=>[t,new Variable(2,e).define([],n)]))):null}function Qn(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function er(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function tr(){throw tr}function nr(){throw nr}function rr(e){return()=>{throw new RuntimeError(`${e} is defined more than once`)}}function ar(e,t,n){const r=this._module._scope,a=this._module._runtime;if(this._inputs.forEach(er,this),t.forEach(Qn,this),this._inputs=t,this._definition=n,this._value=void 0,n===Jn?a._variables.delete(this):a._variables.add(this),e!==this._name||r.get(e)!==this){let t,o;if(this._name)if(this._outputs.size)r.delete(this._name),o=this._module._resolve(this._name),o._outputs=this._outputs,this._outputs=new Set,o._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(this)]=o}),this),o._outputs.forEach(a._updates.add,a._updates),a._dirty.add(o).add(this),r.set(this._name,o);else if((o=r.get(this._name))===this)r.delete(this._name);else{if(3!==o._type)throw new Error;o._duplicates.delete(this),this._duplicate=void 0,1===o._duplicates.size&&(o=o._duplicates.keys().next().value,t=r.get(this._name),o._outputs=t._outputs,t._outputs=new Set,o._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(t)]=o})),o._definition=o._duplicate,o._duplicate=void 0,a._dirty.add(t).add(o),a._updates.add(o),r.set(this._name,o))}if(this._outputs.size)throw new Error;e&&((o=r.get(e))?3===o._type?(this._definition=rr(e),this._duplicate=n,o._duplicates.add(this)):2===o._type?(this._outputs=o._outputs,o._outputs=new Set,this._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(o)]=this}),this),a._dirty.add(o).add(this),r.set(e,this)):(o._duplicate=o._definition,this._duplicate=n,t=new Variable(3,this._module),t._name=e,t._definition=this._definition=o._definition=rr(e),t._outputs=o._outputs,o._outputs=new Set,t._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(o)]=t})),t._duplicates=new Set([this,o]),a._dirty.add(o).add(t),a._updates.add(o).add(t),r.set(e,t)):r.set(e,this)),this._name=e}return this._version>0&&++this._version,a._updates.add(this),a._compute(),this}Object.defineProperties(Variable.prototype,{_pending:{value:function(){this._observer.pending&&this._observer.pending()},writable:!0,configurable:!0},_fulfilled:{value:function(e){this._observer.fulfilled&&this._observer.fulfilled(e,this._name)},writable:!0,configurable:!0},_rejected:{value:function(e){this._observer.rejected&&this._observer.rejected(e,this._name)},writable:!0,configurable:!0},_resolve:{value:function(e){return this._shadow?.get(e)??this._module._resolve(e)},writable:!0,configurable:!0},define:{value:function(e,t,n){switch(arguments.length){case 1:n=e,e=t=null;break;case 2:n=t,"string"==typeof e?t=null:(t=e,e=null)}return ar.call(this,null==e?null:String(e),null==t?[]:Zn.call(t,this._resolve,this),"function"==typeof n?n:Gn(n))},writable:!0,configurable:!0},delete:{value:function(){return ar.call(this,null,[],Jn)},writable:!0,configurable:!0},import:{value:function(e,t,n){arguments.length<3&&(n=t,t=e);return ar.call(this,String(t),[n._resolve(String(e))],Yn)},writable:!0,configurable:!0}});const or=Symbol("variable"),ir=Symbol("invalidation"),sr=Symbol("visibility");function Module(e,t=[]){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map},_builtins:{value:new Map([["@variable",or],["invalidation",ir],["visibility",sr],...t])},_source:{value:null,writable:!0}})}async function cr(e,t){await e._compute();try{return await t._promise}catch(n){if(n===nr)return cr(e,t);throw n}}function lr(e){return e._name}Object.defineProperties(Module.prototype,{_resolve:{value:function(e){let t,n=this._scope.get(e);if(!n)if(n=new Variable(2,this),this._builtins.has(e))n.define(e,Gn(this._builtins.get(e)));else if(this._runtime._builtin._scope.has(e))n.import(e,this._runtime._builtin);else{try{t=this._runtime._global(e)}catch(t){return n.define(e,function(e){return()=>{throw e}}(t))}void 0===t?this._scope.set(n._name=e,n):n.define(e,Gn(t))}return n},writable:!0,configurable:!0},redefine:{value:function(e){const t=this._scope.get(e);if(!t)throw new RuntimeError(`${e} is not defined`);if(3===t._type)throw new RuntimeError(`${e} is defined more than once`);return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){const e=new Variable(1,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){const n=new Map,r=new Set,a=[];function o(e){let t=n.get(e);return t||(t=new Module(e._runtime,e._builtins),t._source=e,n.set(e,t),a.push([t,e]),r.add(e),t)}const i=o(this);for(const n of e){const{alias:e,name:r}="object"==typeof n?n:{name:n};i.import(r,null==e?r:e,t)}for(const e of r)for(const[t,n]of e._scope)if(n._definition===Yn){if(e===this&&i._scope.has(t))continue;const r=n._inputs[0]._module;r._source&&o(r)}for(const[e,t]of a)for(const[r,a]of t._scope){const t=e._scope.get(r);if(!t||2===t._type)if(a._definition===Yn){const t=a._inputs[0],o=t._module;e.import(t._name,r,n.get(o)||o)}else e.define(r,a._inputs.map(lr),a._definition)}return i},writable:!0,configurable:!0},import:{value:function(){const e=new Variable(1,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},value:{value:async function(e){let t=this._scope.get(e);if(!t)throw new RuntimeError(`${e} is not defined`);if(t._observer!==Kn)return cr(this._runtime,t);t=this.variable(!0).define([e],Yn);try{return await cr(this._runtime,t)}finally{t.delete()}},writable:!0,configurable:!0},variable:{value:function(e,t){return new Variable(1,this,e,t)},writable:!0,configurable:!0},builtin:{value:function(e,t){this._builtins.set(e,t)},writable:!0,configurable:!0}});const ur="function"==typeof requestAnimationFrame?requestAnimationFrame:"function"==typeof setImmediate?setImmediate:e=>setTimeout(e,0);function Runtime(e=new Library,t=yr){const n=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_precomputes:{value:[],writable:!0},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:n},_global:{value:t}}),e)for(const t in e)new Variable(2,n).define(t,[],e[t])}function fr(e){const t=new Set(e._inputs);for(const n of t){if(n===e)return!0;n._inputs.forEach(t.add,t)}return!1}function dr(e){++e._indegree}function pr(e){--e._indegree}function mr(e){return e._promise.catch(e._rejector)}function hr(e){return new Promise((function(t){e._invalidate=t}))}function br(e,t){let n,r,a="function"==typeof IntersectionObserver&&t._observer&&t._observer._node,o=!a,i=Jn,s=Jn;return a&&(r=new IntersectionObserver((([e])=>(o=e.isIntersecting)&&(n=null,i()))),r.observe(a),e.then((()=>(r.disconnect(),r=null,s())))),function(e){return o?Promise.resolve(e):r?(n||(n=new Promise(((e,t)=>(i=e,s=t)))),n.then((()=>e))):Promise.reject()}}function wr(e){e._invalidate(),e._invalidate=Jn,e._pending();const t=e._value,n=++e._version;let r=null;const a=e._promise=(e._inputs.length?Promise.all(e._inputs.map(mr)).then((function(a){if(e._version!==n)throw nr;for(let t=0,n=a.length;t<n;++t)switch(a[t]){case ir:a[t]=r=hr(e);break;case sr:r||(r=hr(e)),a[t]=br(r,e);break;case or:a[t]=e}return e._definition.apply(t,a)})):new Promise((n=>n(e._definition.call(t))))).then((function(t){if(e._version!==n)throw nr;if(function(e){return e&&"function"==typeof e.next&&"function"==typeof e.return}(t))return(r||hr(e)).then((a=t,function(){a.return()})),function(e,t,n){const r=e._module._runtime;let a;function o(e){return new Promise((e=>e(n.next(a)))).then((({done:t,value:n})=>t?void 0:Promise.resolve(n).then(e)))}function i(){const n=o((o=>{if(e._version!==t)throw nr;return a=o,s(o,n).then((()=>r._precompute(i))),e._fulfilled(o),o}));n.catch((r=>{r!==nr&&e._version===t&&(s(void 0,n),e._rejected(r))}))}function s(t,n){return e._value=t,e._promise=n,e._outputs.forEach(r._updates.add,r._updates),r._compute()}return o((n=>{if(e._version!==t)throw nr;return a=n,r._precompute(i),n}))}(e,n,t);var a;return t}));a.then((t=>{e._value=t,e._fulfilled(t)}),(t=>{t!==nr&&e._version===n&&(e._value=void 0,e._rejected(t))}))}function vr(e,t){e._invalidate(),e._invalidate=Jn,e._pending(),++e._version,e._indegree=NaN,(e._promise=Promise.reject(t)).catch(Jn),e._value=void 0,e._rejected(t)}function yr(e){return globalThis[e]}Object.defineProperties(Runtime.prototype,{_precompute:{value:function(e){this._precomputes.push(e),this._compute()},writable:!0,configurable:!0},_compute:{value:function(){return this._computing||(this._computing=this._computeSoon())},writable:!0,configurable:!0},_computeSoon:{value:function(){return new Promise(ur).then((()=>this._disposed?void 0:this._computeNow()))},writable:!0,configurable:!0},_computeNow:{value:async function(){let e,t,n=[],r=this._precomputes;if(r.length){this._precomputes=[];for(const e of r)e();await function(e=0){let t=Promise.resolve();for(let n=0;n<e;++n)t=t.then((()=>{}));return t}(3)}e=new Set(this._dirty),e.forEach((function(t){t._inputs.forEach(e.add,e);const n=function(e){if(e._observer!==Kn)return!0;const t=new Set(e._outputs);for(const e of t){if(e._observer!==Kn)return!0;e._outputs.forEach(t.add,t)}return!1}(t);n>t._reachable?this._updates.add(t):n<t._reachable&&t._invalidate(),t._reachable=n}),this),e=new Set(this._updates),e.forEach((function(t){t._reachable?(t._indegree=0,t._outputs.forEach(e.add,e)):(t._indegree=NaN,e.delete(t))})),this._computing=null,this._updates.clear(),this._dirty.clear(),e.forEach((function(e){e._outputs.forEach(dr)}));do{for(e.forEach((function(e){0===e._indegree&&n.push(e)}));t=n.pop();)wr(t),t._outputs.forEach(a),e.delete(t);e.forEach((function(t){fr(t)&&(vr(t,new RuntimeError("circular definition")),t._outputs.forEach(pr),e.delete(t))}))}while(e.size);function a(e){0==--e._indegree&&n.push(e)}},writable:!0,configurable:!0},dispose:{value:function(){this._computing=Promise.resolve(),this._disposed=!0,this._variables.forEach((e=>{e._invalidate(),e._version=NaN}))},writable:!0,configurable:!0},module:{value:function(e,t=Jn){let n;if(void 0===e)return(n=this._init)?(this._init=null,n):new Module(this);if(n=this._modules.get(e),n)return n;this._init=n=new Module(this),this._modules.set(e,n);try{e(this,t)}finally{this._init=null}return n},writable:!0,configurable:!0},fileAttachments:{value:function(e){return Object.assign((t=>{const n=e(t+="");if(null==n)throw new Error(`File not found: ${t}`);if("object"==typeof n&&"url"in n){const{url:e,mimeType:r}=n;return new FileAttachment(e,t,r)}return new FileAttachment(n,t)}),{prototype:FileAttachment.prototype})},writable:!0,configurable:!0}});export{Inspector,Library,Runtime,RuntimeError};
dist/_observablehq/stdlib.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const u=new Map;function m(n,e){const t=String(new URL(n,location.href));e==null?u.delete(t):u.set(t,e)}function h(n,e=location.href){if(new.target!==void 0)throw new TypeError("FileAttachment is not a constructor");const t=String(new URL(n,e)),r=u.get(t);if(!r)throw new Error(`File not found: ${n}`);const{path:i,mimeType:o}=r;return new f(i,n.split("/").pop(),o)}async function a(n){const e=await fetch(await n.url());if(!e.ok)throw new Error(`Unable to load file: ${n.name}`);return e}async function y(n,e,{array:t=!1,typed:r=!1}={}){const[i,o]=await Promise.all([n.text(),import("https://cdn.jsdelivr.net/npm/d3-dsv@3.0.1/+esm")]);return(e===" "?t?o.tsvParseRows:o.tsvParse:t?o.csvParseRows:o.csvParse)(i,r&&o.autoType)}class p{constructor(e,t){Object.defineProperty(this,"name",{value:e,enumerable:!0}),t!==void 0&&Object.defineProperty(this,"mimeType",{value:t+"",enumerable:!0})}async blob(){return(await a(this)).blob()}async arrayBuffer(){return(await a(this)).arrayBuffer()}async text(e){return e===void 0?(await a(this)).text():new TextDecoder(e).decode(await this.arrayBuffer())}async json(){return(await a(this)).json()}async stream(){return(await a(this)).body}async csv(e){return y(this,",",e)}async tsv(e){return y(this," ",e)}async image(e){const t=await this.url();return new Promise((r,i)=>{const o=new Image;new URL(t,document.baseURI).origin!==new URL(location).origin&&(o.crossOrigin="anonymous"),Object.assign(o,e),o.onload=()=>r(o),o.onerror=()=>i(new Error(`Unable to load file: ${this.name}`)),o.src=t})}async arrow(){const[e,t]=await Promise.all([import("https://cdn.jsdelivr.net/npm/apache-arrow@13.0.0/+esm"),a(this)]);return e.tableFromIPC(t)}async parquet(){const[e,t,r]=await Promise.all([import("https://cdn.jsdelivr.net/npm/apache-arrow@13.0.0/+esm"),import("https://cdn.jsdelivr.net/npm/parquet-wasm@0.5.0/esm/arrow1.js").then(async i=>(await i.default(),i)),this.arrayBuffer()]);return e.tableFromIPC(t.readParquet(new Uint8Array(r)).intoIPCStream())}async sqlite(){const[{SQLiteDatabaseClient:e},t]=await Promise.all([import("./stdlib/sqlite.js"),this.arrayBuffer()]);return e.open(t)}async zip(){const[{ZipArchive:e},t]=await Promise.all([import("./stdlib/zip.js"),this.arrayBuffer()]);return e.from(t)}async xml(e="application/xml"){return new DOMParser().parseFromString(await this.text(),e)}async html(){return this.xml("text/html")}async xlsx(){const[{Workbook:e},t]=await Promise.all([import("./stdlib/xlsx.js"),this.arrayBuffer()]);return e.load(t)}}class f extends p{constructor(e,t,r){super(t,r),Object.defineProperty(this,"_url",{value:e})}async url(){return await this._url+""}}Object.defineProperty(f,"name",{value:"FileAttachment"}),h.prototype=f.prototype;async function*c(n){let e,t,r=!1;const i=n(o=>(t=o,e?(e(o),e=null):r=!0,o));if(i!=null&&typeof i!="function")throw new Error(typeof i.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");try{for(;;)yield r?(r=!1,t):new Promise(o=>e=o)}finally{i?.()}}function d(n){return c(e=>{const t=b(n);let r=w(n);const i=()=>e(w(n));return n.addEventListener(t,i),r!==void 0&&e(r),()=>n.removeEventListener(t,i)})}function w(n){switch(n.type){case"range":case"number":return n.valueAsNumber;case"date":return n.valueAsDate;case"checkbox":return n.checked;case"file":return n.multiple?n.files:n.files[0];case"select-multiple":return Array.from(n.selectedOptions,e=>e.value);default:return n.value}}function b(n){switch(n.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}async function*v(){for(;;)yield Date.now()}async function*P(n){let e;const t=[],r=n(i=>(t.push(i),e&&(e(t.shift()),e=null),i));if(r!=null&&typeof r!="function")throw new Error(typeof r.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");try{for(;;)yield t.length?t.shift():new Promise(i=>e=i)}finally{r?.()}}function g(n,e){return c(t=>{let r;const i=new ResizeObserver(([o])=>{const s=o.contentRect.width;s!==r&&t(r=s)});return i.observe(n,e),()=>i.disconnect()})}var x=Object.freeze({__proto__:null,input:d,now:v,observe:c,queue:P,width:g});function O(n){let e;return Object.defineProperty(c(t=>{e=t,n!==void 0&&e(n)}),"value",{get:()=>n,set:t=>void e(n=t)})}function R(n,e){const t=document.createElement("div");t.style.position="relative",n.length!==1&&(t.style.height="100%");const r=new ResizeObserver(([i])=>{const{width:o,height:s}=i.contentRect;for(;t.lastChild;)t.lastChild.remove();if(o>0){const l=n(o,s);n.length!==1&&j(l)&&(l.style.position="absolute"),t.append(l)}});return r.observe(t),e?.then(()=>r.disconnect()),t}function j(n){return n.nodeType===1}export{p as AbstractFile,h as FileAttachment,x as Generators,O as Mutable,m as registerFile,R as resize};
dist/_observablehq/stdlib/dot.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{instance as s}from"https://cdn.jsdelivr.net/npm/@viz-js/viz@3.2.4/+esm";const i=await s();function c(r){let n=r[0]+"",o=0,l=arguments.length;for(;++o<l;)n+=arguments[o]+""+r[o];const t=i.renderSVGElement(n,{graphAttributes:{bgcolor:"none",color:"#00000101",fontcolor:"#00000101",fontname:"var(--sans-serif)",fontsize:"12"},nodeAttributes:{color:"#00000101",fontcolor:"#00000101",fontname:"var(--sans-serif)",fontsize:"12"},edgeAttributes:{color:"#00000101"}});for(const e of t.querySelectorAll("[stroke='#000001'][stroke-opacity='0.003922']"))e.setAttribute("stroke","currentColor"),e.removeAttribute("stroke-opacity");for(const e of t.querySelectorAll("[fill='#000001'][fill-opacity='0.003922']"))e.setAttribute("fill","currentColor"),e.removeAttribute("fill-opacity");return t.remove(),t.style="max-width: 100%; height: auto;",t}export{c as default};
dist/_observablehq/stdlib/duckdb.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import*as o from"https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.28.0/+esm";const w=await o.selectBundle({mvp:{mainModule:"https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.28.0/dist/duckdb-mvp.wasm",mainWorker:"https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.28.0/dist/duckdb-browser-mvp.worker.js"},eh:{mainModule:"https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.28.0/dist/duckdb-eh.wasm",mainWorker:"https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.28.0/dist/duckdb-browser-eh.worker.js"}}),f=new o.ConsoleLogger;class l{constructor(t){Object.defineProperties(this,{_db:{value:t}})}async queryStream(t,e){const n=await this._db.connect();let s,r;try{if(e?.length>0?s=await(await n.prepare(t)).send(...e):s=await n.send(t),r=await s.next(),r.done)throw new Error("missing first batch")}catch(i){throw await n.close(),i}return{schema:I(r.value),async*readRows(){try{for(;!r.done;)yield r.value.toArray(),r=await s.next()}finally{await n.close()}}}}async query(t,e){const n=await this.queryStream(t,e),s=[];for await(const r of n.readRows())for(const i of r)s.push(i);return s.schema=n.schema,s}async queryRow(t,e){const n=(await this.queryStream(t,e)).readRows();try{const{done:s,value:r}=await n.next();return s||!r.length?null:r[0]}finally{await n.return()}}async sql(t,...e){return await this.query(t.join("?"),e)}queryTag(t,...e){return[t.join("?"),e]}escape(t){return`"${t}"`}async describeTables(){return(await this.query("SHOW TABLES")).map(({name:t})=>({name:t}))}async describeColumns({table:t}={}){return(await this.query(`DESCRIBE ${this.escape(t)}`)).map(({column_name:e,column_type:n,null:s})=>({name:e,type:T(n),nullable:s!=="NO",databaseType:n}))}static async of(t={},e={}){const n=await b();return e.query?.castTimestampToDate===void 0&&(e={...e,query:{...e.query,castTimestampToDate:!0}}),e.query?.castBigIntToDouble===void 0&&(e={...e,query:{...e.query,castBigIntToDouble:!0}}),await n.open(e),await Promise.all(Object.entries(t).map(async([s,r])=>{if(r=await r,A(r))await m(n,s,r);else if(y(r))await u(n,s,r);else if(Array.isArray(r))await d(n,s,r);else if(E(r))await h(n,s,r);else if("data"in r){const{data:i,...c}=r;y(i)?await u(n,s,i,c):await d(n,s,i,c)}else if("file"in r){const{file:i,...c}=r;await m(n,s,i,c)}else throw new Error(`invalid source: ${r}`)})),new l(n)}}Object.defineProperty(l.prototype,"dialect",{value:"duckdb"});async function m(a,t,e,n){const s=await e.url();if(s.startsWith("blob:")){const i=await e.arrayBuffer();await a.registerFileBuffer(e.name,new Uint8Array(i))}else await a.registerFileURL(e.name,new URL(s,location).href,4);const r=await a.connect();try{switch(e.mimeType){case"text/csv":case"text/tab-separated-values":return await r.insertCSVFromPath(e.name,{name:t,schema:"main",...n}).catch(async i=>{if(i.toString().includes("Could not convert"))return await p(r,e,t);throw i});case"application/json":return await r.insertJSONFromPath(e.name,{name:t,schema:"main",...n});default:if(/\.arrow$/i.test(e.name)){const i=new Uint8Array(await e.arrayBuffer());return await r.insertArrowFromIPCStream(i,{name:t,schema:"main",...n})}if(/\.parquet$/i.test(e.name))return await r.query(`CREATE VIEW '${t}' AS SELECT * FROM parquet_scan('${e.name}')`);throw new Error(`unknown file type: ${e.mimeType}`)}}finally{await r.close()}}async function p(a,t,e){return await(await a.prepare(`CREATE TABLE '${e}' AS SELECT * FROM read_csv_auto(?, ALL_VARCHAR=TRUE)`)).send(t.name)}async function u(a,t,e,n){const s=await a.connect();try{await s.insertArrowTable(e,{name:t,schema:"main",...n})}finally{await s.close()}}async function h(a,t,e){const n=(await import("https://cdn.jsdelivr.net/npm/apache-arrow@13.0.0/+esm")).tableFromIPC(e.toArrowBuffer());return await u(a,t,n)}async function d(a,t,e,n){const s=(await import("https://cdn.jsdelivr.net/npm/apache-arrow@13.0.0/+esm")).tableFromJSON(e);return await u(a,t,s,n)}async function b(){const a=await o.createWorker(w.mainWorker),t=new o.AsyncDuckDB(f,a);return await t.instantiate(w.mainModule),t}function T(a){switch(a){case"BIGINT":case"HUGEINT":case"UBIGINT":return"bigint";case"DOUBLE":case"REAL":case"FLOAT":return"number";case"INTEGER":case"SMALLINT":case"TINYINT":case"USMALLINT":case"UINTEGER":case"UTINYINT":return"integer";case"BOOLEAN":return"boolean";case"DATE":case"TIMESTAMP":case"TIMESTAMP WITH TIME ZONE":return"date";case"VARCHAR":case"UUID":return"string";default:return/^DECIMAL\(/.test(a)?"integer":"other"}}function A(a){return a&&typeof a.name=="string"&&typeof a.url=="function"&&typeof a.arrayBuffer=="function"}function E(a){return a&&typeof a.toArrowBuffer=="function"}function y(a){return a&&typeof a.getChild=="function"&&typeof a.toArray=="function"&&a.schema&&Array.isArray(a.schema.fields)}function I(a){return a.schema.fields.map(k)}function k(a){return{name:a.name,type:g(a.type),nullable:a.nullable,databaseType:`${a.type}`}}function g(a){switch(a.typeId){case 2:return"integer";case 3:case 7:return"number";case 4:case 15:return"buffer";case 5:return"string";case 6:return"boolean";case 8:case 9:case 10:return"date";case 12:case 16:return"array";case 13:case 14:return"object";case 11:case 17:default:return"other"}}export{l as DuckDBClient};
dist/_observablehq/stdlib/inputs.css ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* node_modules/@observablehq/framework/src/client/stdlib/inputs.css */
2
+ .inputs-3a86ea {
3
+ --length1: 3.25px;
4
+ --length2: 6.5px;
5
+ --length3: 13px;
6
+ --label-width: 120px;
7
+ --input-width: 240px;
8
+ font: 13px/1.2 var(--sans-serif);
9
+ }
10
+ form.inputs-3a86ea {
11
+ display: flex;
12
+ align-items: center;
13
+ flex-wrap: wrap;
14
+ min-height: 25.5px;
15
+ margin: var(--length3) 0;
16
+ }
17
+ form.inputs-3a86ea > label {
18
+ width: 100%;
19
+ padding-bottom: 3px;
20
+ }
21
+ form.inputs-3a86ea-toggle {
22
+ flex-wrap: nowrap;
23
+ }
24
+ form.inputs-3a86ea-toggle > label {
25
+ align-self: start;
26
+ padding: 5px 0 4px 0;
27
+ margin-right: var(--length2);
28
+ }
29
+ form.inputs-3a86ea-toggle > label,
30
+ form.inputs-3a86ea-toggle .inputs-3a86ea-input {
31
+ width: initial;
32
+ }
33
+ @media only screen and (min-width: 30em) {
34
+ form.inputs-3a86ea {
35
+ flex-wrap: nowrap;
36
+ width: calc(var(--input-width) + var(--label-width));
37
+ max-width: 100%;
38
+ margin: initial;
39
+ }
40
+ form.inputs-3a86ea > label {
41
+ flex-shrink: 0;
42
+ align-self: start;
43
+ padding: 5px 0 4px 0;
44
+ width: var(--label-width);
45
+ margin-right: var(--length2);
46
+ }
47
+ }
48
+ .inputs-3a86ea button,
49
+ .inputs-3a86ea input,
50
+ .inputs-3a86ea select,
51
+ .inputs-3a86ea table,
52
+ .inputs-3a86ea textarea {
53
+ color: inherit;
54
+ font: inherit;
55
+ box-sizing: border-box;
56
+ }
57
+ .inputs-3a86ea button,
58
+ .inputs-3a86ea input {
59
+ line-height: normal;
60
+ }
61
+ .inputs-3a86ea button {
62
+ margin: 0;
63
+ }
64
+ .inputs-3a86ea button + button {
65
+ margin-left: var(--length1);
66
+ }
67
+ .inputs-3a86ea-textarea {
68
+ --input-width: 520px;
69
+ }
70
+ .inputs-3a86ea-textarea > div {
71
+ width: 100%;
72
+ text-align: right;
73
+ }
74
+ .inputs-3a86ea-textarea > div textarea {
75
+ display: block;
76
+ width: 100%;
77
+ margin: 0;
78
+ padding: 4px;
79
+ min-height: calc(2.5em + 8px);
80
+ max-height: calc(14em + 8px);
81
+ resize: vertical;
82
+ }
83
+ .inputs-3a86ea-textarea > div button {
84
+ margin: 4px 0 0;
85
+ }
86
+ .inputs-3a86ea input[type=radio],
87
+ .inputs-3a86ea input[type=checkbox] {
88
+ margin-right: var(--length2);
89
+ }
90
+ .inputs-3a86ea-input {
91
+ display: flex;
92
+ align-items: center;
93
+ width: 100%;
94
+ }
95
+ .inputs-3a86ea-input > input,
96
+ .inputs-3a86ea-input > button,
97
+ .inputs-3a86ea-input > output {
98
+ width: inherit;
99
+ min-width: 0;
100
+ }
101
+ .inputs-3a86ea-input > button,
102
+ .inputs-3a86ea-input > output,
103
+ .inputs-3a86ea-input > input[type=number] {
104
+ flex-shrink: 2.5;
105
+ }
106
+ .inputs-3a86ea-input > output {
107
+ white-space: pre;
108
+ margin-left: var(--length2);
109
+ }
110
+ .inputs-3a86ea-input > button {
111
+ margin-left: var(--length1);
112
+ }
113
+ .inputs-3a86ea-input > input[type=number] {
114
+ font-variant-numeric: tabular-nums;
115
+ flex-shrink: 1.5;
116
+ text-overflow: ellipsis;
117
+ }
118
+ .inputs-3a86ea-input > input[type=color] ~ output {
119
+ font-family: ui-monospace, var(--monospace);
120
+ }
121
+ .inputs-3a86ea-input:not(:only-child) > input[type=color] ~ output {
122
+ flex-shrink: 1;
123
+ }
124
+ .inputs-3a86ea-input > input[type=range] {
125
+ margin: 0;
126
+ margin-left: var(--length2);
127
+ }
128
+ .inputs-3a86ea-input > input[type=date],
129
+ .inputs-3a86ea-input > input[type=datetime-local] {
130
+ height: 22px;
131
+ }
132
+ form.inputs-3a86ea-checkbox {
133
+ width: auto;
134
+ max-width: 640px;
135
+ }
136
+ .inputs-3a86ea-checkbox div label {
137
+ display: inline-flex;
138
+ align-items: center;
139
+ margin-right: var(--length3);
140
+ }
141
+ form.inputs-3a86ea-table {
142
+ display: block;
143
+ overflow-y: auto;
144
+ width: 100%;
145
+ }
146
+ .inputs-3a86ea-table table {
147
+ max-width: initial;
148
+ min-height: 33px;
149
+ margin: 0;
150
+ border-collapse: separate;
151
+ border-spacing: 0;
152
+ font-variant-numeric: tabular-nums;
153
+ }
154
+ .inputs-3a86ea-table tr:not(:last-child) td,
155
+ .inputs-3a86ea-table tr:not(:last-child) th {
156
+ border-bottom: solid 1px var(--theme-foreground-faintest);
157
+ }
158
+ .inputs-3a86ea-table thead tr td,
159
+ .inputs-3a86ea-table thead tr th {
160
+ border-bottom: solid 1px var(--theme-foreground-fainter);
161
+ }
162
+ .inputs-3a86ea-table thead th span {
163
+ display: inline-block;
164
+ width: 0.5em;
165
+ margin-left: -0.5em;
166
+ }
167
+ .inputs-3a86ea-table td,
168
+ .inputs-3a86ea-table th {
169
+ white-space: nowrap;
170
+ text-overflow: ellipsis;
171
+ overflow: hidden;
172
+ padding: 3px 6.5px 3px 0;
173
+ }
174
+ .inputs-3a86ea-table tr > :not(:first-of-type) {
175
+ padding-left: var(--length2);
176
+ }
177
+ .inputs-3a86ea-table tr > :last-of-type {
178
+ padding-right: var(--length3);
179
+ }
180
+ .inputs-3a86ea-table tr > :first-of-type {
181
+ text-overflow: unset;
182
+ width: 19px;
183
+ }
184
+ .inputs-3a86ea-table tr > :first-of-type input {
185
+ opacity: 0;
186
+ margin: 0 3px 1px 4px;
187
+ }
188
+ .inputs-3a86ea-table tr:hover > :first-of-type input:enabled,
189
+ .inputs-3a86ea-table tr > :first-of-type input:focus,
190
+ .inputs-3a86ea-table tr > :first-of-type input:checked,
191
+ .inputs-3a86ea-table tr > :first-of-type input[type=checkbox]:indeterminate {
192
+ opacity: inherit;
193
+ }
194
+ .inputs-3a86ea-table thead tr {
195
+ border-bottom: none;
196
+ }
197
+ .inputs-3a86ea-table thead th {
198
+ position: sticky;
199
+ top: 0;
200
+ background: var(--theme-background);
201
+ cursor: ns-resize;
202
+ }
203
+ .inputs-3a86ea-table tbody tr:first-child td {
204
+ padding-top: 4px;
205
+ }
dist/_observablehq/stdlib/inputs.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{html as p}from"https://cdn.jsdelivr.net/npm/htl@0.3.1/+esm";import{format as Ke,parse as Ve}from"https://cdn.jsdelivr.net/npm/isoformat@0.2.1/+esm";import{AbstractFile as Ge}from"../stdlib.js";function C(e){return e==null?null:typeof e=="number"?`${e}px`:`${e}`}function D(e){return{"--input-width":C(e)}}const ae={bubbles:!0};function G(e){e.preventDefault()}function te({currentTarget:e}){(e.form||e).dispatchEvent(new Event("input",ae))}function be(e){return e.checkValidity()}function P(e){return e}let Je=0;function ne(){return`inputs-3a86ea-${++Je}`}function z(e,t){if(e)return e=p`<label>${e}`,t!==void 0&&(e.htmlFor=t.id=ne()),e}function Re(e="\u2261",{label:t="",value:n,reduce:i,disabled:r,required:o=!1,width:a}={}){const c=typeof e=="string"||e instanceof Node;c?(!o&&n===void 0&&(n=0),i===void 0&&(i=(v=0)=>v+1),r=new Set(r?[e]:[]),e=[[e,i]]):(!o&&n===void 0&&(n=null),r=new Set(r===!0?Array.from(e,([v])=>v):r||void 0));const f=p`<form class=inputs-3a86ea>`;f.addEventListener("submit",G);const u={width:C(a)},m=Array.from(e,([v,g=P])=>{if(typeof g!="function")throw new TypeError("reduce is not a function");return p`<button disabled=${r.has(v)} style=${u} onclick=${h=>{f.value=g(f.value),te(h)}}>${v}`});return(t=z(t,c?m[0]:void 0))&&f.append(t),f.append(...m),f.value=n,f}function H(e){return Array.isArray(e)?e:Array.from(e)}function ye(e){return e?typeof e[Symbol.iterator]=="function":!1}function _e(e){if(ye(e.columns))return e.columns;if(e.schema&&ye(e.schema.fields))return Array.from(e.schema.fields,t=>t.name);if(typeof e.columnNames=="function")return e.columnNames()}function U(e){return e==null?"":`${e}`}const re=ie(e=>{const t=J(e);return n=>n==null?"":typeof n=="number"?t(n):n instanceof Date?ue(n):`${n}`}),J=ie(e=>t=>t===0?"0":t.toLocaleString(e)),We=re(),Be=J();function ge(e){const t=e.toString(),n=t.length;let i=-1,r;e:for(let o=1;o<n;++o)switch(t[o]){case".":i=r=o;break;case"0":i===0&&(i=o),r=o;break;default:if(!+t[o])break e;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}function ue(e){return Ke(e,"Invalid Date")}function ie(e){let t=ie,n;return(i="en")=>i===t?n:n=e(t=i)}function se(e,t){return R(t)-R(e)||(e<t?-1:e>t?1:e>=t?0:NaN)}function we(e,t){return R(t)-R(e)||(t<e?-1:t>e?1:t>=e?0:NaN)}function R(e){return e!=null&&!Number.isNaN(e)}const Xe=([e])=>e,ke=([,e])=>e;function xe({multiple:e,render:t,selectedIndexes:n,select:i}){return function(r,{locale:o,keyof:a=r instanceof Map?Xe:P,valueof:c=r instanceof Map?ke:P,format:f=(y=>(b,E,k)=>y(a(b,E,k)))(re(o)),multiple:u,key:m,value:v,disabled:g=!1,sort:h,unique:$,...N}={}){if(typeof a!="function")throw new TypeError("keyof is not a function");if(typeof c!="function")throw new TypeError("valueof is not a function");if(typeof f!="function")throw new TypeError("format is not a function");e!==void 0&&(u=e),h=Qe(h);let y=+u;v===void 0&&(v=m!==void 0&&r instanceof Map?y>0?Array.from(m,x=>r.get(x)):r.get(m):void 0),$=!!$,r=H(r);let b=r.map((x,O)=>[a(x,O,r),O]);h!==void 0&&b.sort(([x],[O])=>h(x,O)),$&&(b=[...new Map(b.map(x=>[tt(x[0]),x])).values()]);const E=b.map(ke);u===!0?y=Math.max(1,Math.min(10,E.length)):y>0?u=!0:(u=!1,y=void 0);const[k,d]=t(r,E,Ye(r,E,v,u,c),Ze(r,E,g,c),{...N,format:f,multiple:u,size:y});k.addEventListener("input",w),k.addEventListener("change",te),k.addEventListener("submit",G);function w(x){if(x&&x.isTrusted&&k.removeEventListener("change",te),u)v=n(d).map(O=>c(r[O],O,r));else{const O=et(d);v=O<0?null:c(r[O],O,r)}}return w(),Object.defineProperty(k,"value",{get(){return v},set(x){if(u){const O=new Set(x);for(const j of d){const T=+j.value;i(j,O.has(c(r[T],T,r)))}}else d.value=E.find(O=>x===c(r[O],O,r));w()}})}}function Ye(e,t,n,i,r){const o=new Set(n===void 0?[]:i?H(n):[n]);if(!o.size)return()=>!1;const a=new Set;for(const c of t)o.has(r(e[c],c,e))&&a.add(c);return c=>a.has(c)}function Ze(e,t,n,i){if(typeof n=="boolean")return n;const r=new Set(H(n)),o=new Set;for(const a of t)r.has(i(e[a],a,e))&&o.add(a);return a=>o.has(a)}function Qe(e){if(!(e===void 0||e===!1)){if(e===!0||e==="ascending")return se;if(e==="descending")return we;if(typeof e=="function")return e;throw new TypeError("sort is not a function")}}function et(e){return e.value?+e.value:-1}function tt(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ne(e,t){return xe({multiple:e,render(n,i,r,o,{format:a,label:c}){const f=p`<form class="inputs-3a86ea inputs-3a86ea-checkbox">
2
+ ${z(c)}<div>
3
+ ${i.map(u=>p`<label><input type=${t} disabled=${typeof o=="function"?o(u):o} name=input value=${u} checked=${r(u)}>${a(n[u],u,n)}`)}
4
+ </div>
5
+ </form>`;return[f,ot(f.elements.input,e)]},selectedIndexes(n){return Array.from(n).filter(i=>i.checked).map(i=>+i.value)},select(n,i){n.checked=i}})}const nt=Ne(!1,"radio"),rt=Ne(!0,"checkbox");function it({label:e,value:t,values:n,disabled:i}={}){const r=p`<input class=inputs-3a86ea-input type=checkbox name=input disabled=${i}>`,o=p`<form class="inputs-3a86ea inputs-3a86ea-toggle">${z(e,r)}${r}`;return Object.defineProperty(o,"value",{get(){return n===void 0?r.checked:n[r.checked?0:1]},set(a){r.checked=n===void 0?!!a:a===n[0]}}),t!==void 0&&(o.value=t),o}function ot(e,t){return e===void 0?new lt(t?[]:null):typeof e.length>"u"?new(t?ut:at)(e):e}let lt=class{constructor(t){this._value=t}get value(){return this._value}set value(t){}*[Symbol.iterator](){}},at=class{constructor(t){this._input=t}get value(){const{_input:t}=this;return t.checked?t.value:""}set value(t){const{_input:n}=this;n.checked||(n.checked=U(t)===n.value)}*[Symbol.iterator](){yield this._input}},ut=class{constructor(t){this._input=t,this._value=t.checked?[t.value]:[]}get value(){return this._value}set value(t){const{_input:n}=this;n.checked||(n.checked=U(t)===n.value,this._value=n.checked?[n.value]:[])}*[Symbol.iterator](){yield this._input}};function ce(e){if(e===void 0)return[null,null];const t=ne();return[p`<datalist id=${t}>${Array.from(e,n=>p`<option value=${U(n)}>`)}`,t]}function W(e,t,n,{validate:i=be,submit:r}={},{get:o=u=>u.value,set:a=(u,m)=>u.value=U(m),same:c=(u,m)=>u.value===m,after:f=u=>t.after(u)}={}){r=r===!0?"Submit":r||null;const u=r?p`<button type=submit disabled>${r}`:null;r&&f(u),a(t,n),n=i(t)?o(t):void 0,e.addEventListener("submit",v),t.oninput=g;function m(){if(i(t))return n=o(t),!0}function v(h){G(h),r&&(m()?(u.disabled=!0,te(h)):t.reportValidity())}function g(h){r?(u.disabled=c(t,n),h.stopPropagation()):m()||h.stopPropagation()}return Object.defineProperty(e,"value",{get(){return n},set(h){a(t,h),m()}})}function B({label:e,value:t="",type:n="text",placeholder:i,pattern:r,spellcheck:o,autocomplete:a,autocapitalize:c,min:f,max:u,minlength:m,maxlength:v,required:g=m>0,datalist:h,readonly:$,disabled:N,width:y,...b}={}){const[E,k]=ce(h),d=p`<input
6
+ type=${n}
7
+ name=text
8
+ list=${k}
9
+ readonly=${$}
10
+ disabled=${N}
11
+ required=${g}
12
+ min=${f}
13
+ max=${u}
14
+ minlength=${m}
15
+ maxlength=${v}
16
+ pattern=${r}
17
+ spellcheck=${fe(o)}
18
+ autocomplete=${K(a)}
19
+ autocapitalize=${K(c)}
20
+ placeholder=${i}
21
+ >`,w=p`<form class=inputs-3a86ea style=${D(y)}>
22
+ ${z(e,d)}<div class=inputs-3a86ea-input>
23
+ ${d}
24
+ </div>${E}
25
+ </form>`;return W(w,d,t,b)}function st(e){return B({...e,type:"email"})}function ct(e){return B({...e,type:"tel"})}function ft(e){return B({...e,type:"url"})}function dt(e){return B({...e,type:"password"})}function fe(e){return e==null?null:`${e}`}function K(e){return e==null?null:`${e===!1?"off":e===!0?"on":e}`}function pt({label:e,value:t,required:n,datalist:i,readonly:r,disabled:o,width:a,...c}={}){const[f,u]=ce(i),m=ne(),v=p`<input
26
+ type=color
27
+ name=text
28
+ value=${t}
29
+ id=${m}
30
+ list=${u}
31
+ readonly=${r}
32
+ disabled=${o}
33
+ required=${n}
34
+ >`,g=p`<output
35
+ for=${m}
36
+ >`;g.value=v.value,v.addEventListener("input",()=>g.value=v.value);const h=p`<form class=inputs-3a86ea style=${D(a)}>
37
+ ${z(e,v)}<div class=inputs-3a86ea-input>
38
+ <div class=inputs-3a86ea-input>${v}${g}</div>
39
+ </div>${f}
40
+ </form>`;return W(h,v,t,c,{after:$=>v.parentNode.after($)})}const mt={type:"date",get:e=>e.valueAsDate,set:(e,t)=>e.value=Ee(t),same:(e,t)=>+e.valueAsDate==+t,format:Ee},vt={type:"datetime-local",get:e=>e.value?new Date(e.value):null,set:(e,t)=>e.value=Oe(t),same:(e,t)=>+new Date(e.value)==+t,format:Oe};function Ae({label:e,min:t,max:n,required:i,readonly:r,disabled:o,width:a,value:c,...f}={},{type:u,format:m,...v}){const g=p`<input type=${u} name=date readonly=${r} disabled=${o} required=${i} min=${m(t)} max=${m(n)}>`,h=p`<form class=inputs-3a86ea style=${D(a)}>
41
+ ${z(e,g)}<div class=inputs-3a86ea-input>
42
+ ${g}
43
+ </div>
44
+ </form>`;return W(h,g,de(c),f,v)}function ht(e){return Ae(e,mt)}function $t(e){return Ae(e,vt)}function de(e){return e instanceof Date&&!isNaN(e)?e:typeof e=="string"?Ve(e,null):e==null||isNaN(e=+e)?null:new Date(+e)}function Ee(e){return(e=de(e))?e.toISOString().slice(0,10):e}function Oe(e){return(e=de(e))?new Date(+e-e.getTimezoneOffset()*1e3*60).toISOString().slice(0,16):e}function bt(e,t){return(Array.isArray(e)?_t:wt)(e,t)}function yt(e){return p`<div>${e}`}function _t(e,{template:t=yt}={}){e=[...e];let n=e.map(({value:i})=>i);return Object.defineProperty(t(e),"value",{get(){for(let i=0,r=e.length;i<r;++i){const o=e[i].value;Object.is(o,n[i])||(n=[...n],n[i]=o)}return n},set(i=[]){for(let r=0,o=e.length;r<o;++r)e[r].value=i[r]}})}function gt(e){return p`<div>${Object.values(e)}`}function wt(e,{template:t=gt}={}){e={...e};let n=Object.fromEntries(Object.entries(e).map(([i,{value:r}])=>[i,r]));return Object.defineProperty(t(e),"value",{get(){for(const i in n){const r=e[i].value;Object.is(r,n[i])||(n={...n},n[i]=r)}return n},set(i={}){for(const r in e)e[r].value=i[r]}})}function Se(e){class t extends e{constructor(i){super(i.name),Object.defineProperty(this,"_",{value:i}),Object.defineProperty(this,"_url",{writable:!0})}async url(){return this._url||(this._url=URL.createObjectURL(this._))}async blob(){return this._}async stream(){return this._.stream()}}return function({label:n,required:i,accept:r,capture:o,multiple:a,disabled:c,width:f,value:u,submit:m,...v}={}){const g=p`<input
45
+ type=file
46
+ name=file
47
+ disabled=${c}
48
+ required=${i}
49
+ accept=${r}
50
+ capture=${o}
51
+ multiple=${a}
52
+ >`,h=p`<form class=inputs-3a86ea style=${D(f)}>
53
+ ${z(n,g)}<div class=inputs-3a86ea-input>
54
+ ${g}
55
+ </div>
56
+ </form>`;return W(h,g,void 0,v,{get:$=>a?Array.from($.files,N=>new t(N)):$.files.length?new t($.files[0]):null,set:()=>{},same:()=>!1})}}const oe=1e-6;function kt(e,t){return arguments.length<2&&(t=e,e=void 0),e===void 0&&(e=[]),je({extent:e},t)}function xt(e=[0,1],t){return je({extent:e,range:!0},t)}function je({extent:[e,t],range:n},{format:i=ge,transform:r,invert:o,label:a="",value:c,step:f,disabled:u,placeholder:m,validate:v=be,width:g}={}){let h;if(typeof i!="function")throw new TypeError("format is not a function");(e==null||isNaN(e=+e))&&(e=-1/0),(t==null||isNaN(t=+t))&&(t=1/0),e>t&&([e,t]=[t,e],r===void 0&&(r=pe)),f!==void 0&&(f=+f);const $=p`<input type=number min=${isFinite(e)?e:null} max=${isFinite(t)?t:null} step=${f??"any"} name=number required placeholder=${m} oninput=${k} disabled=${u}>`;let N;if(n){if(r===void 0&&(r=P),typeof r!="function")throw new TypeError("transform is not a function");if(o===void 0&&(o=r.invert===void 0?At(r):r.invert),typeof o!="function")throw new TypeError("invert is not a function");let d=+r(e),w=+r(t);d>w&&([d,w]=[w,d]),n=p`<input type=range min=${isFinite(d)?d:null} max=${isFinite(w)?w:null} step=${f===void 0||r!==P&&r!==pe?"any":f} name=range oninput=${E} disabled=${u}>`,N=r===P?n:p`<input type=range min=${e} max=${t} step=${f===void 0?"any":f} name=range disabled=${u}>`}else n=null,r=o=P;const y=p`<form class=inputs-3a86ea style=${D(g)}>
57
+ ${z(a,$)}<div class=inputs-3a86ea-input>
58
+ ${$}${n}
59
+ </div>
60
+ </form>`;y.addEventListener("submit",G);function b(d){return N?(d=Math.max(e,Math.min(t,d)),isFinite(d)?(N.valueAsNumber=d,N.valueAsNumber):d):+d}function E(d){const w=b(o(n.valueAsNumber));if(isFinite(w)&&($.valueAsNumber=Math.max(e,Math.min(t,w)),v($))){h=$.valueAsNumber,$.value=i(h);return}d&&d.stopPropagation()}function k(d){const w=b($.valueAsNumber);if(isFinite(w)&&(n&&(n.valueAsNumber=r(w)),v($))){h=w;return}d&&d.stopPropagation()}return Object.defineProperty(y,"value",{get(){return h},set(d){d=b(d),isFinite(d)&&($.valueAsNumber=d,n&&(n.valueAsNumber=r(d)),v($)&&(h=d,$.value=i(h)))}}),c===void 0&&N&&(c=N.valueAsNumber),c!==void 0&&(y.value=c),y}function pe(e){return-e}function Nt(e){return e*e}function At(e){return e===P||e===pe?e:e===Math.sqrt?Nt:e===Math.log?Math.exp:e===Math.exp?Math.log:t=>Et(e,t,t)}function Et(e,t,n){let i=100,r,o,a;n=n===void 0?0:+n,t=+t;do o=e(n),a=e(n+oe),o===a&&(a=o+oe),n-=r=-1*oe*(o-t)/(o-a);while(i-- >0&&Math.abs(r)>oe);return i<0?NaN:n}function Ot(e,{locale:t,format:n=Lt(t),label:i,query:r="",placeholder:o="Search",columns:a=_e(e),spellcheck:c,autocomplete:f,autocapitalize:u,filter:m=a===void 0?ze:St(a),datalist:v,disabled:g,required:h=!0,width:$}={}){let N=[];e=H(e),h=!!h;const[y,b]=ce(v),E=p`<input
61
+ name=input
62
+ type=search
63
+ list=${b}
64
+ disabled=${g}
65
+ spellcheck=${fe(c)}
66
+ autocomplete=${K(f)}
67
+ autocapitalize=${K(u)}
68
+ placeholder=${o}
69
+ value=${r}
70
+ oninput=${w}
71
+ >`,k=p`<output name=output>`,d=p`<form class=inputs-3a86ea style=${D($)}>
72
+ ${z(i,E)}<div class=inputs-3a86ea-input>
73
+ ${E}${k}
74
+ </div>${y}
75
+ </form>`;d.addEventListener("submit",G);function w(){N=E.value||h?e.filter(m(E.value)):[],a!==void 0&&(N.columns=a),k.value=n(N.length)}return w(),Object.defineProperties(d,{value:{get(){return N}},query:{get(){return r},set(x){r=E.value=U(x),w()}}})}function ze(e){const t=`${e}`.split(/\s+/g).filter(n=>n).map(Le);return n=>{if(n==null)return!1;if(typeof n=="object")e:for(const i of t){for(const r of jt(n))if(i.test(r))continue e;return!1}else for(const i of t)if(!i.test(n))return!1;return!0}}function St(e){return t=>{const n=`${t}`.split(/\s+/g).filter(i=>i).map(Le);return i=>{e:for(const r of n){for(const o of e)if(r.test(i[o]))continue e;return!1}return!0}}}function*jt(e){for(const t in e)yield e[t]}function Le(e){return new RegExp(`(?:^|[^\\p{L}-])${zt(e)}`,"iu")}function zt(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}const Lt=ie(e=>{const t=J(e);return n=>`${t(n)} result${n===1?"":"s"}`}),Tt=xe({render(e,t,n,i,{format:r,multiple:o,size:a,label:c,width:f}){const u=p`<select class=inputs-3a86ea-input disabled=${i===!0} multiple=${o} size=${a} name=input>
76
+ ${t.map(m=>p`<option value=${m} disabled=${typeof i=="function"?i(m):!1} selected=${n(m)}>${U(r(e[m],m,e))}`)}
77
+ </select>`;return[p`<form class=inputs-3a86ea style=${D(f)}>${z(c,u)}${u}`,u]},selectedIndexes(e){return Array.from(e.selectedOptions,t=>+t.value)},select(e,t){e.selected=t}}),Te=22;function qt(e,t={}){const{rows:n=11.5,height:i,maxHeight:r=i===void 0?(n+1)*Te-1:void 0,width:o={},maxWidth:a}=t,c=ne(),f=p`<form class="inputs-3a86ea inputs-3a86ea-table" id=${c} style=${{height:C(i),maxHeight:C(r),width:typeof o=="string"||typeof o=="number"?C(o):void 0,maxWidth:C(a)}}>`;return e&&typeof e.then=="function"?(Object.defineProperty(f,"value",{configurable:!0,set(){throw new Error("cannot set value while data is unresolved")}}),Promise.resolve(e).then(u=>qe({root:f,id:c},u,t))):qe({root:f,id:c},e,t),f}function qe({root:e,id:t},n,{columns:i=_e(n),value:r,required:o=!0,sort:a,reverse:c=!1,format:f,locale:u,align:m,header:v,rows:g=11.5,width:h={},multiple:$=!0,layout:N}={}){i=i===void 0?Ft(n):H(i),N===void 0&&(N=i.length>=12?"auto":"fixed"),f=Pt(f,n,i,u),m=Mt(m,n,i);let y=[],b=[],E=n[Symbol.iterator](),k=0,d=Dt(n),w=O(g*2);function x(){k>=0&&(k=E=void 0,b=Uint32Array.from(y=H(n),(l,s)=>s),d=b.length)}function O(l){if(l=Math.floor(l),d!==void 0)return Math.min(d,l);if(l<=k)return l;for(;l>k;){const{done:s,value:_}=E.next();if(s)return d=k;b.push(k++),y.push(_)}return k}let j=null,T=!1,A=new Set,M=null,F=null;const L=p`<tbody>`,Ce=p`<tr><td><input type=${$?"checkbox":"radio"} name=${$?null:"radio"}></td>${i.map(()=>p`<td>`)}`,Y=p`<tr><th><input type=checkbox onclick=${He} disabled=${!$}></th>${i.map(l=>p`<th title=${l} onclick=${s=>$e(s,l)}><span></span>${v&&l in v?v[l]:l}</th>`)}</tr>`;e.appendChild(p.fragment`<table style=${{tableLayout:N}}>
78
+ <thead>${O(1)||i.length?Y:null}</thead>
79
+ ${L}
80
+ </table>
81
+ <style>${i.map((l,s)=>{const _=[];if(m[l]!=null&&_.push(`text-align:${m[l]}`),h[l]!=null&&_.push(`width:${C(h[l])}`),_.length)return`#${t} tr>:nth-child(${s+2}){${_.join(";")}}`}).filter(P).join(`
82
+ `)}</style>`);function le(l,s){if(k===l){for(;l<s;++l)ve(E.next().value,l);k=s}else for(let _;l<s;++l)_=b[l],ve(y[_],_)}function ve(l,s){const _=Ce.cloneNode(!0),S=X(_);if(S.onclick=Ue,S.checked=A.has(s),S.value=s,l!=null)for(let I=0;I<i.length;++I){let ee=i[I],q=l[ee];R(q)&&(q=f[ee](q,s,n),q instanceof Node||(q=document.createTextNode(q)),_.childNodes[I+1].appendChild(q))}L.append(_)}function V(l){x();let s=b.indexOf(l);if(s<L.childNodes.length){const _=L.childNodes[s];X(_).checked=!1}A.delete(l)}function Z(l){x();let s=b.indexOf(l);if(s<L.childNodes.length){const _=L.childNodes[s];X(_).checked=!0}A.add(l)}function*he(l,s){if(x(),l=b.indexOf(l),s=b.indexOf(s),l<s)for(;l<=s;)yield b[l++];else for(;s<=l;)yield b[s++]}function Ie(l){return l[Symbol.iterator]().next().value}function He(l){if(x(),this.checked){A=new Set(b);for(const s of L.childNodes)X(s).checked=!0}else{for(let s of A)V(s);M=F=null,l.detail&&l.currentTarget.blur()}Q()}function Ue(l){x();let s=+this.value;if($)if(l.shiftKey){if(M===null)M=A.size?Ie(A):b[0];else for(let _ of he(M,F))V(_);F=s;for(let _ of he(M,F))Z(_)}else M=F=s,A.has(s)?(V(s),M=F=null,l.detail&&l.currentTarget.blur()):Z(s);else{for(let _ of A)V(_);Z(s)}Q()}function $e(l,s){x();const _=l.currentTarget;let S;if(j===_&&l.metaKey)me(j).textContent="",j=null,T=!1,S=se;else{j===_?T=!T:(j&&(me(j).textContent=""),j=_,T=l.altKey);const I=T?we:se;S=(ee,q)=>I(y[ee][s],y[q][s]),me(_).textContent=T?"\u25BE":"\u25B4"}for(b.sort(S),A=new Set(Array.from(A).sort(S)),e.scrollTo(e.scrollLeft,0);L.firstChild;)L.firstChild.remove();le(0,w=O(g*2)),M=F=null,Q()}function Q(){const l=X(Y);l.disabled=!$&&!A.size,l.indeterminate=$&&A.size&&A.size!==d,l.checked=A.size,r=void 0}if(e.addEventListener("scroll",()=>{e.scrollHeight-e.scrollTop<g*Te*1.5&&w<O(w+1)&&le(w,w=O(w+g))}),a===void 0&&c&&(x(),b.reverse()),r!==void 0){if(x(),$){const l=new Set(r);A=new Set(b.filter(s=>l.has(y[s])))}else{const l=y.indexOf(r);A=l<0?new Set:new Set([l])}Q()}if(O(1)?le(0,w):L.append(p`<tr>${i.length?p`<td>`:null}<td rowspan=${i.length} style="padding-left: var(--length3); font-style: italic;">No results.</td></tr>`),a!==void 0){let l=i.indexOf(a);l>=0&&(c&&(j=Y.childNodes[l+1]),$e({currentTarget:Y.childNodes[l+1]},i[l]))}return Object.defineProperty(e,"value",{get(){if(r===void 0)if(x(),$)r=Array.from(o&&A.size===0?b:A,l=>y[l]),r.columns=i;else if(A.size){const[l]=A;r=y[l]}else r=null;return r},set(l){if(x(),$){const s=new Set(l),_=new Set(b.filter(S=>s.has(y[S])));for(const S of A)_.has(S)||V(S);for(const S of _)A.has(S)||Z(S)}else{const s=y.indexOf(l);A=s<0?new Set:new Set([s])}r=void 0}})}function X(e){return e.firstChild.firstChild}function me(e){return e.firstChild}function Pt(e={},t,n,i){const r=Object.create(null);for(const o of n){if(o in e){r[o]=e[o];continue}switch(Pe(t,o)){case"number":r[o]=J(i);break;case"date":r[o]=ue;break;default:r[o]=re(i);break}}return r}function Mt(e={},t,n){const i=Object.create(null);for(const r of n)r in e?i[r]=e[r]:Pe(t,r)==="number"&&(i[r]="right");return i}function Pe(e,t){for(const n of e){if(n==null)continue;const i=n[t];if(i!=null)return typeof i=="number"?"number":i instanceof Date?"date":void 0}}function Dt(e){if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size;if(typeof e.numRows=="function")return e.numRows()}function Ft(e){const t=new Set;for(const n of e)for(const i in n)t.add(i);return Array.from(t)}function Ct({value:e="",label:t,placeholder:n,spellcheck:i,autocomplete:r,autocapitalize:o,rows:a=3,minlength:c,maxlength:f,required:u=c>0,readonly:m,disabled:v,monospace:g=!1,resize:h=a<12,width:$,...N}={}){const y=p`<textarea
83
+ name=text
84
+ readonly=${m}
85
+ disabled=${v}
86
+ required=${u}
87
+ rows=${a}
88
+ minlength=${c}
89
+ maxlength=${f}
90
+ spellcheck=${fe(i)}
91
+ autocomplete=${K(r)}
92
+ autocapitalize=${K(o)}
93
+ placeholder=${n}
94
+ onkeydown=${E}
95
+ style=${{width:$,fontFamily:g?"var(--monospace, monospace)":null,resize:h?null:"none"}}
96
+ >`,b=p`<form class="inputs-3a86ea inputs-3a86ea-textarea" style=${D($)}>
97
+ ${z(t,y)}<div>
98
+ ${y}
99
+ </div>
100
+ </form>`;function E(k){if(N.submit&&k.key==="Enter"&&(k.metaKey||k.ctrlKey))return b.dispatchEvent(new Event("submit",ae))}return W(b,y,e,N)}function It(e){const t=new EventTarget;return t.value=e,t}function Me(e){return new Promise(t=>{requestAnimationFrame(()=>{const n=e.closest(".observablehq");if(!n)return t();const i=new MutationObserver(()=>{n.contains(e)||(i.disconnect(),t())});i.observe(n,{childList:!0})})})}function Ht(e,t,n=Me(e)){const i=Fe(t),r=()=>De(e,t),o=()=>(De(t,e),t.dispatchEvent(new Event(i,ae)));return r(),e.addEventListener(Fe(e),o),t.addEventListener(i,r),n.then(()=>t.removeEventListener(i,r)),e}function Ut(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];default:return e.value}}function De(e,t){const n=Ut(t);switch(e.type){case"range":case"number":e.valueAsNumber=n;break;case"date":e.valueAsDate=n;break;case"checkbox":e.checked=n;break;case"file":e.multiple?e.files=n:e.files=[n];break;default:e.value=n;break}}function Fe(e){switch(e.type){case"button":case"submit":return"click";case"file":return"change";default:return"input"}}const Kt=Se(Ge);export{Ht as bind,Re as button,rt as checkbox,pt as color,ht as date,$t as datetime,Me as disposal,st as email,Kt as file,Se as fileOf,bt as form,We as formatAuto,ue as formatDate,re as formatLocaleAuto,J as formatLocaleNumber,Be as formatNumber,ge as formatTrim,It as input,kt as number,dt as password,nt as radio,xt as range,Ot as search,ze as searchFilter,Tt as select,qt as table,ct as tel,B as text,Ct as textarea,it as toggle,ft as url};
dist/_observablehq/stdlib/mermaid.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import r from"https://cdn.jsdelivr.net/npm/mermaid@10.8.0/+esm";let t=0;const a=matchMedia("(prefers-color-scheme: dark)").matches?"dark":"neutral";r.initialize({startOnLoad:!1,securityLevel:"loose",theme:a});async function i(){const e=document.createElement("div");return e.innerHTML=(await r.render(`mermaid-${++t}`,String.raw.apply(String,arguments))).svg,e.removeChild(e.firstChild)}export{i as default};
dist/_observablehq/stdlib/sqlite.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const m=await(async()=>{const a={},e=await fetch("https://cdn.jsdelivr.net/npm/sql.js@1.10.2/dist/sql-wasm.js");return new Function("exports",await e.text())(a),a.Module({locateFile:t=>"https://cdn.jsdelivr.net/npm/sql.js@1.10.2/dist/"+t})})();class u{constructor(e){Object.defineProperties(this,{_db:{value:e}})}static async open(e){return new u(new m.Database(await o(await e)))}async query(e,t){return await d(this._db,e,t)}async queryRow(e,t){return(await this.query(e,t))[0]||null}async explain(e,t){const r=await this.query(`EXPLAIN QUERY PLAN ${e}`,t);return s("pre",{className:"observablehq--inspect"},[l(r.map(n=>n.detail).join(`
2
+ `))])}async describeTables({schema:e}={}){return this.query(`SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${e==null?"":" AND schema = ?"} AND name NOT LIKE 'sqlite_%' ORDER BY schema, name`,e==null?[]:[e])}async describeColumns({schema:e,table:t}={}){if(t==null)throw new Error("missing table");const r=await this.query(`SELECT name, type, "notnull" FROM pragma_table_info(?${e==null?"":", ?"}) ORDER BY cid`,e==null?[t]:[t,e]);if(!r.length)throw new Error(`table not found: ${t}`);return r.map(({name:n,type:c,notnull:i})=>({name:n,type:p(c),databaseType:c,nullable:!i}))}async describe(e){const t=await(e===void 0?this.query("SELECT name FROM sqlite_master WHERE type = 'table'"):this.query("SELECT * FROM pragma_table_info(?)",[e]));if(!t.length)throw new Error("Not found");const{columns:r}=t;return s("table",{value:t},[s("thead",[s("tr",r.map(n=>s("th",[l(n)])))]),s("tbody",t.map(n=>s("tr",r.map(c=>s("td",[l(n[c])])))))])}async sql(){return this.query(...this.queryTag.apply(this,arguments))}queryTag(e,...t){return[e.join("?"),t]}}Object.defineProperty(u.prototype,"dialect",{value:"sqlite"});function p(a){switch(a){case"NULL":return"null";case"INT":case"INTEGER":case"TINYINT":case"SMALLINT":case"MEDIUMINT":case"BIGINT":case"UNSIGNED BIG INT":case"INT2":case"INT8":return"integer";case"TEXT":case"CLOB":return"string";case"REAL":case"DOUBLE":case"DOUBLE PRECISION":case"FLOAT":case"NUMERIC":return"number";case"BLOB":return"buffer";case"DATE":case"DATETIME":return"string";default:return/^(?:(?:(?:VARYING|NATIVE) )?CHARACTER|(?:N|VAR|NVAR)CHAR)\(/.test(a)?"string":/^(?:DECIMAL|NUMERIC)\(/.test(a)?"number":"other"}}function o(a){return typeof a=="string"?fetch(a).then(o):a&&typeof a.arrayBuffer=="function"?a.arrayBuffer().then(o):a instanceof ArrayBuffer?new Uint8Array(a):a}async function d(a,e,t){const[r]=await a.exec(e,t);if(!r)return[];const{columns:n,values:c}=r,i=c.map(E=>Object.fromEntries(E.map((y,f)=>[n[f],y])));return i.columns=n,i}function s(a,e,t){arguments.length===2&&(t=e,e=void 0);const r=document.createElement(a);if(e!==void 0)for(const n in e)r[n]=e[n];if(t!==void 0)for(const n of t)r.appendChild(n);return r}function l(a){return document.createTextNode(a)}export{u as SQLiteDatabaseClient,m as default};
dist/_observablehq/stdlib/tex.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import o from"https://cdn.jsdelivr.net/npm/katex@0.16.9/+esm";const r=e();function e(n){return function(){const t=document.createElement("div");return o.render(String.raw.apply(String,arguments),t,{...n,output:"html"}),t.removeChild(t.firstChild)}}r.options=e,r.block=e({displayMode:!0});export{r as default};
dist/_observablehq/stdlib/vega-lite.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import*as r from"https://cdn.jsdelivr.net/npm/vega@5.27.0/+esm";import*as t from"https://cdn.jsdelivr.net/npm/vega-lite@5.16.3/+esm";import*as a from"https://cdn.jsdelivr.net/npm/vega-lite-api@5.6.0/+esm";var e=a.register(r,t);export{e as default};
dist/_observablehq/stdlib/xlsx.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import y from"https://cdn.jsdelivr.net/npm/exceljs@4.4.0/+esm";class d{constructor(e){Object.defineProperties(this,{_:{value:e},sheetNames:{value:e.worksheets.map(t=>t.name),enumerable:!0}})}static async load(e){const t=new y.Workbook;return await t.xlsx.load(e),new d(t)}sheet(e,t){const o=typeof e=="number"?this.sheetNames[e]:this.sheetNames.includes(e=`${e}`)?e:null;if(o==null)throw new Error(`Sheet not found: ${e}`);const n=this._.getWorksheet(o);return g(n,t)}}function g(r,{range:e,headers:t}={}){let[[o,n],[i,u]]=k(e,r);const m=t?r._rows[n++]:null;let s=new Set(["#"]);for(let l=o;l<=i;l++){const c=m?p(m.findCell(l+1)):null;let a=c&&c+""||v(l);for(;s.has(a);)a+="_";s.add(a)}s=new Array(o).concat(Array.from(s));const h=new Array(u-n+1);for(let l=n;l<=u;l++){const c=h[l-n]=Object.create(null,{"#":{value:l+1}}),a=r.getRow(l+1);if(a.hasValues)for(let f=o;f<=i;f++){const w=p(a.findCell(f+1));w!=null&&(c[s[f+1]]=w)}}return h.columns=s.filter(()=>!0),h}function p(r){if(!r)return;const{value:e}=r;if(e&&typeof e=="object"&&!(e instanceof Date)){if(e.formula||e.sharedFormula)return e.result&&e.result.error?NaN:e.result;if(e.richText)return x(e);if(e.text){let{text:t}=e;return t.richText&&(t=x(t)),e.hyperlink&&e.hyperlink!==t?`${e.hyperlink} ${t}`:t}return e}return e}function x(r){return r.richText.map(e=>e.text).join("")}function k(r=":",{columnCount:e,rowCount:t}){if(r=`${r}`,!r.match(/^[A-Z]*\d*:[A-Z]*\d*$/))throw new Error("Malformed range specifier");const[[o=0,n=0],[i=e-1,u=t-1]]=r.split(":").map(A);return[[o,n],[i,u]]}function v(r){let e="";r++;do e=String.fromCharCode(64+(r%26||26))+e;while(r=Math.floor((r-1)/26));return e}function A(r){const[,e,t]=r.match(/^([A-Z]*)(\d*)$/);let o=0;if(e)for(let n=0;n<e.length;n++)o+=Math.pow(26,e.length-n-1)*(e.charCodeAt(n)-64);return[o?o-1:void 0,t?+t-1:void 0]}export{d as Workbook};
dist/_observablehq/stdlib/zip.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{AbstractFile as s}from"../stdlib.js";import n from"https://cdn.jsdelivr.net/npm/jszip@3.10.1/+esm";class t{constructor(r){Object.defineProperty(this,"_",{value:r}),this.filenames=Object.keys(r.files).filter(e=>!r.files[e].dir)}static async from(r){return new t(await n.loadAsync(r))}file(r){const e=this._.file(r=`${r}`);if(!e||e.dir)throw new Error(`file not found: ${r}`);return new i(e)}}class i extends s{constructor(r){super(r.name),Object.defineProperty(this,"_",{value:r}),Object.defineProperty(this,"_url",{writable:!0})}async url(){return this._url||(this._url=this.blob().then(URL.createObjectURL))}async blob(){return this._.async("blob")}async arrayBuffer(){return this._.async("arraybuffer")}async text(){return this._.async("text")}async json(){return JSON.parse(await this.text())}}export{t as ZipArchive};
dist/_observablehq/theme-air,near-midnight.css ADDED
@@ -0,0 +1,1169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* node_modules/@observablehq/framework/src/style/global.css */
2
+ :root {
3
+ --monospace:
4
+ Menlo,
5
+ Consolas,
6
+ monospace;
7
+ --monospace-font: 14px/1.5 var(--monospace);
8
+ --serif:
9
+ "Source Serif Pro",
10
+ "Iowan Old Style",
11
+ "Apple Garamond",
12
+ "Palatino Linotype",
13
+ "Times New Roman",
14
+ "Droid Serif",
15
+ Times,
16
+ serif,
17
+ "Apple Color Emoji",
18
+ "Segoe UI Emoji",
19
+ "Segoe UI Symbol";
20
+ --sans-serif:
21
+ -apple-system,
22
+ BlinkMacSystemFont,
23
+ "avenir next",
24
+ avenir,
25
+ helvetica,
26
+ "helvetica neue",
27
+ ubuntu,
28
+ roboto,
29
+ noto,
30
+ "segoe ui",
31
+ arial,
32
+ sans-serif;
33
+ --theme-blue: #4269d0;
34
+ --theme-green: #3ca951;
35
+ --theme-red: #ff725c;
36
+ --theme-yellow: #efb118;
37
+ }
38
+ html {
39
+ -webkit-text-size-adjust: 100%;
40
+ -webkit-font-smoothing: antialiased;
41
+ -moz-osx-font-smoothing: grayscale;
42
+ background: var(--theme-background);
43
+ color: var(--theme-foreground);
44
+ }
45
+ body {
46
+ font: 17px/1.5 var(--serif);
47
+ margin: 0;
48
+ }
49
+ a[href] {
50
+ color: var(--theme-foreground-focus);
51
+ }
52
+ h1,
53
+ h2,
54
+ h3,
55
+ h4,
56
+ h5,
57
+ h6 {
58
+ color: var(--theme-foreground-alt);
59
+ font-weight: 700;
60
+ line-height: 1.15;
61
+ margin-top: 0;
62
+ margin-bottom: 0.25rem;
63
+ scroll-margin-top: 1rem;
64
+ }
65
+ h2 + p,
66
+ h3 + p,
67
+ h4 + p,
68
+ h2 + table,
69
+ h3 + table,
70
+ h4 + table {
71
+ margin-top: 0;
72
+ }
73
+ h1 + h2 {
74
+ color: var(--theme-foreground);
75
+ font-size: 20px;
76
+ font-style: italic;
77
+ font-weight: normal;
78
+ margin-bottom: 1rem;
79
+ }
80
+ a[href] {
81
+ text-decoration: none;
82
+ }
83
+ a[href]:hover,
84
+ a[href]:focus {
85
+ text-decoration: underline;
86
+ }
87
+ h1 code,
88
+ h2 code,
89
+ h3 code,
90
+ h4 code,
91
+ h5 code,
92
+ h6 code {
93
+ font-size: 90%;
94
+ }
95
+ pre {
96
+ line-height: 1.5;
97
+ }
98
+ pre,
99
+ code,
100
+ tt {
101
+ font-family: var(--monospace);
102
+ font-size: 14px;
103
+ }
104
+ img {
105
+ max-width: calc(100vw - 28px);
106
+ }
107
+ p,
108
+ table,
109
+ figure,
110
+ figcaption,
111
+ h1,
112
+ h2,
113
+ h3,
114
+ h4,
115
+ h5,
116
+ h6,
117
+ .katex-display {
118
+ max-width: 640px;
119
+ }
120
+ blockquote,
121
+ ol,
122
+ ul {
123
+ max-width: 600px;
124
+ }
125
+ blockquote {
126
+ margin: 1rem 1.5rem;
127
+ }
128
+ ul ol {
129
+ padding-left: 28px;
130
+ }
131
+ hr {
132
+ height: 1px;
133
+ margin: 1rem 0;
134
+ padding: 1rem 0;
135
+ border: none;
136
+ background:
137
+ no-repeat center/100% 1px linear-gradient(
138
+ to right,
139
+ var(--theme-foreground-faintest),
140
+ var(--theme-foreground-faintest));
141
+ }
142
+ pre {
143
+ background-color: var(--theme-background-alt);
144
+ border-radius: 4px;
145
+ margin: 1rem -1rem;
146
+ max-width: 960px;
147
+ min-height: 1.5em;
148
+ padding: 0.5rem 1rem;
149
+ overflow-x: auto;
150
+ box-sizing: border-box;
151
+ }
152
+ input:not([type]),
153
+ input[type=email],
154
+ input[type=number],
155
+ input[type=password],
156
+ input[type=range],
157
+ input[type=search],
158
+ input[type=tel],
159
+ input[type=text],
160
+ input[type=url] {
161
+ width: 240px;
162
+ }
163
+ input,
164
+ canvas,
165
+ button {
166
+ vertical-align: middle;
167
+ }
168
+ button,
169
+ input,
170
+ textarea {
171
+ accent-color: var(--theme-blue);
172
+ }
173
+ table {
174
+ width: 100%;
175
+ border-collapse: collapse;
176
+ font: 13px/1.2 var(--sans-serif);
177
+ }
178
+ table pre,
179
+ table code,
180
+ table tt {
181
+ font-size: inherit;
182
+ line-height: inherit;
183
+ }
184
+ th > pre:only-child,
185
+ td > pre:only-child {
186
+ margin: 0;
187
+ padding: 0;
188
+ }
189
+ th {
190
+ color: var(--theme-foreground);
191
+ text-align: left;
192
+ vertical-align: bottom;
193
+ }
194
+ td {
195
+ color: var(--theme-foreground-alt);
196
+ vertical-align: top;
197
+ }
198
+ th,
199
+ td {
200
+ padding: 3px 6.5px 3px 0;
201
+ }
202
+ th:last-child,
203
+ td:last-child {
204
+ padding-right: 0;
205
+ }
206
+ tr:not(:last-child) {
207
+ border-bottom: solid 1px var(--theme-foreground-faintest);
208
+ }
209
+ thead tr {
210
+ border-bottom: solid 1px var(--theme-foreground-fainter);
211
+ }
212
+ figure,
213
+ table {
214
+ margin: 1rem 0;
215
+ }
216
+ figure img {
217
+ max-width: 100%;
218
+ }
219
+ figure > h2,
220
+ figure > h3 {
221
+ font-family: var(--sans-serif);
222
+ }
223
+ figure > h2 {
224
+ font-size: 20px;
225
+ }
226
+ figure > h3 {
227
+ font-size: 16px;
228
+ font-weight: normal;
229
+ }
230
+ figcaption {
231
+ font: small var(--sans-serif);
232
+ color: var(--theme-foreground-muted);
233
+ }
234
+ a[href].observablehq-header-anchor {
235
+ color: inherit;
236
+ }
237
+ :root {
238
+ --font-big: 700 32px/1 var(--sans-serif);
239
+ --font-small: 14px var(--sans-serif);
240
+ }
241
+ .big {
242
+ font: var(--font-big);
243
+ }
244
+ .small {
245
+ font: var(--font-small);
246
+ }
247
+ .red {
248
+ color: var(--theme-red);
249
+ }
250
+ .yellow {
251
+ color: var(--theme-yellow);
252
+ }
253
+ .green {
254
+ color: var(--theme-green);
255
+ }
256
+ .blue {
257
+ color: var(--theme-blue);
258
+ }
259
+ .muted {
260
+ color: var(--theme-foreground-muted);
261
+ }
262
+
263
+ /* node_modules/@observablehq/framework/src/style/layout.css */
264
+ :root {
265
+ --theme-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M5 7L8.125 9.5L11.25 7' stroke='black' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
266
+ --theme-toggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m10.5,11 2.5-3-2.5-3 M6,8h7' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='2' y='2' fill='currentColor' height='12' rx='0.5' width='2'/%3E%3C/svg%3E");
267
+ --theme-magnifier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath stroke='currentColor' stroke-width='2' fill='none' d='M15,15L10.5,10.5a3,3 0 1,0 -6 -6a3,3 0 1,0 6 6'%3E%3C/path%3E%3C/svg%3E");
268
+ }
269
+ #observablehq-main,
270
+ #observablehq-header,
271
+ #observablehq-footer {
272
+ margin: 1rem auto;
273
+ max-width: 1152px;
274
+ }
275
+ #observablehq-main {
276
+ min-height: calc(100vh - 20rem);
277
+ position: relative;
278
+ z-index: 0;
279
+ }
280
+ #observablehq-footer {
281
+ display: block;
282
+ margin-top: 10rem;
283
+ font: 12px var(--sans-serif);
284
+ color: var(--theme-foreground-faint);
285
+ }
286
+ #observablehq-footer nav {
287
+ display: grid;
288
+ max-width: 640px;
289
+ grid-template-columns: 1fr 1fr;
290
+ column-gap: 1rem;
291
+ margin-bottom: 1rem;
292
+ }
293
+ #observablehq-footer nav a {
294
+ display: flex;
295
+ flex-direction: column;
296
+ border: 1px solid var(--theme-foreground-fainter);
297
+ border-radius: 8px;
298
+ padding: 1rem;
299
+ line-height: 1rem;
300
+ text-decoration: none;
301
+ }
302
+ #observablehq-footer nav a span {
303
+ font-size: 14px;
304
+ }
305
+ #observablehq-footer nav a:hover span {
306
+ text-decoration: underline;
307
+ }
308
+ #observablehq-footer nav a:hover {
309
+ border-color: var(--theme-foreground-focus);
310
+ }
311
+ #observablehq-footer nav a[rel=prev] {
312
+ grid-column: 1;
313
+ align-items: start;
314
+ }
315
+ #observablehq-footer nav a[rel=next] {
316
+ grid-column: 2;
317
+ align-items: end;
318
+ }
319
+ #observablehq-footer nav a::before {
320
+ color: var(--theme-foreground-faint);
321
+ }
322
+ #observablehq-footer nav a[rel=prev]::before {
323
+ content: "Previous page";
324
+ }
325
+ #observablehq-footer nav a[rel=next]::before {
326
+ content: "Next page";
327
+ }
328
+ #observablehq-center {
329
+ margin: 1rem 2rem;
330
+ }
331
+ #observablehq-sidebar {
332
+ position: fixed;
333
+ background: var(--theme-background-alt);
334
+ color: var(--theme-foreground-muted);
335
+ font: 14px var(--sans-serif);
336
+ visibility: hidden;
337
+ font-weight: 500;
338
+ width: 272px;
339
+ z-index: 2;
340
+ top: 0;
341
+ bottom: 0;
342
+ left: -272px;
343
+ box-sizing: border-box;
344
+ padding: 0 0.5rem 1rem 0.5rem;
345
+ overflow-y: auto;
346
+ }
347
+ #observablehq-sidebar ol,
348
+ #observablehq-toc ol {
349
+ list-style: none;
350
+ margin: 0;
351
+ padding: 0;
352
+ }
353
+ #observablehq-sidebar > ol,
354
+ #observablehq-sidebar > details {
355
+ position: relative;
356
+ padding-bottom: 0.5rem;
357
+ margin: 0.5rem 0;
358
+ border-bottom: solid 1px var(--theme-foreground-faintest);
359
+ }
360
+ #observablehq-sidebar > ol:first-child {
361
+ position: sticky;
362
+ top: 0;
363
+ z-index: 1;
364
+ background: var(--theme-background-alt);
365
+ font-size: 16px;
366
+ font-weight: 700;
367
+ padding-top: 1rem;
368
+ padding-left: 0.5rem;
369
+ margin: 0;
370
+ margin-left: -0.5rem;
371
+ color: var(--theme-foreground);
372
+ }
373
+ #observablehq-sidebar > ol:last-child,
374
+ #observablehq-sidebar > details:last-child {
375
+ border-bottom: none;
376
+ }
377
+ #observablehq-sidebar summary {
378
+ font-weight: 700;
379
+ color: var(--theme-foreground);
380
+ cursor: default;
381
+ }
382
+ #observablehq-sidebar summary::-webkit-details-marker,
383
+ #observablehq-sidebar summary::marker {
384
+ display: none;
385
+ }
386
+ #observablehq-sidebar summary::after {
387
+ position: absolute;
388
+ right: 0.5rem;
389
+ width: 1rem;
390
+ height: 1rem;
391
+ background: var(--theme-foreground-muted);
392
+ content: "";
393
+ -webkit-mask: var(--theme-caret);
394
+ mask: var(--theme-caret);
395
+ transition: transform 250ms ease;
396
+ transform: rotate(-90deg);
397
+ transform-origin: 50% 50%;
398
+ }
399
+ #observablehq-sidebar summary:hover::after {
400
+ color: var(--theme-foreground);
401
+ }
402
+ #observablehq-sidebar details[open] summary::after {
403
+ transform: rotate(0deg);
404
+ }
405
+ #observablehq-sidebar-toggle {
406
+ position: fixed;
407
+ appearance: none;
408
+ background: none;
409
+ top: 0;
410
+ left: 0;
411
+ height: 100%;
412
+ width: 2rem;
413
+ display: flex;
414
+ align-items: center;
415
+ justify-content: center;
416
+ cursor: e-resize;
417
+ margin: 0;
418
+ color: var(--theme-foreground-muted);
419
+ z-index: 1;
420
+ }
421
+ #observablehq-sidebar-close {
422
+ position: absolute;
423
+ top: 1rem;
424
+ right: 0;
425
+ width: 2rem;
426
+ height: 2.2rem;
427
+ display: flex;
428
+ align-items: center;
429
+ justify-content: center;
430
+ color: var(--theme-foreground-muted);
431
+ cursor: w-resize;
432
+ z-index: 2;
433
+ }
434
+ #observablehq-sidebar-toggle::before,
435
+ #observablehq-sidebar-close::before {
436
+ content: "";
437
+ width: 1rem;
438
+ height: 1rem;
439
+ background: currentColor;
440
+ -webkit-mask: var(--theme-toggle);
441
+ mask: var(--theme-toggle);
442
+ }
443
+ #observablehq-sidebar-close::before {
444
+ transform: scaleX(-1);
445
+ }
446
+ #observablehq-sidebar summary,
447
+ .observablehq-link a {
448
+ display: flex;
449
+ padding: 0.5rem 1rem 0.5rem 1.5rem;
450
+ margin-left: -0.5rem;
451
+ align-items: center;
452
+ }
453
+ #observablehq-sidebar summary:hover,
454
+ .observablehq-link-active a,
455
+ .observablehq-link a:hover {
456
+ background: var(--theme-background);
457
+ }
458
+ .observablehq-link a:hover {
459
+ color: var(--theme-foreground-focus);
460
+ }
461
+ #observablehq-toc {
462
+ display: none;
463
+ position: fixed;
464
+ color: var(--theme-foreground-muted);
465
+ font: 400 14px var(--sans-serif);
466
+ z-index: 1;
467
+ top: 0;
468
+ right: 0;
469
+ bottom: 0;
470
+ overflow-y: auto;
471
+ }
472
+ #observablehq-toc nav {
473
+ width: 192px;
474
+ margin: 2rem 0;
475
+ padding: 0 1rem;
476
+ box-sizing: border-box;
477
+ border-left: solid 1px var(--theme-foreground-faintest);
478
+ }
479
+ #observablehq-toc div {
480
+ font-weight: 700;
481
+ color: var(--theme-foreground);
482
+ margin-bottom: 0.5rem;
483
+ }
484
+ .observablehq-secondary-link a {
485
+ display: block;
486
+ padding: 0.25rem 0;
487
+ }
488
+ .observablehq-link:not(.observablehq-link-active) a[href]:not(:hover),
489
+ .observablehq-secondary-link:not(.observablehq-secondary-link-active) a[href]:not(:hover) {
490
+ color: inherit;
491
+ }
492
+ .observablehq-link-active,
493
+ .observablehq-secondary-link-active {
494
+ position: relative;
495
+ }
496
+ .observablehq-link-active::before,
497
+ .observablehq-secondary-link-highlight {
498
+ content: "";
499
+ position: absolute;
500
+ width: 3px;
501
+ background: var(--theme-foreground-focus);
502
+ }
503
+ .observablehq-link-active::before {
504
+ top: 0;
505
+ bottom: 0;
506
+ left: -0.5rem;
507
+ }
508
+ .observablehq-secondary-link-highlight {
509
+ left: 1px;
510
+ top: 2rem;
511
+ height: 0;
512
+ transition: top 150ms ease, height 150ms ease;
513
+ }
514
+ #observablehq-sidebar {
515
+ transition: visibility 150ms 0ms, left 150ms 0ms ease;
516
+ }
517
+ .observablehq-sidebar-open ~ #observablehq-sidebar,
518
+ #observablehq-sidebar-toggle:checked ~ #observablehq-sidebar {
519
+ left: 0;
520
+ visibility: initial;
521
+ box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.1);
522
+ transition: visibility 0ms 0ms, left 150ms 0ms ease;
523
+ }
524
+ #observablehq-sidebar-backdrop {
525
+ display: none;
526
+ position: fixed;
527
+ top: 0;
528
+ right: 0;
529
+ bottom: 0;
530
+ left: 0;
531
+ z-index: 2;
532
+ }
533
+ .observablehq-sidebar-open ~ #observablehq-sidebar-backdrop,
534
+ #observablehq-sidebar-toggle:checked ~ #observablehq-sidebar-backdrop {
535
+ display: initial;
536
+ }
537
+ @media (prefers-color-scheme: dark) {
538
+ #observablehq-sidebar-toggle:checked ~ #observablehq-sidebar {
539
+ box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.5);
540
+ }
541
+ }
542
+ @media (min-width: calc(640px + 6rem + 272px)) {
543
+ #observablehq-sidebar {
544
+ transition: none !important;
545
+ }
546
+ #observablehq-sidebar-toggle:checked ~ #observablehq-sidebar-backdrop {
547
+ display: none;
548
+ }
549
+ #observablehq-sidebar-toggle:checked ~ #observablehq-sidebar,
550
+ #observablehq-sidebar-toggle:indeterminate ~ #observablehq-sidebar {
551
+ left: 0;
552
+ visibility: initial;
553
+ box-shadow: none;
554
+ border-right: solid 1px var(--theme-foreground-faintest);
555
+ }
556
+ #observablehq-sidebar-toggle:checked ~ #observablehq-center,
557
+ #observablehq-sidebar-toggle:indeterminate ~ #observablehq-center {
558
+ padding-left: calc(272px + 1rem);
559
+ padding-right: 1rem;
560
+ }
561
+ }
562
+ @media (min-width: calc(640px + 6rem + 192px)) {
563
+ #observablehq-toc ~ #observablehq-center {
564
+ padding-right: calc(192px + 1rem);
565
+ }
566
+ #observablehq-toc {
567
+ display: block;
568
+ }
569
+ }
570
+ @media (min-width: calc(640px + 6rem + 272px)) {
571
+ #observablehq-sidebar-toggle:checked ~ #observablehq-toc,
572
+ #observablehq-sidebar-toggle:indeterminate ~ #observablehq-toc {
573
+ display: none;
574
+ }
575
+ }
576
+ @media (min-width: calc(640px + 6rem + 272px + 192px)) {
577
+ #observablehq-sidebar-toggle:checked ~ #observablehq-toc,
578
+ #observablehq-sidebar-toggle:indeterminate ~ #observablehq-toc,
579
+ #observablehq-toc {
580
+ display: block;
581
+ }
582
+ #observablehq-sidebar-toggle:checked ~ #observablehq-toc ~ #observablehq-center,
583
+ #observablehq-sidebar-toggle:indeterminate ~ #observablehq-toc ~ #observablehq-center,
584
+ #observablehq-toc ~ #observablehq-center {
585
+ padding-right: calc(192px + 1rem);
586
+ }
587
+ }
588
+ .observablehq-pre-container {
589
+ position: relative;
590
+ margin: 1rem -1rem;
591
+ max-width: 960px;
592
+ }
593
+ .observablehq-pre-container::after {
594
+ position: absolute;
595
+ top: 0;
596
+ right: 0;
597
+ height: 21px;
598
+ font: 12px var(--sans-serif);
599
+ color: var(--theme-foreground-muted);
600
+ background:
601
+ linear-gradient(
602
+ to right,
603
+ transparent,
604
+ var(--theme-background-alt) 40%);
605
+ padding: 0.5rem 0.5rem 0.5rem 1.5rem;
606
+ }
607
+ .observablehq-pre-container[data-language]::after {
608
+ content: attr(data-language);
609
+ }
610
+ .observablehq-pre-container pre {
611
+ padding-right: 4rem;
612
+ margin: 0;
613
+ max-width: none;
614
+ }
615
+ .observablehq-pre-copy {
616
+ position: absolute;
617
+ top: 0;
618
+ right: 0;
619
+ background: none;
620
+ color: transparent;
621
+ border: none;
622
+ border-radius: 4px;
623
+ padding: 0 8px;
624
+ margin: 4px;
625
+ height: 29px;
626
+ cursor: pointer;
627
+ z-index: 1;
628
+ display: flex;
629
+ align-items: center;
630
+ }
631
+ .observablehq-pre-container[data-copy] .observablehq-pre-copy,
632
+ .observablehq-pre-container:hover .observablehq-pre-copy,
633
+ .observablehq-pre-container .observablehq-pre-copy:focus {
634
+ background: var(--theme-background-alt);
635
+ color: var(--theme-foreground-faint);
636
+ }
637
+ .observablehq-pre-container .observablehq-pre-copy:hover {
638
+ color: var(--theme-foreground-muted);
639
+ }
640
+ .observablehq-pre-container .observablehq-pre-copy:active {
641
+ color: var(--theme-foreground);
642
+ background: var(--theme-foreground-faintest);
643
+ }
644
+ #observablehq-sidebar.observablehq-search-results > ol:not(:first-child),
645
+ #observablehq-sidebar.observablehq-search-results > details {
646
+ display: none;
647
+ }
648
+ #observablehq-search {
649
+ position: relative;
650
+ padding: 0.5rem 0 0 0;
651
+ display: flex;
652
+ align-items: center;
653
+ }
654
+ #observablehq-search input {
655
+ padding: 6px 4px 6px 2.2em;
656
+ width: 100%;
657
+ border: none;
658
+ border-radius: 4px;
659
+ background-color: var(--theme-background);
660
+ font-size: 13.3px;
661
+ height: 28px;
662
+ }
663
+ #observablehq-search input::placeholder {
664
+ color: var(--theme-foreground-faint);
665
+ }
666
+ #observablehq-search::before {
667
+ position: absolute;
668
+ left: 0.5rem;
669
+ content: "";
670
+ width: 1rem;
671
+ height: 1rem;
672
+ background: currentColor;
673
+ -webkit-mask: var(--theme-magnifier);
674
+ mask: var(--theme-magnifier);
675
+ pointer-events: none;
676
+ }
677
+ #observablehq-search::after {
678
+ position: absolute;
679
+ right: 6px;
680
+ content: attr(data-shortcut);
681
+ pointer-events: none;
682
+ }
683
+ #observablehq-search:focus-within::after {
684
+ content: "";
685
+ }
686
+ #observablehq-search-results {
687
+ --relevance-width: 32px;
688
+ position: absolute;
689
+ overflow-y: scroll;
690
+ top: 6.5rem;
691
+ left: 0;
692
+ right: 0.5rem;
693
+ bottom: 0;
694
+ }
695
+ #observablehq-search-results a span {
696
+ max-width: 184px;
697
+ white-space: nowrap;
698
+ overflow: hidden;
699
+ text-overflow: ellipsis;
700
+ }
701
+ #observablehq-search-results div {
702
+ text-align: right;
703
+ font-size: 10px;
704
+ margin: 0.5em;
705
+ }
706
+ #observablehq-search-results li {
707
+ position: relative;
708
+ display: flex;
709
+ align-items: center;
710
+ }
711
+ #observablehq-search-results a {
712
+ flex-grow: 1;
713
+ }
714
+ #observablehq-search-results li:after,
715
+ #observablehq-search-results a:after {
716
+ content: "";
717
+ width: var(--relevance-width);
718
+ height: 4px;
719
+ position: absolute;
720
+ right: 0.5em;
721
+ border-radius: 2px;
722
+ background: var(--theme-foreground-muted);
723
+ }
724
+ #observablehq-search-results li.observablehq-link-active:after {
725
+ background: var(--theme-foreground-focus);
726
+ }
727
+ #observablehq-search-results a:after {
728
+ background: var(--theme-foreground-faintest);
729
+ }
730
+ #observablehq-search-results li[data-score="0"]:after {
731
+ width: calc(var(--relevance-width) * 0.125);
732
+ }
733
+ #observablehq-search-results li[data-score="1"]:after {
734
+ width: calc(var(--relevance-width) * 0.25);
735
+ }
736
+ #observablehq-search-results li[data-score="2"]:after {
737
+ width: calc(var(--relevance-width) * 0.4375);
738
+ }
739
+ #observablehq-search-results li[data-score="3"]:after {
740
+ width: calc(var(--relevance-width) * 0.625);
741
+ }
742
+ #observablehq-search-results li[data-score="4"]:after {
743
+ width: calc(var(--relevance-width) * 0.8125);
744
+ }
745
+ @media print {
746
+ #observablehq-center {
747
+ padding-left: 1em !important;
748
+ }
749
+ #observablehq-sidebar,
750
+ #observablehq-footer {
751
+ display: none !important;
752
+ }
753
+ }
754
+
755
+ /* node_modules/@observablehq/framework/src/style/grid.css */
756
+ #observablehq-center {
757
+ container-type: inline-size;
758
+ }
759
+ .grid {
760
+ margin: 1rem 0;
761
+ display: grid;
762
+ gap: 1rem;
763
+ grid-auto-rows: 1fr;
764
+ }
765
+ .grid svg {
766
+ overflow: visible;
767
+ }
768
+ .grid figure {
769
+ margin: 0;
770
+ }
771
+ .grid > * > p:first-child {
772
+ margin-top: 0;
773
+ }
774
+ .grid > * > p:last-child {
775
+ margin-bottom: 0;
776
+ }
777
+ @container (min-width: 640px) {
778
+ .grid-cols-2,
779
+ .grid-cols-4 {
780
+ grid-template-columns: repeat(2, minmax(0, 1fr));
781
+ }
782
+ .grid-cols-2 .grid-colspan-2,
783
+ .grid-cols-2 .grid-colspan-3,
784
+ .grid-cols-2 .grid-colspan-4,
785
+ .grid-cols-4 .grid-colspan-2,
786
+ .grid-cols-4 .grid-colspan-3,
787
+ .grid-cols-4 .grid-colspan-4 {
788
+ grid-column: span 2;
789
+ }
790
+ }
791
+ @container (min-width: 720px) {
792
+ .grid-cols-3 {
793
+ grid-template-columns: repeat(3, minmax(0, 1fr));
794
+ }
795
+ .grid-cols-3 .grid-colspan-2 {
796
+ grid-column: span 2;
797
+ }
798
+ .grid-cols-3 .grid-colspan-3 {
799
+ grid-column: span 3;
800
+ }
801
+ }
802
+ @container (min-width: 1080px) {
803
+ .grid-cols-4 {
804
+ grid-template-columns: repeat(4, minmax(0, 1fr));
805
+ }
806
+ .grid-cols-4 .grid-colspan-3 {
807
+ grid-column: span 3;
808
+ }
809
+ .grid-cols-4 .grid-colspan-4 {
810
+ grid-column: span 4;
811
+ }
812
+ }
813
+ .grid-rowspan-2 {
814
+ grid-row: span 2;
815
+ }
816
+ .grid-rowspan-3 {
817
+ grid-row: span 3;
818
+ }
819
+ .grid-rowspan-4 {
820
+ grid-row: span 4;
821
+ }
822
+
823
+ /* node_modules/@observablehq/framework/src/style/note.css */
824
+ .note,
825
+ .tip,
826
+ .warning,
827
+ .caution {
828
+ border-left: solid 1px var(--theme-foreground-fainter);
829
+ padding: 0 2rem;
830
+ margin: 1rem 0;
831
+ box-sizing: border-box;
832
+ max-width: 640px;
833
+ }
834
+ .note::before,
835
+ .tip::before,
836
+ .warning::before,
837
+ .caution::before {
838
+ content: "Note";
839
+ display: block;
840
+ margin-bottom: 1rem;
841
+ font-weight: 700;
842
+ color: var(--theme-foreground-muted);
843
+ }
844
+ .tip {
845
+ border-left-color: var(--theme-green);
846
+ }
847
+ .tip::before {
848
+ content: "Tip";
849
+ color: var(--theme-green);
850
+ }
851
+ .warning {
852
+ border-left-color: var(--theme-yellow);
853
+ }
854
+ .warning::before {
855
+ content: "Warning";
856
+ color: var(--theme-yellow);
857
+ }
858
+ .caution {
859
+ border-left-color: var(--theme-red);
860
+ }
861
+ .caution::before {
862
+ content: "Caution";
863
+ color: var(--theme-red);
864
+ }
865
+ .note[label]::before,
866
+ .tip[label]::before,
867
+ .warning[label]::before,
868
+ .caution[label]::before {
869
+ content: attr(label);
870
+ }
871
+
872
+ /* node_modules/@observablehq/framework/src/style/card.css */
873
+ .card {
874
+ background: var(--theme-background-alt);
875
+ border: solid 1px var(--theme-foreground-faintest);
876
+ border-radius: 0.75rem;
877
+ padding: 1rem;
878
+ margin: 1rem 0;
879
+ font: 14px var(--sans-serif);
880
+ }
881
+ .grid > .card,
882
+ .card figure {
883
+ margin: 0;
884
+ }
885
+ .card h2,
886
+ .card h3 {
887
+ font-size: inherit;
888
+ }
889
+ .card h2 {
890
+ font-weight: 500;
891
+ font-size: 15px;
892
+ }
893
+ .card h3 {
894
+ font-weight: 400;
895
+ color: var(--theme-foreground-muted);
896
+ }
897
+ .card h2 ~ svg,
898
+ .card h3 ~ svg,
899
+ .card h2 ~ p,
900
+ .card h3 ~ p {
901
+ margin-top: 1rem;
902
+ }
903
+
904
+ /* node_modules/@observablehq/framework/src/style/inspector.css */
905
+ .observablehq--block:not(.observablehq--loading):empty {
906
+ margin: 0;
907
+ }
908
+ @keyframes observablehq-loading {
909
+ from {
910
+ transform: rotate(0);
911
+ }
912
+ to {
913
+ transform: rotate(360deg);
914
+ }
915
+ }
916
+ .observablehq--loading::before {
917
+ content: "\21bb";
918
+ font: var(--monospace-font);
919
+ color: var(--theme-foreground-muted);
920
+ display: inline-block;
921
+ transform-origin: 0.32em 55%;
922
+ animation-name: observablehq-loading;
923
+ animation-timing-function: linear;
924
+ animation-duration: 1s;
925
+ animation-iteration-count: infinite;
926
+ }
927
+ .observablehq--block.observablehq--loading::before {
928
+ display: block;
929
+ }
930
+ .observablehq--block {
931
+ margin: 1rem 0;
932
+ }
933
+ .observablehq--block .observablehq,
934
+ .observablehq--block .observablehq--inspect {
935
+ display: block;
936
+ }
937
+ .observablehq--collapsed,
938
+ .observablehq--expanded.observablehq--inspect a {
939
+ cursor: pointer;
940
+ }
941
+ .observablehq--caret {
942
+ margin-right: 4px;
943
+ vertical-align: baseline;
944
+ }
945
+ .observablehq--field {
946
+ text-indent: -1rem;
947
+ margin-left: 1rem;
948
+ }
949
+ .observablehq--inspect {
950
+ font: var(--monospace-font);
951
+ overflow-x: auto;
952
+ white-space: pre;
953
+ }
954
+ .observablehq--inspect.observablehq--import {
955
+ white-space: normal;
956
+ }
957
+ .observablehq--inspect::-webkit-scrollbar {
958
+ display: none;
959
+ }
960
+ .observablehq--error .observablehq--inspect {
961
+ word-break: break-all;
962
+ white-space: pre-wrap;
963
+ }
964
+ .observablehq--string-expand {
965
+ margin-left: 6px;
966
+ padding: 2px 6px;
967
+ border-radius: 2px;
968
+ font-size: 80%;
969
+ background: var(--theme-background-alt);
970
+ cursor: pointer;
971
+ vertical-align: middle;
972
+ }
973
+ .observablehq--keyword,
974
+ .hljs-doctag,
975
+ .hljs-keyword,
976
+ .hljs-meta .hljs-keyword,
977
+ .hljs-template-tag,
978
+ .hljs-template-variable,
979
+ .hljs-type,
980
+ .hljs-variable.language_ {
981
+ color: var(--syntax-keyword);
982
+ }
983
+ .observablehq--symbol,
984
+ .hljs-title,
985
+ .hljs-title.class_,
986
+ .hljs-title.class_.inherited__,
987
+ .hljs-title.function_ {
988
+ color: var(--syntax-entity);
989
+ }
990
+ .observablehq--index,
991
+ .observablehq--key,
992
+ .hljs-attr,
993
+ .hljs-attribute,
994
+ .hljs-meta,
995
+ .hljs-operator,
996
+ .hljs-variable,
997
+ .hljs-selector-attr,
998
+ .hljs-selector-class,
999
+ .hljs-selector-id {
1000
+ color: var(--syntax-constant);
1001
+ }
1002
+ .observablehq--regexp,
1003
+ .observablehq--string,
1004
+ .hljs-regexp,
1005
+ .hljs-string,
1006
+ .hljs-meta .hljs-string {
1007
+ color: var(--syntax-string);
1008
+ }
1009
+ .observablehq--null,
1010
+ .observablehq--undefined,
1011
+ .hljs-built_in,
1012
+ .hljs-literal,
1013
+ .hljs-symbol {
1014
+ color: var(--syntax-variable);
1015
+ }
1016
+ .observablehq--prototype-key,
1017
+ .observablehq--empty,
1018
+ .hljs-comment,
1019
+ .hljs-formula {
1020
+ color: var(--syntax-comment);
1021
+ }
1022
+ .observablehq--bigint,
1023
+ .observablehq--boolean,
1024
+ .observablehq--date,
1025
+ .observablehq--forbidden,
1026
+ .observablehq--number,
1027
+ .hljs-name,
1028
+ .hljs-number,
1029
+ .hljs-quote,
1030
+ .hljs-selector-tag,
1031
+ .hljs-selector-pseudo {
1032
+ color: var(--syntax-entity-tag);
1033
+ }
1034
+ .hljs-subst {
1035
+ color: var(--syntax-storage-modifier-import);
1036
+ }
1037
+ .hljs-section {
1038
+ color: var(--syntax-markup-heading);
1039
+ font-weight: bold;
1040
+ }
1041
+ .hljs-bullet {
1042
+ color: var(--syntax-markup-list);
1043
+ }
1044
+ .hljs-emphasis {
1045
+ color: var(--syntax-markup-italic);
1046
+ font-style: italic;
1047
+ }
1048
+ .hljs-strong {
1049
+ color: var(--syntax-markup-bold);
1050
+ font-weight: bold;
1051
+ }
1052
+ .hljs-addition {
1053
+ color: var(--syntax-markup-inserted);
1054
+ background-color: var(--syntax-markup-inserted-background);
1055
+ }
1056
+ .hljs-deletion {
1057
+ color: var(--syntax-markup-deleted);
1058
+ background-color: var(--syntax-markup-deleted-background);
1059
+ }
1060
+ .observablehq--empty {
1061
+ font-style: oblique;
1062
+ }
1063
+ .observablehq--error {
1064
+ color: var(--syntax-keyword);
1065
+ }
1066
+
1067
+ /* node_modules/@observablehq/framework/src/style/plot.css */
1068
+ .plot-d6a7b5 {
1069
+ --plot-background: var(--theme-background);
1070
+ }
1071
+ p .plot-d6a7b5 {
1072
+ display: inline-block;
1073
+ }
1074
+
1075
+ /* node_modules/@observablehq/framework/src/style/default.css */
1076
+
1077
+ /* node_modules/@observablehq/framework/src/style/syntax-light.css */
1078
+ @media (prefers-color-scheme: light) {
1079
+ :root {
1080
+ --syntax-keyword: #d73a49;
1081
+ --syntax-entity: #6f42c1;
1082
+ --syntax-constant: #005cc5;
1083
+ --syntax-string: #032f62;
1084
+ --syntax-variable: #e36209;
1085
+ --syntax-comment: var(--theme-foreground-muted);
1086
+ --syntax-entity-tag: #22863a;
1087
+ --syntax-storage-modifier-import: #24292e;
1088
+ --syntax-markup-heading: #005cc5;
1089
+ --syntax-markup-list: #735c0f;
1090
+ --syntax-markup-italic: #24292e;
1091
+ --syntax-markup-bold: #24292e;
1092
+ --syntax-markup-inserted: #22863a;
1093
+ --syntax-markup-inserted-background: #f0fff4;
1094
+ --syntax-markup-deleted: #b31d28;
1095
+ --syntax-markup-deleted-background: #ffeef0;
1096
+ }
1097
+ }
1098
+
1099
+ /* node_modules/@observablehq/framework/src/style/abstract-light.css */
1100
+ @media (prefers-color-scheme: light) {
1101
+ :root {
1102
+ --theme-background-b: color-mix(in srgb, var(--theme-foreground) 4%, var(--theme-background-a));
1103
+ --theme-background: var(--theme-background-a);
1104
+ --theme-background-alt: var(--theme-background-b);
1105
+ --theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-a));
1106
+ --theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-a));
1107
+ --theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-a));
1108
+ --theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-a));
1109
+ --theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-a));
1110
+ color-scheme: light;
1111
+ }
1112
+ }
1113
+
1114
+ /* node_modules/@observablehq/framework/src/style/theme-air.css */
1115
+ @media (prefers-color-scheme: light) {
1116
+ :root {
1117
+ --theme-foreground: #1b1e23;
1118
+ --theme-foreground-focus: #3b5fc0;
1119
+ --theme-background-a: #ffffff;
1120
+ }
1121
+ }
1122
+
1123
+ /* node_modules/@observablehq/framework/src/style/syntax-dark.css */
1124
+ @media (prefers-color-scheme: dark) {
1125
+ :root {
1126
+ --syntax-keyword: #ff7b72;
1127
+ --syntax-entity: #d2a8ff;
1128
+ --syntax-constant: #79c0ff;
1129
+ --syntax-string: #a5d6ff;
1130
+ --syntax-variable: #ffa657;
1131
+ --syntax-comment: var(--theme-foreground-muted);
1132
+ --syntax-entity-tag: #7ee787;
1133
+ --syntax-storage-modifier-import: #c9d1d9;
1134
+ --syntax-markup-heading: #1f6feb;
1135
+ --syntax-markup-list: #f2cc60;
1136
+ --syntax-markup-italic: #c9d1d9;
1137
+ --syntax-markup-bold: #c9d1d9;
1138
+ --syntax-markup-inserted: #aff5b4;
1139
+ --syntax-markup-inserted-background: #033a16;
1140
+ --syntax-markup-deleted: #ffdcd7;
1141
+ --syntax-markup-deleted-background: #67060c;
1142
+ }
1143
+ }
1144
+
1145
+ /* node_modules/@observablehq/framework/src/style/abstract-dark.css */
1146
+ @media (prefers-color-scheme: dark) {
1147
+ :root {
1148
+ --theme-background-a: color-mix(in srgb, var(--theme-foreground) 4%, var(--theme-background-b));
1149
+ --theme-background: var(--theme-background-a);
1150
+ --theme-background-alt: var(--theme-background-b);
1151
+ --theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-b));
1152
+ --theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-b));
1153
+ --theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-b));
1154
+ --theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-b));
1155
+ --theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-b));
1156
+ color-scheme: dark;
1157
+ }
1158
+ }
1159
+
1160
+ /* node_modules/@observablehq/framework/src/style/theme-near-midnight.css */
1161
+ @media (prefers-color-scheme: dark) {
1162
+ :root {
1163
+ --theme-foreground: #dfdfd6;
1164
+ --theme-foreground-focus: oklch(0.712564 0.257662 265.758);
1165
+ --theme-background-b: #161616;
1166
+ }
1167
+ }
1168
+
1169
+ /* <stdin> */
dist/index.html ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <meta charset="utf-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
4
+ <title>Evolution of the Hugging Face Hub | Observable HuggingFace</title>
5
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
6
+ <link rel="preload" as="style" href="./_observablehq/theme-air,near-midnight.css">
7
+ <link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&amp;display=swap" crossorigin>
8
+ <link rel="stylesheet" type="text/css" href="./_observablehq/theme-air,near-midnight.css">
9
+ <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&amp;display=swap" crossorigin>
10
+ <link rel="modulepreload" href="./_import/components/timeline.js?sha=5ca1eba49e1e7a618d1c3c7d82f4649ce99688d43d5075e782fc5f07b89bfd7d">
11
+ <link rel="modulepreload" href="./_import/components/tree.js?sha=5f6427efaf21e77626c828a46aaa2fe5cd74a645f8d000e978ba8a7d16b4ab84">
12
+ <link rel="modulepreload" href="./_observablehq/client.js">
13
+ <link rel="modulepreload" href="./_observablehq/runtime.js">
14
+ <link rel="modulepreload" href="./_observablehq/stdlib.js">
15
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.13/+esm">
16
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/binary-search-bounds@2.0.5/+esm">
17
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-array@3.2.4/+esm">
18
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-axis@3.0.0/+esm">
19
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-brush@3.0.0/+esm">
20
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-chord@3.0.1/+esm">
21
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-color@3.1.0/+esm">
22
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-contour@4.0.2/+esm">
23
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-delaunay@6.0.4/+esm">
24
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-dispatch@3.0.1/+esm">
25
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-drag@3.0.0/+esm">
26
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-dsv@3.0.1/+esm">
27
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-ease@3.0.1/+esm">
28
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-fetch@3.0.1/+esm">
29
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-force@3.0.0/+esm">
30
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-format@3.1.0/+esm">
31
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-geo@3.1.0/+esm">
32
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-hierarchy@3.1.2/+esm">
33
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-interpolate@3.0.1/+esm">
34
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-path@3.1.0/+esm">
35
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-polygon@3.0.1/+esm">
36
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-quadtree@3.0.1/+esm">
37
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-random@3.0.1/+esm">
38
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-scale-chromatic@3.0.0/+esm">
39
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-scale@4.0.2/+esm">
40
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-selection@3.0.0/+esm">
41
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-shape@3.2.0/+esm">
42
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-time-format@4.1.0/+esm">
43
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-time@3.1.0/+esm">
44
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-timer@3.0.1/+esm">
45
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-transition@3.0.1/+esm">
46
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3-zoom@3.0.0/+esm">
47
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/d3@7.8.5/+esm">
48
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/delaunator@5.0.0/+esm">
49
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/internmap@2.0.3/+esm">
50
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/interval-tree-1d@1.0.4/+esm">
51
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/isoformat@0.2.1/+esm">
52
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/robust-predicates@3.0.2/+esm">
53
+ <script type="module">
54
+
55
+ import {define} from "./_observablehq/client.js";
56
+
57
+ define({id: "e7d66736", outputs: ["timeline"], body: async () => {
58
+ const {timeline} = await import("./_import/components/timeline.js?sha=5ca1eba49e1e7a618d1c3c7d82f4649ce99688d43d5075e782fc5f07b89bfd7d");
59
+
60
+ return {timeline};
61
+ }});
62
+
63
+ define({id: "e4b77d4a", inputs: ["FileAttachment"], outputs: ["events"], files: [{"name":"./data/events.json","mimeType":"application/json","path":"./_file/data/events.json"}], body: (FileAttachment) => {
64
+ const events = FileAttachment("./data/events.json").json();
65
+ return {events};
66
+ }});
67
+
68
+ define({id: "a330849e", inputs: ["timeline","events","display"], body: async (timeline,events,display) => {
69
+ display(await(
70
+ timeline(events, {height: 300})
71
+ ))
72
+ }});
73
+
74
+ define({id: "3c26f472", inputs: ["FileAttachment"], outputs: ["tree","tags"], files: [{"name":"./data/tags.json","mimeType":"application/json","path":"./_file/data/tags.json"}], body: async (FileAttachment) => {
75
+ const {tree} = await import("./_import/components/tree.js?sha=5f6427efaf21e77626c828a46aaa2fe5cd74a645f8d000e978ba8a7d16b4ab84");
76
+ const tags = FileAttachment("./data/tags.json").json();
77
+ return {tree,tags};
78
+ }});
79
+
80
+ define({id: "8f8230ee", inputs: ["tree","tags","display"], body: async (tree,tags,display) => {
81
+ display(await(
82
+ tree(tags, {height: 10000})
83
+ ))
84
+ }});
85
+
86
+ </script>
87
+ <div id="observablehq-center">
88
+ <main id="observablehq-main" class="observablehq">
89
+ <h1 id="evolution-of-the-hugging-face-hub" tabindex="-1"><a class="observablehq-header-anchor" href="#evolution-of-the-hugging-face-hub">Evolution of the Hugging Face Hub</a></h1>
90
+ <h3 id="powered-by-observable-framework" tabindex="-1"><a class="observablehq-header-anchor" href="#powered-by-observable-framework">Powered by Observable Framework</a></h3>
91
+ <p>Let's visualize how the Hub is evolving those last few years.</p>
92
+ <h2 id="models-and-datasets" tabindex="-1"><a class="observablehq-header-anchor" href="#models-and-datasets">Models and datasets</a></h2>
93
+ <div id="cell-e7d66736" class="observablehq observablehq--block"></div>
94
+ <div id="cell-e4b77d4a" class="observablehq observablehq--block"></div>
95
+ <div id="cell-a330849e" class="observablehq observablehq--block observablehq--loading"></div>
96
+ <h2 id="model-tags" tabindex="-1"><a class="observablehq-header-anchor" href="#model-tags">Model tags</a></h2>
97
+ <div id="cell-3c26f472" class="observablehq observablehq--block"></div>
98
+ <p>The data in the timeline above is static but this data below is dynamically fetched from <code>https://huggingface.co/api/models-tags-by-type</code>:</p>
99
+ <div id="cell-8f8230ee" class="observablehq observablehq--block observablehq--loading"></div>
100
+ <h2 id="llm-generated-description-based-on-data-above" tabindex="-1"><a class="observablehq-header-anchor" href="#llm-generated-description-based-on-data-above">LLM generated description based on data above</a></h2>
101
+ <p>The evolution of open source models and datasets on the Hugging Face Hub reflects a significant shift in the landscape of machine learning and artificial intelligence. Initially, the Hugging Face Hub started as a repository for Natural Language Processing (NLP) models, primarily focusing on the Transformer architecture, which has been pivotal in advancing AI research and applications. The hub was known for hosting models such as BERT, GPT, and their variants, facilitating easy access for researchers and developers to state-of-the-art models.</p>
102
+ <p>Over time, the Hugging Face Hub expanded its scope beyond NLP to include a wide variety of models across different domains of AI, such as computer vision, audio processing, and multi-modal AI. This expansion was driven by the community's growing demand for a centralized platform where researchers and developers could share, discover, and implement AI models across different fields.</p>
103
+ <p>The introduction of datasets on the Hugging Face Hub marked another significant milestone. It provided a unified platform for sharing and accessing datasets, which are crucial for training and benchmarking AI models. This feature addressed a common challenge in the AI community—the difficulty of finding high-quality, relevant datasets—by allowing users to easily search for and download datasets for their specific needs.</p>
104
+ <p>The Hugging Face Hub has also embraced an open-source ethos, encouraging collaboration and transparency in AI development. Users can contribute their own models and datasets, participate in discussions, and improve existing resources through direct interaction and feedback. This collaborative environment has fostered innovation and accelerated the pace of AI research and development.</p>
105
+ <p>Moreover, the platform has integrated tools and APIs to facilitate the deployment of models, making it easier for developers to integrate AI into applications. The Hugging Face Hub's emphasis on interoperability, with support for various machine learning frameworks like TensorFlow, PyTorch, and JAX, ensures that the models and datasets are accessible to a broad audience.</p>
106
+ <p>In conclusion, the evolution of the Hugging Face Hub reflects the growing importance of open-source models and datasets in the AI community. It has become a key resource for researchers, developers, and companies, promoting accessibility, collaboration, and innovation in AI.</p>
107
+ </main>
108
+ <footer id="observablehq-footer">
109
+ <div>Built with <a href="https://observablehq.com/" target="_blank">Observable</a> on <a title="2024-02-16T12:08:36">Feb 16, 2024</a>.</div>
110
+ </footer>
111
+ </div>