UNPKG

@koishijs/plugin-console

Version:

Web User Interface for Koishi

9 lines 126 kB
var Xn=Object.defineProperty;var Qn=(e,t,n)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Dt=(e,t,n)=>Qn(e,typeof t!="symbol"?t+"":t,n);import{useI18n as re,socket as Nt,useMenu as mt,useContext as be,useConfig as Ue,useI18nText as eo,store as sn,router as to,root as xe,global as zt,connect as no}from"./client.js";import{defineComponent as H,resolveComponent as N,openBlock as c,createElementBlock as $,createElementVNode as V,toDisplayString as B,unref as u,createVNode as M,withCtx as h,createBlock as D,createTextVNode as T,normalizeClass as F,renderSlot as L,withModifiers as he,createCommentVNode as R,computed as j,useSlots as oo,ref as q,Fragment as E,renderList as J,KeepAlive as rn,resolveDynamicComponent as Pe,isRef as le,getCurrentInstance as ke,watch as se,mergeProps as ue,withDirectives as ze,vShow as pt,normalizeStyle as He,createSlots as vt,vModelText as lo,warn as so,inject as ye,provide as Xe,Transition as an,shallowReactive as ro,onMounted as io,isVNode as un,render as jt,Text as ao,Comment as uo,h as co,resolveDirective as fo}from"./vue.js";import{useRoute as Fe,useRouter as mo}from"./vue-router.js";import{createReusableTemplate as cn,isClient as ht,useEventListener as it,useResizeObserver as po,useTimeoutFn as vo,useWindowSize as ho}from"./vueuse.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();const yo={title:"欢迎使用 Koishi!",description:"你的机器人已经准备就绪。点击下面的任一选项,开启你的 Koishi 之旅吧。",action:{docs:{title:"阅读文档",description:"开始阅读官方文档。官方文档里包含了你想要了解的全部内容。"},forum:{title:"前往论坛",description:"前往论坛与其他用户交流。如果你遇到了问题,可以在这里寻求帮助。"}}},go={title:"Welcome to Koishi!",description:"Your chatbot is ready to go. 点击下面的任一选项,开启你的 Koishi 之旅吧。",action:{docs:{title:"Documentation",description:"The official documentation contains everything you want to know."},forum:{title:"Forum",description:"If you run into problems, you can always ask for help on the forum."}}},bo={class:"k-card welcome"},$o={class:"choices"},_o={class:"choice",href:"https://koishi.chat",rel:"noopener noreferer",target:"_blank"},ko={class:"choice",href:"https://k.ilharp.cc",rel:"noopener noreferer",target:"_blank"},Co=H({__name:"welcome",setup(e){const{t,setLocaleMessage:n}=re({messages:{"zh-CN":yo,"en-US":go}});return(s,l)=>{const o=N("k-slot-item"),r=N("k-slot");return c(),$("div",bo,[V("h1",null,B(u(t)("title")),1),V("p",null,B(u(t)("description")),1),V("div",$o,[M(r,{name:"welcome-choice"},{default:h(()=>[M(o,{order:1e3},{default:h(()=>[V("a",_o,[V("h2",null,B(u(t)("action.docs.title")),1),V("p",null,B(u(t)("action.docs.description")),1)])]),_:1}),M(o,{order:500},{default:h(()=>[V("a",ko,[V("h2",null,B(u(t)("action.forum.title")),1),V("p",null,B(u(t)("action.forum.description")),1)])]),_:1})]),_:1})])])}}}),wo={key:1},Vo=H({__name:"home",setup(e){return(t,n)=>{const s=N("k-slot-item"),l=N("k-slot"),o=N("el-scrollbar"),r=N("k-card"),a=N("k-layout");return c(),D(a,{main:`darker page-home${u(Nt)?"":" loading"}`},{default:h(()=>[u(Nt)?(c(),D(o,{key:0},{default:h(()=>[M(l,{name:"home"},{default:h(()=>[M(s,{order:1e3},{default:h(()=>[M(Co)]),_:1})]),_:1})]),_:1})):(c(),$("div",wo,[M(r,{class:"connect"},{default:h(()=>n[0]||(n[0]=[T("正在连接到 Koishi 服务器……")])),_:1})]))]),_:1},8,["main"])}}});function xo(e){e.page({id:"home",path:"/",name:"欢迎",icon:"activity:home",order:1e3,component:Vo})}const So={class:"left"},Oo={class:"right"},Mo=H({__name:"header",props:{isLeftAsideOpen:{type:Boolean},isRightAsideOpen:{type:Boolean},menuKey:{},menuData:{}},emits:["update:isLeftAsideOpen","update:isRightAsideOpen"],setup(e){const n=mt(e.menuKey),s=Fe();return(l,o)=>{const r=N("k-icon");return c(),$("div",{class:F(["layout-header",{"has-menu":l.menuKey}])},[V("div",{class:"toggle-sidebar-button",role:"button",tabindex:"0",onClick:o[0]||(o[0]=a=>l.$emit("update:isLeftAsideOpen",!l.isLeftAsideOpen))},o[2]||(o[2]=[V("div",{class:"icon"},[V("span"),V("span"),V("span")],-1)])),V("div",So,[L(l.$slots,"left",{},()=>[T(B(u(s).name),1)])]),V("div",Oo,[L(l.$slots,"right")]),l.menuKey?(c(),$("div",{key:0,class:"toggle-menu-button",role:"button",tabindex:"1",onClick:o[1]||(o[1]=he(a=>u(n)(a,l.menuData),["stop"]))},[M(r,{name:"ellipsis"})])):R("v-if",!0)],2)}}}),Et=H({__name:"menu-item",props:{item:{},menuKey:{},menuData:{}},setup(e){const t=e,n=be(),s=j(()=>t.item.hidden?r(t.item.hidden):!1),l=j(()=>t.item.action?t.item.disabled?r(t.item.disabled):!1:!0),o=j(()=>n.$action.createScope({[t.menuKey]:t.menuData}));function r(d){return typeof d!="function"?d:d(o.value)}function a(){return t.item.action(o.value)}return(d,p)=>{const y=N("k-icon"),b=N("el-tooltip");return s.value?R("v-if",!0):(c(),D(b,{key:0,disabled:l.value,content:r(d.item.label),placement:"bottom"},{default:h(()=>[V("span",{class:F(["menu-item",[r(d.item.type),{disabled:l.value}]]),onClick:a},[M(y,{class:"menu-icon",name:r(d.item.icon)},null,8,["name"])],2)]),_:1},8,["disabled","content"]))}}}),Ao={class:"main-container"},Lo=H({__name:"layout",props:{main:{},left:{},right:{},container:{},menu:{},menuData:{}},setup(e){const t=oo(),n=Fe(),s=be(),l=q(!1),o=q(!1),r=j(()=>({"has-left-aside":t.left,"has-right-aside":t.right,"is-left-aside-open":l.value,"is-right-aside-open":o.value}));return(a,d)=>(c(),$("div",{class:F(["layout-container",[a.container,r.value]])},[a.$slots.left?(c(),$("aside",{key:0,class:F(["layout-aside layout-left",a.left])},[L(a.$slots,"left")],2)):R("v-if",!0),V("div",Ao,[V("div",{class:"aside-mask",onClick:d[0]||(d[0]=p=>l.value=!l.value)}),M(Mo,{isLeftAsideOpen:l.value,"onUpdate:isLeftAsideOpen":d[1]||(d[1]=p=>l.value=p),isRightAsideOpen:o.value,"onUpdate:isRightAsideOpen":d[2]||(d[2]=p=>o.value=p),"menu-key":typeof a.menu=="string"?a.menu:null,"menu-data":a.menuData},{left:h(()=>[L(a.$slots,"header",{},()=>{var p;return[T(B((p=u(n).meta.activity)==null?void 0:p.name),1)]})]),right:h(()=>[L(a.$slots,"menu",{},()=>[typeof a.menu=="string"?(c(!0),$(E,{key:0},J(u(s).internal.menus[a.menu],p=>(c(),$(E,{key:a.menu},[p.id!=="@separator"?(c(),D(Et,{key:0,item:{...p,...u(s).internal.actions[p.id.startsWith(".")?a.menu+p.id:p.id]},"menu-key":a.menu,"menu-data":a.menuData},null,8,["item","menu-key","menu-data"])):R("v-if",!0)],64))),128)):(c(!0),$(E,{key:1},J(a.menu,p=>(c(),D(Et,{item:p},null,8,["item"]))),256))])]),_:3},8,["isLeftAsideOpen","isRightAsideOpen","menu-key","menu-data"]),V("main",{class:F(["layout-main",a.main])},[L(a.$slots,"default")],2)]),a.$slots.right?(c(),$("aside",{key:1,class:F(["layout-aside layout-right",a.right])},[L(a.$slots,"right")],2)):R("v-if",!0)],2))}});function Io(e){e.slot({type:"layout",component:Lo,order:-1e3})}const Do=H({__name:"settings",setup(e){const t=Fe(),n=mo(),s=Ue(!0),l=be(),o=j(()=>Object.entries(l.internal.settings).map(([d,[{title:p}]])=>({id:d,label:p})));function r(d){d.children||(a.value=d.id)}const a=j({get(){var p;const d=(p=t.params.name)==null?void 0:p.toString();return d in l.internal.settings?d:""},set(d){d in l.internal.settings||(d=""),n.replace("/settings/"+d)}});return(d,p)=>{const y=N("el-tree"),b=N("el-scrollbar"),C=N("k-form"),v=N("k-content"),_=N("k-layout");return c(),D(_,{main:"page-settings"},{header:h(()=>{var g;return[T(B((g=u(l).internal.settings[a.value][0])==null?void 0:g.title),1)]}),left:h(()=>[M(b,null,{default:h(()=>[M(y,{ref:"tree",data:o.value,"default-expand-all":!0,onNodeClick:r},null,8,["data"])]),_:1})]),default:h(()=>[(c(),D(rn,null,[(c(),D(v,{key:a.value},{default:h(()=>[(c(!0),$(E,null,J(u(l).internal.settings[a.value],g=>{var I;return c(),$(E,null,[(I=g.disabled)!=null&&I.call(g)?(c(),$(E,{key:0},[],64)):g.component?(c(),D(Pe(g.component),{key:1})):g.schema?(c(),D(C,{key:2,schema:g.schema,modelValue:u(s),"onUpdate:modelValue":p[0]||(p[0]=x=>le(s)?s.value=x:null),initial:u(s)},null,8,["schema","modelValue","initial"])):R("v-if",!0)],64)}),256))]),_:1}))],1024))]),_:1})}}});var No=Object.defineProperty,K=(e,t)=>No(e,"name",{value:t,configurable:!0});function zo(){}K(zo,"noop");function X(e){return e==null}K(X,"isNullable");function jo(e){return!X(e)}K(jo,"isNonNullable");function We(e){return e&&typeof e=="object"&&!Array.isArray(e)}K(We,"isPlainObject");function dn(e,t){return Object.fromEntries(Object.entries(e).filter(([n,s])=>t(n,s)))}K(dn,"filterKeys");function pe(e,t){return Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s,n)]))}K(pe,"mapValues");function fn(e,t,n){if(!t)return{...e};const s={};for(const l of t)(n||e[l]!==void 0)&&(s[l]=e[l]);return s}K(fn,"pick");function Eo(e,t){if(!t)return{...e};const n={...e};for(const s of t)Reflect.deleteProperty(n,s);return n}K(Eo,"omit");function Bo(e,t,n){return Object.defineProperty(e,t,{writable:!0,value:n,enumerable:!1})}K(Bo,"defineProperty");function To(e,t){return t.every(n=>e.includes(n))}K(To,"contain");function Uo(e,t){return e.filter(n=>t.includes(n))}K(Uo,"intersection");function mn(e,t){return e.filter(n=>!t.includes(n))}K(mn,"difference");function pn(e,t){return Array.from(new Set([...e,...t]))}K(pn,"union");function Po(e){return[...new Set(e)]}K(Po,"deduplicate");function Ho(e,t){const n=e==null?void 0:e.indexOf(t);return n>=0?(e.splice(n,1),!0):!1}K(Ho,"remove");function Fo(e){return Array.isArray(e)?e:X(e)?[]:[e]}K(Fo,"makeArray");function Ve(e,t){return arguments.length===1?n=>Ve(e,n):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}K(Ve,"is");function Re(e){return Ve("ArrayBuffer",e)||Ve("SharedArrayBuffer",e)}K(Re,"isArrayBufferLike");function vn(e){return Re(e)||ArrayBuffer.isView(e)}K(vn,"isArrayBufferSource");var ve;(e=>{e.is=Re,e.isSource=vn;function t(r){return ArrayBuffer.isView(r)?r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength):r}e.fromSource=t,K(t,"fromSource");function n(r){if(typeof Buffer<"u")return Buffer.from(r).toString("base64");let a="";const d=new Uint8Array(r);for(let p=0;p<d.byteLength;p++)a+=String.fromCharCode(d[p]);return btoa(a)}e.toBase64=n,K(n,"toBase64");function s(r){return typeof Buffer<"u"?t(Buffer.from(r,"base64")):Uint8Array.from(atob(r),a=>a.charCodeAt(0))}e.fromBase64=s,K(s,"fromBase64");function l(r){return typeof Buffer<"u"?Buffer.from(r).toString("hex"):Array.from(new Uint8Array(r),a=>a.toString(16).padStart(2,"0")).join("")}e.toHex=l,K(l,"toHex");function o(r){if(typeof Buffer<"u")return t(Buffer.from(r,"hex"));const a=r.length%2===0?r:r.slice(0,r.length-1),d=[];for(let p=0;p<a.length;p+=2)d.push(parseInt(`${a[p]}${a[p+1]}`,16));return Uint8Array.from(d).buffer}e.fromHex=o,K(o,"fromHex")})(ve||(ve={}));ve.fromBase64;ve.toBase64;ve.fromHex;ve.toHex;function Oe(e,t=new Map){if(!e||typeof e!="object")return e;if(Ve("Date",e))return new Date(e.valueOf());if(Ve("RegExp",e))return new RegExp(e.source,e.flags);if(Re(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const n=t.get(e);if(n)return n;if(Array.isArray(e)){const l=[];return t.set(e,l),e.forEach((o,r)=>{l[r]=Reflect.apply(Oe,null,[o,t])}),l}const s=Object.create(Object.getPrototypeOf(e));t.set(e,s);for(const l of Reflect.ownKeys(e)){const o={...Reflect.getOwnPropertyDescriptor(e,l)};"value"in o&&(o.value=Reflect.apply(Oe,null,[o.value,t])),Reflect.defineProperty(s,l,o)}return s}K(Oe,"clone");function ge(e,t,n){if(e===t||!n&&X(e)&&X(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function s(l,o){return l(e)?l(t)?o(e,t):!1:l(t)?!1:void 0}return K(s,"check"),s(Array.isArray,(l,o)=>l.length===o.length&&l.every((r,a)=>ge(r,o[a])))??s(Ve("Date"),(l,o)=>l.valueOf()===o.valueOf())??s(Ve("RegExp"),(l,o)=>l.source===o.source&&l.flags===o.flags)??s(Re,(l,o)=>{if(l.byteLength!==o.byteLength)return!1;const r=new Uint8Array(l),a=new Uint8Array(o);for(let d=0;d<r.length;d++)if(r[d]!==a[d])return!1;return!0})??Object.keys({...e,...t}).every(l=>ge(e[l],t[l],n))}K(ge,"deepEqual");function Ro(e){return e.charAt(0).toUpperCase()+e.slice(1)}K(Ro,"capitalize");function yt(e){return e.charAt(0).toLowerCase()+e.slice(1)}K(yt,"uncapitalize");function Ko(e){return e.replace(/[_-][a-z]/g,t=>t.slice(1).toUpperCase())}K(Ko,"camelCase");function Jo(e){return yt(e).replace(/_/g,"-").replace(/.[A-Z]+/g,t=>t[0]+"-"+t.slice(1).toLowerCase())}K(Jo,"paramCase");function qo(e){return yt(e).replace(/-/g,"_").replace(/.[A-Z]+/g,t=>t[0]+"_"+t.slice(1).toLowerCase())}K(qo,"snakeCase");function hn(e){return e.replace(/\/$/,"")}K(hn,"trimSlash");function Yo(e){return e.startsWith("/")||(e="/"+e),hn(e)}K(Yo,"sanitize");var Bt;(e=>{e.millisecond=1,e.second=1e3,e.minute=e.second*60,e.hour=e.minute*60,e.day=e.hour*24,e.week=e.day*7;let t=new Date().getTimezoneOffset();function n(v){t=v}e.setTimezoneOffset=n,K(n,"setTimezoneOffset");function s(){return t}e.getTimezoneOffset=s,K(s,"getTimezoneOffset");function l(v=new Date,_){return typeof v=="number"&&(v=new Date(v)),_===void 0&&(_=t),Math.floor((v.valueOf()/e.minute-_)/1440)}e.getDateNumber=l,K(l,"getDateNumber");function o(v,_){const g=new Date(v*e.day);return _===void 0&&(_=t),new Date(+g+_*e.minute)}e.fromDateNumber=o,K(o,"fromDateNumber");const r=/\d+(?:\.\d+)?/.source,a=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(v=>`(${r}${v})?`).join("")}$`);function d(v){const _=a.exec(v);return _?(parseFloat(_[1])*e.week||0)+(parseFloat(_[2])*e.day||0)+(parseFloat(_[3])*e.hour||0)+(parseFloat(_[4])*e.minute||0)+(parseFloat(_[5])*e.second||0):0}e.parseTime=d,K(d,"parseTime");function p(v){const _=d(v);return _?v=Date.now()+_:/^\d{1,2}(:\d{1,2}){1,2}$/.test(v)?v=`${new Date().toLocaleDateString()}-${v}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(v)&&(v=`${new Date().getFullYear()}-${v}`),v?new Date(v):new Date}e.parseDate=p,K(p,"parseDate");function y(v){const _=Math.abs(v);return _>=e.day-e.hour/2?Math.round(v/e.day)+"d":_>=e.hour-e.minute/2?Math.round(v/e.hour)+"h":_>=e.minute-e.second/2?Math.round(v/e.minute)+"m":_>=e.second?Math.round(v/e.second)+"s":v+"ms"}e.format=y,K(y,"format");function b(v,_=2){return v.toString().padStart(_,"0")}e.toDigits=b,K(b,"toDigits");function C(v,_=new Date){return v.replace("yyyy",_.getFullYear().toString()).replace("yy",_.getFullYear().toString().slice(2)).replace("MM",b(_.getMonth()+1)).replace("dd",b(_.getDate())).replace("hh",b(_.getHours())).replace("mm",b(_.getMinutes())).replace("ss",b(_.getSeconds())).replace("SSS",b(_.getMilliseconds(),3))}e.template=C,K(C,"template")})(Bt||(Bt={}));var Wo=Object.defineProperty,Go=Object.getOwnPropertyNames,Y=(e,t)=>Wo(e,"name",{value:t,configurable:!0}),Zo=(e,t)=>function(){return t||(0,e[Go(e)[0]])((t={exports:{}}).exports,t),t.exports},Xo=Zo({"src/index.ts"(e,t){var S;var n=Symbol.for("schemastery"),s=Symbol.for("ValidationError");globalThis.__schemastery_index__??(globalThis.__schemastery_index__=0);var l=(S=class extends TypeError{constructor(m,w){let k="$";for(const O of w.path||[])typeof O=="string"?k+="."+O:typeof O=="number"?k+="["+O+"]":typeof O=="symbol"&&(k+=`[Symbol(${O.toString()})]`);k.startsWith(".")&&(k=k.slice(1));super((k==="$"?"":`${k} `)+m);Dt(this,"name","ValidationError");this.options=w}static is(m){return!!(m!=null&&m[s])}},Y(S,"ValidationError"),S);Object.defineProperty(l.prototype,s,{value:!0});var o=Y(function(i){const f=Y(function(m,w={}){return o.resolve(m,f,w)[0]},"schema");if(i.refs){const m=pe(i.refs,k=>new o(k)),w=Y(k=>m[k],"getRef");for(const k in m){const O=m[k];O.sKey=w(O.sKey),O.inner=w(O.inner),O.list=O.list&&O.list.map(w),O.dict=O.dict&&pe(O.dict,w)}return m[i.uid]}if(Object.assign(f,i),typeof f.callback=="string")try{f.callback=new Function("return "+f.callback)()}catch{}return Object.defineProperty(f,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(f,o.prototype),f.meta||(f.meta={}),f.toString=f.toString.bind(f),f},"Schema");o.prototype=Object.create(Function.prototype),o.prototype[n]=!0,o.ValidationError=l;var r;o.prototype.toJSON=Y(function(){var m;if(r)return r[m=this.uid]??(r[m]=JSON.parse(JSON.stringify({...this}))),this.uid;r={[this.uid]:{...this}},r[this.uid]=JSON.parse(JSON.stringify({...this}));const f={uid:this.uid,refs:r};return r=void 0,f},"toJSON"),o.prototype.set=Y(function(f,m){return this.dict[f]=m,this},"set"),o.prototype.push=Y(function(f){return this.list.push(f),this},"push");function a(i,f){const m=typeof i=="string"?{"":i}:{...i};for(const w in f){const k=f[w];k!=null&&k.$description||k!=null&&k.$desc?m[w]=k.$description||k.$desc:typeof k=="string"&&(m[w]=k)}return m}Y(a,"mergeDesc");function d(i){return(i==null?void 0:i.$value)??(i==null?void 0:i.$inner)}Y(d,"getInner");function p(i){return dn(i??{},f=>!f.startsWith("$"))}Y(p,"extractKeys"),o.prototype.i18n=Y(function(f){const m=o(this),w=a(m.meta.description,f);return Object.keys(w).length&&(m.meta.description=w),m.dict&&(m.dict=pe(m.dict,(k,O)=>k.i18n(pe(f,A=>{var U;return((U=d(A))==null?void 0:U[O])??(A==null?void 0:A[O])})))),m.list&&(m.list=m.list.map((k,O)=>k.i18n(pe(f,(A={})=>Array.isArray(d(A))?d(A)[O]:Array.isArray(A)?A[O]:p(A))))),m.inner&&(m.inner=m.inner.i18n(pe(f,k=>d(k)?d(k):p(k)))),m.sKey&&(m.sKey=m.sKey.i18n(pe(f,k=>k==null?void 0:k.$key))),m},"i18n"),o.prototype.extra=Y(function(f,m){const w=o(this);return w.meta={...w.meta,[f]:m},w},"extra");for(const i of["required","disabled","collapse","hidden","loose"])Object.assign(o.prototype,{[i](f=!0){const m=o(this);return m.meta={...m.meta,[i]:f},m}});o.prototype.deprecated=Y(function(){var m;const f=o(this);return(m=f.meta).badges||(m.badges=[]),f.meta.badges.push({text:"deprecated",type:"danger"}),f},"deprecated"),o.prototype.experimental=Y(function(){var m;const f=o(this);return(m=f.meta).badges||(m.badges=[]),f.meta.badges.push({text:"experimental",type:"warning"}),f},"experimental"),o.prototype.pattern=Y(function(f){const m=o(this),w=fn(f,["source","flags"]);return m.meta={...m.meta,pattern:w},m},"pattern"),o.prototype.simplify=Y(function(f){if(ge(f,this.meta.default,this.type==="dict"))return null;if(X(f))return f;if(this.type==="object"||this.type==="dict"){const m={};for(const w in f){const k=this.type==="object"?this.dict[w]:this.inner,O=k==null?void 0:k.simplify(f[w]);(this.type==="dict"||!X(O))&&(m[w]=O)}return ge(m,this.meta.default,this.type==="dict")?null:m}else if(this.type==="array"||this.type==="tuple"){const m=[];return f.forEach((w,k)=>{const O=this.type==="array"?this.inner:this.list[k],A=O?O.simplify(w):w;m.push(A)}),m}else if(this.type==="intersect"){const m={};for(const w of this.list)Object.assign(m,w.simplify(f));return m}else if(this.type==="union")for(const m of this.list)try{return o.resolve(f,m,{}),m.simplify(f)}catch{}return f},"simplify"),o.prototype.toString=Y(function(f){var m;return((m=I[this.type])==null?void 0:m.call(I,this,f))??`Schema<${this.type}>`},"toString"),o.prototype.role=Y(function(i,f){const m=o(this);return m.meta={...m.meta,role:i,extra:f},m},"role");for(const i of["default","link","comment","description","max","min","step"])Object.assign(o.prototype,{[i](f){const m=o(this);return m.meta={...m.meta,[i]:f},m}});var y={};o.extend=Y(function(f,m){y[f]=m},"extend"),o.resolve=Y(function(f,m,w={},k=!1){var A;if(!m)return[f];if((A=w.ignore)!=null&&A.call(w,f,m))return[f];if(X(f)&&m.type!=="lazy"){if(m.meta.required)throw new l("missing required value",w);let U=m,P=m.meta.default;for(;(U==null?void 0:U.type)==="intersect"&&X(P);)U=U.list[0],P=U==null?void 0:U.meta.default;if(X(P))return[f];f=Oe(P)}const O=y[m.type];if(!O)throw new l(`unsupported type "${m.type}"`,w);try{return O(f,m,w,k)}catch(U){if(!m.meta.loose)throw U;return[m.meta.default]}},"resolve"),o.from=Y(function(f){if(X(f))return o.any();if(["string","number","boolean"].includes(typeof f))return o.const(f).required();if(f[n])return f;if(typeof f=="function")switch(f){case String:return o.string().required();case Number:return o.number().required();case Boolean:return o.boolean().required();case Function:return o.function().required();default:return o.is(f).required()}else throw new TypeError(`cannot infer schema from ${f}`)},"from"),o.lazy=Y(function(f){const m=Y(()=>(w.inner[n]||(w.inner=w.builder(),w.inner.meta={...w.meta,...w.inner.meta}),w.inner.toJSON()),"toJSON"),w=new o({type:"lazy",builder:f,inner:{toJSON:m}});return w},"lazy"),o.natural=Y(function(){return o.number().step(1).min(0)},"natural"),o.percent=Y(function(){return o.number().step(.01).min(0).max(1).role("slider")},"percent"),o.date=Y(function(){return o.union([o.is(Date),o.transform(o.string().role("datetime"),(f,m)=>{const w=new Date(f);if(isNaN(+w))throw new l(`invalid date "${f}"`,m);return w},!0)])},"date"),o.regExp=Y(function(f=""){return o.union([o.is(RegExp),o.transform(o.string().role("regexp",{flag:f}),(m,w)=>{try{return new RegExp(m,f)}catch(k){throw new l(k.message,w)}},!0)])},"regExp"),o.arrayBuffer=Y(function(f){return o.union([o.is(ArrayBuffer),o.is(SharedArrayBuffer),o.transform(o.any(),(m,w)=>{if(ve.isSource(m))return ve.fromSource(m);throw new l(`expected ArrayBufferSource but got ${m}`,w)},!0),...f?[o.transform(o.string(),(m,w)=>{try{return f==="base64"?ve.fromBase64(m):ve.fromHex(m)}catch(k){throw new l(k.message,w)}},!0)]:[]])},"arrayBuffer"),o.extend("lazy",(i,f,m,w)=>(f.inner[n]||(f.inner=f.builder(),f.inner.meta={...f.meta,...f.inner.meta}),o.resolve(i,f.inner,m,w))),o.extend("any",i=>[i]),o.extend("never",(i,f,m)=>{throw new l(`expected nullable but got ${i}`,m)}),o.extend("const",(i,{value:f},m)=>{if(ge(i,f))return[f];throw new l(`expected ${f} but got ${i}`,m)});function b(i,f,m,w,k=!1){const{max:O=1/0,min:A=-1/0}=f;if(i>O)throw new l(`expected ${m} <= ${O} but got ${i}`,w);if(i<A&&!k)throw new l(`expected ${m} >= ${A} but got ${i}`,w)}Y(b,"checkWithinRange"),o.extend("string",(i,{meta:f},m)=>{if(typeof i!="string")throw new l(`expected string but got ${i}`,m);if(f.pattern){const w=new RegExp(f.pattern.source,f.pattern.flags);if(!w.test(i))throw new l(`expect string to match regexp ${w}`,m)}return b(i.length,f,"string length",m),[i]});function C(i,f){const m=i.toString();if(m.includes("e"))return i*Math.pow(10,f);const w=m.indexOf(".");if(w===-1)return i*Math.pow(10,f);const k=m.slice(w+1),O=m.slice(0,w);return k.length<=f?+(O+k.padEnd(f,"0")):+(O+k.slice(0,f)+"."+k.slice(f))}Y(C,"decimalShift");function v(i,f,m){if(m=Math.abs(m),!/^\d+\.\d+$/.test(m.toString()))return(i-f)%m===0;const w=m.toString().indexOf("."),k=m.toString().slice(w+1).length;return Math.abs(C(i,k)-C(f,k))%C(m,k)===0}Y(v,"isMultipleOf"),o.extend("number",(i,{meta:f},m)=>{if(typeof i!="number")throw new l(`expected number but got ${i}`,m);b(i,f,"number",m);const{step:w}=f;if(w&&!v(i,f.min??0,w))throw new l(`expected number multiple of ${w} but got ${i}`,m);return[i]}),o.extend("boolean",(i,f,m)=>{if(typeof i=="boolean")return[i];throw new l(`expected boolean but got ${i}`,m)}),o.extend("bitset",(i,{bits:f,meta:m},w)=>{let k=0,O=[];if(typeof i=="number"){k=i;for(const A in f)i&f[A]&&O.push(A)}else if(Array.isArray(i)){O=i;for(const A of O){if(typeof A!="string")throw new l(`expected string but got ${A}`,w);A in f&&(k|=f[A])}}else throw new l(`expected number or array but got ${i}`,w);return k===m.default?[k]:[k,O]}),o.extend("function",(i,f,m)=>{if(typeof i=="function")return[i];throw new l(`expected function but got ${i}`,m)}),o.extend("is",(i,{callback:f},m)=>{if(i instanceof f)return[i];throw new l(`expected ${f.name} but got ${i}`,m)});function _(i,f,m,w){try{const[k,O]=o.resolve(i[f],m,{...w,path:[...w.path||[],f]});return O!==void 0&&(i[f]=O),k}catch(k){if(!(w!=null&&w.autofix))throw k;return delete i[f],m.meta.default}}Y(_,"property"),o.extend("array",(i,{inner:f,meta:m},w)=>{if(!Array.isArray(i))throw new l(`expected array but got ${i}`,w);return b(i.length,m,"array length",w,!X(f.meta.default)),[i.map((k,O)=>_(i,O,f,w))]}),o.extend("dict",(i,{inner:f,sKey:m},w,k)=>{if(!We(i))throw new l(`expected object but got ${i}`,w);const O={};for(const A in i){let U;try{U=o.resolve(A,m,w)[0]}catch(P){if(k)continue;throw P}O[U]=_(i,A,f,w),i[U]=i[A],A!==U&&delete i[A]}return[O]}),o.extend("tuple",(i,{list:f},m,w)=>{if(!Array.isArray(i))throw new l(`expected array but got ${i}`,m);const k=f.map((O,A)=>_(i,A,O,m));return w?[k]:(k.push(...i.slice(f.length)),[k])});function g(i,f){for(const m in f)m in i||(i[m]=f[m])}Y(g,"merge"),o.extend("object",(i,{dict:f},m,w)=>{if(!We(i))throw new l(`expected object but got ${i}`,m);const k={};for(const O in f){const A=_(i,O,f[O],m);(!X(A)||O in i)&&(k[O]=A)}return w||g(k,i),[k]}),o.extend("union",(i,{list:f,toString:m},w,k)=>{for(const O of f)try{return o.resolve(i,O,w,k)}catch{}throw new l(`expected ${m()} but got ${JSON.stringify(i)}`,w)}),o.extend("intersect",(i,{list:f,toString:m},w,k)=>{let O;for(const A of f){const U=o.resolve(i,A,w,!0)[0];if(!X(U))if(X(O))O=U;else{if(typeof O!=typeof U)throw new l(`expected ${m()} but got ${JSON.stringify(i)}`,w);if(typeof U=="object")g(O??(O={}),U);else if(O!==U)throw new l(`expected ${m()} but got ${JSON.stringify(i)}`,w)}}return!k&&We(i)&&g(O,i),[O]}),o.extend("transform",(i,{inner:f,callback:m,preserve:w},k)=>{const[O,A=i]=o.resolve(i,f,k,!0);return w?[m(O)]:[m(O),m(A)]});var I={};function x(i,f,m){I[i]=m,Object.assign(o,{[i](...w){const k=new o({type:i});return f.forEach((O,A)=>{var U;switch(O){case"sKey":k.sKey=w[A]??o.string();break;case"inner":k.inner=o.from(w[A]);break;case"list":k.list=w[A].map(o.from);break;case"dict":k.dict=pe(w[A],o.from);break;case"bits":{k.bits={};for(const P in w[A])typeof w[A][P]=="number"&&(k.bits[P]=w[A][P]);break}case"callback":{k.callback=w[A],(U=k.callback).toJSON||(U.toJSON=()=>k.callback.toString());break}default:k[O]=w[A]}}),i==="object"||i==="dict"?k.meta.default={}:i==="array"||i==="tuple"?k.meta.default=[]:i==="bitset"&&(k.meta.default=0),k}})}Y(x,"defineMethod"),x("is",["callback"],({callback:i})=>i.name),x("any",[],()=>"any"),x("never",[],()=>"never"),x("const",["value"],({value:i})=>typeof i=="string"?JSON.stringify(i):i),x("string",[],()=>"string"),x("number",[],()=>"number"),x("boolean",[],()=>"boolean"),x("bitset",["bits"],()=>"bitset"),x("function",[],()=>"function"),x("array",["inner"],({inner:i})=>`${i.toString(!0)}[]`),x("dict",["inner","sKey"],({inner:i,sKey:f})=>`{ [key: ${f.toString()}]: ${i.toString()} }`),x("tuple",["list"],({list:i})=>`[${i.map(f=>f.toString()).join(", ")}]`),x("object",["dict"],({dict:i})=>Object.keys(i).length===0?"{}":`{ ${Object.entries(i).map(([f,m])=>`${f}${m.meta.required?"":"?"}: ${m.toString()}`).join(", ")} }`),x("union",["list"],({list:i},f)=>{const m=i.map(({toString:w})=>w()).join(" | ");return f?`(${m})`:m}),x("intersect",["list"],({list:i})=>`${i.map(f=>f.toString(!0)).join(" & ")}`),x("transform",["inner","callback","preserve"],({inner:i},f)=>i.toString(f)),t.exports=o}});const Ie=Xo();/*! * shared v9.13.1 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */let Tt;const lt=()=>Tt||(Tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Ge=Array.isArray,at=e=>typeof e=="string",Qo=e=>typeof e=="boolean",el=e=>e!==null&&typeof e=="object",yn=e=>{if(!el(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object};/*! * core-base v9.13.1 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */function tl(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(lt().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(lt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(lt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function nl(e,t,n){const s=at(n)?n:sl,l=e;l.__localeChainCache||(l.__localeChainCache=new Map);let o=l.__localeChainCache.get(s);if(!o){o=[];let r=[n];for(;Ge(r);)r=Ut(o,r,t);const a=Ge(t)||!yn(t)?t:t.default?t.default:null;r=at(a)?[a]:a,Ge(r)&&Ut(o,r,!1),l.__localeChainCache.set(s,o)}return o}function Ut(e,t,n){let s=!0;for(let l=0;l<t.length&&Qo(s);l++){const o=t[l];at(o)&&(s=ol(e,t[l],n))}return s}function ol(e,t,n){let s;const l=t.split("-");do{const o=l.join("-");s=ll(e,o,n),l.splice(-1,1)}while(l.length&&s===!0);return s}function ll(e,t,n){let s=!1;if(!e.includes(t)&&(s=!0,t)){s=t[t.length-1]!=="!";const l=t.replace(/!/g,"");e.push(l),(Ge(n)||yn(n))&&n[l]&&(s=n[l])}return s}const sl="en-US";tl();function ce(){const e=re(),t={};return n=>{if(!n||typeof n=="string")return n;const s=nl(t,e.fallbackLocale.value,e.locale.value);for(const l of s)if(l in n)return n[l];return n[""]}}const rl=["function","transform","is"];function Ke(e){const t=[],n=e.list.filter(s=>{if(!s.meta.hidden)return s.type==="transform"&&t.push(s.inner),!rl.includes(s.type)});return n.length?n:t}function Le(e,t=!1){if(!(!e||e.type==="union"&&Ke(e).length===1))return Oe(e.meta.default)??(t?il(e):void 0)}function il(e){if(e.type==="string")return"";if(e.type==="number")return 0;if(e.type==="boolean")return!1;if(["dict","object","intersect"].includes(e.type))return{}}function _e(e){return e.type==="const"?e:e.type==="transform"?_e(e.inner):(e=new Ie(e).required(!1),e.type==="object"?e.dict=pe(e.dict,_e):e.type==="tuple"||e.type==="intersect"||e.type==="union"?e.list=e.list.map(_e):(e.type==="dict"||e.type==="array")&&(e.inner=_e(e.inner)),e)}function al(e,t){try{return _e(e)(t),!0}catch{return!1}}function ut(e,t){if(!X(t)&&e.type==="string"&&e.meta.pattern){const{source:n,flags:s}=e.meta.pattern,l=new RegExp(n,s);if(!l.test(t))return["errors.regexp-not-matched",[l.toString()]]}}function ul(){const{props:e}=ke();return j(()=>{var t,n;return e.disabled||((n=(t=e.schema)==null?void 0:t.meta)==null?void 0:n.disabled)})}function Ce(e){let t;const n=q(),{props:s,emit:l}=ke(),o=()=>se(n,r=>{try{e!=null&&e.output&&(r=e.output(r));const a=_e(Ie(s.schema));ge(a(r),s.schema.meta.default,e==null?void 0:e.strict)&&(r=null)}catch{return}l("update:modelValue",r)},{deep:!0});return se(()=>[s.modelValue,s.schema],([r,a])=>{t==null||t(),r??(r=Le(a)),e!=null&&e.input&&(r=e.input(r)),n.value=r,t=o()},{deep:!0,immediate:!0}),n}function gt(){const{props:e}=ke(),t=Ce({strict:!0,input:r=>{const a=Object.entries(r);if(e.schema.type==="array"){const d=(e.schema.meta.min??0)-a.length;for(let p=0;p<d;p++)a.push([""+a.length,null])}return a},output:r=>{if(e.schema.type==="array")return r.map(([,d])=>d);const a={};for(const[d,p]of r){if(d in a)throw new Error("duplicate entries");a[d]=p}return a}}),n=j(()=>e.schema.meta.min&&e.schema.meta.min===e.schema.meta.max),s=j(()=>t.value.length>=e.schema.meta.max),l=j(()=>t.value.length>=e.schema.meta.max),o=()=>{if(e.schema.type==="array")for(let r=0;r<t.value.length;r++)t.value[r][0]=""+r};return{entries:t,isMax:s,isMin:l,isFixedLength:n,up(r){if(e.schema.type==="dict")t.value.splice(r-1,0,...t.value.splice(r,1));else{const a=t.value[r][1];t.value[r][1]=t.value[r-1][1],t.value[r-1][1]=a}o()},down(r){if(e.schema.type==="dict")t.value.splice(r+1,0,...t.value.splice(r,1));else{const a=t.value[r][1];t.value[r][1]=t.value[r+1][1],t.value[r+1][1]=a}o()},del(r){t.value.splice(r,1),o()},insert(r){t.value.splice(r,0,["",null]),o()}}}function gn(e){return e.type==="union"&&e.list.every(t=>t.type==="const")}function ct(e){if(e.type==="bitset")return!0;if(e.type==="array")return gn(e.inner)}function bt(){const{props:e}=ke(),t=j(()=>{if(e.schema.type==="bitset")return Object.keys(e.schema.bits);if(e.schema.type==="array")return e.schema.inner.list.map(l=>l.value)}),n=j(()=>{if(e.schema.type==="bitset")return Object.keys(e.schema.bits).map(l=>Ie.const(l));if(e.schema.type==="array")return e.schema.inner.list}),s=Ce({input(l){return ct(e.schema)?X(l)?[]:Array.isArray(l)?l:Object.entries(e.schema.bits).filter(([o,r])=>l&r).map(([o])=>o):l},output(l){return ct(e.schema)?l.sort((o,r)=>{const a=t.value.indexOf(o),d=t.value.indexOf(r);return a<0?d<0?0:1:d<0?-1:a-d}):l}});return{values:s,items:n,selectAll(){s.value=pn(s.value,t.value)},selectNone(){s.value=mn(s.value,t.value)},toggle(l){s.value.includes(l)?s.value=s.value.filter(o=>o!==l):s.value=[...s.value,l]}}}function bn(e){return["string","number","boolean"].includes(e.type)||gn(e)||ct(e)}function Pt(e){if(e=e.filter(([,t])=>!t.meta.hidden),e.every(([,t])=>bn(t)))return e}function $t(e){if(bn(e))return[[null,e]];if(e.type==="tuple")return Pt(Object.entries(e.list));if(e.type==="object")return Pt(Object.entries(e.dict))}const Q=(e,t)=>{const n=e.__vccOpts||e;for(const[s,l]of t)n[s]=l;return n},cl={},dl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"};function fl(e,t){return c(),$("svg",dl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M377.4 296.6l-168 176C204.8 477.3 198.6 480 192 480s-12.84-2.688-17.38-7.438l-168-176C-2.5 286.1-2.156 271.8 7.438 262.6c9.5-9.156 24.75-8.812 33.94 .8125L168 396.1V56.02c0-13.25 10.75-24.01 23.1-24.01S216 42.77 216 56.02v340.1l126.6-132.7c9.156-9.625 24.41-9.969 33.94-.8125C386.2 271.8 386.5 286.1 377.4 296.6z"},null,-1)]))}const _t=Q(cl,[["render",fl]]),ml={},pl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"};function vl(e,t){return c(),$("svg",pl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M6.625 215.5l168-176C179.2 34.7 185.4 32.02 192 32.02s12.84 2.688 17.38 7.438l168 176c9.125 9.594 8.781 24.78-.8125 33.94c-9.5 9.156-24.75 8.812-33.94-.8125L216 115.9V456c0 13.25-10.75 23.1-23.1 23.1S168 469.3 168 456V115.9l-126.6 132.7C32.22 258.2 16.97 258.5 7.438 249.4C-2.156 240.2-2.5 225 6.625 215.5z"},null,-1)]))}const kt=Q(ml,[["render",vl]]),hl={},yl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function gl(e,t){return c(),$("svg",yl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M160 80C160 115.8 136.5 146.1 104 156.3V255.1C124.1 240.9 148.1 232 176 232H272C311.8 232 344 199.8 344 160V156.3C311.5 146.1 288 115.8 288 80C288 35.82 323.8 0 368 0C412.2 0 448 35.82 448 80C448 115.8 424.5 146.1 392 156.3V160C392 226.3 338.3 280 272 280H176C136.2 280 104 312.2 104 352V355.7C136.5 365.9 160 396.2 160 432C160 476.2 124.2 512 80 512C35.82 512 0 476.2 0 432C0 396.2 23.54 365.9 56 355.7V156.3C23.54 146.1 0 115.8 0 80C0 35.82 35.82 0 80 0C124.2 0 160 35.82 160 80V80zM80 112C97.67 112 112 97.67 112 80C112 62.33 97.67 48 80 48C62.33 48 48 62.33 48 80C48 97.67 62.33 112 80 112zM368 48C350.3 48 336 62.33 336 80C336 97.67 350.3 112 368 112C385.7 112 400 97.67 400 80C400 62.33 385.7 48 368 48zM80 464C97.67 464 112 449.7 112 432C112 414.3 97.67 400 80 400C62.33 400 48 414.3 48 432C48 449.7 62.33 464 80 464z"},null,-1)]))}const bl=Q(hl,[["render",gl]]),$l={},_l={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"};function kl(e,t){return c(),$("svg",_l,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M414.9 31.11L270.9 495.1C266.1 507.8 253.5 514.8 240.9 510.9C228.2 506.1 221.1 493.5 225.1 480.9L369.1 16.89C373 4.226 386.5-2.852 399.1 1.077C411.8 5.006 418.9 18.45 414.9 31.11V31.11zM504.4 118.5L632.4 238.5C637.3 243 640 249.4 640 255.1C640 262.6 637.3 268.1 632.4 273.5L504.4 393.5C494.7 402.6 479.6 402.1 470.5 392.4C461.4 382.7 461.9 367.6 471.6 358.5L580.9 255.1L471.6 153.5C461.9 144.4 461.4 129.3 470.5 119.6C479.6 109.9 494.7 109.4 504.4 118.5V118.5zM168.4 153.5L59.09 255.1L168.4 358.5C178.1 367.6 178.6 382.7 169.5 392.4C160.4 402.1 145.3 402.6 135.6 393.5L7.585 273.5C2.746 268.1 0 262.6 0 255.1C0 249.4 2.746 243 7.585 238.5L135.6 118.5C145.3 109.4 160.4 109.9 169.5 119.6C178.6 129.3 178.1 144.4 168.4 153.5V153.5z"},null,-1)]))}const Cl=Q($l,[["render",kl]]),wl={},Vl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function xl(e,t){return c(),$("svg",Vl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M207 184.1C209.6 187.5 215.5 192 224 192s14.4-4.461 16.97-7.031l72-72C317.7 108.3 320 102.1 320 96c0-13.71-11.21-24-24-24c-6.141 0-12.28 2.344-16.97 7.031L248 110.1V24C248 10.75 237.3 0 224 0S200 10.75 200 24v86.06L168.1 79.03C164.3 74.34 158.1 72 152 72C138.3 72 128 83.21 128 96c0 6.141 2.344 12.28 7.031 16.97L207 184.1zM240.1 327C234.9 321 227.7 320 224 320c-3.682 0-10.94 .9906-16.97 7.022l-72 72C130.3 403.7 128 409.9 128 416c0 13.71 11.21 24 24 24c6.141 0 12.28-2.344 16.97-7.031L200 401.9V488C200 501.3 210.8 512 224 512s24-10.75 24-24v-86.06l31.03 31.03C283.7 437.7 289.8 440 296 440c18.79 0 24-17.2 24-24c0-6.141-2.344-12.28-7.031-16.97L240.1 327zM424 232H24C10.75 232 0 242.7 0 255.1S10.75 280 24 280h400c13.25 0 24-10.76 24-24.01S437.3 232 424 232z"},null,-1)]))}const Sl=Q(wl,[["render",xl]]),Ol={},Ml={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function Al(e,t){return c(),$("svg",Ml,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M160 400C160 408.8 152.8 416 144 416C135.2 416 128 408.8 128 400V192C128 183.2 135.2 176 144 176C152.8 176 160 183.2 160 192V400zM240 400C240 408.8 232.8 416 224 416C215.2 416 208 408.8 208 400V192C208 183.2 215.2 176 224 176C232.8 176 240 183.2 240 192V400zM320 400C320 408.8 312.8 416 304 416C295.2 416 288 408.8 288 400V192C288 183.2 295.2 176 304 176C312.8 176 320 183.2 320 192V400zM317.5 24.94L354.2 80H424C437.3 80 448 90.75 448 104C448 117.3 437.3 128 424 128H416V432C416 476.2 380.2 512 336 512H112C67.82 512 32 476.2 32 432V128H24C10.75 128 0 117.3 0 104C0 90.75 10.75 80 24 80H93.82L130.5 24.94C140.9 9.357 158.4 0 177.1 0H270.9C289.6 0 307.1 9.358 317.5 24.94H317.5zM151.5 80H296.5L277.5 51.56C276 49.34 273.5 48 270.9 48H177.1C174.5 48 171.1 49.34 170.5 51.56L151.5 80zM80 432C80 449.7 94.33 464 112 464H336C353.7 464 368 449.7 368 432V128H80V432z"},null,-1)]))}const Ct=Q(Ol,[["render",Al]]),Ll={},Il={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function Dl(e,t){return c(),$("svg",Il,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M352 256C352 238.3 366.3 224 384 224C401.7 224 416 238.3 416 256C416 273.7 401.7 288 384 288C366.3 288 352 273.7 352 256zM192 256C192 238.3 206.3 224 224 224C241.7 224 256 238.3 256 256C256 273.7 241.7 288 224 288C206.3 288 192 273.7 192 256zM96 256C96 273.7 81.67 288 64 288C46.33 288 32 273.7 32 256C32 238.3 46.33 224 64 224C81.67 224 96 238.3 96 256z"},null,-1)]))}const Nl=Q(Ll,[["render",Dl]]),zl={},jl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function El(e,t){return c(),$("svg",jl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M296 391.1c-6.141 0-12.28 2.344-16.97 7.031L248 430.1v-86.06c0-13.25-10.75-24-24-24s-24 10.75-24 24v86.06l-31.03-31.03C164.3 394.3 158.1 391.1 152 391.1c-12.82 0-24 10.33-24 24c0 6.141 2.344 12.28 7.031 16.97l72 72.01C209.6 507.5 215.5 512 224 512s14.4-4.461 16.97-7.031l72-72.01C317.7 428.3 320 422.1 320 415.1C320 402.3 308.8 391.1 296 391.1zM152 119.1c6.141 0 12.28-2.344 16.97-7.031L200 81.91v86.07c0 13.25 10.75 24 24 24s24-10.75 24-24V81.91l31.03 31.03C283.7 117.6 289.8 119.1 296 119.1c18.79 0 24-17.2 24-23.1c0-6.141-2.344-12.28-7.031-16.97l-72-72.01C234.9 .9766 227.7 0 223.1 0C220.3 0 213.1 .9687 207 7l-72 72.01C130.3 83.7 128 89.84 128 95.98C128 109.7 139.2 119.1 152 119.1zM424 232H24C10.75 232 0 242.7 0 255.1S10.75 280 24 280h400c13.25 0 24-10.76 24-24.01S437.3 232 424 232z"},null,-1)]))}const Bl=Q(zl,[["render",El]]),Tl={},Ul={class:"k-icon k-icon-external",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Pl(e,t){return c(),$("svg",Ul,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},null,-1)]))}const Hl=Q(Tl,[["render",Pl]]),Fl={},Rl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"};function Kl(e,t){return c(),$("svg",Rl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},null,-1)]))}const Jl=Q(Fl,[["render",Kl]]),ql={},Yl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"};function Wl(e,t){return c(),$("svg",Yl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},null,-1)]))}const Gl=Q(ql,[["render",Wl]]),Zl={},Xl={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Ql(e,t){return c(),$("svg",Xl,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M280 224V310.1L303 287C312.4 277.7 327.6 277.7 336.1 287C346.3 296.4 346.3 311.6 336.1 320.1L272.1 384.1C263.6 394.3 248.4 394.3 239 384.1L175 320.1C165.7 311.6 165.7 296.4 175 287C184.4 277.7 199.6 277.7 208.1 287L232 310.1V224H64C28.65 224 0 195.3 0 160V96C0 60.65 28.65 32 64 32H448C483.3 32 512 60.65 512 96V160C512 195.3 483.3 224 448 224H280zM64 288H130C125.9 304 128.1 321.3 136.6 336H64C55.16 336 48 343.2 48 352V416C48 424.8 55.16 432 64 432H448C456.8 432 464 424.8 464 416V352C464 343.2 456.8 336 448 336H375.4C383.9 321.3 386.1 304 381.1 288H448C483.3 288 512 316.7 512 352V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V352C0 316.7 28.65 288 64 288z"},null,-1)]))}const $n=Q(Zl,[["render",Ql]]),es={},ts={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ns(e,t){return c(),$("svg",ts,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M232,288v-86.1L209,225c-9.4,9.3-24.6,9.3-33.1,0c-10.2-9.4-10.2-24.6,0-33.1l64-64c8.5-10.2,23.7-10.2,33.1,0l64,64c9.3,8.5,9.3,23.7,0,33.1c-9.4,9.3-24.6,9.3-33.1,0L280,201.9V288h168c35.4,0,64,28.7,64,64v64c0,35.4-28.6,64-64,64H64c-35.3,0-64-28.6-64-64l0-64c0-35.3,28.7-64,64-64H232z M448,224h-66c4.1-16,1.9-33.3-6.6-48H448c8.8,0,16-7.2,16-16V96c0-8.8-7.2-16-16-16H64c-8.8,0-16,7.2-16,16v64c0,8.8,7.2,16,16,16h72.6c-8.5,14.7-10.7,32-5.7,48H64c-35.3,0-64-28.7-64-64l0-64c0-35.3,28.7-64,64-64h384c35.4,0,64,28.7,64,64v64C512,195.3,483.4,224,448,224z"},null,-1)]))}const _n=Q(es,[["render",ns]]),os={},ls={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ss(e,t){return c(),$("svg",ls,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"},null,-1)]))}const kn=Q(os,[["render",ss]]),rs={},is={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function as(e,t){return c(),$("svg",is,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M264 479.1C263.4 479.1 262.7 480 262.1 480H153.9C134.8 480 116.5 472.4 103 458.9L31.03 386.9C2.912 358.8 2.912 313.2 31.03 285.1L253.1 63.03C281.2 34.91 326.8 34.91 354.9 63.03L480.1 189.1C509.1 217.2 509.1 262.8 480.1 290.9L339.9 432H488C501.3 432 512 442.7 512 456C512 469.3 501.3 480 488 480L264 479.1zM64.97 352.1L136.1 424.1C141.5 429.5 147.6 432 153.9 432H262.1C268.4 432 274.5 429.5 279 424.1L344 360L184 200L64.97 319C55.6 328.4 55.6 343.6 64.97 352.1zM31.03 285.1L64.97 319z"},null,-1)]))}const us=Q(rs,[["render",as]]),cs={},ds={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function fs(e,t){return c(),$("svg",ds,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"},null,-1)]))}const Cn=Q(cs,[["render",fs]]),ms={},ps={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function vs(e,t){return c(),$("svg",ps,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"},null,-1)]))}const wn=Q(ms,[["render",vs]]),hs={},ys={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function gs(e,t){return c(),$("svg",ys,t[0]||(t[0]=[V("path",{fill:"currentColor",d:"M30.81 49.81c8.969-3.656 19.28-1.656 26.16 5.219l41.1 41.1c41.07-40.38 97.11-64.92 157.1-64.92C379.6 32.11 480 132.5 480 256s-100.4 223.9-223.9 223.9c-52.31 0-103.3-18.33-143.5-51.77c-10.19-8.5-11.56-23.62-3.062-33.81c8.531-10.22 23.62-11.56 33.81-3.062C174.9 417.5 214.9 432 256 432c97.03 0 176-78.97 176-176S353 80 256 80c-47.08 0-90.93 19.29-123.2 50.89l52.14 52.14c6.875 6.875 8.906 17.19 5.219 26.16C186.5 218.2 177.7 224 168 224h-128C26.75 224 16 213.3 16 200v-128C16 62.28 21.84 53.53 30.81 49.81z"},null,-1)]))}const bs=Q(hs,[["render",gs]]),de={title:"基础设置",initial:"撤销更改",default:"恢复默认值",collapse:"折叠子项",expand:"展开以编辑",edit:{json:"编辑 JSON",invalid:"无效的配置。",save:"保存更改",copy:"复制到剪贴板",copied:"已复制"},badge:{deprecated:"已废弃",experimental:"实验性"},entry:{key:"键",value:"值","add-item":"添加项目","del-item":"删除项目","add-row":"添加行","del-row":"删除行","move-up":"上移项目","move-down":"下移项目","insert-before":"在上方插入","insert-after":"在下方插入"},select:{all:"全部选中",none:"清空选择"},errors:{"duplicate-key":"键名重复","regexp-not-matched":"未能匹配正则表达式 {0}"}},fe={title:"Basic Settings",initial:"Undo",default:"Restore to Default",collapse:"Collapse",expand:"Expand to Edit",edit:{json:"Edit JSON",invalid:"Invalid configuration.",save:"Save Changes",copy:"Copy to Clipboard",copied:"Copied"},badge:{deprecated:"deprecated",experimental:"experimental"},entry:{key:"Key",value:"Value","add-item":"Add Item","del-item":"Delete Item","add-row":"Add Row","del-row":"Delete Row","move-up":"Move Up","move-down":"Move Down","insert-before":"Insert Before","insert-after":"Insert After"},select:{all:"Select All",none:"Clear Selection"},errors:{"duplicate-key":"Duplicate key","regexp-not-matched":"Not matched with regexp {0}"}},$s={class:"k-schema-main"},_s={class:"k-schema-left"},ks={class:"k-schema-right"},Cs={class:"k-schema-menu"},ws={class:"k-menu-icon"},Vs={class:"k-menu-icon"},me=H({__name:"base",props:{schema:{},modelValue:{},disabled:{},prefix:{},initial:{},extra:{},collapsible:{}},emits:["update:modelValue"],setup(e){var r;const n=q((r=e.collapsible)==null?void 0:r.initial),s=q(null),{t:l,setLocaleMessage:o}=re({messages:{"zh-CN":de,"en-US":fe}});return(a,d)=>{const p=N("el-button"),y=N("el-tooltip"),b=N("el-collapse-transition");return c(),$(E,null,[V("div",ue({class:"k-schema-item"},a.$attrs),[d[5]||(d[5]=V("div",{class:"actions"},null,-1)),V("div",$s,[V("div",_s,[V("h3",null,[L(a.$slots,"title")]),L(a.$slots,"desc")]),V("div",ks,[n.value?R("v-if",!0):(c(),$(E,{key:0},[L(a.$slots,"prefix"),L(a.$slots,"control"),L(a.$slots,"suffix")],64)),e.collapsible?(c(),$(E,{key:1},[n.value?(c(),D(p,{key:0,onClick:d[0]||(d[0]=C=>n.value=!1)},{default:h(()=>[T(B(u(l)("expand")),1)]),_:1})):R("v-if",!0)],64)):R("v-if",!0)]),V("div",Cs,[M(y,{ref_key:"tooltip",ref:s,placement:"bottom-end","popper-class":"k-menu",effect:"light"},{content:h(()=>[V("div",{onClick:d[3]||(d[3]=C=>{var v;return(v=s.value)==null?void 0:v.hide()})},[L(a.$slots,"menu"),e.collapsible?(c(),$(E,{key:0},[d[4]||(d[4]=V("div",{class:"k-menu-separator"},null,-1)),n.value?(c(),$("div",{key:0,class:"k-menu-item",onClick:d[1]||(d[1]=C=>n.value=!1)},[V("span",ws,[M(u(Bl))]),T(" "+B(u(l)("expand")),1)])):(c(),$("div",{key:1,class:"k-menu-item",onClick:d[2]||(d[2]=C=>n.value=!0)},[V("span",Vs,[M(u(Sl))]),T(" "+B(u(l)("collapse")),1)]))],64)):R("v-if",!0)])]),default:h(()=>[M(p,{class:"ellipsis"},{default:h(()=>[M(u(Nl))]),_:1})]),_:3},512)])]),L(a.$slots,"default")],16),e.collapsible?(c(),D(b,{key:1},{default:h(()=>[ze(V("div",{class:F(["k-schema-group",{collapsed:n.value}])},[L(a.$slots,"collapse")],2),[[pt,!n.value]])]),_:3})):L(a.$slots,"collapse",{key:0})],64)}}}),xs={key:0,class:"suffix-icon"},Ss={key:1,class:"suffix-icon"},Os={class:"suffix-icon"},wt=H({__name:"primitive",props:{schema:{},modelValue:{},disabled:Boolean,minimal:Boolean},emits:["update:modelValue","focus","blur"],setup(e,{emit:t}){const n=t,s=e,l=q(!1),o=Ce(),{values:r,items:a}=bt(),d=ce(),p=j(()=>X(o.value)),y=j(()=>ut(s.schema,o.value)),b=j(()=>["url","link"].includes(s.schema.meta.role)),C=j(()=>{const{type:S,meta:i}=s.schema;return S==="number"?"number":