2 lines
42 KiB
JavaScript
Raw Normal View History

2026-08-12 16:54:48 +08:00
!function(t,e){"use strict";const n=Math.random().toString(36).slice(2,8);let i=0;function r(){}function a(t,e){const n=(t,i)=>e(t,()=>{var e;return null==(e=t.children)?void 0:e.map(e=>n(e,t))},i);return n(t)}function o(){const t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function l(t){return t.replace(/<[^>]*>/g,"").replace(/&#x([0-9a-fA-F]+);/g,(t,e)=>String.fromCodePoint(parseInt(e,16))).replace(/&#(\d+);/g,(t,e)=>String.fromCodePoint(Number(e))).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").trim()}
/*! @gera2ld/jsx-dom v2.2.2 | ISC License */const s="http://www.w3.org/1999/xlink",c={show:s,actuate:s,href:s};function h(t,e,...n){return function(t,e){let n;if("string"==typeof t)n=1;else{if("function"!=typeof t)throw new Error("Invalid VNode type");n=2}return{vtype:n,type:t,props:e}}(t,e=Object.assign({},e,{children:1===n.length?n[0]:n}))}function d(t){return t.children}const u={isSvg:!1};function p(t,e){Array.isArray(e)||(e=[e]),(e=e.filter(Boolean)).length&&t.append(...e)}const g={className:"class",labelFor:"for"};function f(t,e,n,i){if(e=g[e]||e,!0===n)t.setAttribute(e,"");else if(!1===n)t.removeAttribute(e);else{const r=i?c[e]:void 0;void 0!==r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}}function m(t,e){return Array.isArray(t)?t.map(t=>m(t,e)).reduce((t,e)=>t.concat(e),[]):y(t,e)}function y(t,e=u){if(null==t||"boolean"==typeof t)return null;if(t instanceof Node)return t;if(2===(null==(n=t)?void 0:n.vtype)){const{type:n,props:i}=t;if(n===d){const t=document.createDocumentFragment();if(i.children){p(t,m(i.children,e))}return t}return y(n(i),e)}var n;if((t=>"string"==typeof t||"number"==typeof t)(t))return document.createTextNode(`${t}`);if((t=>1===(null==t?void 0:t.vtype))(t)){let n;const{type:i,props:r}=t;if(e.isSvg||"svg"!==i||(e=Object.assign({},e,{isSvg:!0})),n=e.isSvg?document.createElementNS("http://www.w3.org/2000/svg",i):document.createElement(i),function(t,e,n){for(const i in e)if("key"!==i&&"children"!==i&&"ref"!==i)if("dangerouslySetInnerHTML"===i)t.innerHTML=e[i].__html;else if("innerHTML"===i||"textContent"===i||"innerText"===i||"value"===i&&["textarea","select"].includes(t.tagName)){const n=e[i];null!=n&&(t[i]=n)}else i.startsWith("on")?t[i.toLowerCase()]=e[i]:f(t,i,e[i],n.isSvg)}(n,r,e),r.children){let t=e;e.isSvg&&"foreignObject"===i&&(t=Object.assign({},t,{isSvg:!1}));const a=m(r.children,t);null!=a&&p(n,a)}const{ref:a}=r;return"function"==typeof a&&a(n),n}throw new Error("mount: Invalid Vnode!")}function v(...t){return y(h(...t))}const x=function(t){const e={};return function(...n){const i=`${n[0]}`;let r=e[i];return r||(r={value:t(...n)},e[i]=r),r.value}}(t=>{document.head.append(v("link",{rel:"preload",as:"script",href:t}))}),k={},b={};async function w(t,e){var n;const i="script"===t.type&&(null==(n=t.data)?void 0:n.src)||"";if(t.loaded||(t.loaded=k[i]),!t.loaded){const n=o();if(t.loaded=n.promise,"script"===t.type&&(document.head.append(v("script",{...t.data,onLoad:()=>n.resolve(),onError:n.reject})),i?k[i]=t.loaded:n.resolve()),"iife"===t.type){const{fn:i,getParams:r}=t.data;i(...(null==r?void 0:r(e))||[]),n.resolve()}}await t.loaded}const S="undefined"!=typeof navigator&&navigator.userAgent.includes("Macintosh"),z=e.scaleOrdinal(e.schemeCategory10),C=(t=1,e=3,n=2)=>i=>t+e/n**i.state.depth,E={autoFit:!1,direction:"right",duration:500,embedGlobalCSS:!0,fitRatio:.95,maxInitialScale:2,scrollForPan:S,initialExpandLevel:-1,zoom:!0,pan:!0,toggleRecursively:!1,color:t=>{var e;return z(`${(null==(e=t.state)?void 0:e.path)||""}`)},lineWidth:C(),maxWidth:0,nodeMinHeight:16,paddingX:8,spacingHorizontal:80,spacingVertical:5,theme:void 0};function $(t,n){const i=e.color(t);if(!i)return t;const r=e.rgb(i);return r.r=r.r+(255-r.r)*n,r.g=r.g+(255-r.g)*n,r.b=r.b+(255-r.b)*n,r.formatHex()}function X(t){const n=e.color(t);if(!n)return!1;const{r:i,g:r,b:a}=e.rgb(n);return(.299*i+.587*r+.114*a)/255<.75}function A(t,e){return X(t)?{stroke:"#fff",fillOpen:"rgba(255,255,255,0.5)",fillClosed:"#fff"}:{stroke:e,fillOpen:"#fff",fillClosed:e}}const _=t=>({stroke:t,fillOpen:"#fff",fillClosed:t});function P(t){const n=(t,n)=>"lighten"===n.fn?$(t,n.amount):function(t,n){const i=e.color(t);if(!i)return t;const r=e.rgb(i);return r.r=r.r*(1-n),r.g=r.g*(1-n),r.b=r.b*(1-n),r.formatHex()}(t,n.amount);return(e,i)=>{if(1===e)return{background:{fill:i,rx:t.rootRx??"capsule",ry:t.rootRx??"capsule",paddingX:10,paddingY:6,borderWidth:1.5,borderColor:n(i,t.borderAdjust[0])},font:{size:20,weight:700,color:X(i)?"#fff":"#333"},circle:A(i,i),line:null,filter:"url(#mm-shadow)"};if(2===e){const e=$(i,t.bgLighten[0]);return{background:{fill:e,