@yoyaflow/yoya-ui 0.1.0

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.
@@ -0,0 +1,35 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.YoyaUI={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=new Set([`checked`,`disabled`,`readonly`,`selected`]),n=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function r(e){return typeof e==`string`?document.querySelector(e):e}function i(e){return String(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}function a(e){return t.has(e)}function o(e,t,n){if(n==null||n===!1){if(e.removeAttribute(t),t in e)try{e[t]=!1}catch{}return}if(n===!0||a(t)){if(e.setAttribute(t,t),t in e)try{e[t]=!0}catch{}return}if(e.setAttribute(t,String(n)),t in e)try{e[t]=n}catch{}}function s(e){return Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${c(e)}:${i(t)}`).join(`; `)}function c(e){return String(e).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var l=class e{constructor(e=null){this._children=[],this._events=new Map,this._cleanup=[],this._states={},this._stateTypes={},this._stateHandlers=new Map,this._pendingRemovals=new Set,this._childrenDirty=!1,this._deleted=!1,e!==null&&this.setup(e)}setup(t){return typeof t==`function`?t(this):t instanceof e?this.child(t):typeof t==`string`||typeof t==`number`?this.text(t):t&&typeof t==`object`&&this._setupObject(t),this}_setupObject(e){e.children&&this.child(e.children)}children(){return[...this._children]}clearChildren(){return this._children.forEach(e=>{this._pendingRemovals.add(e)}),this._children=[],this._childrenDirty=!0,this}child(...e){return e.flat(1/0).forEach(e=>{if(e==null)return;let t=p(e);this._pendingRemovals.delete(t),this._children.push(t),this._childrenDirty=!0}),this}text(e){return this.child(new u(e))}on(e,t,n){return this._events.has(e)||this._events.set(e,[]),this._events.get(e).push({handler:t,options:n}),this._el&&(this._el.addEventListener(e,t,n),this._cleanup.push(()=>this._el.removeEventListener(e,t,n))),this}registerStateAttrs(...e){return e.forEach(e=>{if(typeof e==`string`){this._stateTypes[e]=`boolean`;return}e&&typeof e==`object`&&Object.entries(e).forEach(([e,t])=>{this._stateTypes[e]=t||`boolean`})}),this}registerStateHandler(e,t){return this._stateHandlers.has(e)||this._stateHandlers.set(e,[]),this._stateHandlers.get(e).push(t),this}setState(e,t=!0){let n=this._states[e];return this._states[e]=t,(this._stateHandlers.get(e)||[]).forEach(e=>e(t,this,n)),this}getState(e){return this._states[e]}getBooleanState(e){return!!this.getState(e)}getStringState(e){let t=this.getState(e);return t==null?``:String(t)}getNumberState(e){return Number(this.getState(e)||0)}renderDom(){return null}commit(){return this.renderDom()}_commitChildren(){this._pendingRemovals.forEach(e=>e.destroy()),this._pendingRemovals.clear(),this._childrenDirty=!1}bindTo(e){let t=r(e),n=this.renderDom();return t&&n&&t.appendChild(n),this}destroy(){return this._deleted=!0,this._cleanup.forEach(e=>e()),this._cleanup=[],this._children.forEach(e=>e.destroy()),this._pendingRemovals.forEach(e=>e.destroy()),this._pendingRemovals.clear(),this._children=[],this._el?.parentNode&&this._el.parentNode.removeChild(this._el),this}toHTML(){return``}hydrateSnapshot(){return this}},u=class extends l{constructor(e=``){super(null),this._content=String(e),this._textNode=null}textContent(e){return e===void 0?this._content:(this._content=String(e),this._textNode&&(this._textNode.textContent=this._content),this)}renderDom(){return this._deleted?null:(this._textNode||(this._textNode=document.createTextNode(this._content),this._el=this._textNode),this._textNode)}toHTML(){return this._deleted?``:i(this._content)}},d=class extends l{constructor(e){super(null),this._component=e,this._resolved=null}_resolve(){if(this._resolved)return this._resolved;let e=typeof this._component==`function`?this._component():this._component.render();if(!(e instanceof l))throw TypeError(`Component render must return a ViewNode`);return this._resolved=e,e}children(){return this._resolved?this._resolved.children():[]}textContent(){let e=this._resolve();return typeof e.textContent==`function`?e.textContent():``}renderDom(){if(this._deleted)return null;let e=this._resolve().renderDom();return this._el=e,e}toHTML(){return this._deleted?``:this._resolve().toHTML()}destroy(){return this._resolved&&this._resolved.destroy(),super.destroy()}};function f(e=``){return new u(e)}function p(e){if(e instanceof l)return e;if(typeof e==`function`||e&&typeof e==`object`&&typeof e.render==`function`)return new d(e);if(typeof e==`string`||typeof e==`number`)return new u(e);throw TypeError(`ViewNode child must be a ViewNode, component, string, or number`)}function m(e=null,t=null,n=null){return typeof t==`function`&&n==null?{first:e,options:null,callback:t}:{first:e,options:t,callback:n}}function h(e,t){return!t||typeof t!=`object`||Array.isArray(t)?e:(t.attrs&&typeof e.attr==`function`&&e.attr(t.attrs),t.style&&typeof e.styles==`function`&&e.styles(t.style),e)}var g=class extends l{constructor(e,t=null){super(null),this._tagName=e,this._attrs={},this._styles={},this._classes=new Set,this._el=null,t!==null&&this.setup(t)}_setupObject(e){Object.entries(e).forEach(([e,t])=>{if(e===`class`||e===`className`){this.className(t);return}if(e===`attrs`){this.attr(t);return}if(e===`style`){this.styles(t);return}if(e===`children`){this.child(t);return}if(e.startsWith(`on`)&&typeof t==`function`){this.on(e.slice(2).toLowerCase(),t);return}if(typeof this[e]==`function`){this[e](t);return}typeof t!=`function`&&this.attr(e,t)})}tagName(){return this._tagName}textContent(){return this._children.map(e=>typeof e.textContent==`function`?e.textContent():``).join(``)}attr(e,t){return t===void 0&&typeof e==`string`?this._attrs[e]:e&&typeof e==`object`?(Object.entries(e).forEach(([e,t])=>this.attr(e,t)),this):(t==null||t===!1?delete this._attrs[e]:this._attrs[e]=t,this._el&&o(this._el,e,t),this)}id(e){return e===void 0?this.attr(`id`):this.attr(`id`,e)}name(e){return e===void 0?this.attr(`name`):this.attr(`name`,e)}className(...e){return e.length===0?[...this._classes].join(` `):(e.flat(1/0).forEach(e=>{e&&String(e).split(/\s+/).filter(Boolean).forEach(e=>this._classes.add(e))}),this._syncClassName(),this)}class(...e){return this.className(...e)}replaceClassName(e,t,n=!1){return!e||!t||e===t?this:this._classes.has(e)?(this._classes.delete(e),this.className(t)):n?this.className(t):this}style(e,t){return t===void 0&&typeof e==`string`?this._styles[e]:e&&typeof e==`object`?this.styles(e):(t==null||t===``?delete this._styles[e]:this._styles[e]=t,this._el&&(this._el.style[e]=t||``),this)}styles(e){return Object.entries(e||{}).forEach(([e,t])=>this.style(e,t)),this}child(...e){return e.flat(1/0).forEach(e=>{if(e==null)return;let t=p(e);if(this._pendingRemovals.delete(t),this._children.push(t),this._childrenDirty=!0,this._el){let e=t.renderDom();e&&e.parentNode!==this._el&&this._el.appendChild(e)}}),this}renderDom(){return this._deleted?null:(this._el||(this._el=document.createElement(this._tagName),this._applySnapshotToElement()),this._commitChildren(),this._children.forEach(e=>{let t=e.renderDom();t&&t.parentNode!==this._el&&this._el.appendChild(t)}),this._el)}toHTML(){if(this._deleted)return``;let e=this._serializeAttributes(),t=e?`<${this._tagName} ${e}>`:`<${this._tagName}>`;return n.has(this._tagName)?t:`${t}${this._children.map(e=>e.toHTML()).join(``)}</${this._tagName}>`}_applyBindingsToElement(){Object.entries(this._attrs).forEach(([e,t])=>o(this._el,e,t)),this._syncClassName(),Object.entries(this._styles).forEach(([e,t])=>{this._el.style[e]=t}),this._events.forEach((e,t)=>{e.forEach(({handler:e,options:n})=>{this._el.addEventListener(t,e,n),this._cleanup.push(()=>this._el.removeEventListener(t,e,n))})})}_applySnapshotToElement(){this._applyBindingsToElement(),this._children.forEach(e=>{let t=e.renderDom();t&&this._el.appendChild(t)})}_syncClassName(){let e=[...this._classes].join(` `);e?this._attrs.class=e:delete this._attrs.class,this._el&&(e?this._el.className=e:this._el.removeAttribute(`class`))}_serializeAttributes(){let e={...this._attrs},t=this._serializeStyles();return t&&(e.style=e.style?`${e.style}; ${t}`:t),Object.entries(e).filter(([,e])=>e!=null&&e!==!1).map(([e,t])=>t===!0||a(e)?`${e}="${e}"`:`${e}="${i(t)}"`).join(` `)}_serializeStyles(){return s(this._styles)}};function _(e,t=g){return function(n=null,r=null,i=null){let a=m(n,r,i),o=new t(e,a.first);return h(o,a.options),typeof a.callback==`function`&&a.callback(o),o}}function v(e,t,n={}){let{override:r=!1}=n;Object.entries(t).forEach(([t,n])=>{!r&&e.prototype[t]||(e.prototype[t]=function(...e){return this.child(n(...e))})})}var y=class extends l{constructor(e){super(null),this._loader=e,this._resolved=null}_resolve(){return this._resolved||=x(this._loader),this._resolved}toHTML(){return this._deleted?``:`<div class="yoya-client-only" data-client-only="true"></div>`}renderDom(){if(this._deleted)return null;let e=this._resolve().renderDom();return this._el&&this._el!==e&&this._el.parentNode&&this._el.parentNode.replaceChild(e,this._el),this._el=e,e}children(){return this._resolved?this._resolved.children():[]}textContent(){return this._resolved&&typeof this._resolved.textContent==`function`?this._resolved.textContent():``}destroy(){return this._resolved&&this._resolved.destroy(),super.destroy()}};function b(e){return new y(e)}function x(e){if(e instanceof l)return e;if(typeof e==`function`)return x(e());if(e&&typeof e.render==`function`)return x(e.render());throw TypeError(`vClientOnly loader must return a ViewNode or a component object`)}var S=`yoya-ui:i18n`,C=new Map,w=class{constructor(e={}){let t=e.language||`zh-CN`;this._key=e.key||null,this._storage=fe(e.storage),this._storageKey=e.storageKey||null,this._sharedStorageKey=this._key?S:null,this._fallbackLanguage=e.fallbackLanguage||t,this._language=this._readStoredLanguage(t),this._messages={},this._listeners=new Set,this.registerMessages(e.messages||{}),this._key&&ne(this)}key(){return this._key}getLanguage(){return this._language}setLanguage(e){return!e||e===this._language?this:(this._language=e,this._persistLanguage(),this._notify(),this)}getFallbackLanguage(){return this._fallbackLanguage}setFallbackLanguage(e){return e?(this._fallbackLanguage=e,this._notify(),this):this}clearPersistedLanguage(){if(!this._storageKey){if(!this._sharedStorageKey)return this;let e=ae(this._storage,this._sharedStorageKey);return delete e[this._key],oe(this._storage,this._sharedStorageKey,e),this}try{this._storage.removeItem(this._storageKey)}catch{}return this}register(e,t={}){return e?(de(t).forEach(t=>{this._messages[e]=ce(this._messages[e]||{},t)}),this._notify(),this):this}registerMessages(e={}){return ue(e).forEach(e=>{if(e.language){this.register(e.language,e.messages||{});return}Object.entries(e).forEach(([e,t])=>{this.register(e,t)})}),this}t(e,t={},n=void 0){let r=N(this._messages[this._language],e)??N(this._messages[this._fallbackLanguage],e)??n??e;return se(typeof r==`function`?r(t,this):r,t)}text(e,t={},n=void 0){return new ee(this,e,t,n)}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_readStoredLanguage(e){if(this._storageKey)try{return this._storage.getItem(this._storageKey)||e}catch{return e}return this._sharedStorageKey&&ae(this._storage,this._sharedStorageKey)[this._key]||e}_persistLanguage(){if(this._storageKey){try{this._storage.setItem(this._storageKey,this._language)}catch{}return}if(this._sharedStorageKey){let e=ae(this._storage,this._sharedStorageKey);e[this._key]=this._language,oe(this._storage,this._sharedStorageKey,e)}}_notify(){this._listeners.forEach(e=>e(this))}},ee=class extends u{constructor(e,t,n={},r=void 0){super(e.t(t,n,r)),this._i18n=e,this._key=t,this._params=n||{},this._defaultValue=r,this._unsubscribe=e.subscribe(()=>this.refresh())}key(e){return e===void 0?this._key:(this._key=e,this.refresh())}params(e){return e===void 0?{...this._params}:(this._params=e||{},this.refresh())}defaultValue(e){return e===void 0?this._defaultValue:(this._defaultValue=e,this.refresh())}refresh(){return this.textContent(this._i18n.t(this._key,this._params,this._defaultValue)),this}destroy(){return this._unsubscribe&&=(this._unsubscribe(),null),super.destroy()}};function T(e={}){return new w(e)}var E=T();function D(e,t={}){return E.text(e,t)}var O=E;function te(e=E){return O=e,String.prototype._yoyaUiStringShortcutInstalled?e:(Object.defineProperty(String.prototype,"_yoyaUiStringShortcutInstalled",{configurable:!0,enumerable:!1,value:!0}),Object.defineProperty(String.prototype,"s",{configurable:!0,enumerable:!1,value:function(e,t,n){let r=String(this),i={},a=O;return A(t)?a=t:typeof t==`string`?a=M(t)||O:(i=t||{},A(n)?a=n:typeof n==`string`&&(a=M(n)||O)),a.text(e||r,i,r)}}),e)}function k(e,t){let n=O;O=e||n;try{return t()}finally{O=n}}function A(e){return!!(e&&typeof e.text==`function`)}function ne(e){let t=e?.key?.();return t?(C.set(t,e),()=>{C.get(t)===e&&C.delete(t)}):()=>{}}function j(e){let t=typeof e==`string`?e:e?.key?.();return t&&C.delete(t),t}function M(e){return e&&C.get(e)||null}function re(){return new Map(C)}function ie(e){return ae(e||fe(),S)}function ae(e,t){if(!e)return{};try{let n=e.getItem(t);if(!n)return{};let r=JSON.parse(n);return r&&typeof r==`object`?r:{}}catch{return{}}}function oe(e,t,n){if(e)try{e.setItem(t,JSON.stringify(n))}catch{}}te(E);function N(e,t){if(!(!e||!t))return Object.prototype.hasOwnProperty.call(e,t)?e[t]:String(t).split(`.`).reduce((e,t)=>{if(e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,t))return e[t]},e)}function se(e,t){return String(e).replace(/\{([^{}]+)\}/g,(e,n)=>{let r=t?.[n.trim()];return r==null?e:String(r)})}function ce(e,t){let n={...e};return Object.entries(t||{}).forEach(([e,t])=>{le(t)&&le(n[e])?n[e]=ce(n[e],t):n[e]=t}),n}function le(e){return Object.prototype.toString.call(e)===`[object Object]`}function ue(e){return Array.isArray(e)?e.flatMap(e=>ue(e)):[e||{}]}function de(e){return Array.isArray(e)?e.flatMap(e=>de(e)):[e||{}]}function fe(e){if(e)return e;try{if(typeof globalThis<`u`&&globalThis.localStorage)return globalThis.localStorage}catch{}return me()}var pe=new Map;function me(){return{getItem(e){return pe.has(e)?pe.get(e):null},setItem(e,t){pe.set(e,String(t))},removeItem(e){pe.delete(e)}}}var he=new Set([`state`,`render`,`update`]),ge=new Set([`destroy`,`getState`,`setState`,`subscribe`]);function _e(e={}){if(typeof e.render!=`function`)throw TypeError(`vStateNode requires a render function`);let t=typeof e.state==`function`?e.state():{...e.state||{}},n=new Set,r=!1,i=null,a={destroy(){return r?a:(r=!0,n.clear(),i&&i.destroy(),a)},getState(){return a.state()},render(){if(r)return i;if(!i){i=new g(`div`);let e=i.destroy.bind(i);i.destroy=()=>(n.clear(),e()),o()}return i},setState(e){if(r||e==null)return a;let o=typeof e==`function`?e({...t}):e;if(!o||typeof o!=`object`)return a;let c=new Set;return Object.entries(o).forEach(([e,n])=>{t[e]!==n&&(t[e]=n,c.add(e))}),c.size>0&&(i&&s(c),n.forEach(e=>e(t,a))),a},state(){return{...t}},subscribe(e){if(typeof e!=`function`)throw TypeError(`vStateNode subscriber must be a function`);return n.add(e),()=>n.delete(e)}};for(let t of Object.keys(e))if(!(he.has(t)||typeof e[t]!=`function`)){if(ge.has(t))throw TypeError(`vStateNode config key "${t}" conflicts with the built-in API`);a[t]=e[t]}return a;function o(){let n=e.render.call(a,t,a);i.clearChildren().child(n),i._el&&i.commit()}function s(n){if(typeof e.update==`function`){e.update.call(a,t,a,n)===!0&&o();return}o()}}v(g,{vStateNode:_e});var ve=[`light`,`dark`,`system`],ye=`yoya-theme-mode`,be=`yoya-theme-name`;function xe(){return typeof document>`u`?null:document.documentElement}function Se(){try{return typeof localStorage<`u`&&localStorage!==null}catch{return!1}}function Ce(e=`light`,t={}){let n=ve.includes(e)?e:`light`,r=xe();if(r&&(r.dataset.yoyaMode=n),t.persist&&Se())try{localStorage.setItem(ye,n)}catch{}return n}function we(){let e=xe(),t=e&&e.dataset.yoyaMode;return ve.includes(t)?t:`light`}function Te(){let e=we();return e===`system`?typeof window>`u`||typeof window.matchMedia!=`function`?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function Ee(e=``,t={}){let n=xe();if(!e){if(n&&delete n.dataset.yoyaTheme,t.persist&&Se())try{localStorage.removeItem(be)}catch{}return``}if(n&&(n.dataset.yoyaTheme=e),t.persist&&Se())try{localStorage.setItem(be,e)}catch{}return e}function De(){let e=xe();return e&&e.dataset.yoyaTheme||``}function Oe(e={}){let t=e.mode,n=e.theme;if(t===void 0&&Se()){let e=localStorage.getItem(ye);ve.includes(e)&&(t=e)}return n===void 0&&Se()&&(n=localStorage.getItem(be)||``),t!==void 0&&Ce(t,{persist:e.persist}),n!==void 0&&Ee(n,{persist:e.persist}),{mode:we(),theme:De()}}var P=class extends g{},ke=[`a`,`abbr`,`address`,`area`,`article`,`aside`,`audio`,`b`,`base`,`bdi`,`bdo`,`blockquote`,`body`,`br`,`button`,`canvas`,`caption`,`cite`,`code`,`col`,`colgroup`,`data`,`datalist`,`dd`,`del`,`details`,`dfn`,`dialog`,`div`,`dl`,`dt`,`em`,`embed`,`fieldset`,`figcaption`,`figure`,`footer`,`form`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`head`,`header`,`hgroup`,`hr`,`html`,`i`,`iframe`,`img`,`input`,`ins`,`kbd`,`label`,`legend`,`li`,`link`,`main`,`map`,`mark`,`menu`,`meta`,`meter`,`nav`,`noscript`,`object`,`ol`,`optgroup`,`option`,`output`,`p`,`picture`,`pre`,`progress`,`q`,`rp`,`rt`,`ruby`,`s`,`samp`,`script`,`search`,`section`,`select`,`selectedcontent`,`slot`,`small`,`source`,`span`,`strong`,{name:`style`,tagName:`style`,aliases:[`styleTag`]},`sub`,`summary`,`sup`,`table`,`tbody`,`td`,`template`,`textarea`,`tfoot`,`th`,`thead`,`time`,`title`,`tr`,`track`,`u`,`ul`,{name:`varTag`,tagName:`var`},`video`,`wbr`];function Ae(){return ke.reduce((e,t)=>{let{aliases:n=[],name:r,tagName:i}=zn(t),a=_(i,P);return e[r]=a,n.forEach(t=>{e[t]=a}),e},{})}var je=Ae();v(P,je);var{a:Me,abbr:Ne,address:Pe,area:Fe,article:Ie,aside:Le,audio:Re,b:ze,base:Be,bdi:Ve,bdo:He,blockquote:Ue,body:We,br:Ge,button:Ke,canvas:qe,caption:Je,cite:Ye,code:Xe,col:Ze,colgroup:Qe,data:$e,datalist:et,dd:tt,del:nt,details:rt,dfn:it,dialog:at,div:ot,dl:st,dt:ct,em:lt,embed:ut,fieldset:dt,figcaption:ft,figure:pt,footer:mt,form:ht,h1:gt,h2:_t,h3:vt,h4:yt,h5:bt,h6:xt,head:St,header:Ct,hgroup:wt,hr:Tt,html:Et,i:Dt,iframe:Ot,img:kt,input:At,ins:jt,kbd:Mt,label:Nt,legend:Pt,li:Ft,link:It,main:Lt,map:Rt,mark:zt,menu:Bt,meta:Vt,meter:Ht,nav:Ut,noscript:Wt,object:Gt,ol:Kt,optgroup:qt,option:Jt,output:Yt,p:Xt,picture:Zt,pre:Qt,progress:$t,q:en,rp:tn,rt:nn,ruby:rn,s:an,samp:on,script:sn,search:cn,section:ln,select:un,selectedcontent:dn,slot:fn,small:pn,source:mn,span:hn,strong:gn,style:_n,styleTag:vn,sub:yn,summary:bn,sup:xn,table:Sn,tbody:Cn,td:wn,template:Tn,textarea:En,tfoot:Dn,th:On,thead:kn,time:An,title:jn,tr:Mn,track:Nn,u:Pn,ul:Fn,varTag:In,video:Ln,wbr:Rn}=je;function zn(e){return typeof e==`string`?{name:e,tagName:e}:e}function Bn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M12 5v14`}),e.path({d:`m19 12-7 7-7-7`})})}function Vn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M19 12H5`}),e.path({d:`m12 19-7-7 7-7`})})}function Hn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M5 12h14`}),e.path({d:`m12 5 7 7-7 7`})})}function Un(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M12 19V5`}),e.path({d:`m5 12 7-7 7 7`})})}function Wn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9`}),e.path({d:`M10.3 21a1.94 1.94 0 0 0 3.4 0`})})}function Gn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`18`,rx:`2`,width:`18`,x:`3`,y:`4`}),e.path({d:`M16 2v4`}),e.path({d:`M8 2v4`}),e.path({d:`M3 10h18`})})}function Kn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M20 6 9 17l-5-5`})})}function qn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m6 9 6 6 6-6`})})}function Jn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m15 18-6-6 6-6`})})}function Yn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m9 18 6-6-6-6`})})}function Xn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m18 15-6-6-6 6`})})}function Zn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M18 6 6 18`}),e.path({d:`m6 6 12 12`})})}function Qn(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m16 18 6-6-6-6`}),e.path({d:`m8 6-6 6 6 6`})})}function $n(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`14`,rx:`2`,width:`14`,x:`8`,y:`8`}),e.path({d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})})}function er(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),e.path({d:`m7 10 5 5 5-5`}),e.path({d:`M12 15V3`})})}function tr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z`})})}function nr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),e.path({d:`m15 3 6 6`}),e.path({d:`m21 3-9 9`})})}function rr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z`}),e.circle({cx:`12`,cy:`12`,r:`3`})})}function ir(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),e.path({d:`M14 2v4a2 2 0 0 0 2 2h4`})})}function ar(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`})})}function or(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2`})})}function sr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z`})})}function cr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m3 9.5 9-6.5 9 6.5`}),e.path({d:`M5 10v10h5v-6h4v6h5V10`})})}function lr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`12`,cy:`12`,r:`10`}),e.path({d:`M12 16v-4`}),e.path({d:`M12 8h.01`})})}function ur(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`11`,rx:`2`,width:`18`,x:`3`,y:`11`}),e.path({d:`M7 11V7a5 5 0 0 1 10 0v4`})})}function dr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),e.path({d:`m16 17 5-5-5-5`}),e.path({d:`M21 12H9`})})}function fr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`16`,rx:`2`,width:`20`,x:`2`,y:`4`}),e.path({d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`})})}function pr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M4 6h16`}),e.path({d:`M4 12h16`}),e.path({d:`M4 18h16`})})}function mr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M5 12h14`})})}function hr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`5`,cy:`12`,r:`1`,fill:`currentColor`}),e.circle({cx:`12`,cy:`12`,r:`1`,fill:`currentColor`}),e.circle({cx:`19`,cy:`12`,r:`1`,fill:`currentColor`})})}function gr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M5 12h14`}),e.path({d:`M12 5v14`})})}function _r(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M3 12a9 9 0 0 1 15-6.7L21 8`}),e.path({d:`M21 3v5h-5`}),e.path({d:`M21 12a9 9 0 0 1-15 6.7L3 16`}),e.path({d:`M3 21v-5h5`})})}function vr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`11`,cy:`11`,r:`7`}),e.path({d:`m20 20-4-4`})})}function yr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`12`,cy:`12`,r:`3`}),e.path({d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`})})}function br(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`,fill:`currentColor`,stroke:`none`})})}function xr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M3 6h18`}),e.path({d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),e.path({d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}),e.path({d:`M10 10v6`}),e.path({d:`M14 10v6`})})}function Sr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),e.path({d:`m17 8-5-5-5 5`}),e.path({d:`M12 3v12`})})}function Cr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}),e.circle({cx:`12`,cy:`7`,r:`4`})})}function wr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M21.73 18 13.34 3.7a2 2 0 0 0-3.44 0L2.27 18A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),e.path({d:`M12 9v4`}),e.path({d:`M12 17h.01`})})}function Tr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`12`,cy:`12`,r:`4`}),e.path({d:`M12 2v2`}),e.path({d:`M12 20v2`}),e.path({d:`m4.93 4.93 1.41 1.41`}),e.path({d:`m17.66 17.66 1.41 1.41`}),e.path({d:`M2 12h2`}),e.path({d:`M20 12h2`}),e.path({d:`m6.34 17.66-1.41 1.41`}),e.path({d:`m19.07 4.93-1.41 1.41`})})}function Er(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`})})}function Dr(){return I(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`14`,rx:`2`,width:`20`,x:`2`,y:`3`}),e.path({d:`M8 21h8`}),e.path({d:`M12 17v4`})})}var Or=`http://www.w3.org/2000/svg`,kr=new Set([`desc`,`metadata`,`text`,`textPath`,`title`,`tspan`]),F=class e extends g{setup(e){return typeof e==`string`||typeof e==`number`?this.child(e):super.setup(e)}text(...e){if(kr.has(this._tagName)){let[t,n]=e;return e.length>0&&this.child(t),n!=null&&this.setup(n),this}return this._svgChild(`text`,...e)}style(...e){let[t,n]=e;return this._tagName===`style`&&e.length<=1?(e.length===1&&this.child(t),this):e.length<=1&&Ar(t)?this._svgChild(`style`,t):super.style(t,n)}renderDom(){return this._deleted?null:(this._el||(this._el=document.createElementNS(Or,this._tagName),this._applySnapshotToElement()),this._el)}_syncClassName(){let e=[...this._classes].join(` `);e?this._attrs.class=e:delete this._attrs.class,this._el&&(e?this._el.setAttribute(`class`,e):this._el.removeAttribute(`class`))}_svgChild(t,...n){let r=new e(t);return n.forEach(e=>{e!=null&&r.setup(e)}),this.child(r)}};function Ar(e){return e==null||typeof e==`function`||typeof e==`string`||typeof e==`number`||Array.isArray(e)}var jr=`animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.a.script.style.switch.text.title.symbol.textPath.tspan.use.view`.split(`.`);function Mr(e){return function(...t){let n=new F(e);return e===`svg`&&n.style(`display`,`block`),t.forEach(e=>{e!=null&&n.setup(e)}),n}}function Nr(){return jr.reduce((e,t)=>{let{aliases:n=[],name:r,tagName:i}=Fr(t),a=Mr(i);return e[r]=a,n.forEach(t=>{e[t]=a}),e},{})}var I=Mr(`svg`),Pr=Nr();v(P,{svg:I}),v(F,{svg:I,...Pr});function Fr(e){return typeof e==`string`?{name:e,tagName:e}:e}var L=`yoya-component`;function R(e,t){return`var(--yoya-${e}, ${t})`}function z(e,t,n=`1px`){return`${n} solid ${R(e,t)}`}function B(e=null,t=null,n=null){return m(e,t,n)}function Ir(e,t){return typeof e.attr==`function`||typeof e.styles==`function`?h(e,t):(typeof e.render==`function`&&h(e.render(),t),e)}function V(e,t=null,n=null){return Ir(e,t),typeof n==`function`&&n(e),e}function H(e,t=null,n=null,r=null){let{first:i,options:a,callback:o}=B(t,n,r);return V(i instanceof e?i:new e(i),a,o)}function U(e,t){return t==null?e:typeof t==`function`?(t(e),e):t instanceof l||Array.isArray(t)||typeof t==`string`||typeof t==`number`?(e.child(t),e):(q(t)&&e.setup(t),e)}function W(e){return e==null?[]:Array.isArray(e)?e:[e]}function G(e,t){return e.children().forEach(e=>e.destroy()),e._children=[],e._el&&e._el.replaceChildren(),t.length>0&&e.child(t),e}function Lr(e,t){return e._children=e.children().filter(e=>e!==t),e}function Rr(e,t){return t==null?e:typeof t==`function`?(t(e),e):q(t)?(e._setupButton(t),e):(e.label(t),e)}function K(e,t){return G(e,[]),t==null?e:typeof t==`function`?(t(e),e):(U(e,t),e)}function zr(e){let t={bottom:null,left:null,right:null,top:null},n={"bottom-end":{right:`0`,top:`calc(100% + 6px)`},"bottom-start":{left:`0`,top:`calc(100% + 6px)`},"top-end":{bottom:`calc(100% + 6px)`,right:`0`},"top-start":{bottom:`calc(100% + 6px)`,left:`0`}};return{...t,...n[e]||n[`bottom-start`]}}function Br(e,t){return e&&typeof e==`object`?{x:Number(e.clientX??e.x??0),y:Number(e.clientY??e.y??0)}:{x:Number(e||0),y:Number(t||0)}}function Vr(e){let t={error:{background:R(`color-danger-subtle`,`#fef2f2`),borderColor:R(`color-danger-border`,`#fecaca`),color:R(`color-danger-text`,`#991b1b`)},info:{background:R(`color-info-subtle`,`#eff6ff`),borderColor:R(`color-info-border`,`#bfdbfe`),color:R(`color-info-text`,`#1e3a8a`)},success:{background:R(`color-success-subtle`,`#ecfdf5`),borderColor:R(`color-success-border`,`#bbf7d0`),color:R(`color-success-text`,`#166534`)},warning:{background:R(`color-warning-subtle`,`#fffbeb`),borderColor:R(`color-warning-border`,`#fde68a`),color:R(`color-warning-text`,`#92400e`)}};return t[e]||t.info}function Hr(e){let t={bottom:null,left:null,right:null,top:null,transform:null},n={"bottom-left":{bottom:`16px`,left:`16px`},"bottom-right":{bottom:`16px`,right:`16px`},bottom:{bottom:`16px`,left:`50%`,transform:`translateX(-50%)`},"top-left":{left:`16px`,top:`16px`},"top-right":{right:`16px`,top:`16px`},top:{left:`50%`,top:`16px`,transform:`translateX(-50%)`}};return{...t,...n[e]||n[`top-right`]}}function Ur(e={}){return typeof e==`number`?{duration:e}:e||{}}function q(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function J(e){return e==null?``:Array.isArray(e)?e.map(e=>J(e)).join(``):typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):typeof e.textContent==`function`?e.textContent():String(e)}var Wr=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this.className(L,`yoya-vsplit-panel`),this.styles({boxSizing:`border-box`,display:`flex`,minHeight:`0`,minWidth:`0`,overflow:`hidden`,width:`100%`}),this._direction=`horizontal`,this._firstSize=`50%`,this._minSize=40,this._drag=null,this._dragMove=null,this._dragUp=null,this._first=new P(`div`).className(`yoya-vsplit-panel-first`).attr(`data-vsplit-first`,`true`).styles({boxSizing:`border-box`,minHeight:`0`,minWidth:`0`,overflow:`auto`}),this._second=new P(`div`).className(`yoya-vsplit-panel-second`).attr(`data-vsplit-second`,`true`).styles({boxSizing:`border-box`,flex:`1 1 auto`,minHeight:`0`,minWidth:`0`,overflow:`auto`}),this._divider=new P(`div`).className(`yoya-vsplit-panel-divider`).attr({"aria-orientation":`horizontal`,"data-vsplit-divider":`true`,role:`separator`,tabindex:`0`,title:`拖拽调整面板大小,双击恢复 50%`}).styles({background:`transparent`,boxSizing:`border-box`,flex:`0 0 auto`}).on(`mousedown`,e=>this._startDrag(e)).on(`dblclick`,()=>this.reset()).on(`keydown`,e=>this._handleKeydown(e)).on(`mouseenter`,()=>this._hoverDivider(!0)).on(`mouseleave`,()=>this._hoverDivider(!1)),this.child(this._first,this._divider,this._second),this._sync(),this._setupSplitPanel(e),V(this,t,n)}direction(e){return e===void 0?this._direction:(this._direction=e===`vertical`?`vertical`:`horizontal`,this._sync(),this)}size(e){return e===void 0?this._firstSize:(this._firstSize=Kr(e),this._sync(),this)}minSize(e){if(e===void 0)return this._minSize;let t=Number(e);return this._minSize=Number.isFinite(t)?Math.max(0,t):this._minSize,this}reset(){return this.size(`50%`)}first(e){return G(this._first,[]),typeof e==`function`?e(this._first):G(this._first,W(e)),this}second(e){return G(this._second,[]),typeof e==`function`?e(this._second):G(this._second,W(e)),this}destroy(){return this._endDrag(),super.destroy()}_sync(){let e=this._direction===`horizontal`;return this.style(`flexDirection`,e?`row`:`column`),this._first.styles({flex:`0 0 auto`,height:e?`100%`:this._firstSize,width:e?this._firstSize:`100%`}),this._divider.styles(e?{cursor:`col-resize`,height:`100%`,width:`6px`}:{cursor:`row-resize`,height:`6px`,width:`100%`}),this._divider.attr(`aria-orientation`,e?`horizontal`:`vertical`),this}_hoverDivider(e){this._divider.style(`background`,e?R(`color-primary-subtle`,`#eff6ff`):`var(--yoya-color-border-faint, #efefef)`)}_startDrag(e){if(e.button!==0||!this._el)return;e.preventDefault();let t=this._direction===`horizontal`,n=this._first._el.getBoundingClientRect(),r=t?e.clientX:e.clientY,i=t?n.width:n.height,a=t?this._el.offsetWidth:this._el.offsetHeight;this._drag={containerSize:a,start:r,startSize:i},this._dragMove=e=>this._onDrag(e),this._dragUp=()=>this._endDrag(),document.addEventListener(`mousemove`,this._dragMove),document.addEventListener(`mouseup`,this._dragUp)}_onDrag(e){if(!this._drag)return;let t=(this._direction===`horizontal`?e.clientX:e.clientY)-this._drag.start,n=qr(this._drag.startSize+t,this._minSize,this._drag.containerSize-this._minSize);this._firstSize=`${Math.round(n)}px`,this._sync()}_handleKeydown(e){let t=e.key===`ArrowLeft`||e.key===`ArrowUp`?-16:e.key===`ArrowRight`||e.key===`ArrowDown`?16:0;if(!t||!this._el)return;e.preventDefault();let n=this._direction===`horizontal`?this._el.offsetWidth:this._el.offsetHeight,r=qr((Number.parseFloat(this._firstSize)||0)+t,this._minSize,n-this._minSize);this._firstSize=`${Math.round(r)}px`,this._sync()}_endDrag(){this._dragMove&&=(document.removeEventListener(`mousemove`,this._dragMove),null),this._dragUp&&=(document.removeEventListener(`mouseup`,this._dragUp),null),this._drag=null}_setupSplitPanel(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{direction:t,first:n,minSize:r,second:i,size:a,...o}=e;Object.keys(o).length>0&&this.setup(o),t!==void 0&&this.direction(t),a!==void 0&&this.size(a),r!==void 0&&this.minSize(r),n!==void 0&&this.first(n),i!==void 0&&this.second(i);return}this.first(e)}}};function Gr(e=null,t=null,n=null){return H(Wr,e,t,n)}v(P,{vSplitPanel:Gr});function Kr(e){return typeof e==`number`?`${e}px`:e}function qr(e,t,n){return Number.isNaN(e)?t:Math.min(Math.max(e,t),Math.max(n,t))}var Jr=class extends P{constructor(e=null){super(`div`,null),this.className(`yoya-component`,`yoya-vtheme-shell`),this.styles({background:R(`color-surface`,`#ffffff`),border:`1px solid ${R(`color-border`,`#d8dee8`)}`,borderRadius:R(`radius-md`,`6px`),boxSizing:`border-box`,color:R(`color-text`,`#172033`),minWidth:`0`}),U(this,e)}_requireSingleShellChild(){let e=this.children();if(e.length!==1)throw TypeError(`vThemeShell virtual mode requires exactly one child`);return e[0]}_virtualTarget(){let e=this._requireSingleShellChild();return typeof e._resolve==`function`?e._resolve():e}_syncShellStyles(e){!e||typeof e.styles!=`function`||e.styles({background:this._styles.background,border:this._styles.border,borderColor:this._styles.borderColor,borderRadius:this._styles.borderRadius,boxSizing:this._styles.boxSizing,color:this._styles.color,minWidth:this._styles.minWidth,overflow:this._styles.overflow})}virtual(e=!0){return this._virtualMode=!!e,this}renderDom(){if(this._deleted)return null;if(this._virtualMode){let e=this._requireSingleShellChild(),t=this._virtualTarget();return this._syncShellStyles(t),e.renderDom()}return super.renderDom()}toHTML(){return this._deleted?``:this._virtualMode?this._requireSingleShellChild().toHTML():super.toHTML()}background(e){return e===void 0?this._styles.background:e===null?this:(this._styles.background=String(e),this._el&&(this._el.style.background=String(e)),this)}backgroundOpacity(e){let t=this.background()||R(`color-surface`,`#ffffff`),n=Math.max(0,Math.min(1,Number(e)||0));return this.background(`color-mix(in srgb, ${t} ${Math.round(n*100)}%, transparent)`)}radius(e){return e===void 0?this._styles.borderRadius:this.styles({borderRadius:e===null?void 0:String(e)})}border(e){return e===void 0?this._styles.border:this.styles({border:e===null?void 0:String(e)})}borderColor(e){return e===void 0?this._styles.borderColor:this.styles({borderColor:e===null?void 0:String(e)})}scrollable(e=!0){return this.styles({overflow:e?`auto`:`visible`})}};function Yr(e=null,t=null,n=null){return H(Jr,e,t,n)}v(g,{vThemeShell:Yr});var Xr=new Set(`align.areas.asideWidth.autoFlow.breakpoint.columns.direction.drawer.gutter.offset.pull.push.span.xs.sm.md.lg.xl.gap.justify.maxWidth.minColumnWidth.mobileDirection.mobileGap.orientation.padding.paddingInline.rows.safeArea.size.breakpoints.viewport.wrap`.split(`.`)),Zr=new Set([`height`,`width`]);function Qr(e=null,t=null,n=null){return Y(`flex`,{display:`flex`},e,Ci,t,n)}function $r(e=null,t=null,n=null){return Y(`stack`,{display:`flex`,flexDirection:`column`},e,Ci,t,n)}function ei(e=null,t=null,n=null){return Y(`vstack`,{display:`flex`,flexDirection:`column`},e,Ci,t,n)}function ti(e=null,t=null,n=null){return Y(`hstack`,{display:`flex`,flexDirection:`row`},e,Ci,t,n)}function ni(e=null,t=null,n=null){return Y(`center`,{display:`flex`,alignItems:`center`,justifyContent:`center`},e,Ci,t,n)}function ri(e=null,t=null,n=null){let r=B(e,t,n),i=new P(`div`);i.className(`yoya-layout`,`yoya-vrow`),i.styles({boxSizing:`border-box`,display:`flex`,flexWrap:`wrap`,width:`100%`}),i._gutter=null,i.gutter=e=>e===void 0?i._gutter:(i._gutter=X(e),Ai(i),i),i.justify=e=>e===void 0?i.style(`justifyContent`):(i.style(`justifyContent`,e),i),i.align=e=>e===void 0?i.style(`alignItems`):(i.style(`alignItems`,e),i),i.wrap=e=>e===void 0?i.style(`flexWrap`):(i.style(`flexWrap`,e===!1?`nowrap`:ea(e??!0)),i);let a=i.child.bind(i);return i.child=(...e)=>(a(...e),Ai(i),i),Si(i,r.first,ji),Ai(i),V(i,r.options,r.callback)}function ii(e=null,t=null,n=null){let r=B(e,t,n),i=new P(`div`);return i.className(`yoya-layout`,`yoya-vcol`),i.styles({boxSizing:`border-box`,minWidth:`0`}),i._baseCol=Pi({}),i._responsiveCols=[],i._gutter=null,i.refresh=i._refreshCol=()=>{let e=typeof window>`u`?null:window.innerWidth,t=(e===null?null:i._responsiveCols.filter(t=>e>=t.minWidth).at(-1))?.props??i._baseCol;return i.style(`boxSizing`,`border-box`),i.style(`flex`,`0 0 auto`),i.style(`left`,t.push?`${Ri(t.push)}%`:null),i.style(`marginLeft`,t.offset?`${Ri(t.offset)}%`:null),i.style(`paddingLeft`,i._gutter?zi(i._gutter):null),i.style(`paddingRight`,i._gutter?zi(i._gutter):null),i.style(`position`,t.push||t.pull?`relative`:null),i.style(`right`,t.pull?`${Ri(t.pull)}%`:null),i.style(`width`,`${Ri(t.span)}%`),i},i.span=e=>e===void 0?i._baseCol.span:(i._baseCol.span=Li(e),i._refreshCol(),i),i.offset=e=>e===void 0?i._baseCol.offset:(i._baseCol.offset=Li(e),i._refreshCol(),i),i.push=e=>e===void 0?i._baseCol.push:(i._baseCol.push=Li(e),i._refreshCol(),i),i.pull=e=>e===void 0?i._baseCol.pull:(i._baseCol.pull=Li(e),i._refreshCol(),i),i.gutter=e=>e===void 0?i._gutter:(i._gutter=X(e),i._refreshCol(),i),Si(i,r.first,Mi),i._refreshCol(),i._responsiveCols.length&&typeof window<`u`&&(i._colResize=()=>i._refreshCol(),window.addEventListener(`resize`,i._colResize),Bi(i)),V(i,r.options,r.callback)}function ai(e=null,t=null,n=null){return Y(`grid`,{display:`grid`},e,wi,t,n)}function oi(e=null,t=null,n=null){let r=B(e,t,n),i=Y(`responsive-grid`,{display:`grid`},r.first,Ti,r.options,r.callback),a=ra(r.first)?r.first:{};return i._responsiveGridBreakpoints=$i(a.breakpoints),i._responsiveGridMinColumnWidth=Qi(a.minColumnWidth),i._responsiveGridRefresh=()=>{let e=typeof window>`u`?null:window.innerWidth,t=e===null?null:i._responsiveGridBreakpoints.filter(t=>e>=t.minWidth).at(-1);return i.style(`gridTemplateColumns`,t?`repeat(${t.columns}, minmax(0, 1fr))`:`repeat(auto-fit, minmax(${i._responsiveGridMinColumnWidth}, 1fr))`),i},i.refresh=i._responsiveGridRefresh,i.minColumnWidth=e=>e===void 0?i._responsiveGridMinColumnWidth:(i._responsiveGridMinColumnWidth=Qi(e),i._responsiveGridRefresh(),i),i.breakpoints=e=>e===void 0?i._responsiveGridBreakpoints:(i._responsiveGridBreakpoints=$i(e),i._responsiveGridBreakpoints.length&&!i._responsiveGridResize&&typeof window<`u`&&(i._responsiveGridResize=()=>i._responsiveGridRefresh(),window.addEventListener(`resize`,i._responsiveGridResize),li(i)),i._responsiveGridRefresh(),i),i._responsiveGridRefresh(),i._responsiveGridBreakpoints.length&&typeof window<`u`&&(i._responsiveGridResize=()=>i._responsiveGridRefresh(),window.addEventListener(`resize`,i._responsiveGridResize),li(i)),i}function si(e=null,t=null,n=null){let r=B(e,t,n),i=new P(`div`),a=new P(`div`).className(`yoya-vbody-content`),o=i.child.bind(i);return i.className(`yoya-layout`,`yoya-vbody`),i.attr(`data-page-body`,`true`),i.styles({background:R(`color-bg`,`#f9f9f9`),boxSizing:`border-box`,color:R(`color-text`,`#0d0d0d`),fontFamily:R(`font-family`,`ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif`),fontSize:R(`font-size`,`14px`),lineHeight:R(`line-height`,`1.5`),minHeight:`100%`,padding:`clamp(16px, 3vw, 32px)`,width:`100%`}),a.styles({display:`grid`,gap:`24px`,marginLeft:`auto`,marginRight:`auto`,maxWidth:`1120px`,width:`100%`}),o(a),i.background=e=>e===void 0?i.style(`background`):(i.style(`background`,e),i),i.maxWidth=e=>e===void 0?a.style(`maxWidth`):(a.style(`maxWidth`,X(e)),i),i.padding=e=>e===void 0?i.style(`padding`):(i.style(`padding`,X(e)),i),i.gap=e=>e===void 0?a.style(`gap`):(a.style(`gap`,X(e)),i),i.minHeight=e=>e===void 0?i.style(`minHeight`):(i.style(`minHeight`,X(e)),i),i.content=e=>e===void 0?a:(typeof e==`function`?e(a):a.child(e),i),i.child=(...e)=>(a.child(...e),i),Ei(i,r.first),V(i,r.options,r.callback)}function ci(e=null,t=null){let n=si(e);return typeof document<`u`&&n.bindTo(t||document.body),n}function li(e){if(e._responsiveGridDestroyWrapped)return;e._responsiveGridDestroyWrapped=!0;let t=e.destroy.bind(e);e.destroy=()=>(e._responsiveGridResize&&window.removeEventListener(`resize`,e._responsiveGridResize),t())}function ui(e=null,t=null,n=null){return Y(`container`,{width:`100%`,maxWidth:`1120px`,marginLeft:`auto`,marginRight:`auto`,paddingLeft:`16px`,paddingRight:`16px`},e,Di,t,n)}function di(e=null,t=null,n=null){let r=B(e,t,n),i=new P(`div`);i.className(`yoya-layout`,`yoya-vcontainer`),i.styles({boxSizing:`border-box`,display:`flex`,minWidth:`0`,width:`100%`}),i._direction=null,i._viewport=!1,i._fill=!1,i._scrollable=!1,i.viewport=(e=!0)=>e===void 0?i._viewport:(i._viewport=!!e,i.styles({height:i._viewport?`100dvh`:null,minHeight:i._viewport?`100vh`:null,overflow:i._viewport?`hidden`:null}),i),i.fill=(e=!0)=>e===void 0?i._fill:(i._fill=!!e,i.styles({flex:i._fill?`1 1 auto`:null,height:i._fill?`auto`:null,minHeight:i._fill?`0`:null,minWidth:i._fill?`0`:null,overflow:i._fill?`hidden`:null}),i),i.scrollable=(e=!0)=>e===void 0?i._scrollable:(i._scrollable=!!e,i.styles({height:i._scrollable?`100%`:null,minHeight:i._scrollable?`0`:null,overflow:i._scrollable?`auto`:null,overscrollBehavior:i._scrollable?`contain`:null}),i),i._autoDirection=()=>i.children().some(e=>Gi(e))?`column`:`row`,i._syncContainerDirection=()=>(i.style(`flexDirection`,i._direction||i._autoDirection()),i),i.direction=e=>e===void 0?i._direction||i._autoDirection():(i._direction=e,i._syncContainerDirection(),i);let a=i.child.bind(i);return i.child=(...e)=>(a(...e),i._syncContainerDirection(),i),Si(i,r.first,Ki),i._syncContainerDirection(),V(i,r.options,r.callback)}function fi(e=null,t=null,n=null){let r=B(e,t,n),i=new P(`div`);i.className(`yoya-layout`,`yoya-mobile-layout`,`yoya-vmobile-layout`),i.attr(`data-mobile-layout`,`false`),i.styles({boxSizing:`border-box`,display:`flex`,minWidth:`0`,width:`100%`}),i._breakpoint=768,i._desktopDirection=`row`,i._mobileDirection=`column`,i._desktopGap=0,i._mobileGap=12,i._asideWidth=280,i._safeArea=!1,i._safeAreaApplied=!1,i._viewport=!1,i._mobile=!1,i._drawerEnabled=!0,i._asideOpen=!1,i._asideBackdrop=new P(`div`).className(`yoya-vmobile-layout-backdrop`).attr(`aria-hidden`,`true`).style(`display`,`none`).on(`click`,()=>i.closeAside()),i._asideToggle=new P(`button`).className(`yoya-vmobile-layout-toggle`).attr({type:`button`,"aria-label":`打开导航`,"aria-expanded":`false`}).style(`display`,`none`).child(pr().styles({height:`18px`,width:`18px`})).on(`click`,()=>i.toggleAside()),i._refreshMobileLayout=()=>{let e=typeof window>`u`?null:window.innerWidth,t=e!==null&&e<=i._breakpoint;return i._mobile=t,t||(i._asideOpen=!1),i.attr(`data-mobile-layout`,t?`true`:`false`),i.attr(`data-aside-open`,t&&i._asideOpen?`true`:null),i.styles({flexDirection:t?i._mobileDirection:i._desktopDirection,gap:t?i._mobileGap:i._desktopGap,height:i._viewport?`100dvh`:null,minHeight:i._viewport?`100vh`:null,overflow:i._viewport?`hidden`:null}),i._safeArea?(i._safeAreaApplied=!0,i.style(`paddingLeft`,t?`max(env(safe-area-inset-left), 0px)`:null),i.style(`paddingRight`,t?`max(env(safe-area-inset-right), 0px)`:null),i.style(`paddingTop`,t?`max(env(safe-area-inset-top), 0px)`:null),i.style(`paddingBottom`,t?`max(env(safe-area-inset-bottom), 0px)`:null)):i._safeAreaApplied&&(i._safeAreaApplied=!1,i.style(`paddingLeft`,null),i.style(`paddingRight`,null),i.style(`paddingTop`,null),i.style(`paddingBottom`,null)),i.children().forEach(e=>Hi(i,e)),Ui(i),i},i.refresh=i._refreshMobileLayout,i.breakpoint=e=>e===void 0?i._breakpoint:(i._breakpoint=Number(e),(!Number.isFinite(i._breakpoint)||i._breakpoint<=0)&&(i._breakpoint=768),i._refreshMobileLayout(),i),i.direction=(e,t)=>e===void 0?i._desktopDirection:(i._desktopDirection=e||`row`,t!==void 0&&(i._mobileDirection=t||`column`),i._refreshMobileLayout(),i),i.mobileDirection=e=>e===void 0?i._mobileDirection:(i._mobileDirection=e||`column`,i._refreshMobileLayout(),i),i.gap=(e,t)=>e===void 0?i._desktopGap:(i._desktopGap=X(e),t!==void 0&&(i._mobileGap=X(t)),i._refreshMobileLayout(),i),i.mobileGap=e=>e===void 0?i._mobileGap:(i._mobileGap=X(e),i._refreshMobileLayout(),i),i.asideWidth=e=>e===void 0?i._asideWidth:(i._asideWidth=X(e),i._refreshMobileLayout(),i),i.viewport=(e=!0)=>e===void 0?i._viewport:(i._viewport=!!e,i._refreshMobileLayout(),i),i.safeArea=(e=!0)=>e===void 0?i._safeArea:(i._safeArea=!!e,i._refreshMobileLayout(),i),i.drawer=(e=!0)=>e===void 0?i._drawerEnabled:(i._drawerEnabled=!!e,i._drawerEnabled||(i._asideOpen=!1),i._refreshMobileLayout(),i),i.asideOpen=e=>e===void 0?i._asideOpen:(i._asideOpen=!!e,i._refreshMobileLayout(),i),i.openAside=()=>i.asideOpen(!0),i.closeAside=()=>i.asideOpen(!1),i.toggleAside=()=>i.asideOpen(!i._asideOpen),i.mobile=()=>i._mobile;let a=i.child.bind(i);return i.child=(...e)=>(a(...e),i._refreshMobileLayout(),i),Si(i,r.first,qi),i.child(i._asideBackdrop,i._asideToggle),typeof window<`u`&&(i._mobileLayoutResize=()=>i._refreshMobileLayout(),window.addEventListener(`resize`,i._mobileLayoutResize),Vi(i)),i._refreshMobileLayout(),V(i,r.options,r.callback)}var pi=fi;function mi(e=null,t=null,n=null){return Y(`vheader`,{boxSizing:`border-box`,flex:`0 0 auto`,height:`60px`,width:`100%`},e,Ji,t,n,`header`,Zr,bi)}function hi(e=null,t=null,n=null){return Y(`vaside`,{boxSizing:`border-box`,flex:`0 0 auto`,minWidth:`0`,width:`300px`},e,Yi,t,n,`aside`,Zr,xi)}function gi(e=null,t=null,n=null){return Y(`vmain`,{boxSizing:`border-box`,flex:`1 1 auto`,minHeight:`0`,minWidth:`0`,overflow:`auto`},e,Xi,t,n,`main`,Zr,xi)}function _i(e=null,t=null,n=null){return Y(`vfooter`,{boxSizing:`border-box`,flex:`0 0 auto`,height:`60px`,width:`100%`},e,Ji,t,n,`footer`,Zr,bi)}function vi(e=null,t=null,n=null){let r=Y(`spacer`,{flexGrow:1,minWidth:0,minHeight:0},e,Oi,t,n);return r.attr(`aria-hidden`,`true`),r}function yi(e=null,t=null,n=null){let r=Y(`divider`,{},e,ki,t,n);return r.attr(`role`,`separator`),r.attr(`aria-orientation`)||r.attr(`aria-orientation`,`horizontal`),r}v(P,{vAside:hi,vCol:ii,vContainer:di,vFooter:_i,vHeader:mi,vMain:gi,vRow:ri,vSplitPanel:Gr,center:ni,container:ui,divider:yi,flex:Qr,grid:ai,mobileLayout:fi,responsiveGrid:oi,vMobileLayout:pi,vBody:si,hstack:ti,spacer:vi,stack:$r,vstack:ei});function Y(e,t,n,r,i,a,o=`div`,s=null,c=null){let l=B(n,i,a),u=new P(o);return u.className(`yoya-layout`,`yoya-${e}`),u.styles(t),c&&c(u),Si(u,l.first,r,s),V(u,l.options,l.callback)}function bi(e){e.sticky=(t=!0)=>{if(t===void 0)return e.style(`position`)===`sticky`;let n=!!t;return e.styles({position:n?`sticky`:null,top:n?`0`:null,zIndex:n?`20`:null}),e}}function xi(e){e.scrollable=(t=!0)=>{if(t===void 0)return e.style(`overflow`)===`auto`;let n=!!t;return e.styles({height:n?`100%`:null,minHeight:n?`0`:null,overflow:n?`auto`:null,overscrollBehavior:n?`contain`:null}),e}}function Si(e,t,n,r=null){if(t==null)return n(e,{}),e;if(!ra(t))return n(e,{}),e.setup(t);n(e,t);let i=ta(t,r);return Object.keys(i).length>0&&e.setup(i),e}function Ci(e,t){e.styles(na({alignItems:t.align,flexDirection:t.direction,flexWrap:ea(t.wrap),gap:t.gap,justifyContent:t.justify}))}function wi(e,t){e.styles(na({gap:t.gap,gridAutoFlow:t.autoFlow,gridTemplateAreas:t.areas,gridTemplateColumns:Zi(t.columns),gridTemplateRows:Zi(t.rows)}))}function Ti(e,t){e.style(`gap`,t.gap),e.style(`gridTemplateColumns`,`repeat(auto-fit, minmax(${Qi(t.minColumnWidth)}, 1fr))`)}function Ei(e,t){if(t==null)return e;if(typeof t==`function`)return t(e),e;if(!ra(t))return e.child(t),e;let{background:n,children:r,content:i,gap:a,maxWidth:o,minHeight:s,padding:c,...l}=t;Object.keys(l).length&&e.setup(l),n!==void 0&&e.background(n),o!==void 0&&e.maxWidth(o),c!==void 0&&e.padding(c),a!==void 0&&e.gap(a),s!==void 0&&e.minHeight(s);let u=i??r;return u!==void 0&&e.content(u),e}function Di(e,t){let n=t.paddingInline??t.padding;e.styles(na({maxWidth:t.maxWidth,paddingLeft:n,paddingRight:n}))}function Oi(e,t){e.styles(na({flexBasis:t.size,height:t.orientation===`vertical`?t.size:void 0,width:t.orientation===`horizontal`?t.size:void 0}))}function ki(e,t){let n=t.orientation===`vertical`?`vertical`:`horizontal`;if(e.attr(`aria-orientation`,n),n===`vertical`){e.styles({alignSelf:`stretch`,background:`currentColor`,opacity:.2,width:`1px`});return}e.styles({background:`currentColor`,height:`1px`,opacity:.2,width:`100%`})}function Ai(e){e.children().forEach(t=>{let n=t?._resolved??t?._resolve?.()??t;n&&typeof n.gutter==`function`&&n.gutter(e._gutter)})}function ji(e,t){t.gutter!==void 0&&e.gutter(t.gutter),e.styles(na({alignItems:t.align,flexWrap:t.wrap===void 0||t.wrap===null?`wrap`:t.wrap===!1?`nowrap`:ea(t.wrap),justifyContent:t.justify}))}function Mi(e,t){e._baseCol=Pi(t),e._responsiveCols=Fi(t),t.gutter!==void 0&&e.gutter(t.gutter)}var Ni=[[`xs`,0],[`sm`,768],[`md`,992],[`lg`,1200],[`xl`,1920]];function Pi(e={}){return{span:Li(e.span??24),offset:Li(e.offset??0),push:Li(e.push??0),pull:Li(e.pull??0)}}function Fi(e={}){return Ni.filter(([t])=>e[t]!==void 0).map(([t,n])=>({minWidth:n,props:Ii(e[t])}))}function Ii(e){return typeof e==`number`?Pi({span:e}):ra(e)?Pi(e):Pi({})}function Li(e){let t=Number(e);return Number.isFinite(t)?Math.min(24,Math.max(0,Math.round(t))):0}function Ri(e){return e/24*100}function zi(e){if(typeof e==`number`)return`${e/2}px`;let t=String(e).match(/^(-?(?:\d+\.?\d*|\.\d+))([a-z%]+)$/i);return t?`${Number(t[1])/2}${t[2]}`:`calc(${e} * 0.5)`}function Bi(e){if(e._colDestroyWrapped)return;e._colDestroyWrapped=!0;let t=e.destroy.bind(e);e.destroy=()=>(e._colResize&&window.removeEventListener(`resize`,e._colResize),t())}function Vi(e){if(e._mobileLayoutDestroyWrapped)return;e._mobileLayoutDestroyWrapped=!0;let t=e.destroy.bind(e);e.destroy=()=>(e._mobileLayoutResize&&window.removeEventListener(`resize`,e._mobileLayoutResize),t())}function Hi(e,t){let n=t?._resolved??t?._resolve?.()??t;if(!n||typeof n.styles!=`function`)return;let r=n._classes;if(r?.has(`yoya-vaside`)&&e._mobile&&e._drawerEnabled){n.styles({bottom:`0`,boxShadow:e._asideOpen?`0 12px 36px rgba(15, 23, 42, 0.28)`:`none`,display:`flex`,flexDirection:`column`,height:`100dvh`,left:`0`,maxWidth:`84vw`,minHeight:`100vh`,minWidth:`0`,pointerEvents:e._asideOpen?`auto`:`none`,position:`fixed`,top:`0`,transform:e._asideOpen?`translateX(0)`:`translateX(-100%)`,transition:`transform 180ms ease, box-shadow 180ms ease, visibility 180ms ease`,visibility:e._asideOpen?`visible`:`hidden`,width:`320px`,zIndex:`40`}),n.attr(`aria-hidden`,e._asideOpen?null:`true`),n._mobileDrawerAriaHiddenApplied=!0,n._mobileDrawerStylesApplied=!0,n._mobileDrawerClickBound||(n._mobileDrawerClickBound=!0,n.on(`click`,t=>{t.target?.closest?.(`.yoya-vmenu-item`)&&!t.target.closest?.(`.yoya-vsubmenu-trigger`)&&e.closeAside()}));return}if(r?.has(`yoya-vaside`)){n._mobileDrawerStylesApplied&&(n._mobileDrawerStylesApplied=!1,n.styles({bottom:null,boxShadow:null,display:null,height:null,left:null,minHeight:null,minWidth:null,pointerEvents:null,position:null,top:null,transform:null,transition:null,visibility:null,zIndex:null})),n._mobileDrawerAriaHiddenApplied&&(n._mobileDrawerAriaHiddenApplied=!1,n.attr(`aria-hidden`,null));let t=e._mobile?`100%`:X(e._asideWidth);n.styles({flex:`0 0 auto`,maxWidth:t,width:t});return}r?.has(`yoya-vmain`)&&(n.styles({flex:`1 1 auto`,minHeight:`0`,minWidth:`0`}),e._mobile&&e._drawerEnabled?(n.styles({maxWidth:`100%`,width:`100%`}),n._mobileDrawerMainStylesApplied=!0):n._mobileDrawerMainStylesApplied&&(n._mobileDrawerMainStylesApplied=!1,n.styles({maxWidth:null,width:null})))}function Ui(e){let t=e._mobile&&e._drawerEnabled&&Wi(e),n=t&&e._asideOpen,r=e._asideBackdrop,i=e._asideToggle;i&&i.attr(`aria-expanded`,n?`true`:`false`).attr(`aria-label`,n?`关闭导航`:`打开导航`).styles({alignItems:`center`,background:`var(--yoya-color-surface, #ffffff)`,border:`0`,borderRadius:`10px`,boxShadow:t?`0 2px 10px rgba(15, 23, 42, 0.18)`:`none`,color:`#172033`,cursor:`pointer`,display:t?`inline-flex`:`none`,height:`38px`,justifyContent:`center`,left:`12px`,padding:`0`,position:`fixed`,top:`max(env(safe-area-inset-top), 10px)`,width:`38px`,zIndex:`45`}),r&&r.styles({background:n?`rgba(15, 23, 42, 0.42)`:null,display:n?`block`:`none`,inset:`0`,position:`fixed`,zIndex:n?`35`:null})}function Wi(e){return e.children().some(e=>!!(e?._resolved??e?._resolve?.()??e)?._classes?.has(`yoya-vaside`))}function Gi(e){let t=(e?._resolved??e?._resolve?.()??e)?._classes;return!!(t?.has(`yoya-vheader`)||t?.has(`yoya-vfooter`))}function Ki(e,t){t.direction!==void 0&&e.direction(t.direction),e.styles(na({gap:t.gap}))}function qi(e,t){e.styles(na({alignItems:t.align,flexWrap:ea(t.wrap),justifyContent:t.justify})),t.direction===void 0?t.mobileDirection!==void 0&&e.mobileDirection(t.mobileDirection):e.direction(t.direction,t.mobileDirection),t.gap===void 0?t.mobileGap!==void 0&&e.mobileGap(t.mobileGap):e.gap(t.gap,t.mobileGap),t.breakpoint!==void 0&&e.breakpoint(t.breakpoint),t.asideWidth!==void 0&&e.asideWidth(t.asideWidth),t.drawer!==void 0&&e.drawer(t.drawer),t.viewport!==void 0&&e.viewport(t.viewport),t.safeArea!==void 0&&e.safeArea(t.safeArea)}function Ji(e,t){e.style(`height`,X(t.height??t.size??60)),e.style(`width`,`100%`)}function Yi(e,t){e.style(`width`,X(t.width??t.size??300))}function Xi(e,t={}){t.height!==void 0&&e.style(`height`,X(t.height))}function Zi(e){if(e!=null&&e!==!1)return typeof e==`number`?`repeat(${e}, minmax(0, 1fr))`:String(e)}function Qi(e){return typeof e==`number`?`${e}px`:e||`240px`}function X(e){return typeof e==`number`?`${e}px`:e}function $i(e){return e?(Array.isArray(e)?e:Object.entries(e).map(([e,t])=>({minWidth:e,columns:t}))).map(e=>({columns:Number(e.columns),minWidth:Number.parseInt(e.minWidth,10)})).filter(({columns:e,minWidth:t})=>Number.isFinite(t)&&e>0).sort((e,t)=>e.minWidth-t.minWidth):[]}function ea(e){if(e===!0)return`wrap`;if(e!==!1&&e!=null)return String(e)}function ta(e,t=null){let n=t||Xr;return Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))}function na(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null&&e!==!1))}function ra(e){return Object.prototype.toString.call(e)===`[object Object]`}var ia=class extends P{constructor(e=null,t=null,n=null){super(`button`,null),this._variant=`secondary`,this._size=`medium`,this._focused=!1,this._hovered=!1,this._pressed=!1,this._labelBox=new P(`span`).className(`yoya-vbutton-label`),this._loadingBox=new P(`span`).className(`yoya-vbutton-spinner`).attr(`aria-hidden`,`true`),this.className(L,`yoya-vbutton`),this.attr(`type`,`button`),this.child(this._loadingBox,this._labelBox),this._bindInteractionEffects(),this.type(this._variant),this.size(this._size);let r=B(e,t,n);this._setupButton(r.first),V(this,r.options,r.callback)}label(e){return G(this._labelBox,W(e)),this}content(e){return this.label(e)}type(e){return e===void 0?this._variant:(this._variant=e||`secondary`,this.attr(`data-variant`,this._variant),this._syncInteractionStyles(),this)}variant(e){return this.type(e)}formType(e){if(e===void 0)return this.attr(`type`);let t=new Set([`button`,`submit`,`reset`]);return this.attr(`type`,t.has(e)?e:`button`)}size(e){return e===void 0?this._size:(this._size=e||`medium`,this.attr(`data-size`,this._size),this)}disabled(e){return this.setState(`disabled`,!!e),this.attr(`disabled`,e?!0:null),e&&(this._hovered=!1,this._pressed=!1),this._syncInteractionStyles(),this}loading(e){let t=!!e;return this.setState(`loading`,t),this.attr(`aria-busy`,t?`true`:null),this.attr(`data-loading`,t?`true`:null),this._loadingBox.textContent(t?`...`:``),this._syncInteractionStyles(),this}_bindInteractionEffects(){this.on(`mouseenter`,()=>{this.getBooleanState(`disabled`)||(this._hovered=!0,this._syncInteractionStyles())}),this.on(`mouseleave`,()=>{this._hovered=!1,this._pressed=!1,this._syncInteractionStyles()}),this.on(`mousedown`,e=>{!this.getBooleanState(`disabled`)&&e.button===0&&(this._pressed=!0,this._syncInteractionStyles())}),this.on(`mouseup`,()=>{this._pressed=!1,this._syncInteractionStyles()}),this.on(`focus`,()=>{this.getBooleanState(`disabled`)||(this._focused=!0,this._syncInteractionStyles())}),this.on(`blur`,()=>{this._focused=!1,this._pressed=!1,this._syncInteractionStyles()}),this.on(`keydown`,e=>{!this.getBooleanState(`disabled`)&&[`Enter`,` `,`Spacebar`].includes(e.key)&&(this._pressed=!0,this._syncInteractionStyles())}),this.on(`keyup`,e=>{[`Enter`,` `,`Spacebar`].includes(e.key)&&(this._pressed=!1,this._syncInteractionStyles())})}_interactionState(){return this.getBooleanState(`disabled`)?`disabled`:this._pressed?`active`:this._focused?`focus`:this._hovered?`hover`:`rest`}_syncInteractionStyles(){let e=this._interactionState();return this.attr(`data-interaction`,e===`rest`?null:e),this}_setupButton(e){if(typeof e==`function`)e(this);else if(q(e)){let{children:t,label:n,text:r,variant:i,type:a,formType:o,size:s,disabled:c,loading:l,attrs:u,style:d,...f}=e;Object.keys(f).length>0&&this.setup(f),Ir(this,{attrs:u,style:d}),n===void 0?r===void 0?t!==void 0&&this.label(t):this.label(r):this.label(n),i===void 0?a!==void 0&&this.type(a):this.variant(i),s!==void 0&&this.size(s),o!==void 0&&this.formType(o),c!==void 0&&this.disabled(c),l!==void 0&&this.loading(l)}else e!=null&&this.label(e)}};function aa(e=null,t=null,n=null){return new ia(e,t,n)}var oa=new WeakMap,sa=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this._variant=`secondary`,this._size=`medium`,this._selectable=!1,this._value=null,this._buttons=[],this._changeHandler=null,this.className(L,`yoya-vbuttons`),this.attr(`role`,`group`),this.styles({display:`inline-flex`,flexWrap:`wrap`,gap:`8px`,minWidth:`0`,verticalAlign:`middle`});let r=B(e,t,n);this._setupButtons(r.first),V(this,r.options,r.callback)}child(...e){return e.flat(1/0).forEach(e=>{if(e==null)return;let t=p(e);t instanceof ia&&this._registerButton(t),super.child(t)}),this}variant(e){if(e===void 0)return this._variant;let t=this._variant;return this._variant=e||`secondary`,this._buttons.forEach(e=>{oa.get(e)===t&&oa.set(e,this._variant)}),this._syncSelection(),this}size(e){return e===void 0?this._size:(this._size=e||`medium`,this._buttons.forEach(e=>e.size(this._size)),this)}selectable(e=!0){return this._selectable=!!e,this._syncSelection(),this}value(e){return e===void 0?this._value:(this._value=e,this._syncSelection(),this)}change(e){return e===void 0?this._changeHandler:(this._changeHandler=typeof e==`function`?e:null,this)}joined(e=!0){return this._joined=!!e,this._applyJoinedLayout(),this}disabled(e){return this._buttons.forEach(t=>t.disabled(!!e)),this}options(e){return e===void 0?this._buttons.slice():(this._buttons=[],G(this,(Array.isArray(e)?e:[e]).map(e=>this._createButton(e))),this._applyJoinedLayout(),this)}_createButton(e){if(e instanceof ia)return e;let t=new ia;if(t.variant(this._variant),t.size(this._size),typeof e==`string`||typeof e==`number`)return t.label(e),oa.set(t,this._variant),t;if(q(e)){let{children:n,disabled:r,label:i,size:a,text:o,value:s,variant:c,...l}=e;return Object.keys(l).length>0&&t.setup(l),i===void 0?o===void 0?n!==void 0&&t.label(n):t.label(o):t.label(i),c!==void 0&&t.variant(c),a!==void 0&&t.size(a),s!==void 0&&t.attr(`data-value`,J(s)),r!==void 0&&t.disabled(r),oa.set(t,c||this._variant),t}return oa.set(t,this._variant),t}_registerButton(e){this._buttons.includes(e)||(oa.has(e)||oa.set(e,e.type()||this._variant),e.size(this._size),e.on(`click`,()=>{if(!this._selectable)return;let t=this._buttonValue(e);t!==this._value&&(this.value(t),typeof this._changeHandler==`function`&&this._changeHandler(t,this))}),this._buttons.push(e),this._applyJoinedLayout())}_buttonValue(e){let t=e.attr(`data-value`);return String(t??e._labelBox?.textContent()??``)}_syncSelection(){return this._buttons.forEach(e=>{let t=this._selectable&&this._buttonValue(e)===this._value;e.variant(t?`primary`:oa.get(e)||this._variant),e.attr(`aria-pressed`,t?`true`:null),e.attr(`data-selected`,t?`true`:null),e.style(`zIndex`,this._joined&&t?`1`:null)}),this}_applyJoinedLayout(){return this.style(`gap`,this._joined?`0`:`8px`),this.style(`flexWrap`,this._joined?`nowrap`:`wrap`),this._buttons.forEach((e,t)=>{if(!this._joined){e.style(`borderRadius`,null),e.style(`marginLeft`,null);return}let n=this._joinedRadius(t);e.style(`borderRadius`,n),e.style(`marginLeft`,t===0?null:`-1px`)}),this._syncSelection(),this}_joinedRadius(e){let t=this._buttons.length;return t<=1?null:e===0?`var(--yoya-radius-md, 6px) 0 0 var(--yoya-radius-md, 6px)`:e===t-1?`0 var(--yoya-radius-md, 6px) var(--yoya-radius-md, 6px) 0`:`0`}_setupButtons(e){if(typeof e==`function`){e(this);return}if(q(e)){let{attrs:t,change:n,children:r,disabled:i,joined:a,options:o,selectable:s,size:c,style:l,value:u,variant:d,...f}=e;Object.keys(f).length>0&&this.setup(f),Ir(this,{attrs:t,style:l}),d!==void 0&&this.variant(d),c!==void 0&&this.size(c),s!==void 0&&this.selectable(s),u!==void 0&&this.value(u),n!==void 0&&this.change(n),i!==void 0&&this.disabled(i),a!==void 0&&this.joined(a),o!==void 0&&this.options(o),r!==void 0&&this.child(r);return}if(Array.isArray(e)){this.options(e);return}e!=null&&this.options([e])}};function ca(e=null,t=null,n=null){return new sa(e,t,n)}var la=0;function ua(){return la+=1,la}function da(e){return`${e}-${ua()}`}var fa=class extends P{constructor(e=null){super(`div`,null),this.className(L,`yoya-vmenu`),this.orientation(`vertical`),this.on(`focusin`,e=>this._handleFocusin(e)),this.on(`keydown`,e=>this._handleKeydown(e)),this.on(`yoya:menuitem-statechange`,()=>this._syncTabStops()),this._setupMenu(e)}orientation(e=`vertical`){let t=e===`horizontal`?`horizontal`:`vertical`;return this.attr(`data-orientation`,t),this.attr(`role`,t===`horizontal`?`menubar`:`menu`),this.attr(`aria-orientation`,t),this.children().forEach(e=>{_a(e,t)}),this}child(...e){super.child(...e);let t=this.attr(`data-orientation`)||`vertical`;return this.children().forEach(e=>{_a(e,t)}),this._el&&this._syncTabStops(),this._sidebarContentChangeCallback?.(),this}horizontal(){return this.orientation(`horizontal`)}vertical(){return this.orientation(`vertical`)}renderDom(){let e=super.renderDom();return this._syncTabStops(),e}_enabledMenuItems(){return this._el?this._menuItems().filter(e=>!e.disabled):[]}_menuItems(){return this._el?Array.from(this._el.querySelectorAll(`.yoya-vmenu-item`)).filter(e=>e.closest(`.yoya-vmenu`)===this._el):[]}_syncTabStops(e=null){if(!this._el)return this;let t=this._menuItems(),n=t.filter(e=>!e.disabled),r=n.includes(e)?e:n.find(e=>e.tabIndex===0)||n[0];return t.forEach(e=>{e.tabIndex=e===r?0:-1}),this}_handleKeydown(e){if(e.target.closest?.(`.yoya-vmenu`)!==this._el)return;let t=(this.attr(`data-orientation`)||`vertical`)===`vertical`?{ArrowDown:1,ArrowUp:-1}:{ArrowLeft:-1,ArrowRight:1},n=this._enabledMenuItems(),r=e.target.closest?.(`.yoya-vmenu-item`);if(n.length===0||!t[e.key]&&e.key!==`Home`&&e.key!==`End`)return;e.preventDefault();let i;i=e.key===`Home`?0:e.key===`End`?n.length-1:(Math.max(0,n.indexOf(r))+t[e.key]+n.length)%n.length;let a=n[i];this._syncTabStops(a),a.focus()}_handleFocusin(e){if(e.target.closest?.(`.yoya-vmenu`)!==this._el)return;let t=e.target.closest?.(`.yoya-vmenu-item`);t&&!t.disabled&&this._syncTabStops(t)}_setupMenu(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,orientation:n,horizontal:r,...i}=e;Object.keys(i).length>0&&this.setup(i),n===void 0?r!==void 0&&this.orientation(r?`horizontal`:`vertical`):this.orientation(n),t!==void 0&&this.child(t);return}U(this,e)}}},pa=class extends P{constructor(e=null){super(`button`,null),this._iconBox=new P(`span`).className(`yoya-vmenu-item-icon`).attr(`aria-hidden`,`true`).style(`display`,`none`),this._labelBox=new P(`span`).className(`yoya-vmenu-item-label`),this._shortcutBox=new P(`span`).className(`yoya-vmenu-item-shortcut`).attr(`aria-hidden`,`true`).style(`display`,`none`),this.className(L,`yoya-vmenu-item`),this.attr({role:`menuitem`,type:`button`}),this.child(this._iconBox,this._labelBox,this._shortcutBox),this.on(`mouseenter`,()=>this._setHover(!0)),this.on(`mouseleave`,()=>this._setHover(!1)),this._setupMenuItem(e)}text(e){return G(this._labelBox,W(e)),this}label(e){return this.text(e)}content(e){return this.text(e)}icon(e){return G(this._iconBox,W(e)),this._iconBox.style(`display`,e==null||e===``?`none`:null),this}shortcut(e){return G(this._shortcutBox,W(e)),this._shortcutBox.style(`display`,e==null||e===``?`none`:null),this}active(e=!0){let t=!!e;return this.setState(`active`,t),this.attr(`data-active`,t?`true`:null),this.attr(`aria-current`,t?`page`:null),this}danger(e=!0){let t=!!e;return this.setState(`danger`,t),this.attr(`data-danger`,t?`true`:null),this}_setHover(e){return this.attr(`data-hovered`,e?`true`:null),this}disabled(e){let t=!!e;if(this.setState(`disabled`,t),this.attr(`disabled`,t?!0:null),this.attr(`aria-disabled`,t?`true`:null),this._el){let e=this._el.ownerDocument.defaultView.Event;this._el.dispatchEvent(new e(`yoya:menuitem-statechange`,{bubbles:!0}))}return this}hoverable(e=!0){return this.attr(`data-hoverable`,e?`true`:null),this}_menuOrientation(e){return this.attr(`data-orientation`,e),this}_setupMenuItem(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{active:t,children:n,content:r,danger:i,disabled:a,icon:o,label:s,shortcut:c,text:l,...u}=e;Object.keys(u).length>0&&this.setup(u),s===void 0?l===void 0?r===void 0?n!==void 0&&this.text(n):this.content(r):this.text(l):this.label(s),o!==void 0&&this.icon(o),c!==void 0&&this.shortcut(c),t!==void 0&&this.active(t),i!==void 0&&this.danger(i),a!==void 0&&this.disabled(a);return}this.text(e)}}},ma=class extends P{constructor(e=null){super(`div`,null),this.className(L,`yoya-vmenu-divider`),this.attr(`role`,`separator`),this._menuOrientation(`vertical`),U(this,e)}_menuOrientation(e){let t=e===`horizontal`;return this.attr(`aria-orientation`,t?`vertical`:`horizontal`),this.attr(`data-orientation`,e),this}},ha=class extends P{constructor(e=null){super(`div`,null);let t=da(`yoya-vmenu-group-label`);this._orientation=`vertical`,this._labelBox=new P(`div`).className(`yoya-vmenu-group-label`).id(t),this.className(L,`yoya-vmenu-group`),this.attr({"aria-labelledby":t,role:`group`}),super.child(this._labelBox),this._setupMenuGroup(e)}label(e){return G(this._labelBox,W(e)),this}title(e){return this.label(e)}child(...e){if(super.child(...e),this.children().forEach(e=>_a(e,this._orientation)),this._el){let e=this._el.ownerDocument.defaultView.Event;this._el.dispatchEvent(new e(`yoya:menuitem-statechange`,{bubbles:!0}))}return this._sidebarContentChangeCallback?.(),this}_menuOrientation(e){return this._orientation=e===`horizontal`?`horizontal`:`vertical`,this.attr(`data-orientation`,this._orientation),this.children().forEach(e=>_a(e,this._orientation)),this}_setupMenuGroup(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,label:n,title:r,...i}=e;Object.keys(i).length>0&&this.setup(i),n===void 0?r!==void 0&&this.title(r):this.label(n),t!==void 0&&this.child(t);return}this.label(e)}}},ga=class e extends P{constructor(e=null){super(`div`,null);let t=da(`yoya-vsubmenu-panel`);this._globalCloseCleanup=null,this._trigger=new pa().className(`yoya-vsubmenu-trigger`).attr({"aria-controls":t,"aria-expanded":`false`,"aria-haspopup":`menu`}).shortcut(`›`).on(`click`,e=>{e.preventDefault(),this.getBooleanState(`disabled`)||this.toggle()}),this._menu=new fa().className(`yoya-vsubmenu-content`),this._menu.on(`click`,e=>{let t=e.target?.closest?.(`.yoya-vmenu-item`);t&&!t.disabled&&!t.classList.contains(`yoya-vsubmenu-trigger`)&&(this._inline?this._selectInlineItem(t):this.close())}),this._panel=new P(`div`).id(t).className(`yoya-vsubmenu-panel`).child(this._menu),this.className(L,`yoya-vsubmenu`),this.on(`keydown`,e=>this._handleKeydown(e)),this.child(this._trigger,this._panel),this._setupSubMenu(e)}trigger(e){return e===void 0?this._trigger:(typeof e==`function`?e(this._trigger):this._trigger._setupMenuItem(e),this)}label(e){return this._trigger.label(e),this}text(e){return this.label(e)}menuContent(e){return e===void 0?this._menu:(K(this._menu,e),this)}inline(e=!0){return this._inline=!!e,this.attr(`data-inline`,this._inline?`true`:null),this._trigger.shortcut(this._inline?this.getBooleanState(`open`)?`▾`:`▸`:`›`),this}disabled(e=!0){let t=!!e;return this.setState(`disabled`,t),this.attr(`data-disabled`,t?`true`:null),this._trigger.disabled(t),t&&this.close(),this}open(e=!0){let t=!!e&&!this.getBooleanState(`disabled`);return this.setState(`open`,t),this.attr(`data-open`,t?`true`:null),this._trigger.attr(`aria-expanded`,t?`true`:`false`),this._inline&&this._trigger.shortcut(t?`▾`:`▸`),t?this._bindGlobalCloseHandlers():(this._closeDescendantSubMenus(),this._releaseGlobalCloseHandlers()),this}close(){return this.open(!1)}toggle(){return this.open(!this.getBooleanState(`open`))}_selectInlineItem(e){let t=n=>{n.forEach(n=>{n instanceof pa?n.active(n.renderDom()===e):typeof n.children==`function`&&t(n.children())})};t(this._menu.children())}destroy(){return this.close(),super.destroy()}_menuOrientation(e){return this.attr(`data-orientation`,e),this._trigger._menuOrientation(e),this}_handleKeydown(e){let t=e.target.closest?.(`.yoya-vsubmenu`),n=e.target.closest?.(`.yoya-vsubmenu-trigger`),r=[`ArrowRight`,`Enter`,` `,`Spacebar`],i=e.key===`ArrowLeft`||e.key===`Escape`;if(t===this._el&&n===this._trigger._el&&r.includes(e.key)){if(this.getBooleanState(`disabled`))return;e.preventDefault(),e.stopPropagation(),this.open();let t=this._menu._enabledMenuItems()[0];t&&(this._menu._syncTabStops(t),t.focus());return}if(t===this._el&&n===this._trigger._el&&i&&this.getBooleanState(`open`)){e.preventDefault(),e.stopPropagation(),this.close(),this._trigger._el?.focus();return}i&&(t===this._el&&n!==this._trigger._el||t!==this._el&&this._menu._el?.contains(e.target))&&(e.preventDefault(),e.stopPropagation(),this.close(),this._trigger._el?.focus())}_closeDescendantSubMenus(){let t=n=>{n.children().forEach(n=>{n instanceof e?n.close():typeof n.children==`function`&&t(n)})};t(this._menu)}_bindGlobalCloseHandlers(){if(this._globalCloseCleanup||typeof document>`u`)return;let e=e=>{this._el?.contains(e.target)||this.close()},t=e=>{e.key===`Escape`&&this.close()};document.addEventListener(`click`,e),document.addEventListener(`keydown`,t),this._globalCloseCleanup=()=>{document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t),this._globalCloseCleanup=null}}_releaseGlobalCloseHandlers(){this._globalCloseCleanup&&this._globalCloseCleanup()}_setupSubMenu(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,content:n,disabled:r,inline:i,label:a,menu:o,menuContent:s,open:c,text:l,trigger:u,...d}=e;Object.keys(d).length>0&&super._setupObject(d),u===void 0?a===void 0?l!==void 0&&this.text(l):this.label(a):this.trigger(u),i!==void 0&&this.inline(i);let f=s??o??n??t;f!==void 0&&this.menuContent(f),r!==void 0&&this.disabled(r),c!==void 0&&this.open(c);return}this.label(e)}}};function _a(e,t){(e instanceof pa||e instanceof ma||e instanceof ha||e instanceof ga)&&e._menuOrientation(t)}var va=class extends P{constructor(e=null){super(`aside`,null);let t=da(`yoya-vsidebar-menu`);this._responsiveCleanup=null,this._titleBox=new P(`strong`).className(`yoya-vsidebar-title`),this._toggle=new ia(`‹`).className(`yoya-vsidebar-toggle`).attr({"aria-controls":t,"aria-expanded":`true`,"aria-label":`收起侧边导航`}).on(`click`,()=>this.toggle()),this._header=new P(`div`).className(`yoya-vsidebar-header`).child(this._titleBox,this._toggle),this._menu=new fa().id(t).className(`yoya-vsidebar-menu`).attr(`aria-label`,`侧边导航菜单`),this._menu._sidebarContentChangeCallback=()=>ya(this._menu,this.getBooleanState(`collapsed`),this),this._menu.on(`yoya:menuitem-statechange`,this._menu._sidebarContentChangeCallback),this._menu.on(`click`,e=>{let t=e.target?.closest?.(`.yoya-vmenu-item`);t&&!t.disabled&&!t.classList.contains(`yoya-vsubmenu-trigger`)&&this._activateMenuItem(t)}),this.className(L,`yoya-vsidebar`),this.attr(`aria-label`,`侧边导航`),this.on(`keydown`,e=>{e.key!==`Escape`||e.defaultPrevented||this.getBooleanState(`collapsed`)||(e.preventDefault(),e.stopPropagation(),this.collapsed(!0),this._toggle._el?.focus())}),this.child(this._header,this._menu),this._setupSidebar(e)}_activateMenuItem(e){let t=n=>{n.forEach(n=>{n instanceof pa?n.active(n.renderDom()===e):typeof n.children==`function`&&t(n.children())})};t(this._menu.children())}title(e){return G(this._titleBox,W(e)),this}ariaLabel(e){let t=J(e)||`侧边导航`;return this.attr(`aria-label`,t),this._menu.attr(`aria-label`,`${t}菜单`),this}menuContent(e){return e===void 0?this._menu:(K(this._menu,e),ya(this._menu,this.getBooleanState(`collapsed`),this),this)}collapsed(e=!0){let t=!!e;return this.setState(`collapsed`,t),this.attr(`data-collapsed`,t?`true`:null),this._toggle.label(t?`›`:`‹`).attr(`aria-expanded`,t?`false`:`true`).attr(`aria-label`,t?`展开侧边导航`:`收起侧边导航`),ya(this._menu,t,this),xa(this._titleBox,t),this}toggle(){return this.collapsed(!this.getBooleanState(`collapsed`))}responsive(e=`(max-width: 768px)`){if(this._releaseResponsiveListener(),e===!1)return this.attr({"data-responsive":null,"data-responsive-query":null}),this;let t=typeof e==`string`&&e?e:`(max-width: 768px)`;if(this.attr({"data-responsive":`true`,"data-responsive-query":t}),typeof window>`u`||typeof window.matchMedia!=`function`)return this;let n=window.matchMedia(t),r=e=>this.collapsed(e.matches);return typeof n.addEventListener==`function`?(n.addEventListener(`change`,r),this._responsiveCleanup=()=>n.removeEventListener(`change`,r)):typeof n.addListener==`function`&&(n.addListener(r),this._responsiveCleanup=()=>n.removeListener(r)),this.collapsed(n.matches),this}destroy(){return this._releaseResponsiveListener(),super.destroy()}_releaseResponsiveListener(){this._responsiveCleanup&&=(this._responsiveCleanup(),null)}_setupSidebar(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{ariaLabel:t,children:n,content:r,menu:i,menuContent:a,title:o,...s}=e;Object.keys(s).length>0&&super._setupObject(s),o!==void 0&&this.title(o),t!==void 0&&this.ariaLabel(t);let c=a??i??r??n;c!==void 0&&this.menuContent(c);return}this.title(e)}}};function ya(e,t,n){let r=n?._menu._sidebarContentChangeCallback,i=(e,{preserveShortcut:a=!1}={})=>{if((e instanceof fa||e instanceof ha)&&r&&(e._sidebarContentChangeCallback=r),e instanceof pa){xa(e._labelBox,t),xa(e._shortcutBox,t&&!a);return}if(e instanceof ga){if(ba(e,n),t){let t=e._panel._el?.ownerDocument.activeElement;t&&e._panel._el.contains(t)&&e._trigger._el?.focus(),e.close()}i(e._trigger,{preserveShortcut:!0}),i(e._menu);return}e instanceof ha&&xa(e._labelBox,t),typeof e.children==`function`&&e.children().forEach(i)};i(e)}function ba(e,t){if(!t||e._sidebarExpandOwner===t)return;e._sidebarExpandOwner=t;let n=e.open.bind(e);e.open=r=>{let i=n(r);return t.style(`overflow`,e.getBooleanState(`open`)&&!e._inline?`visible`:`hidden`),i},e.getBooleanState(`open`)&&t.style(`overflow`,e._inline?`hidden`:`visible`);let r=()=>{!e.getBooleanState(`disabled`)&&t.getBooleanState(`collapsed`)&&t.collapsed(!1)};e._trigger.on(`click`,r),e._trigger.on(`keydown`,e=>{[`ArrowRight`,`Enter`,` `,`Spacebar`].includes(e.key)&&r()})}function xa(e,t){let n={clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,overflow:`hidden`,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};if(t){e._sidebarVisibleStyles||=Object.fromEntries(Object.keys(n).map(t=>[t,e.style(t)??null])),e.styles(n);return}e._sidebarVisibleStyles&&=(e.styles(e._sidebarVisibleStyles),null)}function Sa(e=null,t=null,n=null){return H(fa,e,t,n)}function Ca(e=null,t=null,n=null){return H(pa,e,t,n)}function wa(e=null,t=null,n=null){return H(ma,e,t,n)}function Ta(e=null,t=null,n=null){return H(ha,e,t,n)}function Ea(e=null,t=null,n=null){return H(ga,e,t,n)}function Da(e=null,t=null,n=null){return H(va,e,t,n)}var Oa=class extends P{constructor(e=null){super(`div`,null),this._closeOnSelect=!0,this._globalCloseCleanup=null,this._target=new P(`div`).className(`yoya-vcontext-target`).on(`contextmenu`,e=>{e.preventDefault(),this.openAt(e)}),this._menu=new fa().className(`yoya-vcontext-content`),this._panel=new P(`div`).className(`yoya-vcontext-panel`).child(this._menu),this.className(L,`yoya-vcontext-menu`),this._menu.on(`click`,e=>{let t=e.target?.closest?.(`.yoya-vmenu-item`);this._closeOnSelect&&t&&!t.disabled&&!t.classList.contains(`yoya-vsubmenu-trigger`)&&this.close()}),this.child(this._target,this._panel),this._setupContextMenu(e)}target(e){return e===void 0?this._target:(K(this._target,e),this)}menuContent(e){return e===void 0?this._menu:(K(this._menu,e),this)}closeOnSelect(e=!0){return this._closeOnSelect=!!e,this}openAt(e=0,t=0){let n=Br(e,t);return this._panel.styles({left:`${n.x}px`,top:`${n.y}px`}),this.open(!0)}open(e=!0){let t=!!e;return this.setState(`open`,t),this.attr(`data-open`,t?`true`:null),t?this._bindGlobalCloseHandlers():this._releaseGlobalCloseHandlers(),this}close(){return this.open(!1)}destroy(){return this.close(),super.destroy()}_bindGlobalCloseHandlers(){if(this._globalCloseCleanup||typeof document>`u`)return;let e=e=>{this._el?.contains(e.target)||this.close()},t=e=>{e.key===`Escape`&&this.close()};document.addEventListener(`click`,e),document.addEventListener(`keydown`,t),this._globalCloseCleanup=()=>{document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t),this._globalCloseCleanup=null}}_releaseGlobalCloseHandlers(){this._globalCloseCleanup&&this._globalCloseCleanup()}_setupContextMenu(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,closeOnSelect:n,content:r,menu:i,menuContent:a,open:o,target:s,x:c,y:l,...u}=e;Object.keys(u).length>0&&super._setupObject(u),s!==void 0&&this.target(s);let d=a??i??r??t;d!==void 0&&this.menuContent(d),n!==void 0&&this.closeOnSelect(n),o!==void 0&&(o?this.openAt(c??0,l??0):this.close());return}this.target(e)}}};function ka(e=null,t=null,n=null){return H(Oa,e,t,n)}var Aa=class extends P{constructor(e=null){super(`div`,null),this._closeOnSelect=!0,this._globalCloseCleanup=null,this._panelId=da(`yoya-vdropdown-panel`),this._trigger=new ia(`操作`).className(`yoya-vdropdown-trigger`).attr({"aria-controls":this._panelId,"aria-expanded":`false`,"aria-haspopup":`menu`}).on(`click`,e=>{e.preventDefault(),this._trigger.getBooleanState(`disabled`)||this.toggle()}),this._trigger.on(`keydown`,e=>this._handleTriggerKeydown(e)),this._menu=new fa().className(`yoya-vdropdown-content`),this._panel=new P(`div`).id(this._panelId).className(`yoya-vdropdown-panel`).attr(`aria-hidden`,`true`).child(this._menu),this.className(L,`yoya-vdropdown-menu`),this._menu.on(`click`,e=>{let t=e.target?.closest?.(`.yoya-vmenu-item`);this._closeOnSelect&&t&&!t.disabled&&!t.classList.contains(`yoya-vsubmenu-trigger`)&&(this.close(),this._focusTrigger())}),this.child(this._trigger,this._panel),this.placement(`bottom-start`),this._setupDropdownMenu(e)}trigger(e){return e===void 0?this._trigger:(Rr(this._trigger,e),this)}menuContent(e){return e===void 0?this._menu:(K(this._menu,e),this)}placement(e){if(e===void 0)return this.attr(`data-placement`);let t=e||`bottom-start`;return this.attr(`data-placement`,t),this._panel.styles(zr(t)),this}closeOnSelect(e=!0){return this._closeOnSelect=!!e,this}open(e=!0){let t=!!e;return this.setState(`open`,t),this.attr(`data-open`,t?`true`:null),this._trigger.attr(`aria-expanded`,t?`true`:`false`),this._panel.attr(`aria-hidden`,t?`false`:`true`),t?(this._bindGlobalCloseHandlers(),this._focusFirstEnabledItem()):this._releaseGlobalCloseHandlers(),this}close(){return this.open(!1)}toggle(){return this.open(!this.getBooleanState(`open`))}destroy(){return this.close(),super.destroy()}_bindGlobalCloseHandlers(){if(this._globalCloseCleanup||typeof document>`u`)return;let e=e=>{this._el?.contains(e.target)||this.close()},t=e=>{if(e.key===`Escape`){let t=this._el?.contains(e.target);this.close(),t&&this._focusTrigger()}};document.addEventListener(`click`,e),document.addEventListener(`keydown`,t),this._globalCloseCleanup=()=>{document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t),this._globalCloseCleanup=null}}_releaseGlobalCloseHandlers(){this._globalCloseCleanup&&this._globalCloseCleanup()}_handleTriggerKeydown(e){if(!this._trigger.getBooleanState(`disabled`)&&[`ArrowDown`,`ArrowUp`,`Enter`,` `,`Spacebar`].includes(e.key)){if(e.preventDefault(),e.key===`ArrowUp`){this.open(),this._focusLastEnabledItem();return}this.open()}}_focusFirstEnabledItem(){this._menu._enabledMenuItems()[0]?.focus?.()}_focusLastEnabledItem(){let e=this._menu._enabledMenuItems();e[e.length-1]?.focus?.()}_focusTrigger(){this._trigger._el?.focus()}_setupDropdownMenu(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,closeOnSelect:n,content:r,label:i,menu:a,menuContent:o,open:s,placement:c,text:l,trigger:u,...d}=e;Object.keys(d).length>0&&super._setupObject(d),u===void 0?i===void 0?l!==void 0&&this.trigger(l):this.trigger(i):this.trigger(u);let f=o??a??r??t;f!==void 0&&this.menuContent(f),c!==void 0&&this.placement(c),n!==void 0&&this.closeOnSelect(n),s!==void 0&&this.open(s);return}this.trigger(e)}}};function ja(e=null,t=null,n=null){return H(Aa,e,t,n)}var Ma={"bottom-left":{bottom:`24px`,left:`24px`},"bottom-right":{bottom:`24px`,right:`24px`},"top-left":{left:`24px`,top:`24px`},"top-right":{right:`24px`,top:`24px`}},Na={large:{height:`56px`,minWidth:`56px`},medium:{height:`48px`,minWidth:`48px`},small:{height:`36px`,minWidth:`36px`}},Pa=class extends P{constructor(e=null,t=null,n=null){super(`button`,null),this._variant=`primary`,this._size=`medium`,this._fixed=!1,this._position=null,this._iconBox=new P(`span`).className(`yoya-vfloat-button-icon`),this._labelBox=new P(`span`).className(`yoya-vfloat-button-label`),this.className(L,`yoya-vfloat-button`),this.attr(`type`,`button`),this.styles({alignItems:`center`,borderRadius:`9999px`,boxSizing:`border-box`,cursor:`pointer`,display:`inline-flex`,font:`inherit`,gap:`6px`,justifyContent:`center`,lineHeight:`1`,padding:`0`,userSelect:`none`}),this.child(this._iconBox,this._labelBox),this._syncIconVisibility(),this._syncLabelVisibility(),this.variant(this._variant),this.size(this._size);let r=B(e,t,n);this._setupFloatButton(r.first),V(this,r.options,r.callback)}icon(e){return G(this._iconBox,W(e)),this._syncIconVisibility(),this}label(e){return G(this._labelBox,W(e)),this._syncLabelVisibility(),this}content(e){return this.label(e)}text(e){return this.label(e)}variant(e){if(e===void 0)return this._variant;this._variant=e||`primary`,this.attr(`data-variant`,this._variant);let t=this._variant===`primary`;return this.styles({background:R(t?`color-primary`:`color-surface`,t?`#2563eb`:`#ffffff`),border:t?`none`:z(`color-border-strong`,`#cbd5e1`),boxShadow:`0 6px 16px rgba(15, 23, 42, 0.16)`,color:R(t?`color-text-inverse`:`color-text`,t?`#ffffff`:`#172033`)}),this}type(e){return this.variant(e)}size(e){if(e===void 0)return this._size;this._size=e||`medium`,this.attr(`data-size`,this._size);let t=Na[this._size]||Na.medium;return this.style(`height`,t.height),this.style(`minWidth`,t.minWidth),this}disabled(e){return this.attr(`disabled`,e?!0:null),this.attr(`aria-disabled`,e?`true`:null),this.style(`cursor`,e?`not-allowed`:`pointer`),this.style(`opacity`,e?`0.56`:null),this}fixed(e=!0){return this._fixed=!!e,this._syncPosition(),this}position(e){return e===void 0?this._position:(this._position=Ma[e]?e:null,this._syncPosition(),this)}_syncPosition(){let e=this._fixed&&this._position?Ma[this._position]:null;return this.style(`position`,this._fixed?`fixed`:null),this.style(`zIndex`,this._fixed?`100`:null),this.style(`bottom`,e?.bottom??null),this.style(`left`,e?.left??null),this.style(`right`,e?.right??null),this.style(`top`,e?.top??null),this}_syncIconVisibility(){let e=this._iconBox.children().length>0||this._iconBox.textContent()!==``;return this.attr(`data-icon`,e?`true`:null),this._iconBox.style(`display`,e?null:`none`),this}_syncLabelVisibility(){let e=this._labelBox.children().length>0||this._labelBox.textContent()!==``;return this.attr(`data-label`,e?`true`:null),this.style(`paddingLeft`,e?`18px`:null),this.style(`paddingRight`,e?`18px`:null),this._labelBox.style(`display`,e?null:`none`),this}_setupFloatButton(e){if(typeof e==`function`){e(this);return}if(q(e)){let{attrs:t,children:n,disabled:r,fixed:i,icon:a,label:o,position:s,size:c,style:l,text:u,variant:d,...f}=e;Object.keys(f).length>0&&this.setup(f),Ir(this,{attrs:t,style:l}),a!==void 0&&this.icon(a),o===void 0?u===void 0?n!==void 0&&this.label(n):this.label(u):this.label(o),d!==void 0&&this.variant(d),c!==void 0&&this.size(c),r!==void 0&&this.disabled(r),i!==void 0&&this.fixed(i),s!==void 0&&this.position(s);return}e!=null&&this.label(e)}};function Fa(e=null,t=null,n=null){return new Pa(e,t,n)}var Ia=class extends P{constructor(e=null,t=null,n=null){super(`button`,null),this.className(L,`yoya-vsymbol-button`),this.attr(`type`,`button`),this.styles({alignItems:`center`,background:`transparent`,border:`0`,borderRadius:`6px`,boxShadow:`none`,boxSizing:`border-box`,color:`inherit`,cursor:`pointer`,display:`inline-flex`,flexShrink:`0`,justifyContent:`center`,lineHeight:`1`,margin:`0`,outline:`none`,padding:`4px`}),this.on(`mouseenter`,()=>{this.style(`background`,R(`color-surface-hover`,`rgba(15, 23, 42, 0.06)`))}),this.on(`mouseleave`,()=>{this.style(`background`,null)}),this._setupSymbolButton(e),V(this,t,n)}icon(e){return G(this,W(e)),this}ariaLabel(e){return e===void 0?this.attr(`aria-label`):this.attr(`aria-label`,e)}_setupSymbolButton(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{ariaLabel:t,icon:n,title:r,...i}=e;Object.keys(i).length>0&&this.setup(i),t!==void 0&&this.ariaLabel(t),r!==void 0&&this.attr(`title`,r),n!==void 0&&this.icon(n);return}this.icon(e)}}};function La(e=null,t=null,n=null){return H(Ia,e,t,n)}v(P,{vButton:aa,vButtons:ca,vContextMenu:ka,vDropdownMenu:ja,vFloatButton:Fa,vSymbolButton:La});var Ra=class extends P{constructor(e=null){super(`nav`,null),this._activeHref=null,this._offset=80,this._target=null,this._trackingBound=!1,this._list=new P(`ul`).className(`yoya-vanchor-list`),this.className(L,`yoya-vanchor`),this.attr({"aria-label":`页面锚点`,"data-offset":`80`}),this.on(`click`,e=>this._handleAnchorClick(e)),super.child(this._list),this._setupAnchor(e),this._syncItems()}ariaLabel(e){let t=J(e)||`页面锚点`;return this.attr(`aria-label`,t),this}offset(e){return e===void 0?this._offset:(this._offset=Math.max(0,Number(J(e))||0),this.attr(`data-offset`,String(this._offset)),this)}target(e){return e===void 0?this._target:(this._target=e||null,this)}items(e){return e===void 0?this._list.children():(G(this._list,[]),Array.isArray(e)&&e.forEach(e=>{this._list.child(Ha(e))}),this._syncItems(),this)}child(...e){return this._list.child(...e),this._syncItems(),this}active(e){return e===void 0?this._activeHref:(this._activeHref=e||null,this._syncActiveState(),this)}activeHref(e){return this.active(e)}renderDom(){let e=super.renderDom();return this._bindScrollTracking(),e}destroy(){return this._trackingBound=!1,super.destroy()}_syncItems(){let e=this._list.children().filter(e=>e instanceof za);return this.attr(`data-item-count`,String(e.length)),this._syncActiveState(),this}_syncActiveState(){let e=this._activeHref;this.attr(`data-active-href`,e||null);let t=n=>{n.forEach(n=>{n instanceof za&&(n.active(n.href()===e),t(n._childrenBox.children()))})};return t(this._list.children()),this}_handleAnchorClick(e){let t=e.target.closest?.(`.yoya-vanchor-link`);if(!t||!this._list.renderDom().contains(t))return;let n=t.getAttribute(`href`);!n||!n.startsWith(`#`)||(e.preventDefault(),this._scrollToTarget(n))}_scrollToTarget(e){let t=this._resolveTargetElement(e);t&&this._scrollElementIntoView(t),typeof history<`u`&&typeof history.replaceState==`function`&&history.replaceState(null,``,e),this.active(e)}_scrollElementIntoView(e){let t=this._resolveScrollContainer(),n=this._targetTop(e);if(t===window||t===null){typeof window<`u`&&typeof window.scrollTo==`function`&&window.scrollTo({behavior:`smooth`,top:n});return}typeof t.scrollTo==`function`?t.scrollTo({behavior:`smooth`,top:n}):t.scrollTop=n}_resolveScrollContainer(){return this._target&&Ua(this._target)||(typeof window>`u`?null:window)}_resolveTargetElement(e){let t=String(e).replace(/^#/,``);if(!t)return null;let n=this._target?Ua(this._target):document;return n?typeof n.getElementById==`function`?n.getElementById(t):n.querySelector(`#${Wa(t)}`):null}_targetTop(e){let t=this._resolveScrollContainer(),n=this._offset||0;if(!t||t===window)return(typeof window<`u`&&(window.scrollY||document.documentElement?.scrollTop)||0)+e.getBoundingClientRect().top-n;let r=t.getBoundingClientRect();return t.scrollTop+e.getBoundingClientRect().top-r.top-n}_syncActiveFromScroll(){let e=this._resolveScrollContainer(),t=e&&e!==window&&typeof e.getBoundingClientRect==`function`?e.getBoundingClientRect():null,n=this._offset||0,r=[],i=e=>{e.forEach(e=>{e instanceof za&&(r.push(e),i(e._childrenBox.children()))})};i(this._list.children());let a=null,o=!1;r.forEach(e=>{let r=e.href();if(!r)return;let i=this._resolveTargetElement(r);if(!i)return;o=!0;let s=i.getBoundingClientRect();(t?s.top-t.top:s.top)-n<=0&&(a=r)}),o&&a!==this._activeHref&&this.active(a)}_bindScrollTracking(){if(this._trackingBound||typeof window>`u`||typeof document>`u`)return;this._trackingBound=!0;let e=()=>this._syncActiveFromScroll(),t={capture:!0,passive:!0};window.addEventListener(`scroll`,e,t),document.addEventListener(`scroll`,e,t),this._cleanup.push(()=>{window.removeEventListener(`scroll`,e,{capture:!0}),document.removeEventListener(`scroll`,e,{capture:!0})}),this._syncActiveFromScroll()}_setupAnchor(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)){this.items(e);return}if(q(e)){let{activeHref:t,ariaLabel:n,children:r,items:i,offset:a,target:o,...s}=e;Object.keys(s).length>0&&this.setup(s),n!==void 0&&this.ariaLabel(n),a!==void 0&&this.offset(a),o!==void 0&&this.target(o),i===void 0?r!==void 0&&this.items(r):this.items(i),t!==void 0&&this.active(t);return}this.items([e])}}},za=class extends P{constructor(e=null,t=void 0){super(`li`,null),this._href=null,this._title=``,this._active=!1,this._linkBox=new P(`a`).className(`yoya-vanchor-link`),this._childrenBox=new P(`ul`).className(`yoya-vanchor-children`),this.className(`yoya-vanchor-item`),this.child(this._linkBox,this._childrenBox),this._setupAnchorItem(e),t!==void 0&&this.href(t),this._syncAnchorItem()}title(e){return e===void 0?this._title:(this._title=e,G(this._linkBox,W(e??``)),this)}text(e){return this.title(e)}label(e){return this.title(e)}href(e){return e===void 0?this._href:(this._href=e==null?null:String(J(e)),this._syncAnchorItem(),this)}nested(e){return e===void 0?this._childrenBox.children():(Array.isArray(e)?(G(this._childrenBox,[]),e.forEach(e=>{this._childrenBox.child(Ha(e))})):K(this._childrenBox,e),this._syncAnchorItem(),this)}subItems(e){return this.nested(e)}active(e=!0){return this._active=!!e,this.attr(`data-active`,this._active?`true`:null),this.attr(`aria-current`,this._active?`true`:null),this._syncAnchorItem(),this}_setupAnchorItem(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)&&e.length>=2){this.title(e[0]),this.href(e[1]);return}if(q(e)){let{active:t,children:n,content:r,href:i,items:a,label:o,nested:s,text:c,title:l,...u}=e;Object.keys(u).length>0&&this.setup(u),l===void 0?o===void 0?c===void 0?r!==void 0&&this.text(r):this.text(c):this.label(o):this.title(l),i!==void 0&&this.href(i);let d=s??a??n;d!==void 0&&this.nested(d),t!==void 0&&this.active(t);return}this.title(e)}}_syncAnchorItem(){let e=this._childrenBox.children().length>0;return this._linkBox.attr(`href`,this._href||null),this._childrenBox.style(`display`,e?null:`none`),this.attr(`data-has-children`,e?`true`:null),this}};function Ba(e=null,t=null,n=null){return H(Ra,e,t,n)}function Va(e=null,t=void 0){return e instanceof za&&t===void 0?e:new za(e,t)}function Ha(e){return e instanceof za?e:Array.isArray(e)&&e.length>=2?Va(e[0],e[1]):Va(e)}function Ua(e){return typeof Element<`u`&&e instanceof Element?e:typeof e==`string`&&typeof document<`u`?document.querySelector(e):e||null}function Wa(e){return typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):e}var Ga=class extends P{constructor(e=null){super(`nav`,null),this._separator=`›`,this._list=new P(`ol`).className(`yoya-vbreadcrumb-list`),this.className(L,`yoya-vbreadcrumb`),this.attr({"aria-label":`面包屑`,"data-separator":this._separator}),super.child(this._list),this._setupBreadcrumb(e),this._syncItems()}ariaLabel(e){let t=J(e)||`面包屑`;return this.attr(`aria-label`,t),this}separator(e){return e===void 0?this._separator:(this._separator=e===null||e===``?`›`:e,this.attr(`data-separator`,J(this._separator)),this._syncItems(),this)}items(e){return e===void 0?this._list.children():(G(this._list,[]),Array.isArray(e)&&e.forEach(e=>{this._list.child(Ya(e))}),this._syncItems(),this)}child(...e){return this._list.child(...e),this._syncItems(),this}_syncItems(){let e=this._list.children().filter(e=>e instanceof Ka);return this.attr(`data-item-count`,String(e.length)),e.forEach((t,n)=>{t._breadcrumbIndex=n,t._breadcrumbTotal=e.length,t._breadcrumbSeparator=this._separator,t._syncBreadcrumbItem()}),this}_setupBreadcrumb(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)){this.items(e);return}if(q(e)){let{ariaLabel:t,children:n,items:r,separator:i,...a}=e;Object.keys(a).length>0&&this.setup(a),t!==void 0&&this.ariaLabel(t),i!==void 0&&this.separator(i),r===void 0?n!==void 0&&this.items(n):this.items(r);return}this.items([e])}}},Ka=class extends P{constructor(e=null,t=void 0){super(`li`,null),this._href=null,this._active=!1,this._breadcrumbIndex=0,this._breadcrumbTotal=1,this._breadcrumbSeparator=`›`,this._linkBox=new P(`a`).className(`yoya-vbreadcrumb-link`),this._currentBox=new P(`span`).className(`yoya-vbreadcrumb-current`),this._separatorBox=new P(`span`).className(`yoya-vbreadcrumb-separator`).attr(`aria-hidden`,`true`),this.className(`yoya-vbreadcrumb-item`),this.child(this._linkBox,this._currentBox,this._separatorBox),this._setupBreadcrumbItem(e),t!==void 0&&this.href(t),this._syncBreadcrumbItem()}label(e){return e===void 0?this._currentBox.textContent():(G(this._linkBox,W(e)),G(this._currentBox,W(e)),this)}text(e){return this.label(e)}content(e){return this.label(e)}href(e){return e===void 0?this._href:(this._href=e==null?null:String(J(e)),this._syncBreadcrumbItem(),this)}to(e){return this.href(e)}active(e=!0){return this._active=!!e,this._syncBreadcrumbItem(),this}current(e=!0){return this.active(e)}_setupBreadcrumbItem(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)&&e.length>=2){this.label(e[0]),this.href(e[1]);return}if(q(e)){let{active:t,children:n,content:r,current:i,href:a,label:o,text:s,to:c,...l}=e;Object.keys(l).length>0&&this.setup(l),o===void 0?s===void 0?r===void 0?n!==void 0&&this.label(n):this.content(r):this.text(s):this.label(o),a===void 0?c!==void 0&&this.href(c):this.href(a),t===void 0?i!==void 0&&this.active(i):this.active(t);return}this.label(e)}}_syncBreadcrumbItem(){let e=!this._active&&!!this._href,t=!e;return this.attr(`data-current`,this._active?`true`:null),this.attr(`aria-current`,this._active?`page`:null),this._linkBox.attr(`href`,this._href||null),this._linkBox.style(`display`,e?null:`none`),this._currentBox.style(`display`,t?null:`none`),this._separatorBox.style(`display`,this._breadcrumbIndex>=this._breadcrumbTotal-1?`none`:null),G(this._separatorBox,W(this._breadcrumbSeparator)),this}};function qa(e=null,t=null,n=null){return H(Ga,e,t,n)}function Ja(e=null,t=void 0){return e instanceof Ka&&t===void 0?e:new Ka(e,t)}function Ya(e){return e instanceof Ka?e:Array.isArray(e)&&e.length>=2?Ja(e[0],e[1]):Ja(e)}var Xa=class extends P{constructor(e=null){super(`nav`,null);let t=da(`yoya-vnavbar-menu`);this._brandTitle=new P(`strong`).className(`yoya-vnavbar-brand-title`),this._brandSubtitle=new P(`span`).className(`yoya-vnavbar-brand-subtitle`),this._brandDefault=new P(`div`).className(`yoya-vnavbar-brand-default`).child(this._brandTitle,this._brandSubtitle),this._brandCustom=new P(`div`).className(`yoya-vnavbar-brand-custom`),this._brandBox=new P(`div`).className(`yoya-vnavbar-brand`).child(this._brandDefault,this._brandCustom),this._menu=new fa().id(t).className(`yoya-vnavbar-menu`).attr(`aria-label`,`导航菜单`),this._menu.horizontal(),this._menuWrapper=new P(`div`).className(`yoya-vnavbar-menu-slot`).styles({boxSizing:`border-box`,minWidth:`0`,overflowX:`auto`}).child(this._menu),this._actionsBox=new P(`div`).className(`yoya-vnavbar-actions`),this.className(L,`yoya-vnavbar`),this.attr({"aria-label":`导航栏`,role:`navigation`}),this.child(this._brandBox,this._menuWrapper,this._actionsBox),this._setupNavbar(e)}ariaLabel(e){let t=J(e)||`导航栏`;return this.attr(`aria-label`,t),this._menu.attr(`aria-label`,`${t}菜单`),this}sticky(e=!0){if(e===void 0)return this.style(`position`)===`sticky`;let t=!!e;return this.styles({position:t?`sticky`:null,top:t?`0`:null,zIndex:t?`20`:null}),this}title(e){return this._showDefaultBrand(),G(this._brandTitle,W(e)),this._brandTitle.style(`display`,J(e)?null:`none`),this._syncBrandDivider(),this}subtitle(e){return this._showDefaultBrand(),G(this._brandSubtitle,W(e)),this._brandSubtitle.style(`display`,J(e)?null:`none`),this._syncBrandDivider(),this}brand(e){return e===void 0?this._brandBox:e===null?(this._showDefaultBrand(),this._syncBrandDivider(),this):(this._showCustomBrand(),K(this._brandCustom,e),this._syncBrandDivider(),this)}menuContent(e){return e===void 0?this._menu:(K(this._menu,e),this)}actions(e){return e===void 0?this._actionsBox:(K(this._actionsBox,e),this)}_showDefaultBrand(){return K(this._brandCustom,null),this._brandCustom.style(`display`,`none`),this._brandDefault.style(`display`,null),this}_showCustomBrand(){return this._brandDefault.style(`display`,`none`),this._brandCustom.style(`display`,null),this}_syncBrandDivider(){let e=!!(this._brandDefault.textContent().trim()||this._brandCustom.textContent().trim());return this._brandBox.styles({borderRight:e?z(`color-border-faint`,`#e2e8f0`):null,paddingRight:e?`14px`:null}),this}_setupNavbar(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{actions:t,ariaLabel:n,brand:r,children:i,content:a,menu:o,menuContent:s,sticky:c,subtitle:l,title:u,...d}=e;Object.keys(d).length>0&&super._setupObject(d);let f=r!=null;r===void 0?u!==void 0&&this.title(u):this.brand(r),l!==void 0&&!f&&this.subtitle(l);let p=s??o??a??i;p!==void 0&&this.menuContent(p),t!==void 0&&this.actions(t),n!==void 0&&this.ariaLabel(n),c!==void 0&&this.sticky(c);return}U(this,e)}}};function Za(e=null,t=null,n=null){return H(Xa,e,t,n)}var Qa=class extends P{constructor(e=null){super(`ol`,null),this._current=0,this._status=`process`,this._direction=`horizontal`,this._size=`default`,this.className(L,`yoya-vsteps`),this.attr({"data-current":`0`,"data-direction":`horizontal`,"data-size":`default`,"data-status":`process`,role:`list`}),this._setupSteps(e),this._syncSteps()}current(e){return e===void 0?this._current:(this._current=Math.max(0,Number(e)||0),this.attr(`data-current`,String(this._current)),this._syncSteps(),this)}status(e){return e===void 0?this._status:(this._status=[`error`,`finish`,`process`].includes(e)?e:`process`,this.attr(`data-status`,this._status),this._syncSteps(),this)}direction(e){return e===void 0?this._direction:(this._direction=e===`vertical`?`vertical`:`horizontal`,this.attr(`data-direction`,this._direction),this._syncSteps(),this)}size(e){return e===void 0?this._size:(this._size=e===`small`?`small`:`default`,this.attr(`data-size`,this._size),this._syncSteps(),this)}items(e){return e===void 0?this.children().filter(e=>e instanceof $a):(G(this,[]),Array.isArray(e)&&e.forEach(e=>{this.child(no(e))}),this)}next(){let e=this.items();return this._current<e.length-1&&this.current(this._current+1),this}prev(){return this._current>0&&this.current(this._current-1),this}child(...e){return super.child(...e),this._syncSteps(),this}_setupSteps(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)){this.items(e);return}if(q(e)){let{children:t,current:n,direction:r,items:i,size:a,status:o,...s}=e;Object.keys(s).length>0&&this.setup(s),n!==void 0&&this.current(n),o!==void 0&&this.status(o),r!==void 0&&this.direction(r),a!==void 0&&this.size(a),i===void 0?t!==void 0&&this.items(t):this.items(i);return}this.items([e])}}_syncSteps(){let e=this.children().filter(e=>e instanceof $a);return this.attr(`data-step-count`,String(e.length)),e.forEach((t,n)=>{t._index=n,t._total=e.length,t._stepsCurrent=this._current,t._stepsStatus=this._status,t._stepsDirection=this._direction,t._stepsSize=this._size,t._syncStepState()}),this}},$a=class extends P{constructor(e=null){super(`li`,null),this._title=``,this._description=``,this._icon=null,this._status=null,this._index=0,this._total=1,this._stepsCurrent=0,this._stepsStatus=`process`,this._stepsDirection=`horizontal`,this._stepsSize=`default`,this._indicatorBox=new P(`span`).className(`yoya-vsteps-indicator`),this._titleBox=new P(`div`).className(`yoya-vsteps-title`),this._descriptionBox=new P(`div`).className(`yoya-vsteps-description`),this._contentBox=new P(`div`).className(`yoya-vsteps-content`),this._connector=new P(`span`).className(`yoya-vsteps-connector`),this.className(L,`yoya-vstep`),this.attr(`role`,`listitem`),this._contentBox.className(`yoya-vsteps-content`),this._titleBox.className(`yoya-vsteps-title`),this._descriptionBox.className(`yoya-vsteps-description`),this._connector.className(`yoya-vsteps-connector`),this.child(this._indicatorBox,this._contentBox,this._connector),this._contentBox.child(this._titleBox,this._descriptionBox),this._setupStep(e),this._syncStepState()}title(e){return e===void 0?this._title:(this._title=e,G(this._titleBox,W(e??``)),this)}text(e){return this.title(e)}description(e){return e===void 0?this._description:(this._description=e,G(this._descriptionBox,W(e??``)),this)}desc(e){return this.description(e)}icon(e){return e===void 0?this._icon:(this._icon=e,this._syncStepState(),this)}status(e){return e===void 0?this._status:(this._status=e||null,this._syncStepState(),this)}_setupStep(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)&&e.length>=2){this.title(e[0]),this.description(e[1]);return}if(q(e)){let{children:t,desc:n,description:r,icon:i,status:a,text:o,title:s,...c}=e;Object.keys(c).length>0&&this.setup(c),i!==void 0&&this.icon(i),a!==void 0&&this.status(a),s===void 0?o!==void 0&&this.title(o):this.title(s),r===void 0?n===void 0?t!==void 0&&this.description(t):this.description(n):this.description(r);return}this.title(e)}}_effectiveStatus(){return this._status?this._status:this._index<this._stepsCurrent?`finish`:this._index===this._stepsCurrent?this._stepsStatus||`process`:`wait`}_syncStepState(){let e=this._effectiveStatus(),t=this._stepsSize,n=t===`small`?`24px`:`30px`,r=t===`small`?`11px`:`14px`,i=t===`small`?`12px`:`15px`;return this.attr(`data-status`,e),this.attr(`aria-current`,this._index===this._stepsCurrent?`step`:null),this._descriptionBox.style(`display`,this._descriptionBox.children().length>0?null:`none`),this._icon!==null&&this._icon!==void 0?G(this._indicatorBox,W(this._icon)):G(this._indicatorBox,W(ro(e,this._index))),this._connector.style(`display`,this._index<this._total-1?`block`:`none`),this._stepsDirection===`vertical`?(this.style(`gridTemplateColumns`,`auto minmax(0, 1fr)`),this.style(`gap`,`10px`),this._contentBox.style(`paddingTop`,`3px`),this._connector.styles({bottom:`-12px`,height:`auto`,left:i,right:null,top:n,width:`2px`})):(this.style(`gridTemplateColumns`,`minmax(0, 1fr)`),this.style(`gap`,`0`),this._contentBox.style(`paddingTop`,`6px`),this._connector.styles({bottom:null,height:`2px`,left:n,right:`0`,top:r,width:`auto`})),this}};function eo(e=null,t=null,n=null){return H(Qa,e,t,n)}function to(e=null,t=null,n=null){return H($a,e,t,n)}function no(e){return e instanceof $a?e:to(e)}function ro(e,t){return e===`finish`?`✓`:e===`error`?`!`:String(t+1)}var io=class extends l{constructor(e=null){super(null),this._active=!1,this._disabled=!1,this._index=0,this._key=null,this._parent=null;let t=ua();this._tabId=`yoya-vtab-trigger-${t}`,this._panelId=`yoya-vtab-panel-${t}`,this._iconBox=new P(`span`).className(`yoya-vtab-icon`).attr(`aria-hidden`,`true`).style(`display`,`none`),this._labelBox=new P(`span`).className(`yoya-vtab-label`),this._trigger=new P(`button`).className(L,`yoya-vtab-trigger`).attr({"aria-controls":this._panelId,id:this._tabId,role:`tab`,tabindex:`-1`,type:`button`}),this._trigger.child(this._iconBox,this._labelBox),this._panel=new P(`section`).className(`yoya-vtab-panel`).attr({"aria-labelledby":this._tabId,hidden:!0,id:this._panelId,role:`tabpanel`,tabindex:`-1`}),this._setupTab(e),this._syncTab()}key(e){return e===void 0?this._key:(this._key=e==null?null:String(J(e)),this)}value(e){return this.key(e)}label(e){return e===void 0?this._labelBox.textContent():(G(this._labelBox,W(e)),this)}text(e){return this.label(e)}title(e){return this.label(e)}icon(e){return G(this._iconBox,W(e)),this._iconBox.style(`display`,e==null||e===``?`none`:null),this}content(e){return K(this._panel,e),this}disabled(e){return e===void 0?this._disabled:(this._disabled=!!e,this._trigger.attr({"aria-disabled":this._disabled?`true`:null,disabled:this._disabled?!0:null}),this._syncTab(),this)}active(e){return e===void 0?this._active:(this._active=!!e,this._syncTab(),this)}textContent(){return this._trigger.textContent()}destroy(){return this._trigger.destroy(),this._panel.destroy(),super.destroy()}_setupTab(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)){e.length>0&&this.label(e[0]),e.length>1&&this.content(e[1]);return}if(q(e)){let{children:t,content:n,disabled:r,icon:i,key:a,label:o,text:s,title:c,value:l,...u}=e;Object.keys(u).length>0&&this._trigger.setup(u),o===void 0?s===void 0?c!==void 0&&this.label(c):this.label(s):this.label(o),n===void 0?t!==void 0&&this.content(t):this.content(n),i!==void 0&&this.icon(i),a===void 0?l!==void 0&&this.key(l):this.key(a),r!==void 0&&this.disabled(r);return}this.label(e)}}_syncTab(){let e=this._active&&!this._disabled;return this._trigger.attr({"aria-selected":e?`true`:`false`,"data-active":e?`true`:null,tabindex:e?`0`:`-1`}),this._panel.attr({"data-active":e?`true`:null,hidden:!e||null,tabindex:e?`0`:`-1`}),this}},ao=class extends P{constructor(e=null){super(`div`,null),this._tabs=[],this._activeIndex=0,this._orientation=`horizontal`,this._variant=`line`,this._size=`default`,this._changeHandler=null,this._nav=new P(`div`).className(`yoya-vtabs-nav`).attr({"aria-label":`标签页`,"aria-orientation":`horizontal`,role:`tablist`}),this._panels=new P(`div`).className(`yoya-vtabs-panels`),this.className(L,`yoya-vtabs`),this.attr({"data-active-index":`0`,"data-orientation":`horizontal`,"data-size":`default`,"data-variant":`line`}),this._nav.on(`click`,e=>this._handleNavClick(e)),this._nav.on(`keydown`,e=>this._handleKeydown(e)),P.prototype.child.call(this,this._nav,this._panels),this._setupTabs(e),this._syncTabs()}children(){return[...this._tabs]}items(e){return e===void 0?this.children():(G(this._nav,[]),G(this._panels,[]),this._tabs=[],Array.isArray(e)&&e.forEach(e=>this.child(co(e))),this._syncTabs(),this)}child(...e){return e.flat(1/0).forEach(e=>{if(e!=null){if(e instanceof io){this._tabs.includes(e)||(this._tabs.push(e),e._parent=this,this._nav.child(e._trigger),this._panels.child(e._panel));return}super.child(e)}}),this._syncTabs(),this}active(e){if(e===void 0){let e=this._tabs[this._activeIndex];return e?e.key()??this._activeIndex:null}return this._selectIndex(this._resolveIndex(e),!1),this}activeIndex(e){return e===void 0?this._activeIndex:(this._selectIndex(e,!1),this)}ariaLabel(e){return e===void 0?this._nav.attr(`aria-label`):(this._nav.attr(`aria-label`,J(e)||`标签页`),this)}orientation(e){return e===void 0?this._orientation:(this._orientation=e===`vertical`?`vertical`:`horizontal`,this.attr(`data-orientation`,this._orientation),this._nav.attr(`aria-orientation`,this._orientation),this)}variant(e){return e===void 0?this._variant:(this._variant=[`card`,`line`,`pills`].includes(e)?e:`line`,this.attr(`data-variant`,this._variant),this)}size(e){return e===void 0?this._size:(this._size=[`default`,`large`,`small`].includes(e)?e:`default`,this.attr(`data-size`,this._size),this)}change(e){return e===void 0?this._changeHandler:(this._changeHandler=typeof e==`function`?e:null,this)}onChange(e){return this.change(e)}next(){let e=this._nextEnabledIndex(1);return e>=0&&this._selectIndex(e,!0),this}prev(){let e=this._nextEnabledIndex(-1);return e>=0&&this._selectIndex(e,!0),this}renderDom(){let e=super.renderDom();return this._syncTabs(),e}_setupTabs(e){if(e!=null){if(typeof e==`function`){e(this);return}if(e instanceof io){this.child(e);return}if(Array.isArray(e)){this.items(e);return}if(q(e)){let{active:t,ariaLabel:n,change:r,children:i,items:a,onChange:o,onTabChange:s,orientation:c,size:l,variant:u,...d}=e;Object.keys(d).length>0&&this.setup(d),n!==void 0&&this.ariaLabel(n),c!==void 0&&this.orientation(c),u!==void 0&&this.variant(u),l!==void 0&&this.size(l),typeof r==`function`?this.change(r):typeof o==`function`?this.change(o):typeof s==`function`&&this.change(s),a===void 0?i!==void 0&&this.items(i):this.items(a),t!==void 0&&this.active(t);return}this.items([e])}}_syncTabs(){let e=this._tabs;if(e.length>0&&e[this._activeIndex]?.disabled()){let t=e.findIndex(e=>!e.disabled());t>=0&&(this._activeIndex=t)}let t=e[this._activeIndex];return this.attr(`data-active-index`,String(this._activeIndex)),this.attr(`data-tab-count`,String(e.length)),this.attr(`data-active-key`,t?.key()==null?null:String(t.key())),e.forEach((e,t)=>{e._parent=this,e._index=t,e.active(t===this._activeIndex&&!e.disabled())}),this}_selectTab(e){let t=this._tabs.indexOf(e);return t<0||e.disabled()?this:this._selectIndex(t,!0)}_selectIndex(e,t=!0){let n=this._tabs;if(n.length===0)return this._activeIndex=0,this._syncTabs(),this;let r=this._clampIndex(e);if(n[r]?.disabled()){let e=n.findIndex(e=>!e.disabled());r=e>=0?e:this._activeIndex}let i=r!==this._activeIndex;if(this._activeIndex=r>=0?r:this._activeIndex,this._syncTabs(),t&&i&&typeof this._changeHandler==`function`){let e=n[this._activeIndex];this._changeHandler({active:e.key()??this._activeIndex,index:this._activeIndex,item:e,key:e.key()})}return this}_resolveIndex(e){let t=this._tabs;if(typeof e==`number`)return this._clampIndex(e);let n=J(e),r=t.findIndex(e=>String(e.key())===String(n));if(r>=0)return r;let i=Number(n);return this._clampIndex(Number.isFinite(i)?i:0)}_clampIndex(e){if(!Number.isFinite(Number(e)))return 0;let t=Math.max(0,Math.floor(Number(e)));return this._tabs.length===0?0:Math.min(t,this._tabs.length-1)}_handleNavClick(e){let t=e.target.closest?.(`.yoya-vtab-trigger`);if(!t||t.closest(`.yoya-vtabs-nav`)!==this._nav._el)return;let n=this._tabs.find(e=>e._trigger._el===t);n&&!n.disabled()&&this._selectTab(n)}_handleKeydown(e){let t=e.target.closest?.(`.yoya-vtab-trigger`);if(!t||t.closest(`.yoya-vtabs-nav`)!==this._nav._el)return;let n=this._tabs.findIndex(e=>e._trigger._el===t);if(n<0)return;if(e.key===`Enter`||e.key===` `){e.preventDefault(),this._selectTab(this._tabs[n]);return}let r=this._orientation===`vertical`?{ArrowDown:1,ArrowUp:-1}:{ArrowLeft:-1,ArrowRight:1},i=this._enabledTabs();if(i.length===0||!r[e.key]&&e.key!==`Home`&&e.key!==`End`)return;e.preventDefault();let a;a=e.key===`Home`?0:e.key===`End`?i.length-1:(Math.max(0,i.indexOf(this._tabs[n]))+r[e.key]+i.length)%i.length;let o=i[a];if(!o)return;let s=this._tabs.indexOf(o);this._selectIndex(s,!0),o._trigger._el?.focus()}_enabledTabs(){return this._tabs.filter(e=>!e.disabled())}_nextEnabledIndex(e){let t=this._enabledTabs();if(t.length===0)return-1;let n=Math.max(0,t.indexOf(this._tabs[this._activeIndex]));return this._tabs.indexOf(t[(n+e+t.length)%t.length])}};function oo(e=null,t=null,n=null){return H(ao,e,t,n)}function so(e=null,t=null,n=null){return H(io,e,t,n)}function co(e){return e instanceof io?e:so(e)}v(P,{vAnchor:Ba,vAnchorItem:Va,vBreadcrumb:qa,vBreadcrumbItem:Ja,vMenu:Sa,vMenuDivider:wa,vMenuGroup:Ta,vMenuItem:Ca,vNavbar:Za,vSidebar:Da,vStep:to,vSteps:eo,vSubMenu:Ea,vTabs:oo}),v(ao,{vTab:so});var lo=[`success`,`error`,`warning`,`info`],uo=class extends P{constructor(e=null){super(`div`,null),this._closeHandlers=[],this._countdownDuration=0,this._countdownTimer=null,this._contentBox=new P(`span`).className(`yoya-vmessage-content`),this._countdownBox=new P(`span`).className(`yoya-vmessage-countdown`).attr(`aria-hidden`,`true`).styles({color:`inherit`,flexShrink:`0`,fontVariantNumeric:`tabular-nums`,fontSize:`12px`,opacity:`0.65`}).style(`display`,`none`),this._countdownText=f(``),this._countdownBox.child(this._countdownText),this._closeButton=new P(`span`).className(`yoya-vmessage-close`).attr({role:`button`,tabindex:`0`,"aria-label":`关闭消息`}).styles({alignItems:`center`,background:`transparent`,border:`0`,borderRadius:`50%`,color:`inherit`,cursor:`pointer`,display:`inline-flex`,flexShrink:`0`,height:`20px`,justifyContent:`center`,marginLeft:`auto`,opacity:`0.72`,padding:`0`,width:`20px`}).style(`display`,`none`).child(Zn().styles({height:`14px`,width:`14px`})).on(`click`,()=>this.close()).on(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.close())}),this._progressBar=new P(`span`).className(`yoya-vmessage-countdown-bar`).attr(`aria-hidden`,`true`).styles({background:`currentColor`,bottom:`0`,height:`2px`,left:`0`,opacity:`0`,position:`absolute`,width:`100%`}),this.className(L,`yoya-vmessage`),this.attr(`role`,`status`),this.styles({alignItems:`center`,background:R(`color-info-subtle`,`#eff6ff`),border:z(`color-info-border`,`#bfdbfe`),borderRadius:`6px`,color:R(`color-info-text`,`#1e3a8a`),display:`flex`,gap:`10px`,lineHeight:`1.4`,overflow:`hidden`,padding:`10px 12px`,position:`relative`}),this.child(this._contentBox,this._countdownBox,this._closeButton,this._progressBar),this.type(`info`),this._setupMessage(e)}content(e){return G(this._contentBox,W(e)),this}type(e){if(e===void 0)return this.attr(`data-type`);let t=lo.includes(e)?e:`info`;return this.attr(`data-type`,t),this.styles(Vr(t)),this}closable(e=!0){return this._closeButton.style(`display`,e?null:`none`),this}countdown(e,t=!0){if(e===void 0)return this._countdownDuration;this._clearCountdown(),this._countdownDuration=Number(e)||0;let n=!!t&&this._countdownDuration>0;if(this._countdownBox.style(`display`,n?null:`none`),this._progressBar.style(`opacity`,n?`0.45`:`0`),!n)return this;this._countdownText.textContent(`${Math.ceil(this._countdownDuration/1e3)}s`),this._progressBar.style(`width`,`100%`);let r=Date.now();return this._countdownTimer=setInterval(()=>{let e=Math.max(0,this._countdownDuration-(Date.now()-r));this._countdownText.textContent(`${Math.ceil(e/1e3)}s`),this._progressBar.style(`width`,`${Math.max(0,e/this._countdownDuration*100)}%`),e<=0&&this._clearCountdown()},100),this}onClose(e){return typeof e==`function`&&this._closeHandlers.push(e),this}close(){return this._deleted?this:(this._closeHandlers.forEach(e=>e(this)),this.destroy())}destroy(){return this._clearCountdown(),super.destroy()}_clearCountdown(){this._countdownTimer&&=(clearInterval(this._countdownTimer),null)}_setupMessage(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,closable:n,content:r,countdown:i,duration:a,text:o,type:s,...c}=e;Object.keys(c).length>0&&this.setup(c),r===void 0?o===void 0?t!==void 0&&this.content(t):this.content(o):this.content(r),s!==void 0&&this.type(s),n!==void 0&&this.closable(n),a!==void 0&&this.countdown(a,i!==!1);return}this.content(e)}}},fo=class extends P{constructor(e=null){super(`div`,null),this._nextId=1,this._messages=new Map,this._inline=!1,this.className(L,`yoya-vmessage-container`),this.attr({"aria-live":`polite`,"data-placement":`top-right`}),this.styles({display:`flex`,flexDirection:`column`,gap:`8px`,maxWidth:`360px`,position:`fixed`,right:`16px`,top:`16px`,zIndex:`1000`}),this._setupContainer(e)}placement(e){return e===void 0?this.attr(`data-placement`):(this.attr(`data-placement`,e||`top-right`),this.styles(Hr(e||`top-right`)),this)}inline(e=!0){return this._inline=!!e,this._inline?(this.styles({bottom:null,left:null,maxWidth:`none`,position:`static`,right:null,top:null,transform:null,width:`100%`,zIndex:null}),this):(this.styles({display:`flex`,flexDirection:`column`,gap:`8px`,maxWidth:`360px`,position:`fixed`,zIndex:`1000`}),this.placement(this.placement()||`top-right`),this)}show(e,t={}){let n=Ur(t),r=n.id||`message-${this._nextId++}`;this._messages.has(r)&&this.close(r);let i=po(e).type(n.type||`info`).closable(n.closable??!0).onClose(()=>{let e=this._messages.get(r);e?.timer&&clearTimeout(e.timer),Lr(this,i),this._messages.delete(r)});if(this._messages.set(r,{message:i,timer:null}),this.child(i),n.duration!==0){let e=n.duration??3e3;i.countdown(e,n.countdown!==!1);let t=setTimeout(()=>this.close(r),e);this._messages.set(r,{message:i,timer:t})}return r}success(e,t={}){return this.show(e,{...Ur(t),type:`success`})}error(e,t={}){return this.show(e,{...Ur(t),type:`error`})}warning(e,t={}){return this.show(e,{...Ur(t),type:`warning`})}info(e,t={}){return this.show(e,{...Ur(t),type:`info`})}close(e){let t=this._messages.get(e);return t?(t.timer&&clearTimeout(t.timer),t.message.close(),this._messages.delete(e),this):this}clear(){return[...this._messages.keys()].forEach(e=>this.close(e)),this}destroy(){return this.clear(),super.destroy()}_setupContainer(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{inline:t,placement:n,...r}=e;Object.keys(r).length>0&&this.setup(r),n!==void 0&&this.placement(n),t!==void 0&&this.inline(t)}}}};function po(e=null,t=null,n=null){return H(uo,e,t,n)}function mo(e=null,t=null,n=null){return H(fo,e,t,n)}var ho={_container:null,use(e){return this._container=e,this},container(){return this._container||(this._container=mo(),typeof document<`u`&&document.body&&this._container.bindTo(document.body)),this._container},show(e,t={}){return this.container().show(e,t)},success(e,t={}){return this.container().success(e,t)},error(e,t={}){return this.container().error(e,t)},warning(e,t={}){return this.container().warning(e,t)},info(e,t={}){return this.container().info(e,t)},close(e){return this.container().close(e)},clear(){return this.container().clear()}},go=class extends P{constructor(e=null){super(`dialog`,null),this.className(L,`yoya-vdialog`),this.styles({background:R(`color-surface`,`#ffffff`),border:`none`,borderRadius:`10px`,boxSizing:`border-box`,color:R(`color-text`,`#172033`),maxWidth:`min(92vw, 680px)`,padding:`16px`,boxShadow:`0 24px 72px rgba(15, 23, 42, 0.2)`,width:`100%`}),this.attr(`aria-modal`,`true`),this.attr(`role`,`dialog`),this._pendingOpenSync=!1,this._content=new P(`div`).className(`yoya-vdialog-content`),this.child(this._content),this.on(`cancel`,e=>{e.preventDefault(),this.close()}),this.on(`close`,()=>{this.setState(`open`,!1),this.attr(`data-open`,null),this.attr(`open`,null)}),this._setupDialog(e)}content(e){return G(this._content,[]),typeof e==`function`?(e(this._content),this):(G(this._content,W(e)),this)}open(e=!0){let t=!!e;return this.setState(`open`,t),this.attr(`data-open`,t?`true`:null),t?this._openElement():this._closeElement(),this}close(){return this.open(!1)}renderDom(){let e=super.renderDom();return this.getBooleanState(`open`)&&this._scheduleOpenSync(),e}_setupDialog(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,content:n,open:r,...i}=e;Object.keys(i).length>0&&this.setup(i),n===void 0?t!==void 0&&this.content(t):this.content(n),r!==void 0&&this.open(r);return}this.content(e)}}_openElement({defer:e=!0}={}){if(this.style(`display`,null),!this._el){this.attr(`open`,null);return}if(typeof this._el.showModal!=`function`){this.attr(`open`,!0);return}if(!this._el.isConnected){this.attr(`open`,null),e&&this._scheduleOpenSync();return}try{this._el.open&&!this._isModal()&&this.attr(`open`,null),this._el.open||this._el.showModal(),this.attr(`open`,!0)}catch{this.attr(`open`,!0)}}_closeElement(){if(this._el&&typeof this._el.close==`function`)try{this._el.open&&this._el.close()}catch{}this.attr(`open`,null),this._el&&typeof this._el.showModal!=`function`?this.style(`display`,`none`):this.style(`display`,null)}_scheduleOpenSync(){this._pendingOpenSync||(this._pendingOpenSync=!0,queueMicrotask(()=>{this._pendingOpenSync=!1,this.getBooleanState(`open`)&&this._openElement({defer:!1})}))}_isModal(){if(!this._el||typeof this._el.matches!=`function`)return!1;try{return this._el.matches(`:modal`)}catch{return!1}}};function _o(e=null,t=null,n=null){return H(go,e,t,n)}var vo={bottom:{left:`50%`,top:`calc(100% + 8px)`,transform:`translateX(-50%)`},"bottom-end":{right:`0`,top:`calc(100% + 8px)`},"bottom-start":{left:`0`,top:`calc(100% + 8px)`},left:{right:`calc(100% + 8px)`,top:`50%`,transform:`translateY(-50%)`},"left-end":{right:`calc(100% + 8px)`,top:`0`},"left-start":{bottom:`0`,right:`calc(100% + 8px)`},right:{left:`calc(100% + 8px)`,top:`50%`,transform:`translateY(-50%)`},"right-end":{left:`calc(100% + 8px)`,top:`0`},"right-start":{bottom:`0`,left:`calc(100% + 8px)`},top:{bottom:`calc(100% + 8px)`,left:`50%`,transform:`translateX(-50%)`},"top-end":{bottom:`calc(100% + 8px)`,right:`0`},"top-start":{bottom:`calc(100% + 8px)`,left:`0`}},yo={bottom:null,left:null,right:null,top:null,transform:null},bo={"bottom-left":`bottom-start`,bottomLeft:`bottom-start`,"bottom-right":`bottom-end`,bottomRight:`bottom-end`,"left-bottom":`left-end`,leftBottom:`left-end`,"left-top":`left-start`,leftTop:`left-start`,"right-bottom":`right-end`,rightBottom:`right-end`,"right-top":`right-start`,rightTop:`right-start`,"top-left":`top-start`,topLeft:`top-start`,"top-right":`top-end`,topRight:`top-end`},xo=[`click`,`focus`,`manual`],So=class extends P{constructor(e=null){super(`div`,null),this._triggerMode=`hover`,this._globalCloseCleanup=null,this._panelId=da(`yoya-vtooltip-panel`),this._target=new P(`span`).className(`yoya-vtooltip-target`).attr(`aria-describedby`,this._panelId).on(`mouseenter`,()=>this._handleHoverEnter()).on(`mouseleave`,()=>this._handleHoverLeave()).on(`focusin`,()=>this._handleFocusEnter()).on(`focusout`,e=>this._handleFocusLeave(e)).on(`click`,e=>this._handleTargetClick(e)),this._panel=new P(`div`).id(this._panelId).className(`yoya-vtooltip-panel`).attr({"aria-hidden":`true`,role:`tooltip`}),this.className(L,`yoya-vtooltip`),this.child(this._target,this._panel),this.placement(`top`),this.trigger(`hover`),this._setupTooltip(e)}target(e){return e===void 0?this._target:(K(this._target,e),this)}content(e){return e===void 0?this._panel.children():(K(this._panel,e),this)}placement(e){if(e===void 0)return this.attr(`data-placement`);let t=e||`top`,n=bo[t]||t;return this.attr(`data-placement`,n),this._panel.styles(wo(n)),this}trigger(e){if(e===void 0)return this._triggerMode;let t=String(e||`hover`);return this._triggerMode=xo.includes(t)?t:`hover`,this.attr(`data-trigger`,this._triggerMode),this}open(e=!0){let t=!!e;return this.setState(`open`,t),this.attr(`data-open`,t?`true`:null),this._panel.attr(`aria-hidden`,t?`false`:`true`),t?this._bindGlobalCloseHandlers():this._releaseGlobalCloseHandlers(),this}close(){return this.open(!1)}toggle(){return this.open(!this.getBooleanState(`open`))}destroy(){return this.close(),super.destroy()}_bindGlobalCloseHandlers(){if(this._globalCloseCleanup||typeof document>`u`)return;let e=!1,t=e=>{this._el?.contains(e.target)||this.close()},n=e=>{if(e.key!==`Escape`)return;let t=!!this._el?.contains(e.target);this.close(),t&&this._focusTarget()};this._triggerMode===`click`&&(document.addEventListener(`click`,t),e=!0),document.addEventListener(`keydown`,n),this._globalCloseCleanup=()=>{e&&document.removeEventListener(`click`,t),document.removeEventListener(`keydown`,n),this._globalCloseCleanup=null}}_releaseGlobalCloseHandlers(){this._globalCloseCleanup&&this._globalCloseCleanup()}_handleHoverEnter(){this._triggerMode===`hover`&&this.open(!0)}_handleHoverLeave(){this._triggerMode===`hover`&&this.close()}_handleFocusEnter(){(this._triggerMode===`hover`||this._triggerMode===`focus`)&&this.open(!0)}_handleFocusLeave(e){(this._triggerMode===`hover`||this._triggerMode===`focus`)&&(e.relatedTarget&&this._target._el?.contains(e.relatedTarget)||this.close())}_handleTargetClick(){this._triggerMode===`click`&&this.toggle()}_focusTarget(){(this._target._el?.querySelector?.(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)||this._target._el)?.focus?.()}_setupTooltip(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,content:n,open:r,placement:i,target:a,trigger:o,...s}=e;Object.keys(s).length>0&&this.setup(s),a===void 0?t!==void 0&&this.target(t):this.target(a),n!==void 0&&this.content(n),i!==void 0&&this.placement(i),o!==void 0&&this.trigger(o),r!==void 0&&this.open(r);return}this.target(e)}}};function Co(e=null,t=null,n=null){return H(So,e,t,n)}function wo(e){return{...yo,...vo[e]||vo.top}}var To=class extends l{constructor(e=null){super(),this._container=e instanceof fo?e:e&&typeof e==`object`&&e.container instanceof fo?e.container:mo(e),this._destroyed=!1}container(){return this._container}bindTo(e){return this._destroyed||this._container.bindTo(e),this}renderDom(){return this._destroyed?null:this._container.renderDom()}toHTML(){return this._destroyed?``:this._container.toHTML()}show(e,t={}){return this._destroyed?null:this._container.show(e,t)}success(e,t={}){return this._showType(`success`,e,t)}error(e,t={}){return this._showType(`error`,e,t)}warning(e,t={}){return this._showType(`warning`,e,t)}info(e,t={}){return this._showType(`info`,e,t)}close(e){return this._destroyed||this._container.close(e),this}clear(){return this._destroyed||this._container.clear(),this}destroy(){return this._destroyed||(this._destroyed=!0,this._container.destroy(),super.destroy()),this}_showType(e,t,n){return this._destroyed?null:this._container[e](t,n)}};function Eo(e=null,t=null,n=null){let r=B(e,t,n);return V(r.first instanceof To?r.first:new To(r.first),r.options,r.callback)}v(P,{vDialog:_o,vMessage:po,vMessageContainer:mo,vTooltip:Co});var Do=class extends P{constructor(e=null){super(`div`,null),this._allowClear=!0,this._allowHalf=!1,this._character=`★`,this._count=5,this._disabled=!1,this._error=!1,this._focused=!1,this._hoverValue=0,this._name=``,this._readonly=!1,this._required=!1,this._size=22,this._stars=null,this._value=0,this._input=new P(`input`).className(`yoya-vrate-input`).attr({"aria-hidden":`true`,max:`5`,min:`0`,step:`1`,tabindex:`-1`,type:`range`}).style(`display`,`none`),this._starsBox=new P(`div`).className(`yoya-vrate-stars`).attr({"aria-label":`评分`,role:`radiogroup`,tabindex:`0`}).styles({alignItems:`center`,borderRadius:`8px`,display:`inline-flex`,gap:`2px`,minWidth:`0`,outline:`none`,padding:`4px`,transition:`box-shadow 120ms ease`}),this.className(L,`yoya-vrate`),this.styles({display:`inline-grid`,gap:`6px`,minWidth:`0`}),this.child(this._input,this._starsBox),this._starsBox.on(`keydown`,e=>this._handleKeydown(e)),this._starsBox.on(`focusin`,()=>this._setFocused(!0)),this._starsBox.on(`focusout`,()=>this._setFocused(!1)),this._setupRate(e),this._sync()}value(e){if(e===void 0)return this._value;let t=this._normalizeValue(e);return t!==this._value&&(this._value=t,this._sync()),this}count(e){if(e===void 0)return this._count;let t=Math.max(1,Math.trunc(Number(e))||1);return t!==this._count&&(this._count=t,this._value=this._normalizeValue(this._value),this._sync()),this}max(e){return this.count(e)}allowHalf(e){if(e===void 0)return this._allowHalf;let t=!!e;return t!==this._allowHalf&&(this._allowHalf=t,this._value=this._normalizeValue(this._value),this._sync()),this}allowClear(e){return e===void 0?this._allowClear:(this._allowClear=!!e,this.attr(`data-allow-clear`,this._allowClear?`true`:null),this)}clearable(e){return this.allowClear(e)}character(e){return e===void 0?this._character:(this._character=J(e)||`★`,this._renderStars(),this)}size(e){return e===void 0?this._size:(this._size=Math.max(12,Number(e)||22),this._renderStars(),this)}name(e){return e===void 0?this._name:(this._name=J(e),this._input.attr(`name`,this._name||null),this.attr(`data-name`,this._name||null),this)}disabled(e){return e===void 0?this._disabled:(this._disabled=!!e,this._syncState(),this)}readonly(e){return e===void 0?this._readonly:(this._readonly=!!e,this._syncState(),this)}required(e){return e===void 0?this._required:(this._required=!!e,this._input.attr(`required`,this._required?!0:null),this.attr(`data-required`,this._required?`true`:null),this)}error(e){return e===void 0?this._error:(this._error=!!e,this._syncState(),this)}clear(){return this._value!==0&&!this._disabled&&!this._readonly&&this._setValue(0,!0),this}_sync(){return this._syncInput(),this._syncState(),!this._stars||this._stars.length!==this._count?this._renderStars():this._syncStars(),this}_syncInput(){return this._input.attr({max:String(this._count),min:`0`,step:this._allowHalf?`0.5`:`1`,value:String(this._value)}),this}_syncState(){return this.attr(`data-value`,String(this._value)),this.attr(`data-count`,String(this._count)),this.attr(`data-allow-half`,this._allowHalf?`true`:null),this.attr(`data-allow-clear`,this._allowClear?`true`:null),this.attr(`data-disabled`,this._disabled?`true`:null),this.attr(`data-readonly`,this._readonly?`true`:null),this.attr(`data-error`,this._error?`true`:null),this.attr(`data-hover-value`,this._hoverValue>0?String(this._hoverValue):null),this._input.attr(`disabled`,this._disabled?!0:null),this._starsBox.attr(`aria-disabled`,this._disabled?`true`:null),this._starsBox.attr(`aria-invalid`,this._error?`true`:null),this._starsBox.attr(`aria-readonly`,this._readonly?`true`:null),this._starsBox.attr(`tabindex`,this._disabled?`-1`:`0`),this.style(`opacity`,this._disabled?`0.64`:`1`),this._starsBox.style(`boxShadow`,this._error?`0 0 0 1px ${R(`color-danger-ring`,`rgba(220, 38, 38, 0.2)`)}`:this._focused?`0 0 0 3px ${R(`color-primary-ring`,`rgba(37, 99, 235, 0.22)`)}`:null),this}_renderStars(){G(this._starsBox,[]),this._stars=[];for(let e=1;e<=this._count;e+=1){let t=this._createStar(e);this._stars.push(t),this._starsBox.child(t)}return this._syncStars(),this}_createStar(e){let t=new P(`button`).className(`yoya-vrate-star`).attr({"aria-checked":`false`,"aria-label":`${e} 分`,"data-value":String(e),role:`radio`,tabindex:`-1`,type:`button`}).styles({alignItems:`center`,background:`transparent`,border:`none`,borderRadius:`4px`,boxSizing:`border-box`,display:`inline-flex`,flex:`0 0 auto`,fontSize:`${this._size}px`,height:`${this._size+8}px`,justifyContent:`center`,lineHeight:`1`,margin:`0`,padding:`0`,position:`relative`,width:`${this._size+8}px`}),n=new P(`span`).className(`yoya-vrate-star-base`).styles({alignItems:`center`,color:R(`color-border-muted`,`#94a3b8`),display:`flex`,inset:`0`,justifyContent:`center`,lineHeight:`1`,position:`absolute`}).text(this._character),r=new P(`span`).className(`yoya-vrate-star-fill`).styles({alignItems:`center`,clipPath:`inset(0 100% 0 0)`,color:R(`color-warning`,`#f59e0b`),display:`flex`,inset:`0`,justifyContent:`center`,lineHeight:`1`,overflow:`hidden`,position:`absolute`,WebkitClipPath:`inset(0 100% 0 0)`}).text(this._character);return t.child(n,r),t.on(`click`,t=>{t.preventDefault(),this._selectStar(e,t)}),t.on(`mouseenter`,t=>this._setHover(e,t)),t.on(`mouseleave`,()=>this._setHover(0)),t}_syncStars(){let e=this._hoverValue>0?this._hoverValue:this._value,t=this._allowHalf&&this._value%1!=0?Math.ceil(this._value):Math.round(this._value);return this._stars.forEach((n,r)=>{let i=r+1,a=this._starFillRatio(i,e),o=this._value===i||this._allowHalf&&this._value===i-.5,s=n.children()[1];n.attr(`aria-checked`,o?`true`:`false`),n.attr(`data-filled`,a>0?`true`:null),n.attr(`data-half`,a>0&&a<1?`true`:null),n.attr(`tabindex`,i===t?`0`:`-1`),n.style(`cursor`,this._disabled?`not-allowed`:this._readonly?`default`:`pointer`);let c=`${Math.round((1-a)*100)}%`;s.style(`clipPath`,`inset(0 ${c} 0 0)`),s.style(`WebkitClipPath`,`inset(0 ${c} 0 0)`),s.style(`color`,a>0?R(`color-warning`,`#f59e0b`):`transparent`)}),this}_starFillRatio(e,t){return t>=e?1:this._allowHalf&&t===e-.5?.5:0}_normalizeValue(e){let t=Number(e);return Number.isFinite(t)||(t=0),t=this._allowHalf?Math.round(t*2)/2:Math.round(t),Math.max(0,Math.min(this._count,t))}_selectStar(e,t){if(this._disabled||this._readonly)return;let n=this._pointerValue(e,t);this._allowClear&&n===this._value&&(n=0),this._setValue(n,!0)}_setHover(e,t){this._disabled||this._readonly||(this._hoverValue=e>0?this._pointerValue(e,t):0,this._syncStars(),this.attr(`data-hover-value`,this._hoverValue>0?String(this._hoverValue):null))}_pointerValue(e,t){if(!this._allowHalf||!t)return e;let n=t.currentTarget?.getBoundingClientRect?.();return n?.width&&t.offsetX<n.width/2?e-.5:e}_setValue(e,t){let n=this._normalizeValue(e);return this._hoverValue=0,n!==this._value&&(this._value=n,this._sync(),t&&this._emitChange()),this}_handleKeydown(e){if(this._disabled||this._readonly)return;let t=this._allowHalf?.5:1,n=null;if(e.key===`ArrowRight`||e.key===`ArrowUp`)n=this._value+t;else if(e.key===`ArrowLeft`||e.key===`ArrowDown`)n=this._value-t;else if(e.key===`Home`)n=this._allowHalf?.5:1;else if(e.key===`End`)n=this._count;else if(e.key===`Enter`||e.key===` `){this._hoverValue>0?this._selectStar(this._hoverValue):this._allowClear&&this._value>0&&this._setValue(0,!0),e.preventDefault();return}n!==null&&(e.preventDefault(),this._setValue(n,!0))}_setFocused(e){this._focused=e,this.attr(`data-focused`,e?`true`:null),this._syncState()}_emitChange(){if(!this._el)return;let e=this._el.ownerDocument?.defaultView?.CustomEvent||CustomEvent;this._el.dispatchEvent(new e(`change`,{bubbles:!0,detail:this._value}))}_setupRate(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{allowClear:t,allowHalf:n,character:r,clearable:i,count:a,disabled:o,error:s,max:c,name:l,readonly:u,required:d,size:f,value:p,...m}=e;Object.keys(m).length>0&&this.setup(m),(a!==void 0||c!==void 0)&&this.count(a??c),n!==void 0&&this.allowHalf(n),r!==void 0&&this.character(r),f!==void 0&&this.size(f),p!==void 0&&this.value(p),l!==void 0&&this.name(l),d!==void 0&&this.required(d),u!==void 0&&this.readonly(u),o!==void 0&&this.disabled(o),s!==void 0&&this.error(s),i===void 0?t!==void 0&&this.allowClear(t):this.allowClear(i);return}this.value(e)}}};function Oo(e=null,t=null,n=null){return H(Do,e,t,n)}v(P,{vRate:Oo});var ko=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this.className(L,`yoya-vslider`),this.styles({alignItems:`center`,boxSizing:`border-box`,display:`flex`,gap:`10px`,minWidth:`0`,width:`100%`}),this._min=0,this._max=100,this._step=1,this._value=0,this._showValue=!0,this._vertical=!1,this._changeHandlers=[],this._input=new P(`input`).className(`yoya-vslider-input`).attr({"data-vslider-input":`true`,max:`100`,min:`0`,step:`1`,type:`range`,value:`0`}).styles({flex:`1 1 auto`,minWidth:`0`}).on(`input`,e=>this.value(Number(e.target.value))),this._valueText=f(`0`),this._valueLabel=new P(`span`).className(`yoya-vslider-value`).attr(`data-vslider-value`,`true`).styles({color:R(`color-text-muted`,`#64748b`),fontVariantNumeric:`tabular-nums`,minWidth:`36px`,textAlign:`right`}).child(this._valueText),this.child(this._input,this._valueLabel),this._sync(),this._setupSlider(e),V(this,t,n)}value(e){return e===void 0?this._value:(this._setValue(e,!0),this)}min(e){return e===void 0?this._min:(this._min=Number(e)||0,this._input.attr(`min`,String(this._min)),this._setValue(this._value,!1),this)}max(e){return e===void 0?this._max:(this._max=Number(e)||0,this._input.attr(`max`,String(this._max)),this._setValue(this._value,!1),this)}step(e){return e===void 0?this._step:(this._step=Number(e)||1,this._input.attr(`step`,String(this._step)),this._setValue(this._value,!1),this)}showValue(e){return e===void 0?this._showValue:(this._showValue=!!e,this._valueLabel.style(`display`,this._showValue?null:`none`),this)}vertical(e){return e===void 0?this._vertical:(this._vertical=!!e,this.attr(`data-vertical`,this._vertical?`true`:null),this.styles({flexDirection:this._vertical?`column`:`row`,height:this._vertical?`180px`:null,width:this._vertical?null:`100%`}),this._input.styles({direction:this._vertical?`rtl`:null,height:this._vertical?`100%`:null,minHeight:this._vertical?`0`:null,minWidth:this._vertical?null:`0`,writingMode:this._vertical?`vertical-lr`:null}),this._valueLabel.styles({minWidth:this._vertical?null:`36px`,textAlign:this._vertical?`center`:`right`}),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this.attr(`data-disabled`,t?`true`:null),this._input.attr(`disabled`,t?!0:null),this}name(e){return e===void 0?this.attr(`data-name`)||``:(this.attr(`data-name`,e?String(e):null),this._input.attr(`name`,e?String(e):null),this)}required(e){return e===void 0?this.getBooleanState(`required`):(this.setState(`required`,!!e),this.attr(`data-required`,e?`true`:null),this._input.attr(`required`,e?!0:null),this)}change(e){return e===void 0?this._changeHandlers.slice():(this._changeHandlers=[e],this)}onChange(e){return this.change(e)}_collectValue(){return this._value}_sync(){return this._input.attr(`value`,String(this._value)),this._valueText.textContent(String(this._value)),this}_setValue(e,t){let n=Number(e);return this._value=Number.isFinite(n)?jo(n,this._min,this._max,this._step):this._min,this._sync(),t&&this._changeHandlers.forEach(e=>e(this._value,this)),this}_setupSlider(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{change:t,disabled:n,max:r,min:i,name:a,onChange:o,required:s,showValue:c,step:l,value:u,vertical:d,...f}=e;Object.keys(f).length>0&&this.setup(f),i!==void 0&&this.min(i),r!==void 0&&this.max(r),l!==void 0&&this.step(l),u!==void 0&&this.value(u),c!==void 0&&this.showValue(c),d!==void 0&&this.vertical(d),n!==void 0&&this.disabled(n),a!==void 0&&this.name(a),s!==void 0&&this.required(s),t===void 0?o!==void 0&&this.onChange(o):this.change(t);return}this.value(e)}}};function Ao(e=null,t=null,n=null){return H(ko,e,t,n)}v(P,{vSlider:Ao});function jo(e,t,n,r){let i=Math.min(Math.max(e,t),n);return r>0?Math.round(i/r)*r:i}var Mo=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this.className(L,`yoya-vcascader`),this.styles({position:`relative`}),this._options=[],this._value=[],this._activePath=[],this._placeholder=`请选择`,this._changeHandlers=[],this._open=!1,this._outsideListener=null,this._repositionListener=null,this._triggerText=f(this._placeholder),this._trigger=new P(`button`).className(`yoya-vcascader-trigger`).attr({"aria-expanded":`false`,"aria-haspopup":`listbox`,"data-vcascader-trigger":`true`,title:`选择`,type:`button`}).styles({alignItems:`center`,background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`6px`,boxSizing:`border-box`,color:`inherit`,cursor:`pointer`,display:`inline-flex`,font:`inherit`,gap:`8px`,justifyContent:`space-between`,minHeight:`var(--yoya-control-height-md, 34px)`,padding:`0 10px`,width:`100%`}).child(this._triggerText,new P(`span`).styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`}).text(`▾`)).on(`click`,()=>this.toggle()),this._columns=new P(`div`).className(`yoya-vcascader-columns`).attr(`data-vcascader-columns`,`true`).styles({display:`flex`,minWidth:`0`}),this._panel=new P(`div`).className(`yoya-vcascader-panel`).attr(`data-vcascader-panel`,`true`).styles({background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`8px`,boxShadow:`var(--yoya-shadow-md, 0 8px 18px rgba(15, 23, 42, 0.1))`,boxSizing:`border-box`,display:`none`,left:`0`,maxHeight:`260px`,overflow:`auto`,padding:`4px`,position:`absolute`,top:`calc(100% + 6px)`,width:`100%`,zIndex:`110`}).child(this._columns),this.child(this._trigger,this._panel),this._setupCascader(e),V(this,t,n)}options(e){return e===void 0?Fo(this._options):(this._options=Po(e),this._syncTrigger(),this._open&&this._renderColumns(),this)}value(e){if(e===void 0)return[...this._value];let t=Array.isArray(e)?e:e==null?[]:[e],n=Io(this._options,t);return this._value=n.map(e=>e.value),this._activePath=n,this._syncTrigger(),this}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this.attr(`data-disabled`,t?`true`:null),this._trigger.attr(`disabled`,t?!0:null),this}name(e){return e===void 0?this.attr(`data-name`)||``:(this.attr(`data-name`,e?String(e):null),this)}required(e){return e===void 0?this.getBooleanState(`required`):(this.setState(`required`,!!e),this.attr(`data-required`,e?`true`:null),this)}placeholder(e){return e===void 0?this._placeholder:(this._placeholder=String(e),this._syncTrigger(),this)}open(e=!0){return this._open=!!e,this._trigger.attr(`aria-expanded`,this._open?`true`:`false`),this._open?(this._renderColumns(),this._panel.style(`display`,null),this._positionPanel()):this._panel.style(`display`,`none`),this._bindOutsideClose(this._open),this._bindReposition(this._open),this}close(){return this.open(!1)}toggle(){return this.open(!this._open)}change(e){return e===void 0?this._changeHandlers.slice():(this._changeHandlers=[e],this)}onChange(e){return this.change(e)}renderDom(){let e=super.renderDom();return this._open&&this._positionPanel(),e}destroy(){return this._bindOutsideClose(!1),this._bindReposition(!1),super.destroy()}_collectValue(){return[...this._value]}_renderColumns(){G(this._columns,[]);let e=[],t=this._options;this._activePath.forEach(n=>{e.push(t);let r=t.find(e=>e.value===n.value);t=r?r.children:[]}),(this._activePath.length===0||t.length>0)&&e.push(t),e.forEach((t,n)=>{let r=this._activePath[n]||null,i=new P(`div`).className(`yoya-vcascader-column`).styles({borderRight:n<e.length-1?`1px solid var(--yoya-color-border-faint, #efefef)`:`0`,boxSizing:`border-box`,minWidth:`120px`,padding:`2px`});t.forEach(e=>{let t=new P(`div`).className(`yoya-vcascader-option`).attr({"data-vcascader-option":e.value,role:`option`}).styles({alignItems:`center`,borderRadius:`4px`,boxSizing:`border-box`,cursor:`pointer`,display:`flex`,gap:`6px`,justifyContent:`space-between`,padding:`4px 8px`}).on(`mouseenter`,()=>{t.styles({background:R(`color-surface-hover`,`#f1f5f9`)})}).on(`mouseleave`,()=>{t.style(`background`,null)}).on(`click`,()=>this._selectOption(n,e));r!==null&&r.value===e.value&&t.styles({background:R(`color-primary-subtle`,`#eff6ff`),color:R(`color-primary-hover`,`#1d4ed8`)}),t.child(new P(`span`).styles({flex:`1 1 auto`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}).text(e.label),e.children.length>0?new P(`span`).styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`}).text(`›`):null),i.child(t)}),this._columns.child(i)})}_selectOption(e,t){let n=this._activePath.slice(0,e);if(n.push(t),this._activePath=n,t.children.length>0){this._value=n.map(e=>e.value),this._syncTrigger(),this._changeHandlers.forEach(e=>e([...this._value],this)),this._renderColumns();return}this._value=n.map(e=>e.value),this._syncTrigger(),this._changeHandlers.forEach(e=>e([...this._value],this)),this.close()}_syncTrigger(){if(this._value.length===0){this._triggerText.textContent(this._placeholder);return}let e=Io(this._options,this._value).map(e=>e.label);this._triggerText.textContent(e.length>0?e.join(` / `):this._value.join(` / `))}_bindOutsideClose(e){if(e&&!this._outsideListener){this._outsideListener=e=>{(!this._el||!this._el.contains(e.target))&&this.close()},document.addEventListener(`mousedown`,this._outsideListener);return}!e&&this._outsideListener&&(document.removeEventListener(`mousedown`,this._outsideListener),this._outsideListener=null)}_bindReposition(e){if(e&&!this._repositionListener){this._repositionListener=()=>this._positionPanel(),window.addEventListener(`scroll`,this._repositionListener,!0),window.addEventListener(`resize`,this._repositionListener);return}!e&&this._repositionListener&&(window.removeEventListener(`scroll`,this._repositionListener,!0),window.removeEventListener(`resize`,this._repositionListener),this._repositionListener=null)}_positionPanel(){if(typeof window>`u`||typeof document>`u`||!this._el||!this._trigger._el)return;let e=this._trigger._el.getBoundingClientRect(),t=this._panel._el;if(!t)return;let n=t.offsetHeight||240,r=e.bottom+6;r+n>window.innerHeight-8&&(r=Math.max(8,e.top-n-6)),this._panel.styles({left:`${e.left}px`,position:`fixed`,top:`${r}px`})}_setupCascader(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{change:t,disabled:n,name:r,onChange:i,options:a,placeholder:o,required:s,value:c,...l}=e;Object.keys(l).length>0&&this.setup(l),a!==void 0&&this.options(a),o!==void 0&&this.placeholder(o),c!==void 0&&this.value(c),n!==void 0&&this.disabled(n),r!==void 0&&this.name(r),s!==void 0&&this.required(s),t===void 0?i!==void 0&&this.onChange(i):this.change(t);return}this.options(e)}}};function No(e=null,t=null,n=null){return H(Mo,e,t,n)}v(P,{vCascader:No});function Po(e){return(Array.isArray(e)?e:[]).map(e=>({children:Po(e.children),label:String(e.label??e.value??``),value:e.value??e.label??``}))}function Fo(e){return e.map(e=>({children:Fo(e.children),label:e.label,value:e.value}))}function Io(e,t){let n=[],r=e;for(let e of t){let t=r.find(t=>t.value===e);if(!t)break;n.push(t),r=t.children}return n}var Lo=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this.className(L,`yoya-vtags-input`),this.styles({alignItems:`center`,background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`6px`,boxSizing:`border-box`,display:`flex`,flexWrap:`wrap`,gap:`6px`,minHeight:`var(--yoya-control-height-md, 34px)`,padding:`4px 8px`,width:`100%`}),this._value=[],this._placeholder=`输入后回车添加`,this._changeHandlers=[],this._chips=new P(`div`).className(`yoya-vtags-input-chips`).attr(`data-vtags-chips`,`true`).styles({alignItems:`center`,display:`flex`,flexWrap:`wrap`,gap:`6px`}),this._input=new P(`input`).className(`yoya-vtags-input-field`).attr({"data-vtags-input":`true`,placeholder:this._placeholder,type:`text`}).styles({background:`transparent`,border:`0`,boxSizing:`border-box`,flex:`1 1 120px`,font:`inherit`,minWidth:`80px`,outline:`none`,padding:`2px 0`}).on(`keydown`,e=>this._handleKeydown(e)),this.child(this._chips,this._input),this._renderChips(),this._setupTagsInput(e),V(this,t,n)}value(e){return e===void 0?[...this._value]:(this._value=(Array.isArray(e)?e:[]).map(e=>String(e)).filter(Boolean),this._renderChips(),this._changeHandlers.forEach(e=>e([...this._value],this)),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this.attr(`data-disabled`,t?`true`:null),this._input.attr(`disabled`,t?!0:null),this}name(e){return e===void 0?this.attr(`data-name`)||``:(this.attr(`data-name`,e?String(e):null),this)}required(e){return e===void 0?this.getBooleanState(`required`):(this.setState(`required`,!!e),this.attr(`data-required`,e?`true`:null),this)}placeholder(e){return e===void 0?this._placeholder:(this._placeholder=String(e),this._input.attr(`placeholder`,this._placeholder),this)}change(e){return e===void 0?this._changeHandlers.slice():(this._changeHandlers=[e],this)}onChange(e){return this.change(e)}_collectValue(){return[...this._value]}_addTag(e){let t=String(e).trim();!t||this._value.includes(t)||(this._value.push(t),this._renderChips(),this._changeHandlers.forEach(e=>e([...this._value],this)))}_removeTag(e){e<0||e>=this._value.length||(this._value.splice(e,1),this._renderChips(),this._changeHandlers.forEach(e=>e([...this._value],this)))}_handleKeydown(e){if(e.key===`Enter`||e.key===`,`){e.preventDefault(),this._addTag(this._currentInputValue()),this._input.attr(`value`,``);return}e.key===`Backspace`&&!this._currentInputValue()&&this._value.length>0&&this._removeTag(this._value.length-1)}_currentInputValue(){return this._input._el?.value??this._input.attr(`value`)??``}_renderChips(){G(this._chips,this._value.map((e,t)=>new P(`span`).className(`yoya-vtags-input-tag`).attr(`data-vtags-tag`,e).styles({alignItems:`center`,background:R(`color-surface-muted`,`#f1f5f9`),border:`1px solid var(--yoya-color-border-faint, #efefef)`,borderRadius:`4px`,boxSizing:`border-box`,display:`inline-flex`,fontSize:`13px`,gap:`4px`,padding:`1px 6px`}).child(new P(`span`).text(e),new P(`button`).attr({"aria-label":`移除 ${e}`,"data-vtags-remove":`true`,title:`移除`,type:`button`}).styles({background:`transparent`,border:`0`,color:R(`color-text-muted`,`#64748b`),cursor:`pointer`,fontSize:`12px`,lineHeight:`1`,padding:`0`}).text(`×`).on(`click`,()=>this._removeTag(t)))))}_setupTagsInput(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{change:t,disabled:n,name:r,onChange:i,placeholder:a,required:o,value:s,...c}=e;Object.keys(c).length>0&&this.setup(c),s!==void 0&&this.value(s),a!==void 0&&this.placeholder(a),n!==void 0&&this.disabled(n),r!==void 0&&this.name(r),o!==void 0&&this.required(o),t===void 0?i!==void 0&&this.onChange(i):this.change(t);return}this.value(e)}}};function Ro(e=null,t=null,n=null){return H(Lo,e,t,n)}v(P,{vTagsInput:Ro});var zo=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this.className(L,`yoya-vautocomplete`),this.styles({position:`relative`,width:`100%`}),this._value=``,this._source=[],this._limit=8,this._placeholder=`输入以搜索`,this._changeHandlers=[],this._open=!1,this._highlight=-1,this._suggestions=[],this._optionNodes=[],this._outsideListener=null,this._repositionListener=null,this._input=new P(`input`).className(`yoya-vautocomplete-input`).attr({autocomplete:`off`,"data-vautocomplete-input":`true`,placeholder:this._placeholder,type:`text`}).styles({background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`6px`,boxSizing:`border-box`,color:`inherit`,font:`inherit`,minHeight:`var(--yoya-control-height-md, 34px)`,outline:`none`,padding:`0 10px`,width:`100%`}).on(`input`,e=>this._handleInput(e.target.value)).on(`keydown`,e=>this._handleKeydown(e)).on(`focus`,()=>this._openSuggestions()).on(`click`,()=>this._openSuggestions()),this._list=new P(`div`).className(`yoya-vautocomplete-list`).attr(`data-vautocomplete-list`,`true`).styles({background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`8px`,boxShadow:`var(--yoya-shadow-md, 0 8px 18px rgba(15, 23, 42, 0.1))`,boxSizing:`border-box`,display:`none`,maxHeight:`240px`,overflow:`auto`,padding:`4px`,position:`fixed`,zIndex:`110`}),this.child(this._input,this._list),this._setupAutocomplete(e),V(this,t,n)}value(e){return e===void 0?this._value:(this._value=String(e??``),this._input.attr(`value`,this._value),this._changeHandlers.forEach(e=>e(this._value,this)),this)}source(e){return e===void 0?this._source:(this._source=e,this)}options(e){return this.source(e)}limit(e){return e===void 0?this._limit:(this._limit=Math.max(1,Number(e)||8),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this.attr(`data-disabled`,t?`true`:null),this._input.attr(`disabled`,t?!0:null),this}name(e){return e===void 0?this.attr(`data-name`)||``:(this.attr(`data-name`,e?String(e):null),this._input.attr(`name`,e?String(e):null),this)}required(e){return e===void 0?this.getBooleanState(`required`):(this.setState(`required`,!!e),this.attr(`data-required`,e?`true`:null),this._input.attr(`required`,e?!0:null),this)}placeholder(e){return e===void 0?this._placeholder:(this._placeholder=String(e),this._input.attr(`placeholder`,this._placeholder),this)}change(e){return e===void 0?this._changeHandlers.slice():(this._changeHandlers=[e],this)}onChange(e){return this.change(e)}close(){return this._open=!1,this._list.style(`display`,`none`),this._bindOutsideClose(!1),this._bindReposition(!1),this}destroy(){return this.close(),super.destroy()}renderDom(){let e=super.renderDom();return this._open&&this._positionList(),e}_collectValue(){return this._value}_resolveSuggestions(e){let t=this._source;return typeof t==`function`?Promise.resolve(t(e)).then(e=>Vo(e)):Promise.resolve(Vo(t)).then(t=>e?t.filter(t=>t.label.toLowerCase().includes(String(e).toLowerCase())):t)}_handleInput(e){this.value(e),this._openSuggestions()}_openSuggestions(){this.getBooleanState(`disabled`)||this._resolveSuggestions(this._value).then(e=>{this._suggestions=e.slice(0,this._limit),this._highlight=this._suggestions.length>0?0:-1,this._renderList(),this._open=this._suggestions.length>0,this._list.style(`display`,this._open?null:`none`),this._open&&(this._bindOutsideClose(!0),this._bindReposition(!0),this._positionList())})}_handleKeydown(e){if(!(!this._open||this._suggestions.length===0)){if(e.key===`ArrowDown`)e.preventDefault(),this._highlight=(this._highlight+1)%this._suggestions.length,this._setHighlight(this._highlight);else if(e.key===`ArrowUp`)e.preventDefault(),this._highlight=(this._highlight-1+this._suggestions.length)%this._suggestions.length,this._setHighlight(this._highlight);else if(e.key===`Enter`){e.preventDefault();let t=this._suggestions[this._highlight];t&&this._select(t)}else e.key===`Escape`&&this.close()}}_select(e){this.value(e.value),this.close()}_renderList(){return this._optionNodes=[],G(this._list,this._suggestions.map((e,t)=>{let n=new P(`div`).className(`yoya-vautocomplete-option`).attr({"data-vautocomplete-option":e.value,role:`option`}).styles({borderRadius:`4px`,boxSizing:`border-box`,cursor:`pointer`,overflow:`hidden`,padding:`5px 8px`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}).on(`mousedown`,t=>{t.preventDefault(),this._select(e)}).on(`mouseenter`,()=>this._setHighlight(t)).text(e.label);return this._optionNodes.push(n),n})),this._setHighlight(this._highlight),this}_setHighlight(e){return this._highlight=e,(this._optionNodes||[]).forEach((t,n)=>{t.styles(n===e?{background:R(`color-primary-subtle`,`#eff6ff`)}:{background:null})}),this}_bindOutsideClose(e){if(e&&!this._outsideListener){this._outsideListener=e=>{(!this._el||!this._el.contains(e.target))&&this.close()},document.addEventListener(`mousedown`,this._outsideListener);return}!e&&this._outsideListener&&(document.removeEventListener(`mousedown`,this._outsideListener),this._outsideListener=null)}_bindReposition(e){if(e&&!this._repositionListener){this._repositionListener=()=>this._positionList(),window.addEventListener(`scroll`,this._repositionListener,!0),window.addEventListener(`resize`,this._repositionListener);return}!e&&this._repositionListener&&(window.removeEventListener(`scroll`,this._repositionListener,!0),window.removeEventListener(`resize`,this._repositionListener),this._repositionListener=null)}_positionList(){if(typeof window>`u`||typeof document>`u`||!this._input._el||!this._list._el)return;let e=this._input._el.getBoundingClientRect(),t=this._list._el.offsetHeight||240,n=e.bottom+6;n+t>window.innerHeight-8&&(n=Math.max(8,e.top-t-6)),this._list.styles({left:`${e.left}px`,top:`${n}px`,width:`${Math.max(e.width,180)}px`})}_setupAutocomplete(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{change:t,disabled:n,limit:r,name:i,onChange:a,options:o,placeholder:s,required:c,source:l,value:u,...d}=e;Object.keys(d).length>0&&this.setup(d),l===void 0?o!==void 0&&this.options(o):this.source(l),r!==void 0&&this.limit(r),u!==void 0&&this.value(u),s!==void 0&&this.placeholder(s),n!==void 0&&this.disabled(n),i!==void 0&&this.name(i),c!==void 0&&this.required(c),t===void 0?a!==void 0&&this.onChange(a):this.change(t);return}this.options(e)}}};function Bo(e=null,t=null,n=null){return H(zo,e,t,n)}v(P,{vAutocomplete:Bo});function Vo(e){return(Array.isArray(e)?e:[]).map(e=>typeof e==`string`||typeof e==`number`?{label:String(e),value:String(e)}:{label:String(e.label??e.value??``),value:e.value??e.label??``})}function Ho(e,t={}){return new P(`button`).className(e,`yoya-control-clear`).attr({type:`button`,"aria-label":`清空`,title:`清空`}).styles({alignItems:`center`,background:`transparent`,border:`none`,borderRadius:`4px`,boxSizing:`border-box`,color:R(`color-text-muted`,`#64748b`),cursor:`pointer`,display:`inline-flex`,flexShrink:`0`,fontFamily:`inherit`,fontSize:`16px`,fontWeight:`700`,height:`18px`,justifyContent:`center`,lineHeight:`1`,margin:`0`,padding:`0`,position:`absolute`,width:`18px`,zIndex:`1`,...t}).text(`×`)}function Uo(e,t,n){let r=t._el?.value??e.value(),i=Array.isArray(r)?r.length>0:r!==``&&r!=null,a=e._clearable&&i&&!e.getBooleanState(`disabled`)&&!e.getBooleanState(`readonly`);n.style(`display`,a?null:`none`)}var Wo=class extends P{constructor(e=null){super(`div`,null),this._value=``,this._clearable=!0,this._clearButton=Ho(`yoya-vinput-clear`,{right:`6px`,top:`50%`,transform:`translateY(-50%)`}),this._input=new P(`input`).className(L,`yoya-vinput`).attr(`type`,`text`).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`6px`,boxSizing:`border-box`,color:R(`color-text`,`#172033`),font:`inherit`,minHeight:`var(--yoya-control-height-md, 34px)`,outline:`none`,padding:`0 12px`,width:`100%`}),this._addRootClass(L,`yoya-vinput-wrap`),this.styles({minWidth:`0`,position:`relative`,width:`100%`}),this._clearButton.on(`click`,e=>{e.preventDefault(),e.stopPropagation(),this.clear(),this._input._el?.focus()}),this._input.on(`input`,()=>this._syncClear()),this._input.on(`change`,()=>this._syncClear()),this.child(this._input,this._clearButton),this._setupInput(e),this._syncClearPadding(),this._syncClear()}_addRootClass(...e){return super.className(...e),this}className(...e){return e.length===0?this._input.className():(this._input.className(...e),this)}attr(e,t){return e&&typeof e==`object`?(Object.entries(e).forEach(([e,t])=>this.attr(e,t)),this):e===`value`?t===void 0?this.value():this.value(t):t===void 0?this._input.attr(e):(this._input.attr(e,t),this)}on(e,t,n){return this._input&&(e===`focus`||e===`blur`)?(this._input.on(e,t,n),this):super.on(e,t,n)}id(e){return e===void 0?this._input.id():(this._input.id(e),this)}name(e){return e===void 0?this._input.name():(this._input.name(e),this)}textContent(){return this._input.textContent()}type(e){return e===void 0?this._input.attr(`type`):(this._input.attr(`type`,e||`text`),this)}value(e){if(e===void 0)return this._input._el?.value??this._value??this._input.attr(`value`)??``;let t=J(e);return this._value=t,this._input.attr(`value`,t),this._syncClear(),this}hydrateSnapshot(){return this._input._el&&this.value(this._input._el.value),this}text(e){return this.value(e)}content(e){return this.value(e)}placeholder(e){if(e===void 0)return this._input.attr(`placeholder`);let t=J(e);return this._input.attr(`placeholder`,t||null),this}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this._input.attr(`disabled`,t?!0:null),this._input.style(`cursor`,t?`not-allowed`:`text`),this._input.style(`opacity`,t?`0.64`:`1`),this._syncClear(),this}readonly(e){if(e===void 0)return this.getBooleanState(`readonly`);let t=!!e;return this.setState(`readonly`,t),this._input.attr(`readonly`,t?!0:null),this._syncClear(),this}required(e){if(e===void 0)return this.getBooleanState(`required`);let t=!!e;return this.setState(`required`,t),this._input.attr(`required`,t?!0:null),this}error(e){if(e===void 0)return this.getBooleanState(`error`);let t=!!e;return this.setState(`error`,t),this._input.attr(`data-error`,t?`true`:null),this._input.style(`borderColor`,t?R(`color-danger`,`#dc2626`):R(`color-border-strong`,`#cbd5e1`)),this._input.style(`boxShadow`,t?`0 0 0 1px ${R(`color-danger-ring`,`rgba(220, 38, 38, 0.2)`)}`:null),this}clearable(e){return e===void 0?this._clearable:(this._clearable=!!e,this._input.attr(`data-clearable`,this._clearable?`true`:null),this._syncClearPadding(),this._syncClear(),this)}clear(){return this.value(``),this._input._el&&(this._input._el.dispatchEvent(new Event(`input`,{bubbles:!0})),this._input._el.dispatchEvent(new Event(`change`,{bubbles:!0}))),this}_syncClear(){return Uo(this,this._input,this._clearButton),this}_syncClearPadding(){return this._input.style(`paddingRight`,this._clearable?`34px`:`12px`),this}_setupInput(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{clearable:t,children:n,content:r,disabled:i,error:a,placeholder:o,readonly:s,required:c,text:l,type:u,value:d,...f}=e;Object.keys(f).length>0&&this.setup(f),u!==void 0&&this.type(u),o!==void 0&&this.placeholder(o),d===void 0?l===void 0?r===void 0?n!==void 0&&this.value(n):this.value(r):this.value(l):this.value(d),c!==void 0&&this.required(c),s!==void 0&&this.readonly(s),i!==void 0&&this.disabled(i),a!==void 0&&this.error(a),t!==void 0&&this.clearable(t);return}this.placeholder(e)}}},Go=class extends Wo{constructor(e=null){super(null),this.className(`yoya-vtimer`),this._clearButton.className(`yoya-vtimer-clear`),this._addRootClass(`yoya-vtimer-wrap`),this.mode(`date`),this._setupTimer(e)}mode(e){if(e===void 0)return this.attr(`type`);let t=new Set([`date`,`datetime-local`,`time`]);return this.attr(`type`,t.has(e)?e:`date`),this}type(e){return e===void 0?this.mode():this.mode(e)}_setupTimer(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{mode:t,type:n,...r}=e;this._setupInput(r),t===void 0?n!==void 0&&this.mode(n):this.mode(t);return}this.value(e)}}},Ko=class extends P{constructor(e=null){super(`div`,null);let t=da(`yoya-vtimer-range-error`);this._name=``,this._startTimer=ss().className(`yoya-vtimer-range-start`).attr(`aria-label`,`开始值`).attr(`aria-describedby`,t),this._endTimer=ss().className(`yoya-vtimer-range-end`).attr(`aria-label`,`结束值`).attr(`aria-describedby`,t),this._errorText=new u(``),this._errorMessage=new P(`span`).className(`yoya-vtimer-range-error`).id(t).attr(`aria-live`,`polite`).style(`color`,R(`color-danger`,`#dc2626`)).style(`fontSize`,`0.875rem`).style(`gridColumn`,`1 / -1`).child(this._errorText),this.className(L,`yoya-vtimer-range`).attr(`role`,`group`),this.styles({alignItems:`center`,display:`grid`,gap:`8px`,gridTemplateColumns:`minmax(0, 1fr) minmax(0, 1fr)`}),this._startTimer.on(`change`,e=>this._handleTimerChange(e)),this._endTimer.on(`change`,e=>this._handleTimerChange(e)),this.child(this._startTimer,this._endTimer,this._errorMessage),this._setupTimerRange(e)}mode(e){return e===void 0?this._startTimer.mode():(this._startTimer.mode(e),this._endTimer.mode(e),this)}name(e){return e===void 0?this._name:(this._name=J(e),this._startTimer.attr(`name`,this._name?`${this._name}Start`:null),this._endTimer.attr(`name`,this._name?`${this._name}End`:null),this)}start(e){return e===void 0?this._startTimer.value():(this._startTimer.value(e),this._validate(),this)}end(e){return e===void 0?this._endTimer.value():(this._endTimer.value(e),this._validate(),this)}value(e){if(e===void 0)return{start:this.start(),end:this.end()};let[t,n]=Array.isArray(e)?e:[e?.start??``,e?.end??``];return this.start(t),this.end(n),this}disabled(e){return e===void 0?this._startTimer.disabled():(this._startTimer.disabled(e),this._endTimer.disabled(e),this)}readonly(e){return e===void 0?this._startTimer.readonly():(this._startTimer.readonly(e),this._endTimer.readonly(e),this)}required(e){return e===void 0?this._startTimer.required():(this._startTimer.required(e),this._endTimer.required(e),this)}_setupTimerRange(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{disabled:t,end:n,mode:r,name:i,readonly:a,required:o,start:s,value:c,...l}=e;Object.keys(l).length>0&&this.setup(l),r!==void 0&&this.mode(r),i!==void 0&&this.name(i),c===void 0?this.value({start:s,end:n}):this.value(c),o!==void 0&&this.required(o),a!==void 0&&this.readonly(a),t!==void 0&&this.disabled(t);return}this.value(e)}}_handleTimerChange(e){if(e.stopPropagation(),this._validate(),this._el){let e=this._el.ownerDocument.defaultView.CustomEvent;this._el.dispatchEvent(new e(`change`,{bubbles:!0,detail:this.value()}))}}hydrateSnapshot(){return this._startTimer.hydrateSnapshot?.(),this._endTimer.hydrateSnapshot?.(),this._validate(),this}_validate(){let{start:e,end:t}=this.value(),n=!!(e&&t&&t<e);return this.attr(`data-error`,n?`true`:null),this.attr(`data-invalid`,n?`true`:null),this.attr(`aria-invalid`,n?`true`:null),this._startTimer.error(n),this._endTimer.error(n),this._startTimer.attr(`aria-invalid`,n?`true`:null),this._endTimer.attr(`aria-invalid`,n?`true`:null),this._errorText.textContent(n?`结束值不能早于开始值`:``),!n}},qo=class extends P{constructor(e=null){super(`div`,null),this._value=``,this._clearable=!0,this._clearButton=Ho(`yoya-vtextarea-clear`,{right:`6px`,top:`6px`}),this._input=new P(`textarea`).className(L,`yoya-vtextarea`).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`6px`,boxSizing:`border-box`,color:R(`color-text`,`#172033`),font:`inherit`,minHeight:`88px`,outline:`none`,padding:`10px 12px`,resize:`vertical`,width:`100%`}),this._addRootClass(L,`yoya-vtextarea-wrap`),this.styles({minWidth:`0`,position:`relative`,width:`100%`}),this._clearButton.on(`click`,e=>{e.preventDefault(),e.stopPropagation(),this.clear(),this._input._el?.focus()}),this._input.on(`input`,()=>this._syncClear()),this._input.on(`change`,()=>this._syncClear()),this.child(this._input,this._clearButton),this._setupTextarea(e),this._syncClearPadding(),this._syncClear()}_addRootClass(...e){return super.className(...e),this}className(...e){return e.length===0?this._input.className():(this._input.className(...e),this)}attr(e,t){return e&&typeof e==`object`?(Object.entries(e).forEach(([e,t])=>this.attr(e,t)),this):e===`value`?t===void 0?this.value():this.value(t):t===void 0?this._input.attr(e):(this._input.attr(e,t),this)}on(e,t,n){return this._input&&(e===`focus`||e===`blur`)?(this._input.on(e,t,n),this):super.on(e,t,n)}id(e){return e===void 0?this._input.id():(this._input.id(e),this)}name(e){return e===void 0?this._input.name():(this._input.name(e),this)}textContent(){return this._input.textContent()}value(e){if(e===void 0)return this._input._el?.value??this._value??this._input.textContent();let t=J(e);return this._value=t,G(this._input,t?W(t):[]),this._input._el&&(this._input._el.value=t),this._syncClear(),this}hydrateSnapshot(){return this._input._el&&this.value(this._input._el.value),this}text(e){return this.value(e)}content(e){return this.value(e)}placeholder(e){if(e===void 0)return this._input.attr(`placeholder`);let t=J(e);return this._input.attr(`placeholder`,t||null),this}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this._input.attr(`disabled`,t?!0:null),this._input.style(`cursor`,t?`not-allowed`:`text`),this._input.style(`opacity`,t?`0.64`:`1`),this._syncClear(),this}readonly(e){if(e===void 0)return this.getBooleanState(`readonly`);let t=!!e;return this.setState(`readonly`,t),this._input.attr(`readonly`,t?!0:null),this._syncClear(),this}required(e){if(e===void 0)return this.getBooleanState(`required`);let t=!!e;return this.setState(`required`,t),this._input.attr(`required`,t?!0:null),this}error(e){if(e===void 0)return this.getBooleanState(`error`);let t=!!e;return this.setState(`error`,t),this._input.attr(`data-error`,t?`true`:null),this._input.style(`borderColor`,t?R(`color-danger`,`#dc2626`):R(`color-border-strong`,`#cbd5e1`)),this._input.style(`boxShadow`,t?`0 0 0 1px ${R(`color-danger-ring`,`rgba(220, 38, 38, 0.2)`)}`:null),this}rows(e){return e===void 0?this._input.attr(`rows`):(this._input.attr(`rows`,e),this)}clearable(e){return e===void 0?this._clearable:(this._clearable=!!e,this._input.attr(`data-clearable`,this._clearable?`true`:null),this._syncClearPadding(),this._syncClear(),this)}clear(){return this.value(``),this._input._el&&(this._input._el.dispatchEvent(new Event(`input`,{bubbles:!0})),this._input._el.dispatchEvent(new Event(`change`,{bubbles:!0}))),this}_syncClear(){return Uo(this,this._input,this._clearButton),this}_syncClearPadding(){return this._input.style(`paddingRight`,this._clearable?`34px`:`12px`),this}_setupTextarea(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{clearable:t,children:n,content:r,disabled:i,error:a,placeholder:o,readonly:s,required:c,rows:l,text:u,value:d,...f}=e;Object.keys(f).length>0&&this.setup(f),l!==void 0&&this.rows(l),o!==void 0&&this.placeholder(o),d===void 0?u===void 0?r===void 0?n!==void 0&&this.value(n):this.value(r):this.value(u):this.value(d),c!==void 0&&this.required(c),s!==void 0&&this.readonly(s),i!==void 0&&this.disabled(i),a!==void 0&&this.error(a),t!==void 0&&this.clearable(t);return}this.value(e)}}},Jo=class extends P{constructor(e=null){super(`div`,null),this._options=[],this._placeholder=``,this._value=``,this._clearable=!0,this._clearButton=Ho(`yoya-vselect-clear`,{right:`30px`,top:`50%`,transform:`translateY(-50%)`}),this._input=new P(`select`).className(L,`yoya-vselect`).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`6px`,boxSizing:`border-box`,color:R(`color-text`,`#172033`),cursor:`pointer`,font:`inherit`,minHeight:`var(--yoya-control-height-md, 34px)`,outline:`none`,padding:`0 32px 0 12px`,width:`100%`}),this._addRootClass(L,`yoya-vselect-wrap`),this.styles({minWidth:`0`,position:`relative`,width:`100%`}),this._clearButton.on(`click`,e=>{e.preventDefault(),e.stopPropagation(),this.clear(),this._input._el?.focus()}),this._input.on(`change`,()=>this._syncClear()),this.child(this._input,this._clearButton),this._setupSelect(e),this._syncClearPadding(),this._syncClear()}_addRootClass(...e){return super.className(...e),this}className(...e){return e.length===0?this._input.className():(this._input.className(...e),this)}attr(e,t){return e&&typeof e==`object`?(Object.entries(e).forEach(([e,t])=>this.attr(e,t)),this):e===`value`?t===void 0?this.value():this.value(t):t===void 0?this._input.attr(e):(this._input.attr(e,t),this)}on(e,t,n){return this._input&&(e===`focus`||e===`blur`)?(this._input.on(e,t,n),this):super.on(e,t,n)}id(e){return e===void 0?this._input.id():(this._input.id(e),this)}name(e){return e===void 0?this._input.name():(this._input.name(e),this)}textContent(){return this._input.textContent()}value(e){return e===void 0?this._input._el?.value??this._value??``:(this._value=J(e),this._renderOptions(),this._syncClear(),this)}hydrateSnapshot(){return this._input._el&&this.value(this._input._el.value),this}text(e){return this.value(e)}content(e){return this.value(e)}placeholder(e){return e===void 0?this._placeholder:(this._placeholder=J(e),this._renderOptions(),this)}options(e){return e===void 0?this._options.slice():(this._options=Array.isArray(e)?e.slice():[],this._renderOptions(),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this._input.attr(`disabled`,t?!0:null),this._input.style(`cursor`,t?`not-allowed`:`pointer`),this._input.style(`opacity`,t?`0.64`:`1`),this._syncClear(),this}required(e){if(e===void 0)return this.getBooleanState(`required`);let t=!!e;return this.setState(`required`,t),this._input.attr(`required`,t?!0:null),this}error(e){if(e===void 0)return this.getBooleanState(`error`);let t=!!e;return this.setState(`error`,t),this._input.attr(`data-error`,t?`true`:null),this._input.style(`borderColor`,t?R(`color-danger`,`#dc2626`):R(`color-border-strong`,`#cbd5e1`)),this._input.style(`boxShadow`,t?`0 0 0 1px ${R(`color-danger-ring`,`rgba(220, 38, 38, 0.2)`)}`:null),this}clearable(e){return e===void 0?this._clearable:(this._clearable=!!e,this._input.attr(`data-clearable`,this._clearable?`true`:null),this._renderOptions(),this._syncClearPadding(),this._syncClear(),this)}clear(){return this.value(``),this._input._el&&this._input._el.dispatchEvent(new Event(`change`,{bubbles:!0})),this}_syncClear(){return Uo(this,this._input,this._clearButton),this}_syncClearPadding(){return this._input.style(`paddingRight`,this._clearable?`52px`:`32px`),this}_renderOptions(){let e=[],t=J(this._value);if(this._placeholder){let n=new P(`option`).className(`yoya-vselect-option`);n.attr({disabled:!0,value:``}),n.attr(`selected`,!t||null),n.styles({color:R(`color-border-muted`,`#94a3b8`)}),G(n,W(this._placeholder)),e.push(n)}else if(this._clearable&&!t){let t=new P(`option`).className(`yoya-vselect-option`).attr({selected:!0,value:``}).styles({color:R(`color-border-muted`,`#94a3b8`)});e.push(t)}this._options.forEach((n,r)=>{e.push(Ss(n,t,r))}),G(this._input,e),this._input._el&&(this._input._el.value=t)}_setupSelect(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{clearable:t,children:n,content:r,disabled:i,error:a,options:o,placeholder:s,required:c,text:l,value:u,...d}=e;Object.keys(d).length>0&&this.setup(d),s!==void 0&&this.placeholder(s),o!==void 0&&this.options(o),u===void 0?l===void 0?r===void 0?n!==void 0&&this.value(n):this.value(r):this.value(l):this.value(u),c!==void 0&&this.required(c),i!==void 0&&this.disabled(i),a!==void 0&&this.error(a),t!==void 0&&this.clearable(t);return}this.value(e)}}},Yo=class extends P{constructor(e){super(`label`,null),this._kind=e,this._optionValue=`on`,this._input=new P(`input`).className(`yoya-v${e}-input`),this._visualBox=new P(`span`).className(`yoya-v${e}-visual`),this._contentBox=new P(`span`).className(`yoya-v${e}-content`),this._labelBox=new P(`span`).className(`yoya-v${e}-label`),this._descriptionBox=new P(`span`).className(`yoya-v${e}-description`).style(`display`,`none`),this.className(L,`yoya-v${e}`),this.styles({alignItems:`center`,cursor:`pointer`,display:`inline-grid`,gap:`10px`,gridTemplateColumns:`auto minmax(0, 1fr)`,position:`relative`}),this._input.attr(`type`,`checkbox`),this._input.styles({height:`1px`,margin:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,width:`1px`}),this._contentBox.styles({display:`grid`,gap:`2px`,minWidth:`0`}),this._labelBox.styles({color:R(`color-text`,`#172033`),fontWeight:`600`,lineHeight:`1.35`}),this._descriptionBox.styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`,lineHeight:`1.45`}),this._contentBox.child(this._labelBox,this._descriptionBox),this.child(this._visualBox,this._input,this._contentBox),this._input.on(`change`,e=>{this.getBooleanState(`disabled`)||this.checked(!!e.target?.checked)})}label(e){return e===void 0?this._labelBox.textContent():(G(this._labelBox,W(e)),this)}text(e){return this.label(e)}content(e){return this.label(e)}description(e){if(e===void 0)return this._descriptionBox.textContent();let t=e!=null&&e!==``;return this._descriptionBox.style(`display`,t?null:`none`),G(this._descriptionBox,t?W(e):[]),this}checked(e){if(e===void 0)return this.getBooleanState(`checked`);let t=!!e;return this.setState(`checked`,t),this.attr(`data-checked`,t?`true`:null),this._input.attr(`checked`,t?!0:null),this._syncVisual(t),this}value(e){return e===void 0?this.checked():this.checked(e)}optionValue(e){return e===void 0?this._optionValue:(this._optionValue=J(e)||`on`,this._input.attr(`value`,this._optionValue),this)}name(e){return e===void 0?this._input.name():(this._input.name(e),this.attr(`data-name`,e??null),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this._input.attr(`disabled`,t?!0:null),this.attr(`aria-disabled`,t?`true`:null),this.style(`opacity`,t?`0.64`:`1`),this}required(e){if(e===void 0)return this.getBooleanState(`required`);let t=!!e;return this.setState(`required`,t),this._input.attr(`required`,t?!0:null),this}indeterminate(e){if(e===void 0)return this.getBooleanState(`indeterminate`);let t=!!e;return this.setState(`indeterminate`,t),this._input._el&&(this._input._el.indeterminate=t),this}hydrateSnapshot(){return this._input._el&&this.checked(this._input._el.checked),this}_setupBoolean(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{checked:t,children:n,content:r,description:i,disabled:a,label:o,name:s,optionValue:c,required:l,text:u,value:d,...f}=e;Object.keys(f).length>0&&this.setup(f),o===void 0?u===void 0?r===void 0?n!==void 0&&this.label(n):this.content(r):this.text(u):this.label(o),i!==void 0&&this.description(i),s!==void 0&&this.name(s),c===void 0?d!==void 0&&typeof d!=`boolean`&&this.optionValue(d):this.optionValue(c),t===void 0?d!==void 0&&typeof d==`boolean`&&this.checked(d):this.checked(t),l!==void 0&&this.required(l),a!==void 0&&this.disabled(a);return}if(e instanceof l||Array.isArray(e)||typeof e==`string`||typeof e==`number`){this.label(e);return}this.label(e)}}_syncVisual(){}},Z=class extends Yo{constructor(e=null){super(`checkbox`),this._visualBox.styles({alignItems:`center`,background:R(`color-surface`,`#ffffff`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`4px`,boxSizing:`border-box`,color:R(`color-text-inverse`,`#ffffff`),display:`inline-flex`,height:`16px`,justifyContent:`center`,lineHeight:`1`,transition:`background 120ms ease, border-color 120ms ease`,width:`16px`}),this._syncVisual(!1),this._setupBoolean(e)}_syncVisual(e){this._visualBox.styles({background:e?R(`color-primary`,`#2563eb`):R(`color-surface`,`#ffffff`),borderColor:e?R(`color-primary`,`#2563eb`):R(`color-border-strong`,`#cbd5e1`),color:e?R(`color-text-inverse`,`#ffffff`):`transparent`}),G(this._visualBox,e?W(`✓`):[])}},Xo=class extends Yo{constructor(e=null){super(`switch`),this._thumbBox=new P(`span`).className(`yoya-vswitch-thumb`),this._visualBox.styles({background:R(`color-border-strong`,`#cbd5e1`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`999px`,boxSizing:`border-box`,display:`inline-flex`,height:`22px`,padding:`2px`,position:`relative`,transition:`background 120ms ease, border-color 120ms ease`,width:`40px`}),this._thumbBox.styles({background:R(`color-surface`,`#ffffff`),borderRadius:`999px`,boxShadow:`0 1px 2px rgba(15, 23, 42, 0.18)`,height:`16px`,transform:`translateX(0)`,transition:`transform 120ms ease`,width:`16px`}),this._visualBox.child(this._thumbBox),this._syncVisual(!1),this._setupBoolean(e)}_syncVisual(e){this._visualBox.styles({background:e?R(`color-primary`,`#2563eb`):R(`color-border-strong`,`#cbd5e1`),borderColor:e?R(`color-primary`,`#2563eb`):R(`color-border-strong`,`#cbd5e1`)}),this._thumbBox.style(`transform`,e?`translateX(18px)`:`translateX(0)`)}},Zo=class extends P{constructor(e=null){super(`div`,null),this._name=``,this._multiple=!0,this._required=!1,this._items=[],this._options=[],this.className(L,`yoya-vcheckboxes`),this.styles({display:`grid`,gap:`8px`,minWidth:`0`}),this._setupCheckboxes(e)}name(e){return e===void 0?this._name:(this._name=J(e),this.attr(`data-name`,this._name||null),this)}multiple(e){if(e===void 0)return this._multiple;let t=this.value();return this._multiple=!!e,this._multiple||(Array.isArray(t)?this.value(t[0]??null):this.value(t)),this}required(e){return e===void 0?this._required:(this._required=!!e,this.attr(`data-required`,this._required?`true`:null),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this.attr(`aria-disabled`,t?`true`:null),this.style(`opacity`,t?`0.64`:`1`),this._items.forEach(e=>e.disabled(t)),this}options(e){return e===void 0?this._options.slice():(this._options=Array.isArray(e)?e.slice():[],this._renderOptions(),this)}value(e){if(e===void 0){let e=this._items.filter(e=>e.checked()).map(e=>e.optionValue());return this._multiple?e:e[0]??null}let t=bs(e),n=this._multiple?t:t.slice(0,1);return this._items.forEach(e=>{let t=J(e.optionValue());e.checked(n.includes(t))}),this}checkedValues(e){return e===void 0?this.value():this.value(e)}clear(){return this.value(this._multiple?[]:null)}_renderOptions(){let e=this._options.map((e,t)=>ws(e,t));this._items=e,G(this,e),this._items.forEach(e=>{e.on(`change`,()=>this._handleItemChange(e)),this._name&&e.attr(`data-group-name`,this._name)}),this.value(this.value())}_handleItemChange(e){!this._multiple&&e.checked()&&this._items.forEach(t=>{t!==e&&t.checked(!1)})}_setupCheckboxes(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,disabled:n,multiple:r,name:i,options:a,required:o,value:s,...c}=e;Object.keys(c).length>0&&this.setup(c),i!==void 0&&this.name(i),r!==void 0&&this.multiple(r),a===void 0?t!==void 0&&this.options(t):this.options(a),o!==void 0&&this.required(o),n!==void 0&&this.disabled(n),s!==void 0&&this.value(s);return}if(Array.isArray(e)){this.options(e);return}this.options([e])}}},Q=class extends Yo{constructor(e=null){super(`radio`),this._input.attr(`type`,`radio`),this._visualBox.styles({alignItems:`center`,background:R(`color-surface`,`#ffffff`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`999px`,boxSizing:`border-box`,display:`inline-flex`,height:`16px`,justifyContent:`center`,lineHeight:`1`,transition:`background 120ms ease, border-color 120ms ease`,width:`16px`}),this._syncVisual(!1),this._setupBoolean(e),$o(this)}name(e){if(e===void 0)return super.name();es(this);let t=super.name(e);return $o(this),t}checked(e){return e!==void 0&&e&&this.name()&&Qo.get(this.name())?.forEach(e=>{e!==this&&e.checked()&&e.checked(!1)}),super.checked(e)}destroy(){return es(this),super.destroy()}_syncVisual(e){this._visualBox.styles({borderColor:e?R(`color-primary`,`#2563eb`):R(`color-border-strong`,`#cbd5e1`)}),G(this._visualBox,e?[ts()]:[])}},Qo=new Map;function $o(e){let t=e.name();if(!t)return;let n=Qo.get(t);n||(n=new Set,Qo.set(t,n)),n.add(e)}function es(e){let t=e.name();if(!t)return;let n=Qo.get(t);n?.delete(e),n&&n.size===0&&Qo.delete(t)}function ts(){return new P(`span`).className(`yoya-vradio-dot`).styles({background:R(`color-primary`,`#2563eb`),borderRadius:`999px`,height:`8px`,width:`8px`})}var ns=class extends P{constructor(e=null){super(`div`,null),this._name=``,this._required=!1,this._changeHandler=null,this._items=[],this._options=[],this.className(L,`yoya-vradios`),this.styles({display:`grid`,gap:`8px`,minWidth:`0`}),this._setupRadios(e)}name(e){return e===void 0?this._name:(this._name=J(e),this.attr(`data-name`,this._name||null),this._items.forEach(e=>e.name(this._name)),this)}required(e){return e===void 0?this._required:(this._required=!!e,this.attr(`data-required`,this._required?`true`:null),this)}disabled(e){if(e===void 0)return this.getBooleanState(`disabled`);let t=!!e;return this.setState(`disabled`,t),this.attr(`aria-disabled`,t?`true`:null),this.style(`opacity`,t?`0.64`:`1`),this._items.forEach(e=>e.disabled(t)),this}change(e){return e===void 0?this._changeHandler:(this._changeHandler=typeof e==`function`?e:null,this)}options(e){return e===void 0?this._options.slice():(this._options=Array.isArray(e)?e.slice():[],this._renderOptions(),this)}value(e){if(e===void 0){let e=this._items.find(e=>e.checked());return e?e.optionValue():null}let t=e==null?null:String(J(e));return this._items.forEach(e=>{e.checked(String(e.optionValue())===t)}),this}checkedValue(e){return this.value(e)}clear(){return this.value(null)}_renderOptions(){let e=this._options.map((e,t)=>Es(e,t));this._items=e,G(this,e),this._items.forEach(e=>{e.on(`change`,()=>this._handleItemChange(e)),this._name&&e.name(this._name)}),this.value(this.value())}_handleItemChange(e){e.checked()&&(this._items.forEach(t=>{t!==e&&t.checked(!1)}),typeof this._changeHandler==`function`&&this._changeHandler(e.optionValue(),this))}_setupRadios(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,change:n,disabled:r,name:i,options:a,required:o,value:s,...c}=e;Object.keys(c).length>0&&this.setup(c),i!==void 0&&this.name(i),n!==void 0&&this.change(n),a===void 0?t!==void 0&&this.options(t):this.options(a),o!==void 0&&this.required(o),r!==void 0&&this.disabled(r),s!==void 0&&this.value(s);return}if(Array.isArray(e)){this.options(e);return}this.options([e])}}},rs=class extends P{constructor(e=null){super(`div`,null),this._mode=`view`,this._control=null,this._hintVisible=!1,this._hovered=!1,this._headerBox=new P(`div`).className(`yoya-vfield-header`),this._displayBox=new P(`div`).className(`yoya-vfield-display`),this._editorBox=new P(`div`).className(`yoya-vfield-editor`).style(`display`,`none`),this._labelBox=new P(`div`).className(`yoya-vfield-label`),this._hintBox=new P(`div`).className(`yoya-vfield-hint`).style(`display`,`none`),this._errorBox=new P(`div`).className(`yoya-vfield-error`).style(`display`,`none`),this._actionButton=new ia(`✎`).className(`yoya-vfield-action`).size(`small`).variant(`secondary`).attr({tabindex:`-1`,"aria-hidden":`true`}).on(`click`,e=>{e.preventDefault(),e.stopPropagation(),this.mode(this._mode===`edit`?`view`:`edit`)}),this.className(L,`yoya-vfield`),this.styles({display:`grid`,gap:`8px`,minWidth:`0`}),this._headerBox.styles({alignItems:`center`,display:`flex`,gap:`8px`,justifyContent:`space-between`,minWidth:`0`}),this._labelBox.styles({color:R(`color-text-strong`,`#111827`),flex:`1 1 auto`,fontWeight:`700`,lineHeight:`1.35`}),this._displayBox.styles({border:z(`color-border`,`#d8dee8`),borderRadius:`6px`,color:R(`color-text`,`#172033`),minHeight:`var(--yoya-control-height-md, 34px)`,padding:`8px 12px`}),this._editorBox.styles({minWidth:`0`}),this._hintBox.styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`,lineHeight:`1.45`}),this._errorBox.styles({color:R(`color-text-danger`,`#b91c1c`),fontSize:`12px`,lineHeight:`1.45`}),this._actionButton.styles({flexShrink:`0`,gap:`0`,minWidth:`32px`,opacity:`0`,pointerEvents:`none`,transition:`opacity 120ms ease`}),this._headerBox.child(this._labelBox,this._actionButton),this.child(this._headerBox,this._displayBox,this._editorBox,this._hintBox,this._errorBox),this.on(`mouseenter`,()=>{this._hovered=!0,this._syncActionButton()}),this.on(`mouseleave`,()=>{this._hovered=!1,this._syncActionButton()}),this._setupField(e),this._syncActionButton()}label(e){return e===void 0?this._labelBox.textContent():(G(this._labelBox,W(e)),this)}hint(e){if(e===void 0)return this._hintBox.textContent();let t=e!=null&&e!==``;return this._hintVisible=t,this._hintBox.style(`display`,this._hintVisible?null:`none`),G(this._hintBox,t?W(e):[]),this}error(e){if(e===void 0)return this._errorBox.textContent();let t=e!=null&&e!==``;return this._errorBox.style(`display`,t?null:`none`),this.attr(`data-error`,t?`true`:null),this._hintBox.style(`display`,t?`none`:this._hintVisible?null:`none`),G(this._errorBox,t?W(e):[]),this}display(e){return e===void 0?this._displayBox.textContent():(G(this._displayBox,W(e)),this)}control(e){return e===void 0?this._control??Fs(this._editorBox):(K(this._editorBox,e),this._control=Fs(this._editorBox),this._mode===`view`&&this._syncDisplayFromControl(),this._syncActionButton(),this)}editor(e){return this.control(e)}value(e){let t=this.control();return e===void 0?t?Os(t):this._displayBox.textContent():(t?ks(t,e):this.display(e),this._mode===`view`&&this._syncDisplayFromControl(),this)}mode(e){return e===void 0?this._mode:(this._mode=e===`edit`?`edit`:`view`,this.attr(`data-mode`,this._mode),this._mode===`edit`?(this._displayBox.style(`display`,`none`),this._editorBox.style(`display`,null)):(this._editorBox.style(`display`,`none`),this._displayBox.style(`display`,null),this._syncDisplayFromControl()),this._syncActionButton(),this)}view(){return this.mode(`view`)}edit(){return this.mode(`edit`)}_syncDisplayFromControl(){let e=this.control();if(!e)return this;let t=Os(e);return G(this._displayBox,W(ys(t))),this}_syncActionButton(){if(!this._actionButton)return this;let e=!!this.control()&&(this._hovered||this._mode===`edit`),t=this._mode===`edit`?`完成`:`编辑`,n=this._mode===`edit`?`✓`:`✎`;return this._actionButton.label(n),this._actionButton.attr({"aria-hidden":e?null:`true`,"aria-label":t,title:t}),this._actionButton.attr(`tabindex`,e?null:`-1`),this._actionButton.style(`opacity`,e?`1`:`0`),this._actionButton.style(`pointerEvents`,e?null:`none`),this}_setupField(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,control:n,display:r,editor:i,error:a,hint:o,label:s,mode:c,value:l,...u}=e;Object.keys(u).length>0&&this.setup(u),s!==void 0&&this.label(s),o!==void 0&&this.hint(o),r!==void 0&&this.display(r),i===void 0?n===void 0?t!==void 0&&this.editor(t):this.control(n):this.editor(i),l!==void 0&&this.value(l),a!==void 0&&this.error(a),c!==void 0&&this.mode(c);return}this.display(e)}}},is=class extends P{constructor(e=null){super(`div`,null),this._collectValue=null,this._fallbackMessage=`校验未通过`,this._hintVisible=!1,this._name=``,this._required=!1,this._requiredIndicatorContent=null,this._requiredMessage=`该项为必填`,this._validators=[],this._labelBox=new P(`label`).className(`yoya-vform-item-label`),this._requiredIndicator=new P(`span`).className(`yoya-vform-item-required-indicator`).style(`display`,`none`),this._labelRow=new P(`div`).className(`yoya-vform-item-label-row`),this._editorBox=new P(`div`).className(`yoya-vform-item-editor`),this._hintBox=new P(`div`).className(`yoya-vform-item-hint`).style(`display`,`none`),this._errorBox=new P(`div`).className(`yoya-vform-item-error`).style(`display`,`none`),this.className(L,`yoya-vform-item`),this.styles({display:`grid`,gap:`6px`,minWidth:`0`}),this._labelBox.styles({color:R(`color-text-strong`,`#111827`),fontWeight:`700`,lineHeight:`1.35`}),this._requiredIndicator.styles({color:R(`color-danger`,`#dc2626`),fontWeight:`700`,lineHeight:`1.35`}),this._labelRow.styles({alignItems:`center`,display:`flex`,gap:`4px`,minWidth:`0`}),this._editorBox.styles({minWidth:`0`}),this._hintBox.styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`,lineHeight:`1.45`}),this._errorBox.styles({color:R(`color-text-danger`,`#b91c1c`),fontSize:`12px`,lineHeight:`1.45`}),this._labelRow.child(this._requiredIndicator,this._labelBox),this.child(this._labelRow,this._editorBox,this._hintBox,this._errorBox),this._editorBox.collectValue=e=>e===void 0?this._collectValue:(this._collectValue=typeof e==`function`?e:null,this._editorBox._collectValue=this._collectValue,this._editorBox),this._editorBox.on(`input`,()=>this.error(``)),this._editorBox.on(`change`,()=>this.error(``)),this._setupFormItem(e)}name(e){return e===void 0?this._name:(this._name=J(e),this)}label(e){return e===void 0?this._labelBox.textContent():(G(this._labelBox,W(e)),this)}hint(e){if(e===void 0)return this._hintBox.textContent();let t=e!=null&&e!==``;return this._hintVisible=t,this._hintBox.style(`display`,this._hintVisible?null:`none`),G(this._hintBox,t?W(e):[]),this}error(e){if(e===void 0)return this._errorBox.textContent();let t=e!=null&&e!==``;return this._errorBox.style(`display`,t?null:`none`),this.attr(`data-error`,t?`true`:null),this._hintBox.style(`display`,t?`none`:this._hintVisible?null:`none`),G(this._errorBox,t?W(e):[]),this}control(e){return e===void 0?this._editorBox:(K(this._editorBox,e),this)}editor(e){return this.control(e)}required(e=!0,t){if(e===void 0)return this._required;let n=null;return typeof e==`string`?(this._required=!0,this._requiredMessage=e,q(t)?n=t.indicator??null:t!==void 0&&(n=t)):q(e)?(this._required=!0,e.message!==void 0&&(this._requiredMessage=J(e.message)),n=e.indicator??null):(this._required=!!e,q(t)?(t.message!==void 0&&(this._requiredMessage=J(t.message)),n=t.indicator??null):t!==void 0&&(n=t)),this._requiredIndicatorContent=n??null,this._syncRequiredIndicator(),this.attr(`data-required`,this._required?`true`:null),this}_syncRequiredIndicator(){let e=this._requiredIndicatorContent!==null&&this._requiredIndicatorContent!==void 0&&this._requiredIndicatorContent!==``;return this._requiredIndicator.style(`display`,e?null:`none`),G(this._requiredIndicator,e?W(this._requiredIndicatorContent):[]),this}validate(e){return e===void 0?this._validators.slice():(typeof e==`function`&&this._validators.push(e),this)}rules(e){return Array.isArray(e)&&e.forEach(e=>this.validate(e)),this}value(e){return e===void 0?Os(this._editorBox):(ks(this._editorBox,e),this)}_validate(e){let t=Fs(this._editorBox),n=this.value();if(this._required&&xs(n,t))return this.error(this._requiredMessage),!1;for(let t of this._validators){let r=t(n,e,this);if(typeof r==`string`&&r)return this.error(r),!1;if(r===!1)return this.error(this._fallbackMessage),!1}return this.error(``),!0}_setupFormItem(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,control:n,editor:r,error:i,hint:a,label:o,name:s,required:c,rules:l,validate:u,value:d,...f}=e;Object.keys(f).length>0&&this.setup(f),s!==void 0&&this.name(s),o!==void 0&&this.label(o),a!==void 0&&this.hint(a),r===void 0?n===void 0?t!==void 0&&this.editor(t):this.control(n):this.editor(r),c!==void 0&&this.required(c),u!==void 0&&this.validate(u),l!==void 0&&this.rules(l),d!==void 0&&this.value(d),i!==void 0&&this.error(i);return}this.label(e)}}},as=class extends P{constructor(e=null){super(`form`,null),this.className(L,`yoya-vform`),this.styles({display:`grid`,gap:`16px`,minWidth:`0`}),this._setupForm(e)}values(e){if(e===void 0){let e={};return As(this,e),e}return q(e)&&js(this,e),this}value(e){return this.values(e)}validate(){let e=this.values();return Ms(this,e)}reset(){return this._el?.reset&&this._el.reset(),this}submit(){return this._el?.requestSubmit?this._el.requestSubmit():this._el?.dispatchEvent&&this._el.dispatchEvent(new Event(`submit`,{bubbles:!0,cancelable:!0})),this}_setupForm(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,values:n,...r}=e;Object.keys(r).length>0&&this.setup(r),t!==void 0&&U(this,t),n!==void 0&&this.values(n);return}this.child(e)}}};function os(e=null,t=null,n=null){return H(Wo,e,t,n)}function ss(e=null,t=null,n=null){return H(Go,e,t,n)}function cs(e=null,t=null,n=null){return H(Ko,e,t,n)}function ls(e=null,t=null,n=null){return H(qo,e,t,n)}function us(e=null,t=null,n=null){return H(Jo,e,t,n)}function ds(e=null,t=null,n=null){return H(Z,e,t,n)}function fs(e=null,t=null,n=null){return H(Xo,e,t,n)}function ps(e=null,t=null,n=null){return H(Zo,e,t,n)}function ms(e=null,t=null,n=null){return H(Q,e,t,n)}function hs(e=null,t=null,n=null){return H(ns,e,t,n)}function gs(e=null,t=null,n=null){return H(rs,e,t,n)}function _s(e=null,t=null,n=null){return H(is,e,t,n)}function vs(e=null,t=null,n=null){return H(as,e,t,n)}v(P,{vCheckbox:ds,vCheckboxes:ps,vField:gs,vForm:vs,vFormItem:_s,vInput:os,vRadio:ms,vRadios:hs,vSelect:us,vSwitch:fs,vTimer:ss,vTimerRange:cs,vTextarea:ls});function ys(e){return Array.isArray(e)?e.map(e=>J(e)).join(`, `):typeof e==`boolean`?e?`true`:`false`:J(e)}function bs(e){return e==null||e===``?[]:Array.isArray(e)?e.map(e=>J(e)):[J(e)]}function xs(e,t=null){return t instanceof Do&&e===0||e==null||e===``?!0:Array.isArray(e)?e.length===0:!1}function Ss(e,t,n){if(e instanceof P&&e.tagName?.()===`option`){let n=e;return n.attr(`selected`,J(n.attr(`value`))===t||null),n}let r=Cs(e,n),i=new P(`option`).className(`yoya-vselect-option`),a=r.value===t;return i.attr(`value`,r.value),i.attr(`selected`,a?!0:null),r.disabled&&i.attr(`disabled`,!0),a&&i.styles({color:R(`color-text`,`#172033`)}),G(i,W(r.label)),i}function Cs(e,t){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`){let t=J(e);return{label:t,value:t}}if(Array.isArray(e)&&e.length>0){let[t,n=t]=e;return{label:n??t??``,value:J(t)}}if(e instanceof l)return{label:e,value:e.textContent()};if(q(e)){let n=e.value??e.key??e.id??e.label??e.text??e.title??`option-${t}`,r=e.label??e.text??e.content??e.title??n;return{disabled:!!e.disabled,label:r,value:J(n)}}let n=J(e);return{label:n,value:n}}function ws(e,t){if(e instanceof Z)return e;if(e instanceof l&&!(e instanceof P))return ds(e);let n=Ts(e,t);return new Z({checked:n.checked,description:n.description,disabled:n.disabled,label:n.label,optionValue:n.value,required:n.required})}function Ts(e,t){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`){let t=J(e);return{label:t,value:t}}if(Array.isArray(e)&&e.length>0){let[t,n=t]=e;return{label:n??t??``,value:J(t)}}if(e instanceof Z)return{checked:e.checked(),description:e.description(),disabled:e.disabled(),label:e.label(),required:e.required(),value:e.optionValue()};if(e instanceof l)return{label:e,value:e.textContent()};if(q(e)){let n=e.value??e.key??e.id??e.label??e.text??`option-${t}`,r=e.label??e.text??e.content??e.title??n;return{checked:!!e.checked,description:e.description,disabled:!!e.disabled,label:r,required:!!e.required,value:J(n)}}let n=J(e);return{label:n,value:n}}function Es(e,t){if(e instanceof Q)return e;if(e instanceof l&&!(e instanceof P))return ms(e);let n=Ds(e,t);return new Q({checked:n.checked,description:n.description,disabled:n.disabled,label:n.label,optionValue:n.value,required:n.required})}function Ds(e,t){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`){let t=J(e);return{label:t,value:t}}if(Array.isArray(e)&&e.length>0){let[t,n=t]=e;return{label:n??t??``,value:J(t)}}if(e instanceof Q)return{checked:e.checked(),description:e.description(),disabled:e.disabled(),label:e.label(),required:e.required(),value:e.optionValue()};if(e instanceof l)return{label:e,value:e.textContent()};if(q(e)){let n=e.value??e.key??e.id??e.label??e.text??`option-${t}`,r=e.label??e.text??e.content??e.title??n;return{checked:!!e.checked,description:e.description,disabled:!!e.disabled,label:r,required:!!e.required,value:J(n)}}let n=J(e);return{label:n,value:n}}function Os(e){if(!e)return;if(typeof e._collectValue==`function`)return e._collectValue();if(e instanceof Zo||e instanceof ns||e instanceof Do||e instanceof ko||e instanceof Mo||e instanceof Lo||e instanceof zo||e instanceof Z||e instanceof Xo||e instanceof Q||e instanceof Wo||e instanceof Jo||e instanceof qo)return e.value();let t=typeof e.tagName==`function`?e.tagName():``;if(t===`input`){let t=J(e.attr(`type`)||`text`).toLowerCase();return t===`checkbox`||t===`radio`?e._el?.checked??!!e.attr(`checked`):e._el?.value??e.attr(`value`)??``}if(t===`select`)return e._el?.value??e.attr(`value`)??``;if(t===`textarea`)return e._el?.value??e.textContent();if(typeof e.value==`function`)try{return e.value()}catch{return}if(typeof e.children==`function`)for(let t of e.children()){let e=Os(t);if(e!==void 0)return e}}function ks(e,t){if(!e)return;if(e instanceof Zo){e.value(t);return}if(e instanceof ns){e.value(t);return}if(e instanceof Do){e.value(t);return}if(e instanceof ko||e instanceof Mo||e instanceof Lo||e instanceof zo){e.value(t);return}if(e instanceof Z||e instanceof Xo||e instanceof Q){e.value(t);return}if(e instanceof Wo||e instanceof Jo||e instanceof qo){e.value(t);return}let n=typeof e.tagName==`function`?e.tagName():``;if(n===`textarea`){G(e,W(J(t))),e._el&&(e._el.value=J(t));return}if(n===`select`||n===`input`){let r=n===`input`?J(e.attr(`type`)||`text`).toLowerCase():``;r===`checkbox`||r===`radio`?e.attr(`checked`,t?!0:null):e.attr(`value`,J(Array.isArray(t)?t[0]:t));return}if(typeof e.value==`function`){e.value(t);return}if(typeof e.children==`function`){for(let n of e.children())if(Os(n)!==void 0||typeof n.value==`function`){ks(n,t);return}}}function As(e,t){if(!e||typeof e!=`object`)return t;if(e instanceof as||e instanceof rs)return e.children().forEach(e=>As(e,t)),t;if(e instanceof is){let n=e.name();return n&&Is(t,n,e.value()),t}if(e instanceof Zo){let n=e.name();return n&&Is(t,n,e.value()),t}if(e instanceof ns){let n=e.name();return n&&Is(t,n,e.value()),t}if(e instanceof Wo||e instanceof Jo||e instanceof qo||e instanceof Z||e instanceof Q||e instanceof Xo||e instanceof Do||e instanceof ko||e instanceof Mo||e instanceof Lo||e instanceof zo){let n=e.name();return n&&Is(t,n,Os(e)),t}let n=typeof e.tagName==`function`?e.tagName():``;if(n===`input`||n===`select`||n===`textarea`){let n=typeof e.name==`function`?e.name():e.attr?.(`name`);return n&&Is(t,n,Os(e)),t}return typeof e.children==`function`&&e.children().forEach(e=>As(e,t)),t}function js(e,t){if(!e||typeof e!=`object`||!q(t))return e;function n(e){if(!e||typeof e!=`object`)return;if(e instanceof rs||e instanceof as){e.children().forEach(e=>n(e));return}if(e instanceof is){let n=e.name();n&&Object.prototype.hasOwnProperty.call(t,n)&&e.value(t[n]);return}let r=typeof e.name==`function`?e.name():e.attr?.(`name`);if(r&&Object.prototype.hasOwnProperty.call(t,r)){ks(e,t[r]);return}typeof e.children==`function`&&e.children().forEach(e=>n(e))}return n(e),e}function Ms(e,t={}){let n=!0;function r(e){if(e){if(e instanceof is){e._validate(t)||(n=!1);return}if(e instanceof as||e instanceof rs){e.children().forEach(e=>r(e));return}if(e instanceof Zo||e instanceof ns||e instanceof Wo||e instanceof Jo||e instanceof qo||e instanceof Z||e instanceof Q||e instanceof Xo||e instanceof Do||e instanceof ko||e instanceof Mo||e instanceof Lo||e instanceof zo||typeof e.tagName==`function`&&[`input`,`select`,`textarea`].includes(e.tagName())){if(!Ps(e)&&Ns(e)){let t=Os(e);if(e instanceof Do&&t===0){n=!1;return}n=Array.isArray(t)?t.length>0:typeof t==`boolean`?t:t!=null&&String(t).length>0}return}typeof e.children==`function`&&e.children().forEach(e=>r(e))}}return r(e),n}function Ns(e){if(!e)return!1;if(typeof e.required==`function`)try{return!!e.required()}catch{return!1}return!!e.attr?.(`required`)}function Ps(e){if(!e)return!1;if(typeof e.disabled==`function`)try{return!!e.disabled()}catch{return!1}return!!e.attr?.(`disabled`)}function Fs(e){if(!e||typeof e!=`object`)return null;if(e instanceof Wo||e instanceof Jo||e instanceof qo||e instanceof Zo||e instanceof ns||e instanceof Z||e instanceof Q||e instanceof Xo||e instanceof Do||e instanceof ko||e instanceof Mo||e instanceof Lo||e instanceof zo)return e;if(typeof e.children!=`function`)return null;for(let t of e.children()){let e=Fs(t);if(e)return e}return null}function Is(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(Array.isArray(r)){Array.isArray(n)?e[t]=r.concat(n):r.push(n);return}e[t]=Array.isArray(n)?[r].concat(n):[r,n];return}e[t]=n}var Ls=class extends P{constructor(e=null){super(`div`,null),this._accept=``,this._disabled=!1,this._multiple=!1,this._name=``,this._files=[],this._input=new P(`input`).attr({tabindex:`-1`,type:`file`}).style(`display`,`none`),this._dropZone=new P(`div`).className(`yoya-vupload-dropzone`).attr({role:`button`,tabindex:`0`}),this._list=new P(`ul`).className(`yoya-vupload-list`),this.className(L,`yoya-vupload`),this.styles({display:`grid`,gap:`10px`,minWidth:`0`,width:`100%`}),this.child(this._input,this._dropZone,this._list),this._input.on(`change`,()=>this._handleInputChange()),this._dropZone.on(`click`,()=>this._openPicker()),this._dropZone.on(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._openPicker())}),this._dropZone.on(`dragenter`,e=>{e.preventDefault(),this._setDragging(!0)}),this._dropZone.on(`dragover`,e=>{e.preventDefault(),this._setDragging(!0)}),this._dropZone.on(`dragleave`,()=>this._setDragging(!1)),this._dropZone.on(`drop`,e=>this._handleDrop(e)),this._setupUpload(e),this._sync()}name(e){return e===void 0?this._name:(this._name=J(e),this)}accept(e){return e===void 0?this._accept:(this._accept=e?String(e):``,this._input.attr(`accept`,this._accept||null),this.attr(`data-accept`,this._accept||null),this)}multiple(e){if(e===void 0)return this._multiple;let t=!!e;return this._multiple=t,this._input.attr(`multiple`,t?!0:null),this.attr(`data-multiple`,t?`true`:null),this}disabled(e){if(e===void 0)return this._disabled;let t=!!e;return this._disabled=t,this.attr(`data-disabled`,t?`true`:null),this._dropZone.attr(`aria-disabled`,t?`true`:null),this._dropZone.attr(`tabindex`,t?`-1`:`0`),this._input.attr(`disabled`,t?!0:null),this._sync(),this}files(e){return e===void 0?this._files.map(e=>e.file):(this._files=zs(e),this._sync(),this._emitChange(),this)}items(e){return e===void 0?this._files.slice():this.files(e)}value(e){return this.files(e)}addFiles(e){if(!e||this._disabled)return this;let t=Array.from(e).filter(e=>this._acceptsFile(e));return t.length===0?this:(this._multiple||(this._files=[]),t.forEach(e=>{this._files.push({file:e,name:e.name,progress:0,size:e.size,status:`ready`})}),this._sync(),this._emitChange(),this)}remove(e){let t=Number.isInteger(e)?e:this._files.findIndex(t=>t.name===e);return t>=0&&t<this._files.length&&(this._files.splice(t,1),this._sync(),this._emitChange()),this}clear(){return this._files.length>0&&(this._files=[],this._sync(),this._emitChange()),this}status(e,t){let n=this._files[e];return n&&t!==void 0&&(n.status=J(t),this._sync()),n?n.status:null}progress(e,t){let n=this._files[e];return n&&t!==void 0&&(n.progress=Math.max(0,Math.min(100,Number(t)||0)),this._sync()),n?n.progress:null}dropZone(e){return e===void 0?this._dropZone:(K(this._dropZone,e),this)}_openPicker(){this._disabled||this._input._el?.click()}_handleInputChange(){this._input._el?.files&&this.addFiles(this._input._el.files),this._input._el&&(this._input._el.value=``)}_handleDrop(e){e.preventDefault(),this._setDragging(!1),!this._disabled&&e.dataTransfer?.files&&this.addFiles(e.dataTransfer.files)}_setDragging(e){this._dropZone.attr(`data-dragging`,e?`true`:null)}_acceptsFile(e){if(!this._accept)return!0;let t=this._accept.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),n=(e.type||``).toLowerCase(),r=(e.name||``).toLowerCase();return t.some(e=>e===`*`||e===`*/*`?!0:e.startsWith(`.`)?r.endsWith(e):e.endsWith(`/*`)?n.startsWith(e.slice(0,-1)):n===e)}_sync(){return this.attr(`data-count`,String(this._files.length)),this._dropZone.attr(`data-disabled`,this._disabled?`true`:null),this._dropZone.children().length===0&&this._dropZone.child(Sr().styles({color:R(`color-primary`,`#2563eb`),height:`28px`,width:`28px`}),new P(`span`).className(`yoya-vupload-dropzone-title`).text(`点击或拖拽文件到此处`),new P(`span`).className(`yoya-vupload-dropzone-hint`).text(this._multiple?`支持选择多个文件`:`支持选择单个文件`)),G(this._list,this._files.map((e,t)=>this._createItem(e,t))),this}_createItem(e,t){let n=new P(`li`).className(`yoya-vupload-item`).attr({"data-file-index":String(t)}),r=new P(`div`).className(`yoya-vupload-item-info`),i=new P(`strong`).className(`yoya-vupload-item-name`).text(e.name),a=new P(`span`).className(`yoya-vupload-item-meta`).text(`${Bs(e.size)} · ${e.status}`),o=new P(`div`).className(`yoya-vupload-progress`).attr(`data-status`,e.status).style(`display`,e.status===`uploading`?null:`none`),s=new P(`span`).className(`yoya-vupload-progress-bar`).style(`width`,`${e.progress}%`),c=new P(`button`).className(`yoya-vupload-remove`).attr({"aria-label":`删除 ${e.name}`,title:`删除`,type:`button`}).on(`click`,()=>this.remove(t));return o.child(s),r.child(i,a,o),c.child(Zn().styles({height:`12px`,width:`12px`})),n.child(r,c),n}_emitChange(){if(!this._el)return;let e=this._el.ownerDocument?.defaultView?.Event||Event;this._el.dispatchEvent(new e(`change`,{bubbles:!0}))}_setupUpload(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{accept:t,children:n,disabled:r,dropZone:i,files:a,items:o,multiple:s,name:c,...l}=e;Object.keys(l).length>0&&this.setup(l),c!==void 0&&this.name(c),t!==void 0&&this.accept(t),s!==void 0&&this.multiple(s),r!==void 0&&this.disabled(r),i===void 0?n!==void 0&&this.dropZone(n):this.dropZone(i);let u=o??a;u!==void 0&&this.files(u);return}this.dropZone(e)}}};function Rs(e=null,t=null,n=null){return H(Ls,e,t,n)}v(P,{vUpload:Rs});function zs(e){return Array.isArray(e)?e.map(e=>e instanceof File?{file:e,name:e.name,progress:0,size:e.size,status:`ready`}:e&&typeof e==`object`&&e.file?{file:e.file,name:e.name??e.file.name,progress:Number(e.progress)||0,size:e.size??e.file.size,status:e.status??`ready`}:null).filter(Boolean):[]}function Bs(e){let t=Number(e)||0;return t<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1048576).toFixed(1)} MB`}var Vs=class extends P{constructor(e=null){super(`div`,null),this._accept=`image/*`,this._disabled=!1,this._name=``,this._objectUrl=null,this._shape=`circle`,this._size=96,this._value=null,this._input=new P(`input`).attr({accept:`image/*`,tabindex:`-1`,type:`file`}).style(`display`,`none`),this._preview=new P(`div`).className(`yoya-vavatar-upload-preview`).attr({role:`button`,tabindex:`0`}),this._remove=new P(`button`).className(`yoya-vavatar-upload-remove`).attr({"aria-label":`移除头像`,title:`移除`,type:`button`}).child(Zn().styles({height:`12px`,width:`12px`})).style(`display`,`none`),this.className(L,`yoya-vavatar-upload`),this.styles({display:`inline-grid`,gap:`8px`,justifyItems:`center`,minWidth:`0`}),this.child(this._input,this._preview,this._remove),this._input.on(`change`,()=>this._handleInputChange()),this._preview.on(`click`,()=>this._openPicker()),this._preview.on(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._openPicker())}),this._preview.on(`dragenter`,e=>{e.preventDefault(),this._setDragging(!0)}),this._preview.on(`dragover`,e=>{e.preventDefault(),this._setDragging(!0)}),this._preview.on(`dragleave`,()=>this._setDragging(!1)),this._preview.on(`drop`,e=>this._handleDrop(e)),this._remove.on(`click`,e=>{e.stopPropagation(),this.remove()}),this._setupAvatarUpload(e),this._sync()}name(e){return e===void 0?this._name:(this._name=J(e),this)}accept(e){return e===void 0?this._accept:(this._accept=e?String(e):`image/*`,this._input.attr(`accept`,this._accept),this.attr(`data-accept`,this._accept),this)}shape(e){return e===void 0?this._shape:(this._shape=e===`square`?`square`:`circle`,this.attr(`data-shape`,this._shape),this._syncPreviewSize(),this)}size(e){return e===void 0?this._size:(this._size=Math.max(32,Number(e)||96),this.attr(`data-size`,String(this._size)),this._syncPreviewSize(),this)}disabled(e){return e===void 0?this._disabled:(this._disabled=!!e,this.attr(`data-disabled`,this._disabled?`true`:null),this._preview.attr(`aria-disabled`,this._disabled?`true`:null),this._preview.attr(`tabindex`,this._disabled?`-1`:`0`),this._input.attr(`disabled`,this._disabled?!0:null),this._sync(),this)}value(e){return e===void 0?this._value:(this._value=e instanceof File?e:null,this._sync(),this._emitChange(),this)}files(e){if(e===void 0)return this._value?[this._value]:[];let t=Array.isArray(e)?e[0]:e;return this.value(t)}items(e){return this.files(e)}addFiles(e){if(!e||this._disabled)return this;let t=Array.from(e).find(e=>this._acceptsFile(e));return t&&this.value(t),this}remove(){return this._value&&this.value(null),this}clear(){return this.remove()}destroy(){return this._releaseObjectUrl(),super.destroy()}_openPicker(){this._disabled||this._input._el?.click()}_handleInputChange(){this._input._el?.files&&this.addFiles(this._input._el.files),this._input._el&&(this._input._el.value=``)}_handleDrop(e){e.preventDefault(),this._setDragging(!1),!this._disabled&&e.dataTransfer?.files&&this.addFiles(e.dataTransfer.files)}_setDragging(e){this._preview.attr(`data-dragging`,e?`true`:null)}_acceptsFile(e){let t=this._accept.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),n=(e.type||``).toLowerCase(),r=(e.name||``).toLowerCase();return t.some(e=>e===`*`||e===`*/*`?!0:e.startsWith(`.`)?r.endsWith(e):e.endsWith(`/*`)?n.startsWith(e.slice(0,-1)):n===e)}_sync(){return this._releaseObjectUrl(),G(this._preview,[]),this.attr(`data-has-value`,this._value?`true`:null),this._remove.style(`display`,this._value?null:`none`),this._value?(typeof URL<`u`&&typeof URL.createObjectURL==`function`&&(this._objectUrl=URL.createObjectURL(this._value)),this._preview.child(new P(`img`).className(`yoya-vavatar-upload-image`).attr({alt:`头像预览`,src:this._objectUrl||``}))):this._preview.child(new P(`div`).className(`yoya-vavatar-upload-fallback`).child(Cr().styles({color:R(`color-text-muted`,`#64748b`),height:`28px`,width:`28px`}),new P(`span`).className(`yoya-vavatar-upload-hint`).text(`点击上传头像`))),this._syncPreviewSize(),this}_syncPreviewSize(){this._preview.styles({borderRadius:this._shape===`square`?`10px`:`50%`,height:`${this._size}px`,width:`${this._size}px`})}_releaseObjectUrl(){this._objectUrl&&typeof URL<`u`&&typeof URL.revokeObjectURL==`function`&&URL.revokeObjectURL(this._objectUrl),this._objectUrl=null}_emitChange(){if(!this._el)return;let e=this._el.ownerDocument?.defaultView?.Event||Event;this._el.dispatchEvent(new e(`change`,{bubbles:!0}))}_setupAvatarUpload(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{accept:t,disabled:n,files:r,name:i,shape:a,size:o,value:s,...c}=e;Object.keys(c).length>0&&this.setup(c),i!==void 0&&this.name(i),t!==void 0&&this.accept(t),a!==void 0&&this.shape(a),o!==void 0&&this.size(o),n!==void 0&&this.disabled(n);let l=s??r?.[0];l!==void 0&&this.value(l);return}this.child(e)}}};function Hs(e=null,t=null,n=null){return H(Vs,e,t,n)}v(P,{vAvatarUpload:Hs});var Us=`#f8fafc.#f1f5f9.#e2e8f0.#cbd5e1.#94a3b8.#64748b.#334155.#0f172a.#fee2e2.#fed7aa.#fef3c7.#dcfce7.#ccfbf1.#cffafe.#dbeafe.#e0e7ff.#f3e8ff.#fce7f3.#f87171.#fb923c.#facc15.#4ade80.#2dd4bf.#22d3ee.#60a5fa.#818cf8.#a78bfa.#f472b6.#ef4444.#f97316.#eab308.#22c55e.#14b8a6.#06b6d4.#3b82f6.#6366f1.#a855f7.#ec4899.#b91c1c.#b45309.#a16207.#15803d.#0f766e.#0891b2.#1d4ed8.#4338ca.#7e22ce.#be185d`.split(`.`),Ws=class extends P{constructor(e=null,t=null,n=null){super(`div`,null),this.className(L,`yoya-vcolor-picker`),this.styles({position:`relative`}),this._value=null,this._alpha=100,this._presetColors=Us.slice(),this._changeHandlers=[],this._open=!1,this._outsideListener=null,this._repositionListener=null,this._buildStructure(),this._setupColorPicker(e),V(this,t,n)}_buildStructure(){this._triggerPreview=new P(`span`).className(`yoya-vcolor-picker-trigger-preview`).attr(`data-vcolor-trigger-preview`,`true`).styles({border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`4px`,boxSizing:`border-box`,display:`inline-block`,height:`16px`,width:`16px`}),this._triggerTextNode=f(``),this._triggerText=new P(`span`).className(`yoya-vcolor-picker-trigger-text`).attr(`data-vcolor-trigger-text`,`true`).child(this._triggerTextNode),this._trigger=new P(`button`).className(`yoya-vcolor-picker-trigger`).attr({"aria-expanded":`false`,"aria-haspopup":`true`,"data-vcolor-trigger":`true`,title:`选择颜色`,type:`button`}).styles({alignItems:`center`,background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`6px`,color:`inherit`,cursor:`pointer`,display:`inline-flex`,gap:`8px`,padding:`5px 10px`}).child(this._triggerPreview,this._triggerText).on(`click`,()=>this.toggle()),this._selected=new P(`div`).className(`yoya-vcolor-picker-selected`).attr(`data-vcolor-selected`,`true`).styles({alignItems:`center`,background:`var(--yoya-color-surface-hover, #f3f3f3)`,borderRadius:`6px`,display:`flex`,gap:`8px`,justifyContent:`space-between`,padding:`6px 8px`}),this._selectedPreview=new P(`span`).className(`yoya-vcolor-picker-selected-preview`).attr(`data-vcolor-selected-preview`,`true`).styles({border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`4px`,boxSizing:`border-box`,display:`inline-block`,height:`18px`,width:`18px`}),this._selectedTextNode=f(``),this._selectedText=new P(`span`).className(`yoya-vcolor-picker-selected-text`).attr(`data-vcolor-selected-text`,`true`).child(this._selectedTextNode),this._clearSelectedButton=new P(`button`).className(`yoya-vcolor-picker-clear-selected`).attr({"aria-label":`清除已选颜色`,"data-vcolor-clear-selected":`true`,title:`清除已选颜色`,type:`button`}).styles({background:`transparent`,border:`0`,color:R(`color-text-muted`,`#64748b`),cursor:`pointer`,fontSize:`12px`,padding:`0`}).text(`清除`).on(`click`,()=>this.clearValue()),this._selected.child(this._selectedPreview,this._selectedText,this._clearSelectedButton),this._paletteBox=new P(`div`).className(`yoya-vcolor-picker-palette`).attr(`data-vcolor-palette`,`true`).styles({display:`grid`,gap:`5px`,gridTemplateColumns:`repeat(8, 18px)`}),this._alphaTextNode=f(`100%`),this._alphaInput=new P(`input`).attr({"data-vcolor-alpha":`true`,max:`100`,min:`0`,type:`range`,value:`100`}).styles({direction:`rtl`,height:`84px`,margin:`0`,writingMode:`vertical-lr`}).on(`input`,e=>this.alpha(Number(e.target.value))),this._alphaText=new P(`span`).className(`yoya-vcolor-picker-alpha-text`).attr(`data-vcolor-alpha-text`,`true`).styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`,minWidth:`34px`,textAlign:`right`}).child(this._alphaTextNode),this._effectFill=new P(`div`).attr(`data-vcolor-effect-fill`,`true`).styles({borderRadius:`5px`,height:`100%`,width:`100%`}),this._effectBox=new P(`div`).className(`yoya-vcolor-picker-effect`).attr(`data-vcolor-effect`,`true`).styles({backgroundImage:`conic-gradient(#d3d3d3 25%, #ffffff 0 50%, #d3d3d3 0 75%, #ffffff 0)`,backgroundSize:`12px 12px`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`6px`,boxSizing:`border-box`,height:`28px`,width:`28px`}).child(this._effectFill),this._sidePanel=new P(`div`).className(`yoya-vcolor-picker-side`).styles({alignItems:`center`,display:`flex`,flexDirection:`column`,gap:`8px`,minWidth:`28px`}).child(this._effectBox,this._alphaInput,this._alphaText),this._panel=new P(`div`).className(`yoya-vcolor-picker-popup`).attr(`data-vcolor-popup`,`true`).styles({background:`var(--yoya-color-surface, #ffffff)`,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`8px`,boxShadow:`var(--yoya-shadow-md, 0 8px 18px rgba(15, 23, 42, 0.1))`,boxSizing:`border-box`,display:`none`,left:`0`,minWidth:`250px`,padding:`10px`,position:`absolute`,top:`calc(100% + 6px)`,zIndex:`110`}).child(this._selected,new P(`div`).styles({display:`flex`,gap:`12px`,marginTop:`10px`}).child(this._paletteBox,this._sidePanel)),this.child(this._trigger,this._panel),this._renderPalette(),this._sync()}value(e){if(e===void 0)return this._value;if(e===null)return this.clearValue();let t=Ks(e);return t?(this._value=t,this._sync(),this._notifyChange(),this):this}alpha(e){if(e===void 0)return this._alpha;let t=Number(e);return this._alpha=Number.isFinite(t)?Math.min(100,Math.max(0,Math.round(t))):100,this._sync(),this._notifyChange(),this}rgba(){if(!this._value)return null;let e=this._value.slice(1);return`rgba(${parseInt(e.slice(0,2),16)}, ${parseInt(e.slice(2,4),16)}, ${parseInt(e.slice(4,6),16)}, ${Math.round(this._alpha/100*1e3)/1e3})`}clearValue(){return this._value=null,this._sync(),this._notifyChange(),this}open(e=!0){return this._open=!!e,this._trigger.attr(`aria-expanded`,this._open?`true`:`false`),this._open?(this._panel.style(`display`,null),this._positionPanel()):this._panel.style(`display`,`none`),this._bindOutsideClose(this._open),this._bindReposition(this._open),this}close(){return this.open(!1)}toggle(){return this.open(!this._open)}palette(e){return e===void 0?[...this._presetColors]:(this._presetColors=qs(e),this._renderPalette(),this)}change(e){return e===void 0?this._changeHandlers.slice():(this._changeHandlers=[e],this)}onChange(e){return this.change(e)}renderDom(){let e=super.renderDom();return this._open&&this._positionPanel(),e}destroy(){return this._bindOutsideClose(!1),this._bindReposition(!1),super.destroy()}_bindOutsideClose(e){if(e&&!this._outsideListener){this._outsideListener=e=>{(!this._el||!this._el.contains(e.target))&&this.close()},document.addEventListener(`mousedown`,this._outsideListener);return}!e&&this._outsideListener&&(document.removeEventListener(`mousedown`,this._outsideListener),this._outsideListener=null)}_bindReposition(e){if(e&&!this._repositionListener){this._repositionListener=()=>this._positionPanel(),window.addEventListener(`scroll`,this._repositionListener,!0),window.addEventListener(`resize`,this._repositionListener);return}!e&&this._repositionListener&&(window.removeEventListener(`scroll`,this._repositionListener,!0),window.removeEventListener(`resize`,this._repositionListener),this._repositionListener=null)}_positionPanel(){if(typeof window>`u`||typeof document>`u`||!this._el||!this._trigger._el)return;let e=this._trigger._el.getBoundingClientRect(),t=this._panel._el;if(!t)return;let n=t.offsetWidth||250,r=t.offsetHeight||280,i=e.left;i+n>window.innerWidth-8&&(i=Math.max(8,window.innerWidth-n-8));let a=e.bottom+6;a+r>window.innerHeight-8&&(a=Math.max(8,e.top-r-6)),this._panel.styles({left:`${i}px`,position:`fixed`,top:`${a}px`})}_sync(){let e=this._value,t=this.rgba(),n=e?`${e} ${this._alpha}%`:`选择颜色`;return this._triggerPreview.style(`background`,t||`transparent`),this._triggerTextNode.textContent(n),this._selectedPreview.style(`background`,t||`transparent`),this._selectedTextNode.textContent(e?n:`未选择`),this._alphaInput.attr(`value`,String(this._alpha)),this._alphaTextNode.textContent(`${this._alpha}%`),this._effectFill.style(`background`,t||`transparent`),this}_notifyChange(){this._changeHandlers.forEach(e=>e(this._value,this._alpha,this))}_renderPalette(){return G(this._paletteBox,this._presetColors.map(e=>this._createSwatch(e))),this}_createSwatch(e){return new P(`button`).className(`yoya-vcolor-picker-swatch`).attr({"aria-label":`选择颜色 ${e}`,"data-vcolor-swatch":e,title:e,type:`button`}).styles({background:e,border:`1px solid var(--yoya-color-border, #d8dee8)`,borderRadius:`4px`,boxSizing:`border-box`,cursor:`pointer`,height:`18px`,padding:`0`,width:`18px`}).on(`click`,()=>this.value(e))}_setupColorPicker(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{alpha:t,change:n,color:r,onChange:i,open:a,palette:o,value:s,...c}=e;Object.keys(c).length>0&&this.setup(c),o!==void 0&&this.palette(o),s===void 0?r!==void 0&&this.value(r):this.value(s),t!==void 0&&this.alpha(t),n===void 0?i!==void 0&&this.onChange(i):this.change(n),a!==void 0&&this.open(a);return}this.value(e)}}};function Gs(e=null,t=null,n=null){return H(Ws,e,t,n)}v(P,{vColorPicker:Gs});function Ks(e){if(e==null)return null;let t=String(e).trim(),n=/^#([0-9a-f]{3})$/i.exec(t);return n?`#${n[1].split(``).map(e=>e+e).join(``).toLowerCase()}`:/^#[0-9a-f]{6}$/i.test(t)?t.toLowerCase():null}function qs(e){return Array.isArray(e)?e.map(e=>Ks(e)).filter(e=>e!==null):[]}var Js=class extends P{constructor(e=null){super(`span`,null),this._color=null,this._status=null,this._imageBox=new P(`img`).className(`yoya-vavatar-image`).attr(`alt`,``),this._contentBox=new P(`span`).className(`yoya-vavatar-content`),this._statusDot=new P(`span`).className(`yoya-vavatar-status`).attr(`aria-hidden`,`true`),this.className(L,`yoya-vavatar`),this.attr({role:`img`,"data-shape":`circle`,"data-size":`medium`}),this.child(this._imageBox,this._contentBox,this._statusDot),this._setupAvatar(e),this._syncAvatar()}text(e){return G(this._contentBox,W(e??``)),this.attr(`data-image`,null),this.attr(`aria-label`,Xs(e,this.attr(`aria-label`))),this}content(e){return this.text(e)}icon(e){return G(this._contentBox,W(e??``)),this.attr(`data-image`,null),this.attr(`aria-label`,Xs(e,this.attr(`aria-label`))),this}src(e){return e===void 0?this._imageBox.attr(`src`):e==null||e===``?(this._imageBox.attr(`src`,null),this.attr(`data-image`,null),this):(this._imageBox.attr(`src`,e),this.attr(`data-image`,`true`),this)}alt(e){if(e===void 0)return this._imageBox.attr(`alt`);let t=e??``;return this._imageBox.attr(`alt`,t),t&&this.attr(`aria-label`,t),this}size(e){if(e===void 0)return this.attr(`data-size`);let t=[`small`,`medium`,`large`,`xlarge`].includes(e)?e:`medium`;return this.attr(`data-size`,t),this}shape(e){return e===void 0?this.attr(`data-shape`):(this.attr(`data-shape`,e===`square`?`square`:`circle`),this)}color(e){return e===void 0?this._color:(this._color=e||null,this.attr(`data-color`,this._color||null),this.style(`background`,this._color||null),this.style(`color`,this._color?`var(--yoya-color-text-inverse, #ffffff)`:null),this)}status(e){return e===void 0?this._status:(this._status=e||null,this.attr(`data-status`,this._status||null),this)}_syncAvatar(){let e=!!this._imageBox.attr(`src`);return this.attr(`data-image`,e?`true`:null),this.attr(`aria-label`)||this.attr(`aria-label`,this._imageBox.attr(`alt`)||this._contentBox.textContent()||``),this}_setupAvatar(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{alt:t,children:n,color:r,content:i,icon:a,shape:o,size:s,src:c,status:l,text:u,...d}=e;Object.keys(d).length>0&&this.setup(d),c!==void 0&&this.src(c),t!==void 0&&this.alt(t),u===void 0?i===void 0?a===void 0?n!==void 0&&this.text(n):this.icon(a):this.content(i):this.text(u),s!==void 0&&this.size(s),o!==void 0&&this.shape(o),r!==void 0&&this.color(r),l!==void 0&&this.status(l);return}this.text(e)}}};function Ys(e=null,t=null,n=null){return H(Js,e,t,n)}function Xs(e,t){return e==null||e===``?t||``:typeof e.textContent==`function`?e.textContent():String(e)}var Zs={danger:R(`color-danger`,`#dc2626`),neutral:R(`color-text-secondary`,`#64748b`),primary:R(`color-primary`,`#2563eb`),success:R(`color-success`,`#16a34a`),warning:R(`color-warning`,`#d97706`)},Qs=new Set(Object.keys(Zs)),$s=class extends P{constructor(e=null){super(`div`,null),this._columns=null,this.className(L,`yoya-vdigital-board`),this.styles({boxSizing:`border-box`,display:`grid`,gap:`16px`,gridTemplateColumns:`repeat(auto-fit, minmax(220px, 1fr))`}),U(this,e)}columns(e){if(e===void 0)return this._columns;this._columns=e;let t=Number(e);return this.style(`gridTemplateColumns`,Number.isFinite(t)&&t>0?`repeat(${t}, minmax(0, 1fr))`:`repeat(auto-fit, minmax(220px, 1fr))`),this}},ec=class extends P{constructor(e=null){super(`div`,null),this._tone=`primary`,this._trendUp=!0,this._accent=new P(`div`).className(`yoya-vdigital-board-item-accent`),this._iconBox=new P(`div`).className(`yoya-vdigital-board-item-icon`),this._labelNode=f(``),this._valueNode=f(``),this._unitNode=f(``),this._trendNode=f(``),this._accent.styles({bottom:`0`,left:`0`,position:`absolute`,top:`0`,width:`4px`}),this._iconBox.styles({alignItems:`center`,display:`none`,flexShrink:`0`,fontSize:`22px`,height:`28px`,justifyContent:`center`,width:`28px`});let t=new P(`div`).className(`yoya-vdigital-board-item-label`).styles({color:R(`color-text-secondary`,`#475569`),fontSize:`13px`,lineHeight:`1.4`}).child(this._labelNode),n=new P(`div`).className(`yoya-vdigital-board-item-top`).styles({alignItems:`center`,display:`flex`,gap:`10px`}).child(this._iconBox,t),r=new P(`span`).className(`yoya-vdigital-board-item-unit`).styles({color:R(`color-text-secondary`,`#64748b`),fontSize:`13px`,fontWeight:`400`,lineHeight:`1`}).child(this._unitNode),i=new P(`div`).className(`yoya-vdigital-board-item-value-box`).styles({alignItems:`baseline`,display:`flex`,gap:`6px`,fontSize:`28px`,fontWeight:`700`,lineHeight:`1.2`,marginTop:`6px`}).child(this._valueNode,r);this._trendBox=new P(`div`).className(`yoya-vdigital-board-item-trend`).styles({fontSize:`13px`,lineHeight:`1.4`,marginTop:`8px`}).child(this._trendNode),this._unitBox=r;let a=new P(`div`).className(`yoya-vdigital-board-item-body`).styles({boxSizing:`border-box`,display:`flex`,flexDirection:`column`,minWidth:`0`}).child(n,i,this._trendBox);this.className(L,`yoya-vdigital-board-item`),this.styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#e2e8f0`),borderRadius:`10px`,boxSizing:`border-box`,display:`flex`,minWidth:`0`,overflow:`hidden`,padding:`16px 16px 16px 20px`,position:`relative`}),this.child(this._accent,a),this._applyTone(),U(this,e)}label(e){return e===void 0?this._labelNode.textContent():(this._labelNode.textContent(e),this)}value(e){return e===void 0?this._valueNode.textContent():(this._valueNode.textContent(e),this)}unit(e){return e===void 0?this._unitNode.textContent():(this._unitNode.textContent(e),this._unitBox.style(`display`,e?`inline-block`:`none`),this)}trend(e){return e===void 0?this._trendNode.textContent():(this._trendNode.textContent(e),this._trendBox.style(`display`,e?`block`:`none`),this._applyTrendColor(),this)}trendUp(e){return e===void 0?this._trendUp:(this._trendUp=!!e,this._applyTrendColor(),this)}tone(e){return e===void 0?this._tone:(this._tone=Qs.has(e)?e:`primary`,this._applyTone(),this)}icon(e){let t=e!=null&&e!==``;return this._iconBox.style(`display`,t?`flex`:`none`),G(this._iconBox,t?W(e):[]),this}_applyTone(){let e=Zs[this._tone];this._accent.style(`background`,e),this._iconBox.style(`color`,e),this._applyTrendColor()}_applyTrendColor(){this._trendBox.style(`color`,this._trendUp?R(`color-success`,`#16a34a`):R(`color-danger`,`#dc2626`))}};function tc(e=null,t=null,n=null){return H($s,e,t,n)}function nc(e=null,t=null,n=null){return H(ec,e,t,n)}var rc={default:R(`color-text-muted`,`#8c8c8c`),error:R(`color-danger`,`#f5222d`),processing:R(`color-info`,`#1677ff`),success:R(`color-success`,`#52c41a`),warning:R(`color-warning`,`#faad14`)},ic=class extends P{constructor(e=null){super(`span`,null),this._count=null,this._overflowCount=99,this._showZero=!1,this._dot=!1,this._status=null,this._color=null,this._offsetX=0,this._offsetY=0,this._textContent=null,this._contentBox=new P(`span`).className(`yoya-vbadge-content`).styles({alignItems:`center`,display:`inline-flex`,minWidth:`0`}),this._badgeBox=new P(`span`).className(`yoya-vbadge-count`).styles({alignItems:`center`,background:R(`color-danger`,`#ff4d4f`),borderRadius:`10px`,boxSizing:`border-box`,color:R(`color-text-inverse`,`#ffffff`),display:`none`,fontSize:`12px`,fontWeight:`700`,height:`18px`,justifyContent:`center`,lineHeight:`1`,minWidth:`18px`,padding:`0 6px`,position:`absolute`,right:`0`,textAlign:`center`,top:`0`,transform:`translate(50%, -50%)`,whiteSpace:`nowrap`,zIndex:`1`}),this._textBox=new P(`span`).className(`yoya-vbadge-text`).styles({color:R(`color-text-secondary`,`#475569`),display:`none`,fontSize:`12px`,lineHeight:`1`}),this.className(L,`yoya-vbadge`),this.styles({alignItems:`center`,boxSizing:`border-box`,display:`inline-flex`,gap:`6px`,lineHeight:`1`,position:`relative`,verticalAlign:`middle`}),super.child(this._contentBox,this._badgeBox,this._textBox),this._setupBadge(e),this._syncBadge()}child(...e){return this._contentBox.child(...e),this._syncBadge(),this}content(e){return e===void 0?this._contentBox.children():(G(this._contentBox,W(e)),this._syncBadge(),this)}count(e){return e===void 0?this._count:(this._count=e==null||e===``?null:e,this.attr(`data-count`,this._count===null?null:String(this._count)),this._syncBadge(),this)}overflowCount(e){if(e===void 0)return this._overflowCount;let t=Number(e);return this._overflowCount=Number.isFinite(t)?t:99,this.attr(`data-overflow-count`,String(this._overflowCount)),this._syncBadge(),this}showZero(e){return e===void 0?this._showZero:(this._showZero=!!e,this.attr(`data-show-zero`,this._showZero?`true`:null),this._syncBadge(),this)}dot(e){return e===void 0?this._dot:(this._dot=!!e,this.attr(`data-dot`,this._dot?`true`:null),this._syncBadge(),this)}status(e){return e===void 0?this._status:(this._status=e||null,this.attr(`data-status`,this._status),this._syncBadge(),this)}color(e){return e===void 0?this._color:(this._color=e||null,this.attr(`data-color`,this._color),this._syncBadge(),this)}text(e){return e===void 0?this._textContent:(this._textContent=e??null,this._textContent===null?G(this._textBox,[]):G(this._textBox,W(this._textContent)),this._syncBadge(),this)}label(e){return this.text(e)}title(e){return e===void 0?this._badgeBox.attr(`title`):(this._badgeBox.attr(`title`,e??null),this)}offset(e){if(e===void 0)return{x:this._offsetX,y:this._offsetY};let t=Number(e?.x??0),n=Number(e?.y??0);return this._offsetX=Number.isFinite(t)?t:0,this._offsetY=Number.isFinite(n)?n:0,this._syncBadge(),this}_setupBadge(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,color:n,content:r,count:i,dot:a,label:o,offset:s,overflowCount:c,showZero:l,status:u,text:d,title:f,...p}=e;Object.keys(p).length>0&&this.setup(p),c!==void 0&&this.overflowCount(c),l!==void 0&&this.showZero(l),i!==void 0&&this.count(i),a!==void 0&&this.dot(a),u!==void 0&&this.status(u),n!==void 0&&this.color(n),s!==void 0&&this.offset(s),f!==void 0&&this.title(f),d===void 0?o!==void 0&&this.text(o):this.text(d),t===void 0?r!==void 0&&this.child(r):this.child(t);return}if(typeof e==`number`||typeof e==`string`&&e.trim()!==``&&!Number.isNaN(Number(e))){this.count(e);return}this.child(e)}}_syncBadge(){let e=this._contentBox.children().length>0,t=this._status,n=!!(t||this._dot),r=n||this._countVisible(),i=this._color||(t?rc[t]:R(`color-danger`,`#ff4d4f`));return this._contentBox.style(`display`,e?`inline-flex`:`none`),this._textBox.style(`display`,this._textContent!==null&&this._textContent!==``?`inline-flex`:`none`),this._badgeBox.style(`display`,r?`inline-flex`:`none`),this._badgeBox.style(`background`,r?i:null),this._badgeBox.style(`position`,e?`absolute`:`static`),this._badgeBox.style(`transform`,e?`translate(calc(50% + ${this._offsetX}px), calc(-50% + ${this._offsetY}px))`:null),this._badgeBox.attr(`aria-label`,r?n?this._status||`通知`:this._badgeText():null),n?(this._badgeBox.styles({borderRadius:`999px`,height:`8px`,lineHeight:`1`,minWidth:`8px`,padding:`0`,width:`8px`}),G(this._badgeBox,[])):(this._badgeBox.styles({borderRadius:`10px`,height:`18px`,lineHeight:`1`,minWidth:`18px`,padding:`0 6px`,width:null}),G(this._badgeBox,W(this._badgeText()))),this.attr(`data-standalone`,e?null:`true`),this}_countVisible(){if(this._count===null||this._count===void 0||this._count===``)return!1;let e=Number(this._count);return Number.isFinite(e)&&e===0?!!this._showZero:!0}_badgeText(){let e=Number(this._count);if(Number.isFinite(e)&&this._count!==``){let t=Number(this._overflowCount)||99;return e>t?`${t}+`:String(this._count)}return String(this._count)}};function ac(e=null,t=null,n=null){return H(ic,e,t,n)}var oc=class extends P{constructor(e=null){super(`div`,null),this._activeIndex=0,this._itemsData=[],this._renderItem=null,this._autoplay=!1,this._interval=3500,this._loop=!0,this._showArrows=!0,this._showDots=!0,this._height=null,this._timer=null,this._paused=!1,this._viewport=new P(`div`).className(`yoya-vcarousel-viewport`),this._track=new P(`div`).className(`yoya-vcarousel-track`),this._prevButton=new P(`button`).className(`yoya-vcarousel-arrow yoya-vcarousel-arrow--prev`).attr({"aria-label":`上一项`,type:`button`}).child(Vn()).on(`click`,()=>this.prev()),this._nextButton=new P(`button`).className(`yoya-vcarousel-arrow yoya-vcarousel-arrow--next`).attr({"aria-label":`下一项`,type:`button`}).child(Hn()).on(`click`,()=>this.next()),this._dots=new P(`div`).className(`yoya-vcarousel-dots`).attr({"aria-label":`轮播指示`,role:`tablist`}),this._viewport.child(this._track),this.className(L,`yoya-vcarousel`),this.attr({"aria-label":`走马灯,第 1 / 0 项`,"aria-roledescription":`carousel`,"data-active":`0`,"data-count":`0`,"data-loop":`true`,role:`region`,tabindex:`0`}),this.styles({boxSizing:`border-box`,display:`grid`,gridTemplateRows:`minmax(0, 1fr) auto`,minWidth:`0`,position:`relative`}),this.child(this._viewport,this._prevButton,this._nextButton,this._dots),this.on(`keydown`,e=>this._handleKeydown(e)),this.on(`mouseenter`,()=>this._pause()),this.on(`mouseleave`,()=>this._resume()),this.on(`focusin`,()=>this._pause()),this.on(`focusout`,e=>{(!e.relatedTarget||!this._el?.contains(e.relatedTarget))&&this._resume()}),this._setupCarousel(e),this._syncState()}slides(e,t=null){return e===void 0?this._itemsData.slice():(typeof t==`function`&&(this._renderItem=t),this._itemsData=Array.isArray(e)?e.slice():[e],this._activeIndex=0,this._renderSlides(),this._renderDots(),this._syncState(),this)}items(e,t=null){return this.slides(e,t)}renderItem(e){return e===void 0?this._renderItem:(this._renderItem=typeof e==`function`?e:null,this._itemsData.length>0&&this._renderSlides(),this)}active(e){if(e===void 0)return this._activeIndex;let t=this._itemsData.length,n=Math.floor(Number(e));return Number.isFinite(n)||(n=0),t===0?(this._activeIndex=0,this._syncState(),this):(this._activeIndex=this._loop?(n%t+t)%t:Math.max(0,Math.min(t-1,n)),this._syncState(),this)}goTo(e){return this.active(e)}next(){return this._itemsData.length===0?this:this._loop?this.active(this._activeIndex+1):this.active(Math.min(this._activeIndex+1,this._itemsData.length-1))}prev(){return this._itemsData.length===0?this:this._loop?this.active(this._activeIndex-1):this.active(Math.max(0,this._activeIndex-1))}loop(e){return e===void 0?this._loop:(this._loop=!!e,this.attr(`data-loop`,this._loop?`true`:null),this._syncState(),this)}autoplay(e){return e===void 0?this._autoplay:(this._autoplay=!!e,this.attr(`data-autoplay`,this._autoplay?`true`:null),this._syncPlayback(),this)}start(){return this.autoplay(!0)}stop(){return this.autoplay(!1)}interval(e){if(e===void 0)return this._interval;let t=Number(e);return this._interval=Number.isFinite(t)&&t>0?t:3500,this._autoplay&&(this._clearTimer(),this._startTimer()),this}arrows(e){return e===void 0?this._showArrows:(this._showArrows=!!e,this.attr(`data-arrows`,this._showArrows?`true`:null),this._prevButton.style(`display`,this._showArrows?null:`none`),this._nextButton.style(`display`,this._showArrows?null:`none`),this)}dots(e){return e===void 0?this._showDots:(this._showDots=!!e,this.attr(`data-dots`,this._showDots?`true`:null),this._dots.style(`display`,this._showDots?null:`none`),this)}height(e){return e===void 0?this._height:(this._height=e||null,this.style(`height`,this._height),this.style(`minHeight`,this._height),this)}destroy(){return this._clearTimer(),super.destroy()}_handleKeydown(e){e.key===`ArrowLeft`?(e.preventDefault(),this.prev()):e.key===`ArrowRight`?(e.preventDefault(),this.next()):e.key===`Home`?(e.preventDefault(),this.active(0)):e.key===`End`&&(e.preventDefault(),this.active(this._itemsData.length-1))}_renderSlides(){let e=this._itemsData.length;G(this._track,this._itemsData.map((t,n)=>{let r=new P(`div`).className(`yoya-vcarousel-slide`).attr({"aria-label":`${n+1} / ${e}`,"aria-roledescription":`slide`,role:`group`});return r.child(this._renderItem?this._renderItem(t,n,this):t),r}))}_renderDots(){G(this._dots,this._itemsData.map((e,t)=>new P(`button`).className(`yoya-vcarousel-dot`).attr({"aria-label":`跳转到第 ${t+1} 项`,role:`tab`,tabindex:`-1`,type:`button`}).on(`click`,()=>this.active(t))))}_syncState(){let e=this._itemsData.length;return this.attr(`data-active`,String(this._activeIndex)),this.attr(`data-count`,String(e)),this.attr(`aria-label`,`走马灯,第 ${this._activeIndex+1} / ${e} 项`),this._track.style(`transform`,e>0?this._activeIndex===0?`translateX(0%)`:`translateX(-${this._activeIndex*100}%)`:null),this._dots.children().forEach((e,t)=>{e.attr(`aria-selected`,t===this._activeIndex?`true`:null),e.attr(`tabindex`,t===this._activeIndex?`0`:`-1`)}),this._syncArrows(),this._syncPlayback(),this._emitChange(),this}_syncArrows(){let e=this._itemsData.length,t=e>1&&(this._loop||this._activeIndex>0),n=e>1&&(this._loop||this._activeIndex<e-1);this._prevButton.attr(`disabled`,!t||null),this._nextButton.attr(`disabled`,!n||null),this._prevButton.attr(`aria-disabled`,t?null:`true`),this._nextButton.attr(`aria-disabled`,n?null:`true`)}_syncPlayback(){this._autoplay&&!this._paused&&this._itemsData.length>1?this._startTimer():this._clearTimer()}_startTimer(){this._timer||!this._autoplay||this._paused||this._itemsData.length<2||(this._timer=setInterval(()=>this.next(),this._interval))}_clearTimer(){this._timer&&=(clearInterval(this._timer),null)}_pause(){this._autoplay&&(this._paused=!0,this.attr(`data-paused`,`true`),this._clearTimer())}_emitChange(){this._el&&this._el.dispatchEvent(new CustomEvent(`change`,{bubbles:!1,detail:{count:this._itemsData.length,index:this._activeIndex}}))}_resume(){this._autoplay&&(this._paused=!1,this.attr(`data-paused`,null),this._startTimer())}_setupCarousel(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{active:t,arrows:n,autoplay:r,children:i,dots:a,height:o,interval:s,items:c,loop:l,renderItem:u,slides:d,...f}=e;Object.keys(f).length>0&&this.setup(f),u!==void 0&&this.renderItem(u);let p=d??c??i;p!==void 0&&this.slides(p),t!==void 0&&this.active(t),l!==void 0&&this.loop(l),r!==void 0&&this.autoplay(r),s!==void 0&&this.interval(s),n!==void 0&&this.arrows(n),a!==void 0&&this.dots(a),o!==void 0&&this.height(o);return}this.slides(e)}}};function sc(e=null,t=null,n=null){return H(oc,e,t,n)}var cc=class extends P{constructor(e=null){super(`div`,null),this._languageBadge=new P(`span`).className(`yoya-vcode-language`).style(`display`,`none`),this._copyButton=new P(`button`).className(`yoya-vcode-copy`).attr({"aria-label":`复制代码`,type:`button`}).on(`click`,()=>{this.copy()}),this._toolbar=new P(`div`).className(`yoya-vcode-toolbar`),this._codeBox=new P(`code`).className(`yoya-vcode-content`),this._preBox=new P(`pre`).className(`yoya-vcode-pre`).child(this._codeBox),this.className(L,`yoya-vcode`),this.styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#d8dee8`),borderRadius:`8px`,color:R(`color-text`,`#172033`),overflow:`hidden`}),this._toolbar.styles({alignItems:`center`,background:R(`color-code-header`,`#f8fafc`),display:`flex`,gap:`8px`,justifyContent:`space-between`,padding:`10px 12px`}),this._languageBadge.styles({background:R(`color-code-badge`,`#e2e8f0`),borderRadius:`999px`,color:R(`color-code-badge-text`,`#334155`),fontSize:`12px`,fontWeight:`700`,lineHeight:`1`,padding:`4px 8px`}),this._preBox.styles({background:R(`color-code-bg`,`#fbfcfe`),margin:`0`,overflow:`auto`,padding:`14px 16px`}),this._codeBox.styles({display:`block`,fontFamily:`"Cascadia Code", "Fira Code", ui-monospace, SFMono-Regular, Consolas, monospace`,fontSize:`13px`,lineHeight:`1.55`,minWidth:`max-content`,whiteSpace:`pre`}),this.copyLabel(`复制`),this.copyable(!0),this._toolbar.child(this._languageBadge,this._copyButton),this.child(this._toolbar,this._preBox),this._setupCode(e)}content(e){return G(this._codeBox,W(e)),this}text(e){return this.content(e)}language(e){if(e===void 0)return this.attr(`data-language`);let t=e==null?``:String(e);return this.attr(`data-language`,t||null),this._languageBadge.style(`display`,t?null:`none`),G(this._languageBadge,t?W(t):[]),this}copyable(e=void 0){if(e===void 0)return this.getBooleanState(`copyable`);let t=!!e;return this.setState(`copyable`,t),this.attr(`data-copyable`,t?`true`:null),this._copyButton.style(`display`,t?null:`none`),this}copyLabel(e){return e===void 0?this._copyButton.textContent():(G(this._copyButton,W(e??`复制`)),this)}async copy(){let e=this._codeBox.textContent();try{typeof navigator<`u`&&navigator.clipboard?.writeText&&await navigator.clipboard.writeText(e)}catch{}return e}_setupCode(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{children:t,content:n,copyLabel:r,copyable:i,language:a,text:o,...s}=e;Object.keys(s).length>0&&this.setup(s),a!==void 0&&this.language(a),r!==void 0&&this.copyLabel(r),i!==void 0&&this.copyable(i),n===void 0?o===void 0?t!==void 0&&this.content(t):this.content(o):this.content(n);return}this.content(e)}}};function lc(e=null,t=null,n=null){return H(cc,e,t,n)}var uc=class extends P{constructor(e=null){super(`dl`,null),this._columns=3,this.className(L,`yoya-vdetail`),this.styles({border:z(`color-border`,`#d8dee8`),borderRadius:`8px`,display:`grid`,gap:`0`,margin:`0`,overflow:`hidden`}),this.columns(this._columns),this._setupDetail(e)}columns(e){return e===void 0?this._columns:(this._columns=hc(e),this.attr(`data-columns`,String(this._columns)),this.style(`gridTemplateColumns`,`repeat(${this._columns}, minmax(0, 1fr))`),this)}column(e){return this.columns(e)}items(e){return e===void 0?this.children():(G(this,[]),Array.isArray(e)&&e.forEach(e=>{this.child(mc(e))}),this)}_setupDetail(e){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)){this.items(e);return}if(q(e)){this.setup(e);return}this.child(e)}}},dc=class extends P{constructor(e=null,t=void 0){super(`div`,null),this._labelBox=new P(`dt`).className(`yoya-vdetail-label`),this._valueBox=new P(`dd`).className(`yoya-vdetail-value`),this.className(`yoya-vdetail-item`),this.styles({alignItems:`start`,display:`grid`,gap:`12px`,gridTemplateColumns:`minmax(96px, 1fr) minmax(0, 1.5fr)`,padding:`12px 16px`}),this._labelBox.styles({color:R(`color-text-secondary`,`#475569`),fontWeight:`700`,margin:`0`,wordBreak:`break-word`}),this._valueBox.styles({color:R(`color-text-strong`,`#111827`),margin:`0`,wordBreak:`break-word`}),this.child(this._labelBox,this._valueBox),this._setupDetailItem(e,t),this._syncLabelPresence()}label(e){if(e===void 0)return this._labelBox.textContent();let t=e!=null&&e!==``;return G(this._labelBox,t?W(e):[]),this._syncLabelPresence(),this}value(e){return e===void 0?this._valueBox.textContent():(G(this._valueBox,W(e)),this)}content(e){return this.value(e)}_syncLabelPresence(){let e=this._labelBox.children().length>0;return this.style(`gridTemplateColumns`,e?`minmax(96px, 1fr) minmax(0, 1.5fr)`:`minmax(0, 1fr)`),this._labelBox.style(`display`,e?null:`none`),this.attr(`data-label-visible`,e?`true`:null),this}_setupDetailItem(e,t){if(e!=null){if(typeof e==`function`){e(this);return}if(Array.isArray(e)&&t===void 0&&e.length>=2){this.label(e[0]),this.value(e[1]);return}if(q(e)){let{children:t,content:n,label:r,text:i,value:a,...o}=e;Object.keys(o).length>0&&this.setup(o),r!==void 0&&this.label(r),a===void 0?n===void 0?i===void 0?t!==void 0&&this.value(t):this.value(i):this.value(n):this.value(a);return}if(t!==void 0){this.label(e),this.value(t);return}this.value(e)}}};function fc(e=null,t=null,n=null){return H(uc,e,t,n)}function pc(e=null,t=void 0){return e instanceof dc&&t===void 0?e:new dc(e,t)}function mc(e){return e instanceof dc?e:Array.isArray(e)&&e.length>=2?pc(e[0],e[1]):e instanceof l?pc({value:e}):q(e)?pc(e):pc({value:e})}function hc(e){let t=Number(e);return!Number.isFinite(t)||t<1?1:Math.max(1,Math.floor(t))}function gc(e=null,t=null,n=null){let r=B(e,t,n),i=ua(),a={ariaLabel:`分页`,page:1,pageSize:10,pageSizes:[],total:0,totalPages:1},o=null,s=null,c=`yoya-vpagination-${i}`,d=`yoya-vpagination-page-${i}`,f=`yoya-vpagination-size-${i}`,p=new u(`共 0 条`),m=new u(`第 1 / 1 页`),h=new P(`div`).className(`yoya-vpagination-summary`).attr(`aria-live`,`polite`).styles({display:`grid`,gap:`2px`}),g=new P(`div`).className(`yoya-vpagination-controls`).styles({alignItems:`center`,display:`flex`,flexWrap:`wrap`,gap:`8px`}),_=new P(`div`).className(`yoya-vpagination-jump`).styles({alignItems:`center`,display:`inline-flex`,gap:`6px`}),v=new P(`div`).className(`yoya-vpagination-size`).styles({alignItems:`center`,display:`inline-flex`,gap:`6px`}),y=k(`first`,`首页`),b=k(`previous`,`上一页`),x=k(`next`,`下一页`),S=k(`last`,`尾页`),C=k(`jump`,`前往`),w=new P(`input`).className(`yoya-vpagination-page-input`).attr({"aria-label":`跳转页码`,"data-role":`page-input`,id:d,inputmode:`numeric`,min:`1`,step:`1`,type:`number`,value:`1`}).styles({boxSizing:`border-box`,minWidth:`72px`,width:`72px`}),ee=new P(`label`).className(`yoya-vpagination-jump-label`).attr(`for`,d).styles({color:R(`color-text-secondary`,`#475569`),fontSize:`12px`,fontWeight:`600`}),T=new P(`span`).className(`yoya-vpagination-jump-suffix`).styles({color:R(`color-text-muted`,`#64748b`),fontSize:`12px`}).text(`页`),E=new P(`label`).className(`yoya-vpagination-size-label`).attr(`for`,f).styles({color:R(`color-text-secondary`,`#475569`),fontSize:`12px`,fontWeight:`600`}),D=new P(`select`).className(`yoya-vpagination-page-size`).attr({"aria-label":`每页条数`,"data-role":`page-size`,id:f}).styles({boxSizing:`border-box`,minWidth:`92px`,width:`auto`});o=new P(`nav`).className(L,`yoya-vpagination`).attr({"aria-label":a.ariaLabel,id:c}).styles({alignItems:`center`,display:`flex`,flexWrap:`wrap`,gap:`12px`,justifyContent:`space-between`,minWidth:`0`,padding:`4px 0`}),o.child(h,g,v),h.child(p,m),g.child(y,b,_,x,S),_.child(ee,w,T,C),v.child(E,D),w.on(`keydown`,e=>{e.key===`Enter`&&(e.preventDefault(),ue())}),C.on(`click`,()=>ue()),y.on(`click`,()=>ce(1,!0)),b.on(`click`,()=>ce(a.page-1,!0)),x.on(`click`,()=>ce(a.page+1,!0)),S.on(`click`,()=>ce(a.totalPages,!0)),D.on(`change`,()=>{let e=A(D._el?.value??D.attr(`value`));e!==null&&le(e,!0)});let O={change(e){return e===void 0?s:(s=typeof e==`function`?e:null,O)},onChange(e){return O.change(e)},page(e){return e===void 0?a.page:(ce(e,!1),O)},pageSize(e){return e===void 0?a.pageSize:(le(e,!1),O)},pageSizes(e){return e===void 0?a.pageSizes.slice():(a.pageSizes=re(e),N(),O)},total(e){return e===void 0?a.total:(a.total=ne(e),a.totalPages=a.total===0?1:Math.max(1,Math.ceil(a.total/a.pageSize)),N(),O)},totalPages(e){return e===void 0?a.totalPages:(a.totalPages=j(e),N(),O)},update(e={}){if(q(e)){let{page:t,pageSize:n,pageSizes:r,total:i,totalPages:o}=e;r!==void 0&&(a.pageSizes=re(r)),n!==void 0&&(a.pageSize=A(n)??a.pageSize),i!==void 0&&(a.total=ne(i)),o===void 0?a.totalPages=a.total>0?Math.max(1,Math.ceil(a.total/a.pageSize)):1:a.totalPages=j(o),t!==void 0&&(a.page=M(t)),a.total===0?a.page=1:a.page=ae(a.page)}return N(),O},render(){return N(),o}};return te(r.first),N(),V(O,r.options,r.callback),O;function te(e){if(e!=null){if(typeof e==`function`){e(O);return}if(q(e)){let{ariaLabel:t,change:n,children:r,className:i,onChange:c,page:l,pageSize:u,pageSizes:d,total:f,totalPages:p,...m}=e;Object.keys(m).length>0&&o.setup(m),i!==void 0&&o.className(i),t!==void 0&&(a.ariaLabel=J(t)||a.ariaLabel),d!==void 0&&(a.pageSizes=re(d)),f!==void 0&&(a.total=ne(f)),u!==void 0&&(a.pageSize=A(u)??a.pageSize),p!==void 0&&(a.totalPages=j(p)),l!==void 0&&(a.page=M(l)),p===void 0&&a.total>0&&(a.totalPages=Math.max(1,Math.ceil(a.total/a.pageSize))),typeof n==`function`?s=n:typeof c==`function`&&(s=c),r!==void 0&&o.child(r);return}}}function k(e,t){let n=new P(`button`).className(`yoya-vpagination-button`).attr({"data-action":e,type:`button`}).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border-strong`,`#cbd5e1`),borderRadius:`6px`,color:R(`color-text`,`#172033`),cursor:`pointer`,font:`inherit`,lineHeight:`1`,padding:`6px 10px`,whiteSpace:`nowrap`});return G(n,W(t)),n}function A(e){let t=Number(J(e));return!Number.isFinite(t)||t<=0?null:Math.max(1,Math.floor(t))}function ne(e){let t=Number(J(e));return!Number.isFinite(t)||t<0?0:Math.floor(t)}function j(e){let t=Number(J(e));return!Number.isFinite(t)||t<=0?1:Math.max(1,Math.floor(t))}function M(e){let t=Number(J(e));return!Number.isFinite(t)||t<=0?1:Math.floor(t)}function re(e){return Array.isArray(e)?e.map((e,t)=>{if(Array.isArray(e)&&e.length>0){let[n,r=void 0]=e,i=J(n);return{disabled:!1,label:r??`${i} / 页`,value:i||`page-size-${t}`}}if(e instanceof l)return{disabled:!1,label:e,value:e.textContent()||`page-size-${t}`};if(q(e)){let n=J(e.value??e.key??e.id??e.label??e.text??e.title??`page-size-${t}`);return{disabled:!!e.disabled,label:e.label??e.text??e.content??e.title??`${n} / 页`,value:n||`page-size-${t}`}}let n=J(e);return{disabled:!1,label:`${n} / 页`,value:n||`page-size-${t}`}}).filter(e=>e.value!==``):[]}function ie(){let e=re(a.pageSizes);if(e.length===0){v.style(`display`,`none`),G(D,[]);return}let t=String(a.pageSize),n=e.some(e=>e.value===t)?e:[{disabled:!1,label:`${t} / 页`,value:t}].concat(e);v.style(`display`,null),G(D,n.map((e,n)=>{let r=new P(`option`).className(`yoya-vpagination-page-size-option`);return r.attr({disabled:e.disabled?!0:null,selected:e.value===t||null,value:e.value}),G(r,W(e.label)),r.attr(`data-option-index`,String(n)),r})),D.attr(`value`,t)}function ae(e){if(a.total===0)return 1;let t=Math.max(1,a.totalPages);return Math.min(Math.max(1,M(e)),t)}function oe(e,t){e.attr(`disabled`,t?!0:null),e.attr(`aria-disabled`,t?`true`:null),e.style(`cursor`,t?`not-allowed`:`pointer`),e.style(`opacity`,t?`0.56`:`1`)}function N(){return a.total=ne(a.total),a.pageSize=A(a.pageSize)??1,a.totalPages=a.total===0?1:Math.max(1,j(a.totalPages)),a.page=a.total===0?1:ae(a.page),o.attr(`aria-label`,a.ariaLabel||`分页`),o.attr(`data-empty`,a.total===0?`true`:null),o.attr(`data-page`,String(a.page)),o.attr(`data-page-size`,String(a.pageSize)),o.attr(`data-total`,String(a.total)),o.attr(`data-total-pages`,String(a.totalPages)),p.textContent(`共 ${a.total} 条`),m.textContent(`第 ${a.page} / ${a.totalPages} 页`),w.attr({disabled:a.total===0||null,max:String(a.totalPages),min:`1`,value:String(a.page)}),w.attr(`aria-disabled`,a.total===0?`true`:null),C.attr(`disabled`,a.total===0||null),C.attr(`aria-disabled`,a.total===0?`true`:null),oe(y,a.total===0||a.page<=1),oe(b,a.total===0||a.page<=1),oe(x,a.total===0||a.page>=a.totalPages),oe(S,a.total===0||a.page>=a.totalPages),ie(),O}function se(){typeof s==`function`&&s({page:a.page,pageSize:a.pageSize})}function ce(e,t=!1){if(a.total===0)return N(),O;let n=ae(e);return n===a.page?(N(),O):(a.page=n,N(),t&&se(),O)}function le(e,t=!1){let n=A(e);if(n===null)return N(),O;let r=n!==a.pageSize;return r&&(a.pageSize=n,a.page=1,a.totalPages=a.total===0?1:Math.max(1,Math.ceil(a.total/a.pageSize))),N(),t&&r&&se(),O}function ue(){if(a.total===0)return O;let e=M(w._el?.value??w.attr(`value`));return e<=0?O:ce(e,!0)}}function _c(e=null,t=null,n=null){let r=B(e,t,n);return r.first&&typeof r.first.render==`function`&&typeof r.first.update==`function`?V(r.first,r.options,r.callback):V(gc(r.first),r.options,r.callback)}var vc={error:R(`color-danger`,`#dc2626`),normal:R(`color-primary`,`#2563eb`),processing:R(`color-info`,`#0284c7`),success:R(`color-success`,`#16a34a`),warning:R(`color-warning`,`#f59e0b`)},yc=class extends P{constructor(e=null){super(`div`,null),this._value=0,this._max=100,this._percent=0,this._showText=!0,this._status=`normal`,this._size=`default`,this._strokeColor=null,this._indeterminate=!1,this._format=null,this._textContent=null,this._ariaLabel=null,this._labelBox=new P(`span`).className(`yoya-vprogress-label`).attr(`aria-hidden`,`true`).style(`display`,`none`),this._track=new P(`div`).className(`yoya-vprogress-track`),this._bar=new P(`span`).className(`yoya-vprogress-bar`),this._textBox=new P(`span`).className(`yoya-vprogress-text`),this._track.child(this._bar),this.className(L,`yoya-vprogress`),this.attr({"aria-valuemax":`100`,"aria-valuemin":`0`,"aria-valuenow":`0`,"data-percent":`0`,"data-size":`default`,"data-status":`normal`,"data-value":`0`,role:`progressbar`}),super.child(this._labelBox,this._track,this._textBox),this._setupProgress(e),this._syncProgress()}value(e){if(e===void 0)return this._value;let t=Number(e);return Number.isFinite(t)&&(this._value=Math.max(0,Math.min(this._max,t))),this._syncProgress(),this}max(e){if(e===void 0)return this._max;let t=Number(e);return this._max=Number.isFinite(t)&&t>0?t:100,this._value>this._max&&(this._value=this._max),this._syncProgress(),this}percent(e){if(e===void 0)return this._percent;let t=Number(e);return Number.isFinite(t)&&(this._value=this._max*Math.max(0,Math.min(100,t))/100),this._syncProgress(),this}showText(e){return e===void 0?this._showText:(this._showText=!!e,this.attr(`data-show-text`,this._showText?`true`:null),this._syncProgress(),this)}label(e){return e===void 0?this._labelBox.textContent():(G(this._labelBox,W(e)),this._syncProgress(),this)}text(e){return e===void 0?this._textContent:(this._textContent=e??null,this._syncProgress(),this)}format(e){return e===void 0?this._format:(this._format=typeof e==`function`?e:null,this._syncProgress(),this)}status(e){return e===void 0?this._status:(this._status=[`error`,`normal`,`processing`,`success`,`warning`].includes(e)?e:`normal`,this.attr(`data-status`,this._status),this._syncProgress(),this)}size(e){return e===void 0?this._size:(this._size=[`default`,`large`,`small`].includes(e)?e:`default`,this.attr(`data-size`,this._size),this)}strokeColor(e){return e===void 0?this._strokeColor:(this._strokeColor=e||null,this._syncProgress(),this)}indeterminate(e){return e===void 0?this._indeterminate:(this._indeterminate=!!e,this._syncProgress(),this)}active(e){return this.indeterminate(e)}ariaLabel(e){return e===void 0?this._ariaLabel:(this._ariaLabel=e==null?null:String(e),this._syncProgress(),this)}_setupProgress(e){if(e!=null){if(typeof e==`function`){e(this);return}if(typeof e==`number`||typeof e==`string`&&!Number.isNaN(Number(e))){this.value(e);return}if(q(e)){let{active:t,ariaLabel:n,children:r,format:i,indeterminate:a,label:o,max:s,percent:c,showText:l,size:u,status:d,strokeColor:f,text:p,value:m,...h}=e;Object.keys(h).length>0&&this.setup(h),n!==void 0&&this.ariaLabel(n),o!==void 0&&this.label(o),s!==void 0&&this.max(s),m!==void 0&&this.value(m),c!==void 0&&this.percent(c),l!==void 0&&this.showText(l),d!==void 0&&this.status(d),u!==void 0&&this.size(u),f!==void 0&&this.strokeColor(f),i!==void 0&&this.format(i),p===void 0?r!==void 0&&this.text(r):this.text(p),a===void 0?t!==void 0&&this.indeterminate(t):this.indeterminate(a);return}this.label(e)}}_syncProgress(){let e=this._max>0?this._value/this._max*100:0;this._percent=Number.isFinite(e)?Math.max(0,Math.min(100,e)):0;let t=this._strokeColor||vc[this._status]||vc.normal;if(this.attr(`aria-label`,this._ariaLabel),this.attr(`aria-valuemax`,String(this._max)),this.attr(`aria-valuenow`,this._indeterminate?null:String(this._value)),this.attr(`data-indeterminate`,this._indeterminate?`true`:null),this.attr(`data-percent`,String(Number(this._percent.toFixed(2)))),this.attr(`data-value`,String(this._value)),this.attr(`data-has-label`,this._labelBox.children().length>0?`true`:null),this._labelBox.style(`display`,this._labelBox.children().length>0?`inline-flex`:`none`),this._bar.style(`background`,t),this._indeterminate?this._bar.styles({animation:`yoya-vprogress-indeterminate 1.2s ease-in-out infinite`,width:`100%`}):this._bar.styles({animation:null,width:`${this._percent}%`}),this._showText){let e=this._textContent;e??=this._indeterminate?`处理中`:this._format?this._format(this._value,this._percent):`${Math.round(this._percent)}%`,this._textBox.style(`display`,`inline-flex`),G(this._textBox,W(e))}else this._textBox.style(`display`,`none`);return this}};function bc(e=null,t=null,n=null){return H(yc,e,t,n)}var xc=class extends P{constructor(e=null){super(`div`,null),this.className(L,`yoya-vcard`),this.styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#d8dee8`),borderRadius:`8px`,boxShadow:`0 1px 2px rgba(15, 23, 42, 0.05)`,color:R(`color-text-strong`,`#111827`),overflow:`hidden`}),U(this,e)}},Sc=class extends P{constructor(e=null){super(`div`,null),this.className(`yoya-vcard-header`),this.styles({borderBottom:z(`color-border-faint`,`#e5e7eb`),fontWeight:`700`,padding:`12px 16px`}),U(this,e)}},Cc=class extends P{constructor(e=null){super(`div`,null),this.className(`yoya-vcard-body`),this.styles({padding:`16px`}),U(this,e)}},wc=class extends P{constructor(e=null){super(`div`,null),this.className(`yoya-vcard-footer`),this.styles({alignItems:`center`,background:R(`color-surface-hover`,`#f8fafc`),borderTop:z(`color-border-faint`,`#e5e7eb`),display:`flex`,gap:`8px`,justifyContent:`flex-end`,padding:`12px 16px`}),U(this,e)}};function Tc(e=null,t=null,n=null){return H(xc,e,t,n)}function Ec(e=null,t=null,n=null){return H(Sc,e,t,n)}function Dc(e=null,t=null,n=null){return H(Cc,e,t,n)}function Oc(e=null,t=null,n=null){return H(wc,e,t,n)}var kc=class extends P{constructor(e=null){super(`div`,null),this._columns=[],this._rows=[],this._emptyContent=`暂无数据`,this._hasDeclarativeSections=!1,this._captionBox=new P(`caption`).className(`yoya-vtable-caption`),this._head=new P(`thead`).className(`yoya-vtable-head`),this._body=new P(`tbody`).className(`yoya-vtable-body`),this._table=new P(`table`).className(`yoya-vtable-table`),this._scroll=new P(`div`).className(`yoya-vtable-scroll`),this.className(L,`yoya-vtable`),this.styles({display:`block`,minWidth:`0`}),this._scroll.styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#d8dee8`),borderRadius:`8px`,overflowX:`auto`}),this._table.styles({borderCollapse:`collapse`,color:R(`color-text`,`#172033`),width:`100%`}),this._captionBox.styles({captionSide:`top`,color:R(`color-text-strong`,`#111827`),fontWeight:`700`,padding:`0 0 12px`,textAlign:`left`}),this._captionBox.style(`display`,`none`),this._scroll.child(this._table),this._table.child(this._captionBox,this._head,this._body),this.child(this._scroll),this._setupTable(e)}caption(e){if(e===void 0)return this._captionBox.textContent();let t=e!=null&&e!==``;return this._captionBox.style(`display`,t?null:`none`),G(this._captionBox,t?W(e):[]),this}columns(e){return e===void 0?this._columns.slice():(this._columns=Uc(e),this._renderTable(),this)}rows(e){return e===void 0?this._rows.slice():(this._rows=Array.isArray(e)?e.slice():[],this._renderTable(),this)}empty(e){return e===void 0?this._emptyContent:(this._emptyContent=e,this._renderTable(),this)}emptyText(e){return e===void 0?this._emptyContent:this.empty(e)}data(e){if(e===void 0)return{caption:this.caption(),columns:this.columns(),emptyText:this.emptyText(),rows:this.rows()};if(Array.isArray(e))return this.rows(e),this;if(q(e)){let{caption:t,columns:n,empty:r,emptyText:i,rows:a}=e;t!==void 0&&this.caption(t),n!==void 0&&this.columns(n),a!==void 0&&this.rows(a),i===void 0?r!==void 0&&this.emptyText(r):this.emptyText(i)}return this}child(...e){return e.flat(1/0).forEach(e=>{if(e instanceof jc||e instanceof Nc||e instanceof Fc){this._addDeclarativeSection(e);return}if(e instanceof Lc){this.vTr(e);return}super.child(e)}),this}vThead(e){return this._addDeclarativeSection(e instanceof jc?e:Mc(e))}vTbody(e){return this._addDeclarativeSection(e instanceof Nc?e:Pc(e))}vTfoot(e){return this._addDeclarativeSection(e instanceof Fc?e:Ic(e))}vTr(e){let t=e instanceof Lc?e:Rc(e);if(this._hasDeclarativeSections){let e=this._table.children().find(e=>e instanceof Nc);return e?e.child(t):this.vTbody(e=>e.child(t)),this}return this._body.child(t),this}_addDeclarativeSection(e){return this._hasDeclarativeSections||(this._hasDeclarativeSections=!0,this._detachAutoSections()),this._table.child(e),this}_detachAutoSections(){this._table._children=this._table._children.filter(e=>e!==this._head&&e!==this._body),this._table._childrenDirty=!0,this._table._el&&(this._head._el?.remove(),this._body._el?.remove())}_resetTableShell(){this._table._children.filter(e=>e instanceof jc||e instanceof Nc||e instanceof Fc).forEach(e=>e.destroy()),this._table._children=[this._captionBox,this._head,this._body],this._table._childrenDirty=!0,this._table._el&&this._table._el.replaceChildren(this._captionBox.renderDom(),this._head.renderDom(),this._body.renderDom()),this._hasDeclarativeSections=!1}_renderTable(){this._resetTableShell();let e=this._columns.length>0?this._columns:Wc(this._rows),t=e.length>0?e:[{key:`__value`,label:``}];if(G(this._head,[]),G(this._body,[]),e.length>0){let t=new P(`tr`).className(`yoya-vtable-head-row`);e.forEach((e,n)=>{let r=new P(`th`).className(`yoya-vtable-head-cell`),i=e.key??`column-${n}`;r.attr(`scope`,`col`),r.attr(`data-key`,i),qc(r,e,`head`),Kc(r,e.label??e.title??e.key??``),t.child(r)}),this._head.child(t)}if(this._rows.length>0)this._rows.forEach((e,n)=>{let r=new P(`tr`).className(`yoya-vtable-row`);r.attr(`data-row-index`,String(n)),t.forEach((t,i)=>{let a=new P(`td`).className(`yoya-vtable-cell`),o=t.key??`column-${i}`;a.attr(`data-key`,o),qc(a,t,`body`),Kc(a,Gc(t,e,n)),r.child(a)}),this._body.child(r)});else{let t=new P(`tr`).className(`yoya-vtable-empty-row`),n=new P(`td`).className(`yoya-vtable-empty`);n.attr(`colspan`,String(Math.max(e.length,1))),n.styles({color:R(`color-text-muted`,`#64748b`),padding:`var(--yoya-space-4, 16px) var(--yoya-space-3, 12px)`,textAlign:`center`}),Kc(n,this._emptyContent),t.child(n),this._body.child(t)}}_setupTable(e){if(e!=null){if(e instanceof jc||e instanceof Nc||e instanceof Fc){this._addDeclarativeSection(e);return}if(e instanceof Lc){this.vTr(e);return}if(typeof e==`function`){e(this);return}if(Array.isArray(e)){this.rows(e);return}if(q(e)){this.setup(e);return}this.caption(e)}}};function Ac(e=null,t=null,n=null){return H(kc,e,t,n)}var jc=class extends P{constructor(e=null){super(`thead`,null),this.className(`yoya-vtable-head`),U(this,e)}};function Mc(e=null,t=null,n=null){return H(jc,e,t,n)}var Nc=class extends P{constructor(e=null){super(`tbody`,null),this.className(`yoya-vtable-body`),U(this,e)}};function Pc(e=null,t=null,n=null){return H(Nc,e,t,n)}var Fc=class extends P{constructor(e=null){super(`tfoot`,null),this.className(`yoya-vtable-foot`),U(this,e)}};function Ic(e=null,t=null,n=null){return H(Fc,e,t,n)}var Lc=class extends P{constructor(e=null){super(`tr`,null),this.className(`yoya-vtable-row`),this._setupTr(e)}_setupTr(e){if(Array.isArray(e)){e.forEach(e=>this.child(Hc(e)));return}U(this,e)}};function Rc(e=null,t=null,n=null){return H(Lc,e,t,n)}var zc=class extends P{constructor(e=null){super(`th`,null),this.className(`yoya-vtable-head-cell`),this.attr(`scope`,`col`),qc(this,{},`head`),U(this,e)}};function Bc(e=null,t=null,n=null){return H(zc,e,t,n)}var Vc=class extends P{constructor(e=null){super(`td`,null),this.className(`yoya-vtable-cell`),qc(this,{},`body`),U(this,e)}};function Hc(e=null,t=null,n=null){return H(Vc,e,t,n)}v(jc,{vTr:Rc}),v(Nc,{vTr:Rc}),v(Fc,{vTr:Rc}),v(Lc,{vTh:Bc,vTd:Hc});function Uc(e){return Array.isArray(e)?e.map((e,t)=>{if(typeof e==`string`||typeof e==`number`){let t=String(e);return{key:t,label:t}}if(Array.isArray(e)&&e.length>0){let[n,r=n]=e;return{key:n??`column-${t}`,label:r??n??``}}if(q(e)){let n=e.key??e.field??e.name??e.label??e.title??`column-${t}`;return{...e,key:n,label:e.label??e.title??e.name??n}}return{key:`column-${t}`,label:String(e??``)}}):[]}function Wc(e){if(!Array.isArray(e))return[];let t=e.find(e=>e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof l));return t?Object.keys(t).map(e=>({key:e,label:e})):[]}function Gc(e,t,n){return typeof e.render==`function`?e.render(t,n,e):typeof e.value==`function`?e.value(t,n,e):e.key===`__value`?t:e.value===void 0?e.key&&t&&typeof t==`object`&&!Array.isArray(t)?t[e.key]:t:e.value}function Kc(e,t){return t!=null&&e.child(t),e}function qc(e,t,n){let r=n===`head`;e.styles({borderBottom:z(`color-border-faint`,`#e2e8f0`),fontWeight:r?`700`:`400`,padding:`var(--yoya-space-3, 12px) var(--yoya-space-3, 12px)`,textAlign:t.align||`left`,verticalAlign:`top`,whiteSpace:t.wrap===!1?`nowrap`:`normal`}),r?(e.style(`background`,R(`color-surface-hover`,`#f8fafc`)),e.style(`color`,R(`color-text-secondary`,`#334155`))):e.style(`color`,R(`color-text`,`#172033`)),t.className!==void 0&&e.className(t.className),t.style!==void 0&&e.styles(t.style),t.width!==void 0&&e.style(`width`,typeof t.width==`number`?`${t.width}px`:t.width),t.minWidth!==void 0&&e.style(`minWidth`,typeof t.minWidth==`number`?`${t.minWidth}px`:t.minWidth),t.maxWidth!==void 0&&e.style(`maxWidth`,typeof t.maxWidth==`number`?`${t.maxWidth}px`:t.maxWidth)}var Jc=class extends l{constructor(e){super(),this._html=e}renderDom(){if(!this._el){let e=document.createElement(`template`);e.innerHTML=this._html,this._el=e.content.firstElementChild}return this._el}toHTML(){return this._html}},Yc=class extends P{constructor(e=!1){super(`input`),this._treeIndeterminate=!!e}renderDom(){let e=super.renderDom();return e.indeterminate=this._treeIndeterminate,e}},Xc=class e{constructor(t=null){this._children=[],this._state={actions:null,checked:!1,disabled:!1,expandable:!1,expanded:!1,icon:null,id:da(`tree-node`),label:``,selected:!1},this.vTreeNode=t=>{let n=t instanceof e?t:new e(t);return this._children.push(n),n},this.node=this.vTreeNode,this.child=(...t)=>(t.flat(1/0).forEach(t=>{this._children.push(t instanceof e?t:new e(t))}),this),this._setup(t)}id(e){return e===void 0?this._state.id:(this._state.id=String(J(e)),this)}key(e){return this.id(e)}label(e){return e===void 0?this._state.label:(this._state.label=e,this)}text(e){return this.label(e)}content(e){return this.label(e)}title(e){return this.label(e)}actions(e){return e===void 0?this._state.actions:(this._state.actions=e??null,this)}icon(e){return e===void 0?this._state.icon:(this._state.icon=e??null,this)}expanded(e){return e===void 0?this._state.expanded:(this._state.expanded=!!e,this)}expandable(e){return e===void 0?this._state.expandable:(this._state.expandable=!!e,this)}selected(e){return e===void 0?this._state.selected:(this._state.selected=!!e,this)}checked(e){return e===void 0?this._state.checked:(this._state.checked=!!e,this)}disabled(e){return e===void 0?this._state.disabled:(this._state.disabled=!!e,this)}toData(){return{actions:this._state.actions,checked:this._state.checked,children:this._children.map(e=>e.toData()),disabled:this._state.disabled,expandable:this._state.expandable,expanded:this._state.expanded,icon:this._state.icon,id:this._state.id,label:this._state.label,selected:this._state.selected}}_setup(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{actions:t,checked:n,children:r,disabled:i,expandable:a,expanded:o,icon:s,id:c,label:l,selected:u,text:d,title:f}=e;c!==void 0&&this.id(c),l===void 0?d===void 0?f!==void 0&&this.label(f):this.label(d):this.label(l),s!==void 0&&this.icon(s),t!==void 0&&this.actions(t),o!==void 0&&this.expanded(o),a!==void 0&&this.expandable(a),u!==void 0&&this.selected(u),n!==void 0&&this.checked(n),i!==void 0&&this.disabled(i),r!==void 0&&this.child(r);return}this.label(e)}}};function Zc(e=null,t=null,n=null){let r=B(e,t,n),i={ariaLabel:`树形控件`,building:!0,builderNodes:[],checkable:!1,checkedKeys:new Set,emptyText:`暂无数据`,expandedKeys:new Set,multiple:!1,nodes:[],rowsDirty:!1,selectable:!0,selectedKeys:new Set,toggleIcon:null,treeDirty:!0,visibleNodes:[]},a=null,o=null,s=null,c=null,l=new P(`div`).className(L,`yoya-vtree`).attr({"aria-label":i.ariaLabel,"data-tree":`true`,id:da(`yoya-vtree`),role:`tree`}).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#d8dee8`),borderRadius:`8px`,boxSizing:`border-box`,minWidth:`0`,padding:`6px`,width:`100%`}),u=new P(`div`).className(`yoya-vtree-list`).styles({display:`grid`,gap:`2px`,minWidth:`0`}),d=new P(`div`).className(`yoya-vtree-empty`).attr(`role`,`status`).styles({color:R(`color-text-muted`,`#64748b`),display:`none`,fontSize:`0.88rem`,padding:`18px 10px`,textAlign:`center`});l.child(u,d),l.on(`keydown`,ne);let f={ariaLabel(e){return e===void 0?i.ariaLabel:(i.ariaLabel=J(e)||`树形控件`,l.attr(`aria-label`,i.ariaLabel),p(),f)},change(e){return e===void 0?a:(a=typeof e==`function`?e:null,f)},onChange(e){return f.change(e)},checked(e){return e===void 0?f.checkedKeys():Array.isArray(e)?f.checkedKeys(e):i.checkedKeys.has(String(e))},checkedKeys(e){return e===void 0?[...i.checkedKeys]:(i.checkedKeys=new Set(rl(e)),p(),f)},check(e,t=void 0){let n=il(i.nodes,e);return!n||n.disabled?f:(re(n,t===void 0?!i.checkedKeys.has(n.id):!!t),p(),M(`check`,n),f)},checkable(e){return e===void 0?i.checkable:(i.checkable=!!e,i.treeDirty=!0,p(),f)},checkAll(e=!0){let t=!!e,n=[];return sl(i.nodes,e=>{e.disabled||n.push(e.id)}),t?n.forEach(e=>i.checkedKeys.add(e)):n.forEach(e=>i.checkedKeys.delete(e)),p(),M(`check`,null),f},collapseAll(){return i.expandedKeys.clear(),i.treeDirty=!0,p(),f},collapseNode(e){return f.expandNode(e,!1)},data(e){return f.nodes(e)},emptyText(e){return e===void 0?i.emptyText:(i.emptyText=e,p(),f)},expandAll(){let e=[];return sl(i.nodes,t=>{cl(t)&&e.push(t.id)}),i.expandedKeys=new Set(e),i.treeDirty=!0,p(),f},expandedKeys(e){return e===void 0?[...i.expandedKeys]:(i.expandedKeys=new Set(rl(e)),i.treeDirty=!0,p(),f)},expandNode(e,t=!0){let n=il(i.nodes,e);if(!n||!cl(n))return f;let r=!!t;return i.expandedKeys.has(n.id)===r?f:(r?i.expandedKeys.add(n.id):i.expandedKeys.delete(n.id),i.treeDirty=!0,p(),M(`expand`,n),f)},multiple(e){return e===void 0?i.multiple:(i.multiple=!!e,p(),f)},nodes(e){return e===void 0?i.nodes.slice():(i.builderNodes=Array.isArray(e)?e:[e],i.nodes=i.builderNodes.map((e,t)=>tl(e,t)),i.expandedKeys=new Set,i.selectedKeys=new Set,i.checkedKeys=new Set,nl(i,i.nodes),ol(i.nodes),i.treeDirty=!0,p(),f)},vTreeNode(e){let t=e instanceof Xc?e:new Xc(e);return i.builderNodes.push(t),i.nodes=i.builderNodes.map((e,t)=>tl(e,t)),nl(i,i.nodes),ol(i.nodes),i.treeDirty=!0,p(),t},node(e){return f.vTreeNode(e)},addNode(e){return f.vTreeNode(e)},onCheck(e){return e===void 0?o:(o=typeof e==`function`?e:null,f)},onSelect(e){return e===void 0?s:(s=typeof e==`function`?e:null,f)},onToggle(e){return e===void 0?c:(c=typeof e==`function`?e:null,f)},render(){return h(),l},select(e,t=void 0){let n=il(i.nodes,e);if(!n||n.disabled)return f;let r=i.selectedKeys.has(n.id),a=t===void 0?!i.multiple||!r:!!t;return a?i.selectedKeys=i.multiple?new Set([...i.selectedKeys,n.id]):new Set([n.id]):i.selectedKeys.delete(n.id),r===a?(p(),f):(p(),M(`select`,n),f)},selectable(e){return e===void 0?i.selectable:(i.selectable=!!e,i.rowsDirty=!0,p(),f)},selected(e){return e===void 0?ll(i.nodes,i.selectedKeys):Array.isArray(e)?f.selectedKeys(e):i.selectedKeys.has(String(e))},selectedKeys(e){return e===void 0?[...i.selectedKeys]:(i.selectedKeys=new Set(rl(e)),p(),f)},toggleNode(e){let t=il(i.nodes,e);return!t||!cl(t)?f:f.expandNode(e,!i.expandedKeys.has(e))},toggleIcon(e,t){return e===void 0&&t===void 0?i.toggleIcon:(t===void 0?q(e)&&`collapsed`in e?i.toggleIcon={collapsed:el(e.collapsed),expanded:el(e.expanded)}:i.toggleIcon=el(e):i.toggleIcon={collapsed:el(e),expanded:el(t)},i.treeDirty=!0,p(),f)},update(e){return i.building=!0,m(e),i.building=!1,h(),f},destroy(){return l.destroy(),f}};return m(r.first),i.building=!1,h(),V(f,r.options,r.callback),f;function p(){i.building||h()}function m(e){if(e==null)return;if(typeof e==`function`){e(f);return}if(Array.isArray(e)){f.nodes(e);return}if(!q(e))return;let{ariaLabel:t,change:n,checked:r,checkedKeys:i,checkable:a,children:o,className:s,data:c,emptyText:u,expandAll:d,expandedKeys:p,multiple:m,nodes:h,onCheck:g,onChange:_,onSelect:v,onToggle:y,selectable:b,selected:x,selectedKeys:S,toggleIcon:C,...w}=e;Object.keys(w).length>0&&l.setup(w),s!==void 0&&l.className(s),t!==void 0&&f.ariaLabel(t),a!==void 0&&f.checkable(a),m!==void 0&&f.multiple(m),b!==void 0&&f.selectable(b),C!==void 0&&f.toggleIcon(C),u!==void 0&&f.emptyText(u);let ee=h??c??o;ee!==void 0&&f.nodes(ee),p!==void 0&&f.expandedKeys(p),S===void 0?x!==void 0&&f.selectedKeys(x):f.selectedKeys(S),i===void 0?r!==void 0&&f.checkedKeys(r):f.checkedKeys(i),d===!0&&f.expandAll(),typeof n==`function`?f.change(n):typeof _==`function`&&f.change(_),typeof v==`function`&&f.onSelect(v),typeof y==`function`&&f.onToggle(y),typeof g==`function`&&f.onCheck(g)}function h(){let e=i.nodes.length>0;l.attr(`aria-label`,i.ariaLabel),l.attr(`data-checkable`,i.checkable?`true`:null),l.attr(`data-checked-count`,String(i.checkedKeys.size)),l.attr(`data-empty`,e?null:`true`),l.attr(`data-expanded-count`,String(i.expandedKeys.size)),l.attr(`data-multiple`,i.multiple?`true`:null),l.attr(`data-selected-count`,String(i.selectedKeys.size)),e?(d.style(`display`,`none`),G(d,[])):(d.style(`display`,null),G(d,W(i.emptyText))),x(),i.treeDirty||i.visibleNodes.length===0?(g(),i.treeDirty=!1,i.rowsDirty=!1):(_(i.rowsDirty),i.rowsDirty=!1),te(0)}function g(){i.visibleNodes=[],G(u,[]),i.nodes.length>0&&i.nodes.forEach(e=>S(e,0,null))}function _(e=!1){i.visibleNodes.forEach(t=>{let{checkbox:n,node:r,row:a,toggle:o}=t,s=i.selectedKeys.has(r.id),c=cl(r)&&i.expandedKeys.has(r.id);if((t.selected!==s||e)&&(v(a,r,s,t.level),t.selected=s),o&&t.expanded!==c&&(y(t,c),a.attr(`aria-expanded`,String(c)),t.expanded=c),n){let e=i.checkedKeys.has(r.id),a=O(r);(t.checked!==e||t.indeterminate!==a)&&(b(n,r,e,a),t.checked=e,t.indeterminate=a)}})}function v(e,t,n,r){e.styles(w(t,n,r)),e.attr(`aria-selected`,i.selectable?String(n):null)}function y(e,t){let{iconBox:n,node:r,toggle:a}=e,o=J(r.label)||r.id;if(a.attr(`aria-expanded`,String(t)),a.attr(`aria-label`,t?`收起 ${o}`:`展开 ${o}`),i.toggleIcon){let e=q(i.toggleIcon)?t?i.toggleIcon.expanded:i.toggleIcon.collapsed:i.toggleIcon;if(G(n,[]),typeof e==`function`){let r=e(n,t);r&&r!==n&&n.child(r)}else typeof e==`string`?n.child(new Jc(e)):G(n,W(e))}else G(a,W(t?`▾`:`▸`))}function b(e,t,n,r){e.attr(`checked`,n?!0:null),e.attr(`aria-checked`,r?`mixed`:n?`true`:`false`),e._treeIndeterminate=r,e._el&&(e._el.indeterminate=r)}function x(){let e=t=>{t.forEach(t=>{t.checked=i.checkedKeys.has(t.id),t.selected=i.selectedKeys.has(t.id),t.expanded=i.expandedKeys.has(t.id),e(t.children)})};e(i.nodes)}function S(e,t,n){let r=cl(e)&&i.expandedKeys.has(e.id),{checkbox:a,iconBox:o,row:s,toggle:c}=C(e,t,r);i.visibleNodes.push({checked:i.checkedKeys.has(e.id),checkbox:a,expanded:r,iconBox:o,indeterminate:O(e),level:t,node:e,parentId:n,row:s,selected:i.selectedKeys.has(e.id),toggle:c}),u.child(s),r&&e.children.forEach(n=>S(n,t+1,e.id))}function C(e,t,n){let r=i.selectedKeys.has(e.id),a=new P(`div`).className(`yoya-vtree-node`).attr({"aria-disabled":e.disabled?`true`:null,"aria-expanded":cl(e)?String(i.expandedKeys.has(e.id)):null,"aria-level":String(t+1),"aria-selected":i.selectable?String(r):null,"data-node-id":e.id,role:`treeitem`,tabindex:`-1`}).styles(w(e,r,t));a.on(`click`,()=>{e.disabled||!i.selectable||(f.select(e.id),A(e.id))}),a.on(`mouseenter`,()=>{if(e.disabled)return;let t=i.selectedKeys.has(e.id);a.styles({background:t?R(`color-primary-active-subtle`,`#dbeafe`):R(`color-surface-hover`,`#f1f5f9`),borderColor:t?R(`color-primary-border`,`#93c5fd`):R(`color-border-faint`,`#e2e8f0`)})}),a.on(`mouseleave`,()=>{let n=i.selectedKeys.has(e.id);a.styles(w(e,n,t))});let o=null,s=null,c=null;if(cl(e)){let t=ee(e,n);c=t.toggle,s=t.iconBox,a.child(c)}else a.child(new P(`span`).className(`yoya-vtree-indent`).styles({display:`inline-block`,flex:`0 0 auto`,width:`20px`}));i.checkable&&(o=T(e),a.child(o)),e.icon!==null&&e.icon!==void 0&&a.child(E(e.icon));let l=new P(`span`).className(`yoya-vtree-label`).styles({flex:`1 1 auto`,minWidth:`0`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`});return G(l,W(e.label)),a.child(l),e.actions!==null&&e.actions!==void 0&&a.child(D(e)),{checkbox:o,iconBox:s,row:a,toggle:c}}function w(e,t,n){return{alignItems:`center`,background:t?R(`color-primary-subtle`,`#eff6ff`):`transparent`,border:t?z(`color-primary-border`,`#bfdbfe`):`1px solid transparent`,borderRadius:`6px`,boxSizing:`border-box`,color:t?R(`color-primary-hover`,`#1d4ed8`):e.disabled?R(`color-text-muted`,`#94a3b8`):R(`color-text`,`#172033`),cursor:i.selectable&&!e.disabled?`pointer`:`default`,display:`flex`,gap:`4px`,minHeight:`var(--yoya-tree-row-height, 34px)`,minWidth:`0`,padding:`2px 8px 2px ${8+n*18}px`,transition:`background 120ms ease, border-color 120ms ease`,width:`100%`}}function ee(e,t){let n=J(e.label)||e.id,r=new P(`button`).className(`yoya-vtree-toggle`).attr({"aria-expanded":String(t),"aria-label":t?`收起 ${n}`:`展开 ${n}`,tabindex:`-1`,type:`button`}).styles({alignItems:`center`,background:`transparent`,border:`0`,borderRadius:`4px`,color:R(`color-text-secondary`,`#475569`),cursor:`pointer`,display:`inline-flex`,flex:`0 0 auto`,font:`inherit`,height:`var(--yoya-tree-toggle-size, 20px)`,justifyContent:`center`,lineHeight:`1`,padding:`0`,width:`var(--yoya-tree-toggle-size, 20px)`}),a=null;if(i.toggleIcon){a=new P(`span`).className(`yoya-vtree-toggle-icon`).styles({alignItems:`center`,display:`inline-flex`,justifyContent:`center`,lineHeight:`1`});let e=q(i.toggleIcon)?t?i.toggleIcon.expanded:i.toggleIcon.collapsed:i.toggleIcon;if(typeof e==`function`){let n=e(a,t);n&&n!==a&&a.child(n)}else typeof e==`string`?a.child(new Jc(e)):G(a,W(e));r.child(a)}else r.text(t?`▾`:`▸`);return r.on(`click`,t=>{t.stopPropagation(),f.toggleNode(e.id),A(e.id)}),{iconBox:a,toggle:r}}function T(e){let t=i.checkedKeys.has(e.id),n=O(e),r=new Yc(n).className(`yoya-vtree-checkbox`).attr({"aria-checked":n?`mixed`:t?`true`:`false`,"aria-label":`选择 ${J(e.label)||e.id}`,checked:t?!0:null,disabled:e.disabled?!0:null,tabindex:`-1`,type:`checkbox`}).styles({flex:`0 0 auto`,height:`16px`,margin:`0`,width:`16px`});return r.on(`click`,e=>e.stopPropagation()),r.on(`change`,()=>{f.check(e.id,r._el?.checked??!1)}),r}function E(e){let t=new P(`span`).className(`yoya-vtree-icon`).styles({alignItems:`center`,color:R(`color-text-muted`,`#64748b`),display:`inline-flex`,flex:`0 0 auto`,fontSize:`0.82rem`,justifyContent:`center`,minWidth:`18px`});if(typeof e==`function`){let n=e(t);n&&n!==t&&t.child(n)}else G(t,W(e));return t}function D(e){let t=new P(`span`).className(`yoya-vtree-node-actions`).styles({alignItems:`center`,display:`inline-flex`,flex:`0 0 auto`,gap:`4px`,marginLeft:`auto`});if(t.on(`click`,e=>e.stopPropagation()),typeof e.actions==`function`){let n=e.actions(t,e);n&&n!==t&&t.child(n)}else G(t,W(e.actions));return t}function O(e){if(!i.checkable||e.children.length===0)return!1;let t=e.ids||al(e),n=t.some(e=>i.checkedKeys.has(e)),r=t.every(e=>i.checkedKeys.has(e));return n&&!r}function te(e){i.visibleNodes.forEach((t,n)=>{let r=!t.node.disabled;t.row.attr(`tabindex`,r&&n===e?`0`:`-1`)})}function k(e){let t=i.visibleNodes[e];!t||t.node.disabled||(te(e),t.row._el?.focus())}function A(e){let t=i.visibleNodes.findIndex(t=>t.node.id===e);t>=0&&k(t)}function ne(e){let t=e.target.closest?.(`.yoya-vtree-node`);if(!t||t.closest(`.yoya-vtree`)!==l._el)return;let n=i.visibleNodes.findIndex(e=>e.row._el===t);if(n===-1||!new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Enter`,`Home`,` `,`Spacebar`]).has(e.key))return;e.preventDefault();let r=i.visibleNodes[n];switch(e.key){case`ArrowDown`:j(n,1);break;case`ArrowUp`:j(n,-1);break;case`Home`:j(-1,1);break;case`End`:j(i.visibleNodes.length,-1);break;case`ArrowRight`:cl(r.node)&&(i.expandedKeys.has(r.node.id)?n+1<i.visibleNodes.length&&k(n+1):(f.expandNode(r.node.id),A(r.node.id)));break;case`ArrowLeft`:if(cl(r.node)&&i.expandedKeys.has(r.node.id))f.collapseNode(r.node.id),A(r.node.id);else{let e=-1;for(let t=n-1;t>=0;--t)if(i.visibleNodes[t].node.id===r.parentId){e=t;break}e>=0&&k(e)}break;case`Enter`:case` `:case`Spacebar`:i.selectable&&!r.node.disabled&&(f.select(r.node.id),A(r.node.id))}}function j(e,t){let n=i.visibleNodes.length;for(let r=e+t;r>=0&&r<n;r+=t)if(!i.visibleNodes[r].node.disabled){k(r);return}}function M(e,t){let n={checkedKeys:f.checkedKeys(),expandedKeys:f.expandedKeys(),id:t?.id??null,key:t?.id??null,label:t?.label??null,node:t??null,selectedKeys:f.selectedKeys(),type:e};a?.(n),e===`check`?o?.(n):e===`expand`?c?.(n):e===`select`&&s?.(n)}function re(e,t){al(e).forEach(e=>{t?i.checkedKeys.add(e):i.checkedKeys.delete(e)})}}function Qc(e=null,t=null,n=null){let r=B(e,t,n);return r.first&&typeof r.first.render==`function`&&typeof r.first.nodes==`function`?V(r.first,r.options,r.callback):Zc(e,t,n)}function $c(e=null){return e instanceof Xc?e:new Xc(e)}function el(e){return e&&typeof e.toHTML==`function`?e.toHTML():e}function tl(e,t,n=null){let r=n?`${n}-${t}`:`tree-node-${t}`;if(e instanceof Xc)return tl(e.toData(),t,n);if(e instanceof l||typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return{actions:null,checked:!1,children:[],disabled:!1,expandable:!1,expanded:!1,icon:null,id:r,label:e,selected:!1};if(Array.isArray(e)&&e.length>=2)return tl({children:e[1],id:e[0],label:e[0]},t,n);if(q(e)){let t=e.id??e.key??e.value??r,n=String(J(t)),i=e.label??e.text??e.title??e.content??n,a=Array.isArray(e.children)?e.children.map((e,t)=>tl(e,t,n)):[];return{actions:e.actions??null,checked:!!e.checked,children:a,disabled:!!e.disabled,expandable:!!e.expandable,expanded:!!e.expanded,icon:e.icon??null,id:n,label:i,selected:!!e.selected}}return{actions:null,checked:!1,children:[],disabled:!1,expandable:!1,expanded:!1,icon:null,id:r,label:String(e??``),selected:!1}}function nl(e,t){t.forEach(t=>{t.expanded&&e.expandedKeys.add(t.id),t.selected&&e.selectedKeys.add(t.id),t.checked&&e.checkedKeys.add(t.id),nl(e,t.children)})}function rl(e){return e==null?[]:Array.isArray(e)?e.map(e=>String(J(e))).filter(e=>e!==``):[String(J(e))].filter(e=>e!==``)}function il(e,t){for(let n of e){if(n.id===t)return n;let e=il(n.children,t);if(e)return e}return null}function al(e,t=[]){return t.push(e.id),e.children.forEach(e=>al(e,t)),t}function ol(e){e.forEach(e=>{e.ids=al(e),ol(e.children)})}function sl(e,t){e.forEach(e=>{t(e),sl(e.children,t)})}function cl(e){return e.children.length>0||!!e.expandable}function ll(e,t){let n=[],r=e=>{e.forEach(e=>{t.has(e.id)&&n.push(e),r(e.children)})};return r(e),n}var ul={danger:R(`color-danger`,`#dc2626`),neutral:R(`color-text-secondary`,`#64748b`),primary:R(`color-primary`,`#2563eb`),success:R(`color-success`,`#16a34a`),warning:R(`color-warning`,`#d97706`)},dl=class extends P{constructor(e=null){super(`div`,null),this._value=0,this._max=100,this._unit=``,this._tone=`primary`,this._size=220,this._svg=new F(`svg`),this._track=new F(`path`),this._arc=new F(`path`),this._needle=new F(`polygon`),this._hub=new F(`circle`),this._hubInner=new F(`circle`),this._valueText=new F(`text`),this._minText=new F(`text`),this._maxText=new F(`text`),this.className(L,`yoya-vgauge`),this.styles({boxSizing:`border-box`,position:`relative`}),this.child(this._svg.child(this._track,this._arc,this._needle,this._hub,this._hubInner,this._valueText,this._minText,this._maxText)),this._render(),U(this,e),this._render()}value(e){return e===void 0?this._value:(this._value=Number(e)||0,this._render(),this)}max(e){return e===void 0?this._max:(this._max=Number(e)||100,this._render(),this)}unit(e){return e===void 0?this._unit:(this._unit=e,this._render(),this)}tone(e){return e===void 0?this._tone:(this._tone=e,this._render(),this)}_render(){let e=this._max>0?Math.min(100,Math.max(0,this._value/this._max*100)):0,t=Math.PI*(1+e/100),n=100+80*Math.cos(t),r=100+80*Math.sin(t),i=-90+e/100*180;this.style(`width`,`${this._size}px`),this.style(`height`,`${Math.round(this._size/2)}px`),this._svg.attr({preserveAspectRatio:`none`,viewBox:`0 0 200 110`}).styles({display:`block`,height:`100%`,width:`100%`}),this._track.attr({d:`M 20 100 A 80 80 0 0 1 180 100`,fill:`none`,"stroke-linecap":`round`,"stroke-width":12}).style(`stroke`,R(`color-border-faint`,`#e5e7eb`)),this._arc.attr({d:`M 20 100 A 80 80 0 0 1 ${n.toFixed(2)} ${r.toFixed(2)}`,fill:`none`,"stroke-linecap":`round`,"stroke-width":12}).style(`stroke`,ul[this._tone]||this._tone),this._needle.attr({points:`96,108 104,108 100,42`,transform:`rotate(${i.toFixed(2)} 100 100)`}).styles({fill:R(`color-text`,`#24292f`),stroke:R(`color-text`,`#24292f`),strokeLinejoin:`round`,strokeWidth:`1`}),this._hub.attr({cx:100,cy:100,r:8}).style(`fill`,R(`color-text`,`#24292f`)),this._hubInner.attr({cx:100,cy:100,r:3.5}).style(`fill`,R(`color-surface`,`#ffffff`)),this._valueText.attr({"text-anchor":`middle`,x:100,y:72}).styles({fill:R(`color-text`,`#24292f`),fontSize:`20px`,fontWeight:`700`}).clearChildren().text(`${this._value}${this._unit}`),this._minText.attr({"text-anchor":`start`,x:20,y:106}).styles({fill:R(`color-text-secondary`,`#64748b`),fontSize:`10px`}).clearChildren().text(`0`),this._maxText.attr({"text-anchor":`end`,x:180,y:106}).styles({fill:R(`color-text-secondary`,`#64748b`),fontSize:`10px`}).clearChildren().text(String(this._max))}};function fl(e=null,t=null,n=null){return H(dl,e,t,n)}var pl={danger:R(`color-danger`,`#dc2626`),neutral:R(`color-text-secondary`,`#64748b`),primary:R(`color-primary`,`#2563eb`),success:R(`color-success`,`#16a34a`),warning:R(`color-warning`,`#d97706`)},ml=class extends P{constructor(e=null){super(`div`,null),this._percent=0,this._size=120,this._strokeWidth=10,this._tone=`primary`,this._valueExplicit=!1,this._valueNode=f(``),this._labelNode=f(``),this._svg=new F(`svg`),this._circle=new F(`circle`),this._track=new F(`circle`);let t=new P(`div`).className(`yoya-vring-stat-center`).styles({alignItems:`center`,display:`flex`,flexDirection:`column`,inset:`0`,justifyContent:`center`,position:`absolute`}),n=new P(`div`).className(`yoya-vring-stat-value`).styles({fontSize:`22px`,fontWeight:`700`,lineHeight:`1.2`}).child(this._valueNode),r=new P(`div`).className(`yoya-vring-stat-label`).styles({color:R(`color-text-secondary`,`#64748b`),fontSize:`12px`,lineHeight:`1.4`,marginTop:`2px`}).child(this._labelNode);t.child(n,r),this.className(L,`yoya-vring-stat`),this.styles({boxSizing:`border-box`,position:`relative`}),this._svg.child(this._track,this._circle),this.child(this._svg,t),this._applyTone(),this._render(),U(this,e),this._render()}percent(e){return e===void 0?this._percent:(this._percent=Math.min(100,Math.max(0,Number(e)||0)),this._render(),this)}value(e){return e===void 0?this._valueNode.textContent():(this._valueExplicit=!0,this._valueNode.textContent(e),this)}label(e){return e===void 0?this._labelNode.textContent():(this._labelNode.textContent(e),this)}size(e){return e===void 0?this._size:(this._size=Number(e)||120,this._render(),this)}strokeWidth(e){return e===void 0?this._strokeWidth:(this._strokeWidth=Number(e)||10,this._render(),this)}tone(e){return e===void 0?this._tone:(this._tone=e,this._applyTone(),this)}_applyTone(){let e=pl[this._tone]||this._tone;this._circle.style(`stroke`,e)}_render(){let e=this._size,t=e/2-this._strokeWidth/2-2,n=2*Math.PI*t,r=e/2;this.style(`width`,`${e}px`),this.style(`height`,`${e}px`),this._valueExplicit||this._valueNode.textContent(`${Math.round(this._percent)}%`),this._svg.attr({viewBox:`0 0 ${e} ${e}`}).styles({display:`block`,height:`${e}px`,width:`${e}px`}),this._track.attr({cx:r,cy:r,fill:`none`,r:t,"stroke-width":this._strokeWidth}).style(`stroke`,R(`color-border-faint`,`#e5e7eb`)),this._circle.attr({cx:r,cy:r,fill:`none`,r:t,"stroke-dasharray":String(n),"stroke-dashoffset":String(n*(1-this._percent/100)),"stroke-linecap":`round`,"stroke-width":this._strokeWidth,transform:`rotate(-90 ${r} ${r})`}).style(`stroke`,pl[this._tone]||this._tone)}};function hl(e=null,t=null,n=null){return H(ml,e,t,n)}var gl={danger:R(`color-danger`,`#dc2626`),neutral:R(`color-text-secondary`,`#64748b`),primary:R(`color-primary`,`#2563eb`),success:R(`color-success`,`#16a34a`),warning:R(`color-warning`,`#d97706`)},_l=class extends F{constructor(e=null){super(`svg`),this._values=[],this._fill=!1,this._strokeWidth=2,this._tone=`primary`,this.className(`yoya-vsparkline`),this.attr({preserveAspectRatio:`none`,viewBox:`0 0 100 30`}),this.styles({display:`block`,height:`32px`,width:`100%`}),this._area=new F(`path`).styles({fillOpacity:`0.14`,pointerEvents:`none`}),this._line=new F(`polyline`).styles({fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`}),this.child(this._area,this._line),this._applyTone(),this._render(),U(this,e),this._render()}data(e){return e===void 0?this._values:(this._values=Array.isArray(e)?e.slice():[],this._render(),this)}fill(e){return e===void 0?this._fill:(this._fill=!!e,this._render(),this)}strokeWidth(e){return e===void 0?this._strokeWidth:(this._strokeWidth=Number(e)||2,this._line.style(`strokeWidth`,String(this._strokeWidth)),this)}tone(e){return e===void 0?this._tone:(this._tone=e,this._applyTone(),this)}_applyTone(){let e=gl[this._tone]||this._tone;this._line.style(`stroke`,e),this._area.style(`fill`,e)}_render(){let e=this._values.filter(e=>Number.isFinite(e));if(e.length===0){this._line.attr(`points`,``),this._area.attr(`d`,``),this._area.style(`display`,`none`);return}let t=Math.min(...e),n=Math.max(...e)-t||1,r=e.length>1?96/(e.length-1):0,i=e.map((e,i)=>{let a=2+i*r,o=28-(e-t)/n*26;return`${a.toFixed(2)},${o.toFixed(2)}`});if(this._line.attr(`points`,i.join(` `)),this._area.style(`display`,this._fill?`block`:`none`),this._fill){let e=i[i.length-1].split(`,`)[0];this._area.attr(`d`,`M ${i[0]} L ${i.slice(1).join(` L `)} L ${e} 28 L 2 28 Z`)}else this._area.attr(`d`,``)}};function vl(e=null,t=null,n=null){return H(_l,e,t,n)}var yl={danger:R(`color-danger`,`#dc2626`),default:R(`color-text-secondary`,`#94a3b8`),processing:R(`color-info`,`#1677ff`),success:R(`color-success`,`#16a34a`),warning:R(`color-warning`,`#d97706`)},bl=new Set(Object.keys(yl)),xl=class extends P{constructor(e=null){super(`div`,null),this.className(L,`yoya-vtimeline`),this.styles({position:`relative`}),this._line=new P(`div`).className(`yoya-vtimeline-line`).styles({background:R(`color-border`,`#e2e8f0`),bottom:`16px`,left:`11px`,position:`absolute`,top:`8px`,width:`2px`}),this._line.style(`zIndex`,`0`),this.child(this._line),U(this,e)}},Sl=class extends P{constructor(e=null){super(`div`,null),this._status=`default`,this._titleNode=f(``),this._timeNode=f(``),this._dot=new P(`div`).className(`yoya-vtimeline-item-dot`),this._indicator=new P(`div`).className(`yoya-vtimeline-item-indicator`).styles({alignItems:`center`,display:`flex`,flexDirection:`column`,flexShrink:`0`,paddingTop:`6px`,width:`24px`}).child(this._dot);let t=new P(`div`).className(`yoya-vtimeline-item-title`).styles({fontSize:`14px`,fontWeight:`600`,lineHeight:`1.4`}).child(this._titleNode),n=new P(`div`).className(`yoya-vtimeline-item-time`).styles({color:R(`color-text-secondary`,`#64748b`),fontSize:`12px`,lineHeight:`1.4`,marginTop:`2px`}).child(this._timeNode);this._contentBox=new P(`div`).className(`yoya-vtimeline-item-content`).styles({color:R(`color-text-secondary`,`#475569`),fontSize:`13px`,lineHeight:`1.6`,marginTop:`6px`});let r=new P(`div`).className(`yoya-vtimeline-item-body`).styles({display:`flex`,flexDirection:`column`,minWidth:`0`,paddingBottom:`20px`}).child(t,n,this._contentBox);this.className(L,`yoya-vtimeline-item`),this.styles({display:`flex`,gap:`12px`}),this._indicator.style(`zIndex`,`1`),this.child(this._indicator,r),this._applyStatus(),U(this,e)}status(e){return e===void 0?this._status:(this._status=bl.has(e)?e:`default`,this._applyStatus(),this)}title(e){return e===void 0?this._titleNode.textContent():(this._titleNode.textContent(e),this)}time(e){return e===void 0?this._timeNode.textContent():(this._timeNode.textContent(e),this)}content(e){return e===void 0?this._contentBox:(K(this._contentBox,e),this)}_applyStatus(){let e=yl[this._status];this._dot.styles({background:e,border:`2px solid `+R(`color-surface`,`#ffffff`),borderRadius:`50%`,height:`10px`,width:`10px`})}};function Cl(e=null,t=null,n=null){return H(xl,e,t,n)}function wl(e=null,t=null,n=null){return H(Sl,e,t,n)}var Tl=class extends P{constructor(e=null){super(`div`,null),this._up=!0,this._titleNode=f(``),this._valueNode=f(``),this._unitNode=f(``),this._deltaNode=f(``),this._sparkline=vl(),this._sparkline.style(`height`,`26px`);let t=new P(`div`).className(`yoya-vtrend-card-title`).styles({color:R(`color-text-secondary`,`#475569`),fontSize:`13px`,lineHeight:`1.4`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}).child(this._titleNode),n=new P(`span`).className(`yoya-vtrend-card-unit`).styles({color:R(`color-text-secondary`,`#64748b`),fontSize:`13px`,fontWeight:`400`,lineHeight:`1`}).child(this._unitNode),r=new P(`div`).className(`yoya-vtrend-card-value`).styles({alignItems:`baseline`,display:`flex`,gap:`6px`,fontSize:`26px`,fontWeight:`700`,lineHeight:`1.2`,marginTop:`6px`}).child(this._valueNode,n);this._delta=new P(`div`).className(`yoya-vtrend-card-delta`).styles({fontSize:`13px`,fontWeight:`600`,lineHeight:`1.4`,marginLeft:`12px`,whiteSpace:`nowrap`}).child(this._deltaNode);let i=new P(`div`).className(`yoya-vtrend-card-footer`).styles({alignItems:`flex-end`,display:`flex`,marginTop:`8px`}).child(this._sparkline,this._delta);this.className(L,`yoya-vtrend-card`),this.styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#e2e8f0`),borderRadius:`10px`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,minWidth:`0`,padding:`16px`}),this.child(t,r,i),this._applyDeltaColor(),U(this,e)}title(e){return e===void 0?this._titleNode.textContent():(this._titleNode.textContent(e),this)}value(e){return e===void 0?this._valueNode.textContent():(this._valueNode.textContent(e),this)}unit(e){return e===void 0?this._unitNode.textContent():(this._unitNode.textContent(e),this)}delta(e){return e===void 0?this._deltaNode.textContent():(this._deltaNode.textContent(e),this)}up(e){return e===void 0?this._up:(this._up=!!e,this._applyDeltaColor(),this)}data(e){return this._sparkline.data(e),this}tone(e){return this._sparkline.tone(e),this}_applyDeltaColor(){this._delta.style(`color`,this._up?R(`color-success`,`#16a34a`):R(`color-danger`,`#dc2626`))}};function El(e=null,t=null,n=null){return H(Tl,e,t,n)}var Dl=8,Ol=12,kl=100,Al=class extends P{constructor(e=null){super(`div`,null),this._blocked=!1,this._loading=!1,this._loop=!1,this._page=0,this._threshold=80,this._checkScheduled=!1,this._loadMoreHandler=null,this._renderItem=null,this._itemsData=[],this._virtual=null,this._itemHeight=48,this._overscan=5,this._resizeObserver=null,this._loadingContent=`加载中…`,this._endContent=`没有更多了`,this._list=new P(`div`).className(`yoya-vscroll-list`),this._statusBox=new P(`span`).className(`yoya-vscroll-status`),this._footer=new P(`div`).className(`yoya-vscroll-footer`).child(this._statusBox),this.className(L,`yoya-vscroll`),this.attr({"aria-busy":`false`,"aria-live":`polite`,"data-item-height":`48`,"data-overscan":`5`,"data-page":`0`,"data-threshold":`80`,role:`feed`}),this.styles({boxSizing:`border-box`,minWidth:`0`,overflowY:`auto`,overscrollBehavior:`contain`,position:`relative`}),this.child(this._list,this._footer),this.on(`scroll`,()=>this._handleScroll()),this._setupScroll(e),this._syncVirtualState(),this._syncFooter()}content(e){return e===void 0?this._list.children():(this._itemsData=[],this._renderItem=null,K(this._list,e),this._syncVirtualState(),this._scheduleCheck(),this)}items(e,t=null){return e===void 0?this._itemsData.slice():(typeof t==`function`&&(this._renderItem=t),this._itemsData=Array.isArray(e)?e.slice():[e],this._renderItems(),this._scheduleCheck(),this)}append(e,t=null){let n=Array.isArray(e)?e:[e];return typeof t==`function`&&(this._renderItem=t),this._itemsData=this._itemsData.concat(n),this._renderItems(),n.length>0&&this._scheduleCheck(),this}renderItem(e){return e===void 0?this._renderItem:(this._renderItem=typeof e==`function`?e:null,this._itemsData.length>0&&this._renderItems(),this)}loadMore(e){return e===void 0?this._loadMoreHandler:(this._loadMoreHandler=typeof e==`function`?e:null,this._loadMoreHandler&&this._scheduleCheck(),this)}onLoadMore(e){return this.loadMore(e)}loop(e){return e===void 0?this._loop:(this._loop=!!e,this._loop&&(this._blocked=!1),this.attr(`data-loop`,this._loop?`true`:null),this.attr(`data-blocked`,this._blocked?`true`:null),this._syncFooter(),this)}block(e){return e===void 0?this._blocked:(this._blocked=!!e,this._blocked&&(this._loop=!1),this.attr(`data-blocked`,this._blocked?`true`:null),this.attr(`data-loop`,this._loop?`true`:null),this._syncFooter(),this)}blocked(e){return this.block(e)}loading(e){return e===void 0?this._loading:(this._loading=!!e,this.attr(`data-loading`,this._loading?`true`:null),this.attr(`aria-busy`,this._loading?`true`:`false`),this._syncFooter(),this)}threshold(e){if(e===void 0)return this._threshold;let t=Number(e);return this._threshold=Number.isFinite(t)&&t>=0?t:80,this.attr(`data-threshold`,String(this._threshold)),this}virtual(e){return e===void 0?this._isVirtualEnabled():(this._virtual=!!e,this._syncVirtualState(),this._itemsData.length>0&&this._renderItems(),this)}virtualize(e){return this.virtual(e)}itemHeight(e){if(e===void 0)return this._itemHeight;let t=Number(e);return this._itemHeight=Number.isFinite(t)&&t>0?Math.max(1,t):48,this.attr(`data-item-height`,String(this._itemHeight)),this._itemsData.length>0&&this._renderItems(),this}overscan(e){if(e===void 0)return this._overscan;let t=Number(e);return this._overscan=Number.isFinite(t)&&t>=0?Math.floor(t):5,this.attr(`data-overscan`,String(this._overscan)),this._itemsData.length>0&&this._renderItems(),this}page(e){if(e===void 0)return this._page;let t=Number(e);return this._page=Number.isFinite(t)&&t>=0?Math.floor(t):0,this.attr(`data-page`,String(this._page)),this}loadingText(e){return e===void 0?this._loadingContent:(this._loadingContent=e,this._syncFooter(),this)}endText(e){return e===void 0?this._endContent:(this._endContent=e,this._syncFooter(),this)}reset(){return this._itemsData=[],this._renderItem=null,this._page=0,this._blocked=!1,this._loading=!1,this.attr(`data-blocked`,null),this.attr(`data-loading`,null),this.attr(`data-page`,`0`),this.attr(`aria-busy`,`false`),G(this._list,[]),this._syncVirtualState(),this._syncFooter(),this}clear(){return this.reset()}load(){if(this._deleted||this._loading||this._blocked||typeof this._loadMoreHandler!=`function`)return Promise.resolve(!1);this.page(this._page+1),this.loading(!0);let e={append:(e,t)=>this.append(e,t),block:(e=!0)=>this.block(e),done:()=>this.block(!0),page:this._page,scroll:this},t;try{t=this._loadMoreHandler(e)}catch(e){return this.loading(!1),Promise.reject(e)}return t&&typeof t.then==`function`?Promise.resolve(t).then(e=>(e!=null&&this.append(e),this.loading(!1),!0),e=>{throw this.loading(!1),e}):(t!=null&&this.append(t),this.loading(!1),Promise.resolve(!0))}check(){return this._checkLoad()}toHTML(){if(!this._isVirtualEnabled()||this._itemsData.length===0)return super.toHTML();let e=this._itemsData.length,{end:t,start:n}=this._visibleRange(e),r=[];for(let i=n;i<t;i+=1){let t=this._renderItem?this._renderItem(this._itemsData[i],i,this):this._itemsData[i];r.push(this._createVirtualItem(t,i,e))}let i=this._list._children;this._list._children=r,this._list.style(`height`,`${this._virtualListHeight(e)}px`);try{return super.toHTML()}finally{this._list._children=i}}renderDom(){let e=super.renderDom();return this._isVirtualEnabled()&&this._itemsData.length>0&&(this._renderItems(),this._observeSize()),this._scheduleCheck(),e}destroy(){return this._disconnectSizeObserver(),super.destroy()}_renderItems(){this._syncVirtualState();let e=this._itemsData.length;if(!this._isVirtualEnabled()||e===0)return G(this._list,this._itemsData.map((e,t)=>this._renderItem?this._renderItem(e,t,this):e)),this;let{end:t,start:n}=this._visibleRange(e),r=[];for(let i=n;i<t;i+=1){let t=this._renderItem?this._renderItem(this._itemsData[i],i,this):this._itemsData[i];r.push(this._createVirtualItem(t,i,e))}return G(this._list,r),this._list.style(`height`,`${this._virtualListHeight(e)}px`),this}_handleScroll(){this._isVirtualEnabled()&&this._itemsData.length>0&&this._renderItems(),this._checkLoad()}_visibleRange(e){let t=this._itemHeight+Dl,n=this._el&&Number(this._el.scrollTop)||0,r=this._el&&Number(this._el.clientHeight)||0,i=Math.max(0,Math.floor((n-Ol)/t)-this._overscan);return{end:Math.min(e,Math.max(0,Math.ceil((n+r-Ol)/t)+this._overscan)),start:i}}_createVirtualItem(e,t,n){let r=Ol+t*(this._itemHeight+Dl);return new P(`div`).className(`yoya-vscroll-virtual-item`).attr({"aria-posinset":String(t+1),"aria-setsize":String(n),"data-index":String(t)}).styles({boxSizing:`border-box`,height:`${this._itemHeight}px`,left:`0`,minWidth:`0`,overflow:`visible`,position:`absolute`,right:`0`,top:`${r}px`,width:`100%`}).child(e)}_virtualListHeight(e){return e===0?0:24+e*this._itemHeight+(e-1)*Dl}_syncVirtualState(){let e=this._isVirtualEnabled()&&this._itemsData.length>0;return this.attr(`data-virtual`,e?`true`:null),e?(this._list.styles({display:`block`,gap:`0`,padding:`0`,position:`relative`}),this._observeSize()):(this._list.styles({display:null,gap:null,height:null,padding:null,position:null}),this._disconnectSizeObserver()),this}_isVirtualEnabled(){return this._virtual===!0||this._virtual===null&&this._itemsData.length>=kl}_observeSize(){!this._el||typeof ResizeObserver!=`function`||this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>{this._deleted||!this._isVirtualEnabled()||this._itemsData.length===0||this._renderItems()}),this._resizeObserver.observe(this._el))}_disconnectSizeObserver(){this._resizeObserver&&=(this._resizeObserver.disconnect(),null)}_checkLoad(){return this._loading||this._blocked||!this._el||(this._el.scrollHeight||0)-(this._el.scrollTop||0)-(this._el.clientHeight||0)<=this._threshold&&this.load(),this}_scheduleCheck(){return this._checkScheduled||this._deleted||typeof queueMicrotask!=`function`?this:(this._checkScheduled=!0,queueMicrotask(()=>{this._checkScheduled=!1,this._checkLoad()}),this)}_syncFooter(){return this._loading?(G(this._statusBox,W(this._loadingContent)),this._footer.style(`display`,`flex`),this):this._blocked?(G(this._statusBox,W(this._endContent)),this._footer.style(`display`,`flex`),this):(G(this._statusBox,[]),this._footer.style(`display`,`none`),this)}_setupScroll(e){if(e!=null){if(typeof e==`function`){e(this);return}if(q(e)){let{block:t,blocked:n,children:r,content:i,endText:a,itemHeight:o,items:s,loadMore:c,loading:l,loadingText:u,loop:d,onLoadMore:f,overscan:p,page:m,renderItem:h,reset:g,threshold:_,virtual:v,...y}=e;Object.keys(y).length>0&&this.setup(y),h!==void 0&&this.renderItem(h),v!==void 0&&this.virtual(v),o!==void 0&&this.itemHeight(o),p!==void 0&&this.overscan(p),i===void 0?r!==void 0&&this.content(r):this.content(i),s!==void 0&&this.items(s),c===void 0?f!==void 0&&this.loadMore(f):this.loadMore(c),d!==void 0&&this.loop(d),t===void 0?n!==void 0&&this.block(n):this.block(t),l!==void 0&&this.loading(l),_!==void 0&&this.threshold(_),m!==void 0&&this.page(m),u!==void 0&&this.loadingText(u),a!==void 0&&this.endText(a),g!==void 0&&g&&this.reset();return}this.content(e)}}};function jl(e=null,t=null,n=null){return H(Al,e,t,n)}var Ml=class extends cc{constructor(e=null){super(e),this.className(`yoya-vcode-block`)}};function Nl(e=null,t=null,n=null){return H(Ml,e,t,n)}v(g,{codeBlock:Nl});var Pl=class extends P{constructor(e=null){super(`div`),this._adapter=null,this._instance=null,this._initialized=!1,this._data=void 0,this._options={},this._width=void 0,this._height=void 0,this._destroyed=!1,this.className(`yoya-vchart`),this.styles({display:`block`,width:`100%`}),this._setupChart(e)}adapter(e){return e===void 0?this._adapter:this._destroyed?this:(this._initialized&&this._destroyAdapter(),this._adapter=e||null,this._el&&this._adapter&&this._initializeAdapter(),this)}data(e){return e===void 0?this._data:(this._data=e,this._updateAdapter(),this)}options(e){return e===void 0?this._options:(this._options=e||{},this._updateAdapter(),this)}width(e){return e===void 0?this._width:(this._width=e,this.style(`width`,e===null?`100%`:Il(e)),this._resizeAdapter(),this)}height(e){return e===void 0?this._height:(this._height=e,this.style(`height`,e===null?null:Il(e)),this._resizeAdapter(),this)}resize(e=this._width,t=this._height){return this._width=e,this._height=t,e!==void 0&&this.style(`width`,Il(e)),t!==void 0&&this.style(`height`,Il(t)),this._resizeAdapter(),this}renderDom(){let e=super.renderDom();return e&&!this._destroyed&&this._initializeAdapter(),e}destroy(){return this._destroyed?this:(this._destroyed=!0,this._destroyAdapter(),super.destroy())}_setupChart(e){if(!e||typeof e!=`object`)return;let{adapter:t,data:n,height:r,options:i,width:a,...o}=e;Object.keys(o).length>0&&this.setup(o),this._data=n,this._options=i||{},this._width=a,this._height=r,a!==void 0&&this.width(a),r!==void 0&&this.height(r),t&&(this._adapter=t)}_context(){return{chart:this,data:this._data,height:this._height,host:this._el,options:this._options,width:this._width}}_initializeAdapter(){if(!(!this._adapter||this._initialized||!this._el||this._destroyed)){if(typeof this._adapter.init==`function`)this._instance=this._adapter.init(this._el,this._context());else if(typeof this._adapter==`function`)this._instance=this._adapter(this._el,this._context());else throw TypeError(`Chart adapter must provide an init(host, context) function`);this._initialized=!0}}_updateAdapter(){this._instance===null||!this._adapter||typeof this._adapter.update!=`function`||this._adapter.update(this._instance,this._context())}_resizeAdapter(){this._instance===null||!this._adapter||typeof this._adapter.resize!=`function`||this._adapter.resize(this._instance,this._context())}_destroyAdapter(){this._initialized&&=(this._adapter&&typeof this._adapter.destroy==`function`&&this._adapter.destroy(this._instance,this._context()),this._instance=null,!1)}};function Fl(e=null,t=null,n=null){return H(Pl,e,t,n)}function Il(e){return typeof e==`number`?`${e}px`:e}v(P,{vAvatar:Ys,vDigitalBoard:tc,vDigitalBoardItem:nc,vGauge:fl,vRingStat:hl,vSparkline:vl,vTimeline:Cl,vTimelineItem:wl,vTrendCard:El,vBadge:ac,vCarousel:sc,vCard:Tc,vCardBody:Dc,vCardFooter:Oc,vCardHeader:Ec,vCode:lc,vDetail:fc,vDetailItem:pc,vPagination:_c,vProgress:bc,vScroll:jl,vTable:Ac,vTree:Qc});var Ll=new Map,Rl={error:e=>`加载失败:${e.message}`,loaded:()=>``,loading:()=>`加载中…`,pending:()=>`等待加载`};function zl(e={},t=null,n=null){let r=B(e,t,n),i=Bl(r.first),a=new g(`div`);Ir(a,r.first);let o=`pending`,s=null,c=null,l=0;a.className(`yoya-vdynamic-loader`),a.attr({"aria-live":`polite`,"data-loader-state":o}),a.status=()=>o,a.state=()=>o,a.module=()=>s,a.value=()=>s,a.loadError=()=>c,a.error=()=>c,a.load=()=>{if(a._deleted)return Promise.resolve(s);let e=++l;return d(`loading`),Promise.resolve().then(()=>Ul(i.cacheKey,i.loader)).then(t=>e!==l||a._deleted?t:(s=t,c=null,d(`loaded`,t),t),t=>{throw e!==l||a._deleted?t:(c=t,d(`error`,t),t)})},a.retry=()=>a.load(),a.preload=()=>a._deleted?Promise.resolve(s):Ul(i.cacheKey,i.loader),a.clearCache=()=>(Hl(i.cacheKey),a);let u=a.destroy.bind(a);a.destroy=()=>(l+=1,u());function d(e,t){o=e,a.attr(`data-loader-state`,o),Wl(a,i.views,o,t),i.onStateChange?.(o,t,a)}return Wl(a,i.views,o),i.auto&&queueMicrotask(()=>{a._deleted||a.load().catch(()=>{})}),V(a,r.options,r.callback)}function Bl(e){let t=typeof e==`function`?{loader:e}:{...e};if(typeof t.loader!=`function`)throw TypeError(`vDynamicLoader requires a loader function`);return{auto:t.auto!==!1,cacheKey:t.cacheKey??null,loader:t.loader,onStateChange:t.onStateChange,views:{...Rl,...t.views||{}}}}function Vl(e,t){if(e==null||e===``)throw TypeError(`preloadDynamicModule requires a cache key`);if(typeof t!=`function`)throw TypeError(`preloadDynamicModule requires a loader function`);return Ul(e,t)}function Hl(e){e===void 0?Ll.clear():Ll.delete(e)}function Ul(e,t){if(e==null||e===``)return Promise.resolve().then(t);if(Ll.has(e))return Ll.get(e);let n=Promise.resolve().then(t);return Ll.set(e,n),n.catch(()=>{Ll.get(e)===n&&Ll.delete(e)}),n}function Wl(e,t,n,r){e.children().forEach(e=>e.destroy()),e._children=[],e._el&&e._el.replaceChildren();let i=t[n],a=typeof i==`function`?i(r,e):i;e.child(a??f(``))}v(g,{vDynamicLoader:zl});var Gl=Object.freeze([{label:`中文`,value:`zh-CN`},{label:`English`,value:`en`}]);function Kl(e=null){let t={ariaLabel:`切换语言`,locale:E,languages:Gl,onChange:null,size:`medium`,variant:`secondary`},n=null,r=ja({closeOnSelect:!0,placement:`bottom-start`}).className(L,`yoya-vlanguage-switch`),i={activeLanguage(){return t.locale?.getLanguage?.()},ariaLabel(e){return e===void 0?t.ariaLabel:(t.ariaLabel=J(e)||t.ariaLabel,l(),i)},change(e){return i.onChange(e)},destroy(){return n&&=(n(),null),r.destroy()},languages(e){return e===void 0?t.languages.map(e=>({...e})):(t.languages=Jl(e),l(),i)},locale(e){return e===void 0?t.locale:(c(e),l(),i)},onChange(e){return e===void 0?t.onChange:(t.onChange=typeof e==`function`?e:null,i)},render(){return l(),r},size(e){return e===void 0?t.size:(t.size=Yl(e),l(),i)},variant(e){return e===void 0?t.variant:(t.variant=Xl(e),l(),i)}},a=r.destroy.bind(r);return r.destroy=()=>(n&&=(n(),null),a()),c(t.locale),typeof e==`function`?e(i):o(e),l(),i;function o(e){if(!q(e))return;let{ariaLabel:n,attrs:i,className:a,languages:o,locale:s,onChange:l,size:u,style:d,variant:f,...p}=e;Object.keys(p).length>0&&r.setup(p),i&&Ir(r,{attrs:i}),d&&Ir(r,{style:d}),a!==void 0&&r.className(a),n!==void 0&&(t.ariaLabel=J(n)||t.ariaLabel),s!==void 0&&c(s),o!==void 0&&(t.languages=Jl(o)),l!==void 0&&(t.onChange=typeof l==`function`?l:null),u!==void 0&&(t.size=Yl(u)),f!==void 0&&(t.variant=Xl(f))}function s(e){e.disabled||!t.locale||e.value===t.locale.getLanguage()||(t.locale.setLanguage(e.value),r.close(),l(),typeof t.onChange==`function`&&t.onChange(e,t.locale))}function c(e){!e||typeof e.setLanguage!=`function`||e===t.locale||(n&&n(),t.locale=e,n=e.subscribe(()=>l()))}function l(){let e=t.locale?.getLanguage?.()||``,n=t.languages.find(t=>t.value===e)||{label:e,value:e};return r.attr(`aria-label`,t.ariaLabel||`切换语言`),r.attr(`data-language`,e),r.attr(`data-size`,t.size),r.attr(`data-variant`,t.variant),r.trigger(r=>{r.label(n.label),r.size(t.size),r.variant(t.variant),r.attr(`aria-label`,t.ariaLabel||`切换语言`),r.attr(`data-language`,e)}),r.menuContent(n=>{t.languages.forEach(t=>{let r=Ca(n=>{n.label(t.label),n.active(t.value===e),n.attr({"data-language":t.value,"data-language-option":`true`}),t.disabled&&n.disabled(!0)});t.disabled||r.on(`click`,()=>s(t)),n.child(r)})}),i}}function ql(e=null,t=null,n=null){let r=B(e,t,n);return r.first&&typeof r.first.render==`function`&&typeof r.first.locale==`function`?V(r.first,r.options,r.callback):V(Kl(r.first),r.options,r.callback)}v(P,{vLanguageSwitch:ql});function Jl(e){return(Array.isArray(e)&&e.length>0?e:Gl).map((e,t)=>{if(Array.isArray(e)){let[n,r]=e,i=J(n);return{disabled:!1,label:r??i,value:i||`language-${t}`}}if(e instanceof l)return{disabled:!1,label:e,value:e.textContent()||`language-${t}`};if(q(e)){let n=J(e.value??e.key??e.id??e.label??e.text??e.title??`language-${t}`);return{disabled:!!e.disabled,label:e.label??e.text??e.content??e.title??n,value:n||`language-${t}`}}let n=J(e);return{disabled:!1,label:n,value:n}}).filter(e=>e.value!==``)}function Yl(e){return[`small`,`medium`,`large`].includes(e)?e:`medium`}function Xl(e){return[`primary`,`secondary`].includes(e)?e:`secondary`}var Zl=[{mode:`light`,label:`浅色`,icon:Tr},{mode:`dark`,label:`深色`,icon:Er},{mode:`system`,label:`跟随系统`,icon:Dr}],Ql={light:`浅色`,dark:`深色`,system:`跟随系统`},$l={light:Tr,dark:Er,system:Dr};function eu(e){return e.map(e=>typeof e==`string`?{mode:e,label:Ql[e]||e,icon:$l[e]}:e)}var tu=class extends P{constructor(e=null){super(`div`,null),this.className(`yoya-component`,`yoya-vtheme-mode-switch`),this._persist=!0,this._modes=Zl,this._buttons=new Map,this.styles({alignItems:`center`,display:`inline-flex`,flexWrap:`wrap`,gap:`8px`}),typeof e==`function`?e(this):e&&typeof e==`object`&&(Array.isArray(e.modes)&&(this._modes=eu(e.modes)),e.persist!==void 0&&(this._persist=!!e.persist)),this._rebuildButtons()}modes(e){if(e===void 0)return this._modes.map(e=>e.mode);if(!Array.isArray(e))throw TypeError(`VThemeModeSwitch modes must be an array of mode names`);return this._modes=eu(e),this._rebuildButtons(),this}persist(e){return e===void 0?this._persist:(this._persist=!!e,this)}_rebuildButtons(){this.clearChildren(),this._buttons.clear(),this._modes.forEach(({mode:e,label:t,icon:n})=>{let r=n||$l[e]||null,i=r?r():null;i&&i.styles({height:`16px`,width:`16px`});let a=aa(i||t).attr(`data-theme-mode`,e).attr(`aria-label`,t).attr(`title`,t).styles({borderRadius:`50%`,flex:`0 0 auto`,height:`32px`,padding:`0`,width:`32px`});a.on(`click`,()=>{Ce(e,{persist:this._persist}),this.sync()}),this._buttons.set(e,a),this.child(a)}),this.sync()}sync(){let e=we();return this._buttons.forEach((t,n)=>{let r=n===e;t.styles(r?{background:R(`color-primary-subtle`,`#eff6ff`),borderColor:R(`color-primary-border`,`#bfdbfe`),color:R(`color-text-active`,`#1d4ed8`)}:{background:`transparent`,borderColor:`transparent`,color:R(`color-text-secondary`,`#6f6f6f`)}),t.attr(`data-active`,r?`true`:null)}),this}};function nu(e=null,t=null,n=null){let r=B(e,t,n),i=new tu(r.first);return r.options?.modes!==void 0&&i.modes(r.options.modes),r.options?.persist!==void 0&&i.persist(r.options.persist),V(i,r.options,r.callback)}v(g,{vThemeModeSwitch:nu});var ru=8,iu=null;function au(){typeof document>`u`||iu||(iu=document.createElement(`style`),iu.setAttribute(`data-yoya-vrouter-views-popup-style`,``),iu.textContent=`.yoya-vrouter-views-titlebar,
2
+ .yoya-vrouter-views-popup {
3
+ -ms-overflow-style: none;
4
+ scrollbar-width: none;
5
+ }
6
+ .yoya-vrouter-views-titlebar::-webkit-scrollbar,
7
+ .yoya-vrouter-views-popup::-webkit-scrollbar {
8
+ display: none;
9
+ height: 0;
10
+ width: 0;
11
+ }
12
+ .yoya-vrouter-views-popup-item:hover {
13
+ background: var(--yoya-color-surface-hover, #eef3f9);
14
+ }
15
+ .yoya-vrouter-views-popup-item[aria-current='true'] {
16
+ background: var(--yoya-color-primary-subtle, #e8f0fe);
17
+ color: var(--yoya-color-primary, #1f6feb);
18
+ }
19
+ .yoya-vrouter-views-popup-close {
20
+ color: var(--yoya-color-text-secondary, #57606a);
21
+ opacity: 0.65;
22
+ }
23
+ .yoya-vrouter-views-popup-item:hover .yoya-vrouter-views-popup-close,
24
+ .yoya-vrouter-views-popup-close:hover {
25
+ color: var(--yoya-color-text-danger, #b91c1c);
26
+ opacity: 1;
27
+ }
28
+ .yoya-vrouter-views-context-item:hover {
29
+ background: var(--yoya-color-surface-hover, #f6f8fa);
30
+ }
31
+ .yoya-vrouter-views-context-separator {
32
+ background: var(--yoya-color-border, #d0d7de);
33
+ height: 1px;
34
+ margin: 4px 6px;
35
+ }`,document.head?.appendChild(iu))}function ou(e){let t=[e._defaultPath||`/`,e._routes.map(e=>e.pattern).join(`|`)].join(`::`),n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)|0;return`yoya-ui:router-views:${(n>>>0).toString(36)}`}function su(e){if(typeof localStorage>`u`)return null;try{let t=JSON.parse(localStorage.getItem(e)||`null`);return Array.isArray(t?.paths)?t:null}catch{return null}}var cu=class extends g{constructor(e=null){super(`div`),this._routes=[],this._defaultPath=null,this._notFoundView=null,this._beforeEach=null,this._currentPath=`/`,this._currentParams={},this._currentQuery={},this._currentRoute=null,this._currentView=null,this._loadingView=null,this._errorView=null,this._navigationGeneration=0,this._outlet=this,this._subscribers=new Set,this._ignoreNextHashPath=null,this._mode=`hash`,this._started=!1,this._onHashChange=()=>this._handleHashChange(),this._onPopState=()=>this._handlePopState(),this.attr(`data-yoya-router`,``),e!==null&&this.setup(e)}setup(e){return typeof e==`function`?(e(this),this):super.setup(e)}default(e){return this._defaultPath=$(e),this}mode(e){if(e===void 0)return this._mode;let t=e===`history`?`history`:`hash`;if(t===this._mode)return this;let n=this._started;return n&&this.stop(),this._mode=t,n&&this.start(),this}route(e,t){let n=gu(e,t);return this._routes.push(n),this}notFound(e){return this._notFoundView=e,this}loading(e){return this._loadingView=e,this}error(e){return this._errorView=e,this}beforeEach(e){return this._beforeEach=e,this}start(){!this._started&&typeof window<`u`&&(this._mode===`history`?window.addEventListener(`popstate`,this._onPopState):window.addEventListener(`hashchange`,this._onHashChange),this._started=!0);let e=Pu(this._mode);return(this._mode===`history`?e===`/`||e===`/index.html`:!window.location.hash)&&this._defaultPath?this.navigate(this._defaultPath,{replace:!0}):this.refresh()}stop(){return this._started&&typeof window<`u`&&(this._mode===`history`?window.removeEventListener(`popstate`,this._onPopState):window.removeEventListener(`hashchange`,this._onHashChange),this._started=!1),this}navigate(e,t={}){let n=$(e),r=this._resolve(n);return this._canEnter(r.context)?(Iu(n,t,this._mode)&&!t.replace&&this._mode===`hash`&&(this._ignoreNextHashPath=n),this._renderResolved(r),this):this}refresh(){let e=Pu(this._mode),t=this._resolve(e);return this._canEnter(t.context)&&this._renderResolved(t),this}renderPath(e){let t=this._resolve(e);return this._canEnter(t.context)&&this._renderResolved(t),this}currentPath(){return this._currentPath}currentParams(){return{...this._currentParams}}currentQuery(){return{...this._currentQuery}}currentRoute(){return this._currentRoute}currentView(){return this._currentView}outlet(e){if(e===void 0)return this._outlet;if(!(e instanceof g))throw TypeError(`Router outlet must be an ElementNode`);return this._outlet=e,this}subscribe(e){if(typeof e!=`function`)throw TypeError(`Router subscriber must be a function`);return this._subscribers.add(e),()=>this._subscribers.delete(e)}go(e){return window.history.go(e),this}back(){return this.go(-1)}forward(){return this.go(1)}destroy(){return this.stop(),this._navigationGeneration+=1,this._destroyCurrentView(),this._subscribers.clear(),super.destroy()}_resolve(e){let t=this._routes.map(t=>({route:t,match:ju(t.pattern,e)})).find(({match:e})=>e);if(t)return{context:Mu(this,e,t.route,t.match),route:t.route,view:t.route.view};let n=Ru(e);return{context:Mu(this,e,null,{params:{},pathname:n.pathname,query:n.query}),route:null,view:this._notFoundView}}_handleHashChange(){let e=Nu();return this._ignoreNextHashPath===e?(this._ignoreNextHashPath=null,this):(this._ignoreNextHashPath=null,e===this._currentPath?this:this.refresh())}_handlePopState(){return this._ignoreNextHashPath=null,this.refresh()}_canEnter(e){let t={params:this.currentParams(),path:this._currentPath,query:this.currentQuery(),route:this._currentRoute};return!(this._beforeEach&&this._beforeEach(e,t,this)===!1||e.route?.beforeEnter&&e.route.beforeEnter(e,t,this)===!1)}_renderResolved(e){let{context:t,route:n,view:r}=e,i=typeof r==`function`?r(t):r;if(this._navigationGeneration+=1,!ku(i)){this._commitView(e,Eu(i,t));return}let a=this._navigationGeneration;this._commitView(e,this._buildLoadingView(n,t)),Promise.resolve(i).then(r=>{if(a!==this._navigationGeneration||this._deleted)return r;let i;try{i=Eu(r,t)}catch(i){return this._commitView(e,this._buildErrorView(n,t,i)),r}return this._commitView(e,i),r},r=>(a!==this._navigationGeneration||this._deleted||this._commitView(e,this._buildErrorView(n,t,r)),r))}_commitView(e,t){let{context:n,route:r}=e,i=this._outlet;this._destroyCurrentView(),i._children=[],i._el&&i._el.replaceChildren(),i.child(t),this._currentPath=n.path,this._currentParams=n.params,this._currentQuery=n.query,this._currentRoute=r,this._currentView=t,this._subscribers.forEach(e=>e(n,this))}_buildLoadingView(e,t){return Au(e?.loading??this._loadingView??Du,[t])}_buildErrorView(e,t,n){return Au(e?.error??this._errorView??Ou,[n,t])}_destroyCurrentView(){this._currentView?.destroy&&this._currentView.destroy(),this._currentView=null}};function lu(e=null,t=null,n=null){let r=m(e,t,n),i=new cu(r.first);return h(i,r.options),typeof r.callback==`function`&&r.callback(i),i}var uu=lu;function du(e,t){return{config:t,pattern:e}}function fu(e=null,t=null,n=null){let r=m(e,t,n),i=new cu;return i.vRoute=(e,t)=>(i.route(e,t),i),yu(i,r.first),h(i,r.options),typeof r.callback==`function`&&r.callback(i),i}function pu(e,t=null,n=null){_u(e);let r=new g(`a`),i={exact:!0,label:null,params:{},query:{},replace:!1,to:`/`},a=new g(`span`).className(`yoya-vlink-label`);r.className(`yoya-vlink`),r.attr(`data-router-link`,`true`),r.child(a),r.to=e=>xu(r,i,`to`,e),r.params=e=>xu(r,i,`params`,e||{}),r.query=e=>xu(r,i,`query`,e||{}),r.replace=e=>xu(r,i,`replace`,!!e),r.exact=e=>xu(r,i,`exact`,!!e),r.label=e=>e===void 0?i.label:(i.label=e,G(a,W(e)),r),bu(r,i,t),Su(r,i,e),r.on(`click`,t=>{Tu(t,r)&&(t.preventDefault(),e.navigate(Cu(i.to,i.params,i.query),{replace:i.replace}))});let o=e.subscribe(()=>Su(r,i,e)),s=r.destroy.bind(r);return r.destroy=()=>(o(),s()),typeof n==`function`&&n(r),r}function mu(e,t=null,n=null){_u(e);let r=new g(`div`);r.className(`yoya-vrouter-view`),r.attr(`data-router-view`,`true`),typeof t==`function`?t(r):t&&r.setup(t),e.outlet(r);let i=r.destroy.bind(r);return r.destroy=()=>(e.outlet()===r&&e.outlet(e),i()),typeof n==`function`&&n(r),r}function hu(e,t=null,n=null){_u(e);let r=new g(`div`),i=new g(`header`).className(`yoya-vrouter-views-titlebar`).attr({role:`tablist`,"aria-label":`已打开页面`}),a=new g(`div`).className(`yoya-vrouter-views-content`),o=f(`⋯`),s=new g(`button`).className(`yoya-vrouter-views-expand`).attr({type:`button`,"aria-expanded":`false`,"aria-label":`展开全部标签`}).styles({alignItems:`center`,background:`transparent`,border:`0`,color:R(`color-text-secondary`,`#57606a`),cursor:`pointer`,display:`none`,flexShrink:`0`,font:`inherit`,gap:`6px`,height:`24px`,justifyContent:`center`,lineHeight:`1`,marginBottom:`0`,marginLeft:`auto`,minWidth:`24px`,padding:`0`,position:`sticky`,right:`8px`,zIndex:`2`}).child(o),c=new g(`div`).className(`yoya-vrouter-views-popup`).attr({role:`menu`,"aria-label":`已打开页面`}).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#d0d7de`),borderRadius:`8px`,boxShadow:`0 12px 28px rgba(15, 23, 42, 0.18)`,display:`none`,maxHeight:`280px`,maxWidth:`260px`,minWidth:`180px`,msOverflowStyle:`none`,overflowY:`auto`,padding:`6px`,position:`fixed`,scrollbarWidth:`none`,zIndex:`100`}),l={lockTitle:!1,overflow:!1,persist:!0,popupOpen:!1,storageKey:ou(e),suppressPersist:!1,tabs:new Map,title:`工作区`,titleResolver:null,titlePosition:`top`};r.className(`yoya-vrouter-views`),r.styles({border:z(`color-border`,`#d0d7de`),borderRadius:`8px`,overflow:`hidden`}),i.styles({background:R(`color-surface-hover`,`#f6f8fa`),borderBottom:z(`color-border`,`#d0d7de`),boxSizing:`border-box`,color:R(`color-text-secondary`,`#57606a`),display:`flex`,flexWrap:`nowrap`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:`13px`,gap:`4px`,msOverflowStyle:`none`,overflowX:`auto`,overflowY:`hidden`,padding:`0px 0px`,scrollbarWidth:`none`,width:`100%`}),a.className(`yoya-vrouter-views-content`),a.styles({minHeight:`120px`,padding:`16px`}),r.child(i,a,c);let u=()=>{let e=l.titlePosition!==`top`;if(l.lockTitle){r.styles({display:`flex`,flexDirection:e?`row`:`column`,height:`100%`,minHeight:`0`,overflow:`hidden`}),i.style(`flex`,`0 0 auto`),a.styles({flex:`1 1 auto`,minHeight:`0`,minWidth:`0`,overflow:`auto`});return}r.styles({flexDirection:null,height:null,minHeight:null,overflow:`hidden`}),i.style(`flex`,null),a.styles({flex:e?`1 1 auto`:null,minHeight:`120px`,minWidth:e?`0`:null,overflow:null})},d=e=>{let t=e!==`top`;r.styles({alignItems:t?`stretch`:null,display:t?`flex`:null}),i.styles({background:R(`color-surface-hover`,`#f6f8fa`),borderBottom:t?null:z(`color-border`,`#d0d7de`),borderLeft:e===`right`?`1px solid`:null,borderLeftColor:e===`right`?R(`color-border`,`#d0d7de`):null,borderLeftStyle:e===`right`?`solid`:null,borderLeftWidth:e===`right`?`1px`:null,borderRight:e===`left`?`1px solid`:null,borderRightColor:e===`left`?R(`color-border`,`#d0d7de`):null,borderRightStyle:e===`left`?`solid`:null,borderRightWidth:e===`left`?`1px`:null,boxSizing:`border-box`,color:R(`color-text-secondary`,`#57606a`),display:`flex`,flexDirection:t?`column`:`row`,flexShrink:t?`0`:null,flexWrap:`nowrap`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:`13px`,gap:`4px`,msOverflowStyle:`none`,overflowX:t?`hidden`:`auto`,overflowY:t?`auto`:`hidden`,padding:t?`10px 8px`:`0px 0px`,scrollbarWidth:`none`,width:t?null:`100%`}),a.styles({flex:t?`1 1 auto`:null,minWidth:t?`0`:null});let n=e===`right`?[a,i,c]:[i,a,c];r.clearChildren().child(n),r._el&&n.forEach(e=>{let t=e.renderDom();t&&r._el.appendChild(t)}),u()},p=(e={})=>{let t=l.title,n=e.route?.title;if(n!==void 0&&(t=typeof n==`function`?n(e):n),l.titleResolver){let n=l.titleResolver(e);n!=null&&(t=typeof n==`function`?n(e):n)}return t??``},m=(e,t)=>{let n=l.titlePosition,r=n!==`top`;e.renderDom().querySelector(`.yoya-vrouter-views-label`)?.setAttribute(`aria-selected`,String(t)),e.styles({background:t?R(`color-surface`,`#ffffff`):R(`color-surface-active`,`#eaeef2`),border:z(`color-border`,`#d0d7de`),borderBottomColor:n===`top`&&t?R(`color-surface`,`#ffffff`):R(`color-border`,`#d0d7de`),borderLeftColor:n===`right`&&t?R(`color-surface`,`#ffffff`):R(`color-border`,`#d0d7de`),borderRadius:n===`left`?`6px 0 0 6px`:n===`right`?`0 6px 6px 0`:`6px 6px 0 0`,borderRightColor:n===`left`&&t?R(`color-surface`,`#ffffff`):R(`color-border`,`#d0d7de`),color:t?R(`color-text`,`#24292f`):R(`color-text-secondary`,`#57606a`),fontWeight:t?`600`:`400`,marginBottom:n===`top`?`-9px`:`0`,marginLeft:n===`right`?`-9px`:`0`,marginRight:n===`left`?`-9px`:`0`,padding:r?`8px 10px`:`7px 14px 8px`})},h=e=>{l.overflow=!!e,r.attr(`data-title-overflow`,l.overflow?`true`:null),s.style(`display`,l.overflow?`inline-flex`:`none`)},_=()=>{if(l.titlePosition!==`top`||l.tabs.size<=ru){h(!1);return}h(!0)},v=()=>{let e=Array.from(l.tabs.entries()),t=e.slice(0,ru).map(([,e])=>e.tab).filter(e=>e!==s);if(!(e.length>ru&&l.titlePosition===`top`)){l.popupOpen&&x(),i._children=t,i._childrenDirty=!0,i._el?i._el.replaceChildren(...t.map(e=>e.renderDom()).filter(Boolean)):s._el?.remove(),h(!1);return}if(i._children=[...t,s],i._childrenDirty=!0,i._el){let e=t.map(e=>e.renderDom()).filter(Boolean);i._el.replaceChildren(...e,s.renderDom())}_()},y=()=>{if(!(!l.persist||l.suppressPersist||typeof localStorage>`u`))try{localStorage.setItem(l.storageKey,JSON.stringify({activePath:e.currentPath(),paths:Array.from(l.tabs.keys())}))}catch{}},b=null,x=()=>{l.popupOpen=!1,r.attr(`data-title-popup`,null),s.attr(`aria-expanded`,`false`),c.style(`display`,`none`),b&&=(b(),null)},S=()=>{c.clearChildren(),c._el&&c._el.replaceChildren(),Array.from(l.tabs.entries()).slice(ru).forEach(([t,n])=>{let r=n.text.textContent(),i=new g(`div`).className(`yoya-vrouter-views-popup-item`).attr({role:`menuitem`,tabIndex:`0`,"data-router-view-path":t}).styles({alignItems:`center`,borderRadius:`6px`,color:R(`color-text`,`#24292f`),cursor:`pointer`,display:`flex`,fontSize:`13px`,gap:`8px`,padding:`7px 8px`,width:`100%`}),a=new g(`span`).className(`yoya-vrouter-views-popup-title`).styles({flex:`1`,minWidth:`0`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}).text(r),o=new g(`button`).className(`yoya-vrouter-views-popup-close`).attr({type:`button`,"aria-label":`关闭 ${r}`}).styles({background:`transparent`,border:`0`,color:`inherit`,cursor:`pointer`,flexShrink:`0`,font:`inherit`,lineHeight:`1`,padding:`2px 4px`}).text(`×`);t===e.currentPath()&&(i.attr(`aria-current`,`true`),i.styles({background:R(`color-primary-subtle`,`#e8f0fe`),color:R(`color-primary`,`#1f6feb`)}));let s=()=>{x(),e.navigate(t)};i.on(`click`,s),i.on(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s())}),o.on(`click`,e=>{e.stopPropagation(),ee(t,e),l.popupOpen&&S()}),i.child(a,o),c.child(i)})},C=()=>{if(l.tabs.size===0)return;au(),S(),l.popupOpen=!0,r.attr(`data-title-popup`,`true`),s.attr(`aria-expanded`,`true`),c.styles({display:`block`}),a();let e=e=>{!c._el?.contains(e.target)&&!s._el?.contains(e.target)&&x()},t=e=>{e.key===`Escape`&&x()},n=()=>a(),i=()=>a();document.addEventListener(`click`,e),document.addEventListener(`keydown`,t),window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,i),b=()=>{document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t),window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,i)};function a(){let e=s._el?.getBoundingClientRect(),t=c._el?.getBoundingClientRect();if(!e||!t)return;let n=window.innerWidth||document.documentElement?.clientWidth||0,r=window.innerHeight||document.documentElement?.clientHeight||0,i=e.right-t.width;i=Math.max(8,Math.min(i,n-t.width-8));let a=e.bottom+4;a+t.height+8>r&&(a=Math.max(8,e.top-t.height-4)),c.styles({left:`${i}px`,top:`${a}px`})}};s.on(`click`,()=>{l.popupOpen?x():C()});let w=r.renderDom.bind(r);r.renderDom=()=>{au();let e=w();return _(),e},r.updateOverflow=_,r.titlePosition=t=>{if(t===void 0)return l.titlePosition;let n=vu(t);return l.titlePosition=n,n!==`top`&&l.popupOpen&&x(),r.attr(`data-title-position`,l.titlePosition),i.attr(`aria-orientation`,l.titlePosition===`top`?`horizontal`:`vertical`),d(l.titlePosition),v(),l.tabs.forEach(({tab:t},n)=>{m(t,n===e.currentPath())}),_(),r},r.titlePosition(l.titlePosition),r.lockTitle=(e=!0)=>e===void 0?l.lockTitle:(l.lockTitle=!!e,r.attr(`data-title-locked`,l.lockTitle?`true`:null),d(l.titlePosition),_(),r),r.titleLocked=r.lockTitle;let ee=(t,n=null)=>{n&&n.stopPropagation();let r=Array.from(l.tabs.entries()).findIndex(([e])=>e===t),o=l.tabs.get(t);if(!o)return;let s=o.tab.renderDom().querySelector(`.yoya-vrouter-views-label`).getAttribute(`aria-selected`)===`true`;if(l.tabs.delete(t),i._children=i.children().filter(e=>e!==o.tab),i._childrenDirty=!0,o.tab.destroy(),v(),y(),!s)return;let c=Array.from(l.tabs.keys());if(c.length>0){let t=c[Math.min(r,c.length-1)];e.navigate(t,{replace:!0});return}a.clearChildren().commit(),e._navigationGeneration+=1,e._currentView=null},T=new g(`div`).className(`yoya-vrouter-views-context`).attr({role:`menu`,"aria-label":`标签页操作`}).styles({background:R(`color-surface`,`#ffffff`),border:z(`color-border`,`#d0d7de`),borderRadius:`8px`,boxShadow:`0 12px 28px rgba(15, 23, 42, 0.18)`,display:`none`,minWidth:`180px`,padding:`6px`,position:`fixed`,zIndex:`100`}),E=null,D=()=>{T.styles({display:`none`}),T.clearChildren(),T._el?.remove(),E&&=(E(),null)},O=(t,n=null)=>{let r=new Set(t),o=Array.from(l.tabs.entries()),s=o.findIndex(([e])=>r.has(e));if(o.forEach(([e,t])=>{r.has(e)&&(l.tabs.delete(e),i._children=i.children().filter(e=>e!==t.tab),i._childrenDirty=!0,t.tab.destroy())}),v(),y(),l.popupOpen&&S(),!r.has(e.currentPath()))return;let c=Array.from(l.tabs.keys());if(c.length===0){a.clearChildren().commit(),e._navigationGeneration+=1,e._currentView=null;return}let u=n&&l.tabs.has(n)?n:c[Math.min(Math.max(s,0),c.length-1)];e.navigate(u,{replace:!0})},te=t=>{if(typeof navigator>`u`||!navigator.clipboard)return;let n=typeof window>`u`?``:window.location.origin,r=typeof window>`u`?``:window.location.pathname,i=e.mode()===`history`?`${n}${r}${t}`:`${n}${r}#${t}`;navigator.clipboard.writeText(i).catch(()=>{})},k=(t,n)=>{l.popupOpen&&x(),D();let r=Array.from(l.tabs.entries()),i=r.findIndex(([e])=>e===t),a=()=>O(r.filter(([e])=>e!==t).map(([e])=>e),t),o=()=>O(r.slice(0,i).map(([e])=>e),t),s=()=>O(r.slice(i+1).map(([e])=>e),t),c=()=>O(r.map(([e])=>e)),u=(e,t,n=!1,r=!1)=>{let i=new g(`div`).className(`yoya-vrouter-views-context-item`).attr({role:`menuitem`,tabIndex:`0`}).text(e).styles({alignItems:`center`,borderRadius:`6px`,color:n?R(`color-text-danger`,`#b91c1c`):R(`color-text`,`#24292f`),cursor:r?`default`:`pointer`,display:`flex`,fontSize:`13px`,gap:`8px`,padding:`7px 10px`,width:`100%`});return r?(i.attr(`aria-disabled`,`true`),i.styles({opacity:`0.4`})):i.on(`click`,()=>{D(),t()}),T.child(i),i},d=()=>T.child(new g(`div`).className(`yoya-vrouter-views-context-separator`));u(`刷新`,()=>e.navigate(t,{replace:!0})),u(`复制链接`,()=>te(t)),d(),u(`关闭`,()=>ee(t),!0),u(`关闭其他`,a,!1,r.length<=1),u(`关闭左侧`,o,!1,i<=0),u(`关闭右侧`,s,!1,i===r.length-1),d(),u(`关闭全部`,c,!0,r.length===0),document.body.appendChild(T.renderDom()),T.styles({display:`block`});let f=T._el.getBoundingClientRect(),p=typeof window>`u`?0:window.innerWidth||0,m=typeof window>`u`?0:window.innerHeight||0,h=Math.max(8,Math.min(n.clientX||0,p-f.width-8)),_=Math.max(8,Math.min(n.clientY||0,m-f.height-8));T.styles({left:`${h}px`,top:`${_}px`});let v=e=>{T._el?.contains(e.target)||D()},y=e=>{e.key===`Escape`&&D()},b=()=>D();document.addEventListener(`mousedown`,v),document.addEventListener(`keydown`,y),window.addEventListener(`scroll`,b,!0),window.addEventListener(`resize`,b),E=()=>{document.removeEventListener(`mousedown`,v),document.removeEventListener(`keydown`,y),window.removeEventListener(`scroll`,b,!0),window.removeEventListener(`resize`,b)}},A=(t={})=>{let n=t.path||e.currentPath(),r=new Set(l.titlePosition===`top`?Array.from(l.tabs.keys()).slice(0,ru):Array.from(l.tabs.keys())),a=l.tabs.get(n);if(a){let e=p(t);a.text.textContent(e),a.closeButton.attr(`aria-label`,`关闭 ${e}`)}else{let r=new g(`div`).className(`yoya-vrouter-views-title`),o=f(p(t)),s=new g(`button`).className(`yoya-vrouter-views-label`).child(o),c=new g(`button`).className(`yoya-vrouter-views-close`);r.attr({"data-router-view-path":n}),r.styles({alignItems:`center`,cursor:`pointer`,display:`inline-flex`,font:`inherit`,gap:`8px`,whiteSpace:`nowrap`}),s.attr({role:`tab`,type:`button`}),s.styles({background:`transparent`,border:`0`,color:`inherit`,cursor:`pointer`,font:`inherit`,padding:`0`}),s.on(`click`,()=>e.navigate(n)),c.attr({type:`button`,"aria-label":`关闭 ${p(t)}`}),c.styles({background:`transparent`,border:`0`,color:`inherit`,cursor:`pointer`,font:`inherit`,lineHeight:`1`,padding:`0`}),c.text(`×`),c.on(`click`,e=>ee(n,e)),r.on(`contextmenu`,e=>{e.preventDefault(),e.stopPropagation(),k(n,e)}),r.child(s,c),i.child(r),m(r,!1),a={closeButton:c,tab:r,text:o},l.tabs.set(n,a)}r.has(n)||(l.tabs.delete(n),l.tabs=new Map([[n,a],...l.tabs])),l.tabs.forEach(({tab:e},t)=>m(e,t===n)),v(),l.popupOpen&&S(),y()},ne=()=>{if(!l.persist)return;let t=su(l.storageKey);if(t){l.suppressPersist=!0;try{t.paths.slice().reverse().forEach(t=>{let n=e._resolve(t);A({...n.context,path:t})})}finally{l.suppressPersist=!1,y()}}};if(typeof t==`function`)t(r);else if(t&&typeof t==`object`){let{persist:e,storageKey:n,title:i,titlePosition:a,titleResolver:o,...s}=t;i!==void 0&&(l.title=i),e!==void 0&&(l.persist=!!e),n!==void 0&&(l.storageKey=n),a!==void 0&&r.titlePosition(a),typeof o==`function`&&(l.titleResolver=o),Object.keys(s).length>0&&r.setup(s)}e.outlet(a),ne(),(e.currentRoute()||e.currentPath()!==`/`)&&A({params:e.currentParams(),path:e.currentPath(),query:e.currentQuery(),route:e.currentRoute(),router:e});let j=e.subscribe(e=>A(e)),M=()=>_();typeof window<`u`&&window.addEventListener(`resize`,M);let re=r.destroy.bind(r);return r.destroy=()=>(l.popupOpen&&x(),D(),typeof window<`u`&&window.removeEventListener(`resize`,M),j(),e.outlet()===a&&e.outlet(e),re()),typeof n==`function`&&n(r),r}v(g,{vLink:pu,vRouter:fu,vRouterView:mu,vRouterViews:hu});function gu(e,t){let n={beforeEnter:null,error:null,loading:null,pattern:Lu(e),title:null,view:null};return typeof t==`function`||t instanceof l||Bu(t)?(n.view=t,n):(t&&typeof t==`object`&&(n.beforeEnter=t.beforeEnter||null,n.error=t.error??null,n.loading=t.loading??null,n.title=t.title??null,n.view=t.view||t.component||null),n)}function _u(e){if(!(e instanceof cu))throw TypeError(`vLink and vRouterView require a Router instance`)}function vu(e){return e===`left`||e===`right`?e:`top`}function yu(e,t){if(typeof t==`function`)return t(e),e;if(!t||typeof t!=`object`)return e;let{beforeEach:n,default:r,error:i,loading:a,notFound:o,routes:s=[],...c}=t;return Object.keys(c).length&&e.setup(c),r!==void 0&&e.default(r),n&&e.beforeEach(n),a!==void 0&&e.loading(a),i!==void 0&&e.error(i),s.forEach(t=>{t?.pattern!==void 0&&e.vRoute(t.pattern,t.config)}),o!==void 0&&e.notFound(o),e}function bu(e,t,n){if(typeof n==`function`){n(e);return}if(typeof n==`string`){e.to(n),e.label(n);return}if(!n)return;let{exact:r,label:i,params:a,query:o,replace:s,to:c,...l}=n;Object.keys(l).length&&e.setup(l),c!==void 0&&(t.to=c),a!==void 0&&(t.params=a||{}),o!==void 0&&(t.query=o||{}),s!==void 0&&(t.replace=!!s),r!==void 0&&(t.exact=!!r),t.label=i??t.to,e.label(t.label)}function xu(e,t,n,r){if(r===void 0)return t[n];t[n]=r,n===`to`&&t.label===null&&G(e.children()[0],W(r));let i=e._routerInstance;return i&&Su(e,t,i),e}function Su(e,t,n){e._routerInstance=n;let r=Cu(t.to,t.params,t.query),i=wu(n.currentPath(),r,t.exact),a=new Set(String(e.attr(`class`)||``).split(/\s+/).filter(Boolean));return a.add(`yoya-vlink`),i?a.add(`is-active`):a.delete(`is-active`),e.attr({"aria-current":i?`page`:null,class:[...a].join(` `),href:n.mode()===`history`?r:`#${r}`}),e}function Cu(e,t,n){let[r,i=``]=$(e).split(`?`),a=r.replace(/:([A-Za-z0-9_]+)/g,(e,n)=>t[n]===void 0?e:encodeURIComponent(t[n])),o=new URLSearchParams(i);Object.entries(n||{}).forEach(([e,t])=>{o.delete(e),Array.isArray(t)?t.forEach(t=>o.append(e,t)):t!=null&&o.set(e,t)});let s=o.toString();return s?`${a}?${s}`:a}function wu(e,t,n){let r=$(e),i=$(t);if(n)return r===i;let a=Ru(r).pathname,o=Ru(i).pathname;return a===o||a.startsWith(`${o}/`)}function Tu(e,t){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&(!t.attr(`target`)||t.attr(`target`)===`_self`)}function Eu(e,t){if(e instanceof l)return e;if(e==null)return f(``);if(Bu(e))return f(e);if(typeof e==`object`&&e&&e.default!==void 0&&typeof e.render!=`function`)return Eu(e.default,t);if(typeof e==`function`)return Eu(e(t),t);if(typeof e==`object`&&typeof e.render==`function`)return Eu(e.render(),t);throw TypeError(`Router route view must be a ViewNode, string, number, null, undefined, a render() component object, a factory returning one, or a module with a default export`)}var Du=()=>`加载中…`,Ou=e=>`加载失败:${e?.message??String(e)}`;function ku(e){return e!==null&&(typeof e==`object`||typeof e==`function`)&&typeof e.then==`function`}function Au(e,t){return Eu(typeof e==`function`?e(...t):e,t[t.length-1])}function ju(e,t){let n=Ru(e),r=Ru(t),i=zu(n.pathname),a=zu(r.pathname);if(i.length!==a.length)return null;let o={};for(let e=0;e<i.length;e+=1){let t=i[e],n=a[e];if(t.startsWith(`:`)){o[t.slice(1)]=decodeURIComponent(n);continue}if(t!==n)return null}return{params:o,pathname:r.pathname,query:r.query}}function Mu(e,t,n,r){return{params:{...r.params},path:t,pathname:r.pathname,query:{...r.query},route:n,router:e}}function Nu(){return typeof window>`u`?`/`:$(window.location.hash.replace(/^#/,``)||`/`)}function Pu(e=`hash`){return typeof window>`u`?`/`:e===`history`?$(`${window.location.pathname}${window.location.search}`):Nu()}function Fu(e,t={}){if(typeof window>`u`)return!1;let n=`#${e}`;return t.replace?(window.history.replaceState(null,``,n),!0):window.location.hash!==n&&(window.location.hash=n,!0)}function Iu(e,t={},n=`hash`){if(typeof window>`u`)return!1;if(n!==`history`)return Fu(e,t);let r=$(e),i=Pu(`history`);return!t.replace&&i===r?!1:(t.replace?window.history.replaceState(null,``,r):window.history.pushState(null,``,r),!0)}function Lu(e){return $(e).split(`?`)[0]||`/`}function $(e){let[t,n=``]=String(e||`/`).replace(/^#/,``).split(`?`),r=t.startsWith(`/`)?t:`/${t}`,i=r.length>1?r.replace(/\/+$/,``):r;return n?`${i}?${n}`:i}function Ru(e){let[t,n=``]=$(e).split(`?`);return{pathname:t,query:Object.fromEntries(new URLSearchParams(n))}}function zu(e){return e.split(`/`).filter(Boolean)}function Bu(e){return typeof e==`string`||typeof e==`number`}var Vu={direction:`ltr`,motion:`auto`,play:`auto`,ripple:`on`,speed:`normal`,strength:`strong`},Hu={direction:new Set([`ltr`,`rtl`]),motion:new Set([`auto`,`always`]),play:new Set([`auto`,`hover`,`off`]),ripple:new Set([`on`,`off`]),speed:new Set([`slow`,`normal`,`fast`]),strength:new Set([`soft`,`strong`])},Uu=class extends ia{constructor(e=null,t=null,n=null){super(e,t,n),this.className(L,`yoya-vglow-button`),Object.entries(Vu).forEach(([e,t])=>{this.attr(`data-glow-${e}`)===void 0&&this.attr(`data-glow-${e}`,t)}),this._bindRipple()}glow(e){if(e===void 0)return{direction:this.direction(),motion:this.motion(),play:this.play(),ripple:this.ripple(),speed:this.speed(),strength:this.strength()};if(e&&typeof e==`object`){let{direction:t,motion:n,play:r,ripple:i,speed:a,strength:o}=e;n!==void 0&&this.motion(n),r!==void 0&&this.play(r),i!==void 0&&this.ripple(i),a!==void 0&&this.speed(a),t!==void 0&&this.direction(t),o!==void 0&&this.strength(o)}return this}play(e){return e===void 0?this.attr(`data-glow-play`):this.attr(`data-glow-play`,Hu.play.has(e)?e:`auto`)}speed(e){return e===void 0?this.attr(`data-glow-speed`):this.attr(`data-glow-speed`,Hu.speed.has(e)?e:`normal`)}direction(e){return e===void 0?this.attr(`data-glow-direction`):this.attr(`data-glow-direction`,Hu.direction.has(e)?e:`ltr`)}strength(e){return e===void 0?this.attr(`data-glow-strength`):this.attr(`data-glow-strength`,Hu.strength.has(e)?e:`strong`)}motion(e){return e===void 0?this.attr(`data-glow-motion`):this.attr(`data-glow-motion`,Hu.motion.has(e)?e:`auto`)}ripple(e){return e===void 0?this.attr(`data-glow-ripple`):this.attr(`data-glow-ripple`,Hu.ripple.has(e)?e:`on`)}_bindRipple(){this.on(`click`,e=>{if(this.attr(`data-glow-ripple`)===`off`||this.getBooleanState(`disabled`))return;let t=this._el?.getBoundingClientRect?.(),n=Math.max(t?.width||120,t?.height||40),r=e.clientX||0,i=e.clientY||0,a=r===0&&i===0,o=`${n/2}px`,s=a?`calc(50% - ${o})`:`${r-(t?.left||0)-n/2}px`,c=a?`calc(50% - ${o})`:`${i-(t?.top||0)-n/2}px`,l=new P(`span`).className(`yoya-vglow-button-ripple`).attr(`aria-hidden`,`true`).style({height:`${n}px`,left:s,top:c,width:`${n}px`});l.on(`animationend`,()=>{let e=this._children.indexOf(l);e>=0&&this._children.splice(e,1),l.destroy()}),this.child(l)})}};function Wu(e=null,t=null,n=null){return new Uu(e,t,n)}v(P,{vGlowButton:Wu}),e.ArrowDownOutlined=Bn,e.ArrowLeftOutlined=Vn,e.ArrowRightOutlined=Hn,e.ArrowUpOutlined=Un,e.BellOutlined=Wn,e.CalendarOutlined=Gn,e.CheckOutlined=Kn,e.ChevronDownOutlined=qn,e.ChevronLeftOutlined=Jn,e.ChevronRightOutlined=Yn,e.ChevronUpOutlined=Xn,e.ClientOnlyNode=y,e.CloseOutlined=Zn,e.CodeBlock=Ml,e.CodeOutlined=Qn,e.ComponentNode=d,e.CopyOutlined=$n,e.DownloadOutlined=er,e.EditOutlined=tr,e.ElementNode=g,e.ExternalOutlined=nr,e.EyeOutlined=rr,e.FileOutlined=ir,e.FolderOpenOutlined=or,e.FolderOutlined=ar,e.HeartOutlined=sr,e.HomeOutlined=cr,e.HtmlElementNode=P,e.I18n=w,e.I18nTextNode=ee,e.InfoOutlined=lr,e.LanguageSwitch=Kl,e.LockOutlined=ur,e.LogoutOutlined=dr,e.MailOutlined=fr,e.MenuOutlined=pr,e.MinusOutlined=mr,e.MonitorOutlined=Dr,e.MoonOutlined=Er,e.MoreHorizontalOutlined=hr,e.PlusOutlined=gr,e.RefreshOutlined=_r,e.Router=cu,e.SVG_NAMESPACE=Or,e.SearchOutlined=vr,e.SettingsOutlined=yr,e.StarOutlined=br,e.SunOutlined=Tr,e.SvgElementNode=F,e.TextNode=u,e.VTextNode=u,e.ViewTextNode=u,e.TrashOutlined=xr,e.UploadOutlined=Sr,e.UserOutlined=Cr,e.VAnchor=Ra,e.VAnchorItem=za,e.VAutocomplete=zo,e.VAvatar=Js,e.VAvatarUpload=Vs,e.VBadge=ic,e.VBreadcrumb=Ga,e.VBreadcrumbItem=Ka,e.VButton=ia,e.VButtons=sa,e.VCard=xc,e.VCardBody=Cc,e.VCardFooter=wc,e.VCardHeader=Sc,e.VCarousel=oc,e.VCascader=Mo,e.VChart=Pl,e.VCheckbox=Z,e.VCheckboxes=Zo,e.VCode=cc,e.VColorPicker=Ws,e.VContextMenu=Oa,e.VDetail=uc,e.VDetailItem=dc,e.VDialog=go,e.VDigitalBoard=$s,e.VDigitalBoardItem=ec,e.VDropdownMenu=Aa,e.VField=rs,e.VFloatButton=Pa,e.VForm=as,e.VFormItem=is,e.VGauge=dl,e.VGlowButton=Uu,e.VInput=Wo,e.VMenu=fa,e.VMenuDivider=ma,e.VMenuGroup=ha,e.VMenuItem=pa,e.VMessage=uo,e.VMessageContainer=fo,e.VMessageManager=To,e.VNavbar=Xa,e.VPagination=gc,e.VProgress=yc,e.VRadio=Q,e.VRadios=ns,e.VRate=Do,e.VRingStat=ml,e.VScroll=Al,e.VSelect=Jo,e.VSidebar=va,e.VSlider=ko,e.VSparkline=_l,e.VSplitPanel=Wr,e.VStep=$a,e.VSteps=Qa,e.VSubMenu=ga,e.VSwitch=Xo,e.VSymbolButton=Ia,e.VTab=io,e.VTable=kc,e.VTabs=ao,e.VTagsInput=Lo,e.VTbody=Nc,e.VTd=Vc,e.VTextarea=qo,e.VTfoot=Fc,e.VTh=zc,e.VThead=jc,e.VThemeModeSwitch=tu,e.VThemeShell=Jr,e.VTimeline=xl,e.VTimelineItem=Sl,e.VTimer=Go,e.VTimerRange=Ko,e.VTooltip=So,e.VTr=Lc,e.VTree=Zc,e.VTreeNode=Xc,e.VTrendCard=Tl,e.VUpload=Ls,e.ViewNode=l,e.WarningOutlined=wr,e.a=Me,e.abbr=Ne,e.address=Pe,e.applyElementOptions=h,e.area=Fe,e.article=Ie,e.aside=Le,e.audio=Re,e.b=ze,e.base=Be,e.bdi=Ve,e.bdo=He,e.blockquote=Ue,e.body=We,e.br=Ge,e.button=Ke,e.canvas=qe,e.caption=Je,e.center=ni,e.cite=Ye,e.clearDynamicModuleCache=Hl,e.code=Xe,e.codeBlock=Nl,e.col=Ze,e.colgroup=Qe,e.container=ui,e.createElementFactory=_,e.createHtmlFactories=Ae,e.createI18n=T,e.createRouter=lu,e.createVBodyPage=ci,e.data=$e,e.datalist=et,e.dd=tt,e.del=nt,e.details=rt,e.dfn=it,e.dialog=at,e.div=ot,e.divider=yi,e.dl=st,e.dt=ct,e.em=lt,e.embed=ut,e.escapeHtml=i,e.fieldset=dt,e.figcaption=ft,e.figure=pt,e.flex=Qr,e.footer=mt,e.form=ht,e.getI18n=M,e.getPersistedI18nLocales=ie,e.getYoyaMode=we,e.getYoyaTheme=De,e.grid=ai,e.h1=gt,e.h2=_t,e.h3=vt,e.h4=yt,e.h5=bt,e.h6=xt,e.head=St,e.header=Ct,e.hgroup=wt,e.hr=Tt,e.hstack=ti,e.html=Et,e.i=Dt,e.i18n=E,e.i18nText=D,e.iframe=Ot,e.img=kt,e.initYoyaTheme=Oe,e.input=At,e.ins=jt,e.installI18nStringShortcut=te,e.kbd=Mt,e.label=Nt,e.legend=Pt,e.li=Ft,e.link=It,e.listI18n=re,e.main=Lt,e.map=Rt,e.mark=zt,e.menu=Bt,e.meta=Vt,e.meter=Ht,e.mobileLayout=fi,e.nav=Ut,e.normalizeChild=p,e.normalizeSetupArguments=m,e.noscript=Wt,e.object=Gt,e.ol=Kt,e.optgroup=qt,e.option=Jt,e.output=Yt,e.p=Xt,e.picture=Zt,e.pre=Qt,e.preloadDynamicModule=Vl,e.progress=$t,e.q=en,e.registerChildFactories=v,e.registerI18n=ne,e.resolveTarget=r,e.resolveYoyaMode=Te,e.responsiveGrid=oi,e.router=uu,e.rp=tn,e.rt=nn,e.ruby=rn,e.s=an,e.samp=on,e.script=sn,e.search=cn,e.section=ln,e.select=un,e.selectedcontent=dn,e.setYoyaMode=Ce,e.setYoyaTheme=Ee,e.slot=fn,e.small=pn,e.source=mn,e.spacer=vi,e.span=hn,e.stack=$r,e.strong=gn,e.style=_n,e.styleTag=vn,e.sub=yn,e.summary=bn,e.sup=xn,e.svg=I,e.table=Sn,e.tbody=Cn,e.td=wn,e.template=Tn,e.text=f,e.vText=f,e.textarea=En,e.tfoot=Dn,e.th=On,e.thead=kn,e.time=An,e.title=jn,e.toast=ho,e.tr=Mn,e.track=Nn,e.u=Pn,e.ul=Fn,e.unregisterI18n=j,e.vAnchor=Ba,e.vAnchorItem=Va,e.vAside=hi,e.vAutocomplete=Bo,e.vAvatar=Ys,e.vAvatarUpload=Hs,e.vBadge=ac,e.vBody=si,e.vBreadcrumb=qa,e.vBreadcrumbItem=Ja,e.vButton=aa,e.vButtons=ca,e.vCard=Tc,e.vCardBody=Dc,e.vCardFooter=Oc,e.vCardHeader=Ec,e.vCarousel=sc,e.vCascader=No,e.vChart=Fl,e.vCheckbox=ds,e.vCheckboxes=ps,e.vClientOnly=b,e.vCode=lc,e.vCol=ii,e.vColorPicker=Gs,e.vContainer=di,e.vContextMenu=ka,e.vDetail=fc,e.vDetailItem=pc,e.vDialog=_o,e.vDigitalBoard=tc,e.vDigitalBoardItem=nc,e.vDropdownMenu=ja,e.vDynamicLoader=zl,e.vField=gs,e.vFloatButton=Fa,e.vFooter=_i,e.vForm=vs,e.vFormItem=_s,e.vGauge=fl,e.vGlowButton=Wu,e.vHeader=mi,e.vInput=os,e.vLanguageSwitch=ql,e.vLink=pu,e.vMain=gi,e.vMenu=Sa,e.vMenuDivider=wa,e.vMenuGroup=Ta,e.vMenuItem=Ca,e.vMessage=po,e.vMessageContainer=mo,e.vMessageManager=Eo,e.vMobileLayout=pi,e.vNavbar=Za,e.vPagination=_c,e.vProgress=bc,e.vRadio=ms,e.vRadios=hs,e.vRate=Oo,e.vRingStat=hl,e.vRoute=du,e.vRouter=fu,e.vRouterView=mu,e.vRouterViews=hu,e.vRow=ri,e.vScroll=jl,e.vSelect=us,e.vSidebar=Da,e.vSlider=Ao,e.vSparkline=vl,e.vSplitPanel=Gr,e.vStateNode=_e,e.vStep=to,e.vSteps=eo,e.vSubMenu=Ea,e.vSwitch=fs,e.vSymbolButton=La,e.vTab=so,e.vTable=Ac,e.vTabs=oo,e.vTagsInput=Ro,e.vTbody=Pc,e.vTd=Hc,e.vTextarea=ls,e.vTfoot=Ic,e.vTh=Bc,e.vThead=Mc,e.vThemeModeSwitch=nu,e.vThemeShell=Yr,e.vTimeline=Cl,e.vTimelineItem=wl,e.vTimer=ss,e.vTimerRange=cs,e.vTooltip=Co,e.vTr=Rc,e.vTree=Qc,e.vTreeNode=$c,e.vTrendCard=El,e.vUpload=Rs,e.varTag=In,e.video=Ln,e.vstack=ei,e.wbr=Rn,e.withI18nStringShortcut=k});