This commit is contained in:
parent
4b35583782
commit
e77051ccc4
1987 changed files with 1147290 additions and 5648 deletions
14
themes/blowfish/assets/lib/chart/chart.min.js
vendored
Normal file
14
themes/blowfish/assets/lib/chart/chart.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9
themes/blowfish/assets/lib/fuse/fuse.min.js
vendored
Normal file
9
themes/blowfish/assets/lib/fuse/fuse.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
themes/blowfish/assets/lib/jquery/jquery.slim.min.js
vendored
Normal file
2
themes/blowfish/assets/lib/jquery/jquery.slim.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
themes/blowfish/assets/lib/katex/auto-render.min.js
vendored
Normal file
1
themes/blowfish/assets/lib/katex/auto-render.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
|
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_AMS-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_AMS-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_AMS-Regular.woff2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Bold.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Bold.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Bold.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Bold.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Bold.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Bold.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Italic.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Italic.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Italic.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Italic.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Italic.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Italic.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Regular.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Regular.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Main-Regular.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-Italic.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-Italic.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-Italic.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-Italic.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-Italic.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Math-Italic.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_SansSerif-Bold.woff
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Script-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Script-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Script-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Script-Regular.woff
Normal file
Binary file not shown.
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size1-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size1-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size1-Regular.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size2-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size2-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size2-Regular.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size3-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size3-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size3-Regular.woff2
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size4-Regular.ttf
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size4-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff
Normal file
Binary file not shown.
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff2
Normal file
BIN
themes/blowfish/assets/lib/katex/fonts/KaTeX_Size4-Regular.woff2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
themes/blowfish/assets/lib/katex/katex.min.css
vendored
Normal file
1
themes/blowfish/assets/lib/katex/katex.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
themes/blowfish/assets/lib/katex/katex.min.js
vendored
Normal file
1
themes/blowfish/assets/lib/katex/katex.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,95 @@
|
|||
lite-youtube {
|
||||
background-color: #000;
|
||||
position: relative;
|
||||
display: block;
|
||||
contain: content;
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
cursor: pointer;
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
/* gradient */
|
||||
lite-youtube::before {
|
||||
content: attr(data-title);
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
/* Pixel-perfect port of YT's gradient PNG, using https://github.com/bluesmoon/pngtocss plus optimizations */
|
||||
background-image: linear-gradient(180deg, rgb(0 0 0 / 67%) 0%, rgb(0 0 0 / 54%) 14%, rgb(0 0 0 / 15%) 54%, rgb(0 0 0 / 5%) 72%, rgb(0 0 0 / 0%) 94%);
|
||||
height: 99px;
|
||||
width: 100%;
|
||||
font-family: "YouTube Noto",Roboto,Arial,Helvetica,sans-serif;
|
||||
color: hsl(0deg 0% 93.33%);
|
||||
text-shadow: 0 0 2px rgba(0,0,0,.5);
|
||||
font-size: 18px;
|
||||
padding: 25px 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
lite-youtube:hover::before {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* responsive iframe with a 16:9 aspect ratio
|
||||
thanks https://css-tricks.com/responsive-iframes/
|
||||
*/
|
||||
lite-youtube::after {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-bottom: calc(100% / (16 / 9));
|
||||
}
|
||||
lite-youtube > iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* play button */
|
||||
lite-youtube > .lty-playbtn {
|
||||
display: block;
|
||||
/* Make the button element cover the whole area for a large hover/click target… */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* …but visually it's still the same size */
|
||||
background: no-repeat center/68px 48px;
|
||||
/* YT's actual play button svg */
|
||||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
filter: grayscale(100%);
|
||||
transition: filter .1s cubic-bezier(0, 0, 0.2, 1);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
lite-youtube:hover > .lty-playbtn,
|
||||
lite-youtube .lty-playbtn:focus {
|
||||
filter: none;
|
||||
}
|
||||
|
||||
/* Post-click styles */
|
||||
lite-youtube.lyt-activated {
|
||||
cursor: unset;
|
||||
}
|
||||
lite-youtube.lyt-activated::before,
|
||||
lite-youtube.lyt-activated > .lty-playbtn {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.lyt-visually-hidden {
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 1px;
|
||||
}
|
225
themes/blowfish/assets/lib/lite-youtube-embed/lite-yt-embed.js
Normal file
225
themes/blowfish/assets/lib/lite-youtube-embed/lite-yt-embed.js
Normal file
|
@ -0,0 +1,225 @@
|
|||
/**
|
||||
* A lightweight youtube embed. Still should feel the same to the user, just MUCH faster to initialize and paint.
|
||||
*
|
||||
* Thx to these as the inspiration
|
||||
* https://storage.googleapis.com/amp-vs-non-amp/youtube-lazy.html
|
||||
* https://autoplay-youtube-player.glitch.me/
|
||||
*
|
||||
* Once built it, I also found these:
|
||||
* https://github.com/ampproject/amphtml/blob/master/extensions/amp-youtube (👍👍)
|
||||
* https://github.com/Daugilas/lazyYT
|
||||
* https://github.com/vb/lazyframe
|
||||
*/
|
||||
class LiteYTEmbed extends HTMLElement {
|
||||
connectedCallback() {
|
||||
this.videoId = this.getAttribute('videoid');
|
||||
|
||||
let playBtnEl = this.querySelector('.lty-playbtn');
|
||||
// A label for the button takes priority over a [playlabel] attribute on the custom-element
|
||||
this.playLabel = (playBtnEl && playBtnEl.textContent.trim()) || this.getAttribute('playlabel') || 'Play';
|
||||
|
||||
this.dataset.title = this.getAttribute('title') || "";
|
||||
|
||||
/**
|
||||
* Lo, the youtube poster image! (aka the thumbnail, image placeholder, etc)
|
||||
*
|
||||
* See https://github.com/paulirish/lite-youtube-embed/blob/master/youtube-thumbnail-urls.md
|
||||
*/
|
||||
if (!this.style.backgroundImage) {
|
||||
this.style.backgroundImage = `url("https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg")`;
|
||||
this.upgradePosterImage();
|
||||
}
|
||||
|
||||
// Set up play button, and its visually hidden label
|
||||
if (!playBtnEl) {
|
||||
playBtnEl = document.createElement('button');
|
||||
playBtnEl.type = 'button';
|
||||
playBtnEl.classList.add('lty-playbtn');
|
||||
this.append(playBtnEl);
|
||||
}
|
||||
if (!playBtnEl.textContent) {
|
||||
const playBtnLabelEl = document.createElement('span');
|
||||
playBtnLabelEl.className = 'lyt-visually-hidden';
|
||||
playBtnLabelEl.textContent = this.playLabel;
|
||||
playBtnEl.append(playBtnLabelEl);
|
||||
}
|
||||
|
||||
this.addNoscriptIframe();
|
||||
|
||||
playBtnEl.removeAttribute('href');
|
||||
|
||||
// On hover (or tap), warm up the TCP connections we're (likely) about to use.
|
||||
this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {once: true});
|
||||
|
||||
// Once the user clicks, add the real iframe and drop our play button
|
||||
// TODO: In the future we could be like amp-youtube and silently swap in the iframe during idle time
|
||||
// We'd want to only do this for in-viewport or near-viewport ones: https://github.com/ampproject/amphtml/pull/5003
|
||||
this.addEventListener('click', this.activate);
|
||||
|
||||
// Chrome & Edge desktop have no problem with the basic YouTube Embed with ?autoplay=1
|
||||
// However Safari desktop and most/all mobile browsers do not successfully track the user gesture of clicking through the creation/loading of the iframe,
|
||||
// so they don't autoplay automatically. Instead we must load an additional 2 sequential JS files (1KB + 165KB) (un-br) for the YT Player API
|
||||
// TODO: Try loading the the YT API in parallel with our iframe and then attaching/playing it. #82
|
||||
this.needsYTApi = this.hasAttribute("js-api") || navigator.vendor.includes('Apple') || navigator.userAgent.includes('Mobi');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a <link rel={preload | preconnect} ...> to the head
|
||||
*/
|
||||
static addPrefetch(kind, url, as) {
|
||||
const linkEl = document.createElement('link');
|
||||
linkEl.rel = kind;
|
||||
linkEl.href = url;
|
||||
if (as) {
|
||||
linkEl.as = as;
|
||||
}
|
||||
document.head.append(linkEl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin pre-connecting to warm up the iframe load
|
||||
* Since the embed's network requests load within its iframe,
|
||||
* preload/prefetch'ing them outside the iframe will only cause double-downloads.
|
||||
* So, the best we can do is warm up a few connections to origins that are in the critical path.
|
||||
*
|
||||
* Maybe `<link rel=preload as=document>` would work, but it's unsupported: http://crbug.com/593267
|
||||
* But TBH, I don't think it'll happen soon with Site Isolation and split caches adding serious complexity.
|
||||
*/
|
||||
static warmConnections() {
|
||||
if (LiteYTEmbed.preconnected) return;
|
||||
|
||||
// The iframe document and most of its subresources come right off youtube.com
|
||||
LiteYTEmbed.addPrefetch('preconnect', 'https://www.youtube-nocookie.com');
|
||||
// The botguard script is fetched off from google.com
|
||||
LiteYTEmbed.addPrefetch('preconnect', 'https://www.google.com');
|
||||
|
||||
// Not certain if these ad related domains are in the critical path. Could verify with domain-specific throttling.
|
||||
LiteYTEmbed.addPrefetch('preconnect', 'https://googleads.g.doubleclick.net');
|
||||
LiteYTEmbed.addPrefetch('preconnect', 'https://static.doubleclick.net');
|
||||
|
||||
LiteYTEmbed.preconnected = true;
|
||||
}
|
||||
|
||||
fetchYTPlayerApi() {
|
||||
if (window.YT || (window.YT && window.YT.Player)) return;
|
||||
|
||||
this.ytApiPromise = new Promise((res, rej) => {
|
||||
var el = document.createElement('script');
|
||||
el.src = 'https://www.youtube.com/iframe_api';
|
||||
el.async = true;
|
||||
el.onload = _ => {
|
||||
YT.ready(res);
|
||||
};
|
||||
el.onerror = rej;
|
||||
this.append(el);
|
||||
});
|
||||
}
|
||||
|
||||
/** Return the YT Player API instance. (Public L-YT-E API) */
|
||||
async getYTPlayer() {
|
||||
if(!this.playerPromise) {
|
||||
await this.activate();
|
||||
}
|
||||
|
||||
return this.playerPromise;
|
||||
}
|
||||
|
||||
async addYTPlayerIframe() {
|
||||
this.fetchYTPlayerApi();
|
||||
await this.ytApiPromise;
|
||||
|
||||
const videoPlaceholderEl = document.createElement('div')
|
||||
this.append(videoPlaceholderEl);
|
||||
|
||||
const paramsObj = Object.fromEntries(this.getParams().entries());
|
||||
|
||||
this.playerPromise = new Promise(resolve => {
|
||||
let player = new YT.Player(videoPlaceholderEl, {
|
||||
width: '100%',
|
||||
videoId: this.videoId,
|
||||
playerVars: paramsObj,
|
||||
events: {
|
||||
'onReady': event => {
|
||||
event.target.playVideo();
|
||||
resolve(player);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Add the iframe within <noscript> for indexability discoverability. See https://github.com/paulirish/lite-youtube-embed/issues/105
|
||||
addNoscriptIframe() {
|
||||
const iframeEl = this.createBasicIframe();
|
||||
const noscriptEl = document.createElement('noscript');
|
||||
// Appending into noscript isn't equivalant for mysterious reasons: https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element
|
||||
noscriptEl.innerHTML = iframeEl.outerHTML;
|
||||
this.append(noscriptEl);
|
||||
}
|
||||
|
||||
getParams() {
|
||||
const params = new URLSearchParams(this.getAttribute('params') || []);
|
||||
params.append('autoplay', '1');
|
||||
params.append('playsinline', '1');
|
||||
return params;
|
||||
}
|
||||
|
||||
async activate(){
|
||||
if (this.classList.contains('lyt-activated')) return;
|
||||
this.classList.add('lyt-activated');
|
||||
|
||||
if (this.needsYTApi) {
|
||||
return this.addYTPlayerIframe(this.getParams());
|
||||
}
|
||||
|
||||
const iframeEl = this.createBasicIframe();
|
||||
this.append(iframeEl);
|
||||
|
||||
// Set focus for a11y
|
||||
iframeEl.focus();
|
||||
}
|
||||
|
||||
createBasicIframe(){
|
||||
const iframeEl = document.createElement('iframe');
|
||||
iframeEl.width = 560;
|
||||
iframeEl.height = 315;
|
||||
// No encoding necessary as [title] is safe. https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#:~:text=Safe%20HTML%20Attributes%20include
|
||||
iframeEl.title = this.playLabel;
|
||||
iframeEl.allow = 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture';
|
||||
iframeEl.allowFullscreen = true;
|
||||
// AFAIK, the encoding here isn't necessary for XSS, but we'll do it only because this is a URL
|
||||
// https://stackoverflow.com/q/64959723/89484
|
||||
iframeEl.src = `https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${this.getParams().toString()}`;
|
||||
return iframeEl;
|
||||
}
|
||||
|
||||
/**
|
||||
* In the spirit of the `lowsrc` attribute and progressive JPEGs, we'll upgrade the reliable
|
||||
* poster image to a higher resolution one, if it's available.
|
||||
* Interestingly this sddefault webp is often smaller in filesize, but we will still attempt it second
|
||||
* because getting _an_ image in front of the user if our first priority.
|
||||
*
|
||||
* See https://github.com/paulirish/lite-youtube-embed/blob/master/youtube-thumbnail-urls.md for more details
|
||||
*/
|
||||
upgradePosterImage() {
|
||||
// Defer to reduce network contention.
|
||||
setTimeout(() => {
|
||||
const webpUrl = `https://i.ytimg.com/vi_webp/${this.videoId}/sddefault.webp`;
|
||||
const img = new Image();
|
||||
img.fetchPriority = 'low'; // low priority to reduce network contention
|
||||
img.referrerpolicy = 'origin'; // Not 100% sure it's needed, but https://github.com/ampproject/amphtml/pull/3940
|
||||
img.src = webpUrl;
|
||||
img.onload = e => {
|
||||
// A pretty ugly hack since onerror won't fire on YouTube image 404. This is (probably) due to
|
||||
// Youtube's style of returning data even with a 404 status. That data is a 120x90 placeholder image.
|
||||
// … per "annoying yt 404 behavior" in the .md
|
||||
const noAvailablePoster = e.target.naturalHeight == 90 && e.target.naturalWidth == 120;
|
||||
if (noAvailablePoster) return;
|
||||
|
||||
this.style.backgroundImage = `url("${webpUrl}")`;
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
// Register custom element
|
||||
customElements.define('lite-youtube', LiteYTEmbed);
|
33
themes/blowfish/assets/lib/mermaid/Diagram.d.ts
vendored
Normal file
33
themes/blowfish/assets/lib/mermaid/Diagram.d.ts
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import type { DetailedError } from './utils.js';
|
||||
import type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js';
|
||||
export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;
|
||||
/**
|
||||
* An object representing a parsed mermaid diagram definition.
|
||||
* @privateRemarks This is exported as part of the public mermaidAPI.
|
||||
*/
|
||||
export declare class Diagram {
|
||||
text: string;
|
||||
metadata: Pick<DiagramMetadata, 'title'>;
|
||||
type: string;
|
||||
parser: DiagramDefinition['parser'];
|
||||
renderer: DiagramDefinition['renderer'];
|
||||
db: DiagramDefinition['db'];
|
||||
private init?;
|
||||
private detectError?;
|
||||
constructor(text: string, metadata?: Pick<DiagramMetadata, 'title'>);
|
||||
parse(): void;
|
||||
render(id: string, version: string): Promise<void>;
|
||||
getParser(): import("./diagram-api/types.js").ParserDefinition;
|
||||
getType(): string;
|
||||
}
|
||||
/**
|
||||
* Parse the text asynchronously and generate a Diagram object asynchronously.
|
||||
* **Warning:** This function may be changed in the future.
|
||||
* @alpha
|
||||
* @param text - The mermaid diagram definition.
|
||||
* @param metadata - Diagram metadata, defined in YAML.
|
||||
* @returns A the Promise of a Diagram object.
|
||||
* @throws {@link UnknownDiagramError} if the diagram type can not be found.
|
||||
* @privateRemarks This is exported as part of the public mermaidAPI.
|
||||
*/
|
||||
export declare const getDiagramFromText: (text: string, metadata?: Pick<DiagramMetadata, 'title'>) => Promise<Diagram>;
|
10
themes/blowfish/assets/lib/mermaid/Tableau10-31042135.js
Normal file
10
themes/blowfish/assets/lib/mermaid/Tableau10-31042135.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
function colors(specifier) {
|
||||
var n = specifier.length / 6 | 0, colors2 = new Array(n), i = 0;
|
||||
while (i < n)
|
||||
colors2[i] = "#" + specifier.slice(i * 6, ++i * 6);
|
||||
return colors2;
|
||||
}
|
||||
const d3schemeTableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
|
||||
export {
|
||||
d3schemeTableau10 as d
|
||||
};
|
9
themes/blowfish/assets/lib/mermaid/Tableau10-558cc280.js
Normal file
9
themes/blowfish/assets/lib/mermaid/Tableau10-558cc280.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
function o(e) {
|
||||
for (var c = e.length / 6 | 0, n = new Array(c), a = 0; a < c; )
|
||||
n[a] = "#" + e.slice(a * 6, ++a * 6);
|
||||
return n;
|
||||
}
|
||||
const r = o("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
|
||||
export {
|
||||
r as d
|
||||
};
|
13
themes/blowfish/assets/lib/mermaid/__mocks__/mermaidAPI.d.ts
vendored
Normal file
13
themes/blowfish/assets/lib/mermaid/__mocks__/mermaidAPI.d.ts
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
export declare const mermaidAPI: {
|
||||
render: import("@vitest/spy").Mock<any, any>;
|
||||
parse: (text: string, parseOptions?: import("../mermaidAPI.js").ParseOptions | undefined) => Promise<boolean>;
|
||||
initialize: import("@vitest/spy").Mock<any, any>;
|
||||
getConfig: () => import("../config.type.js").MermaidConfig;
|
||||
setConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig;
|
||||
getSiteConfig: () => import("../config.type.js").MermaidConfig;
|
||||
updateSiteConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig;
|
||||
reset: () => void;
|
||||
globalReset: () => void;
|
||||
defaultConfig: import("../config.type.js").MermaidConfig;
|
||||
};
|
||||
export default mermaidAPI;
|
27
themes/blowfish/assets/lib/mermaid/accessibility.d.ts
vendored
Normal file
27
themes/blowfish/assets/lib/mermaid/accessibility.d.ts
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* Accessibility (a11y) functions, types, helpers.
|
||||
*
|
||||
* @see https://www.w3.org/WAI/
|
||||
* @see https://www.w3.org/TR/wai-aria-1.1/
|
||||
* @see https://www.w3.org/TR/svg-aam-1.0/
|
||||
*/
|
||||
import type { D3Element } from './mermaidAPI.js';
|
||||
/**
|
||||
* Add role and aria-roledescription to the svg element.
|
||||
*
|
||||
* @param svg - d3 object that contains the SVG HTML element
|
||||
* @param diagramType - diagram name for to the aria-roledescription
|
||||
*/
|
||||
export declare function setA11yDiagramInfo(svg: D3Element, diagramType: string): void;
|
||||
/**
|
||||
* Add an accessible title and/or description element to a chart.
|
||||
* The title is usually not displayed and the description is never displayed.
|
||||
*
|
||||
* The following charts display their title as a visual and accessibility element: gantt.
|
||||
*
|
||||
* @param svg - d3 node to insert the a11y title and desc info
|
||||
* @param a11yTitle - a11y title. undefined or empty strings mean to skip them
|
||||
* @param a11yDesc - a11y description. undefined or empty strings mean to skip them
|
||||
* @param baseId - id used to construct the a11y title and description id
|
||||
*/
|
||||
export declare function addSVGa11yTitleDescription(svg: D3Element, a11yTitle: string | undefined, a11yDesc: string | undefined, baseId: string): void;
|
1
themes/blowfish/assets/lib/mermaid/accessibility.spec.d.ts
vendored
Normal file
1
themes/blowfish/assets/lib/mermaid/accessibility.spec.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
1705
themes/blowfish/assets/lib/mermaid/add-html-label-3fd8c466.js
Normal file
1705
themes/blowfish/assets/lib/mermaid/add-html-label-3fd8c466.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1145
themes/blowfish/assets/lib/mermaid/add-html-label-6e56ed67.js
Normal file
1145
themes/blowfish/assets/lib/mermaid/add-html-label-6e56ed67.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1145
themes/blowfish/assets/lib/mermaid/add-html-label-ce7f9292.js
Normal file
1145
themes/blowfish/assets/lib/mermaid/add-html-label-ce7f9292.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1705
themes/blowfish/assets/lib/mermaid/add-html-label-f3a0bd34.js
Normal file
1705
themes/blowfish/assets/lib/mermaid/add-html-label-f3a0bd34.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
85
themes/blowfish/assets/lib/mermaid/arc-1bd4335b.js
Normal file
85
themes/blowfish/assets/lib/mermaid/arc-1bd4335b.js
Normal file
|
@ -0,0 +1,85 @@
|
|||
import { c as Q, p as sn } from "./constant-2fe7eae5.js";
|
||||
import { J as en, K as X, N as I, O as rn, P as y, I as ln, Q as z, R as b, T as un, V as t, W as an, X as on, Y as tn } from "./utils-aa888deb.js";
|
||||
function fn(l) {
|
||||
return l.innerRadius;
|
||||
}
|
||||
function cn(l) {
|
||||
return l.outerRadius;
|
||||
}
|
||||
function yn(l) {
|
||||
return l.startAngle;
|
||||
}
|
||||
function gn(l) {
|
||||
return l.endAngle;
|
||||
}
|
||||
function mn(l) {
|
||||
return l && l.padAngle;
|
||||
}
|
||||
function pn(l, x, w, O, h, v, S, r) {
|
||||
var s = w - l, n = O - x, m = S - h, i = r - v, u = i * s - m * n;
|
||||
if (!(u * u < y))
|
||||
return u = (m * (x - v) - i * (l - h)) / u, [l + u * s, x + u * n];
|
||||
}
|
||||
function H(l, x, w, O, h, v, S) {
|
||||
var r = l - w, s = x - O, n = (S ? v : -v) / z(r * r + s * s), m = n * s, i = -n * r, u = l + m, f = x + i, c = w + m, D = O + i, o = (u + c) / 2, E = (f + D) / 2, p = c - u, g = D - f, R = p * p + g * g, J = h - v, P = u * D - c * f, K = (g < 0 ? -1 : 1) * z(tn(0, J * J * R - P * P)), N = (P * g - p * K) / R, d = (-P * p - g * K) / R, A = (P * g + p * K) / R, T = (-P * p + g * K) / R, e = N - o, a = d - E, V = A - o, W = T - E;
|
||||
return e * e + a * a > V * V + W * W && (N = A, d = T), {
|
||||
cx: N,
|
||||
cy: d,
|
||||
x01: -m,
|
||||
y01: -i,
|
||||
x11: N * (h / J - 1),
|
||||
y11: d * (h / J - 1)
|
||||
};
|
||||
}
|
||||
function hn() {
|
||||
var l = fn, x = cn, w = Q(0), O = null, h = yn, v = gn, S = mn, r = null;
|
||||
function s() {
|
||||
var n, m, i = +l.apply(this, arguments), u = +x.apply(this, arguments), f = h.apply(this, arguments) - rn, c = v.apply(this, arguments) - rn, D = un(c - f), o = c > f;
|
||||
if (r || (r = n = sn()), u < i && (m = u, u = i, i = m), !(u > y))
|
||||
r.moveTo(0, 0);
|
||||
else if (D > ln - y)
|
||||
r.moveTo(u * X(f), u * I(f)), r.arc(0, 0, u, f, c, !o), i > y && (r.moveTo(i * X(c), i * I(c)), r.arc(0, 0, i, c, f, o));
|
||||
else {
|
||||
var E = f, p = c, g = f, R = c, J = D, P = D, K = S.apply(this, arguments) / 2, N = K > y && (O ? +O.apply(this, arguments) : z(i * i + u * u)), d = b(un(u - i) / 2, +w.apply(this, arguments)), A = d, T = d, e, a;
|
||||
if (N > y) {
|
||||
var V = an(N / i * I(K)), W = an(N / u * I(K));
|
||||
(J -= V * 2) > y ? (V *= o ? 1 : -1, g += V, R -= V) : (J = 0, g = R = (f + c) / 2), (P -= W * 2) > y ? (W *= o ? 1 : -1, E += W, p -= W) : (P = 0, E = p = (f + c) / 2);
|
||||
}
|
||||
var Y = u * X(E), j = u * I(E), B = i * X(R), C = i * I(R);
|
||||
if (d > y) {
|
||||
var F = u * X(p), G = u * I(p), L = i * X(g), M = i * I(g), q;
|
||||
if (D < en && (q = pn(Y, j, L, M, F, G, B, C))) {
|
||||
var U = Y - q[0], Z = j - q[1], $ = F - q[0], k = G - q[1], _ = 1 / I(on((U * $ + Z * k) / (z(U * U + Z * Z) * z($ * $ + k * k))) / 2), nn = z(q[0] * q[0] + q[1] * q[1]);
|
||||
A = b(d, (i - nn) / (_ - 1)), T = b(d, (u - nn) / (_ + 1));
|
||||
}
|
||||
}
|
||||
P > y ? T > y ? (e = H(L, M, Y, j, u, T, o), a = H(F, G, B, C, u, T, o), r.moveTo(e.cx + e.x01, e.cy + e.y01), T < d ? r.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(a.y01, a.x01), !o) : (r.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, u, t(e.cy + e.y11, e.cx + e.x11), t(a.cy + a.y11, a.cx + a.x11), !o), r.arc(a.cx, a.cy, T, t(a.y11, a.x11), t(a.y01, a.x01), !o))) : (r.moveTo(Y, j), r.arc(0, 0, u, E, p, !o)) : r.moveTo(Y, j), !(i > y) || !(J > y) ? r.lineTo(B, C) : A > y ? (e = H(B, C, F, G, i, -A, o), a = H(Y, j, L, M, i, -A, o), r.lineTo(e.cx + e.x01, e.cy + e.y01), A < d ? r.arc(e.cx, e.cy, A, t(e.y01, e.x01), t(a.y01, a.x01), !o) : (r.arc(e.cx, e.cy, A, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, i, t(e.cy + e.y11, e.cx + e.x11), t(a.cy + a.y11, a.cx + a.x11), o), r.arc(a.cx, a.cy, A, t(a.y11, a.x11), t(a.y01, a.x01), !o))) : r.arc(0, 0, i, R, g, o);
|
||||
}
|
||||
if (r.closePath(), n)
|
||||
return r = null, n + "" || null;
|
||||
}
|
||||
return s.centroid = function() {
|
||||
var n = (+l.apply(this, arguments) + +x.apply(this, arguments)) / 2, m = (+h.apply(this, arguments) + +v.apply(this, arguments)) / 2 - en / 2;
|
||||
return [X(m) * n, I(m) * n];
|
||||
}, s.innerRadius = function(n) {
|
||||
return arguments.length ? (l = typeof n == "function" ? n : Q(+n), s) : l;
|
||||
}, s.outerRadius = function(n) {
|
||||
return arguments.length ? (x = typeof n == "function" ? n : Q(+n), s) : x;
|
||||
}, s.cornerRadius = function(n) {
|
||||
return arguments.length ? (w = typeof n == "function" ? n : Q(+n), s) : w;
|
||||
}, s.padRadius = function(n) {
|
||||
return arguments.length ? (O = n == null ? null : typeof n == "function" ? n : Q(+n), s) : O;
|
||||
}, s.startAngle = function(n) {
|
||||
return arguments.length ? (h = typeof n == "function" ? n : Q(+n), s) : h;
|
||||
}, s.endAngle = function(n) {
|
||||
return arguments.length ? (v = typeof n == "function" ? n : Q(+n), s) : v;
|
||||
}, s.padAngle = function(n) {
|
||||
return arguments.length ? (S = typeof n == "function" ? n : Q(+n), s) : S;
|
||||
}, s.context = function(n) {
|
||||
return arguments.length ? (r = n ?? null, s) : r;
|
||||
}, s;
|
||||
}
|
||||
export {
|
||||
hn as d
|
||||
};
|
||||
//# sourceMappingURL=arc-1bd4335b.js.map
|
1
themes/blowfish/assets/lib/mermaid/arc-1bd4335b.js.map
Normal file
1
themes/blowfish/assets/lib/mermaid/arc-1bd4335b.js.map
Normal file
File diff suppressed because one or more lines are too long
86
themes/blowfish/assets/lib/mermaid/arc-5a3dc2ef.js
Normal file
86
themes/blowfish/assets/lib/mermaid/arc-5a3dc2ef.js
Normal file
|
@ -0,0 +1,86 @@
|
|||
import { w as ln, c as H } from "./path-428ebac9.js";
|
||||
import { aw as an, ax as V, ay as D, az as rn, aA as y, V as on, aB as K, aC as _, aD as un, aE as t, aF as sn, aG as tn, aH as fn } from "./mermaid-00886c59.js";
|
||||
function cn(l) {
|
||||
return l.innerRadius;
|
||||
}
|
||||
function yn(l) {
|
||||
return l.outerRadius;
|
||||
}
|
||||
function gn(l) {
|
||||
return l.startAngle;
|
||||
}
|
||||
function mn(l) {
|
||||
return l.endAngle;
|
||||
}
|
||||
function pn(l) {
|
||||
return l && l.padAngle;
|
||||
}
|
||||
function dn(l, h, z, E, v, A, I, a) {
|
||||
var B = z - l, i = E - h, n = I - v, m = a - A, r = m * B - n * i;
|
||||
if (!(r * r < y))
|
||||
return r = (n * (h - A) - m * (l - v)) / r, [l + r * B, h + r * i];
|
||||
}
|
||||
function W(l, h, z, E, v, A, I) {
|
||||
var a = l - z, B = h - E, i = (I ? A : -A) / K(a * a + B * B), n = i * B, m = -i * a, r = l + n, s = h + m, f = z + n, c = E + m, O = (r + f) / 2, o = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, T = v - A, w = r * c - f * s, C = (g < 0 ? -1 : 1) * K(fn(0, T * T * R - w * w)), F = (w * g - p * C) / R, G = (-w * p - g * C) / R, P = (w * g + p * C) / R, d = (-w * p + g * C) / R, x = F - O, e = G - o, u = P - O, S = d - o;
|
||||
return x * x + e * e > u * u + S * S && (F = P, G = d), {
|
||||
cx: F,
|
||||
cy: G,
|
||||
x01: -n,
|
||||
y01: -m,
|
||||
x11: F * (v / T - 1),
|
||||
y11: G * (v / T - 1)
|
||||
};
|
||||
}
|
||||
function vn() {
|
||||
var l = cn, h = yn, z = H(0), E = null, v = gn, A = mn, I = pn, a = null, B = ln(i);
|
||||
function i() {
|
||||
var n, m, r = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - rn, c = A.apply(this, arguments) - rn, O = un(c - f), o = c > f;
|
||||
if (a || (a = n = B()), s < r && (m = s, s = r, r = m), !(s > y))
|
||||
a.moveTo(0, 0);
|
||||
else if (O > on - y)
|
||||
a.moveTo(s * V(f), s * D(f)), a.arc(0, 0, s, f, c, !o), r > y && (a.moveTo(r * V(c), r * D(c)), a.arc(0, 0, r, c, f, o));
|
||||
else {
|
||||
var p = f, g = c, R = f, T = c, w = O, C = O, F = I.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : K(r * r + s * s)), P = _(un(s - r) / 2, +z.apply(this, arguments)), d = P, x = P, e, u;
|
||||
if (G > y) {
|
||||
var S = sn(G / r * D(F)), L = sn(G / s * D(F));
|
||||
(w -= S * 2) > y ? (S *= o ? 1 : -1, R += S, T -= S) : (w = 0, R = T = (f + c) / 2), (C -= L * 2) > y ? (L *= o ? 1 : -1, p += L, g -= L) : (C = 0, p = g = (f + c) / 2);
|
||||
}
|
||||
var j = s * V(p), J = s * D(p), M = r * V(T), N = r * D(T);
|
||||
if (P > y) {
|
||||
var Q = s * V(g), U = s * D(g), X = r * V(R), Y = r * D(R), q;
|
||||
if (O < an)
|
||||
if (q = dn(j, J, X, Y, Q, U, M, N)) {
|
||||
var Z = j - q[0], $ = J - q[1], k = Q - q[0], b = U - q[1], nn = 1 / D(tn((Z * k + $ * b) / (K(Z * Z + $ * $) * K(k * k + b * b))) / 2), en = K(q[0] * q[0] + q[1] * q[1]);
|
||||
d = _(P, (r - en) / (nn - 1)), x = _(P, (s - en) / (nn + 1));
|
||||
} else
|
||||
d = x = 0;
|
||||
}
|
||||
C > y ? x > y ? (e = W(X, Y, j, J, s, x, o), u = W(Q, U, M, N, s, x, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < P ? a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), a.arc(u.cx, u.cy, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(j, J), a.arc(0, 0, s, p, g, !o)) : a.moveTo(j, J), !(r > y) || !(w > y) ? a.lineTo(M, N) : d > y ? (e = W(M, N, Q, U, r, -d, o), u = W(j, J, X, Y, r, -d, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), d < P ? a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, r, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), a.arc(u.cx, u.cy, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, r, T, R, o);
|
||||
}
|
||||
if (a.closePath(), n)
|
||||
return a = null, n + "" || null;
|
||||
}
|
||||
return i.centroid = function() {
|
||||
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
|
||||
return [V(m) * n, D(m) * n];
|
||||
}, i.innerRadius = function(n) {
|
||||
return arguments.length ? (l = typeof n == "function" ? n : H(+n), i) : l;
|
||||
}, i.outerRadius = function(n) {
|
||||
return arguments.length ? (h = typeof n == "function" ? n : H(+n), i) : h;
|
||||
}, i.cornerRadius = function(n) {
|
||||
return arguments.length ? (z = typeof n == "function" ? n : H(+n), i) : z;
|
||||
}, i.padRadius = function(n) {
|
||||
return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : H(+n), i) : E;
|
||||
}, i.startAngle = function(n) {
|
||||
return arguments.length ? (v = typeof n == "function" ? n : H(+n), i) : v;
|
||||
}, i.endAngle = function(n) {
|
||||
return arguments.length ? (A = typeof n == "function" ? n : H(+n), i) : A;
|
||||
}, i.padAngle = function(n) {
|
||||
return arguments.length ? (I = typeof n == "function" ? n : H(+n), i) : I;
|
||||
}, i.context = function(n) {
|
||||
return arguments.length ? (a = n ?? null, i) : a;
|
||||
}, i;
|
||||
}
|
||||
export {
|
||||
vn as d
|
||||
};
|
148
themes/blowfish/assets/lib/mermaid/arc-5aa99581.js
Normal file
148
themes/blowfish/assets/lib/mermaid/arc-5aa99581.js
Normal file
|
@ -0,0 +1,148 @@
|
|||
import { w as withPath, c as constant } from "./path-39bad7e2.js";
|
||||
import { aw as pi, ax as cos, ay as sin, az as halfPi, aA as epsilon, V as tau, aB as sqrt, aC as min, aD as abs, aE as atan2, aF as asin, aG as acos, aH as max } from "./mermaid-c5809711.js";
|
||||
function arcInnerRadius(d) {
|
||||
return d.innerRadius;
|
||||
}
|
||||
function arcOuterRadius(d) {
|
||||
return d.outerRadius;
|
||||
}
|
||||
function arcStartAngle(d) {
|
||||
return d.startAngle;
|
||||
}
|
||||
function arcEndAngle(d) {
|
||||
return d.endAngle;
|
||||
}
|
||||
function arcPadAngle(d) {
|
||||
return d && d.padAngle;
|
||||
}
|
||||
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
||||
var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10;
|
||||
if (t * t < epsilon)
|
||||
return;
|
||||
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
||||
return [x0 + t * x10, y0 + t * y10];
|
||||
}
|
||||
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
||||
var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
|
||||
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
|
||||
cx0 = cx1, cy0 = cy1;
|
||||
return {
|
||||
cx: cx0,
|
||||
cy: cy0,
|
||||
x01: -ox,
|
||||
y01: -oy,
|
||||
x11: cx0 * (r1 / r - 1),
|
||||
y11: cy0 * (r1 / r - 1)
|
||||
};
|
||||
}
|
||||
function d3arc() {
|
||||
var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path = withPath(arc);
|
||||
function arc() {
|
||||
var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0;
|
||||
if (!context)
|
||||
context = buffer = path();
|
||||
if (r1 < r0)
|
||||
r = r1, r1 = r0, r0 = r;
|
||||
if (!(r1 > epsilon))
|
||||
context.moveTo(0, 0);
|
||||
else if (da > tau - epsilon) {
|
||||
context.moveTo(r1 * cos(a0), r1 * sin(a0));
|
||||
context.arc(0, 0, r1, a0, a1, !cw);
|
||||
if (r0 > epsilon) {
|
||||
context.moveTo(r0 * cos(a1), r0 * sin(a1));
|
||||
context.arc(0, 0, r0, a1, a0, cw);
|
||||
}
|
||||
} else {
|
||||
var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1;
|
||||
if (rp > epsilon) {
|
||||
var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
|
||||
if ((da0 -= p0 * 2) > epsilon)
|
||||
p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
|
||||
else
|
||||
da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
||||
if ((da1 -= p1 * 2) > epsilon)
|
||||
p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
|
||||
else
|
||||
da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
||||
}
|
||||
var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
|
||||
if (rc > epsilon) {
|
||||
var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
|
||||
if (da < pi) {
|
||||
if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
|
||||
var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
||||
rc0 = min(rc, (r0 - lc) / (kc - 1));
|
||||
rc1 = min(rc, (r1 - lc) / (kc + 1));
|
||||
} else {
|
||||
rc0 = rc1 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(da1 > epsilon))
|
||||
context.moveTo(x01, y01);
|
||||
else if (rc1 > epsilon) {
|
||||
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
||||
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
||||
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
if (rc1 < rc)
|
||||
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
|
||||
context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
} else
|
||||
context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
|
||||
if (!(r0 > epsilon) || !(da0 > epsilon))
|
||||
context.lineTo(x10, y10);
|
||||
else if (rc0 > epsilon) {
|
||||
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
||||
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
||||
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
if (rc0 < rc)
|
||||
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
|
||||
context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
} else
|
||||
context.arc(0, 0, r0, a10, a00, cw);
|
||||
}
|
||||
context.closePath();
|
||||
if (buffer)
|
||||
return context = null, buffer + "" || null;
|
||||
}
|
||||
arc.centroid = function() {
|
||||
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
|
||||
return [cos(a) * r, sin(a) * r];
|
||||
};
|
||||
arc.innerRadius = function(_) {
|
||||
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
||||
};
|
||||
arc.outerRadius = function(_) {
|
||||
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
||||
};
|
||||
arc.cornerRadius = function(_) {
|
||||
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
||||
};
|
||||
arc.padRadius = function(_) {
|
||||
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
||||
};
|
||||
arc.startAngle = function(_) {
|
||||
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
||||
};
|
||||
arc.endAngle = function(_) {
|
||||
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
||||
};
|
||||
arc.padAngle = function(_) {
|
||||
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
||||
};
|
||||
arc.context = function(_) {
|
||||
return arguments.length ? (context = _ == null ? null : _, arc) : context;
|
||||
};
|
||||
return arc;
|
||||
}
|
||||
export {
|
||||
d3arc as d
|
||||
};
|
145
themes/blowfish/assets/lib/mermaid/arc-7c943a40.js
Normal file
145
themes/blowfish/assets/lib/mermaid/arc-7c943a40.js
Normal file
|
@ -0,0 +1,145 @@
|
|||
import { c as constant, p as path } from "./constant-b644328d.js";
|
||||
import { J as pi, K as cos, N as sin, O as halfPi, P as epsilon, I as tau, Q as sqrt, R as min, T as abs, V as atan2, W as asin, X as acos, Y as max } from "./utils-872dfc50.js";
|
||||
function arcInnerRadius(d) {
|
||||
return d.innerRadius;
|
||||
}
|
||||
function arcOuterRadius(d) {
|
||||
return d.outerRadius;
|
||||
}
|
||||
function arcStartAngle(d) {
|
||||
return d.startAngle;
|
||||
}
|
||||
function arcEndAngle(d) {
|
||||
return d.endAngle;
|
||||
}
|
||||
function arcPadAngle(d) {
|
||||
return d && d.padAngle;
|
||||
}
|
||||
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
||||
var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10;
|
||||
if (t * t < epsilon)
|
||||
return;
|
||||
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
||||
return [x0 + t * x10, y0 + t * y10];
|
||||
}
|
||||
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
||||
var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
|
||||
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
|
||||
cx0 = cx1, cy0 = cy1;
|
||||
return {
|
||||
cx: cx0,
|
||||
cy: cy0,
|
||||
x01: -ox,
|
||||
y01: -oy,
|
||||
x11: cx0 * (r1 / r - 1),
|
||||
y11: cy0 * (r1 / r - 1)
|
||||
};
|
||||
}
|
||||
function d3arc() {
|
||||
var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null;
|
||||
function arc() {
|
||||
var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0;
|
||||
if (!context)
|
||||
context = buffer = path();
|
||||
if (r1 < r0)
|
||||
r = r1, r1 = r0, r0 = r;
|
||||
if (!(r1 > epsilon))
|
||||
context.moveTo(0, 0);
|
||||
else if (da > tau - epsilon) {
|
||||
context.moveTo(r1 * cos(a0), r1 * sin(a0));
|
||||
context.arc(0, 0, r1, a0, a1, !cw);
|
||||
if (r0 > epsilon) {
|
||||
context.moveTo(r0 * cos(a1), r0 * sin(a1));
|
||||
context.arc(0, 0, r0, a1, a0, cw);
|
||||
}
|
||||
} else {
|
||||
var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1;
|
||||
if (rp > epsilon) {
|
||||
var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
|
||||
if ((da0 -= p0 * 2) > epsilon)
|
||||
p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
|
||||
else
|
||||
da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
||||
if ((da1 -= p1 * 2) > epsilon)
|
||||
p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
|
||||
else
|
||||
da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
||||
}
|
||||
var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
|
||||
if (rc > epsilon) {
|
||||
var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
|
||||
if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {
|
||||
var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
||||
rc0 = min(rc, (r0 - lc) / (kc - 1));
|
||||
rc1 = min(rc, (r1 - lc) / (kc + 1));
|
||||
}
|
||||
}
|
||||
if (!(da1 > epsilon))
|
||||
context.moveTo(x01, y01);
|
||||
else if (rc1 > epsilon) {
|
||||
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
||||
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
||||
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
if (rc1 < rc)
|
||||
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
|
||||
context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
} else
|
||||
context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
|
||||
if (!(r0 > epsilon) || !(da0 > epsilon))
|
||||
context.lineTo(x10, y10);
|
||||
else if (rc0 > epsilon) {
|
||||
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
||||
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
||||
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
if (rc0 < rc)
|
||||
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
|
||||
context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
} else
|
||||
context.arc(0, 0, r0, a10, a00, cw);
|
||||
}
|
||||
context.closePath();
|
||||
if (buffer)
|
||||
return context = null, buffer + "" || null;
|
||||
}
|
||||
arc.centroid = function() {
|
||||
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
|
||||
return [cos(a) * r, sin(a) * r];
|
||||
};
|
||||
arc.innerRadius = function(_) {
|
||||
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
||||
};
|
||||
arc.outerRadius = function(_) {
|
||||
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
||||
};
|
||||
arc.cornerRadius = function(_) {
|
||||
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
||||
};
|
||||
arc.padRadius = function(_) {
|
||||
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
||||
};
|
||||
arc.startAngle = function(_) {
|
||||
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
||||
};
|
||||
arc.endAngle = function(_) {
|
||||
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
||||
};
|
||||
arc.padAngle = function(_) {
|
||||
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
||||
};
|
||||
arc.context = function(_) {
|
||||
return arguments.length ? (context = _ == null ? null : _, arc) : context;
|
||||
};
|
||||
return arc;
|
||||
}
|
||||
export {
|
||||
d3arc as d
|
||||
};
|
||||
//# sourceMappingURL=arc-7c943a40.js.map
|
1
themes/blowfish/assets/lib/mermaid/arc-7c943a40.js.map
Normal file
1
themes/blowfish/assets/lib/mermaid/arc-7c943a40.js.map
Normal file
File diff suppressed because one or more lines are too long
6
themes/blowfish/assets/lib/mermaid/array-2ff2c7a6.js
Normal file
6
themes/blowfish/assets/lib/mermaid/array-2ff2c7a6.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
function t(r) {
|
||||
return typeof r == "object" && "length" in r ? r : Array.from(r);
|
||||
}
|
||||
export {
|
||||
t as a
|
||||
};
|
1
themes/blowfish/assets/lib/mermaid/array-2ff2c7a6.js.map
Normal file
1
themes/blowfish/assets/lib/mermaid/array-2ff2c7a6.js.map
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"array-2ff2c7a6.js","sources":["../../../node_modules/.pnpm/d3-shape@3.1.0/node_modules/d3-shape/src/array.js"],"sourcesContent":["export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":["array","x"],"mappings":"AAEe,SAAQA,EAACC,GAAG;AACzB,SAAO,OAAOA,KAAM,YAAY,YAAYA,IACxCA,IACA,MAAM,KAAKA,CAAC;AAClB;"}
|
6
themes/blowfish/assets/lib/mermaid/array-b7dcf730.js
Normal file
6
themes/blowfish/assets/lib/mermaid/array-b7dcf730.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
function array(x) {
|
||||
return typeof x === "object" && "length" in x ? x : Array.from(x);
|
||||
}
|
||||
export {
|
||||
array as a
|
||||
};
|
1
themes/blowfish/assets/lib/mermaid/array-b7dcf730.js.map
Normal file
1
themes/blowfish/assets/lib/mermaid/array-b7dcf730.js.map
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"array-b7dcf730.js","sources":["../../../node_modules/.pnpm/d3-shape@3.1.0/node_modules/d3-shape/src/array.js"],"sourcesContent":["export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n"],"names":[],"mappings":"AAEe,SAAQ,MAAC,GAAG;AACzB,SAAO,OAAO,MAAM,YAAY,YAAY,IACxC,IACA,MAAM,KAAK,CAAC;AAClB;"}
|
30
themes/blowfish/assets/lib/mermaid/assignWithDepth.d.ts
vendored
Normal file
30
themes/blowfish/assets/lib/mermaid/assignWithDepth.d.ts
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* assignWithDepth Extends the functionality of {@link Object.assign} with the
|
||||
* ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)
|
||||
* performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of
|
||||
* undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to `{}` and
|
||||
* effectively merged with src[`k`]<p> Additionally, dissimilar types will not clobber unless the
|
||||
* config.clobber parameter === true. Example:
|
||||
*
|
||||
* ```
|
||||
* const config_0 = { foo: { bar: 'bar' }, bar: 'foo' };
|
||||
* const config_1 = { foo: 'foo', bar: 'bar' };
|
||||
* const result = assignWithDepth(config_0, config_1);
|
||||
* console.log(result);
|
||||
* //-> result: { foo: { bar: 'bar' }, bar: 'bar' }
|
||||
* ```
|
||||
*
|
||||
* Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a
|
||||
* destructured array of objects and dst is not an array, assignWithDepth will apply each element
|
||||
* of src to dst in order.
|
||||
* @param dst - The destination of the merge
|
||||
* @param src - The source object(s) to merge into destination
|
||||
* @param config -
|
||||
* * depth: depth to traverse within src and dst for merging
|
||||
* * clobber: should dissimilar types clobber
|
||||
*/
|
||||
declare const assignWithDepth: (dst: any, src: any, { depth, clobber }?: {
|
||||
depth?: number | undefined;
|
||||
clobber?: boolean | undefined;
|
||||
}) => any;
|
||||
export default assignWithDepth;
|
1230
themes/blowfish/assets/lib/mermaid/blockDiagram-48276afd.js
Normal file
1230
themes/blowfish/assets/lib/mermaid/blockDiagram-48276afd.js
Normal file
File diff suppressed because it is too large
Load diff
1813
themes/blowfish/assets/lib/mermaid/blockDiagram-8beecd1f.js
Normal file
1813
themes/blowfish/assets/lib/mermaid/blockDiagram-8beecd1f.js
Normal file
File diff suppressed because it is too large
Load diff
1817
themes/blowfish/assets/lib/mermaid/blockDiagram-91b80b7a.js
Normal file
1817
themes/blowfish/assets/lib/mermaid/blockDiagram-91b80b7a.js
Normal file
File diff suppressed because it is too large
Load diff
2538
themes/blowfish/assets/lib/mermaid/c4Diagram-03ae1c00.js
Normal file
2538
themes/blowfish/assets/lib/mermaid/c4Diagram-03ae1c00.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2530
themes/blowfish/assets/lib/mermaid/c4Diagram-8889d224.js
Normal file
2530
themes/blowfish/assets/lib/mermaid/c4Diagram-8889d224.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue