3 lines
66 KiB
JavaScript
3 lines
66 KiB
JavaScript
|
// @observablehq/runtime v5.4.2 Copyright 2023 Observable, Inc.
|
||
|
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,y=b({});function v(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!==y&&(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!==y&&(yield j(t))}function*A(e){for(const[t,n]of e)yield $(t,n,"observab
|