zxq-com 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zxq-com.cjs +2 -2
- package/dist/zxq-com.d.ts +3 -1
- package/dist/zxq-com.js +234 -232
- package/dist/zxq-ws.cjs +1 -1
- package/dist/zxq-ws.d.ts +1 -1
- package/dist/zxq-ws.js +1 -1
- package/dist/{zxqWs-C2Wd4l7l.js → zxqWs-C022zpUT.js} +44 -34
- package/dist/zxqWs-cSNAJKbM.cjs +1 -0
- package/package.json +1 -1
- package/dist/zxqWs-CcOHMxml.cjs +0 -1
package/dist/zxq-com.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./zxqWs-
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./zxqWs-cSNAJKbM.cjs`);let t=require(`vue`);const n={iconApi:`https://api.iconify.design`};function r(e){Object.assign(n,e)}function i(e){let t=`.`,n=`__`,r=`--`,i;if(e){let i=e.blockPrefix;i&&(t=i),i=e.elementPrefix,i&&(n=i),i=e.modifierPrefix,i&&(r=i)}let a={install(e){i=e.c;let t=e.context;t.bem={},t.bem.b=null,t.bem.els=null}};function o(e){let n,r;return{before(e){n=e.bem.b,r=e.bem.els,e.bem.els=null},after(e){e.bem.b=n,e.bem.els=r},$({context:n,props:r}){return e=typeof e==`string`?e:e({context:n,props:r}),n.bem.b=e,`${r?.bPrefix||t}${n.bem.b}`}}}function s(e){let r;return{before(e){r=e.bem.els},after(e){e.bem.els=r},$({context:r,props:i}){return e=typeof e==`string`?e:e({context:r,props:i}),r.bem.els=e.split(`,`).map(e=>e.trim()),r.bem.els.map(e=>`${i?.bPrefix||t}${r.bem.b}${n}${e}`).join(`, `)}}}function c(e){return{$({context:i,props:a}){e=typeof e==`string`?e:e({context:i,props:a});let o=e.split(`,`).map(e=>e.trim());function s(e){return o.map(o=>`&${a?.bPrefix||t}${i.bem.b}${e===void 0?``:`${n}${e}`}${r}${o}`).join(`, `)}let c=i.bem.els;if(c!==null){if(process.env.NODE_ENV!==`production`&&c.length>=2)throw Error(`[css-render/plugin-bem]: m(${e}) is invalid, using modifier inside multiple elements is not allowed`);return s(c[0])}else return s()}}}function l(e){return{$({context:i,props:a}){e=typeof e==`string`?e:e({context:i,props:a});let o=i.bem.els;if(process.env.NODE_ENV!==`production`&&o!==null&&o.length>=2)throw Error(`[css-render/plugin-bem]: notM(${e}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${a?.bPrefix||t}${i.bem.b}${o!==null&&o.length>0?`${n}${o[0]}`:``}${r}${e})`}}}return Object.assign(a,{cB:((...e)=>i(o(e[0]),e[1],e[2])),cE:((...e)=>i(s(e[0]),e[1],e[2])),cM:((...e)=>i(c(e[0]),e[1],e[2])),cNotM:((...e)=>i(l(e[0]),e[1],e[2]))}),a}function a(e){let t=0;for(let n=0;n<e.length;++n)e[n]===`&`&&++t;return t}var o=/\s*,(?![^(]*\))\s*/g,s=/\s+/g;function c(e,t){let n=[];return t.split(o).forEach(t=>{let r=a(t);if(r){if(r===1){e.forEach(e=>{n.push(t.replace(`&`,e))});return}}else{e.forEach(e=>{n.push((e&&e+` `)+t)});return}let i=[t];for(;r--;){let t=[];i.forEach(n=>{e.forEach(e=>{t.push(n.replace(`&`,e))})}),i=t}i.forEach(e=>n.push(e))}),n}function l(e,t){let n=[];return t.split(o).forEach(t=>{e.forEach(e=>{n.push((e&&e+` `)+t)})}),n}function u(e){let t=[``];return e.forEach(e=>{e&&=e.trim(),e&&(t=e.includes(`&`)?c(t,e):l(t,e))}),t.join(`, `).replace(s,` `)}function d(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function f(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function p(e){let t=document.createElement(`style`);return t.setAttribute(`cssr-id`,e),t}function m(e){return e?/^\s*@(s|m)/.test(e):!1}var h=/[A-Z]/g;function g(e){return e.replace(h,e=>`-`+e.toLowerCase())}function _(e,t=` `){return typeof e==`object`&&e?` {
|
|
2
2
|
`+Object.entries(e).map(e=>t+` ${g(e[0])}: ${e[1]};`).join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`+t+`}`:`: ${e};`}function v(e,t,n){return typeof e==`function`?e({context:t.context,props:n}):e}function y(e,t,n,r){if(!t)return``;let i=v(t,n,r);if(!i)return``;if(typeof i==`string`)return`${e} {\n${i}\n}`;let a=Object.keys(i);if(a.length===0)return n.config.keepEmptyBlock?e+` {
|
|
@@ -1316,4 +1316,4 @@ Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./zxqWs-
|
|
|
1316
1316
|
-webkit-user-select: none;
|
|
1317
1317
|
pointer-events: none;
|
|
1318
1318
|
opacity: var(--n-opacity-spinning);
|
|
1319
|
-
`)])]),Iv={small:20,medium:18,large:16};const Lv=Object.assign(Object.assign({},Z.props),{contentClass:String,contentStyle:[Object,String],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});var Rv=(0,t.defineComponent)({name:`Spin`,props:Lv,slots:Object,setup(e){process.env.NODE_ENV!==`production`&&(0,t.watchEffect)(()=>{e.spinning!==void 0&&ti(`spin`,"`spinning` is deprecated, please use `show` instead.")});let{mergedClsPrefixRef:n,inlineThemeDisabled:r}=bi(e),i=Z(`Spin`,`-spin`,Fv,Pv,e,n),a=(0,t.computed)(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:r}=i.value,{opacitySpinning:a,color:o,textColor:s}=r,c=typeof t==`number`?fe(t):r[U(`size`,t)];return{"--n-bezier":n,"--n-opacity-spinning":a,"--n-size":c,"--n-color":o,"--n-text-color":s}}),o=r?xi(`spin`,(0,t.computed)(()=>{let{size:t}=e;return typeof t==`number`?String(t):t[0]}),a,e):void 0,s=ut(e,[`spinning`,`show`]),c=(0,t.ref)(!1);return(0,t.watchEffect)(t=>{let n;if(s.value){let{delay:r}=e;if(r){n=window.setTimeout(()=>{c.value=!0},r),t(()=>{clearTimeout(n)});return}}c.value=s.value}),{mergedClsPrefix:n,active:c,mergedStrokeWidth:(0,t.computed)(()=>{let{strokeWidth:t}=e;if(t!==void 0)return t;let{size:n}=e;return Iv[typeof n==`number`?`medium`:n]}),cssVars:r?void 0:a,themeClass:o?.themeClass,onRender:o?.onRender}},render(){var e;let{$slots:n,mergedClsPrefix:r,description:i}=this,a=n.icon&&this.rotate,o=(i||n.description)&&(0,t.h)(`div`,{class:`${r}-spin-description`},i||n.description?.call(n)),s=n.icon?(0,t.h)(`div`,{class:[`${r}-spin-body`,this.themeClass]},(0,t.h)(`div`,{class:[`${r}-spin`,a&&`${r}-spin--rotate`],style:n.default?``:this.cssVars},n.icon()),o):(0,t.h)(`div`,{class:[`${r}-spin-body`,this.themeClass]},(0,t.h)(Um,{clsPrefix:r,style:n.default?``:this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${r}-spin`}),o);return(e=this.onRender)==null||e.call(this),n.default?(0,t.h)(`div`,{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},(0,t.h)(`div`,{class:[`${r}-spin-content`,this.active&&`${r}-spin-content--spinning`,this.contentClass],style:this.contentStyle},n),(0,t.h)(t.Transition,{name:`fade-in-transition`},{default:()=>this.active?s:null})):s}}),zv=`2.43.2`;function Bv({componentPrefix:e=`N`,components:t=[]}={}){let n=[];function r(t,n,r){t.component(e+n)||t.component(e+n,r)}function i(e){n.includes(e)||(n.push(e),t.forEach(t=>{let{name:n,alias:i}=t;r(e,n,t),i&&i.forEach(n=>{r(e,n,t)})}))}return{version:zv,componentPrefix:e,install:i}}var Vv=Bv;function Hv(e,t=.2){if(!e)return``;e=e.replace(`#`,``),e.length===3&&(e=e.split(``).map(e=>e+e).join(``));let n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16);return n=Math.floor(n*(1-t)),r=Math.floor(r*(1-t)),i=Math.floor(i*(1-t)),`#`+[n,r,i].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Uv(e,t=.2){if(!e)return``;e=e.replace(`#`,``),e.length===3&&(e=e.split(``).map(e=>e+e).join(``));let n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16);return n=Math.min(255,Math.floor(n+(255-n)*t)),r=Math.min(255,Math.floor(r+(255-r)*t)),i=Math.min(255,Math.floor(i+(255-i)*t)),`#`+[n,r,i].map(e=>e.toString(16).padStart(2,`0`)).join(``)}var Wv=Vv({components:[C_,o_,wg,sv,Z_,Rv,jv]}),Gv={inlineThemeDisabled:!0,mergedBorderedRef:(0,t.ref)(),mergedBreakpointsRef:(0,t.ref)(),mergedClsPrefixRef:(0,t.ref)(`n`),mergedComponentPropsRef:(0,t.ref)(),mergedDateLocaleRef:(0,t.ref)(),mergedHljsRef:(0,t.ref)(),mergedIconsRef:(0,t.ref)(),mergedKatexRef:(0,t.ref)(),mergedLocaleRef:(0,t.ref)(`zh-CN`),mergedNamespaceRef:(0,t.ref)(),mergedRtlRef:(0,t.ref)(),mergedThemeHashRef:(0,t.ref)(`15czh83`),mergedThemeRef:(0,t.ref)(),preflightStyleDisabled:!1,styleMountTarget:void 0,mergedThemeOverridesRef:(0,t.ref)()},Kv={install(e){if(e.use(Wv),n.theme){let{primaryColor:e,primaryColorHover:r,primaryColorPressed:i,primaryColorSuppl:a}=n.theme?.common||{};e&&(n.theme.common={primaryColor:e,primaryColorHover:r||Uv(e,.3),primaryColorPressed:i||Hv(e,.3),primaryColorSuppl:a||e}),Object.assign(Gv,{mergedThemeOverridesRef:(0,t.ref)(n?.theme)})}e.provide(`n-config-provider`,Gv)}},qv={class:`zxq-button`},Jv=(0,t.defineComponent)({name:`ZButton`,__name:`Button`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,qv,[(0,t.renderSlot)(e.$slots,`default`)]))}}),Yv=Jv,Xv=/^[a-z0-9]+(-[a-z0-9]+)*$/,Zv=(e,t,n,r=``)=>{let 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){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Qv(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Qv(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Qv(e,n)?null:e}return null},Qv=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1,$v=Object.freeze({left:0,top:0,width:16,height:16}),ey=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ty=Object.freeze({...$v,...ey}),ny=Object.freeze({...ty,body:``,hidden:!1});function ry(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function iy(e,t){let n=ry(e,t);for(let r in ny)r in ey?r in e&&!(r in n)&&(n[r]=ey[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ay(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function oy(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=iy(r[e]||i[e],a)}return o(t),n.forEach(o),iy(e,a)}function sy(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=ay(e);for(let i in r){let a=r[i];a&&(t(i,oy(e,i,a)),n.push(i))}return n}var cy={provider:``,aliases:{},not_found:{},...$v};function ly(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function uy(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!ly(e,cy))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!ly(t,ny))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!ly(t,ny))return null}return t}var dy=Object.create(null);function fy(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function py(e,t){let n=dy[e]||(dy[e]=Object.create(null));return n[t]||(n[t]=fy(e,t))}function my(e,t){return uy(t)?sy(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function hy(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var gy=!1;function _y(e){return typeof e==`boolean`&&(gy=e),gy}function vy(e){let t=typeof e==`string`?Zv(e,!0,gy):e;if(t){let e=py(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function yy(e,t){let n=Zv(e,!0,gy);if(!n)return!1;let r=py(n.provider,n.prefix);return t?hy(r,n.name,t):(r.missing.add(n.name),!0)}function by(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),gy&&!t&&!e.prefix){let t=!1;return uy(e)&&(e.prefix=``,sy(e,(e,n)=>{yy(e,n)&&(t=!0)})),t}let n=e.prefix;return Qv({prefix:n,name:`a`})?!!my(py(t,n),e):!1}var xy=Object.freeze({width:null,height:null}),Sy=Object.freeze({...xy,...ey}),Cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ty(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(Cy);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=wy.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Ey(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Dy(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Oy(e,t,n){let r=Ey(e);return Dy(r.defs,t+r.content+n)}var ky=e=>e===`unset`||e===`undefined`||e===`none`;function Ay(e,t){let n={...ty,...e},r={...Sy,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Oy(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Ty(d,c/l)):(u=o===`auto`?c:o,d=s===null?Ty(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{ky(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var jy=/\sid="(\S+)"/g,My=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),Ny=0;function Py(e,t=My){let n=[],r;for(;r=jy.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(Ny++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}var Fy=Object.create(null);function Iy(e,t){Fy[e]=t}function Ly(e){return Fy[e]||Fy[``]}function Ry(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}}for(var zy=Object.create(null),By=[`https://api.simplesvg.com`,`https://api.unisvg.com`],Vy=[];By.length>0;)By.length===1||Math.random()>.5?Vy.push(By.shift()):Vy.push(By.pop());zy[``]=Ry({resources:[`https://api.iconify.design`].concat(Vy)});function Hy(e,t){let n=Ry(t);return n===null?!1:(zy[e]=n,!0)}function Uy(e){return zy[e]}var Wy=()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}},Gy=Wy();function Ky(e,t){let n=Uy(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{let n=t;e=Math.max(e,n.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function qy(e){return e===404}var Jy=(e,t,n)=>{let r=[],i=Ky(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Yy(e){if(typeof e==`string`){let t=Uy(e);if(t)return t.path}return`/`}var Xy=(e,t,n)=>{if(!Gy){n(`abort`,424);return}let r=Yy(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Gy(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(qy(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})},Zy={prepare:Jy,send:Xy};function Qy(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=py(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function $y(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function eb(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||$y([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var tb=0;function nb(e,t,n){let r=tb++,i=$y.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function rb(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Zv(e,t,n):e;i&&r.push(i)}),r}var ib={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ab(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function ob(e){let t={...ib,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=ab(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function sb(){}var cb=Object.create(null);function lb(e){if(!cb[e]){let t=Uy(e);if(!t)return;cb[e]={config:t,redundancy:ob(t)}}return cb[e]}function ub(e,t,n){let r,i;if(typeof e==`string`){let t=Ly(e);if(!t)return n(void 0,424),sb;i=t.send;let a=lb(e);a&&(r=a.redundancy)}else{let t=Ry(e);if(t){r=ob(t);let n=Ly(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),sb):r.query(t,i,n)().abort}function db(){}function fb(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,eb(e)}))}function pb(e){let t=[],n=[];return e.forEach(e=>{(e.match(Xv)?t:n).push(e)}),{valid:t,invalid:n}}function mb(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!my(e,n).length){r();return}}catch(e){console.error(e)}r(),fb(e)}function hb(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function gb(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){hb(e.loadIcons(r,n,t),t=>{mb(e,r,t)});return}if(i){r.forEach(r=>{hb(i(r,n,t),t=>{mb(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=pb(r);if(o.length&&mb(e,o,null),!a.length)return;let s=n.match(Xv)?Ly(t):null;if(!s){mb(e,a,null);return}s.prepare(t,n,a).forEach(n=>{ub(t,n,t=>{mb(e,n.icons,t)})})}))}var _b=(e,t)=>{let n=Qy(rb(e,!0,_y()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,db)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(py(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=py(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&gb(e,t)}),t?nb(t,n,i):db};function vb(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in xy?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var yb=/[\s,]+/;function bb(e,t){t.split(yb).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}function xb(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Sb(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Cb(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function wb(e){return`data:image/svg+xml,`+Cb(e)}function Tb(e){return`url("`+wb(e)+`")`}var Eb={...Sy,inline:!1},Db={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},Ob={display:`inline-block`},kb={backgroundColor:`currentColor`},Ab={backgroundColor:`transparent`},jb={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},Mb={webkitMask:kb,mask:kb,background:Ab};for(let e in Mb){let t=Mb[e];for(let n in jb)t[e+n]=jb[n]}var Nb={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;Nb[e+`-flip`]=t,Nb[e.slice(0,1)+`-flip`]=t,Nb[e+`Flip`]=t});function Pb(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var Fb=(e,n)=>{let r=vb(Eb,n),i={...Db},a=n.mode||`svg`,o={},s=n.style,c=typeof s==`object`&&!(s instanceof Array)?s:{};for(let e in n){let t=n[e];if(t!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:break;case`inline`:case`hFlip`:case`vFlip`:r[e]=t===!0||t===`true`||t===1;break;case`flip`:typeof t==`string`&&bb(r,t);break;case`color`:o.color=t;break;case`rotate`:typeof t==`string`?r[e]=xb(t):typeof t==`number`&&(r[e]=t);break;case`ariaHidden`:case`aria-hidden`:t!==!0&&t!==`true`&&delete i[`aria-hidden`];break;default:{let n=Nb[e];n?(t===!0||t===`true`||t===1)&&(r[n]=!0):Eb[e]===void 0&&(i[e]=t)}}}let l=Ay(e,r),u=l.attributes;if(r.inline&&(o.verticalAlign=`-0.125em`),a===`svg`){i.style={...o,...c},Object.assign(i,u);let e=0,r=n.id;return typeof r==`string`&&(r=r.replace(/-/g,`_`)),i.innerHTML=Py(l.body,r?()=>r+`ID`+ e++:`iconifyVue`),(0,t.h)(`svg`,i)}let{body:d,width:f,height:p}=e,m=a===`mask`||(a===`bg`?!1:d.indexOf(`currentColor`)!==-1),h=Sb(d,{...u,width:f+``,height:p+``});return i.style={...o,"--svg":Tb(h),width:Pb(u.width),height:Pb(u.height),...Ob,...m?kb:Ab,...c},(0,t.h)(`span`,i)};if(_y(!0),Iy(``,Zy),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!by(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Hy(e,r)||console.error(n)}catch{console.error(n)}}}}var Ib={...ty,body:``},Lb=(0,t.defineComponent)((e,{emit:n})=>{let r=(0,t.ref)(null);function i(){r.value&&=(r.value.abort?.(),null)}let a=(0,t.ref)(!!e.ssr),o=(0,t.ref)(``),s=(0,t.shallowRef)(null);function c(){let a=e.icon;if(typeof a==`object`&&a&&typeof a.body==`string`)return o.value=``,{data:a};let s;if(typeof a!=`string`||(s=Zv(a,!1,!0))===null)return null;let c=vy(s);if(!c){let e=r.value;return(!e||e.name!==a)&&(c===null?r.value={name:a}:r.value={name:a,abort:_b([s],l)}),null}i(),o.value!==a&&(o.value=a,(0,t.nextTick)(()=>{n(`load`,a)}));let u=e.customise;if(u){c=Object.assign({},c);let e=u(c.body,s.name,s.prefix,s.provider);typeof e==`string`&&(c.body=e)}let d=[`iconify`];return s.prefix!==``&&d.push(`iconify--`+s.prefix),s.provider!==``&&d.push(`iconify--`+s.provider),{data:c,classes:d}}function l(){let e=c();e?e.data!==s.value?.data&&(s.value=e):s.value=null}return a.value?l():(0,t.onMounted)(()=>{a.value=!0,l()}),(0,t.watch)(()=>e.icon,l),(0,t.onUnmounted)(i),()=>{let t=s.value;if(!t)return Fb(Ib,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),Fb({...ty,...t.data},n)}},{props:[`icon`,`mode`,`ssr`,`width`,`height`,`style`,`color`,`inline`,`rotate`,`hFlip`,`horizontalFlip`,`vFlip`,`verticalFlip`,`flip`,`id`,`ariaHidden`,`customise`,`title`],emits:[`load`]}),Rb=(0,t.defineComponent)({name:`ZIcon`,__name:`Icon`,props:{icon:{}},setup(e){let n=e,r=(0,t.computed)(()=>typeof n.icon==`string`);return(n,i)=>r.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Lb),{key:0,icon:e.icon},null,8,[`icon`])):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{key:1}))}}),zb=Rb;function Bb(){let e=(0,t.inject)(`n-config-provider`,{});return{themeVarRef:(0,t.computed)(()=>e.mergedThemeOverridesRef.value.common)}}var Vb={class:`z-icon-picker overflow-hidden flex w-full`,style:{height:`300px`}},Hb=[`onClick`],Ub={class:`flex-1 overflow-hidden flex flex-col h-full`},Wb={class:`category flex overflow-auto items-center gap-[10px] pr-[10px]`},Gb={key:0},Kb={class:`icon-list overflow-auto flex-1`},qb=[`onClick`],Jb=(0,t.defineComponent)({name:`ZIconPicker`,__name:`IconPicker`,props:{host:{default:n?.iconApi}},emits:[`select`],setup(e,{emit:n}){(0,t.useCssVars)(e=>({v30412ec1:(0,t.unref)(C),b2fd4700:(0,t.unref)(w)}));let r=e,i=n,a={collections:r.host+`/collections`,collection:r.host+`/collection`,search:r.host+`/search`},o=(0,t.ref)(!1),s=(0,t.ref)([]);c();async function c(){o.value=!0;try{let e=await(await fetch(a.collections)).json();o.value=!1;let t=[];for(let[n,r]of Object.entries(e))!r.hidden&&![`Archive / Unmaintained`].includes(r.category)&&t.push({name:r.name,prefix:n});s.value=t,f(s.value[0])}catch{o.value=!1}}let l=(0,t.computed)(()=>{let e=[{label:`ALl`,key:``}];return d.value?.icons?.categories&&Object.keys(d.value?.icons?.categories).forEach(t=>{e.push({label:t,key:t})}),e}),u=(0,t.ref)(!1),d=(0,t.ref)({});async function f(e){if(d.value=e,!e.icons){u.value=!0;let t=await(await fetch(a.collection+`?prefix=`+e.prefix)).json();u.value=!1;let n=new Set;if(t.categories){for(let e of Object.values(t.categories))e.forEach(e=>n.add(e));t.all=[...n]}else t.all=t.uncategorized;e.icons=t}p.value=``,g.value=1}let p=(0,t.ref)(``);function m(e){g.value=1,p.value=e}let h=(0,t.computed)(()=>d.value.icons?p.value?d.value.icons.categories[p.value]:[...d.value.icons.all]:[]),g=(0,t.ref)(1),_=(0,t.ref)(50);(0,t.watch)(_,()=>g.value=1);let v=(0,t.computed)(()=>h.value.slice((g.value-1)*_.value,g.value*_.value));function y(e){i(`select`,d.value.prefix+`:`+e)}let b=(0,t.ref)(``);(0,t.watch)(b,e=>{e?x(e):c()});async function x(e){let t=await(await fetch(a.search+`?query=`+e)).json();if(t.total>0){let e=[];for(let[n,r]of Object.entries(t.collections))!r.hidden&&![`Archive / Unmaintained`].includes(r.category)&&e.push({name:r.name,prefix:n,icons:{all:t.icons.filter(e=>e.startsWith(n+`:`)).map(e=>e.replace(n+`:`,``))}});s.value=e,f(s.value[0])}else s.value=[],d.value={}}let{themeVarRef:S}=Bb(),{primaryColor:C}=S.value,w=Uv(C,.95);return(e,n)=>{let r=(0,t.resolveComponent)(`n-spin`),i=(0,t.resolveComponent)(`n-button`),a=(0,t.resolveComponent)(`n-dropdown`),c=(0,t.resolveComponent)(`n-input`),x=(0,t.resolveComponent)(`n-pagination`),S=(0,t.resolveComponent)(`n-tooltip`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Vb,[(0,t.createVNode)(r,{show:o.value,class:`overflow-auto h-full set min-w-[300px]`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(s.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`item`,{selected:d.value.name===e.name}]),key:e.name,onClick:t=>f(e)},(0,t.toDisplayString)(e.name),11,Hb))),128))]),_:1},8,[`show`]),(0,t.createElementVNode)(`div`,Ub,[(0,t.createVNode)(r,{show:u.value,class:`h-full`,"content-class":`h-full overflow-hidden flex flex-col`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Wb,[l.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Gb,[(0,t.createVNode)(a,{class:`z-icon-picker-dropdown`,trigger:`click`,options:l.value,onSelect:m},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{size:`small`},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{icon:`lets-icons:folder-dublicate-duotone-line`})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)(p.value||`All`),1)]),_:1})]),_:1},8,[`options`])])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(c,{class:`flex-1`,value:b.value,"onUpdate:value":n[0]||=e=>b.value=e,valueModifiers:{trim:!0},size:`small`,placeholder:`搜索图标`,clearable:``},{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{icon:`icon-park-outline:search`})]),_:1},8,[`value`]),(0,t.createVNode)(x,{page:g.value,"onUpdate:page":n[1]||=e=>g.value=e,"page-size":_.value,"onUpdate:pageSize":n[2]||=e=>_.value=e,"item-count":h.value.length,"show-size-picker":!1,simple:``,"page-sizes":[50,100,200,500]},null,8,[`page`,`page-size`,`item-count`])]),(0,t.createElementVNode)(`div`,Kb,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e,onClick:t=>y(e)},[(0,t.createVNode)(S,{trigger:`hover`,delay:500},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{class:`icon`,icon:d.value.prefix+`:`+e},null,8,[`icon`])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(d.value.prefix+`:`+e),1)]),_:2},1024)],8,qb))),128))])]),_:1},8,[`show`])])])}}}),Yb=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Xb=Yb(Jb,[[`__scopeId`,`data-v-0f4d48cc`]]),Zb=(0,t.defineComponent)({name:`IconInput`,__name:`IconInput`,props:{value:{default:``},valueModifiers:{}},emits:[`update:value`],setup(e){let n=(0,t.useModel)(e,`value`);function r(e){n.value=e,i.value=!1}let i=(0,t.ref)(!1);function a(e){i.value=e}return(e,o)=>{let s=(0,t.resolveComponent)(`n-input`),c=(0,t.resolveComponent)(`n-popover`);return(0,t.openBlock)(),(0,t.createBlock)(c,{show:i.value,trigger:`click`,"on-update:show":a,"content-style":`width: 750px;`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)(s,(0,t.mergeProps)(e.$attrs,{value:n.value,"onUpdate:value":o[0]||=e=>n.value=e}),{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{icon:n.value||`qlementine-icons:empty-slot-16`,style:{"font-size":`20px`}},null,8,[`icon`])]),_:1},16,[`value`])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(Xb,{onSelect:r})]),_:1},8,[`show`])}}}),Qb=Zb;n.iconApi&&Hy(``,{resources:[n.iconApi]});async function $b(e,t=`svg`){await Promise.all(Object.entries(e).map(e=>{let[n,r]=e,i=n.lastIndexOf(`/`)+1,a=n.lastIndexOf(`.`);return yy(`${t}:${n.slice(i,a)}`,{...ex(typeof r==`object`?r.default:r)})}))}function ex(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`).documentElement,n=[...t.childNodes].filter(e=>e.nodeType===Node.ELEMENT_NODE).map(e=>new XMLSerializer().serializeToString(e)).join(``),[r,i,a,o]=(t.getAttribute(`viewBox`)||``).split(` `).map(e=>{let t=Number(e);return Number.isNaN(t)?void 0:t});return{body:n,height:o,left:r,top:i,width:a}}var tx=[zb,Xb,Qb],nx={install(e){tx.forEach(t=>{e.component(t.name,t)})}},rx=[Yv],ix={install(t,n){r(n||{}),t.use(Kv),rx.forEach(e=>{t.component(e.name,e)}),t.use(nx),n?.ws&&t.use(e.i,n.ws)}};exports.EVENT_TYPE=e.t,exports.ZButton=Yv,exports.ZIcon=zb,exports.ZIconInput=Qb,exports.ZIconPicker=Xb,exports.default=ix,exports.loadLocalSvgIcons=$b,exports.useWs=e.n,exports.ws=e.r,exports.zwqWs=e.i;
|
|
1319
|
+
`)])]),Iv={small:20,medium:18,large:16};const Lv=Object.assign(Object.assign({},Z.props),{contentClass:String,contentStyle:[Object,String],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});var Rv=(0,t.defineComponent)({name:`Spin`,props:Lv,slots:Object,setup(e){process.env.NODE_ENV!==`production`&&(0,t.watchEffect)(()=>{e.spinning!==void 0&&ti(`spin`,"`spinning` is deprecated, please use `show` instead.")});let{mergedClsPrefixRef:n,inlineThemeDisabled:r}=bi(e),i=Z(`Spin`,`-spin`,Fv,Pv,e,n),a=(0,t.computed)(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:r}=i.value,{opacitySpinning:a,color:o,textColor:s}=r,c=typeof t==`number`?fe(t):r[U(`size`,t)];return{"--n-bezier":n,"--n-opacity-spinning":a,"--n-size":c,"--n-color":o,"--n-text-color":s}}),o=r?xi(`spin`,(0,t.computed)(()=>{let{size:t}=e;return typeof t==`number`?String(t):t[0]}),a,e):void 0,s=ut(e,[`spinning`,`show`]),c=(0,t.ref)(!1);return(0,t.watchEffect)(t=>{let n;if(s.value){let{delay:r}=e;if(r){n=window.setTimeout(()=>{c.value=!0},r),t(()=>{clearTimeout(n)});return}}c.value=s.value}),{mergedClsPrefix:n,active:c,mergedStrokeWidth:(0,t.computed)(()=>{let{strokeWidth:t}=e;if(t!==void 0)return t;let{size:n}=e;return Iv[typeof n==`number`?`medium`:n]}),cssVars:r?void 0:a,themeClass:o?.themeClass,onRender:o?.onRender}},render(){var e;let{$slots:n,mergedClsPrefix:r,description:i}=this,a=n.icon&&this.rotate,o=(i||n.description)&&(0,t.h)(`div`,{class:`${r}-spin-description`},i||n.description?.call(n)),s=n.icon?(0,t.h)(`div`,{class:[`${r}-spin-body`,this.themeClass]},(0,t.h)(`div`,{class:[`${r}-spin`,a&&`${r}-spin--rotate`],style:n.default?``:this.cssVars},n.icon()),o):(0,t.h)(`div`,{class:[`${r}-spin-body`,this.themeClass]},(0,t.h)(Um,{clsPrefix:r,style:n.default?``:this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${r}-spin`}),o);return(e=this.onRender)==null||e.call(this),n.default?(0,t.h)(`div`,{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},(0,t.h)(`div`,{class:[`${r}-spin-content`,this.active&&`${r}-spin-content--spinning`,this.contentClass],style:this.contentStyle},n),(0,t.h)(t.Transition,{name:`fade-in-transition`},{default:()=>this.active?s:null})):s}}),zv=`2.43.2`;function Bv({componentPrefix:e=`N`,components:t=[]}={}){let n=[];function r(t,n,r){t.component(e+n)||t.component(e+n,r)}function i(e){n.includes(e)||(n.push(e),t.forEach(t=>{let{name:n,alias:i}=t;r(e,n,t),i&&i.forEach(n=>{r(e,n,t)})}))}return{version:zv,componentPrefix:e,install:i}}var Vv=Bv;function Hv(e,t=.2){if(!e)return``;e=e.replace(`#`,``),e.length===3&&(e=e.split(``).map(e=>e+e).join(``));let n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16);return n=Math.floor(n*(1-t)),r=Math.floor(r*(1-t)),i=Math.floor(i*(1-t)),`#`+[n,r,i].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Uv(e,t=.2){if(!e)return``;e=e.replace(`#`,``),e.length===3&&(e=e.split(``).map(e=>e+e).join(``));let n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16);return n=Math.min(255,Math.floor(n+(255-n)*t)),r=Math.min(255,Math.floor(r+(255-r)*t)),i=Math.min(255,Math.floor(i+(255-i)*t)),`#`+[n,r,i].map(e=>e.toString(16).padStart(2,`0`)).join(``)}var Wv=Vv({components:[C_,o_,wg,sv,Z_,Rv,jv]}),Gv={inlineThemeDisabled:!0,mergedBorderedRef:(0,t.ref)(),mergedBreakpointsRef:(0,t.ref)(),mergedClsPrefixRef:(0,t.ref)(`n`),mergedComponentPropsRef:(0,t.ref)(),mergedDateLocaleRef:(0,t.ref)(),mergedHljsRef:(0,t.ref)(),mergedIconsRef:(0,t.ref)(),mergedKatexRef:(0,t.ref)(),mergedLocaleRef:(0,t.ref)(`zh-CN`),mergedNamespaceRef:(0,t.ref)(),mergedRtlRef:(0,t.ref)(),mergedThemeHashRef:(0,t.ref)(`15czh83`),mergedThemeRef:(0,t.ref)(),preflightStyleDisabled:!1,styleMountTarget:void 0,mergedThemeOverridesRef:(0,t.ref)()},Kv={install(e){if(e.use(Wv),n.theme){let{primaryColor:e,primaryColorHover:r,primaryColorPressed:i,primaryColorSuppl:a}=n.theme?.common||{};e&&(n.theme.common={primaryColor:e,primaryColorHover:r||Uv(e,.3),primaryColorPressed:i||Hv(e,.3),primaryColorSuppl:a||e}),Object.assign(Gv,{mergedThemeOverridesRef:(0,t.ref)(n?.theme)})}e.provide(`n-config-provider`,Gv)}},qv={class:`zxq-button`},Jv=(0,t.defineComponent)({name:`ZButton`,__name:`Button`,setup(e){return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,qv,[(0,t.renderSlot)(e.$slots,`default`)]))}}),Yv=Jv,Xv=/^[a-z0-9]+(-[a-z0-9]+)*$/,Zv=(e,t,n,r=``)=>{let 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){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Qv(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Qv(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Qv(e,n)?null:e}return null},Qv=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1,$v=Object.freeze({left:0,top:0,width:16,height:16}),ey=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ty=Object.freeze({...$v,...ey}),ny=Object.freeze({...ty,body:``,hidden:!1});function ry(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function iy(e,t){let n=ry(e,t);for(let r in ny)r in ey?r in e&&!(r in n)&&(n[r]=ey[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ay(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}function oy(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=iy(r[e]||i[e],a)}return o(t),n.forEach(o),iy(e,a)}function sy(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=ay(e);for(let i in r){let a=r[i];a&&(t(i,oy(e,i,a)),n.push(i))}return n}var cy={provider:``,aliases:{},not_found:{},...$v};function ly(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function uy(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!ly(e,cy))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!ly(t,ny))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!ly(t,ny))return null}return t}var dy=Object.create(null);function fy(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function py(e,t){let n=dy[e]||(dy[e]=Object.create(null));return n[t]||(n[t]=fy(e,t))}function my(e,t){return uy(t)?sy(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function hy(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var gy=!1;function _y(e){return typeof e==`boolean`&&(gy=e),gy}function vy(e){let t=typeof e==`string`?Zv(e,!0,gy):e;if(t){let e=py(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function yy(e,t){let n=Zv(e,!0,gy);if(!n)return!1;let r=py(n.provider,n.prefix);return t?hy(r,n.name,t):(r.missing.add(n.name),!0)}function by(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),gy&&!t&&!e.prefix){let t=!1;return uy(e)&&(e.prefix=``,sy(e,(e,n)=>{yy(e,n)&&(t=!0)})),t}let n=e.prefix;return Qv({prefix:n,name:`a`})?!!my(py(t,n),e):!1}var xy=Object.freeze({width:null,height:null}),Sy=Object.freeze({...xy,...ey}),Cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ty(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(Cy);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=wy.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Ey(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Dy(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Oy(e,t,n){let r=Ey(e);return Dy(r.defs,t+r.content+n)}var ky=e=>e===`unset`||e===`undefined`||e===`none`;function Ay(e,t){let n={...ty,...e},r={...Sy,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Oy(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Ty(d,c/l)):(u=o===`auto`?c:o,d=s===null?Ty(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{ky(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var jy=/\sid="(\S+)"/g,My=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),Ny=0;function Py(e,t=My){let n=[],r;for(;r=jy.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(Ny++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}var Fy=Object.create(null);function Iy(e,t){Fy[e]=t}function Ly(e){return Fy[e]||Fy[``]}function Ry(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}}for(var zy=Object.create(null),By=[`https://api.simplesvg.com`,`https://api.unisvg.com`],Vy=[];By.length>0;)By.length===1||Math.random()>.5?Vy.push(By.shift()):Vy.push(By.pop());zy[``]=Ry({resources:[`https://api.iconify.design`].concat(Vy)});function Hy(e,t){let n=Ry(t);return n===null?!1:(zy[e]=n,!0)}function Uy(e){return zy[e]}var Wy=()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}},Gy=Wy();function Ky(e,t){let n=Uy(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{let n=t;e=Math.max(e,n.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function qy(e){return e===404}var Jy=(e,t,n)=>{let r=[],i=Ky(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Yy(e){if(typeof e==`string`){let t=Uy(e);if(t)return t.path}return`/`}var Xy=(e,t,n)=>{if(!Gy){n(`abort`,424);return}let r=Yy(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Gy(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(qy(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})},Zy={prepare:Jy,send:Xy};function Qy(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=py(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function $y(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function eb(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||$y([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var tb=0;function nb(e,t,n){let r=tb++,i=$y.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function rb(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Zv(e,t,n):e;i&&r.push(i)}),r}var ib={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ab(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function ob(e){let t={...ib,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=ab(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function sb(){}var cb=Object.create(null);function lb(e){if(!cb[e]){let t=Uy(e);if(!t)return;cb[e]={config:t,redundancy:ob(t)}}return cb[e]}function ub(e,t,n){let r,i;if(typeof e==`string`){let t=Ly(e);if(!t)return n(void 0,424),sb;i=t.send;let a=lb(e);a&&(r=a.redundancy)}else{let t=Ry(e);if(t){r=ob(t);let n=Ly(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),sb):r.query(t,i,n)().abort}function db(){}function fb(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,eb(e)}))}function pb(e){let t=[],n=[];return e.forEach(e=>{(e.match(Xv)?t:n).push(e)}),{valid:t,invalid:n}}function mb(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!my(e,n).length){r();return}}catch(e){console.error(e)}r(),fb(e)}function hb(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function gb(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){hb(e.loadIcons(r,n,t),t=>{mb(e,r,t)});return}if(i){r.forEach(r=>{hb(i(r,n,t),t=>{mb(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=pb(r);if(o.length&&mb(e,o,null),!a.length)return;let s=n.match(Xv)?Ly(t):null;if(!s){mb(e,a,null);return}s.prepare(t,n,a).forEach(n=>{ub(t,n,t=>{mb(e,n.icons,t)})})}))}var _b=(e,t)=>{let n=Qy(rb(e,!0,_y()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,db)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(py(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=py(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&gb(e,t)}),t?nb(t,n,i):db};function vb(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in xy?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var yb=/[\s,]+/;function bb(e,t){t.split(yb).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}function xb(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Sb(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Cb(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function wb(e){return`data:image/svg+xml,`+Cb(e)}function Tb(e){return`url("`+wb(e)+`")`}var Eb={...Sy,inline:!1},Db={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},Ob={display:`inline-block`},kb={backgroundColor:`currentColor`},Ab={backgroundColor:`transparent`},jb={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},Mb={webkitMask:kb,mask:kb,background:Ab};for(let e in Mb){let t=Mb[e];for(let n in jb)t[e+n]=jb[n]}var Nb={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;Nb[e+`-flip`]=t,Nb[e.slice(0,1)+`-flip`]=t,Nb[e+`Flip`]=t});function Pb(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var Fb=(e,n)=>{let r=vb(Eb,n),i={...Db},a=n.mode||`svg`,o={},s=n.style,c=typeof s==`object`&&!(s instanceof Array)?s:{};for(let e in n){let t=n[e];if(t!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:break;case`inline`:case`hFlip`:case`vFlip`:r[e]=t===!0||t===`true`||t===1;break;case`flip`:typeof t==`string`&&bb(r,t);break;case`color`:o.color=t;break;case`rotate`:typeof t==`string`?r[e]=xb(t):typeof t==`number`&&(r[e]=t);break;case`ariaHidden`:case`aria-hidden`:t!==!0&&t!==`true`&&delete i[`aria-hidden`];break;default:{let n=Nb[e];n?(t===!0||t===`true`||t===1)&&(r[n]=!0):Eb[e]===void 0&&(i[e]=t)}}}let l=Ay(e,r),u=l.attributes;if(r.inline&&(o.verticalAlign=`-0.125em`),a===`svg`){i.style={...o,...c},Object.assign(i,u);let e=0,r=n.id;return typeof r==`string`&&(r=r.replace(/-/g,`_`)),i.innerHTML=Py(l.body,r?()=>r+`ID`+ e++:`iconifyVue`),(0,t.h)(`svg`,i)}let{body:d,width:f,height:p}=e,m=a===`mask`||(a===`bg`?!1:d.indexOf(`currentColor`)!==-1),h=Sb(d,{...u,width:f+``,height:p+``});return i.style={...o,"--svg":Tb(h),width:Pb(u.width),height:Pb(u.height),...Ob,...m?kb:Ab,...c},(0,t.h)(`span`,i)};if(_y(!0),Iy(``,Zy),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!by(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Hy(e,r)||console.error(n)}catch{console.error(n)}}}}var Ib={...ty,body:``},Lb=(0,t.defineComponent)((e,{emit:n})=>{let r=(0,t.ref)(null);function i(){r.value&&=(r.value.abort?.(),null)}let a=(0,t.ref)(!!e.ssr),o=(0,t.ref)(``),s=(0,t.shallowRef)(null);function c(){let a=e.icon;if(typeof a==`object`&&a&&typeof a.body==`string`)return o.value=``,{data:a};let s;if(typeof a!=`string`||(s=Zv(a,!1,!0))===null)return null;let c=vy(s);if(!c){let e=r.value;return(!e||e.name!==a)&&(c===null?r.value={name:a}:r.value={name:a,abort:_b([s],l)}),null}i(),o.value!==a&&(o.value=a,(0,t.nextTick)(()=>{n(`load`,a)}));let u=e.customise;if(u){c=Object.assign({},c);let e=u(c.body,s.name,s.prefix,s.provider);typeof e==`string`&&(c.body=e)}let d=[`iconify`];return s.prefix!==``&&d.push(`iconify--`+s.prefix),s.provider!==``&&d.push(`iconify--`+s.provider),{data:c,classes:d}}function l(){let e=c();e?e.data!==s.value?.data&&(s.value=e):s.value=null}return a.value?l():(0,t.onMounted)(()=>{a.value=!0,l()}),(0,t.watch)(()=>e.icon,l),(0,t.onUnmounted)(i),()=>{let t=s.value;if(!t)return Fb(Ib,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),Fb({...ty,...t.data},n)}},{props:[`icon`,`mode`,`ssr`,`width`,`height`,`style`,`color`,`inline`,`rotate`,`hFlip`,`horizontalFlip`,`vFlip`,`verticalFlip`,`flip`,`id`,`ariaHidden`,`customise`,`title`],emits:[`load`]}),Rb=(0,t.defineComponent)({name:`ZIcon`,__name:`Icon`,props:{icon:{}},setup(e){let n=e,r=(0,t.computed)(()=>typeof n.icon==`string`);return(n,i)=>r.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Lb),{key:0,icon:e.icon},null,8,[`icon`])):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{key:1}))}}),zb=Rb;function Bb(){let e=(0,t.inject)(`n-config-provider`,{});return{themeVarRef:(0,t.computed)(()=>e.mergedThemeOverridesRef.value.common)}}var Vb={class:`z-icon-picker overflow-hidden flex w-full`,style:{height:`300px`}},Hb=[`onClick`],Ub={class:`flex-1 overflow-hidden flex flex-col h-full`},Wb={class:`category flex overflow-auto items-center gap-[10px] pr-[10px]`},Gb={key:0},Kb={class:`icon-list overflow-auto flex-1`},qb=[`onClick`],Jb=(0,t.defineComponent)({name:`ZIconPicker`,__name:`IconPicker`,props:{host:{default:n?.iconApi}},emits:[`select`],setup(e,{emit:n}){(0,t.useCssVars)(e=>({v30412ec1:(0,t.unref)(C),b2fd4700:(0,t.unref)(w)}));let r=e,i=n,a={collections:r.host+`/collections`,collection:r.host+`/collection`,search:r.host+`/search`},o=(0,t.ref)(!1),s=(0,t.ref)([]);c();async function c(){o.value=!0;try{let e=await(await fetch(a.collections)).json();o.value=!1;let t=[];for(let[n,r]of Object.entries(e))!r.hidden&&![`Archive / Unmaintained`].includes(r.category)&&t.push({name:r.name,prefix:n});s.value=t,f(s.value[0])}catch{o.value=!1}}let l=(0,t.computed)(()=>{let e=[{label:`ALl`,key:``}];return d.value?.icons?.categories&&Object.keys(d.value?.icons?.categories).forEach(t=>{e.push({label:t,key:t})}),e}),u=(0,t.ref)(!1),d=(0,t.ref)({});async function f(e){if(d.value=e,!e.icons){u.value=!0;let t=await(await fetch(a.collection+`?prefix=`+e.prefix)).json();u.value=!1;let n=new Set;if(t.categories){for(let e of Object.values(t.categories))e.forEach(e=>n.add(e));t.all=[...n]}else t.all=t.uncategorized;e.icons=t}p.value=``,g.value=1}let p=(0,t.ref)(``);function m(e){g.value=1,p.value=e}let h=(0,t.computed)(()=>d.value.icons?p.value?d.value.icons.categories[p.value]:[...d.value.icons.all]:[]),g=(0,t.ref)(1),_=(0,t.ref)(50);(0,t.watch)(_,()=>g.value=1);let v=(0,t.computed)(()=>h.value.slice((g.value-1)*_.value,g.value*_.value));function y(e){i(`select`,d.value.prefix+`:`+e)}let b=(0,t.ref)(``);(0,t.watch)(b,e=>{e?x(e):c()});async function x(e){let t=await(await fetch(a.search+`?query=`+e)).json();if(t.total>0){let e=[];for(let[n,r]of Object.entries(t.collections))!r.hidden&&![`Archive / Unmaintained`].includes(r.category)&&e.push({name:r.name,prefix:n,icons:{all:t.icons.filter(e=>e.startsWith(n+`:`)).map(e=>e.replace(n+`:`,``))}});s.value=e,f(s.value[0])}else s.value=[],d.value={}}let{themeVarRef:S}=Bb(),{primaryColor:C}=S.value,w=Uv(C,.95);return(e,n)=>{let r=(0,t.resolveComponent)(`n-spin`),i=(0,t.resolveComponent)(`n-button`),a=(0,t.resolveComponent)(`n-dropdown`),c=(0,t.resolveComponent)(`n-input`),x=(0,t.resolveComponent)(`n-pagination`),S=(0,t.resolveComponent)(`n-tooltip`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,Vb,[(0,t.createVNode)(r,{show:o.value,class:`overflow-auto h-full set min-w-[300px]`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(s.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`item`,{selected:d.value.name===e.name}]),key:e.name,onClick:t=>f(e)},(0,t.toDisplayString)(e.name),11,Hb))),128))]),_:1},8,[`show`]),(0,t.createElementVNode)(`div`,Ub,[(0,t.createVNode)(r,{show:u.value,class:`h-full`,"content-class":`h-full overflow-hidden flex flex-col`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,Wb,[l.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Gb,[(0,t.createVNode)(a,{class:`z-icon-picker-dropdown`,trigger:`click`,options:l.value,onSelect:m},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{size:`small`},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{icon:`lets-icons:folder-dublicate-duotone-line`})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)(p.value||`All`),1)]),_:1})]),_:1},8,[`options`])])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(c,{class:`flex-1`,value:b.value,"onUpdate:value":n[0]||=e=>b.value=e,valueModifiers:{trim:!0},size:`small`,placeholder:`搜索图标`,clearable:``},{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{icon:`icon-park-outline:search`})]),_:1},8,[`value`]),(0,t.createVNode)(x,{page:g.value,"onUpdate:page":n[1]||=e=>g.value=e,"page-size":_.value,"onUpdate:pageSize":n[2]||=e=>_.value=e,"item-count":h.value.length,"show-size-picker":!1,simple:``,"page-sizes":[50,100,200,500]},null,8,[`page`,`page-size`,`item-count`])]),(0,t.createElementVNode)(`div`,Kb,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e,onClick:t=>y(e)},[(0,t.createVNode)(S,{trigger:`hover`,delay:500},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{class:`icon`,icon:d.value.prefix+`:`+e},null,8,[`icon`])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(d.value.prefix+`:`+e),1)]),_:2},1024)],8,qb))),128))])]),_:1},8,[`show`])])])}}}),Yb=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Xb=Yb(Jb,[[`__scopeId`,`data-v-0f4d48cc`]]),Zb=(0,t.defineComponent)({name:`IconInput`,__name:`IconInput`,props:{value:{default:``},valueModifiers:{}},emits:[`update:value`],setup(e){let n=(0,t.useModel)(e,`value`);function r(e){n.value=e,i.value=!1}let i=(0,t.ref)(!1);function a(e){i.value=e}return(e,o)=>{let s=(0,t.resolveComponent)(`n-input`),c=(0,t.resolveComponent)(`n-popover`);return(0,t.openBlock)(),(0,t.createBlock)(c,{show:i.value,trigger:`click`,"on-update:show":a,"content-style":`width: 750px;`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)(s,(0,t.mergeProps)(e.$attrs,{value:n.value,"onUpdate:value":o[0]||=e=>n.value=e}),{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(zb,{icon:n.value||`qlementine-icons:empty-slot-16`,style:{"font-size":`20px`}},null,8,[`icon`])]),_:1},16,[`value`])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(Xb,{onSelect:r})]),_:1},8,[`show`])}}}),Qb=Zb;function $b(){n.iconApi&&Hy(``,{resources:[n.iconApi]})}async function ex(e,t=`svg`){await Promise.all(Object.entries(e).map(e=>{let[n,r]=e,i=n.lastIndexOf(`/`)+1,a=n.lastIndexOf(`.`);return yy(`${t}:${n.slice(i,a)}`,{...tx(typeof r==`object`?r.default:r)})}))}function tx(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`).documentElement,n=[...t.childNodes].filter(e=>e.nodeType===Node.ELEMENT_NODE).map(e=>new XMLSerializer().serializeToString(e)).join(``),[r,i,a,o]=(t.getAttribute(`viewBox`)||``).split(` `).map(e=>{let t=Number(e);return Number.isNaN(t)?void 0:t});return{body:n,height:o,left:r,top:i,width:a}}var nx=[zb,Xb,Qb],rx={install(e){$b(),nx.forEach(t=>{e.component(t.name,t)})}},ix=[Yv],ax={install(t,n){r(n||{}),t.use(Kv),ix.forEach(e=>{t.component(e.name,e)}),t.use(rx),n?.ws&&t.use(e.i,n.ws)}};exports.EVENT_TYPE=e.t,exports.ZButton=Yv,exports.ZIcon=zb,exports.ZIconInput=Qb,exports.ZIconPicker=Xb,exports.default=ax,exports.loadLocalSvgIcons=ex,exports.regAPIProvider=$b,exports.useWs=e.n,exports.ws=e.r,exports.zwqWs=e.i;
|
package/dist/zxq-com.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export declare const EVENT_TYPE: {
|
|
|
57
57
|
*/
|
|
58
58
|
export declare function loadLocalSvgIcons(svgEagers: any, prefix?: string): Promise<void>;
|
|
59
59
|
|
|
60
|
+
export declare function regAPIProvider(): void;
|
|
61
|
+
|
|
60
62
|
declare function sendMsg(msg: WsMessage): void;
|
|
61
63
|
|
|
62
64
|
export declare function useWs<T = any>(event: WsMessageEvent, config?: WsConfig): UseWsResult<T>;
|
|
@@ -89,7 +91,7 @@ export declare interface WsMessage {
|
|
|
89
91
|
readonly timestamp?: number;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
export declare type WsMessageEvent = typeof EVENT_TYPE[keyof typeof EVENT_TYPE] | string;
|
|
94
|
+
export declare type WsMessageEvent = (typeof EVENT_TYPE)[keyof typeof EVENT_TYPE] | string;
|
|
93
95
|
|
|
94
96
|
export declare const ZButton: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
95
97
|
|