2 lines
332 KiB
JavaScript
2 lines
332 KiB
JavaScript
|
|
!function(t,e){"use strict";const n={jsdelivr:t=>`https://cdn.jsdelivr.net/npm/${t}`,unpkg:t=>`https://unpkg.com/${t}`};class r{constructor(){this.providers={...n},this.provider="jsdelivr"}async getFastestProvider(t=5e3,e="npm2url/dist/index.cjs"){const n=new AbortController;let r=0;try{return await new Promise((s,i)=>{Promise.all(Object.entries(this.providers).map(async([t,r])=>{try{await async function(t,e){const n=await fetch(t,{signal:e});if(!n.ok)throw n;await n.text()}(r(e),n.signal),s(t)}catch{}})).then(()=>i(new Error("All providers failed"))),r=setTimeout(i,t,new Error("Timed out"))})}finally{n.abort(),clearTimeout(r)}}async findFastestProvider(t,e){return this.provider=await this.getFastestProvider(t,e),this.provider}setProvider(t,e){e?this.providers[t]=e:delete this.providers[t]}getFullUrl(t,e=this.provider){if(t.includes("://"))return t;const n=this.providers[e];if(!n)throw new Error(`Provider ${e} not found`);return n(t)}}class s{constructor(){this.listeners=[]}tap(t){return this.listeners.push(t),()=>this.revoke(t)}revoke(t){const e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}revokeAll(){this.listeners.splice(0)}call(...t){for(const e of this.listeners)e(...t)}}function i(){}function o(t,e){return(...n)=>e(t,...n)}function a(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(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").trim()}
|
||
|
|
/*! @gera2ld/jsx-dom v2.2.2 | ISC License */Math.random().toString(36).slice(2,8);const c="http://www.w3.org/1999/xlink",l={show:c,actuate:c,href:c};function u(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 h(t){return t.children}const f={isSvg:!1};function d(t,e){Array.isArray(e)||(e=[e]),(e=e.filter(Boolean)).length&&t.append(...e)}const p={className:"class",labelFor:"for"};function m(t,e,n,r){if(e=p[e]||e,!0===n)t.setAttribute(e,"");else if(!1===n)t.removeAttribute(e);else{const s=r?l[e]:void 0;void 0!==s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}}function g(t,e){return Array.isArray(t)?t.map(t=>g(t,e)).reduce((t,e)=>t.concat(e),[]):y(t,e)}function y(t,e=f){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:r}=t;if(n===h){const t=document.createDocumentFragment();if(r.children){d(t,g(r.children,e))}return t}return y(n(r),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:r,props:s}=t;if(e.isSvg||"svg"!==r||(e=Object.assign({},e,{isSvg:!0})),n=e.isSvg?document.createElementNS("http://www.w3.org/2000/svg",r):document.createElement(r),function(t,e,n){for(const r in e)if("key"!==r&&"children"!==r&&"ref"!==r)if("dangerouslySetInnerHTML"===r)t.innerHTML=e[r].__html;else if("innerHTML"===r||"textContent"===r||"innerText"===r||"value"===r&&["textarea","select"].includes(t.tagName)){const n=e[r];null!=n&&(t[r]=n)}else r.startsWith("on")?t[r.toLowerCase()]=e[r]:m(t,r,e[r],n.isSvg)}(n,s,e),s.children){let t=e;e.isSvg&&"foreignObject"===r&&(t=Object.assign({},t,{isSvg:!1}));const i=g(s.children,t);null!=i&&d(n,i)}const{ref:i}=s;return"function"==typeof i&&i(n),n}throw new Error("mount: Invalid Vnode!")}function b(...t){return y(u(...t))}const k=function(t){const e={};return function(...n){const r=`${n[0]}`;let s=e[r];return s||(s={value:t(...n)},e[r]=s),s.value}}(t=>{document.head.append(b("link",{rel:"preload",as:"script",href:t}))}),v={};async function w(t,e){var n;const r="script"===t.type&&(null==(n=t.data)?void 0:n.src)||"";if(t.loaded||(t.loaded=v[r]),!t.loaded){const n=function(){const t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}();if(t.loaded=n.promise,"script"===t.type&&(document.head.append(b("script",{...t.data,onLoad:()=>n.resolve(),onError:n.reject})),r?v[r]=t.loaded:n.resolve()),"iife"===t.type){const{fn:r,getParams:s}=t.data;r(...(null==s?void 0:s(e))||[]),n.resolve()}}await t.loaded}async function A(t,e){t.forEach(t=>{var e;"script"===t.type&&(null==(e=t.data)?void 0:e.src)&&k(t.data.src)}),e={getMarkmap:()=>window.markmap,...e};for(const n of t)await w(n,e)}function _(t){return{type:"script",data:{src:t}}}function E(t){return{type:"stylesheet",data:{href:t}}}const x={done:{path:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",color:"#52c41a"},wip:{path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",color:"#faad14"},blocked:{path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",color:"#f5222d"},"priority-high":{path:"M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z",color:"#f5222d"},"priority-mid":{path:"M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z",color:"#fa8c16"},"priority-low":{path:"M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z",color:"#52c41a"},star:{path:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",color:"#fadb14"},flag:{path:"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z",color:"#f5222d"},info:{path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z",color:"#1890ff"},question:{
|