From bf574b7aebe991881b7f96c575cdbb89c8899dc7 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Sat, 15 Oct 2022 14:02:28 +0800 Subject: [PATCH] feat: post sidebar support table of content Signed-off-by: Ryan Wang --- package.json | 3 ++- pnpm-lock.yaml | 6 ++++++ src/main.ts | 17 ++++++++++++++++- src/styles/main.css | 4 ++++ tailwind.config.cjs | 2 +- templates/assets/dist/main.iife.js | 6 +++--- templates/assets/dist/style.css | 2 +- templates/category.html | 2 +- templates/index.html | 2 +- templates/modules/layout.html | 9 +++++++-- templates/modules/sidebar.html | 5 ++++- templates/page.html | 2 +- templates/post.html | 21 ++++++++++++++++++++- templates/tag.html | 2 +- 14 files changed, 68 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 7ad8af1..9326dfa 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ }, "dependencies": { "@iconify/iconify": "^3.0.0", - "alpinejs": "^3.10.3" + "alpinejs": "^3.10.3", + "tocbot": "^4.18.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 398a6ae..0697672 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,7 @@ specifiers: prettier: ^2.7.1 prettier-plugin-tailwindcss: ^0.1.13 tailwindcss: ^3.1.8 + tocbot: ^4.18.2 typescript: ^4.6.4 vite: ^3.1.4 vite-plugin-purge-icons: ^0.9.1 @@ -25,6 +26,7 @@ specifiers: dependencies: '@iconify/iconify': 3.0.0 alpinejs: 3.10.3 + tocbot: 4.18.2 devDependencies: '@iconify/json': 2.1.118 @@ -1716,6 +1718,10 @@ packages: is-number: 7.0.0 dev: true + /tocbot/4.18.2: + resolution: {integrity: sha512-bWUfEYQZ4oFgT+qZYvzlTgbsTmA645ApHbo1iRaOBUeFfy5IpctgAQQjCXbPZy+4RDZ1JJYlIBgoApZMzMaYog==} + dev: false + /tr46/0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true diff --git a/src/main.ts b/src/main.ts index 6ad7f69..59ed48a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,8 @@ import "./styles/tailwind.css"; import "./styles/main.css"; import "@purge-icons/generated"; - import Alpine from "alpinejs"; +import * as tocbot from "tocbot"; window.Alpine = Alpine; @@ -18,3 +18,18 @@ const onScroll = () => { }; window.addEventListener("scroll", onScroll); + +export function generateToc() { + tocbot.init({ + tocSelector: ".toc", + contentSelector: "#content", + headingSelector: "h1, h2, h3, h4", + extraListClasses: "space-y-1", + extraLinkClasses: 'group flex items-center justify-between rounded py-1 px-1.5 transition-all hover:bg-gray-100 text-sm opacity-80', + activeLinkClass: "is-active-link bg-gray-100", + collapseDepth: 6, + headingsOffset: 100, + scrollSmooth: true, + scrollSmoothOffset: -100, + }); +} diff --git a/src/styles/main.css b/src/styles/main.css index ca0034c..296e948 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -38,3 +38,7 @@ body { .menu-sticky .menu-dropdown li a { @apply text-gray-600 hover:text-blue-600; } + +.toc-list-item > .toc-list { + @apply my-3 ml-3 space-y-1 border-l pl-2; +} diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 5e432fc..7629cd5 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,6 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./templates/**/*.html"], + content: ["./templates/**/*.html","./src/main.ts"], theme: { extend: {}, container: { diff --git a/templates/assets/dist/main.iife.js b/templates/assets/dist/main.iife.js index 64120ba..9986916 100644 --- a/templates/assets/dist/main.iife.js +++ b/templates/assets/dist/main.iife.js @@ -1,4 +1,4 @@ -(function(){"use strict";const kc="",Tc="";/** +var main=function(et){"use strict";const Yc="",Zc="";/** * (c) Iconify * * For the full copyright and license information, please view the license.txt or license.gpl.txt @@ -8,8 +8,8 @@ * * @license MIT * @version 3.0.0 -*/const tn=Object.freeze({left:0,top:0,width:16,height:16}),be=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Z=Object.freeze({...tn,...be}),Ze=Object.freeze({...Z,body:"",hidden:!1});function hi(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function nn(e,t){const n=hi(e,t);for(const r in Ze)r in be?r in e&&!(r in n)&&(n[r]=be[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function gi(e,t){const n=e.icons,r=e.aliases||{},i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const c=r[s]&&r[s].parent,a=c&&o(c);a&&(i[s]=[c].concat(a))}return i[s]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(o),i}function _i(e,t,n){const r=e.icons,i=e.aliases||{};let o={};function s(c){o=nn(r[c]||i[c],o)}return s(t),n.forEach(s),nn(e,o)}function rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=gi(e);for(const i in r){const o=r[i];o&&(t(i,_i(e,i,o)),n.push(i))}return n}const X=/^[a-z0-9]+(-[a-z0-9]+)*$/,q=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),a=i.pop(),u={provider:i.length>0?i[0]:r,prefix:a,name:c};return t&&!ve(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!ve(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:o};return t&&!ve(c,n)?null:c}return null},ve=(e,t)=>e?!!((e.provider===""||e.provider.match(X))&&(t&&e.prefix===""||e.prefix.match(X))&&e.name.match(X)):!1,yi={provider:"",aliases:{},not_found:{},...tn};function Xe(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function on(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Xe(e,yi))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i.match(X)||typeof o.body!="string"||!Xe(o,Ze))return null}const r=t.aliases||{};for(const i in r){const o=r[i],s=o.parent;if(!i.match(X)||typeof s!="string"||!n[s]&&!r[s]||!Xe(o,Ze))return null}return t}const xe=Object.create(null);function mi(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function M(e,t){const n=xe[e]||(xe[e]=Object.create(null));return n[t]||(n[t]=mi(e,t))}function et(e,t){return on(t)?rn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function bi(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function vi(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(xe)).forEach(i=>{(typeof i=="string"&&typeof t=="string"?[t]:Object.keys(xe[i]||{})).forEach(s=>{const c=M(i,s);n=n.concat(Object.keys(c.icons).map(a=>(i!==""?"@"+i+":":"")+s+":"+a))})}),n}let ee=!1;function xi(e){return typeof e=="boolean"&&(ee=e),ee}function te(e){const t=typeof e=="string"?q(e,!0,ee):e;if(t){const n=M(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function sn(e,t){const n=q(e,!0,ee);if(!n)return!1;const r=M(n.provider,n.prefix);return bi(r,n.name,t)}function cn(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ee&&!t&&!e.prefix){let i=!1;return on(e)&&(e.prefix="",rn(e,(o,s)=>{s&&sn(o,s)&&(i=!0)})),i}const n=e.prefix;if(!ve({provider:t,prefix:n,name:"a"}))return!1;const r=M(t,n);return!!et(r,e)}function wi(e){return!!te(e)}function Si(e){const t=te(e);return t?{...Z,...t}:null}const an=Object.freeze({width:null,height:null}),un=Object.freeze({...an,...be}),Ei=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ci=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function tt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Ei);if(r===null||!r.length)return e;const i=[];let o=r.shift(),s=Ci.test(o);for(;;){if(s){const c=parseFloat(o);isNaN(c)?i.push(o):i.push(Math.ceil(c*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function we(e,t){const n={...Z,...e},r={...un,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(_=>{const y=[],I=_.hFlip,p=_.vFlip;let h=_.rotate;I?p?h+=2:(y.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),y.push("scale(-1 1)"),i.top=i.left=0):p&&(y.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),y.push("scale(1 -1)"),i.top=i.left=0);let g;switch(h<0&&(h-=Math.floor(h/4)*4),h=h%4,h){case 1:g=i.height/2+i.top,y.unshift("rotate(90 "+g.toString()+" "+g.toString()+")");break;case 2:y.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:g=i.width/2+i.left,y.unshift("rotate(-90 "+g.toString()+" "+g.toString()+")");break}h%2===1&&(i.left!==i.top&&(g=i.left,i.left=i.top,i.top=g),i.width!==i.height&&(g=i.width,i.width=i.height,i.height=g)),y.length&&(o=''+o+"")});const s=r.width,c=r.height,a=i.width,u=i.height;let l,f;return s===null?(f=c===null?"1em":c==="auto"?u:c,l=tt(f,a/u)):(l=s==="auto"?a:s,f=c===null?tt(l,u/a):c==="auto"?u:c),{attributes:{width:l.toString(),height:f.toString(),viewBox:i.left.toString()+" "+i.top.toString()+" "+a.toString()+" "+u.toString()},body:o}}const Ai=/\sid="(\S+)"/g,Oi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ii=0;function ln(e,t=Oi){const n=[];let r;for(;r=Ai.exec(e);)n.push(r[1]);return n.length&&n.forEach(i=>{const o=typeof t=="function"?t(i):t+(Ii++).toString(),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+"$3")}),e}const R={local:!0,session:!0},fn={local:new Set,session:new Set};let nt=!1;function Mi(e){nt=e}const dn="iconify2",ne="iconify",pn=ne+"-count",hn=ne+"-version",gn=36e5,ki=168;function rt(e,t){try{return e.getItem(t)}catch{}}function it(e,t,n){try{return e.setItem(t,n),!0}catch{}}function _n(e,t){try{e.removeItem(t)}catch{}}function ot(e,t){return it(e,pn,t.toString())}function st(e){return parseInt(rt(e,pn))||0}let Se=typeof window>"u"?{}:window;function yn(e){const t=e+"Storage";try{if(Se&&Se[t]&&typeof Se[t].length=="number")return Se[t]}catch{}R[e]=!1}function mn(e,t){const n=yn(e);if(!n)return;const r=rt(n,hn);if(r!==dn){if(r){const c=st(n);for(let a=0;a{const a=ne+c.toString(),u=rt(n,a);if(typeof u=="string"){try{const l=JSON.parse(u);if(typeof l=="object"&&typeof l.cached=="number"&&l.cached>i&&typeof l.provider=="string"&&typeof l.data=="object"&&typeof l.data.prefix=="string"&&t(l,c))return!0}catch{}_n(n,a)}};let s=st(n);for(let c=s-1;c>=0;c--)o(c)||(c===s-1?(s--,ot(n,s)):fn[e].add(c))}function bn(){if(!nt){Mi(!0);for(const e in R)mn(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=M(r,i);if(!et(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function vn(e,t){switch(e){case"local":case"session":R[e]=t;break;case"all":for(const n in R)R[n]=t;break}}const ct=Object.create(null);function xn(e,t){ct[e]=t}function at(e){return ct[e]||ct[""]}function ut(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ee=Object.create(null),re=["https://api.simplesvg.com","https://api.unisvg.com"],Ce=[];for(;re.length>0;)re.length===1||Math.random()>.5?Ce.push(re.shift()):Ce.push(re.pop());Ee[""]=ut({resources:["https://api.iconify.design"].concat(Ce)});function wn(e,t){const n=ut(t);return n===null?!1:(Ee[e]=n,!0)}function Ae(e){return Ee[e]}function Ti(){return Object.keys(Ee)}let Oe=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Pi(e){Oe=e}function ji(){return Oe}function Li(e,t){const n=Ae(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function Fi(e){return e===404}const Ri=(e,t,n)=>{const r=[],i=Li(e,t),o="icons";let s={type:o,provider:e,prefix:t,icons:[]},c=0;return n.forEach((a,u)=>{c+=a.length+1,c>=i&&u>0&&(r.push(s),s={type:o,provider:e,prefix:t,icons:[]},c=a.length),s.icons.push(a)}),r.push(s),r};function $i(e){if(typeof e=="string"){const t=Ae(e);if(t)return t.path}return"/"}const Ni={prepare:Ri,send:(e,t,n)=>{if(!Oe){n("abort",424);return}let r=$i(t.provider);switch(t.type){case"icons":{const o=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});r+=o+".json?"+a.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Oe(e+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(Fi(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})}};function zi(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,c=i.name,a=n[o]||(n[o]=Object.create(null)),u=a[s]||(a[s]=M(o,s));let l;c in u.icons?l=t.loaded:s===""||u.missing.has(c)?l=t.missing:l=t.pending;const f={provider:o,prefix:s,name:c};l.push(f)}),t}function Sn(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function Di(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const s=o.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==i)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==c&&(n||Sn([e],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let Bi=0;function Ki(e,t,n){const r=Bi++,i=Sn.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function Hi(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?q(i,t,n):i;o&&r.push(o)}),r}var qi={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Vi(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let m=e.resources.slice(0);for(s=[];m.length>1;){const C=Math.floor(Math.random()*m.length);s.push(m[C]),m=m.slice(0,C).concat(m.slice(C+1))}s=s.concat(m)}else s=e.resources.slice(o).concat(e.resources.slice(0,o));const c=Date.now();let a="pending",u=0,l,f=null,d=[],_=[];typeof r=="function"&&_.push(r);function y(){f&&(clearTimeout(f),f=null)}function I(){a==="pending"&&(a="aborted"),y(),d.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),d=[]}function p(m,C){C&&(_=[]),typeof m=="function"&&_.push(m)}function h(){return{startTime:c,payload:t,status:a,queriesSent:u,queriesPending:d.length,subscribe:p,abort:I}}function g(){a="failed",_.forEach(m=>{m(void 0,l)})}function w(){d.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),d=[]}function E(m,C,me){const Ye=C!=="success";switch(d=d.filter(H=>H!==m),a){case"pending":break;case"failed":if(Ye||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){l=me,g();return}if(Ye){l=me,d.length||(s.length?T():g());return}if(y(),w(),!e.random){const H=e.resources.indexOf(m.resource);H!==-1&&H!==e.index&&(e.index=H)}a="completed",_.forEach(H=>{H(me)})}function T(){if(a!=="pending")return;y();const m=s.shift();if(m===void 0){if(d.length){f=setTimeout(()=>{y(),a==="pending"&&(w(),g())},e.timeout);return}g();return}const C={status:"pending",resource:m,callback:(me,Ye)=>{E(C,me,Ye)}};d.push(C),u++,f=setTimeout(T,e.rotate),n(m,t,C.callback)}return setTimeout(T),h}function En(e){const t={...qi,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,a,u){const l=Vi(t,c,a,(f,d)=>{r(),u&&u(f,d)});return n.push(l),l}function o(c){return n.find(a=>c(a))||null}return{query:i,find:o,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Cn(){}const lt=Object.create(null);function Wi(e){if(!lt[e]){const t=Ae(e);if(!t)return;const n=En(t),r={config:t,redundancy:n};lt[e]=r}return lt[e]}function An(e,t,n){let r,i;if(typeof e=="string"){const o=at(e);if(!o)return n(void 0,424),Cn;i=o.send;const s=Wi(e);s&&(r=s.redundancy)}else{const o=ut(e);if(o){r=En(o);const s=e.resources?e.resources[0]:"",c=at(s);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Cn):r.query(t,i,n)().abort}function Ui(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in R)mn(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function Gi(e,t){nt||bn();function n(r){let i;if(!R[r]||!(i=yn(r)))return;const o=fn[r];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=st(i),!ot(i,s+1))return;const c={cached:Math.floor(Date.now()/gn),provider:e.provider,data:t};return it(i,ne+s.toString(),JSON.stringify(c))}t.lastModified&&!Ui(e,t.lastModified)||!Object.keys(t.icons).length||(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function On(){}function Qi(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Di(e)}))}function Ji(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=at(n)))return;o.prepare(n,r,i).forEach(c=>{An(n,c,(a,u)=>{if(typeof a!="object"){if(u!==404)return;c.icons.forEach(l=>{e.missing.add(l)})}else try{const l=et(e,a);if(!l.length)return;const f=e.pendingIcons;f&&l.forEach(d=>{f.delete(d)}),Gi(e,a)}catch(l){console.error(l)}Qi(e)})})}))}const Yi=e=>{const n=M(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},ft=(e,t)=>{const n=Hi(e,!0,xi()),r=zi(n);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,On)}),()=>{a=!1}}const i=Object.create(null),o=[];let s,c;return r.pending.forEach(a=>{const{provider:u,prefix:l}=a;if(l===c&&u===s)return;s=u,c=l,o.push(M(u,l));const f=i[u]||(i[u]=Object.create(null));f[l]||(f[l]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:l,name:f}=a,d=M(u,l),_=d.pendingIcons||(d.pendingIcons=new Set);_.has(f)||(_.add(f),i[u][l].push(f))}),o.forEach(a=>{const{provider:u,prefix:l}=a;i[u][l].length&&Ji(a,i[u][l])}),t?Ki(t,r,o):On},Zi=e=>new Promise((t,n)=>{const r=typeof e=="string"?q(e):e;ft([r||e],i=>{if(i.length&&r){const o=te(r);if(o){t({...Z,...o});return}}n(e)})});function In(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in an?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const Ie={...un,inline:!1},dt="iconify",pt="iconify-inline",P="iconifyData"+Date.now();let $=[];function ie(e){for(let t=0;t<$.length;t++){const n=$[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Mn(e,t=!1){let n=ie(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},$.push(n),n)}function Xi(){if(document.documentElement)return Mn(document.documentElement);$.push({node:()=>document.documentElement})}function eo(e){$=$.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function oe(){return $}function to(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let se=null;const no={childList:!0,subtree:!0,attributes:!0};function kn(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,se&&se(e)}))}function ro(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r0||i.type==="attributes"&&i.target[P]!==void 0){n.paused||kn(e);return}}}function Tn(e,t){e.observer.instance.observe(t,no)}function Me(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(ro.bind(null,e)),Tn(e,n),t.paused||kn(e))}function Pn(){oe().forEach(Me)}function jn(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function io(e){const t=se!==null;if(se!==e&&(se=e,t&&oe().forEach(jn)),t){Pn();return}to(Pn)}function ht(e){(e?[e]:oe()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function oo(e){if(e){const t=ie(e);t&&ht(t)}else ht()}function gt(e){(e?[e]:oe()).forEach(t=>{if(!t.observer){Me(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?Tn(t,r):Me(t);else return}})}function so(e){if(e){const t=ie(e);t&>(t)}else gt()}function Ln(e,t=!1){const n=Mn(e,t);return Me(n),n}function Fn(e){const t=ie(e);t&&(jn(t),eo(e))}function co(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const i in Ie)if(n[i]!==r[i])return!0;return!1}function ao(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}const uo=/[\s,]+/;function lo(e,t){t.split(uo).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const fo=["width","height"],po=["inline","hFlip","vFlip"];function ho(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function go(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&q(t,!0);if(!n)return null;const r={...Ie,inline:e.classList&&e.classList.contains(pt)};fo.forEach(c=>{const a=e.getAttribute("data-"+c);a&&(r[c]=a)});const i=e.getAttribute("data-rotate");typeof i=="string"&&(r.rotate=ao(i));const o=e.getAttribute("data-flip");typeof o=="string"&&lo(r,o),po.forEach(c=>{const a="data-"+c,u=ho(e.getAttribute(a),a);typeof u=="boolean"&&(r[c]=u)});const s=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:s}}const _o="svg."+dt+", i."+dt+", span."+dt+", i."+pt+", span."+pt;function yo(e){const t=[];return e.querySelectorAll(_o).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?go(n):null;r&&t.push({node:n,props:r})}),t}function Rn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function $n(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Nn(e,t,n,r){const i=e.classList;if(r){const s=r.classList;Array.from(s).forEach(c=>{i.add(c)})}const o=[];return t.forEach(s=>{i.contains(s)?n.has(s)&&o.push(s):(i.add(s),o.push(s))}),n.forEach(s=>{t.has(s)||i.remove(s)}),o}function zn(e,t,n){const r=e.style;(n||[]).forEach(o=>{r.removeProperty(o)});const i=[];for(const o in t)r.getPropertyValue(o)||(i.push(o),r.setProperty(o,t[o]));return i}function Dn(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const i=t.customisations,o=we(n,i),s=e[P],c=Rn(ln(o.body),{"aria-hidden":"true",role:"img",...o.attributes});r.innerHTML=c;const a=r.childNodes[0],u=e.attributes;for(let y=0;y/g,"%3E").replace(/\s+/g," ")}function bo(e){return'url("data:image/svg+xml,'+mo(e)+'")'}const vo={display:"inline-block"},_t={"background-color":"currentColor"},Bn={"background-color":"transparent"},Kn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Hn={"-webkit-mask":_t,mask:_t,background:Bn};for(const e in Hn){const t=Hn[e];for(const n in Kn)t[e+"-"+n]=Kn[n]}function qn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function xo(e,t,n,r){const i=t.customisations,o=we(n,i),s=o.attributes,c=e[P],a=Rn(o.body,{...s,width:n.width+"",height:n.height+""}),u=$n(t.icon),l=Nn(e,u,new Set(c&&c.addedClasses)),d={"--svg":bo(a),width:qn(s.width),height:qn(s.height),...vo,...r?_t:Bn};i.inline&&(d["vertical-align"]="-0.125em");const _=zn(e,d,c&&c.addedStyles),y={...t,status:"loaded",addedClasses:l,addedStyles:_};return e[P]=y,e}let ke=!1;function wo(){ke||(ke=!0,setTimeout(()=>{ke&&(ke=!1,V())}))}function V(e,t=!1){const n=Object.create(null);function r(i,o){const{provider:s,prefix:c,name:a}=i,u=M(s,c),l=u.icons[a];if(l)return{status:"loaded",icon:l};if(u.missing.has(a))return{status:"missing"};if(o&&!Yi(i)){const f=n[s]||(n[s]=Object.create(null));(f[c]||(f[c]=new Set)).add(a)}return{status:"loading"}}(e?[e]:oe()).forEach(i=>{const o=typeof i.node=="function"?i.node():i.node;if(!o||!o.querySelectorAll)return;let s=!1,c=!1;function a(u,l,f){if(c||(c=!0,ht(i)),u.tagName.toUpperCase()!=="SVG"){const d=l.mode,_=d==="mask"||(d==="bg"?!1:d==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof _=="boolean"){xo(u,l,{...Z,...f},_);return}}Dn(u,l,f)}yo(o).forEach(({node:u,props:l})=>{const f=u[P];if(!f){const{status:_,icon:y}=r(l.icon,!0);if(y){a(u,l,y);return}s=s||_==="loading",u[P]={...l,status:_};return}let d;if(co(f,l)){if(d=r(l.icon,f.name!==l.name),!d.icon){s=s||d.status==="loading",Object.assign(f,{...l,status:d.status});return}}else{if(f.status!=="loading")return;if(d=r(l.icon,!1),!d.icon){f.status=d.status;return}}a(u,l,d.icon)}),i.temporary&&!s?Fn(o):t&&s?Ln(o,!0):c&&i.observer&>(i)});for(const i in n){const o=n[i];for(const s in o){const c=o[s];ft(Array.from(c).map(a=>({provider:i,prefix:s,name:a})),wo)}}}function So(e){const t=ie(e);t?V(t):V({node:e,temporary:!0},!0)}function Vn(e,t,n=!1){const r=te(e);if(!r)return null;const i=q(e),o=In(Ie,t||{}),s=Dn(document.createElement("span"),{name:e,icon:i,customisations:o},r);return n?s.outerHTML:s}function Eo(){return"3.0.0"}function Co(e,t){return Vn(e,t,!1)}function Ao(e,t){return Vn(e,t,!0)}function Oo(e,t){const n=te(e);if(!n)return null;const r=In(Ie,t||{});return we(n,r)}function Io(e){e?So(e):V()}if(typeof document<"u"&&typeof window<"u"){Xi();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!cn(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{io(V),V()})}function Mo(e,t){vn(e,t!==!1)}function ko(e){vn(e,!0)}if(xn("",Ni),typeof document<"u"&&typeof window<"u"){bn();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;wn(n,i)||console.error(r)}catch{console.error(r)}}}}const yt={_api:{getAPIConfig:Ae,setAPIModule:xn,sendAPIQuery:An,setFetch:Pi,getFetch:ji,listAPIProviders:Ti},addAPIProvider:wn,loadIcons:ft,loadIcon:Zi,iconExists:wi,getIcon:Si,listIcons:vi,addIcon:sn,addCollection:cn,replaceIDs:ln,calculateSize:tt,buildIcon:we,getVersion:Eo,renderSVG:Co,renderHTML:Ao,renderIcon:Oo,scan:Io,observe:Ln,stopObserving:Fn,pauseObserver:oo,resumeObserver:so,enableCache:Mo,disableCache:ko};try{self.Iconify===void 0&&(self.Iconify=yt)}catch{}const To=yt.default||yt;JSON.parse('[{"prefix":"tabler","width":24,"height":24,"icons":{"arrow-left":{"body":""},"arrow-right":{"body":""},"brightness-2":{"body":""},"category":{"body":""},"eye":{"body":""},"heart":{"body":""},"menu-2":{"body":""},"message-circle":{"body":""},"search":{"body":""},"share":{"body":""},"stairs-up":{"body":""},"tags":{"body":""},"x":{"body":""}}},{"prefix":"ion","width":512,"height":512,"icons":{"enter":{"body":""}}},{"prefix":"simple-icons","width":24,"height":24,"icons":{"bilibili":{"body":""},"feedly":{"body":""},"github":{"body":""},"telegram":{"body":""},"twitter":{"body":""},"wechat":{"body":""}}},{"prefix":"ps","width":512,"height":512,"icons":{}},{"prefix":"et","width":32,"height":32,"icons":{}},{"prefix":"el","width":1200,"height":1200,"icons":{}},{"prefix":"il","width":750,"height":850,"icons":{}},{"prefix":"ic","width":24,"height":24,"icons":{}},{"prefix":"ri","width":24,"height":24,"icons":{}}]').forEach(e=>To.addCollection(e));var mt=!1,bt=!1,N=[];function Po(e){jo(e)}function jo(e){N.includes(e)||N.push(e),Lo()}function Wn(e){let t=N.indexOf(e);t!==-1&&N.splice(t,1)}function Lo(){!bt&&!mt&&(mt=!0,queueMicrotask(Fo))}function Fo(){mt=!1,bt=!0;for(let e=0;ee.effect(t,{scheduler:n=>{vt?Po(n):n()}}),Un=e.raw}function Gn(e){ce=e}function No(e){let t=()=>{};return[r=>{let i=ce(r);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),Te(i))},i},()=>{t()}]}var Qn=[],Jn=[],Yn=[];function zo(e){Yn.push(e)}function Zn(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Jn.push(t))}function Do(e){Qn.push(e)}function Bo(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function Xn(e,t){!e._x_attributeCleanups||Object.entries(e._x_attributeCleanups).forEach(([n,r])=>{(t===void 0||t.includes(n))&&(r.forEach(i=>i()),delete e._x_attributeCleanups[n])})}var xt=new MutationObserver(Ct),wt=!1;function er(){xt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),wt=!0}function Ko(){Ho(),xt.disconnect(),wt=!1}var ae=[],St=!1;function Ho(){ae=ae.concat(xt.takeRecords()),ae.length&&!St&&(St=!0,queueMicrotask(()=>{qo(),St=!1}))}function qo(){Ct(ae),ae.length=0}function x(e){if(!wt)return e();Ko();let t=e();return er(),t}var Et=!1,Pe=[];function Vo(){Et=!0}function Wo(){Et=!1,Ct(Pe),Pe=[]}function Ct(e){if(Et){Pe=Pe.concat(e);return}let t=[],n=[],r=new Map,i=new Map;for(let o=0;os.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&n.push(s))),e[o].type==="attributes")){let s=e[o].target,c=e[o].attributeName,a=e[o].oldValue,u=()=>{r.has(s)||r.set(s,[]),r.get(s).push({name:c,value:s.getAttribute(c)})},l=()=>{i.has(s)||i.set(s,[]),i.get(s).push(c)};s.hasAttribute(c)&&a===null?u():s.hasAttribute(c)?(l(),u()):l()}i.forEach((o,s)=>{Xn(s,o)}),r.forEach((o,s)=>{Qn.forEach(c=>c(s,o))});for(let o of n)if(!t.includes(o)&&(Jn.forEach(s=>s(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)n.includes(o)||!o.isConnected||(delete o._x_ignoreSelf,delete o._x_ignore,Yn.forEach(s=>s(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,n=null,r=null,i=null}function tr(e){return le(U(e))}function ue(e,t,n){return e._x_dataStack=[t,...U(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(r=>r!==t)}}function nr(e,t){let n=e._x_dataStack[0];Object.entries(t).forEach(([r,i])=>{n[r]=i})}function U(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?U(e.host):e.parentNode?U(e.parentNode):[]}function le(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(n=>Object.keys(n)))),has:(n,r)=>e.some(i=>i.hasOwnProperty(r)),get:(n,r)=>(e.find(i=>{if(i.hasOwnProperty(r)){let o=Object.getOwnPropertyDescriptor(i,r);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let s=o.get,c=o.set,a=o;s=s&&s.bind(t),c=c&&c.bind(t),s&&(s._x_alreadyBound=!0),c&&(c._x_alreadyBound=!0),Object.defineProperty(i,r,{...a,get:s,set:c})}return!0}return!1})||{})[r],set:(n,r,i)=>{let o=e.find(s=>s.hasOwnProperty(r));return o?o[r]=i:e[e.length-1][r]=i,!0}});return t}function rr(e){let t=r=>typeof r=="object"&&!Array.isArray(r)&&r!==null,n=(r,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(r)).forEach(([o,{value:s,enumerable:c}])=>{if(c===!1||s===void 0)return;let a=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?r[o]=s.initialize(e,a,o):t(s)&&s!==r&&!(s instanceof Element)&&n(s,a)})};return n(e)}function ir(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(r,i,o){return e(this.initialValue,()=>Uo(r,i),s=>At(r,i,s),i,o)}};return t(n),r=>{if(typeof r=="object"&&r!==null&&r._x_interceptor){let i=n.initialize.bind(n);n.initialize=(o,s,c)=>{let a=r.initialize(o,s,c);return n.initialValue=a,i(o,s,c)}}else n.initialValue=r;return n}}function Uo(e,t){return t.split(".").reduce((n,r)=>n[r],e)}function At(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),At(e[t[0]],t.slice(1),n)}}var or={};function A(e,t){or[e]=t}function Ot(e,t){return Object.entries(or).forEach(([n,r])=>{Object.defineProperty(e,`$${n}`,{get(){let[i,o]=fr(t);return i={interceptor:ir,...i},Zn(t,o),r(t,i)},enumerable:!1})}),e}function Go(e,t,n,...r){try{return n(...r)}catch(i){fe(i,e,t)}}function fe(e,t,n=void 0){Object.assign(e,{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message} +*/const un=Object.freeze({left:0,top:0,width:16,height:16}),be=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ee=Object.freeze({...un,...be}),tt=Object.freeze({...ee,body:"",hidden:!1});function ki(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(n.rotate=i),n}function fn(e,t){const n=ki(e,t);for(const i in tt)i in be?i in e&&!(i in n)&&(n[i]=be[i]):i in t?n[i]=t[i]:i in e&&(n[i]=e[i]);return n}function Ti(e,t){const n=e.icons,i=e.aliases||{},r=Object.create(null);function o(s){if(n[s])return r[s]=[];if(!(s in r)){r[s]=null;const c=i[s]&&i[s].parent,a=c&&o(c);a&&(r[s]=[c].concat(a))}return r[s]}return(t||Object.keys(n).concat(Object.keys(i))).forEach(o),r}function Ii(e,t,n){const i=e.icons,r=e.aliases||{};let o={};function s(c){o=fn(i[c]||r[c],o)}return s(t),n.forEach(s),fn(e,o)}function dn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const i=Ti(e);for(const r in i){const o=i[r];o&&(t(r,Ii(e,r,o)),n.push(r))}return n}const te=/^[a-z0-9]+(-[a-z0-9]+)*$/,U=(e,t,n,i="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;i=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const c=r.pop(),a=r.pop(),l={provider:r.length>0?r[0]:i,prefix:a,name:c};return t&&!xe(l)?null:l}const o=r[0],s=o.split("-");if(s.length>1){const c={provider:i,prefix:s.shift(),name:s.join("-")};return t&&!xe(c)?null:c}if(n&&i===""){const c={provider:i,prefix:"",name:o};return t&&!xe(c,n)?null:c}return null},xe=(e,t)=>e?!!((e.provider===""||e.provider.match(te))&&(t&&e.prefix===""||e.prefix.match(te))&&e.name.match(te)):!1,Mi={provider:"",aliases:{},not_found:{},...un};function nt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function hn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!nt(e,Mi))return null;const n=t.icons;for(const r in n){const o=n[r];if(!r.match(te)||typeof o.body!="string"||!nt(o,tt))return null}const i=t.aliases||{};for(const r in i){const o=i[r],s=o.parent;if(!r.match(te)||typeof s!="string"||!n[s]&&!i[s]||!nt(o,tt))return null}return t}const we=Object.create(null);function Li(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function j(e,t){const n=we[e]||(we[e]=Object.create(null));return n[t]||(n[t]=Li(e,t))}function rt(e,t){return hn(t)?dn(t,(n,i)=>{i?e.icons[n]=i:e.missing.add(n)}):[]}function ji(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Pi(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(we)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(we[r]||{})).forEach(s=>{const c=j(r,s);n=n.concat(Object.keys(c.icons).map(a=>(r!==""?"@"+r+":":"")+s+":"+a))})}),n}let ne=!1;function Ni(e){return typeof e=="boolean"&&(ne=e),ne}function re(e){const t=typeof e=="string"?U(e,!0,ne):e;if(t){const n=j(t.provider,t.prefix),i=t.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function pn(e,t){const n=U(e,!0,ne);if(!n)return!1;const i=j(n.provider,n.prefix);return ji(i,n.name,t)}function gn(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ne&&!t&&!e.prefix){let r=!1;return hn(e)&&(e.prefix="",dn(e,(o,s)=>{s&&pn(o,s)&&(r=!0)})),r}const n=e.prefix;if(!xe({provider:t,prefix:n,name:"a"}))return!1;const i=j(t,n);return!!rt(i,e)}function Fi(e){return!!re(e)}function Ri(e){const t=re(e);return t?{...ee,...t}:null}const mn=Object.freeze({width:null,height:null}),vn=Object.freeze({...mn,...be}),Hi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$i=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function it(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const i=e.split(Hi);if(i===null||!i.length)return e;const r=[];let o=i.shift(),s=$i.test(o);for(;;){if(s){const c=parseFloat(o);isNaN(c)?r.push(o):r.push(Math.ceil(c*t*n)/n)}else r.push(o);if(o=i.shift(),o===void 0)return r.join("");s=!s}}function Se(e,t){const n={...ee,...e},i={...vn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,i].forEach(_=>{const m=[],E=_.hFlip,g=_.vFlip;let p=_.rotate;E?g?p+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):g&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let d;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:d=r.height/2+r.top,m.unshift("rotate(90 "+d.toString()+" "+d.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:d=r.width/2+r.left,m.unshift("rotate(-90 "+d.toString()+" "+d.toString()+")");break}p%2===1&&(r.left!==r.top&&(d=r.left,r.left=r.top,r.top=d),r.width!==r.height&&(d=r.width,r.width=r.height,r.height=d)),m.length&&(o=''+o+"")});const s=i.width,c=i.height,a=r.width,l=r.height;let u,f;return s===null?(f=c===null?"1em":c==="auto"?l:c,u=it(f,a/l)):(u=s==="auto"?a:s,f=c===null?it(u,l/a):c==="auto"?l:c),{attributes:{width:u.toString(),height:f.toString(),viewBox:r.left.toString()+" "+r.top.toString()+" "+a.toString()+" "+l.toString()},body:o}}const qi=/\sid="(\S+)"/g,zi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Di=0;function _n(e,t=zi){const n=[];let i;for(;i=qi.exec(e);)n.push(i[1]);return n.length&&n.forEach(r=>{const o=typeof t=="function"?t(r):t+(Di++).toString(),s=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+"$3")}),e}const $={local:!0,session:!0},yn={local:new Set,session:new Set};let ot=!1;function Bi(e){ot=e}const bn="iconify2",ie="iconify",xn=ie+"-count",wn=ie+"-version",Sn=36e5,Ki=168;function st(e,t){try{return e.getItem(t)}catch{}}function ct(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Cn(e,t){try{e.removeItem(t)}catch{}}function at(e,t){return ct(e,xn,t.toString())}function lt(e){return parseInt(st(e,xn))||0}let Ce=typeof window>"u"?{}:window;function En(e){const t=e+"Storage";try{if(Ce&&Ce[t]&&typeof Ce[t].length=="number")return Ce[t]}catch{}$[e]=!1}function An(e,t){const n=En(e);if(!n)return;const i=st(n,wn);if(i!==bn){if(i){const c=lt(n);for(let a=0;a{const a=ie+c.toString(),l=st(n,a);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>r&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Cn(n,a)}};let s=lt(n);for(let c=s-1;c>=0;c--)o(c)||(c===s-1?(s--,at(n,s)):yn[e].add(c))}function On(){if(!ot){Bi(!0);for(const e in $)An(e,t=>{const n=t.data,i=t.provider,r=n.prefix,o=j(i,r);if(!rt(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function kn(e,t){switch(e){case"local":case"session":$[e]=t;break;case"all":for(const n in $)$[n]=t;break}}const ut=Object.create(null);function Tn(e,t){ut[e]=t}function ft(e){return ut[e]||ut[""]}function dt(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ee=Object.create(null),oe=["https://api.simplesvg.com","https://api.unisvg.com"],Ae=[];for(;oe.length>0;)oe.length===1||Math.random()>.5?Ae.push(oe.shift()):Ae.push(oe.pop());Ee[""]=dt({resources:["https://api.iconify.design"].concat(Ae)});function In(e,t){const n=dt(t);return n===null?!1:(Ee[e]=n,!0)}function Oe(e){return Ee[e]}function Vi(){return Object.keys(Ee)}let ke=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Ui(e){ke=e}function Wi(){return ke}function Gi(e,t){const n=Oe(e);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let r=0;n.resources.forEach(s=>{r=Math.max(r,s.length)});const o=t+".json?icons=";i=n.maxURL-r-n.path.length-o.length}return i}function Qi(e){return e===404}const Ji=(e,t,n)=>{const i=[],r=Gi(e,t),o="icons";let s={type:o,provider:e,prefix:t,icons:[]},c=0;return n.forEach((a,l)=>{c+=a.length+1,c>=r&&l>0&&(i.push(s),s={type:o,provider:e,prefix:t,icons:[]},c=a.length),s.icons.push(a)}),i.push(s),i};function Yi(e){if(typeof e=="string"){const t=Oe(e);if(t)return t.path}return"/"}const Zi={prepare:Ji,send:(e,t,n)=>{if(!ke){n("abort",424);return}let i=Yi(t.provider);switch(t.type){case"icons":{const o=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});i+=o+".json?"+a.toString();break}case"custom":{const o=t.uri;i+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let r=503;ke(e+i).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(Qi(s)?"abort":"next",s)});return}return r=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{n("next",r)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",r)})}};function Xi(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,o)=>r.provider!==o.provider?r.provider.localeCompare(o.provider):r.prefix!==o.prefix?r.prefix.localeCompare(o.prefix):r.name.localeCompare(o.name));let i={provider:"",prefix:"",name:""};return e.forEach(r=>{if(i.name===r.name&&i.prefix===r.prefix&&i.provider===r.provider)return;i=r;const o=r.provider,s=r.prefix,c=r.name,a=n[o]||(n[o]=Object.create(null)),l=a[s]||(a[s]=j(o,s));let u;c in l.icons?u=t.loaded:s===""||l.missing.has(c)?u=t.missing:u=t.pending;const f={provider:o,prefix:s,name:c};u.push(f)}),t}function Mn(e,t){e.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(r=>r.id!==t))})}function eo(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const i=e.provider,r=e.prefix;t.forEach(o=>{const s=o.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==r)return!0;const l=a.name;if(e.icons[l])s.loaded.push({provider:i,prefix:r,name:l});else if(e.missing.has(l))s.missing.push({provider:i,prefix:r,name:l});else return n=!0,!0;return!1}),s.pending.length!==c&&(n||Mn([e],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let to=0;function no(e,t,n){const i=to++,r=Mn.bind(null,n,i);if(!t.pending.length)return r;const o={id:i,icons:t,callback:e,abort:r};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),r}function ro(e,t=!0,n=!1){const i=[];return e.forEach(r=>{const o=typeof r=="string"?U(r,t,n):r;o&&i.push(o)}),i}var io={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function oo(e,t,n,i){const r=e.resources.length,o=e.random?Math.floor(Math.random()*r):e.index;let s;if(e.random){let b=e.resources.slice(0);for(s=[];b.length>1;){const x=Math.floor(Math.random()*b.length);s.push(b[x]),b=b.slice(0,x).concat(b.slice(x+1))}s=s.concat(b)}else s=e.resources.slice(o).concat(e.resources.slice(0,o));const c=Date.now();let a="pending",l=0,u,f=null,h=[],_=[];typeof i=="function"&&_.push(i);function m(){f&&(clearTimeout(f),f=null)}function E(){a==="pending"&&(a="aborted"),m(),h.forEach(b=>{b.status==="pending"&&(b.status="aborted")}),h=[]}function g(b,x){x&&(_=[]),typeof b=="function"&&_.push(b)}function p(){return{startTime:c,payload:t,status:a,queriesSent:l,queriesPending:h.length,subscribe:g,abort:E}}function d(){a="failed",_.forEach(b=>{b(void 0,u)})}function v(){h.forEach(b=>{b.status==="pending"&&(b.status="aborted")}),h=[]}function y(b,x,C){const L=x!=="success";switch(h=h.filter(k=>k!==b),a){case"pending":break;case"failed":if(L||!e.dataAfterTimeout)return;break;default:return}if(x==="abort"){u=C,d();return}if(L){u=C,h.length||(s.length?w():d());return}if(m(),v(),!e.random){const k=e.resources.indexOf(b.resource);k!==-1&&k!==e.index&&(e.index=k)}a="completed",_.forEach(k=>{k(C)})}function w(){if(a!=="pending")return;m();const b=s.shift();if(b===void 0){if(h.length){f=setTimeout(()=>{m(),a==="pending"&&(v(),d())},e.timeout);return}d();return}const x={status:"pending",resource:b,callback:(C,L)=>{y(x,C,L)}};h.push(x),l++,f=setTimeout(w,e.rotate),n(b,t,x.callback)}return setTimeout(w),p}function Ln(e){const t={...io,...e};let n=[];function i(){n=n.filter(c=>c().status==="pending")}function r(c,a,l){const u=oo(t,c,a,(f,h)=>{i(),l&&l(f,h)});return n.push(u),u}function o(c){return n.find(a=>c(a))||null}return{query:r,find:o,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:i}}function jn(){}const ht=Object.create(null);function so(e){if(!ht[e]){const t=Oe(e);if(!t)return;const n=Ln(t),i={config:t,redundancy:n};ht[e]=i}return ht[e]}function Pn(e,t,n){let i,r;if(typeof e=="string"){const o=ft(e);if(!o)return n(void 0,424),jn;r=o.send;const s=so(e);s&&(i=s.redundancy)}else{const o=dt(e);if(o){i=Ln(o);const s=e.resources?e.resources[0]:"",c=ft(s);c&&(r=c.send)}}return!i||!r?(n(void 0,424),jn):i.query(t,r,n)().abort}function co(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const i in $)An(i,r=>{const o=r.data;return r.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function ao(e,t){ot||On();function n(i){let r;if(!$[i]||!(r=En(i)))return;const o=yn[i];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=lt(r),!at(r,s+1))return;const c={cached:Math.floor(Date.now()/Sn),provider:e.provider,data:t};return ct(r,ie+s.toString(),JSON.stringify(c))}t.lastModified&&!co(e,t.lastModified)||!Object.keys(t.icons).length||(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Nn(){}function lo(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,eo(e)}))}function uo(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:i}=e,r=e.iconsToLoad;delete e.iconsToLoad;let o;if(!r||!(o=ft(n)))return;o.prepare(n,i,r).forEach(c=>{Pn(n,c,(a,l)=>{if(typeof a!="object"){if(l!==404)return;c.icons.forEach(u=>{e.missing.add(u)})}else try{const u=rt(e,a);if(!u.length)return;const f=e.pendingIcons;f&&u.forEach(h=>{f.delete(h)}),ao(e,a)}catch(u){console.error(u)}lo(e)})})}))}const fo=e=>{const n=j(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},pt=(e,t)=>{const n=ro(e,!0,Ni()),i=Xi(n);if(!i.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(i.loaded,i.missing,i.pending,Nn)}),()=>{a=!1}}const r=Object.create(null),o=[];let s,c;return i.pending.forEach(a=>{const{provider:l,prefix:u}=a;if(u===c&&l===s)return;s=l,c=u,o.push(j(l,u));const f=r[l]||(r[l]=Object.create(null));f[u]||(f[u]=[])}),i.pending.forEach(a=>{const{provider:l,prefix:u,name:f}=a,h=j(l,u),_=h.pendingIcons||(h.pendingIcons=new Set);_.has(f)||(_.add(f),r[l][u].push(f))}),o.forEach(a=>{const{provider:l,prefix:u}=a;r[l][u].length&&uo(a,r[l][u])}),t?no(t,i,o):Nn},ho=e=>new Promise((t,n)=>{const i=typeof e=="string"?U(e):e;pt([i||e],r=>{if(r.length&&i){const o=re(i);if(o){t({...ee,...o});return}}n(e)})});function Fn(e,t){const n={...e};for(const i in t){const r=t[i],o=typeof r;i in mn?(r===null||r&&(o==="string"||o==="number"))&&(n[i]=r):o===typeof n[i]&&(n[i]=i==="rotate"?r%4:r)}return n}const Te={...vn,inline:!1},gt="iconify",mt="iconify-inline",N="iconifyData"+Date.now();let q=[];function se(e){for(let t=0;tdocument.documentElement})}function go(e){q=q.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function ce(){return q}function mo(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ae=null;const vo={childList:!0,subtree:!0,attributes:!0};function Hn(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ae&&ae(e)}))}function _o(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let i=0;i0||r.type==="attributes"&&r.target[N]!==void 0){n.paused||Hn(e);return}}}function $n(e,t){e.observer.instance.observe(t,vo)}function Ie(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(_o.bind(null,e)),$n(e,n),t.paused||Hn(e))}function qn(){ce().forEach(Ie)}function zn(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function yo(e){const t=ae!==null;if(ae!==e&&(ae=e,t&&ce().forEach(zn)),t){qn();return}mo(qn)}function vt(e){(e?[e]:ce()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function bo(e){if(e){const t=se(e);t&&vt(t)}else vt()}function _t(e){(e?[e]:ce()).forEach(t=>{if(!t.observer){Ie(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const i=typeof t.node=="function"?t.node():t.node;if(i)n.instance?$n(t,i):Ie(t);else return}})}function xo(e){if(e){const t=se(e);t&&_t(t)}else _t()}function Dn(e,t=!1){const n=Rn(e,t);return Ie(n),n}function Bn(e){const t=se(e);t&&(zn(t),go(e))}function wo(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,i=t.customisations;for(const r in Te)if(n[r]!==i[r])return!0;return!1}function So(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function i(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:i(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/r,o%1===0?i(o):0)}}return t}const Co=/[\s,]+/;function Eo(e,t){t.split(Co).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ao=["width","height"],Oo=["inline","hFlip","vFlip"];function ko(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function To(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&U(t,!0);if(!n)return null;const i={...Te,inline:e.classList&&e.classList.contains(mt)};Ao.forEach(c=>{const a=e.getAttribute("data-"+c);a&&(i[c]=a)});const r=e.getAttribute("data-rotate");typeof r=="string"&&(i.rotate=So(r));const o=e.getAttribute("data-flip");typeof o=="string"&&Eo(i,o),Oo.forEach(c=>{const a="data-"+c,l=ko(e.getAttribute(a),a);typeof l=="boolean"&&(i[c]=l)});const s=e.getAttribute("data-mode");return{name:t,icon:n,customisations:i,mode:s}}const Io="svg."+gt+", i."+gt+", span."+gt+", i."+mt+", span."+mt;function Mo(e){const t=[];return e.querySelectorAll(Io).forEach(n=>{const i=n[N]||n.tagName.toLowerCase()!=="svg"?To(n):null;i&&t.push({node:n,props:i})}),t}function Kn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)n+=" "+i+'="'+t[i]+'"';return'"+e+""}function Vn(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Un(e,t,n,i){const r=e.classList;if(i){const s=i.classList;Array.from(s).forEach(c=>{r.add(c)})}const o=[];return t.forEach(s=>{r.contains(s)?n.has(s)&&o.push(s):(r.add(s),o.push(s))}),n.forEach(s=>{t.has(s)||r.remove(s)}),o}function Wn(e,t,n){const i=e.style;(n||[]).forEach(o=>{i.removeProperty(o)});const r=[];for(const o in t)i.getPropertyValue(o)||(r.push(o),i.setProperty(o,t[o]));return r}function Gn(e,t,n){let i;try{i=document.createElement("span")}catch{return e}const r=t.customisations,o=Se(n,r),s=e[N],c=Kn(_n(o.body),{"aria-hidden":"true",role:"img",...o.attributes});i.innerHTML=c;const a=i.childNodes[0],l=e.attributes;for(let m=0;m/g,"%3E").replace(/\s+/g," ")}function jo(e){return'url("data:image/svg+xml,'+Lo(e)+'")'}const Po={display:"inline-block"},yt={"background-color":"currentColor"},Qn={"background-color":"transparent"},Jn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Yn={"-webkit-mask":yt,mask:yt,background:Qn};for(const e in Yn){const t=Yn[e];for(const n in Jn)t[e+"-"+n]=Jn[n]}function Zn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function No(e,t,n,i){const r=t.customisations,o=Se(n,r),s=o.attributes,c=e[N],a=Kn(o.body,{...s,width:n.width+"",height:n.height+""}),l=Vn(t.icon),u=Un(e,l,new Set(c&&c.addedClasses)),h={"--svg":jo(a),width:Zn(s.width),height:Zn(s.height),...Po,...i?yt:Qn};r.inline&&(h["vertical-align"]="-0.125em");const _=Wn(e,h,c&&c.addedStyles),m={...t,status:"loaded",addedClasses:u,addedStyles:_};return e[N]=m,e}let Me=!1;function Fo(){Me||(Me=!0,setTimeout(()=>{Me&&(Me=!1,W())}))}function W(e,t=!1){const n=Object.create(null);function i(r,o){const{provider:s,prefix:c,name:a}=r,l=j(s,c),u=l.icons[a];if(u)return{status:"loaded",icon:u};if(l.missing.has(a))return{status:"missing"};if(o&&!fo(r)){const f=n[s]||(n[s]=Object.create(null));(f[c]||(f[c]=new Set)).add(a)}return{status:"loading"}}(e?[e]:ce()).forEach(r=>{const o=typeof r.node=="function"?r.node():r.node;if(!o||!o.querySelectorAll)return;let s=!1,c=!1;function a(l,u,f){if(c||(c=!0,vt(r)),l.tagName.toUpperCase()!=="SVG"){const h=u.mode,_=h==="mask"||(h==="bg"?!1:h==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof _=="boolean"){No(l,u,{...ee,...f},_);return}}Gn(l,u,f)}Mo(o).forEach(({node:l,props:u})=>{const f=l[N];if(!f){const{status:_,icon:m}=i(u.icon,!0);if(m){a(l,u,m);return}s=s||_==="loading",l[N]={...u,status:_};return}let h;if(wo(f,u)){if(h=i(u.icon,f.name!==u.name),!h.icon){s=s||h.status==="loading",Object.assign(f,{...u,status:h.status});return}}else{if(f.status!=="loading")return;if(h=i(u.icon,!1),!h.icon){f.status=h.status;return}}a(l,u,h.icon)}),r.temporary&&!s?Bn(o):t&&s?Dn(o,!0):c&&r.observer&&_t(r)});for(const r in n){const o=n[r];for(const s in o){const c=o[s];pt(Array.from(c).map(a=>({provider:r,prefix:s,name:a})),Fo)}}}function Ro(e){const t=se(e);t?W(t):W({node:e,temporary:!0},!0)}function Xn(e,t,n=!1){const i=re(e);if(!i)return null;const r=U(e),o=Fn(Te,t||{}),s=Gn(document.createElement("span"),{name:e,icon:r,customisations:o},i);return n?s.outerHTML:s}function Ho(){return"3.0.0"}function $o(e,t){return Xn(e,t,!1)}function qo(e,t){return Xn(e,t,!0)}function zo(e,t){const n=re(e);if(!n)return null;const i=Fn(Te,t||{});return Se(n,i)}function Do(e){e?Ro(e):W()}if(typeof document<"u"&&typeof window<"u"){po();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!gn(i))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{yo(W),W()})}function Bo(e,t){kn(e,t!==!1)}function Ko(e){kn(e,!0)}if(Tn("",Zi),typeof document<"u"&&typeof window<"u"){On();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const i="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;In(n,r)||console.error(i)}catch{console.error(i)}}}}const bt={_api:{getAPIConfig:Oe,setAPIModule:Tn,sendAPIQuery:Pn,setFetch:Ui,getFetch:Wi,listAPIProviders:Vi},addAPIProvider:In,loadIcons:pt,loadIcon:ho,iconExists:Fi,getIcon:Ri,listIcons:Pi,addIcon:pn,addCollection:gn,replaceIDs:_n,calculateSize:it,buildIcon:Se,getVersion:Ho,renderSVG:$o,renderHTML:qo,renderIcon:zo,scan:Do,observe:Dn,stopObserving:Bn,pauseObserver:bo,resumeObserver:xo,enableCache:Bo,disableCache:Ko};try{self.Iconify===void 0&&(self.Iconify=bt)}catch{}const Vo=bt.default||bt;JSON.parse('[{"prefix":"tabler","width":24,"height":24,"icons":{"arrow-left":{"body":""},"arrow-right":{"body":""},"brightness-2":{"body":""},"category":{"body":""},"eye":{"body":""},"heart":{"body":""},"list":{"body":""},"menu-2":{"body":""},"message-circle":{"body":""},"search":{"body":""},"share":{"body":""},"stairs-up":{"body":""},"tags":{"body":""},"x":{"body":""}}},{"prefix":"ion","width":512,"height":512,"icons":{"enter":{"body":""}}},{"prefix":"simple-icons","width":24,"height":24,"icons":{"bilibili":{"body":""},"feedly":{"body":""},"github":{"body":""},"telegram":{"body":""},"twitter":{"body":""},"wechat":{"body":""}}},{"prefix":"ps","width":512,"height":512,"icons":{}},{"prefix":"et","width":32,"height":32,"icons":{}},{"prefix":"el","width":1200,"height":1200,"icons":{}},{"prefix":"il","width":750,"height":850,"icons":{}},{"prefix":"ic","width":24,"height":24,"icons":{}},{"prefix":"ci","width":24,"height":24,"icons":{}}]').forEach(e=>Vo.addCollection(e));var xt=!1,wt=!1,z=[];function Uo(e){Wo(e)}function Wo(e){z.includes(e)||z.push(e),Go()}function er(e){let t=z.indexOf(e);t!==-1&&z.splice(t,1)}function Go(){!wt&&!xt&&(xt=!0,queueMicrotask(Qo))}function Qo(){xt=!1,wt=!0;for(let e=0;ee.effect(t,{scheduler:n=>{St?Uo(n):n()}}),tr=e.raw}function nr(e){le=e}function Zo(e){let t=()=>{};return[i=>{let r=le(i);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(r),t=()=>{r!==void 0&&(e._x_effects.delete(r),Le(r))},r},()=>{t()}]}var rr=[],ir=[],or=[];function Xo(e){or.push(e)}function sr(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,ir.push(t))}function es(e){rr.push(e)}function ts(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function cr(e,t){!e._x_attributeCleanups||Object.entries(e._x_attributeCleanups).forEach(([n,i])=>{(t===void 0||t.includes(n))&&(i.forEach(r=>r()),delete e._x_attributeCleanups[n])})}var Ct=new MutationObserver(kt),Et=!1;function ar(){Ct.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Et=!0}function ns(){rs(),Ct.disconnect(),Et=!1}var ue=[],At=!1;function rs(){ue=ue.concat(Ct.takeRecords()),ue.length&&!At&&(At=!0,queueMicrotask(()=>{is(),At=!1}))}function is(){kt(ue),ue.length=0}function O(e){if(!Et)return e();ns();let t=e();return ar(),t}var Ot=!1,je=[];function os(){Ot=!0}function ss(){Ot=!1,kt(je),je=[]}function kt(e){if(Ot){je=je.concat(e);return}let t=[],n=[],i=new Map,r=new Map;for(let o=0;os.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&n.push(s))),e[o].type==="attributes")){let s=e[o].target,c=e[o].attributeName,a=e[o].oldValue,l=()=>{i.has(s)||i.set(s,[]),i.get(s).push({name:c,value:s.getAttribute(c)})},u=()=>{r.has(s)||r.set(s,[]),r.get(s).push(c)};s.hasAttribute(c)&&a===null?l():s.hasAttribute(c)?(u(),l()):u()}r.forEach((o,s)=>{cr(s,o)}),i.forEach((o,s)=>{rr.forEach(c=>c(s,o))});for(let o of n)if(!t.includes(o)&&(ir.forEach(s=>s(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)n.includes(o)||!o.isConnected||(delete o._x_ignoreSelf,delete o._x_ignore,or.forEach(s=>s(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,n=null,i=null,r=null}function lr(e){return de(Q(e))}function fe(e,t,n){return e._x_dataStack=[t,...Q(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(i=>i!==t)}}function ur(e,t){let n=e._x_dataStack[0];Object.entries(t).forEach(([i,r])=>{n[i]=r})}function Q(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?Q(e.host):e.parentNode?Q(e.parentNode):[]}function de(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(n=>Object.keys(n)))),has:(n,i)=>e.some(r=>r.hasOwnProperty(i)),get:(n,i)=>(e.find(r=>{if(r.hasOwnProperty(i)){let o=Object.getOwnPropertyDescriptor(r,i);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let s=o.get,c=o.set,a=o;s=s&&s.bind(t),c=c&&c.bind(t),s&&(s._x_alreadyBound=!0),c&&(c._x_alreadyBound=!0),Object.defineProperty(r,i,{...a,get:s,set:c})}return!0}return!1})||{})[i],set:(n,i,r)=>{let o=e.find(s=>s.hasOwnProperty(i));return o?o[i]=r:e[e.length-1][i]=r,!0}});return t}function fr(e){let t=i=>typeof i=="object"&&!Array.isArray(i)&&i!==null,n=(i,r="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([o,{value:s,enumerable:c}])=>{if(c===!1||s===void 0)return;let a=r===""?o:`${r}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?i[o]=s.initialize(e,a,o):t(s)&&s!==i&&!(s instanceof Element)&&n(s,a)})};return n(e)}function dr(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(i,r,o){return e(this.initialValue,()=>cs(i,r),s=>Tt(i,r,s),r,o)}};return t(n),i=>{if(typeof i=="object"&&i!==null&&i._x_interceptor){let r=n.initialize.bind(n);n.initialize=(o,s,c)=>{let a=i.initialize(o,s,c);return n.initialValue=a,r(o,s,c)}}else n.initialValue=i;return n}}function cs(e,t){return t.split(".").reduce((n,i)=>n[i],e)}function Tt(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Tt(e[t[0]],t.slice(1),n)}}var hr={};function I(e,t){hr[e]=t}function It(e,t){return Object.entries(hr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){let[r,o]=yr(t);return r={interceptor:dr,...r},sr(t,o),i(t,r)},enumerable:!1})}),e}function as(e,t,n,...i){try{return n(...i)}catch(r){he(r,e,t)}}function he(e,t,n=void 0){Object.assign(e,{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message} ${n?'Expression: "'+n+`" -`:""}`,t),setTimeout(()=>{throw e},0)}var je=!0;function Qo(e){let t=je;je=!1,e(),je=t}function G(e,t,n={}){let r;return S(e,t)(i=>r=i,n),r}function S(...e){return sr(...e)}var sr=cr;function Jo(e){sr=e}function cr(e,t){let n={};Ot(n,e);let r=[n,...U(e)];if(typeof t=="function")return Yo(r,t);let i=Xo(r,t,e);return Go.bind(null,e,t,i)}function Yo(e,t){return(n=()=>{},{scope:r={},params:i=[]}={})=>{let o=t.apply(le([r,...e]),i);Le(n,o)}}var It={};function Zo(e,t){if(It[e])return It[e];let n=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(() => { ${e} })()`:e,o=(()=>{try{return new n(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`)}catch(s){return fe(s,t,e),Promise.resolve()}})();return It[e]=o,o}function Xo(e,t,n){let r=Zo(t,n);return(i=()=>{},{scope:o={},params:s=[]}={})=>{r.result=void 0,r.finished=!1;let c=le([o,...e]);if(typeof r=="function"){let a=r(r,c).catch(u=>fe(u,n,t));r.finished?(Le(i,r.result,c,s,n),r.result=void 0):a.then(u=>{Le(i,u,c,s,n)}).catch(u=>fe(u,n,t)).finally(()=>r.result=void 0)}}}function Le(e,t,n,r,i){if(je&&typeof t=="function"){let o=t.apply(n,r);o instanceof Promise?o.then(s=>Le(e,s,n,r)).catch(s=>fe(s,i,t)):e(o)}else e(t)}var Mt="x-";function Q(e=""){return Mt+e}function es(e){Mt=e}var ar={};function v(e,t){ar[e]=t}function kt(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([c,a])=>({name:c,value:a})),s=ur(o);o=o.map(c=>s.find(a=>a.name===c.name)?{name:`x-bind:${c.name}`,value:`"${c.value}"`}:c),t=t.concat(o)}let r={};return t.map(hr((o,s)=>r[o]=s)).filter(_r).map(rs(r,n)).sort(is).map(o=>ns(e,o))}function ur(e){return Array.from(e).map(hr()).filter(t=>!_r(t))}var Tt=!1,de=new Map,lr=Symbol();function ts(e){Tt=!0;let t=Symbol();lr=t,de.set(t,[]);let n=()=>{for(;de.get(t).length;)de.get(t).shift()();de.delete(t)},r=()=>{Tt=!1,n()};e(n),r()}function fr(e){let t=[],n=c=>t.push(c),[r,i]=No(e);return t.push(i),[{Alpine:ge,effect:r,cleanup:n,evaluateLater:S.bind(S,e),evaluate:G.bind(G,e)},()=>t.forEach(c=>c())]}function ns(e,t){let n=()=>{},r=ar[t.type]||n,[i,o]=fr(e);Bo(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(r.inline&&r.inline(e,t,i),r=r.bind(r,e,t,i),Tt?de.get(lr).push(r):r())};return s.runCleanups=o,s}var dr=(e,t)=>({name:n,value:r})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:r}),pr=e=>e;function hr(e=()=>{}){return({name:t,value:n})=>{let{name:r,value:i}=gr.reduce((o,s)=>s(o),{name:t,value:n});return r!==t&&e(r,t),{name:r,value:i}}}var gr=[];function Pt(e){gr.push(e)}function _r({name:e}){return yr().test(e)}var yr=()=>new RegExp(`^${Mt}([^:^.]+)\\b`);function rs(e,t){return({name:n,value:r})=>{let i=n.match(yr()),o=n.match(/:([a-zA-Z0-9\-:]+)/),s=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],c=t||e[n]||n;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(a=>a.replace(".","")),expression:r,original:c}}}var jt="DEFAULT",Fe=["ignore","ref","data","id","bind","init","for","mask","model","modelable","transition","show","if",jt,"teleport"];function is(e,t){let n=Fe.indexOf(e.type)===-1?jt:e.type,r=Fe.indexOf(t.type)===-1?jt:t.type;return Fe.indexOf(n)-Fe.indexOf(r)}function pe(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}var Lt=[],Ft=!1;function mr(e=()=>{}){return queueMicrotask(()=>{Ft||setTimeout(()=>{Rt()})}),new Promise(t=>{Lt.push(()=>{e(),t()})})}function Rt(){for(Ft=!1;Lt.length;)Lt.shift()()}function os(){Ft=!0}function z(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>z(i,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)z(r,t),r=r.nextElementSibling}function J(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ss(){document.body||J("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + + +
+

+ + 目录 +

+
+
+
+ +
diff --git a/templates/tag.html b/templates/tag.html index da67f54..9cafa0c 100644 --- a/templates/tag.html +++ b/templates/tag.html @@ -1,7 +1,7 @@