From 2f227b63c2dbefae671eb5d779ae32f5b7c74f47 Mon Sep 17 00:00:00 2001 From: WncFht <2130212584@qq.com> Date: Tue, 7 Jan 2025 15:32:11 +0800 Subject: [PATCH] update yml --- docs/{Tools => }/about.md | 0 .../assets/github/github-dark.png | Bin .../assets/github/github-light.png | Bin {overrides => docs}/assets/images/WeChat.jpg | Bin {overrides => docs}/assets/images/avatar.jpg | Bin .../assets/images/home/dark.jpg | Bin .../assets/images/home/light.jpg | Bin {overrides => docs}/assets/images/pdf.svg | 0 {overrides => docs}/assets/images/qq.jpg | Bin {overrides => docs}/css/card.css | 0 {overrides => docs}/css/cards/base.css | 0 {overrides => docs}/css/cards/cards.css | 0 {overrides => docs}/css/changelog_extra.css | 0 {overrides => docs}/css/custom.css | 0 {overrides => docs}/css/extra.css | 0 {overrides => docs}/css/flink.css | 35 +++++ {overrides => docs}/css/fold_toc.css | 0 {overrides => docs}/css/giscus.css | 0 {overrides => docs}/css/grid cards.css | 0 {overrides => docs}/css/tasklist.css | 0 {overrides => docs}/js/katex.js | 0 {overrides => docs}/js/mathjax.js | 0 {overrides => docs}/js/scheme.js | 14 ++ {overrides => docs}/js/tablesort.js | 5 + {overrides => docs}/js/toc.js | 0 mkdocs.yml | 120 ++++++++++++++---- overrides/assets/cards/index.c9fa2768.css | 1 - overrides/assets/cards/index.caca6175.js | 22 ---- 28 files changed, 147 insertions(+), 50 deletions(-) rename docs/{Tools => }/about.md (100%) rename {overrides => docs}/assets/github/github-dark.png (100%) rename {overrides => docs}/assets/github/github-light.png (100%) rename {overrides => docs}/assets/images/WeChat.jpg (100%) rename {overrides => docs}/assets/images/avatar.jpg (100%) rename {overrides => docs}/assets/images/home/dark.jpg (100%) rename {overrides => docs}/assets/images/home/light.jpg (100%) rename {overrides => docs}/assets/images/pdf.svg (100%) rename {overrides => docs}/assets/images/qq.jpg (100%) rename {overrides => docs}/css/card.css (100%) rename {overrides => docs}/css/cards/base.css (100%) rename {overrides => docs}/css/cards/cards.css (100%) rename {overrides => docs}/css/changelog_extra.css (100%) rename {overrides => docs}/css/custom.css (100%) rename {overrides => docs}/css/extra.css (100%) rename {overrides => docs}/css/flink.css (58%) rename {overrides => docs}/css/fold_toc.css (100%) rename {overrides => docs}/css/giscus.css (100%) rename {overrides => docs}/css/grid cards.css (100%) rename {overrides => docs}/css/tasklist.css (100%) rename {overrides => docs}/js/katex.js (100%) rename {overrides => docs}/js/mathjax.js (100%) rename {overrides => docs}/js/scheme.js (79%) rename {overrides => docs}/js/tablesort.js (54%) rename {overrides => docs}/js/toc.js (100%) delete mode 100644 overrides/assets/cards/index.c9fa2768.css delete mode 100644 overrides/assets/cards/index.caca6175.js diff --git a/docs/Tools/about.md b/docs/about.md similarity index 100% rename from docs/Tools/about.md rename to docs/about.md diff --git a/overrides/assets/github/github-dark.png b/docs/assets/github/github-dark.png similarity index 100% rename from overrides/assets/github/github-dark.png rename to docs/assets/github/github-dark.png diff --git a/overrides/assets/github/github-light.png b/docs/assets/github/github-light.png similarity index 100% rename from overrides/assets/github/github-light.png rename to docs/assets/github/github-light.png diff --git a/overrides/assets/images/WeChat.jpg b/docs/assets/images/WeChat.jpg similarity index 100% rename from overrides/assets/images/WeChat.jpg rename to docs/assets/images/WeChat.jpg diff --git a/overrides/assets/images/avatar.jpg b/docs/assets/images/avatar.jpg similarity index 100% rename from overrides/assets/images/avatar.jpg rename to docs/assets/images/avatar.jpg diff --git a/overrides/assets/images/home/dark.jpg b/docs/assets/images/home/dark.jpg similarity index 100% rename from overrides/assets/images/home/dark.jpg rename to docs/assets/images/home/dark.jpg diff --git a/overrides/assets/images/home/light.jpg b/docs/assets/images/home/light.jpg similarity index 100% rename from overrides/assets/images/home/light.jpg rename to docs/assets/images/home/light.jpg diff --git a/overrides/assets/images/pdf.svg b/docs/assets/images/pdf.svg similarity index 100% rename from overrides/assets/images/pdf.svg rename to docs/assets/images/pdf.svg diff --git a/overrides/assets/images/qq.jpg b/docs/assets/images/qq.jpg similarity index 100% rename from overrides/assets/images/qq.jpg rename to docs/assets/images/qq.jpg diff --git a/overrides/css/card.css b/docs/css/card.css similarity index 100% rename from overrides/css/card.css rename to docs/css/card.css diff --git a/overrides/css/cards/base.css b/docs/css/cards/base.css similarity index 100% rename from overrides/css/cards/base.css rename to docs/css/cards/base.css diff --git a/overrides/css/cards/cards.css b/docs/css/cards/cards.css similarity index 100% rename from overrides/css/cards/cards.css rename to docs/css/cards/cards.css diff --git a/overrides/css/changelog_extra.css b/docs/css/changelog_extra.css similarity index 100% rename from overrides/css/changelog_extra.css rename to docs/css/changelog_extra.css diff --git a/overrides/css/custom.css b/docs/css/custom.css similarity index 100% rename from overrides/css/custom.css rename to docs/css/custom.css diff --git a/overrides/css/extra.css b/docs/css/extra.css similarity index 100% rename from overrides/css/extra.css rename to docs/css/extra.css diff --git a/overrides/css/flink.css b/docs/css/flink.css similarity index 58% rename from overrides/css/flink.css rename to docs/css/flink.css index 3ff43b7d..08f842dd 100644 --- a/overrides/css/flink.css +++ b/docs/css/flink.css @@ -1,3 +1,38 @@ +/* + * Styles for the flink list and its items. + * + * .flink-list: + * - Enables auto overflow and centers text. + * - Adds padding around the list. + * + * .flink-list a: + * - Sets the default link color. + * + * [data-md-color-scheme="slate"] .flink-list a: + * - Changes link color for the "slate" color scheme. + * + * .flink-list-item: + * - Positions items relatively and floats them to the left. + * - Adds margin, width, height, and border-radius. + * - Sets line-height and applies transform and transition effects. + * - Changes background color on hover. + * + * .flink-item-icon: + * - Floats the icon to the left and adds margin. + * - Sets width, height, and border-radius. + * + * .flink-item-name: + * - Adds padding and sets height. + * - Makes the font bold and increases font size. + * + * .flink-item-desc: + * - Adds padding and sets height. + * - Sets font size. + * + * Media Queries: + * - Adjusts the width of .flink-list-item based on screen width. + * - Breakpoints at 1310px, 1219px, 1027px, 959px, and 692px. + */ .flink-list { overflow: auto; padding: 10px 10px 0; diff --git a/overrides/css/fold_toc.css b/docs/css/fold_toc.css similarity index 100% rename from overrides/css/fold_toc.css rename to docs/css/fold_toc.css diff --git a/overrides/css/giscus.css b/docs/css/giscus.css similarity index 100% rename from overrides/css/giscus.css rename to docs/css/giscus.css diff --git a/overrides/css/grid cards.css b/docs/css/grid cards.css similarity index 100% rename from overrides/css/grid cards.css rename to docs/css/grid cards.css diff --git a/overrides/css/tasklist.css b/docs/css/tasklist.css similarity index 100% rename from overrides/css/tasklist.css rename to docs/css/tasklist.css diff --git a/overrides/js/katex.js b/docs/js/katex.js similarity index 100% rename from overrides/js/katex.js rename to docs/js/katex.js diff --git a/overrides/js/mathjax.js b/docs/js/mathjax.js similarity index 100% rename from overrides/js/mathjax.js rename to docs/js/mathjax.js diff --git a/overrides/js/scheme.js b/docs/js/scheme.js similarity index 79% rename from overrides/js/scheme.js rename to docs/js/scheme.js index b73a6c7c..5aaff8e8 100644 --- a/overrides/js/scheme.js +++ b/docs/js/scheme.js @@ -12,6 +12,20 @@ ) } +/** + * Sets up the theme for the webpage based on user preferences and system settings. + * + * @param {HTMLElement} body - The body element of the webpage. + * + * The function performs the following steps: + * 1. Checks if the browser supports the `prefers-color-scheme` media feature. + * 2. Retrieves the user's preferred color scheme and preference settings from localStorage. + * 3. Removes any old version of the color scheme settings from localStorage. + * 4. Sets default values for the color scheme and preference settings if they are not found in localStorage. + * 5. Adjusts the color scheme based on the user's preference and system settings. + * 6. Updates the body element's attributes to reflect the current color scheme and preference settings. + * 7. Adds an event listener to handle changes in the `prefers-color-scheme` media feature if supported. + */ const setupTheme = body => { const preferSupported = window.matchMedia("(prefers-color-scheme)").media !== "not all" let scheme = localStorage.getItem("data-md-color-scheme") diff --git a/overrides/js/tablesort.js b/docs/js/tablesort.js similarity index 54% rename from overrides/js/tablesort.js rename to docs/js/tablesort.js index 33193256..9fd7e193 100644 --- a/overrides/js/tablesort.js +++ b/docs/js/tablesort.js @@ -1,4 +1,9 @@ document$.subscribe(function() { + /** + * Selects all table elements within an article that do not have a class attribute. + * + * @type {NodeListOf} + */ var tables = document.querySelectorAll("article table:not([class])") tables.forEach(function(table) { new Tablesort(table) diff --git a/overrides/js/toc.js b/docs/js/toc.js similarity index 100% rename from overrides/js/toc.js rename to docs/js/toc.js diff --git a/mkdocs.yml b/mkdocs.yml index 2f7b514a..b8aeb369 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,7 +4,7 @@ site_description: wnc 的个人网站 site_author: wnc repo_name: wnc's café repo_url: https://github.com/WncFht/notes/ -edit_uri: edit/main/docs/ +# edit_uri: edit/main/docs/ copyright: Copyright © 2024 - Present WncFht theme: @@ -173,28 +173,24 @@ extra: # property: YOUR-ANALYTICS-ID extra_css: - - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css - # - https://cdn.tonycrane.cc/utils/katex.min.css + # - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css + - https://cdn.tonycrane.cc/utils/katex.min.css - https://cdn.tonycrane.cc/jbmono/jetbrainsmono.css - https://cdn.tonycrane.cc/lxgw/lxgwscreen.css - css/custom.css - css/tasklist.css - css/card.css - css/flink.css - # - css/changelog_extra.css - css/extra.css - css/fold_toc.css - - css/grid cards.css # 好用的但还没用 - https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.1.0/style.css extra_javascript: - js/katex.js - - js/mathjax.js - - js/tablesort.js - js/toc.js + - js/mathjax.js - https://polyfill.io/v3/polyfill.min.js?features=es6 - - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js - # - https://cdn.tonycrane.cc/utils/katex.min.js + - https://cdn.tonycrane.cc/utils/katex.min.js - https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js # katex @@ -207,7 +203,6 @@ extra_javascript: - https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-chtml-full.js - https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-svg-full.js - plugins: - blogging: locale: en @@ -231,6 +226,23 @@ plugins: # sort_file: true # sort_directory: true - toc + + - minify: + minify_html: true + minify_js: true + minify_css: true + js_files: + - js/katex.js + - js/mathjax.js + - js/toc.js + css_files: + - css/custom.css + - css/tasklist.css + - css/card.css + - css/flink.css + - css/extra.css + - css/fold_toc.css + - css/grid cards.css # - obsidian_support 不知道什么原因构建速度很慢,暂时不用 # - rss - git-revision-date-localized: @@ -239,26 +251,80 @@ plugins: enable_creation_date: true exclude: - index.md - - mkdocs-video: - video_muted: True - video_controls: True - mark: "video" - # - changelog - # - mkdocs-jupyter: - # include_source: True - # execute: False - # ignore: ["*.py"] -not_in_nav: links.md +not_in_nav: Links.md nav: - - Home: index.md + - Home: + - index.md + - about.md - Blogs: - index: Blogs/index.md - Archives: Blogs/archives.md - - Summaries: Summaries/index.md - - Computer Basic: CS_Basic/index.md - - AI: AI/index.md - - Robot: Robot/index.md - - Tools: Tools/index.md - - Tags: Tags/index.md + - Blogs/posts/24-12-29.md + - Blogs/posts/24-12-30.md + - Blogs/posts/FreeSplatter 代码解读.md + - Blogs/posts/Gaussian_Splatting_Code.md + - Blogs/posts/Gaussian_Splatting_复现.md + - Blogs/posts/OCRN.md + - Blogs/posts/ULIP-2.md + - Blogs/posts/用AI后的问题.md + - Summaries: + - Summaries/index.md + - Summaries/2024/weekly/2024-W44-10.md + - Summaries/2024/weekly/2024-W45-11.md + - Summaries/2024/weekly/2024-W46-11.md + - Summaries/2024/weekly/2024-W47-11.md + - Summaries/2024/weekly/2024-W48-11.md + - Summaries/2024/weekly/2024-W49-12.md + - Summaries/2024/weekly/2024-W50-12.md + - Summaries/2024/weekly/2024-W51-12.md + - Summaries/2024/weekly/2024-W52-12.md + - Summaries/2025/weekly/2025-W01-12.md + - Summaries/Semesters/202409-10.md + - Summaries/Semesters/2024_1_1.md + - Summaries/Semesters/2024summer_vacation.md + - Computer Basic: + - CS_Basic/index.md + - CS_Basic/15-213/CSAPP.md + - CS_Basic/C++/Accelerated C++.md + - CS_Basic/C++/C++ Basic.md + - CS_Basic/CS61A/CS61A.md + - CS_Basic/CS61A/Composing_Programs.md + - CS_Basic/CS61C/计算机组成与设计硬件软件接口.md + - CS_Basic/Network/Security.md + - AI: + - AI/index.md + - AI/Dive_into_Deep_Learning.md + - AI/SLAM14.md + - AI/统计学习方法.md + - AI/CS231n/CS231n_notes.md + - AI/CS231n/Image Classification-Data-driven Approach, k-Nearest Neighbor, train_val_test splits.md + - AI/CS231n/Linear classification-Support Vector Machine, Softmax.md + - AI/CS231n/Numpy.md + - AI/EECS 498-007/KNN.md + - AI/EECS 498-007/Pytorch.md + - AI/EECS 498-007/linear_classifer.md + - AI/FFB6D/FFB6D_Conda.md + - AI/FFB6D/FFB6D_Docker.md + - Robot: + - Robot/index.md + - Robot/calibration.md + - Robot/kalman.md + - Robot/pnp.md + - Tools: + - Tools/index.md + - Tools/AI/prompt.md + - Tools/AI/prompt_writing.md + - Tools/Blog/Mkdocs_Material.md + - Tools/Environment/Ubuntu_setup.md + - Tools/Environment/environment.md + - Tools/Environment/obsidian_setup.md + - Tools/Make/CMake.md + - Tools/Make/Makeflie.md + - Tools/Others/Chezmoi.md + - Tools/Others/SSH.md + - Tools/Others/zotero_使用指南.md + - Tools/Terminal/Tabby_Zsh.md + - Tags: + - Tags/index.md diff --git a/overrides/assets/cards/index.c9fa2768.css b/overrides/assets/cards/index.c9fa2768.css deleted file mode 100644 index dcf1e65e..00000000 --- a/overrides/assets/cards/index.c9fa2768.css +++ /dev/null @@ -1 +0,0 @@ -:root{--pointer-x:50%;--pointer-y:50%;--card-scale:1;--card-opacity:0;--translate-x:0px;--translate-y:0px;--rotate-x:0deg;--rotate-y:0deg;--background-x:var(--pointer-x);--background-y:var(--pointer-y);--pointer-from-center:0;--pointer-from-top:var(--pointer-from-center);--pointer-from-left:var(--pointer-from-center)} diff --git a/overrides/assets/cards/index.caca6175.js b/overrides/assets/cards/index.caca6175.js deleted file mode 100644 index 1aabd601..00000000 --- a/overrides/assets/cards/index.caca6175.js +++ /dev/null @@ -1,22 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const c of n.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function s(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerpolicy&&(n.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?n.credentials="include":r.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(r){if(r.ep)return;r.ep=!0;const n=s(r);fetch(r.href,n)}})();function H(){}function wt(e,t){for(const s in t)e[s]=t[s];return e}function Qe(e){return e()}function Ne(){return Object.create(null)}function fe(e){e.forEach(Qe)}function Ze(e){return typeof e=="function"}function pe(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let he;function ge(e,t){return he||(he=document.createElement("a")),he.href=t,e===he.href}function yt(e){return Object.keys(e).length===0}function pt(e,...t){if(e==null)return H;const s=e.subscribe(...t);return s.unsubscribe?()=>s.unsubscribe():s}function B(e,t,s){e.$$.on_destroy.push(pt(t,s))}function bt(e,t,s){return e.set(s),t}const ve=typeof window<"u";let Fe=ve?()=>window.performance.now():()=>Date.now(),$e=ve?e=>requestAnimationFrame(e):H;const te=new Set;function et(e){te.forEach(t=>{t.c(e)||(te.delete(t),t.f())}),te.size!==0&&$e(et)}function _t(e){let t;return te.size===0&&$e(et),{promise:new Promise(s=>{te.add(t={c:e,f:s})}),abort(){te.delete(t)}}}function O(e,t){e.appendChild(t)}function tt(e,t,s){e.insertBefore(t,s||null)}function Re(e){e.parentNode.removeChild(e)}function U(e){return document.createElement(e)}function Gt(e){return document.createTextNode(e)}function Ge(){return Gt(" ")}function N(e,t,s,i){return e.addEventListener(t,s,i),()=>e.removeEventListener(t,s,i)}function u(e,t,s){s==null?e.removeAttribute(t):e.getAttribute(t)!==s&&e.setAttribute(t,s)}function Tt(e){return Array.from(e.childNodes)}function Z(e,t,s){e.classList[s?"add":"remove"](t)}let ce;function ae(e){ce=e}function xt(){if(!ce)throw new Error("Function called outside component initialization");return ce}function kt(e){xt().$$.on_mount.push(e)}const oe=[],xe=[],me=[],Ve=[],St=Promise.resolve();let ke=!1;function Lt(){ke||(ke=!0,St.then(st))}function Se(e){me.push(e)}const Te=new Set;let de=0;function st(){const e=ce;do{for(;de{we.delete(e),i&&(s&&e.d(1),i())}),e.o(t)}else i&&i()}const Et=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Mt(e,t){const s={},i={},r={$$scope:1};let n=e.length;for(;n--;){const c=e[n],h=t[n];if(h){for(const f in c)f in h||(i[f]=1);for(const f in h)r[f]||(s[f]=h[f],r[f]=1);e[n]=h}else for(const f in c)r[f]=1}for(const c in i)c in s||(s[c]=void 0);return s}function At(e){return typeof e=="object"&&e!==null?e:{}}function rt(e){e&&e.c()}function Ee(e,t,s,i){const{fragment:r,after_update:n}=e.$$;r&&r.m(t,s),i||Se(()=>{const c=e.$$.on_mount.map(Qe).filter(Ze);e.$$.on_destroy?e.$$.on_destroy.push(...c):fe(c),e.$$.on_mount=[]}),n.forEach(Se)}function Me(e,t){const s=e.$$;s.fragment!==null&&(fe(s.on_destroy),s.fragment&&s.fragment.d(t),s.on_destroy=s.fragment=null,s.ctx=[])}function jt(e,t){e.$$.dirty[0]===-1&&(oe.push(e),Lt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const L=y.length?y[0]:M;return a.ctx&&r(a.ctx[g],a.ctx[g]=L)&&(!a.skip_bound&&a.bound[g]&&a.bound[g](L),w&&jt(e,g)),M}):[],a.update(),w=!0,fe(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const g=Tt(t.target);a.fragment&&a.fragment.l(g),g.forEach(Re)}else a.fragment&&a.fragment.c();t.intro&&Ce(e.$$.fragment),Ee(e,t.target,t.anchor,t.customElement),st()}ae(f)}class je{$destroy(){Me(this,1),this.$destroy=H}$on(t,s){if(!Ze(s))return H;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(s),()=>{const r=i.indexOf(s);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!yt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Wt=["swsh12pt5gg-GG35","swsh12pt5gg-GG36","swsh12pt5gg-GG37","swsh12pt5gg-GG38","swsh12pt5gg-GG39","swsh12pt5gg-GG40","swsh12pt5gg-GG41","swsh12pt5gg-GG42","swsh12pt5gg-GG43","swsh12pt5gg-GG44","swsh12pt5gg-GG45","swsh12pt5gg-GG46","swsh12pt5gg-GG47","swsh12pt5gg-GG48","swsh12pt5gg-GG49","swsh12pt5gg-GG50","swsh12pt5gg-GG51","swsh12pt5gg-GG52","swsh12pt5gg-GG53","swsh12pt5gg-GG54","swsh12pt5gg-GG55","swsh12pt5gg-GG56","swsh12-177","swsh12-181","swsh12-184","swsh12-186","swsh12tg-TG12","swsh12tg-TG13","swsh12tg-TG14","swsh12tg-TG15","swsh12tg-TG16","swsh12tg-TG17","swsh12tg-TG18","swsh12tg-TG19","swsh12tg-TG20","swsh12tg-TG21","swsh12tg-TG22","swsh11-177","swsh11-180","swsh11-186","swsh11tg-TG12","swsh11tg-TG13","swsh11tg-TG14","swsh11tg-TG15","swsh11tg-TG16","swsh11tg-TG17","swsh11tg-TG18","swsh11tg-TG19","swsh11tg-TG20","swsh11tg-TG21","swsh11tg-TG22","pgo-72","pgo-74","swsh10-161","swsh10-163","swsh10-167","swsh10-172","swsh10-175","swsh10-177","swsh10tg-TG13","swsh10tg-TG14","swsh10tg-TG15","swsh10tg-TG16","swsh10tg-TG17","swsh10tg-TG18","swsh10tg-TG19","swsh10tg-TG20","swsh10tg-TG21","swsh10tg-TG22","swsh10tg-TG23","swsh9-154","swsh9-156","swsh9-162","swsh9-166","swsh9tg-TG13","swsh9tg-TG14","swsh9tg-TG15","swsh9tg-TG16","swsh9tg-TG17","swsh9tg-TG18","swsh9tg-TG19","swsh9tg-TG20","swsh9tg-TG21","swsh9tg-TG22","swsh9tg-TG23","swsh8-245","swsh8-251","swsh8-252","swsh8-255","swsh8-257","swsh8-266","swsh8-269","swsh8-270","swsh8-271","swsh7-167","swsh7-175","swsh7-180","swsh7-182","swsh7-184","swsh7-186","swsh7-189","swsh7-192","swsh7-194","swsh7-196","swsh7-198","swsh7-205","swsh7-209","swsh7-212","swsh7-215","swsh7-218","swsh7-220","swsh6-164","swsh6-166","swsh6-168","swsh6-170","swsh6-172","swsh6-174","swsh6-177","swsh6-179","swsh6-183","swsh6-185","swsh6-201","swsh6-203","swsh6-205","swsh5-146","swsh5-151","swsh5-153","swsh5-155","swsh5-168","swsh5-170","swshp-SWSH179","swshp-SWSH180","swshp-SWSH181","swshp-SWSH182","swshp-SWSH183","swshp-SWSH184","swshp-SWSH204","swshp-SWSH260","swshp-SWSH261","swshp-SWSH262"],v=[];function Ot(e,t){return{subscribe:We(e,t).subscribe}}function We(e,t=H){let s;const i=new Set;function r(h){if(pe(e,h)&&(e=h,s)){const f=!v.length;for(const a of i)a[1](),v.push(a,e);if(f){for(let a=0;a{i.delete(a),i.size===0&&(s(),s=null)}}return{set:r,update:n,subscribe:c}}function Xe(e){return Object.prototype.toString.call(e)==="[object Date]"}function Le(e,t,s,i){if(typeof s=="number"||Xe(s)){const r=i-s,n=(s-t)/(e.dt||1/60),c=e.opts.stiffness*r,h=e.opts.damping*n,f=(c-h)*e.inv_mass,a=(n+f)*e.dt;return Math.abs(a)Le(e,t[n],s[n],i[n]));if(typeof s=="object"){const r={};for(const n in s)r[n]=Le(e,t[n],s[n],i[n]);return r}else throw new Error(`Cannot spring ${typeof s} values`)}}function $(e,t={}){const s=We(e),{stiffness:i=.15,damping:r=.8,precision:n=.01}=t;let c,h,f,a=e,w=e,g=1,M=0,y=!1;function L(T,x={}){w=T;const m=f={};return e==null||x.hard||G.stiffness>=1&&G.damping>=1?(y=!0,c=Fe(),a=T,s.set(e=w),Promise.resolve()):(x.soft&&(M=1/((x.soft===!0?.5:+x.soft)*60),g=0),h||(c=Fe(),y=!1,h=_t(d=>{if(y)return y=!1,h=null,!1;g=Math.min(g+M,1);const I={inv_mass:g,opts:G,settled:!0,dt:(d-c)*60/1e3},F=Le(I,a,e,w);return c=d,a=e,s.set(e=F),I.settled&&(h=null),!I.settled})),new Promise(d=>{h.promise.then(()=>{m===f&&d()})}))}const G={set:L,update:(T,x)=>L(T(w,e),x),subscribe:s.subscribe,stiffness:i,damping:r,precision:n};return G}const Ye=We(void 0),Oe=function(e){return e?{alpha:e.alpha,beta:e.beta,gamma:e.gamma}:{alpha:0,beta:0,gamma:0}},Ke=e=>{const t=Oe(e);return{absolute:t,relative:{alpha:t.alpha-ye.alpha,beta:t.beta-ye.beta,gamma:t.gamma-ye.gamma}}};let Je=!0,ye=Oe();const Dt=Ot(Ke(),function(t){const s=function(i){Je&&(Je=!1,ye=Oe(i));const r=Ke(i);t(r)};return window.addEventListener("deviceorientation",s,!0),function(){window.removeEventListener("deviceorientation",s,!0)}}),D=(e,t=3)=>parseFloat(e.toFixed(t)),ie=(e,t=0,s=100)=>Math.min(Math.max(e,t),s),ee=(e,t,s,i,r)=>D(i+(r-i)*(e-t)/(s-t));const{window:Ht}=Et;function It(e){let t,s,i,r,n,c,h,f,a,w,g,M,y,L,G,T,x;return{c(){t=U("div"),s=U("div"),i=U("button"),r=U("div"),n=U("img"),h=Ge(),f=U("img"),w=Ge(),g=U("div"),M=Ge(),y=U("div"),ge(n.src,c=e[9]+"#only-dark")||u(n,"src",c),u(n,"alt","card (dark)"),u(n,"loading","lazy"),u(n,"width","660"),u(n,"height","921"),ge(f.src,a=e[9].replace(".png",".light.png#only-light"))||u(f,"src",a),u(f,"alt","card (light)"),u(f,"loading","lazy"),u(f,"width","660"),u(f,"height","921"),u(g,"class","card__shine"),u(y,"class","card__glare"),u(r,"class","card__front"),u(r,"style",L=e[25]+e[15]),u(i,"class","card__rotator"),u(i,"tabindex","0"),u(s,"class","card__translater"),u(t,"class",G="cards "+e[1]+" / interactive /"),u(t,"data-number",e[0]),u(t,"data-set",e[5]),u(t,"data-subtypes",e[2]),u(t,"data-supertype",e[3]),u(t,"data-rarity",e[4]),u(t,"data-trainer-gallery",e[8]),u(t,"style",e[16]),Z(t,"interacting",e[10]),Z(t,"loading",e[11]),Z(t,"masked",!!e[6])},m(m,d){tt(m,t,d),O(t,s),O(s,i),O(i,r),O(r,n),O(r,h),O(r,f),O(r,w),O(r,g),O(r,M),O(r,y),e[41](t),T||(x=[N(Ht,"scroll",e[24]),N(n,"load",e[26]),N(f,"load",e[26]),N(i,"click",e[22]),N(i,"pointermove",e[20]),N(i,"mouseout",e[21]),N(i,"blur",e[23])],T=!0)},p(m,d){d[0]&512&&!ge(n.src,c=m[9]+"#only-dark")&&u(n,"src",c),d[0]&512&&!ge(f.src,a=m[9].replace(".png",".light.png#only-light"))&&u(f,"src",a),d[0]&32768&&L!==(L=m[25]+m[15])&&u(r,"style",L),d[0]&2&&G!==(G="cards "+m[1]+" / interactive /")&&u(t,"class",G),d[0]&1&&u(t,"data-number",m[0]),d[0]&32&&u(t,"data-set",m[5]),d[0]&4&&u(t,"data-subtypes",m[2]),d[0]&8&&u(t,"data-supertype",m[3]),d[0]&16&&u(t,"data-rarity",m[4]),d[0]&256&&u(t,"data-trainer-gallery",m[8]),d[0]&65536&&u(t,"style",m[16]),d[0]&1026&&Z(t,"interacting",m[10]),d[0]&2050&&Z(t,"loading",m[11]),d[0]&66&&Z(t,"masked",!!m[6])},i:H,o:H,d(m){m&&Re(t),e[41](null),T=!1,fe(x)}}}let Pt="";function Ut(e,t,s){let i,r,n,c,h,f,a,w,g;B(e,Dt,o=>s(33,r=o)),B(e,Ye,o=>s(34,n=o));let{name:M=""}=t,{number:y=""}=t,{set:L=""}=t,{types:G=""}=t,{subtypes:T="basic"}=t,{supertype:x="pok\xE9mon"}=t,{rarity:m="common"}=t,{pageURL:d=""}=t,{img:I=""}=t,{back:F="/assets/cards/back.png"}=t,{foil:V=""}=t,{mask:z=""}=t,{showcase:X=!1}=t;const Y={x:Math.random(),y:Math.random()},le={x:Math.floor(Y.x*734),y:Math.floor(Y.y*1280)};let l=!1,ue="",b,R,P=!1,_=!0,K=!0,J=document.visibilityState==="visible";const q={stiffness:.066,damping:.25},be={stiffness:.033,damping:.45};let k=$({x:0,y:0},q);B(e,k,o=>s(39,w=o));let C=$({x:50,y:50,o:0},q);B(e,C,o=>s(40,g=o));let E=$({x:50,y:50},q);B(e,E,o=>s(37,f=o));let se=$({x:0,y:0},be);B(e,se,o=>s(38,a=o));let ne=$({x:0,y:0},be);B(e,ne,o=>s(35,c=o));let re=$(1,be);B(e,re,o=>s(36,h=o));let _e,De,He,Ie=X;const Pe=()=>{Ie&&(clearTimeout(He),clearTimeout(De),clearInterval(_e),Ie=!1)},it=o=>{if(Pe(),!J||n&&n!==b)return s(10,P=!1);s(10,P=!0),o.type==="touchmove"&&(o.clientX=o.touches[0].clientX,o.clientY=o.touches[0].clientY);const p=o.target.getBoundingClientRect(),S={x:o.clientX-p.left,y:o.clientY-p.top},A={x:ie(D(100/p.width*S.x)),y:ie(D(100/p.height*S.y))},ze={x:A.x-50,y:A.y-50};Be({x:ee(A.x,0,100,37,63),y:ee(A.y,0,100,33,67)},{x:D(-(ze.x/3.5)),y:D(ze.y/2)},{x:D(A.x),y:D(A.y),o:1})},Q=(o,j=500)=>{setTimeout(function(){s(10,P=!1),s(12,k.stiffness=.01,k),s(12,k.damping=.06,k),k.set({x:0,y:0},{soft:1}),s(13,C.stiffness=.01,C),s(13,C.damping=.06,C),C.set({x:50,y:50,o:0},{soft:1}),s(14,E.stiffness=.01,E),s(14,E.damping=.06,E),E.set({x:50,y:50},{soft:1})},j)},ot=o=>{d!=""&&(window.location.href=d)},at=o=>{Q(),bt(Ye,n=void 0,n)},ct=o=>{clearTimeout(R),R=setTimeout(()=>{n&&n===b&&Ue()},300)},Ue=()=>{const o=b.getBoundingClientRect(),j=document.documentElement,p={x:D(j.clientWidth/2-o.x-o.width/2),y:D(j.clientHeight/2-o.y-o.height/2)};ne.set({x:p.x,y:p.y})},ft=()=>{const o=b.getBoundingClientRect();let j=100,p=window.innerWidth/o.width*.9,S=window.innerHeight/o.height*.9,A=1.75;Ue(),_&&(j=1e3,se.set({x:360,y:0})),_=!1,re.set(Math.min(p,S,A)),Q(null,j)},lt=()=>{re.set(1,{soft:!0}),ne.set({x:0,y:0},{soft:!0}),se.set({x:0,y:0},{soft:!0}),Q(null,100)},ut=()=>{Q(null,0),re.set(1,{hard:!0}),ne.set({x:0,y:0},{hard:!0}),se.set({x:0,y:0},{hard:!0}),k.set({x:0,y:0},{hard:!0})};let qe="";const ht=` - --seedx: ${Y.x}; - --seedy: ${Y.y}; - --cosmosbg: ${le.x}px ${le.y}px; - `,gt=o=>{const j=o.relative.gamma,p=o.relative.beta,S={x:16,y:18},A={x:ie(j,-S.x,S.x),y:ie(p,-S.y,S.y)};Be({x:ee(A.x,-S.x,S.x,37,63),y:ee(A.y,-S.y,S.y,33,67)},{x:D(A.x*-1),y:D(A.y)},{x:ee(A.x,-S.x,S.x,0,100),y:ee(A.y,-S.y,S.y,0,100),o:1})},Be=(o,j,p)=>{s(14,E.stiffness=q.stiffness,E),s(14,E.damping=q.damping,E),s(12,k.stiffness=q.stiffness,k),s(12,k.damping=q.damping,k),s(13,C.stiffness=q.stiffness,C),s(13,C.damping=q.damping,C),E.set(o),k.set(j),C.set(p)};document.addEventListener("visibilitychange",o=>{J=document.visibilityState==="visible",Pe(),ut()});const dt=o=>{s(11,K=!1),(z||V)&&s(15,qe=` - --mask: url(${z}); - --foil: url(${V}); - `)};kt(()=>{if(s(9,ue=Pt+I),X&&J){let p=0;De=setTimeout(()=>{if(s(10,P=!0),s(12,k.stiffness=.02,k),s(12,k.damping=.5,k),s(13,C.stiffness=.02,C),s(13,C.damping=.5,C),s(14,E.stiffness=.02,E),s(14,E.damping=.5,E),J)_e=setInterval(function(){p+=.05,k.set({x:Math.sin(p)*25,y:Math.cos(p)*25}),C.set({x:55+Math.sin(p)*55,y:55+Math.cos(p)*55,o:.8}),E.set({x:20+Math.sin(p)*20,y:20+Math.cos(p)*20})},20),He=setTimeout(()=>{clearInterval(_e),Q(null,0)},4e3);else{s(10,P=!1);return}},2e3)}});function mt(o){xe[o?"unshift":"push"](()=>{b=o,s(7,b)})}return e.$$set=o=>{"name"in o&&s(27,M=o.name),"number"in o&&s(0,y=o.number),"set"in o&&s(5,L=o.set),"types"in o&&s(1,G=o.types),"subtypes"in o&&s(2,T=o.subtypes),"supertype"in o&&s(3,x=o.supertype),"rarity"in o&&s(4,m=o.rarity),"pageURL"in o&&s(28,d=o.pageURL),"img"in o&&s(29,I=o.img),"back"in o&&s(30,F=o.back),"foil"in o&&s(31,V=o.foil),"mask"in o&&s(6,z=o.mask),"showcase"in o&&s(32,X=o.showcase)},e.$$.update=()=>{e.$$.dirty[0]&128|e.$$.dirty[1]&8&&(n&&n===b?ft():lt()),e.$$.dirty[1]&1008&&s(16,i=` - --pointer-x: ${g.x}%; - --pointer-y: ${g.y}%; - --pointer-from-center: ${ie(Math.sqrt((g.y-50)*(g.y-50)+(g.x-50)*(g.x-50))/50,0,1)}; - --pointer-from-top: ${g.y/100}; - --pointer-from-left: ${g.x/100}; - --card-opacity: ${g.o}; - --rotate-x: ${w.x+a.x}deg; - --rotate-y: ${w.y+a.y}deg; - --background-x: ${f.x}%; - --background-y: ${f.y}%; - --card-scale: ${h}; - --translate-x: ${c.x}px; - --translate-y: ${c.y}px; - `),e.$$.dirty[0]&31&&(s(4,m=m.toLowerCase()),s(3,x=x.toLowerCase()),s(0,y=y.toLowerCase()),s(8,l=y.startsWith("tg")),Array.isArray(G)&&s(1,G=G.join(" ").toLowerCase()),Array.isArray(T)&&s(2,T=T.join(" ").toLowerCase())),e.$$.dirty[0]&128|e.$$.dirty[1]&12&&n&&n===b&&(s(10,P=!0),gt(r))},[y,G,T,x,m,L,z,b,l,ue,P,K,k,C,E,qe,i,se,ne,re,it,Q,ot,at,ct,ht,dt,M,d,I,F,V,X,r,n,c,h,f,a,w,g,mt]}class qt extends je{constructor(t){super(),Ae(this,t,Ut,It,pe,{name:27,number:0,set:5,types:1,subtypes:2,supertype:3,rarity:4,pageURL:28,img:29,back:30,foil:31,mask:6,showcase:32},null,[-1,-1])}}function Bt(e){let t,s;const i=[e[0]];let r={};for(let n=0;n{"id"in l&&s(2,i=l.id),"name"in l&&s(3,r=l.name),"number"in l&&s(4,n=l.number),"set"in l&&s(5,c=l.set),"types"in l&&s(6,h=l.types),"subtypes"in l&&s(7,f=l.subtypes),"supertype"in l&&s(8,a=l.supertype),"rarity"in l&&s(1,w=l.rarity),"isReverse"in l&&s(9,g=l.isReverse),"pageURL"in l&&s(10,M=l.pageURL),"img"in l&&s(11,y=l.img),"back"in l&&s(12,L=l.back),"foil"in l&&s(13,G=l.foil),"mask"in l&&s(14,T=l.mask),"showcase"in l&&s(15,x=l.showcase)},[le,w,i,r,n,c,h,f,a,g,M,y,L,G,T,x]}class Nt extends je{constructor(t){super(),Ae(this,t,zt,Bt,pe,{id:2,name:3,number:4,set:5,types:6,subtypes:7,supertype:8,rarity:1,isReverse:9,pageURL:10,img:11,back:12,foil:13,mask:14,showcase:15})}}function Ft(e){let t,s,i,r;return i=new Nt({props:{id:"swsh12pt5-160",name:"Pikachu",types:"Lightning",supertype:"Pok\xE9mon",subtypes:"Basic",rarity:"Rare Secret",showcase:!0,pageURL:e[0],img:e[1]}}),{c(){t=U("main"),s=U("div"),rt(i.$$.fragment),u(s,"class","showcase")},m(n,c){tt(n,t,c),O(t,s),Ee(i,s,null),r=!0},p:H,i(n){r||(Ce(i.$$.fragment,n),r=!0)},o(n){nt(i.$$.fragment,n),r=!1},d(n){n&&Re(t),Me(i)}}}function Vt(e){const t=[["#","/assets/cards/back.png"],["/cs/pl/riscv/","/assets/cards/riscv.png"],["/cs/pl/rust/basic/","/assets/cards/rust.png"],["/cs/pl/haskell/","/assets/cards/haskell.png"],["/cs/system/","/assets/cards/system.png"],["/cs/pl/asm/","/assets/cards/asm.png"],["/cs/algorithm/ds/","/assets/cards/ds.png"],["/cs/regex/","/assets/cards/regex.png"],["/cs/unicode/","/assets/cards/unicode.png"],["/cs/tools/","/assets/cards/tools.png"],["/sec/vulns/log4j/","/assets/cards/log4j.png"],["/web/svg/","/assets/cards/svg.png"],["/ctf/misc/qrcode/","/assets/cards/qrcode.png"],["/ctf/blockchain/eth/","/assets/cards/eth.png"],["/ctf/misc/escapes/pysandbox/","/assets/cards/pyjail.png"],["/writeups/","/assets/cards/writeups.png"],["#","/assets/cards/donate.png"]],s=t.length,i=Math.floor(Math.random()*s),r=t[i][0],n=t[i][1];return[r,n]}class Xt extends je{constructor(t){super(),Ae(this,t,Vt,Ft,pe,{})}}new Xt({target:document.getElementById("app")});