it-tools/dist/client/assets/chunks/chunk-01813f2c.js

50 lines
22 KiB
JavaScript
Raw Normal View History

2024-04-28 00:48:29 +08:00
import{g as ke,b as Ie}from"./chunk-a740628f.js";import{_ as Te}from"./chunk-d8b8b4f8.js";import{_ as Me}from"./chunk-606d31d4.js";import{_ as Be}from"./chunk-6deddc2e.js";import{T as Fe}from"./chunk-f1ca2155.js";import{d as ce,c as Q,r as $,w as he,h as x,f as Ce,g as se,j as Y,k as ee,l as G,m as F,q as H,S as te,D as Ne,L as ne,z as De,E as xe}from"./chunk-449c23a2.js";import{_ as He}from"./chunk-b6d0d6dd.js";import{_ as Oe,a as Ge}from"./chunk-c69fadad.js";import{_ as Pe}from"./chunk-aa4619b6.js";import{n as ue,o as A,a3 as ze,q as oe,u as Ee,v as de,w as Ae,x as Ue,Y as We}from"../entries/src_pages_Home.page.16dc467b.js";import{p as je}from"./chunk-567e13ca.js";import{N as $e}from"./chunk-1d5b5526.js";import{a as Ve}from"./chunk-82601ccc.js";import{_ as Je}from"./chunk-4515d3e7.js";import"./chunk-a3974c29.js";import"./chunk-27eb844d.js";import"./chunk-9a43cce8.js";import"./chunk-340feaf0.js";import"./chunk-767079b6.js";import"./chunk-55ba3dae.js";import"./chunk-baa77311.js";import"./chunk-78769b89.js";import"./chunk-fd51fbd2.js";import"./chunk-fc34c9a6.js";import"./chunk-66ac4853.js";import"./chunk-2749dac9.js";import"./chunk-015e5c20.js";import"./chunk-416dc92c.js";import"./chunk-26a03a7a.js";import"./chunk-f823181b.js";import"./chunk-9519e52e.js";import"./chunk-f94e2689.js";import"./chunk-af6e0163.js";import"./chunk-b0332f36.js";import"./chunk-f206ee20.js";import"./chunk-05af1949.js";import"./chunk-cf010ec4.js";import"./chunk-ee54c1e8.js";import"./chunk-6d336811.js";const Ke=ue([ue("@keyframes spin-rotate",`
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
`),A("spin-container",{position:"relative"},[A("spin-body",`
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
`,[ze()])]),A("spin-body",`
display: inline-flex;
align-items: center;
justify-content: center;
flex-direction: column;
`),A("spin",`
display: inline-flex;
height: var(--n-size);
width: var(--n-size);
font-size: var(--n-size);
color: var(--n-color);
`,[oe("rotate",`
animation: spin-rotate 2s linear infinite;
`)]),A("spin-description",`
display: inline-block;
font-size: var(--n-font-size);
color: var(--n-text-color);
transition: color .3s var(--n-bezier);
margin-top: 8px;
`),A("spin-content",`
opacity: 1;
transition: opacity .3s var(--n-bezier);
pointer-events: all;
`,[oe("spinning",`
user-select: none;
-webkit-user-select: none;
pointer-events: none;
opacity: var(--n-opacity-spinning);
`)])]),qe={small:20,medium:18,large:16},Xe=Object.assign(Object.assign({},de.props),{description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),Ye=ce({name:"Spin",props:Xe,setup(L){const{mergedClsPrefixRef:I,inlineThemeDisabled:R}=Ee(L),S=de("Spin","-spin",Ke,Ve,L,I),N=Q(()=>{const{size:y}=L,{common:{cubicBezierEaseInOut:v},self:B}=S.value,{opacitySpinning:C,color:D,textColor:O}=B,P=typeof y=="number"?je(y):B[Ae("size",y)];return{"--n-bezier":v,"--n-opacity-spinning":C,"--n-size":P,"--n-color":D,"--n-text-color":O}}),k=R?Ue("spin",Q(()=>{const{size:y}=L;return typeof y=="number"?String(y):y[0]}),N,L):void 0,p=We(L,["spinning","show"]),w=$(!1);return he(y=>{let v;if(p.value){const{delay:B}=L;if(B){v=window.setTimeout(()=>{w.value=!0},B),y(()=>{clearTimeout(v)});return}}w.value=p.value}),{mergedClsPrefix:I,active:w,mergedStrokeWidth:Q(()=>{const{strokeWidth:y}=L;if(y!==void 0)return y;const{size:v}=L;return qe[typeof v=="number"?"medium":v]}),cssVars:R?void 0:N,themeClass:k?.themeClass,onRender:k?.onRender}},render(){var L,I;const{$slots:R,mergedClsPrefix:S,description:N}=this,k=R.icon&&this.rotate,p=(N||R.description)&&x("div",{class:`${S}-spin-description`},N||((L=R.description)===null||L===void 0?void 0:L.call(R))),w=R.icon?x("div",{class:[`${S}-spin-body`,this.themeClass]},x("div",{class:[`${S}-spin`,k&&`${S}-spin--rotate`],style:R.default?"":this.cssVars},R.icon()),p):x("div",{class:[`${S}-spin-body`,this.themeClass]},x($e,{clsPrefix:S,style:R.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${S}-spin`}),p);return(I=this.onRender)===null||I===void 0||I.call(this),R.default?x("div",{class:[`${S}-spin-container`,this.themeClass],style:this.cssVars},x("div",{class:[`${S}-spin-content`,this.active&&`${S}-spin-content--spinning`]},R),x(Ce,{name:"fade-in-transition"},{default:()=>this.active?w:null})):w}});var me={exports:{}};(function(L){const I=(()=>{const p={},w={font:"Standard",fontPath:"./fonts"};function y(n,i){let e={},t,r,l,u,s=[[16384,"vLayout",2],[8192,"vLayout",1],[4096,"vRule5",!0],[2048,"vRule4",!0],[1024,"vRule3",!0],[512,"vRule2",!0],[256,"vRule1",!0],[128,"hLayout",2],[64,"hLayout",1],[32,"hRule6",!0],[16,"hRule5",!0],[8,"hRule4",!0],[4,"hRule3",!0],[2,"hRule2",!0],[1,"hRule1",!0]];for(t=i!==null?i:n,r=0,l=s.length;r<l;)u=s[r],t>=u[0]?(t=t-u[0],e[u[1]]=typeof e[u[1]]>"u"?u[2]:e[u[1]]):u[1]!=="vLayout"&&u[1]!=="hLayout"&&(e[u[1]]=!1),r++;return typeof e.hLayout>"u"?n===0?e.hLayout=1:n===-1?e.hLayout=0:e.hRule1||e.hRule2||e.hRule3||e.hRule4||e.hRule5||e.hRule6?e.hLayout=3:e.hLayout=2:e.hLayout===2&&(e.hRule1||e.hRule2||e.hRule3||e.hRule4||e.hRule5||e.hRule6)&&(e.hLayout=3),typeof e.vLayout>"u"?e.vRule1||e.vRule2||e.vRule3||e.vRule4||e.vRule5?e.vLayout=3:e.vLayout=0:e.vLayout===2&&(e.vRule1||e.vRule2||e.vRule3||e.vRule4||e.vRule5)&&(e.vLayout=3),e}function v(n,i,e){return n===i&&n!==e?n:!1}function B(n,i){let e="|/\\[]{}()<>";if(n==="_"){if(e.indexOf(i)!==-1)return i}else if(i==="_"&&e.indexOf(n)!==-1)return n;return!1}function C(n,i){let e="| /\\ [] {} () <>",t=e.indexOf(n),r=e.indexOf(i);if(t!==-1&&r!==-1&&t!==r&&Math.abs(t-r)!==1){const l=Math.max(t,r),u=l+1;return e.substring(l,u)}return!1}function D(n,i){let e="[] {} ()",t=e.indexOf(n),r=e.indexOf(i);return t!==-1&&r!==-1&&Math.abs(t-r)<=1?"|":!1}function O(n,i){let e="/\\ \\/ ><",t={0:"|",3:"Y",6:"X"},r=e.indexOf(n),l=e.indexOf(i);return r!==-1&&l!==-1&&l-r===1?t[r]:!1}function P(n,i,e){return n===e&&i===e?e:!1}function U(n,i){return n===i?n:!1}function V(n,i){let e="|/\\[]{}()<>";if(n==="_"){if(e.indexOf(i)!==-1)return i}else if(i==="_"&&e.indexOf(n)!==-1)return n;return!1}function J(n,i){let e="| /\\ [] {} () <>",t=e.indexOf(n),r=e.indexOf(i);if(t!==-1&&r!==-1&&t!==r&&Math.abs(t-r)!==1){const l=Math.max(t,r),u=l+1;return e.substring(l,u)}return!1}function K(n,i){return n==="-"&&i==="_"||n==="_"&&i==="-"?"=":!1}function q(n,i){return n==="|"&&i
`).replace(/\r/g,`
`);let t=e.split(`
`),r=[],l,u,s;for(u=t.length,l=0;l<u;l++)r=r.concat(Le(t[l],p[n],i));for(u=r.length,s=r[0],l=1;l<u;l++)s=Se(s,r[l],i);return s?s.join(`
`):""};function le(n,i){let e=JSON.parse(JSON.stringify(n)),t,r;if(typeof i.horizontalLayout<"u"){t=we(i.horizontalLayout,n);for(r in t)t.hasOwnProperty(r)&&(e.fittingRules[r]=t[r])}if(typeof i.verticalLayout<"u"){t=be(i.verticalLayout,n);for(r in t)t.hasOwnProperty(r)&&(e.fittingRules[r]=t[r])}return e.printDirection=typeof i.printDirection<"u"?i.printDirection:n.printDirection,e.showHardBlanks=i.showHardBlanks||!1,e.width=i.width||-1,e.whitespaceBreak=i.whitespaceBreak||!1,e}const b=function(n,i,e){return b.text(n,i,e)};return b.text=async function(n,i,e){let t="";return n=n+"",typeof arguments[1]=="function"&&(e=i,i={},i.font=w.font),typeof i=="string"?(t=i,i={}):(i=i||{},t=i.font||w.font),await new Promise((r,l)=>{b.loadFont(t,function(u,s){if(u){l(u),e&&e(u);return}const a=re(t,le(s,i),n);r(a),e&&e(null,a)})})},b.textSync=function(n,i){let e="";n=n+"",typeof i=="string"?(e=i,i={}):(i=i||{},e=i.font||w.font);var t=le(b.loadFontSync(e),i);return re(e,t,n)},b.metadata=function(n,i){n=n+"",b.loadFont(n,function(e,t){if(e){i(e);return}i(null,t,p[n].comment)})},b.defaults=function(n){if(typeof n=="object"&&n!==null)for(var i in n)n.hasOwnProperty(i)&&(w[i]=n[i]);return JSON.parse(JSON.stringify(w))},b.parseFont=function(n,i){i=i.replace(/\r\n/g,`
`).replace(/\r/g,`
`),p[n]={};var e=i.split(`
`),t=e.splice(0,1)[0].split(" "),r=p[n],l={};if(l.hardBlank=t[0].substr(5,1),l.height=parseInt(t[1],10),l.baseline=parseInt(t[2],10),l.maxLength=parseInt(t[3],10),l.oldLayout=parseInt(t[4],10),l.numCommentLines=parseInt(t[5],10),l.printDirection=t.length>=6?parseInt(t[6],10):0,l.fullLayout=t.length>=7?parseInt(t[7],10):null,l.codeTagCount=t.length>=8?parseInt(t[8],10):null,l.fittingRules=y(l.oldLayout,l.fullLayout),r.options=l,l.hardBlank.length!==1||isNaN(l.height)||isNaN(l.baseline)||isNaN(l.maxLength)||isNaN(l.oldLayout)||isNaN(l.numCommentLines))throw new Error("FIGlet header contains invalid values.");let u=[],s;for(s=32;s<=126;s++)u.push(s);if(u=u.concat(196,214,220,228,246,252,223),e.length<l.numCommentLines+l.height*u.length)throw new Error("FIGlet file is missing data.");let a,o,d=!1;for(r.comment=e.splice(0,l.numCommentLines).join(`
`),r.numChars=0;e.length>0&&r.numChars<u.length;){for(a=u[r.numChars],r[a]=e.splice(0,l.height),s=0;s<l.height;s++)typeof r[a][s]>"u"?r[a][s]="":(o=new RegExp("\\"+r[a][s].substr(r[a][s].length-1,1)+"+$"),r[a][s]=r[a][s].replace(o,""));r.numChars++}for(;e.length>0;){if(a=e.splice(0,1)[0].split(" ")[0],/^0[xX][0-9a-fA-F]+$/.test(a))a=parseInt(a,16);else if(/^0[0-7]+$/.test(a))a=parseInt(a,8);else if(/^[0-9]+$/.test(a))a=parseInt(a,10);else if(/^-0[xX][0-9a-fA-F]+$/.test(a))a=parseInt(a,16);else{if(a==="")break;console.log("Invalid data:"+a),d=!0;break}for(r[a]=e.splice(0,l.height),s=0;s<l.height;s++)typeof r[a][s]>"u"?r[a][s]="":(o=new RegExp("\\"+r[a][s].substr(r[a][s].length-1,1)+"+$"),r[a][s]=r[a][s].replace(o,""));r.numChars++}if(d===!0)throw new Error("Error parsing data.");return l},b.loadFont=function(n,i){if(p[n]){i(null,p[n].options);return}if(typeof fetch!="function")throw console.error("figlet.js requires the fetch API or a fetch polyfill such as https://cdnjs.com/libraries/fetch"),new Error("fetch is required for figlet.js to work.");fetch(w.fontPath+"/"+n+".flf").then(function(e){if(e.ok)return e.text();throw console.log("Unexpected response",e),new Error("Network response was not ok.")}).then(function(e){i(null,b.parseFont(n,e))}).catch(i)},b.loadFontSync=function(n){if(p[n])return p[n].options;throw new Error("synchronous font loading is not implemented for the browser")},b.preloadFonts=function(n,i){let e=[];n.reduce(function(t,r){return t.then(function(){return fetch(w.fontPath+"/"+r+".flf").then(l=>l.text()).then(function(l){e.push(l)})})},Promise.resolve()).then(function(t){for(var r in n)n.hasOwnProperty(r)&&b.parseFont(n[r],e[r]);i&&i()})},b.figFonts=p,b})();L.exports=I})(me);var Ze=me.exports;const fe=ke(Ze),Qe={key:0,flex:"","items-center":"","justify-center":""},et=xe("span",{class:"ml-2"},"Loading font...",-1),Et=ce({__name:"ascii-text-drawer",setup(L){const I=$("Ascii ART"),R=se("ascii-text-drawer:font","Standard"),S=se("ascii-text-drawer:width",80),N=$(""),k=$(!1),p=$(!1);fe.defaults({fontPath:"//unpkg.com/figlet@1.6.0/fonts/"}),he(async()=>{p.value=!0;try{const y={font:R.value,width:S.value,whitespaceBreak:!0};N.value=await new Promise((v,B)=>fe.text(I.value,y,(C,D)=>{if(C){B(C);return}v(D??"")})),k.value=!1}catch{k.value=!0}p.value=!1});const w=["1Row","3-D","3D Diagonal","3D-ASCII","3x5","4Max","5 Line Oblique","AMC 3 Line","AMC 3 Liv1","AMC AAA01","AMC Neko","AMC Razor","AMC Razor2","AMC Slash","AMC Slider","AMC Thin","AMC Tubes","AMC Untitled","ANSI Shadow","ASCII New Roman","Acrobatic","Alligator","Alligator2","Alpha","Alphabet","Arrows","Avatar","B1FF","B1FF","Banner","Banner3-D","Banner3","Banner4","Barbwire","Basic","Bear","Bell","Benjamin","Big Chief","Big Money-ne","Big Money-nw","Big Money-se","Big Money-sw","Big","Bigfig","Binary","Block","Blocks","Bloody","Bolger","Braced","Bright","Broadway KB","Broadway","Bubble","Bulbhead","Caligraphy","Caligraphy2","Calvin S","Cards","Catwalk","Chiseled","Chunky","Coinstak","Cola","Colossal","Computer","Contessa","Contrast","Cosmike","Crawford","Crawford2","Crazy","Cricket","Cursive","Cyberlarge","Cybermedium","Cybersmall","Cygnet","DANC4","DOS Rebel","DWhistled","Dancing Font","Decimal","Def Leppard","Delta Corps Priest 1","Diamond","Diet Cola","Digital","Doh","Doom","Dot Matrix","Double Shorts","Double","Dr Pepper","Efti Chess","Efti Font","Efti Italic","Efti Piti","Efti Robot","Efti Wall","Efti Water","Electronic","Elite","Epic","Fender","Filter","Fire Font-k","Fire Font-s","Flipped","Flower Power","Four Tops","Fraktur","Fun Face","Fun Faces","Fuzzy","Georgi16","Georgia11","Ghost","Ghoulish","Glenyn","Goofy","Gothic","Graceful","Gradient","Graffiti","Greek","Heart Left","Heart Right","Henry 3D","Hex","Hieroglyphs","Hollywood","Horizontal Left","Horizontal Right","ICL-1900","Impossible","Invita","Isometric1","Isometric2","Isometric3","Isometric4","Italic","Ivrit","JS Block Letters","JS Bracket Letters","JS Capital Curves","JS Cursive","JS Stick Letters","Jacky","Jazmine","Jerusalem","Katakana","Kban","Keyboard","Knob","Konto Slant","Konto","