3 lines
71 KiB
JavaScript
3 lines
71 KiB
JavaScript
|
function Wn(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}function Vn(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=re(s)?Ci(s):Vn(s);if(r)for(const i in r)t[i]=r[i]}return t}else{if(re(e))return e;if(ee(e))return e}}const bi=/;(?![^(]*\))/g,yi=/:([^]+)/,wi=/\/\*.*?\*\//gs;function Ci(e){const t={};return e.replace(wi,"").split(bi).forEach(n=>{if(n){const s=n.split(yi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function qn(e){let t="";if(re(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const s=qn(e[n]);s&&(t+=s+" ")}else if(ee(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const xi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ei=Wn(xi);function rr(e){return!!e||e===""}const xc=e=>re(e)?e:e==null?"":N(e)||ee(e)&&(e.toString===cr||!U(e.toString))?JSON.stringify(e,ir,2):String(e),ir=(e,t)=>t&&t.__v_isRef?ir(e,t.value):ut(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:or(t)?{[`Set(${t.size})`]:[...t.values()]}:ee(t)&&!N(t)&&!fr(t)?String(t):t,te={},ft=[],Re=()=>{},Ti=()=>!1,vi=/^on[^a-z]/,Lt=e=>vi.test(e),zn=e=>e.startsWith("onUpdate:"),le=Object.assign,Yn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ai=Object.prototype.hasOwnProperty,q=(e,t)=>Ai.call(e,t),N=Array.isArray,ut=e=>on(e)==="[object Map]",or=e=>on(e)==="[object Set]",U=e=>typeof e=="function",re=e=>typeof e=="string",Jn=e=>typeof e=="symbol",ee=e=>e!==null&&typeof e=="object",lr=e=>ee(e)&&U(e.then)&&U(e.catch),cr=Object.prototype.toString,on=e=>cr.call(e),Oi=e=>on(e).slice(8,-1),fr=e=>on(e)==="[object Object]",Xn=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Tt=Wn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ln=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ri=/-(\w)/g,Se=ln(e=>e.replace(Ri,(t,n)=>n?n.toUpperCase():"")),Ii=/\B([A-Z])/g,it=ln(e=>e.replace(Ii,"-$1").toLowerCase()),cn=ln(e=>e.charAt(0).toUpperCase()+e.slice(1)),Yt=ln(e=>e?`on${cn(e)}`:""),Rt=(e,t)=>!Object.is(e,t),wn=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Qt=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Pi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Fi=e=>{const t=re(e)?Number(e):NaN;return isNaN(t)?e:t};let _s;const Mi=()=>_s||(_s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let _e;class Si{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_e,!t&&_e&&(this.index=(_e.scopes||(_e.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_e;try{return _e=this,t()}finally{_e=n}}}on(){_e=this}off(){_e=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function Li(e,t=_e){t&&t.active&&t.effects.push(e)}function Ni(){return _e}function Ec(e){_e&&_e.cleanups.push(e)}const Zn=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ur=e=>(e.w&Ve)>0,ar=e=>(e.n&Ve)>0,$i=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Ve},Hi=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const r=t[s];ur(r)&&!ar(r)?r.delete(e):t[n++]=r,r.w&=~Ve,r.n&=~Ve}t.length=n}},In=new WeakMap;let Et=0,Ve=1;const Pn=30;let Ae;const st=Symbol(""),Fn=Symbol("");class Qn{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Li(this,s)}run(){if(!this.active)return this.fn();let t=Ae,n=ke;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=Ae,Ae=this,ke=!0,Ve=1<<++Et,Et<=Pn?$i(this):bs(this),this.fn()}finally{Et<=Pn&&Hi(this),Ve=1<<--Et,Ae=thi
|
||
|
`),l=l.slice(0,-1),o&&(l=l.replace(/^ *(\$|>) /gm,"").trim()),Cc(l).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const f=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,f)})}})}}async function Cc(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function Qc(){Ce&&window.addEventListener("click",e=>{var n,s;const t=e.target;if(t.matches(".vp-code-group input")){const r=(n=t.parentElement)==null?void 0:n.parentElement,i=Array.from((r==null?void 0:r.querySelectorAll("input"))||[]).indexOf(t),o=r==null?void 0:r.querySelector('div[class*="language-"].active'),l=(s=r==null?void 0:r.querySelectorAll('div[class*="language-"]:not(.language-id)'))==null?void 0:s[i];o&&l&&o!==l&&(o.classList.remove("active"),l.classList.add("active"))}})}export{$c as $,Sc as A,al as B,oe as C,Ac as D,Nc as E,de as F,Oc as G,fi as H,Ce as I,wr as J,Rc as K,Tc as L,vc as M,Mc as N,Kc as O,Dc as P,ht as Q,Ro as R,Uo as S,li as T,Vc as U,fo as V,Vn as W,Hc as X,Pc as Y,Po as Z,Uc as _,si as a,Lc as a0,Yc as a1,Jc as a2,Zc as a3,Qc as a4,jn as a5,dc as a6,kc as a7,fc as a8,zc as a9,Xc as aa,nt as ab,Bc as ac,qc as ad,ac as ae,jc as af,ao as b,Fc as c,Br as d,Te as e,Tr as f,us as g,Nt as h,Ir as i,Ni as j,Ec as k,Io as l,sc as m,qn as n,Qr as o,Gs as p,nc as q,Ic as r,pi as s,xc as t,Wc as u,$t as v,Jt as w,ni as x,ei as y,xo as z};
|