@cmach_socket/opencode-qq-bot 2.0.2 → 2.2.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,9 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible;function d(e){return typeof e==`function`}var f=()=>{};function p(e){return e()}function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0)return Array.from(e);if(!(Symbol.iterator in e)){let n=Math.min(t,e.length);return Array.from({length:n},(t,n)=>e[n])}let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var v=1<<24,y=1024,b=2048,x=4096,S=8192,C=16384,w=32768,ee=1<<25,T=65536,E=1<<19,te=1<<20,ne=1<<25,re=1<<21,ie=1<<22,ae=1<<23,oe=1<<27,se=1<<26,ce=Symbol(`$state`),le=Symbol(`component`),ue=Symbol(`legacy props`),de=Symbol(``),fe=Symbol(`attributes`),pe=Symbol(`class`),me=Symbol(`style`),he=Symbol(`text`),ge=Symbol(`form reset`),_e=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ve=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),ye={},be=Symbol(`uninitialized`),xe=`http://www.w3.org/2000/svg`,Se=`@attach`;function Ce(){console.warn(`https://svelte.dev/e/derived_inert`)}function we(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Te(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Ee(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var D=!1;function De(e){D=e}var O;function Oe(e){if(e===null)throw we(),ye;return O=e}function ke(){return Oe(Nn(O))}function k(e){if(D){if(Nn(O)!==null)throw we(),ye;O=e}}function A(e=1){if(D){for(var t=e,n=O;t--;)n=Nn(n);O=n}}function Ae(e=!0){for(var t=0,n=O;;){if(Hn(n)===8){var r=Qn(n)??``;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r.startsWith(`[?`)||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Nn(n);e&&Yn(n),n=i}}function je(e){if(!e||Hn(e)!==8)throw we(),ye;return Qn(e)??``}function Me(e){return e===this.v}function Ne(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Pe(e){return!Ne(e,this.v)}function Fe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ie(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Le(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Re(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function ze(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Be(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function He(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ue(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ge(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ke=!1;function qe(){Ke=!0}var Je=[];function Ye(){var e=Je;Je=[],m(e)}function Xe(e){if(Je.length===0&&!Vt){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}var Qe=~(b|x|y);function $e(e,t){e.f=e.f&Qe|t}function et(e){e.f&512||e.edges===null?$e(e,y):$e(e,x)}function tt(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function nt(e,t){return e===null&&Fe(t),e.c??=new Map(tt(e)||void 0)}var rt=null;function it(e){rt=e}function at(e){return nt(rt,`getContext`).get(e)}function ot(e,t){return nt(rt,`setContext`).set(e,t),t}function st(e){return nt(rt,`hasContext`).has(e)}function ct(){return nt(rt,`getAllContexts`)}function j(e,t=!1,n){rt={p:rt,i:!1,c:null,e:null,s:e,x:null,r:ri,l:Ke&&!t?{s:null,u:null,$:[]}:null}}function M(e){var t=rt,n=t.e;if(n!==null){t.e=null;for(var r of n)Cr(r)}return e!==void 0&&(t.x=e),t.i=!0,rt=t.p,lt(e)}function lt(e={}){return i(e,le,{value:!0}),e}function ut(){return!Ke||rt!==null&&rt.l===null}var dt=null;function ft(e,t,n,r){var i=ri,a=t.map(ut()?vt:St),o=e.filter(e=>!e.settled);if(o.length>0){var s=pt(),c=gt();(o.length===1?o[0].promise:Promise.all(o.map(e=>e.promise))).then(()=>{if(!(i.f&16384)){s(o[0].run.get_batch());try{l()}catch(e){gr(e,i)}mt()}}).finally(c)}else l();function l(){if(!e.some(e=>e.failed)){if(n.length===0)r(a);else{var t=n.map(e=>bt(e)),o=null;Ar(()=>{for(var e of t)if(xt(e)){H(e);return}o===null?o=Mr(()=>{try{r([...a,...t])}catch(e){gr(e,i)}}):P.revalidate_branch(o)},T)}}}}function pt(){var e=ri,t=ei,n=rt,r=P;return function(i=r){ii(e),ni(t),it(n),i!==null&&!(e.f&16384)&&_t(i).activate()}}function mt(e=!0){ii(null),ni(null),it(null),e&&P?.deactivate()}var ht=null;function gt(){for(var e=ri,t=e.b,n=_t(P),r=t;r&&!r.is_pending;)r=r.parent;return n.increment(e),r?.increment(e,n),t?.update_effect_pending(1),()=>{_t(n).decrement(e),r?.decrement(e,n),t?.update_effect_pending(-1)}}function _t(e){for(;e.merged!==null;)e=e.merged;return e}function vt(e){var t=2|b;return ri!==null&&(ri.f|=E),{ctx:rt,deps:null,dv:null,edges:null,effects:null,equals:Me,f:t,fn:e,reactions:null,rv:0,v:be,wv:0,parent:ri,ac:null}}var yt=Symbol(`obsolete`);function bt(e,t,n,r){var i=dn(be);i.f|=ie;var a=new Set,o=ht,s=o&&P,c=o&&[];function l(e=!1){var t=c;c=e?null:[],e&&(s=null);for(let e of t)e()}return Or(()=>{var t=ri,n=h();try{var u=e();if(u===be)return;var d=Promise.resolve(u),f=Si?.signal;d.then(e=>{f?.aborted||n.resolve(e)},e=>{f?.aborted||e===_e&&o===null||n.reject(e===_e?yt:e)}).finally(mt)}catch(e){n.reject(e)}var p=P,m=gt();p.async_deriveds.get(t)?.reject(yt),a.add(n),p.async_deriveds.set(t,n);let g=(e,u=void 0)=>{if(c!==null&&u!==yt&&(s??=p,_t(p)!==_t(s)))c.push(()=>{var r=!!(t.f&16384)||(p.linked?p.async_deriveds.get(t)!==n:!_t(p).linked);g(e,r?yt:u)});else{if(m(),a.delete(n),u){if(c!==null&&s!==null&&(a.size>0||u===yt)&&_t(s)===_t(p)&&_t(p).async_deriveds.get(t)===n){s=null,l();return}if(u===yt)return}var d=i.equals(e)&&!u&&!(i.f&8388608);_t(p).capture(i,u??e,d,!!u),o!==null&&(o.switch(p),o.continued.push(()=>l(!0)),o=null),r?.(u),r=void 0}};n.promise.then(g,e=>g(null,e||`unknown`))}),xr(()=>{for(let e of a)e.reject(yt)}),i}function xt(e){return(It?.get(e)??e).v===be}function N(e){let t=vt(e);return oi(t),t}function St(e){let t=vt(e);return t.equals=Pe,t}function Ct(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ir(t[n])}}function wt(e){var t=ri,n=e.parent;if(!Xr&&n!==null&&e.v!==be&&n.f&24576)return Ce(),et(e),e.v;ii(n);try{return Ct(e),ji(e)}finally{ii(t)}}function Tt(e){var t=e;if(bi(t)){var n=Rt?.records,r=n?.get(t);r!==void 0&&_i(r.deps,r.dv)?(n.delete(t),Ri(t,r)):wt(t)}}function Et(e){var t=Lt,n=t.get(e);if(n!==void 0)return n;var r=Rt,i=It.get(e),a=i??e,o=i===void 0?(e.f&se)!==0:i.assigned,s=r.get_record(e);return o&&!vi((s??e).deps,a.wv)?n=a:s!==void 0&&_i(s.deps,s.dv)?n=s:i===void 0&&!o&&e.dv!==null&&_i(e.deps,e.dv)?n=e:(wt(e),n=r.records?.get(e)??e),e.f&512&&t.set(e,n),n}function Dt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.f&0x8000000)&&(t.teardown?.(),ki(t),t.fn!==null&&(t.teardown=f),Ui(t),Pr(t))}function Ot(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Wi(t)}var kt=null,At=null,P=null,jt=null,Mt=null;function Nt(e){Mt=e}function Pt(e){var t=Mt={reverted_values:new Map(Mt?.reverted_values),derived_cache:new Map,parent:Mt};for(let[n,r]of e??[])t.reverted_values.set(n,r);return t}function Ft(e){for(var t=Mt;t!==null;t=t.parent)t.reverted_values.delete(e),t.derived_cache.clear()}var It=null,Lt=null,Rt=null,zt=null,Bt=new Set,Vt=!1,Ht=null,Ut=null,Wt=0,Gt=null,Kt=0,qt=1,Jt=null,Yt=class e{id=qt++;started=!1;linked=!0;prev=null;next=null;async_deriveds=new Map;current=new Map;previous=new Map;records=null;folded=[];#e=new Map;#t=new Map;#n=new Map;#r=null;#i=new Map;#a=[];#o=new Set;#s=new Set;is_fork=!1;merged=null;merge_requests=new Set;#c=!1;constructor(){At===null?kt=At=this:(At.next=this,this.prev=At),At=this}#l(){if(this.is_fork)return!0;for(let e of this.#n.keys())if(this.is_blocked_by(e))return!0;return!1}#u(e){return this.#o.has(e)||!!(e.f&33554432)&&!this.#s.has(e)}is_skipped(e){for(var t=e;t!==null;t=t.parent)if(this.#u(t))return!0;return!1}is_blocked_by(e,t=null){for(var n=e;n!==null&&n!==t;n=n.parent)if(this.#u(n)||(n.f&16512)==128&&n.b.is_pending)return!1;return!0}skip_effect(e){this.#o.add(e),this.#s.delete(e)}unskip_effect(e){(this.#o.delete(e)||!this.#s.has(e)&&(e.f&33554432||this.folded.some(t=>t.#o.has(e))))&&this.revalidate_branch(e),this.#s.add(e)}unskip_new_effect(e){this.#s.add(e)}revalidate_branch(e){for(var t=e.first;t!==null;t=t.next){var n=t.f;!(n&24576)&&!this.#u(t)&&(!(n&131168)&&t.fn!==null&&this.schedule(t,x),this.revalidate_branch(t))}}#d(){var e=[];for(let i of this.#a)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=y}}n||e.push(t)}return this.#a=[],e}#f(){for(var e=this;e!==null;)e=e.#p()}#p(){if(P=jt=this,Mt?.derived_cache.clear(),this.started=!0,Jt=this.id,this.#i.size>0){for(let[e,t]of this.#i)this.#C(e,t);this.#i.clear()}this.activate();for(var t=Ht=[],n=[],r=[],i=Ut=[];this.#a.length>0;){Wt++>1e3&&(this.#E(),Zt());for(let e of this.#d())try{this.#h(e,t,n,r)}catch(t){throw cn(e,!0),this.#l()||this.discard(),t}if(this.#a.length>0){for(let e of n)this.#a.push(e);for(let e of t)this.#a.push(e);n.length=0,t.length=0}}if(P=null,i.length>0){var a=e.ensure();for(let e of i)e.f&1024||a.schedule(e,x)}if(Ht=null,Ut=null,this.merge_requests.size>0){let e=Array.from(this.merge_requests,_t).filter(e=>e!==this&&e.linked&&!e.is_fork).sort((e,t)=>e.id-t.id);if(this.merge_requests.clear(),e.length>0){this.#b(n),this.#b(t);for(var o=this,s=e.length;s--;){var c=e[s];c!==o&&(c.#v(o),o=c)}return o}}if(this.#l()){this.#b(n),this.#b(t);for(let e of this.#o)cn(e);return i.length>0?P:null}let l=this.#g();if(l)return this.#b(n),this.#b(t),l.#v(this),l;for(let e of r)e.is_pending&&e.is_ready(this)&&e.reveal(t);this.#w(!0),this.#S(this.#e);var u=Qt,d=$t;try{Qt=!0,rn(t,rn(n))}finally{Qt=u,$t=d}this.#r?.resolve();var f=P;if(this.#n.size===0&&(this.#a.length===0||f!==null)&&this.#E(),f!==null&&Mt!==null)for(let[e,t]of Mt.reverted_values)f.previous.get(e)?.wv!==t.wv&&Mt.reverted_values.delete(e);return f}#m(e){var t=new Set(e),n=new Set;for(let e of t){var r=e.reactions;if(r!==null)for(let e of r){var i=e.f;if(i&2)i&1024&&$e(e,x),t.add(e);else{var a=e;n.has(a)||(n.add(a),!(i&155648)&&!this.is_skipped(a)&&this.schedule(a,x))}}}}#h(e,t,n,r){e.f^=y;for(var i=e.first;i!==null;){var a=i.f,o=!!(a&96);if(!(o&&a&1024||a&139264||this.#u(i))&&i.fn!==null){o?i.f^=y:a&4?t.push(i):bi(i)&&Wi(i);var s=i.first;if(s!==null){i=s;continue}}for(;i!==null;){if((i.f&16512)==128){var c=i.b;c.is_pending&&c.is_ready(this)&&r.push(c)}var l=i.next;if(l!==null){i=l;break}i=i.parent}}}#g(){for(var e=this.prev;e!==null;e=e.prev)if(!e.is_fork&&this.#_(e))return e;return null}#_(e){for(let t of this.current.keys())if(e.current.has(t))return!0;return!1}#v(e){for(let t of e.merge_requests)this.merge_requests.add(t);e.merge_requests.clear();for(let[t,n]of e.current){if(!this.previous.has(t)){let n=e.previous.get(t);n&&this.previous.set(t,n)}this.current.set(t,n)}for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&e!==n&&n.promise.then(e.resolve,e.reject),this.async_deriveds.set(t,n)}for(let[n,r]of e.records??[])if(!(n.f&16)){var t=this.records?.get(n);(this.records??=new Map).set(n,r),e.records?.delete(n),wi(n,t)}if(e.async_deriveds.clear(),e.#n.size>0){for(let[t,n]of e.#n)this.#n.set(t,(this.#n.get(t)??0)+n);e.#n.clear()}if(e.#i.size>0){for(let[t,n]of e.#i)this.#y(t,n);e.#i.clear()}let n=()=>e.discard();this.oncommit(n),this.ondiscard(n),e.merged=this,e.#E()}#y(e,t){(t===2048||this.#i.get(e)!==2048)&&this.#i.set(e,t)}#b(e){for(var t=0;t<e.length;t+=1){var n=e[t],r=n.f&(b|x);r!==0&&(this.#y(n,n.dv===null?x:r),$e(n,y))}}capture(e,t,n,r=!1,i=null){var a=this.previous.get(e),o=an(this,e);a===void 0&&(a=o?.previous.get(e),a===void 0&&e.v!==be&&(a={v:e.v,wv:e.wv,e:(e.f&ae)!==0,assigned:(e.f&se)!==0}),a!==void 0&&this.previous.set(e,a)),Xr?Ft(e):a!==void 0&&(Mt?.reverted_values.set(e,a),Mt?.derived_cache.clear());var s={v:t,wv:n?e.wv:hi(),e:r,assigned:!!(e.f&2),async:(e.f&ie)!==0};this.current.set(e,s),Qt&&($t??=new Set).add(e),It?.set(e,s),Lt?.delete(e),!this.is_fork&&o!==null&&o.previous.set(e,s),!this.is_fork&&!n&&o===null&&on(e,s),n||(Gt=null,Kt=0,this.mark(e,b,i),Gt=null,ln.size>0&&!un&&gn())}deactivate(){P=jt=It=Lt=Rt=null}flush(){var e=Pt(this.previous);try{if(this.#f(),Bt.size>0)for(let e of Bt)Bt.delete(e),e.linked&&!e.#c&&e.#f()}finally{Wt=0,zt=null,Ht=null,Ut=null,Mt=e.parent,this.deactivate()}}discard(){this.#S(this.#t);for(let e of this.async_deriveds.values())e.reject(yt);this.#E(),this.#r?.resolve()}#x(){for(let i=kt;i!==null;i=i.next)if(i!==this){var e=i.id<this.id,t=[];for(let[r,a]of this.current){var n=i.current.get(r);if(n!==void 0){if(e&&a.v!==n.v&&!n.async)i.current.set(r,a);else continue}t.push(r)}if(i.started&&i.current.size!==0){var r=!0;for(let e of i.current.keys())if(!this.current.has(e)){r=!1;break}r&&e?i.discard():t.length>0&&(i.#m(t),Bt.add(i))}}this.current.clear(),this.previous.clear()}commit_writes(){this.#x(),this.linked&&this.prev!==null&&this.#T()}increment(e){var t=this.#n.get(e)??0;this.#n.set(e,t+1)}decrement(e){var t=this.#n.get(e)??0;t===1?this.#n.delete(e):this.#n.set(e,t-1),this.#c||(this.#c=!0,Xe(()=>{this.#c=!1,this.linked&&this.flush()}))}oncommit(e){this.#e.set(e,tn?.size?tn:null)}ondiscard(e){this.#t.set(e,tn?.size?tn:null)}#S(e){Xi(()=>{for(let[n,r]of e)if(r===null)n(this);else{var t=Pt();for(let[e,n]of r)t.reverted_values.has(e)&&t.reverted_values.set(e,n);try{n(this)}finally{Mt=t.parent}}}),e.clear()}settled(){return(this.#r??=h()).promise}static ensure(){if(P===null){let t=P=new e;jt===null&&!Vt&&Xe(()=>{t.started||t.flush()})}return P}activate(){P=this,Rt=this,Jt!==this.id&&(Jt=null),It=Lt=null}get_record(e){for(var t=this.records?.get(e),n=this.folded.length;t===void 0&&n--;)t=this.folded[n].records?.get(e);return t}mark(e,t,n=null){var r=e.reactions;if(r!==null){var i=ut(),a=r.length;if(Kt+=a,Kt>1e5&&Gt===null&&(Gt=new Set),Gt!==null){if(Gt.has(e))return;Gt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==ri){var l=(c&b)===0;if(c&131072)this.is_fork||(l&&$e(s,t),ln.add(s));else if(c&2){l&&$e(s,t);var u=s;Lt?.delete(u),this.mark(u,x,n)}else if(l){var d=s;c&16&&en!==null&&($e(d,t),en.add(d)),n===null?this.schedule(d,t):($e(d,t),n.push(d))}}}}}schedule(e,t){if(zt=e,Rt!==null&&Rt!==this&&e!==ei)this.#y(e,e.f&2097152?t:x);else{if(jt!==this&&ei===null){if(this.prev!==null||this.next!==null||this.is_fork){this.#y(e,x);return}t=x}this.#C(e,t)}}#C(e,t){e.f&2048||$e(e,t),this.#a.push(e)}#w(e=!1){var t=this.records;if(t!==null){this.records=null;for(let[r,i]of t){if(!(r.f&16386)){var n=!!(r.f&4194304)&&Di(i)&&!Di(r);if(e&&!n&&(Ri(r,i),r.f&4194304))for(let e=kt;e!==null;e=e.next)e!==this&&!e.records?.has(r)&&e.async_deriveds.get(r)?.reject(yt);Bi(r)}wi(r,i)}}}#T(){var e=this.prev,t=kt;e.next=this.next,this.next===null?At=e:this.next.prev=e,this.prev=null,this.next=t,t.prev=kt=this,this.id=t.id-1}#E(){if(this.linked){var e=this.prev,t=this.next;e===null?kt=t:e.next=t,t===null?At=e:t.prev=e,this.linked=!1,this.#w()}}};function Xt(e){var t=Vt,n=Rt===P?null:Rt;Vt=!0;try{var r;for(e&&(Xt(),r=e());;){if(Ze(),P===null)return r;P.flush()}}finally{Vt=t,Rt=n}}function Zt(){try{Be()}catch(e){gr(e,zt)}}var Qt=!1,$t=null,en=null,tn=null;function nn(e){if((e.f&32772)!=4)return!1;for(var t=e.b;t!==null;t=t.parent)if(t.is_pending)return t.defer_effect(e),!0;return!1}function rn(e,t=null){var n=e.length;if(n===0)return t;for(var r=0;r<n;){var i=e[r++];if(!(i.f&24576)&&!P?.is_skipped(i)&&!nn(i)&&bi(i)){en=new Set;var a=di;if(Wi(i),i.edges===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&Rr(i),en?.size>0){var o=Mt;t!==null&&Pt(t);var s=tn;tn=new Map(t);try{for(let e of en){if(e.f&24576||P?.is_skipped(e))continue;let t=[e],n=e.parent;for(;n!==null;)en.has(n)&&(en.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||P?.is_skipped(n)||Wi(n)}}}finally{tn=s,en?.clear(),Mt=o}}if(di!==a&&P!==null&&$t!==null)for(let e of $t){var c=P.current.get(e);c!==void 0&&c.wv>a&&(t??=new Map).set(e,c)}}$t?.clear()}return en=null,t}function an(e,t){for(var n=e.next;n!==null&&(n.is_fork||!n.current.has(t));)n=n.next;return n}function on(e,t){e.v=t.v,e.wv=t.wv,e.f=t.e?e.f|ae:e.f&~ae,e.f&2&&(e.f|=se,et(e))}function sn(e){var t=It,n=Lt,r=Rt;It=Lt=Rt=null;try{e()}finally{It=t,Lt=n,Rt=r}}function cn(e,t=!1){if(!(!t&&e.f&32&&e.f&1024)){$e(e,y);for(var n=e.first;n!==null;)cn(n,t),n=n.next}}var ln=new Set,un=!1;function dn(e,t){return{f:0,v:e,reactions:null,equals:Me,rv:0,wv:0}}function F(e,t){let n=dn(e,t);return oi(n),n}function fn(e,t=!1,n=!0){let r=dn(e);return t||(r.equals=Pe),Ke&&n&&rt!==null&&rt.l!==null&&(rt.l.s??=[]).push(r),r}function pn(e){ei!==null&&(!ti||ei.f&131072)&&ut()&&ei.f&4325394&&(ai===null||!ai.has(e))&&We()}function I(e,t,n=!1){return pn(e),mn(e,t,n)}function mn(e,t,n=!1){return hn(e,n?xn(t):t,Ut)}function hn(e,t,n=null){var r=e.equals(t)&&!(e.f&8388608),i=It?.get(e);if(!r||i!==void 0&&(i.e||!e.equals.call(i,t))){var a=Yt.ensure();(e.f&67110914)==2050&&wt(e),a.capture(e,t,r,!1,n),ut()&&ri!==null&&ri.f&1024&&!(ri.f&96)&&(li===null?ui([e]):li.push(e))}else Xr&&Ft(e);return t}function gn(){un=!1,sn(_n)}function _n(){for(let e of ln){e.f&1024&&$e(e,x);let t;try{t=bi(e)}catch{t=!0}t&&Wi(e)}ln.clear()}function vn(e,t=1){var n=H(e),r=t===1?n++:n--;return I(e,n),r}function yn(e){I(e,e.v+1)}function bn(e){mn(e,e.v+1)}function xn(t){if(typeof t!=`object`||!t||ce in t||le in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=F(0),u=null,d=pi,f=e=>{if(pi===d)return e();var t=ei,n=pi;ni(null),mi(d);var r=e();return ni(t),mi(n),r};return i&&r.set(`length`,F(t.length,u)),new Proxy(t,{defineProperty(e,t,n){`value`in n&&n.configurable!==!1&&n.enumerable!==!1&&n.writable!==!1||He(),pn(o);var i=r.get(t);return i===void 0?f(()=>{var e=F(n.value,u);return r.set(t,e),e}):mn(i,n.value,!0),!0},deleteProperty(e,t){pn(o);var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>F(be,u));r.set(t,e),bn(o)}}else mn(n,be),bn(o);return!0},get(e,n,i){if(n===ce)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>F(xn(s?e[n]:be),u)),r.set(n,o)),o!==void 0){var c=H(o);return c===be?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=H(i);if(a===be)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ce)return!0;var n=r.get(t),i=n!==void 0&&n.v!==be||Reflect.has(e,t);return(n!==void 0||(ri!==null||ei!==null)&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>F(i?xn(e[t]):be,u)),r.set(t,n)),H(n)===be)?!1:i},set(e,t,n,s){pn(o);var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>F(be,u)),r.set(d+``,p)):mn(p,be)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>F(void 0,u)),mn(c,xn(n)),r.set(t,c));else{l=c.v!==be;var m=f(()=>xn(n));mn(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&mn(g,_+1)}bn(o)}return!0},ownKeys(e){H(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==be});for(var[n,i]of r)i.v!==be&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ue()}})}function Sn(e){try{if(typeof e==`object`&&e&&ce in e)return e[ce]}catch{}return e}function Cn(e,t){return Object.is(Sn(e),Sn(t))}var wn,Tn,En,Dn;function On(){if(wn===void 0){wn=window,Tn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;En=a(t,`firstChild`).get,Dn=a(t,`nextSibling`).get,u(e)&&(e[pe]=void 0,e[fe]=null,e[me]=void 0,e.__e=void 0),u(n)&&(n[he]=void 0)}}function kn(e){return document.createTextNode(e)}function An(){return document.createTextNode(``)}function jn(){return document.createTextNode(``)}function Mn(e){return En.call(e)}function Nn(e){return Dn.call(e)}function L(e,t){if(!D)return Mn(e);var n=Mn(O);if(n===null)n=Kn(O,An());else if(t&&Hn(n)!==3){var r=An();return qn(n,r),Oe(r),r}return t&&Bn(n),Oe(n),n}function R(e,t=!1){if(!D){var n=Mn(e);return Vn(n)&&Qn(n)===``?Nn(n):n}if(t){if(Hn(O)!==3){var r=An();return O&&qn(O,r),Oe(r),r}Bn(O)}return O}function z(e,t=!1){if(!D)return Mn(e);var n=L(e,t);return k(e),n}function B(e,t=1,n=!1){let r=D?O:e;for(var i;t--;)i=r,r=Nn(r);if(!D)return r;if(n){if(Hn(r)!==3){var a=An();return r===null?i&&Jn(i,a):qn(r,a),Oe(a),a}Bn(r)}return Oe(r),r}function Pn(e){e.textContent=``}function Fn(){return tn!==null&&(ri.f&w)!==0}function In(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Ln(){return document.createDocumentFragment()}function Rn(e=``){return document.createComment(e)}function zn(e,t,n=``){if(t.startsWith(`xlink:`))e.setAttributeNS(`http://www.w3.org/1999/xlink`,t,n);else return e.setAttribute(t,n)}function Bn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&Hn(t)===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Vn(e){return e instanceof Comment}function Hn(e){if(e!=null)return e.nodeType}function Un(e){return e.nodeName}function Wn(e){return e.lastChild}function Gn(e){return e.parentNode}function Kn(e,t){return e.appendChild(t)}function qn(e,t){e.before(t)}function Jn(e,t){e.after(t)}function Yn(e){e.remove()}function Xn(e,t){return e.removeChild(t)}function Zn(e,t){e.nodeValue=t}function Qn(e){return e.nodeValue}function $n(e,t){e.value=t??``}function er(e,t){e.checked=t}function tr(e,t){let n=e.value;e.defaultValue=t,e.value=n}function nr(e,t){let n=e.checked;e.defaultChecked=t,e.checked=n}function rr(e,t){return e.getAttribute(t)}function ir(e,t){e.removeAttribute(t)}function ar(e,t){return e.hasAttribute(t)}function or(e,t){e.innerHTML=t}function sr(e,t){return e.cloneNode(t)}function cr(e,t){return document.importNode(e,t)}function lr(e,t,n,r){e.addEventListener(t,n,r)}function ur(e,t,n,r){e.removeEventListener(t,n,r)}function dr(e,t,n,r){e.style.setProperty(t,n,r)}function fr(e,t){e.style.removeProperty(t)}function pr(e,t){e.style.cssText=t}function mr(e,t,n){e.classList.toggle(t,n)}function hr(e){var t=ri;if(t===null)return e;if(!(t.f&32768)&&!(t.f&4))throw e;gr(e,t)}function gr(e,t){if(e===ye)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function _r(e){ri===null&&(ei===null&&ze(e),Re()),Xr&&Le(e)}function vr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function yr(e,t){var n=ri;n!==null&&n.f&8192&&(e|=S);var r={ctx:rt,deps:null,dv:null,edges:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null,r:dt},i=r;if(e&4)Ht===null?Yt.ensure().schedule(r,b):Ht.push(r);else if(t!==null){try{Wi(r)}catch(e){throw Ir(r),e}i.edges===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=T))}if(i!==null&&(i.parent=n,n!==null&&vr(i,n),ei!==null&&ei.f&2&&!(e&64))){var a=ei;(a.effects??=[]).push(i)}return r}function br(){return ei!==null&&!ti}function xr(e){let t=yr(8,null);return $e(t,y),t.teardown=e,t}function Sr(e){_r(`$effect`);var t=ri.f;if(!ei&&t&32&&rt!==null&&!rt.i){var n=rt;(n.e??=[]).push(e)}else return Cr(e)}function Cr(e){return yr(4|te,e)}function wr(e){return _r(`$effect.pre`),yr(8|te,e)}function Tr(e){Yt.ensure();let t=yr(64|E,e);return()=>{Ir(t)}}function Er(e){Yt.ensure();let t=yr(64|E,e);return(e={})=>new Promise(n=>{e.outro?zr(t,()=>{Ir(t),n(void 0)}):(Ir(t),n(void 0))})}function Dr(e){return yr(4,e)}function Or(e){return yr(ie|E,e)}function kr(e,t=0){return yr(8|t,e)}function V(e,t=[],n=[],r=[]){ft(r,t,n,t=>{yr(8,()=>{e(...t.map(H))})})}function Ar(e,t=0){return yr(16|t,e)}function jr(e,t=0){return yr(v|t,e)}function Mr(e){return yr(32|E,e)}function Nr(e){var t=e.teardown;if(t!==null){let n=Xr,r=Zr,i=Mt,a=ei;Qr(!0),ni(null);try{t.call(null)}catch(t){gr(t,e.parent)}finally{Qr(n,r),Nt(i),ni(a)}}}function Pr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){ki(n);var r=n.next;n.f&64?n.parent=null:Ir(n,t),n=r}}function Fr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Ir(t),t=n}}function Ir(e,t=!0){var n=!1;try{(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Lr(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,Pr(e,t&&!n),Ui(e);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Nr(e)}finally{}e.f^=ee,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&Rr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.dv=e.edges=e.fn=e.nodes=e.ac=e.b=e.r=null}function Lr(e,t){for(;e!==null;){var n=e===t?null:Nn(e);Yn(e),e=n}}function Rr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function zr(e,t,n=!0){var r=[];e.f|=256,Br(e,r,!0);var i=()=>{n&&Ir(e),t&&t()},a=r.length;if(a>0){var o=Mt,s=()=>{if(!--a){var e=Mt;try{o&&(o.derived_cache.clear(),Nt(o)),i()}finally{o&&Nt(e)}}};for(var c of r)c.out(s)}else i()}function Br(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Br(i,t,o?n:!1)}i=a}}}function Vr(e){e.f&=-257,Hr(e,!0)}function Hr(e,t){if(!(e.f&256)&&e.f&8192){e.f^=S,e.f&1024||Yt.ensure().schedule(e,x);for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Hr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Ur(e,t){if(e.nodes)try{for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Nn(n);Kn(t,n),n=i}}finally{}}var Wr=null;function Gr(e,t){if(t){let t=document.body;e.autofocus=!0,Xe(()=>{document.activeElement===t&&e.focus()})}}var Kr=!1;function qr(){Kr||(Kr=!0,lr(document,`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ge]?.()})},{capture:!0}))}function Jr(e){var t=ei,n=ri;ni(null),ii(null);try{return e()}finally{ni(t),ii(n)}}function Yr(e,t,n,r=n){e.addEventListener(t,()=>Jr(n));let i=e[ge];e[ge]=i?()=>{i(),r(!0)}:()=>r(!0),qr()}var Xr=!1,Zr=0;function Qr(e,t=di){Xr=e,Zr=t}var $r={v:void 0,wv:0,e:!1,assigned:!1},ei=null,ti=!1;function ni(e){ei=e}var ri=null;function ii(e){ri=e}var ai=null;function oi(e){ei!==null&&(ei.f&2097152||ei.f&2)&&(ai??=new Set).add(e)}var si=null,ci=0,li=null;function ui(e){li=e}var di=1,fi=0,pi=fi;function mi(e){pi=e}function hi(){return++di}function gi(e){return It===null?(Tt(e),e.wv):e.f&2?Et(e).wv:(It.get(e)??e).wv}function _i(e,t){if(e!==null){for(var n=0;n<t.length;n++)if(gi(e[n])!==t[n])return!1}return!0}function vi(e,t,n=null){if(e!==null)for(var r=0;r<e.length;r++){var i=e[r];if(i.f&2){var a=i;if(It===null?Tt(i):a=Et(i),a.wv>t){if(a===i?i.f&67108864:!(`dv`in a))return!0;if(n===null)n=new Set;else if(n.has(a))continue;if(vi(a.deps,t,n))return!0;n.add(a)}}else if(gi(i)>t)return!0}return!1}function yi(e){return!!(e.f&4194320)&&Rt?.get_record(e)||e}function bi(e){var t=e.f;if(!(t&6144))return!1;if(t&67108864){if(vi(e.deps,e.wv))return!0}else if(t&2048)return!0;else{var n=yi(e),r=n.deps,i=n.dv;if(i===null)return!0;if(It===null)for(var a=0,o=i.length;a<o;a++){var s=r[a];if(Tt(s),s.wv!==i[a])return!0}else if(!_i(r,i))return!0}return t&512&&$e(e,y),!1}function xi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(ai!==null&&ai.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?xi(a,t,!1):t===a&&P.schedule(a,n?b:x)}}var Si=null;function Ci(e){e&&Jr(()=>e.abort(_e))}function wi(e,t,n=!1){if(t?.ac){for(var r=kt;r!==null;r=r.next)if(r.records?.get(e)===t&&(!n||r!==Rt&&!Oi(P,r)))return;Ci(t.ac),t.ac=null}}function Ti(e,t){var n=P,r=!!(t&2);if(!(r&&Xr)){var i=n===null||!n.is_fork;wi(e,Rt?.records?.get(e),!0),(r?It===null||i&&Di(e):i)&&Ci(e.ac);for(var a=kt;a!==null;a=a.next)Oi(n,a)&&wi(e,a.records?.get(e),!0)}}function Ei(e){Ci(e.ac),e.ac=Si}function Di({deps:e,dv:t}){return t===null||t.some((t,n)=>e[n].wv!==t)}function Oi(e,t){return e!==null&&!e.is_fork&&!t.is_fork&&t.id<e.id&&(It===null||t.previous.size===0||e.folded.includes(t))}function ki(e){if(!(e.f&0x8000000))return!1;e.f^=oe,Ci(e.ac),e.ac=null;for(var t=kt;t!==null;t=t.next){var n=t.records?.get(e);n?.ac&&(Ci(n.ac),n.ac=null)}return!0}function Ai(e){return!(e&4194304)&&(e&32784)!=32784?!1:Rt!==null&&Rt===P}function ji(e){let t=P;var n=si,r=ci,i=li,a=ei,o=ai,s=rt,c=ti,l=pi,u=e.f;si=null,ci=0,li=null,ei=u&96?null:e,ai=null,it(e.ctx),ti=!1,pi=++fi;var d=Si;Si=null,u&0x8000000&&Ti(e,u);try{e.f|=re;var f=(0,e.fn)();if(e.f|=w,Mi(e,u,f,!1),ut()&&li!==null&&!ti&&(si!==null||ci>0)&&!(e.f&6146))for(var p=0;p<li.length;p++)xi(li[p],e);if(a!==null&&a!==e){if(fi++,a.deps!==null)for(let e=0;e<r;e+=1)a.deps[e].rv=fi;if(n!==null)for(let e of n)e.rv=fi;li!==null&&(i===null?i=li:i.push(...li))}return f}catch(t){var m=t;try{m=hr(t)}finally{Mi(e,u,m,m===t)}return m}finally{var h=Si?.signal;t!==null&&h!==void 0&&h.addEventListener(`abort`,()=>{if(P!==null){let e=_t(t);e!==P&&e.linked&&!e.is_fork&&P.merge_requests.add(e)}}),e.f^=re,si=n,ci=r,li=i,ei=a,ai=o,it(s),ti=c,pi=l,Si=d}}function Mi(e,t,n,r){var i=e.deps,a=ci+(si===null?0:si.length),o=e.dv;if(e.f&16384)Ci(Si);else if(Si!==null&&!(e.f&0x8000000)&&(Ci(Si),Si=null),t&2&&Xr){for(var s=0,c=0;c<a;c++){var l=c<ci?i[c]:si[c-ci];s=Math.max(s,Yi(l))}$r={v:n,wv:s,e:r,assigned:(t&se)!==0}}else if(t&2&&It===null&&kt!==null&&kt.next!==null&&Fi(e,t),si===null&&It===null&&o!==null&&a===i?.length&&e.edges===i&&!(t&4194320)){for(var u=0;u<a;u++)o[u]=i[u].wv;o.length!==a&&(o.length=a),t&2&&Ni(e,n,r),(e.ac||Si)&&Ei(e)}else Pi(e,t,a,n,r)}function Ni(e,t,n){var r=e.f&~se;(n||r&8388608||!e.equals(t))&&(e.v=t,e.wv=hi(),r=n?r|ae:r&~ae),e.f=r,et(e)}function Pi(e,t,r,i,a){var o=Ai(t);if(It!==null&&t&2){var s=It.get(e);s!==void 0&&s.wv!==e.wv&&(o=!0)}var c=e.deps,l=c;(si!==null||ci!==c?.length)&&(l=ci===0?si:c.slice(0,ci).concat(si??[]));for(var u=!o&&It===null&&e.dv!==null?e.dv:[],d=0;d<r;d++){var f=l[d];u[d]=Ii(f),It!==null&&t&2&&(u[d]!==f.wv||(f.f&1026)==2)&&(o=!0)}u.length!==r&&(u.length=r),!o&&It!==null&&t&2&&Fi(e,t);var p=o||zi(e),m=br()&&!!(e.f&512),h=e.edges;if(p&&h!==null){if(si!==null){e.edges=h=h.slice();for(f of si)n.call(h,f)||(h.push(f),m&&(f.reactions??=[]).push(e))}}else{if(h===c){if(h!==null)for(d=ci;d<h.length;d++)Hi(e,h[d]);if(m&&si!==null)for(f of si)(f.reactions??=[]).push(e)}else{var g=new Set(l);for(f of h)g.delete(f)||Hi(e,f);if(m)for(f of g)(f.reactions??=[]).push(e)}e.edges=l}if(o){var _=Rt;(_.records??=new Map).set(e,t&2?{deps:l,dv:u,v:i,e:a,wv:Li(e,_,i,a),ac:Si}:{deps:l,dv:u,ac:Si})}else e.deps=l,e.dv=u,(e.ac||Si)&&Ei(e),t&2&&(Ni(e,i,a),Rt?.records?.delete(e))}function Fi(e,t){var n=e.dv;if(!(n===null||n.length===0||t&67108864)){for(var r,i=e.ac,a=i!==null&&P!==null&&P.is_fork&&!i.signal.aborted,o=kt;o!==null;o=o.next)o!==Rt&&!o.records?.has(e)&&(i===null||a||Oi(P,o))&&(r??={deps:e.deps,dv:n.slice(),v:e.v,wv:e.wv,e:(t&ae)!==0},(o.records??=new Map).set(e,r));a&&r!==void 0&&(r.ac=i,e.ac=null)}}function Ii(e){return It===null?e.wv:e.f&2?Lt.get(e)?.wv??-1:(It.get(e)??e).wv}function Li(e,t,n,r){if(!r){var i=t.get_record(e);if(i!==void 0&&!i.e&&e.equals.call(i,n))return i.wv;if(!(e.f&8388608)&&e.equals(n))return e.wv}return hi()}function Ri(e,t){if(e.deps=t.deps,e.dv=e.f&2?t.dv.slice():t.dv,e.f&2){var n=e;n.v=t.v,n.wv=t.wv,n.f=(t.e?n.f|ae:n.f&~ae)&~se,et(n)}Ci(e.ac),e.ac=t.ac??null,t.ac=null}function zi(e){for(var t=kt;t!==null;t=t.next)if(t.records?.has(e))return!0;return!1}function Bi(e){var t=e.edges,r=e.deps;if(!(t===r||zi(e))){for(var i of t)r!==null&&n.call(r,i)||Hi(e,i);e.edges=r}}function Vi(e,t){var r=e.reactions??=[];n.call(r,t)||r.push(t)}function Hi(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(si===null||!n.call(si,r))){var s=r;if(s.f&512&&(s.f^=512,Lt?.delete(s)),s.v!==be&&et(s),ki(s)){$e(s,b),s.dv=null;for(var c=kt;c!==null;c=c.next)c.records?.delete(s);Lt?.delete(s)}Dt(s),Ui(s)}}function Ui(e){var t=e.edges;if(t!==null)for(var n=0;n<t.length;n++)Hi(e,t[n])}function Wi(e){var t=e.f;if(!(t&16384)){$e(e,y);var n=ri;ri=e;try{t&16777232?Fr(e):Pr(e),Nr(e);var r=ji(e);e.teardown=typeof r==`function`?r:null,e.wv=di}finally{ri=n}}}async function Gi(){await Promise.resolve(),Xt()}function H(e){var t=!!(e.f&2);Wr?.add(e);var r=null;if(ei!==null&&!ti&&!(ri!==null&&ri.f&16384)&&(ai===null||!ai.has(e))){var i=ei.deps;if(ei.f&2097152)e.rv<fi&&(e.rv=fi,si===null&&i!==null&&i[ci]===e?ci++:si===null?si=[e]:si.push(e));else{r=ei;var a=ei.edges;a!==null&&n.call(a,e)||(ei.edges=a===null?[e]:[...a,e]),Vi(e,ei)}}if(Xr){var o=Ji(e);if(o!==void 0){if(o.e)throw o.v;return o.v}}var s;if(t){var c=e,l=!(c.f&512)&&!ti&&ei!==null&&!!(ei.f&512),u=(c.f&w)===0;l&&(c.f|=512),It===null?Tt(c):s=Et(c),l&&!u&&(Ot(c),qi(c))}else It!==null&&(s=It.get(e));if(r!==null&&Ki(r,e,s===void 0?e.wv:s.wv),s!==void 0&&s!==e){if(s.e)throw s.v;return s.v}if(e.f&8388608)throw e.v;return e.v}function Ki(e,t,r){var i=yi(e),a=i.deps;i.dv===null||a!==null&&n.call(a,t)||(i.deps=a===null?[t]:[...a,t],i.dv.push(r))}function qi(e){if(e.f|=512,e.edges!==null)for(let t of e.edges)Vi(t,e),t.f&2&&!(t.f&512)&&(Ot(t),qi(t))}function Ji(e){var t=e.wv>Zr?void 0:Mt?.reverted_values.get(e);if(!(e.f&2))return t;var n=e,r=(Mt??Pt()).derived_cache,i=r.get(n);if(i!==void 0)return i;var a=t??It?.get(n),o=a===void 0?(n.f&se)!==0:a.assigned,s=a===void 0&&!o?n.dv:null,c=n.deps??[],l=o||s!==null,u=s?.length??c.length;a??={v:n.v,wv:n.wv,e:(n.f&ae)!==0,assigned:(n.f&se)!==0};for(var d=0;l&&d<u;d++){var f=Yi(c[d]);l=s===null?f<=a.wv:f===s[d]}return l?i=a:(wt(n),i=$r,a.wv<i.wv&&!a.e&&!i.e&&n.equals.call(a,i.v)&&(i.wv=a.wv)),r.set(n,i),i}function Yi(e){return(Ji(e)??It?.get(e)??e).wv}function Xi(e){var t=ti;try{return ti=!0,e()}finally{ti=t}}function Zi(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(ce in e)Qi(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&ce in n&&Qi(n)}}}function Qi(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Qi(e[n],t)}catch{}let n=l(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=o(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function $i(){return Symbol(Se)}function ea(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var ta=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function na(e){return ta.includes(e)}var ra=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),ia={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function aa(e){return e=e.toLowerCase(),ia[e]??e}[...ra];var oa=[`touchstart`,`touchmove`];function sa(e){return oa.includes(e)}var ca=[`textarea`,`script`,`style`,`title`];function la(e){return ca.includes(e)}var ua=Symbol(`events`),da=Symbol(`propagation stopped at`),fa=new Set,pa=new Set;function ma(e,t,n,r={}){var i=dt!=null;function a(...e){if(i)return Jr(()=>n?.apply(this,e));var a=e[0];if(r.capture||Sa.call(t,a),r.capture||a[da]!==t)return Jr(()=>n?.call(this,a))}return!i&&(e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`)?(a.__removed=!1,Xe(()=>{a.__removed||lr(t,e,a,r)})):lr(t,e,a,r),a}function ha(e,t,n,r={}){var i=ma(t,e,n,r);return()=>{i.__removed=!0,ur(e,t,i,r)}}function ga(e,t,n){(t[ua]??={})[e]=n}function _a(e){for(var t=0;t<e.length;t++)fa.add(e[t]);for(var n of pa)n(e)}var va=new Map;function ya(e){var t=new Set,n=n=>{for(var r=0;r<n.length;r++){var i=n[r];if(!t.has(i)){t.add(i);var a=sa(i);for(let t of[e,document]){var o=va.get(t);o===void 0&&(o=new Map,va.set(t,o));var s=o.get(i);s===void 0?(t.addEventListener(i,Sa,{passive:a}),o.set(i,1)):o.set(i,s+1)}}}};return n(r(fa)),pa.add(n),()=>{for(var r of t)for(let t of[e,document]){var i=va.get(t),a=i.get(r);--a==0?(t.removeEventListener(r,Sa),i.delete(r),i.size===0&&va.delete(t)):i.set(r,a)}pa.delete(n)}}var ba=null,xa=!1;function Sa(e){var t=this,n=e.cancelBubble;if(!(n&&e[da]===t)){n||delete e[da];var r=t.ownerDocument,a=e.type,o=e.composedPath?.()||[],s=o[0]||e.target;ba=e,xa||(xa=!0,setTimeout(()=>{xa=!1,ba=null}));var c=0,l=ba===e&&e[ua];if(l){var u=o.indexOf(l);if(u!==-1&&(t===document||t===window)){e[ua]=t;return}var d=o.indexOf(t);if(d===-1)return;u<=d&&(c=u)}if(s=o[c]||e.target,s!==t){i(e,`currentTarget`,{configurable:!0,get(){return s||r}});var f=ei,p=ri;ni(null),ii(null);try{for(var m,h=[];s!==null&&s!==t;){try{var g=s[ua]?.[a];g==null||s.disabled&&e.target!==s||g.call(s,e)}catch(e){m?h.push(e):m=e}if(e.cancelBubble){n||(e[da]=t);break}c++,s=c<o.length?o[c]:null}if(m){for(let e of h)queueMicrotask(()=>{throw e});throw m}}finally{e[ua]=t,delete e.currentTarget,ni(f),ii(p)}}}}var Ca=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function wa(e){return Ca?.createHTML(e)??e}function Ta(e){var t=In(`template`);return or(t,wa(e.replaceAll(`<!>`,`<!---->`))),t.content}function Ea(e,t){var n=ri;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function U(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(D)return Ea(O,null),O;i===void 0&&(i=Ta(a?e:`<!>`+e),n||(i=Mn(i)));var t=r||Tn?cr(i,!0):sr(i,!0);return n?Ea(Mn(t),Wn(t)):Ea(t,t),t}}function Da(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(D)return Ea(O,null),O;if(!o){var e=Mn(Ta(a));if(i)for(o=Ln();Mn(e);)Kn(o,Mn(e));else o=Mn(e)}var t=sr(o,!0);return i?Ea(Mn(t),Wn(t)):Ea(t,t),t}}function Oa(e,t){return Da(e,t,`svg`)}function W(e=``){if(!D){var t=kn(e+``);return Ea(t,t),t}var n=O;return Hn(n)===3?Bn(n):(qn(n,n=An()),Oe(n)),Ea(n,n),n}function G(){if(D)return Ea(O,null),O;var e=Ln(),t=Rn(``),n=jn();return Kn(e,t),Kn(e,n),Ea(t,n),e}function K(e,t){if(D){var n=ri;n.f&32768&&n.nodes.end!==null||(n.nodes.end=O),ke()}else e!==null&&qn(e,t)}function ka(){let e;if(D&&O&&Hn(O)===8&&(e=Qn(O))?.startsWith(`$`)){let t=e.substring(1);return ke(),t}return(globalThis.__svelte??={}).uid??=1,`c${globalThis.__svelte.uid++}`}function Aa(e){let t=0,n=dn(0),r;return()=>{br()&&(H(n),kr(()=>(t===0&&(r=Xi(()=>e(()=>yn(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,yn(n))})})))}}var ja=T|E;function Ma(e,t,n,r){new Na(e,t,n,r)}var Na=class{parent;is_pending=!1;transform_error;#e;#t=D?O:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=!1;#d=[];#f=new Map;#p=null;#m=Aa(()=>(this.#p=dn(this.#l),()=>{this.#p=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=ri;t.b=this,t.f|=128,n(e)},this.parent=ri.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Ar(()=>{if(D){let e=je(this.#t);ke();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#g(t)}else t?this.#y():this.#h()}else this.#b()},ja),D&&(this.#e=O)}#h(){try{this.#a=Mr(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#_(e);Xe(r),t&&(this.#s=Mr(()=>{t(this.#e,()=>e,()=>n)}))}#_(e){var t=!1,n=!1;let r=()=>{this.#v()||(t?Ee():(t=!0,n&&Ge(),this.#s!==null&&zr(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#b()})))};return{reset:r,invoke_onerror:()=>{if(!this.#v())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){gr(e,this.#i&&this.#i.parent)}}}}#v(){return(this.#i.f&(C|ee))!==0}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Mr(()=>e(this.#e)),Xe(()=>{if(!this.#v())try{var e=this.#c=Ln(),t=jn();Kn(e,t),this.#a=this.#x(()=>{try{return Mr(()=>this.#r(t))}catch(e){try{this.error(e)}catch(e){gr(e,this.#i.parent)}return null}}),this.#a!==null&&this.#f.size===0&&(this.is_pending=!1,qn(this.#e,e),this.#c=null,zr(this.#o,()=>{this.#o=null}))}finally{}}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#a=Mr(()=>{this.#r(this.#e)}),this.#f.size===0)this.is_pending=!1;else{let t=this.#n.pending;if(t){var e=this.#c=Ln();Ur(this.#a,e),this.#o=Mr(()=>t(this.#e))}}}catch(e){this.error(e)}}defer_effect(e){this.#d.push(e)}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=ri,n=ei,r=rt;ii(this.#i),ni(this.#i),it(this.#i.ctx);try{return Yt.ensure(),e()}finally{ii(t),ni(n),it(r)}}is_ready(e){if(e.is_fork&&this.#f.size>0)return!1;for(let[t,n]of this.#f)if(!t.is_fork){for(let t of n.keys())if(e.is_blocked_by(t,this.#a))return!1}return!0}reveal(e){this.is_pending=!1;for(let t of this.#d)$e(t,b),e.push(t);if(this.#d.length=0,this.#o&&zr(this.#o,()=>{this.#o=null}),this.#c)try{qn(this.#e,this.#c),this.#c=null}finally{}}increment(e,t){var n=this.#f.get(t);n===void 0&&this.#f.set(t,n=new Map);var r=n.get(e)??0;n.set(e,r+1)}decrement(e,t){var n=this.#f.get(t),r=n.get(e);r===1?(n.delete(e),n.size===0&&this.#f.delete(t),Xe(()=>{this.is_pending&&!this.#v()&&Yt.ensure().schedule(this.#i,x)})):n.set(e,r-1)}update_effect_pending(e){this.#l+=e,!this.#p||this.#u||(this.#u=!0,Xe(()=>{this.#u=!1,this.#p&&hn(this.#p,this.#l)}))}get_effect_pending(){return this.#m(),H(this.#p)}error(e){if(e===ye||!this.#n.onerror&&!this.#n.failed)throw e;P?.is_fork?(this.#a&&P.skip_effect(this.#a),this.#o&&P.skip_effect(this.#o),this.#s&&P.skip_effect(this.#s),P.oncommit(()=>{this.#v()||this.#S(e)})):this.#S(e)}#S(e){this.#a&&=(Ir(this.#a),null),this.#o&&=(Ir(this.#o),null),this.#s&&=(Ir(this.#s),null),D&&(Oe(this.#t),A(),Oe(Ae()));let t=this.#n.failed,n=e=>{if(this.#v())return;let{reset:n,invoke_onerror:r}=this.#_(e);r(),t&&!this.#v()&&(this.#s=this.#x(()=>{try{return Mr(()=>{var r=ri;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return gr(e,this.#i.parent),null}}))};Xe(()=>{if(!this.#v()){var t;try{t=this.transform_error(e)}catch(e){gr(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>gr(e,this.#i&&this.#i.parent)):n(t)}})}};function q(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[he]??=Qn(e))&&(e[he]=n,Zn(e,`${n}`))}function Pa(e,t){return Fa(e,t)}function Fa(e,t){return Ia(e,t)}function Ia(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s,renderer:c}){var l=void 0,u=Er(()=>{var o=n??Kn(t,jn());Ma(o,{pending:()=>{}},t=>{j({});var n=rt;if(a&&(n.c=a),i&&(r.$$events=i),D&&Ea(t,null),l=e(t,r)||lt(),D&&(ri.nodes.end=O,O===null||Hn(O)!==8||Qn(O)!==`]`))throw we(),ye;M()},s);var u=c?null:ya(t);return()=>{if(u?.(),o!==n){var e=Gn(o);e&&Xn(e,o)}}});return La.set(l,u),l}var La=new WeakMap;function Ra(e,t){let n=La.get(e);return n?(La.delete(e),n(t)):Promise.resolve()}var za=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;#a=null;constructor(e,t=!0){this.anchor=e,this.#i=t,this.#a=dt}#o=e=>{if(this.#e.has(e))try{var t=this.#e.get(e),n=this.#t.get(t);if(n)Vr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Vr(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),Yn(Wn(r.fragment)),qn(this.anchor,r.fragment),n=r.effect,n.f&=~ne)}this.#s(e);for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=Ln();Ur(r,t),Kn(t,jn()),this.#n.set(e,{effect:r,fragment:t})}else Ir(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),zr(r,i,!1)):i()}}finally{}};#s=e=>{for(let t of this.#e.keys())t!==e&&t.linked||this.#e.delete(t);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Ir(n.effect),this.#n.delete(e))};ensure(e,t){var n=P,r=Fn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=Ln(),a=jn();Kn(i,a);var o=Mr(()=>t(a));o.f|=ne,n.unskip_new_effect(o),this.#n.set(e,{effect:o,fragment:i})}else this.#t.set(e,Mr(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#o),n.ondiscard(this.#s)}else D&&(this.anchor=O),this.#o(n)}};function J(e,t,n=!1){var r;D&&(r=O,ke());var i=new za(e),a=n?T:0;function o(e,t){if(D){var n=je(r);if(e!==parseInt(n.substring(1))){var a=Ae();Oe(a),i.anchor=a,De(!1),i.ensure(e,t),De(!0);return}}i.ensure(e,t)}Ar(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Ba=Symbol(`NaN`);function Va(e,t,n){D&&ke();var r=new za(e),i=!ut();Ar(()=>{var e=t();e!==e&&(e=Ba),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Ha(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ha(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Ua(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ha(e))&&(r&&(r+=` `),r+=t);return r}function Wa(e){return typeof e==`object`?Ua(e):e??``}var Ga=[...`
2
+ \r\f\xA0\v`];function Ka(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ga.includes(r[o-1]))&&(s===r.length||Ga.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function qa(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Ja(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Ya(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Ja)),i&&c.push(...Object.keys(i).map(Ja));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Ja(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=qa(r)),i&&(n+=qa(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Xa(e,t){return t}function Za(e,t,n){for(var i=[],a=t.length,o,s=0;s<a;s++){let n=t[s];zr(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;$a(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else i.push(n)},!1)}if(i.length===a){var c=n!==null&&e.pending.size===0;if(c){var l=n,u=Gn(l);Pn(u),Kn(u,l),e.items.clear()}$a(e,t,!c)}else{o={pending:new Set(t),done:new Set(i)};for(let e of i)o.pending.delete(e);(e.outrogroups??=new Set).add(o)}}function Qa(e){var t=new Set;for(let n of e.pending.values())for(let r of n)t.add(e.items.get(r).e);return t}function $a(e,t,n=!0){for(var r=e.pending.size>0?Qa(e):void 0,i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ne,Ur(a,Ln()),a!==e.effect.last&&(lo(e,a.prev,a.next),lo(e,e.effect.last,a),lo(e,a,null))):Ir(t[i],n)}}function eo(e,t){if(e.outrogroups!==null){for(let n of e.outrogroups)if(n.pending.has(t)||n.done.has(t))return!0}return!1}var to=new WeakMap,no={};function ro(){var e=to.get(dt??no);if(e)return e;var t=jn();return to.set(dt??no,t),t}function io(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=D?Oe(Mn(u)):Kn(u,jn())}D&&ke();var d=null,f=St(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p=new Map,m=!0;function h(e){if(!(v.effect.f&16384)){try{v.pending.delete(e);var t=H(f);v.fallback=d,oo(v,t,c,n,a),d!==null&&(t.length===0?d.f&33554432?(d.f^=ne,co(d,null,c)):Vr(d):zr(d,()=>{d=null}))}finally{}_()}}function g(e){v.pending.delete(e),v.effect.f&16384||_()}function _(){for(var e,t=v.effect.last;t!==null;){var n=t.prev;if(t.f&32&&t!==d){if(!(t.f&33554432))break;e??=Qa(v),!e.has(t)&&!eo(v,t)&&Ir(t)}t=n}}var v={effect:Ar(()=>{var e=H(f),t=e.length;let r=!1;D&&je(c)===`[!`!=(t===0)&&(c=Ae(),Oe(c),De(!1),r=!0);for(var u=new Set,_=P,v=Fn(),y=0;y<t;y+=1){D&&Hn(O)===8&&Qn(O)===`]`&&(c=O,r=!0,De(!1));var b=e[y],x=a(b,y),S=m?null:l.get(x);S?(S.v&&hn(S.v,b),S.i&&hn(S.i,y),v&&_.unskip_effect(S.e)):(S=so(l,m?c:ro(),b,x,y,o,n,i),m||(S.e.f|=ne,v&&_.unskip_new_effect(S.e)),l.set(x,S)),u.add(x)}if(t===0&&s&&!d&&(m?d=Mr(()=>s(c)):(d=Mr(()=>s(ro())),d.f|=ne,v&&_.unskip_new_effect(d))),v&&d!==null&&(t===0?_.unskip_effect(d):_.skip_effect(d)),t>u.size&&Ie(``,``,``),D&&t>0&&Oe(Ae()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}r&&De(!0),H(f)}),flags:n,items:l,pending:p,outrogroups:null,fallback:d};m=!1,D&&(c=O)}function ao(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function oo(e,t,n,i,a){var o=!!(i&8),s=t.length,c=e.items,l=ao(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Vr(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=ne,_===l)co(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),lo(e,d,_),lo(e,_,y),co(_,y,n),d=_,p=[],m=[],l=ao(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)co(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);lo(e,S.prev,C.next),lo(e,d,S),lo(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),co(_,l,n),lo(e,_.prev,_.next),lo(e,_,d===null?e.effect.first:d.next),lo(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=ao(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=ao(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&($a(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=ao(l.next);var ee=w.length;if(ee>0){var T=i&4&&s===0?n:null;if(o){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}Za(e,w,T)}}o&&Xe(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function so(e,t,n,r,i,a,o,s){var c=o&1?o&16?dn(n):fn(n,!1,!1):null,l=o&2?dn(i):null;return{v:c,i:l,e:Mr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function co(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Nn(r);if(qn(a,r),r===i)return;r=o}}function lo(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function uo(e,t,n,r,i,a){if(D&&ke(),t.$$host?.$$shadowRoot){let t=In(`slot`);if(n!=="default"&&zn(t,`name`,n),K(e,t),i!==null){let e=jn();Kn(t,e),i(e)}}else{var o=t.$$slots?.[n],s=!1;o===!0&&(o=t[n==="default"?`children`:n],s=!0),o===void 0?i!==null&&i(e):o(e,s?()=>r:r)}}function Y(e,t,...n){var r=new za(e);Ar(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},T)}function X(e,t,n){var r;D&&(r=O,ke());var i=new za(e);Ar(()=>{var e=t()??null;if(D&&je(r)===`[`!=(e!==null)){var a=Ae();Oe(a),i.anchor=a,De(!1),i.ensure(e,e&&(t=>n(t,e))),De(!0)}else i.ensure(e,e&&(t=>n(t,e)))},T)}function fo(e,t,n,r,i,a){let o=D;D&&ke();var s=null;D&&Hn(O)===1&&(s=O,ke());var c=D?O:e,l=new za(c,!1);Ar(()=>{let e=t()||null;var a=i?i():n||e===`svg`?xe:void 0;if(e===null)l.ensure(null,null);else return l.ensure(e,t=>{if(e){var n=D;if(s=D?s:In(e,a),Ea(s,s),r){var i=null;D&&la(e)&&Kn(s,i=Rn(``));var o=D?Mn(s):Kn(s,jn());D&&(o===null?De(!1):Oe(o)),r(s,o),i&&Xn(s,i)}ri.nodes.end=s,n||qn(t,s)}D&&Oe(t)}),()=>{}},T),xr(()=>{}),o&&(De(!0),Oe(c))}function po(e,t){var n=void 0,r;jr(()=>{n!==(n=t())&&(r&&=(Ir(r),null),n&&(r=Mr(()=>{Dr(()=>n(e))})))})}function mo(e,t,n,r,i,a){var o=e[pe];if(D||o!==n||o===void 0){var s=Ka(n,r,a);D&&s===rr(e,`class`)||(s==null?ir(e,`class`):t?e.className=s:zn(e,`class`,s)),e[pe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&mr(e,c,l)}return a}function ho(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?fr(e,i):dr(e,i,a,r))}}function go(e,t,n,r){var i=e[me];if(D||i!==t){var a=Ya(t,r);D&&a===rr(e,`style`)||(a==null?ir(e,`style`):pr(e,a)),e[me]=t}else r&&(Array.isArray(r)?(ho(e,n?.[0],r[0]),ho(e,n?.[1],r[1],`important`)):ho(e,n,r));return r}function _o(e,t){t?ar(e,`selected`)||zn(e,`selected`,``):ir(e,`selected`)}function vo(e,t){var n=!(`__defaultValue`in e);(n||e.__defaultValue!==t)&&(e.__defaultValue=t,yo(e,!n||`__value`in e))}function yo(t,n){var r=t.__defaultValue,i=t.multiple,a=i?r??[]:null;if(!i||e(a)){var o=t.selectedIndex,s=n&&i?new Set(t.selectedOptions):null;for(var c of t.options){var l=Co(c);_o(c,i?a.includes(l):Cn(l,r))}if(n){if(s!==null)for(c of t.options){var u=s.has(c);c.selected!==u&&(c.selected=u)}else t.selectedIndex!==o&&(t.selectedIndex=o)}}}function bo(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return Te();for(var i of t.options)i.selected=n.includes(Co(i))}else{for(i of t.options)if(Cn(Co(i),n)){i.selected=!0;return}r&&n===void 0||(t.selectedIndex=-1)}}function xo(e){var t=new MutationObserver(t=>{t.every(wo)||(`__defaultValue`in e&&yo(e,!1),`__value`in e&&bo(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),xr(()=>{t.disconnect()})}function So(e,t,n=t){var r=new WeakSet,i=!0;Yr(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),Co);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&Co(o)}n(a),e.__value=a,P!==null&&r.add(P)}),Dr(()=>{var a=t();if(!(e===document.activeElement&&r.has(Rt))){if(bo(e,a,i),i&&a===void 0){var o=e.querySelector(`:checked`);o!==null&&(a=Co(o),n(a))}e.__value=a,i=!1}})}function Co(e){return`__value`in e?e.__value:e.value}function wo(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var To=Symbol(`class`),Eo=Symbol(`style`),Do=Symbol(`is custom element`),Oo=Symbol(`is html`),ko=ve?`link`:`LINK`,Ao=ve?`input`:`INPUT`,jo=ve?`option`:`OPTION`,Mo=ve?`select`:`SELECT`,No=ve?`progress`:`PROGRESS`;function Po(e){if(D){var t=!1,n=()=>{if(!t){if(t=!0,ar(e,`value`)){var n=e.value;Fo(e,`value`,null),e.value=n}if(ar(e,`checked`)){var r=e.checked;Fo(e,`checked`,null),e.checked=r}}};e[ge]=n,Xe(n),qr()}}function Fo(e,t,n,r){var i=Ro(e);if(!(D&&(i[t]=rr(e,t),t===`src`||t===`srcset`||t===`href`&&Un(e)===ko))){var a=i[t];a!==(i[t]=n)&&(t===`loading`&&(e[de]=n),n==null?ir(e,t):typeof n!=`string`&&Bo(e).has(t)?e[t]=n:(!D||typeof n!=`number`&&typeof n!=`boolean`||a!==String(n))&&zn(e,t,n))}}function Io(e,t,n,r,i=!1,a=!1){D&&i&&Un(e)===Ao&&(`defaultValue`in n||`defaultChecked`in n||Po(e));var o=Ro(e),s=o[Do],c=!o[Oo];let l=D&&s;l&&De(!1);var u=t||{},d=Un(e)===jo,f=Un(e)===Mo;try{for(var p in t)!(p in n)&&p[0]+p[1]!==`$$`&&(n[p]=null);n.class?n.class=Wa(n.class):(r||n[To])&&(n.class=null),n[Eo]&&(n.style??=null);var m=Bo(e);if(dt==null&&Un(e)===Ao&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==u.type||h===void 0&&e.hasAttribute(`type`))&&(u.type=h,Fo(e,`type`,h,a))}for(let i in n){let l=n[i];if(d&&i===`value`&&l==null)e.value=e.__value=``,u[i]=l;else if(i===`class`)mo(e,dt==null&&e.namespaceURI===`http://www.w3.org/1999/xhtml`,l,r,t?.[To],n[To]),u[i]=l,u[To]=n[To];else if(i===`style`)go(e,l,t?.[Eo],n[Eo]),u[i]=l,u[Eo]=n[Eo];else{var g=u[i];if(l!==g||l===void 0&&ar(e,i)){u[i]=l;var _=i[0]+i[1];if(_!==`$$`&&!(_!==`on`&&i.length>2&&_.toLowerCase()===`on`)){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=dt==null&&na(r);if(ea(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(l!=null)continue;ur(e,r,u[n],t),u[n]=null}if(v)ga(r,e,l),_a([r]);else if(l!=null){function a(...e){u[i].apply(this,e)}u[n]=ma(r,e,a,t)}}else if(i===`style`)Fo(e,i,l);else if(i===`autofocus`)dt==null?Gr(e,!!l):l?zn(e,i,l):ir(e,i);else if(!s&&(i===`__value`||i===`value`&&l!=null))e.__value=l,(g==null||e.value!==l||l===0&&e.nodeName===No)&&$n(e,l);else if(i===`selected`&&d)_o(e,l);else{var y=i;c||(y=aa(y));var b=y===`defaultValue`||y===`defaultChecked`;if(f&&y===`defaultValue`)continue;if(l==null&&!s&&!b){if(o[i]=null,(y===`value`||y===`checked`)&&dt==null){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;ir(n,y),tr(n,e),$n(n,n.__value=r?e:null)}else{let e=n.defaultChecked;ir(n,y),nr(n,e),er(n,r?e:!1)}}else ir(e,i),y===`value`&&(e.__value=null)}else b&&dt!=null?(y===`defaultValue`?tr(e,l):nr(e,l),y in o&&(o[y]=be)):b||(s||typeof l!=`string`)&&m.has(y)?(e[y]=l,y in o&&(o[y]=be)):typeof l!=`function`&&Fo(e,y,l,a)}}}}}}finally{l&&De(!0)}return u}function Lo(e,t,n=[],r=[],i=[],a,o=!1,s=!1){ft(i,n,r,n=>{var r=void 0,i={},c=Un(e)===Mo,l=!1;if(jr(()=>{var u=t(...n.map(H)),d=Io(e,r,u,a,o,s);if(l&&c){var f=e;`defaultValue`in u&&vo(f,u.defaultValue),`value`in u&&bo(f,u.value)}for(let e of Object.getOwnPropertySymbols(i))u[e]||Ir(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var p=u[t];t.description!==`@attach`||r&&p===r[t]||(i[t]&&Ir(i[t]),i[t]=Mr(()=>po(e,()=>p))),d[t]=p}r=d}),c){var u=e;Dr(()=>{var e=r;`defaultValue`in e&&vo(u,e.defaultValue),bo(u,e.value,!0),xo(u)})}l=!0})}function Ro(e){return e[fe]??={[Do]:Un(e).includes(`-`),[Oo]:dt==null&&e.namespaceURI===`http://www.w3.org/1999/xhtml`}}var zo=new Map;function Bo(e){var t=rr(e,`is`),n=t||Un(e),r=zo.get(n);if(r)return r;r=new Set,customElements&&(t||n.includes(`-`))&&!customElements.get(t||n.toLowerCase())||zo.set(n,r);for(var i,a=e,s=Element.prototype;s!==a;){for(var c in i=o(a),i)i[c].set&&c!==`innerHTML`&&c!==`textContent`&&c!==`innerText`&&r.add(c);a=l(a)}return r}function Vo(e,t,n=t){var r=new WeakSet;Yr(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Ho(e)?Uo(a):a,n(a),P!==null&&r.add(P),await Gi(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(D&&e.defaultValue!==e.value||Xi(t)==null&&e.value)&&(n(Ho(e)?Uo(e.value):e.value),P!==null&&r.add(P)),kr(()=>{var n=t();e===document.activeElement&&r.has(Rt)||Ho(e)&&n===Uo(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function Ho(e){var t=e.type;return t===`number`||t===`range`}function Uo(e){return e===``?null:+e}function Wo(e,t,n=t){Yr(e,`change`,()=>{n(e.files)},()=>{typeof DataTransfer==`function`&&(e.files=new DataTransfer().files),n(e.files)}),D&&e.files&&n(e.files),kr(()=>{e.files=t()})}function Go(e,t){return e===t||e?.[ce]===t}function Ko(e=lt(),t,n,r){var i=rt.r,a=ri;return Dr(()=>{var o,s;return kr(()=>{o=s,s=r?.()||[],Xi(()=>{Go(n(...s),e)||(t(e,...s),o&&Go(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Go(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function qo(e=!1){let t=rt,n=t.l.u;if(!n)return;let r=()=>Zi(t.s);if(e){let e=0,n={},i=vt(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>H(i)}n.b.length&&wr(()=>{Jo(t,r),m(n.b)}),Sr(()=>{let e=Xi(()=>n.m.map(p));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&Sr(()=>{Jo(t,r),m(n.a)})}function Jo(e,t){if(e.l.s)for(let t of e.l.s)H(t);t()}var Yo=!1;function Xo(e){var t=Yo;try{return Yo=!1,[e(),Yo]}finally{Yo=t}}var Zo={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Z(e,t,n){return new Proxy({props:e,exclude:t},Zo)}var Qo={get(e,t){if(!e.exclude.includes(t))return H(e.version),t in e.special?e.special[t]():e.props[t]},set(e,t,n){if(!(t in e.special)){var r=ri;try{ii(e.parent_effect),e.special[t]=Q({get[t](){return e.props[t]}},t,4)}finally{ii(r)}}return e.special[t](n),vn(e.version),!0},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},deleteProperty(e,t){return e.exclude.includes(t)||(e.exclude.push(t),vn(e.version)),!0},has(e,t){return!e.exclude.includes(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function $o(e,t){return new Proxy({props:e,exclude:t,special:{},version:dn(0),parent_effect:ri},Qo)}var es={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];d(i)&&(i=i());let o=a(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=a(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===ce||t===ue)return!1;for(let n of e.props)if(d(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(d(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function ts(...e){return new Proxy({props:e},es)}function Q(e,t,n,r){var i=!Ke||!!(n&2),o=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??=vt(r),H(u)):(l&&(l=!1,c=s?Xi(r):r),c);let f;if(o){var p=ce in e||ue in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=Xo(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Ve(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?vt:St)(()=>(v=!1,g()));o&&H(y);var b=ri;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&o?xn(e):e;return I(y,n),v=!0,c!==void 0&&(c=n),e}return Xr&&v||b.f&16384?y.v:H(y)})}function ns(e){rt===null&&Fe(`onMount`),Ke&&rt.l!==null?rs(rt).m.push(e):Sr(()=>{let t=Xi(e);if(typeof t==`function`)return t})}function rs(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}On(),typeof window<`u`&&((globalThis.__svelte??={}).v??=new Set).add(`5`),qe();var is={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},as=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},os=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ss=Oa(`<svg><!><!></svg>`);function cs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=$o(n,[`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`]);j(t,!1);let i=Q(t,`name`,8,void 0),a=Q(t,`color`,8,`currentColor`),o=Q(t,`size`,8,24),s=Q(t,`strokeWidth`,8,2),c=Q(t,`absoluteStrokeWidth`,8,!1),l=Q(t,`iconNode`,24,()=>[]);qo();var u=ss();Lo(u,(e,t,n)=>({...is,...e,...r,width:o(),height:o(),stroke:a(),"stroke-width":t,class:n}),[()=>as(r)?void 0:{"aria-hidden":`true`},()=>(Zi(c()),Zi(s()),Zi(o()),Xi(()=>c()?Number(s())*24/Number(o()):s())),()=>(Zi(os),Zi(i()),Zi(n),Xi(()=>os(`lucide-icon`,`lucide`,i()?`lucide-${i()}`:``,n.class)))]);var d=L(u);io(d,1,l,Xa,(e,t)=>{var n=N(()=>_(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=G();fo(R(a),r,!0,(e,t)=>{Lo(e,()=>({...i()}))}),K(e,a)}),uo(B(d),t,`default`,{},null),k(u),K(e,u),M()}function ls(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];cs(e,ts({name:`activity`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function us(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];cs(e,ts({name:`download`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function ds(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`}],[`path`,{d:`m5.082 11.09 8.828 8.828`}]];cs(e,ts({name:`eraser`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function fs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];cs(e,ts({name:`log-out`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function ps(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];cs(e,ts({name:`pause`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function ms(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}],[`path`,{d:`m15 5 4 4`}]];cs(e,ts({name:`pencil`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function hs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];cs(e,ts({name:`play`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function gs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];cs(e,ts({name:`plus`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function _s(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];cs(e,ts({name:`refresh-cw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function vs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];cs(e,ts({name:`rotate-ccw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function ys(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}]];cs(e,ts({name:`rotate-cw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function bs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]];cs(e,ts({name:`save`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function xs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];cs(e,ts({name:`search`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function Ss(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];cs(e,ts({name:`trash-2`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}function Cs(e,t){let n=$o(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];cs(e,ts({name:`x`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=G();uo(R(r),t,`default`,{},null),K(e,r)},$$slots:{default:!0}}))}var ws=class extends Error{status;fields;constructor(e,t,n=[]){super(t),this.status=e,this.fields=n,this.name=`ApiError`}};async function Ts(e,t){let n=await fetch(e,{credentials:`same-origin`,...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...t?.headers}});if(!n.ok){let e=`请求失败(${n.status})`,t=[];try{let r=await n.json();r.message&&(e=r.message),Array.isArray(r.fields)&&(t=r.fields)}catch{}throw new ws(n.status,e,t)}return await n.json()}var Es={async login(e){await Ts(`/api/login`,{method:`POST`,body:JSON.stringify({token:e})})},schema(){return Ts(`/api/config/schema`)},config(){return Ts(`/api/config`)},save(e){return Ts(`/api/config`,{method:`PUT`,body:JSON.stringify(e)})},models(){return Ts(`/api/models`)},status(){return Ts(`/api/status`)},restart(){return Ts(`/api/restart`,{method:`POST`})},logs(e={}){let t=new URLSearchParams;e.limit!==void 0&&t.set(`limit`,String(e.limit)),e.level&&t.set(`level`,e.level);let n=t.toString();return Ts(`/api/logs${n?`?${n}`:``}`)},chatOverrides(){return Ts(`/api/chat-overrides`)},saveChatOverrides(e){return Ts(`/api/chat-overrides`,{method:`PUT`,body:JSON.stringify(e)})},toolProfiles(){return Ts(`/api/tool-profiles`)},saveToolProfiles(e){return Ts(`/api/tool-profiles`,{method:`PUT`,body:JSON.stringify(e)})},tools(){return Ts(`/api/tools`)},userMd(){return Ts(`/api/user-md`)},saveUserMd(e,t){return Ts(`/api/user-md`,{method:`PUT`,body:JSON.stringify({chat:e,content:t})})}};function Ds(e){let t=new EventSource(`/api/stream`),n=(e,n)=>{n&&t.addEventListener(e,e=>{try{n(JSON.parse(e.data))}catch{}})};return n(`status`,t=>e.status?.(t)),n(`log`,t=>e.log?.(t)),n(`config`,t=>e.config?.(t)),()=>t.close()}var Os=Array.isArray,ks=e=>{if(!e&&e!==0&&e!==0n)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return e===e?``+e:``;if(typeof e==`bigint`)return``+e;let t=``;if(Os(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n&&n!==0&&n!==0n)continue;let i=typeof n==`string`?n:ks(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},As=/\s+/g,js=Array.isArray,Ms=e=>typeof e!=`string`||!e?e:e.replace(As,` `).trim(),Ns=/ {2}|[\t-\r\u00a0]/,Ps=e=>{let t=e.length;return t===0?!1:e.charCodeAt(0)===32||e.charCodeAt(t-1)===32||Ns.test(e)},Fs=e=>Ps(e)?Ms(e):e,Is=function(){let e=arguments.length,t=``,n=0;for(;n<e;n++){let e=arguments[n];if(e||e===0||e===0n){if(typeof e!=`string`)break;t&&(t+=` `),t+=e}}for(;n<e;n++){let e=arguments[n];if(!e&&e!==0&&e!==0n)continue;let r=typeof e==`string`?e:ks(e);r&&(t&&(t+=` `),t+=r)}return t?Ps(t)?Ms(t):t:``},Ls=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,Rs=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},zs=(e,t)=>{let n=e;for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];n[e]=e in n?Is(n[e],r):r}return e},Bs=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];js(r)?Bs(r,t):r&&t.push(r)}},Vs=(...e)=>{let t=[];return Bs(e,t),t},Hs=e=>typeof e==`object`&&!!e&&!js(e),Us=(e,t)=>{let n=e,r=t,i={};for(let e in n){let t=n[e];if(e in r){let n=r[e];i[e]=js(t)||js(n)?Vs(n,t):Hs(t)&&Hs(n)?Us(t,n):Hs(t)&&typeof n==`string`?Us(t,{base:n}):typeof t==`string`&&Hs(n)?Us({base:t},n):n+` `+t}else i[e]=t}for(let e in r)e in n||(i[e]=r[e]);return i},Ws={twMerge:!0,twMergeConfig:{}},Gs=256,Ks=Symbol(`tv-cache-miss`),qs=e=>e?.class!=null&&e.class!==``||e?.className!=null&&e.className!==``,Js=Symbol(`tv-non-finite`),Ys=(e,t)=>{if(typeof t==`number`&&!Number.isFinite(t))throw Js;return t},Xs=Symbol(`tv-uncacheable`),Zs=Symbol(`tv-null`),Qs=e=>{if(e===void 0)return``;if(e===null)return Zs;let t=typeof e;return t===`string`?e:t===`boolean`?e?`true`:`false`:t===`number`?Number.isNaN(e)?`false`:String(e):Xs},$s=(e,t)=>{if(e==null)return;let n=e[t];return typeof n==`function`&&!Object.hasOwn(e,t)?void 0:n},ec=(e,t,n,r)=>{let i=$s(r,e);if(i!==void 0)return i;let a=$s(n,e);return a===void 0?$s(t,e):a},tc=0,nc=1,rc=2,ic=0,ac=1,oc=2,sc=3,cc=0,lc=1,uc=2,dc=e=>{let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},fc=e=>typeof e==`number`&&!Number.isFinite(e),pc=(e,t,n)=>{try{return e.kinds[t]=sc,e.tokens[t]=JSON.stringify(n,Ys),!0}catch{return!1}},mc=(e,t,n)=>{if(typeof n!=`object`||!n)return e.kinds[t]=ic,e.tokens[t]=n,!0;if(Array.isArray(n)){for(let r=0;r<n.length;r++){let i=n[r];if(typeof i==`object`&&i)return pc(e,t,n);if(fc(i))return!1}return e.kinds[t]=ac,e.tokens[t]=n.slice(),!0}if(dc(n)){let r=[];for(let i in n){let a=n[i];if(fc(a))return!1;if(typeof a==`object`&&a)return pc(e,t,n);if(typeof a==`bigint`)return!1;r.push(i,a)}return e.kinds[t]=oc,e.tokens[t]=r,!0}return pc(e,t,n)},hc=(e,t,n)=>{if(e===ic)return Object.is(t,n)?cc:lc;if(typeof n!=`object`||!n)return lc;if(e===ac){let e=t;if(!Array.isArray(n)||n.length!==e.length)return lc;for(let t=0;t<e.length;t++)if(!Object.is(e[t],n[t]))return lc;return cc}if(e===oc){if(Array.isArray(n)||!dc(n))return lc;let e=t,r=0;for(let t in n){if(r>=e.length||e[r]!==t||!Object.is(e[r+1],n[t]))return lc;r+=2}return r===e.length?cc:lc}try{return JSON.stringify(n,Ys)===t?cc:lc}catch{return uc}},gc=e=>Array.isArray(e)?e:void 0,_c=(e,t,n)=>{let r=gc(n);e.kinds[t]=r===void 0?ic:ac,e.tokens[t]=r===void 0?void 0:r.slice()},vc=(e,t,n)=>{let r=0;for(let n=0;n<t.length;n++){let{conditionKeys:i,source:a}=t[n];for(let t=0;t<i.length;t++)if(!mc(e,r++,a[i[t]]))return!1;if(!mc(e,r++,a.class)||!mc(e,r++,a.className))return!1}for(let t=0;t<n.length;t++){let{conditionKeys:i,source:a}=n[t];for(let t=0;t<i.length;t++)if(!mc(e,r++,a[i[t]]))return!1;if(_c(e,r++,a.slots),!mc(e,r++,a.class)||!mc(e,r++,a.className))return!1}return e.kinds.length=r,e.tokens.length=r,!0},yc=({kinds:e,tokens:t},n,r)=>{let i=e.length,a=0,o;for(let r=0;r<n.length;r++){let{conditionKeys:s,source:c}=n[r];if(a+s.length+2>i)return lc;for(let n=0;n<s.length;n++,a++)if(o=hc(e[a],t[a],c[s[n]]),o!==cc)return o;if(o=hc(e[a],t[a],c.class),o!==cc||(a++,o=hc(e[a],t[a],c.className),o!==cc))return o;a++}for(let n=0;n<r.length;n++){let{conditionKeys:s,source:c}=r[n];if(a+s.length+3>i)return lc;for(let n=0;n<s.length;n++,a++)if(o=hc(e[a],t[a],c[s[n]]),o!==cc)return o;if(o=hc(e[a],t[a],gc(c.slots)),o!==cc||(a++,o=hc(e[a],t[a],c.class),o!==cc)||(a++,o=hc(e[a],t[a],c.className),o!==cc))return o;a++}return a===i?cc:lc},bc=()=>{let e=null;return(t,n)=>{if(e!==null){let r=yc(e,t,n);if(r===cc)return tc;if(r===uc)return e=null,rc}let r={kinds:[],tokens:[]};return vc(r,t,n)?(e=r,nc):(e=null,rc)}},xc=()=>({children:new Map,defaults:null,hasLeaf:!1,leaf:void 0}),Sc=(e,t,n,r)=>{let i=n?e.defaults?.get(t):e.children.get(t);if(!i){if(!r)return;i=xc(),(n?e.defaults??=new Map:e.children).set(t,i)}return i},Cc=(e,t=Gs)=>{let n=xc(),r=null,i=0,a=(t,n,r,i)=>{let a=t;for(let t=0;t<e.length;t++){let o=e[t],s=$s(r,o),c=s===void 0;c&&(s=$s(n,o));let l=Qs(s);if(l===Xs)return Xs;if(a=Sc(a,l,c,i),!a)return}return a};return{get(e,t){let o=a(n,e,t,!1);if(o===Xs)return Xs;if(o&&o.hasLeaf)return o.leaf;if(r){let o=a(r,e,t,!1);if(o===Xs)return Xs;if(o&&o.hasLeaf){let r=a(n,e,t,!0);return r!==Xs&&r&&(r.hasLeaf||i++,r.hasLeaf=!0,r.leaf=o.leaf),o.leaf}}return Ks},set(e,o,s){i>=t&&(r=n,n=xc(),i=0);let c=a(n,e,o,!0);c!==Xs&&c&&(c.hasLeaf||i++,c.hasLeaf=!0,c.leaf=s)}}},wc=e=>(t,n)=>qs(n)?e.override(t,n.class,n.className):t,Tc=()=>({base:void 0,variants:{},defaultVariants:{},slots:{},compoundVariants:[],compoundSlots:[]}),Ec=e=>({base:e.base,variants:e.variants??{},defaultVariants:e.defaultVariants??{},slots:e.slots??{},compoundVariants:e.compoundVariants??[],compoundSlots:e.compoundSlots??[]}),Dc=(e,t)=>{let n=e.base!=null||t.base!=null?Is(e.base,t.base):void 0,r=Rs(t.variants)?e.variants:Rs(e.variants)?t.variants:Us(t.variants,e.variants),i=Rs(t.defaultVariants)?e.defaultVariants:{...e.defaultVariants,...t.defaultVariants},a=Rs(e.slots),o=Rs(t.slots),s;s=a&&o?{}:a?e.base==null?{...t.slots}:zs({base:e.base},{...t.slots}):o?t.base==null?{...e.slots}:zs({...e.slots},{base:t.base}):zs({...e.slots},t.slots);let c=Rs(t.compoundVariants)?e.compoundVariants:Rs(e.compoundVariants)?t.compoundVariants:Vs(e.compoundVariants,t.compoundVariants),l=Rs(t.compoundSlots)?e.compoundSlots:Rs(e.compoundSlots)?t.compoundSlots:Vs(e.compoundSlots,t.compoundSlots);return{base:n,variants:r,defaultVariants:i,slots:s,compoundVariants:c,compoundSlots:l}},Oc=e=>{let t=Tc();for(let n=0;n<e.length;n++)t=Dc(t,Ec(e[n]));return t},kc=e=>e?Fs(ks(e)):``,Ac=e=>{let t=kc(e.class),n=kc(e.className);return t?n?t+` `+n:t:n},jc=(e,t,n)=>{if(!n)return;let r=e[t];e[t]=r?r+` `+n:n},Mc=e=>{let t={},n=[e.class,e.className];for(let e=0;e<n.length;e++){let r=n[e];if(typeof r==`string`||Array.isArray(r))jc(t,`base`,kc(r));else if(r&&typeof r==`object`)for(let e in r)jc(t,e,kc(r[e]))}return t},Nc=(e,t)=>{let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e[i];n.push({key:i,values:a,isEmpty:Rs(a),normalizedFrom:null,normalized:null})}return n},Pc=(e,t,n,r)=>{let i;if(!r||typeof n==`string`||Array.isArray(n))i=kc(n);else if(n&&typeof n==`object`){let e={};for(let t in n){let r=kc(n[t]);r&&(e[t]=r)}i=e}else i=``;return(e.normalizedFrom??={})[t]=n,(e.normalized??={})[t]=i,i},Fc=(e,t)=>{for(let t=0;t<e.length;t++)e[t].classes=null,e[t].slotClasses=null;for(let e=0;e<t.length;e++)t[e].classes=null},Ic=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r,classes:null,slotClasses:null})}return t},Lc=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`slots`&&e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r,classes:null})}return t},Rc=e=>{let t={};for(let n=0;n<e.length;n++){let r=e[n],i=r.source.slots;if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];t[n]||(t[n]=[]),t[n].push(r)}}return t},zc=(e,t)=>{let{extend:n=null,base:r,slots:i,variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=e,l=i!==void 0,u=l?i:{},d=n,f=null;if(Array.isArray(d)){let e=d.filter(Boolean);e.length===1?f=e[0]:e.length>1&&(f=Oc(e))}else d!=null&&(f=d);let p={...Ws,...t},m=f?.base?Is(f.base,r):r,h=f?.variants&&!Rs(f.variants)?Us(a,f.variants):a,g=f?.defaultVariants&&!Rs(f.defaultVariants)?{...f.defaultVariants,...c}:c,_=!f?.slots||Rs(f.slots),v=l?_&&f?.base?Is(r,f.base):typeof r==`string`||r==null?r:Is(r):void 0,y=l?{base:v,...u}:{},b=_?y:zs({...f?.slots},Rs(y)?{base:r}:y),x=!f?.compoundVariants||Rs(f.compoundVariants)?o:Vs(f?.compoundVariants,o),S=!f?.compoundSlots||Rs(f.compoundSlots)?s:Vs(f?.compoundSlots,s),C=Object.keys(h);return{config:p,extend:d,base:m,variants:h,defaultVariants:g,slots:b,compoundVariants:x,compoundSlots:S,compiledVariants:null,compiledCompoundVariants:null,compiledCompoundSlots:null,compiledCompoundSlotsBySlot:null,deferredError:x&&!Array.isArray(x)?TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`):S&&!Array.isArray(S)?TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof S}`):null,mode:l||!_?`slots`:C.length===0?`plain`:`variants`,slotKeys:null,variantKeys:C}},Bc=e=>(e.compiledVariants===null&&(e.compiledVariants=Nc(e.variants,e.variantKeys),e.compiledCompoundVariants=Ic(e.compoundVariants),e.compiledCompoundSlots=Lc(e.compoundSlots),e.compiledCompoundSlotsBySlot=Rc(e.compiledCompoundSlots),e.slotKeys=Object.keys(e.slots)),e),Vc=[],Hc=[],Uc=e=>`${Ls(e)||`false`}`,Wc=e=>{if(e==null)return!0;let t=typeof e;return t===`string`||t===`boolean`||t===`number`},Gc=(e,t)=>e===t?!0:typeof e==`string`&&typeof t==`string`&&e&&t?!1:Wc(e)&&Wc(t)&&Uc(e)===Uc(t),Kc=(e,t)=>{if(!Array.isArray(e))return Gc(e,t);for(let n=0;n<e.length;n++)if(Gc(e[n],t))return!0;return!1},qc=(e,t)=>Uc($s(e,t)),Jc=(e,t,n,r,i)=>{if(e.isEmpty)return``;let a=$s(r,e.key)??$s(n,e.key);if(a===null)return``;let o=Ls(a);if(typeof o==`object`)return``;let s=(o??Ls($s(t,e.key)))||`false`,c=e.values[s];if(!c)return``;if(typeof c==`string`)return c;let l=e.normalizedFrom;return l!==null&&l[s]===c?e.normalized[s]:Pc(e,s,c,i)},Yc=(e,t)=>typeof e==`string`?t===`base`?e:``:e[t]??``,Xc=(e,t,n,r)=>{let{conditionKeys:i,source:a}=e;for(let e=0;e<i.length;e++){let o=i[e];if(!Kc(a[o],ec(o,t,n,r)))return!1}return!0},Zc=(e,t,n,r,i,a)=>{for(let o=0;o<n.length;o++){let s=n[o],c=Jc(s,r,i,void 0,!1);c&&(e[t++]=c,a&&(a[s.key]=c))}return t},Qc=(e,t,n,r,i,a,o,s)=>{for(let c=0;c<r.length;c++){let l=r[c],u=Yc(Jc(l,i,a,o,!0),n);u&&(e[t++]=u,s&&(s[l.key]=u))}return t},$c=(e,t,n,r,i)=>{for(let a=0;a<n.length;a++){let o=n[a],s=o.classes;s!==``&&Xc(o,r,i)&&(s===null&&(s=o.classes=Ac(o.source)),s&&(e[t++]=s))}return t},el=(e,t,n,r,i,a,o)=>{for(let s=0;s<r.length;s++){let c=r[s],l=c.slotClasses;if(l!==null&&!l[n]||!Xc(c,i,a,o))continue;l===null&&(l=c.slotClasses=Mc(c.source));let u=l[n];u&&(e[t++]=u)}return t},tl=(e,t,n,r,i,a)=>{for(let o=0;o<n.length;o++){let s=n[o],c=s.classes;c!==``&&Xc(s,r,i,a)&&(c===null&&(c=s.classes=Ac(s.source)),c&&(e[t++]=c))}return t},nl=0,rl=1,il=2,al=(e,t)=>{let n=Object.create(null);for(let t=0;t<e.length;t++){let r=e[t].conditionKeys;for(let e=0;e<r.length;e++)n[r[e]]=1}for(let e=0;e<t.length;e++){let r=t[e].conditionKeys;for(let e=0;e<r.length;e++)n[r[e]]=1}return n},ol=(e,t)=>{let n=e.slice();for(let e in t)n.includes(e)||n.push(e);return n},sl=(e,t)=>{if(e==null)return;let n;for(let r=0;r<t.length;r++){let i=$s(e,t[r]);i!==void 0&&((n??=Object.create(null))[t[r]]=i)}return n},cl=(e,t,n,r)=>{let i=rl;for(let a in e){let o=e[a];if(a===`class`||a===`className`){o!=null&&o!==``&&(i=il);continue}if(o===void 0)continue;if($s(t,a)===void 0){if(r()[a])return nl;continue}let s=$s(n,a);if(o===s)continue;if(o===null)return nl;let c=typeof o;if(c===typeof s&&(c===`string`||c===`boolean`)&&o!==``&&s!==``||typeof o==`object`||Uc(o)!==Uc(s))return nl}return i},ll=()=>({defaults:[],optionKeys:[],options:[],conditionDefaults:[]}),ul=(e,t,n,r)=>{for(let r=0;r<e.length;r++){let i=e[r],a=qc(t,i.key);n.defaults[r]=t[i.key],n.optionKeys[r]=a,n.options[r]=i.isEmpty?void 0:i.values[a]}let{conditionDefaults:i}=n;i.length=0;for(let n=e.length;n<r.length;n++)i.push(t[r[n]])},dl=(e,t,n,r)=>{for(let r=0;r<e.length;r++){let i=e[r];if(t[i.key]!==n.defaults[r]||!i.isEmpty&&i.values[n.optionKeys[r]]!==n.options[r])return!1}let{conditionDefaults:i}=n;for(let n=0;n<i.length;n++)if(t[r[e.length+n]]!==i[n])return!1;return!0},fl=(e,t)=>{let{base:n,deferredError:r}=e,i=Ks,a=wc(t);return(e=>{if(r)throw r;if(i===Ks){let e=kc(n);Hc[0]=e,i=t.parts(Hc,+!!e)}return a(i,e)})},pl=(e,t)=>{let{base:n,defaultVariants:r,deferredError:i,variantKeys:a,variants:o}=e,s=e.compiledCompoundVariants,c=e.compiledVariants,l=Vc,u=``,d=!1,f=null,p=null,m=null,h=null,g=wc(t),_=1,v=null,y=null,b=()=>{(c===null||s===null)&&(Bc(e),c=e.compiledVariants,s=e.compiledCompoundVariants,l=e.compiledCompoundSlots??Vc,u=kc(n),d=s.length>0||l.length>0)},x=()=>f??=al(s,l),S=()=>p??=ol(a,x()),C=e=>{let n=Hc,i=0;return u&&(n[i++]=u),i=Zc(n,i,c,r,e),s.length>0&&(i=$c(n,i,s,r,e)),t.parts(n,i)},w=()=>{let e=(h??=bc())(s,l);return e===tc||(Fc(s,l),e!==rc&&(f=null,p=null,m=null,v=null,!0))},ee=()=>(v!==null&&dl(c,r,y,S())||(v=C(void 0),ul(c,r,y??=ll(),S())),v);return(e=>{if(i)throw i;b();let t=e==null?rl:cl(e,o,r,x);if(t!==nl){let n;return d?_>0?(_=0,n=C(e)):n=w()?ee():C(e):(_=0,n=ee()),t===il?g(n,e):n}let n;if(_>0)_--,n=C(e);else if(d&&!w())n=C(e);else{m??=Cc(S());let t=m.get(r,e);t===Xs?n=C(e):t===Ks?(n=C(e),m.set(r,e,n)):n=t}return g(n,e)})},ml=(e,t)=>{let{defaultVariants:n,deferredError:r,slots:i,variantKeys:a,variants:o}=e,s=null,c=null,l=null,u=null,d=null,f=!1,p=null,m=null,h=null,g=null,_=null,v=1,y=null,b=null,x=null,S=()=>{if(u!==null)return;(e.compiledVariants===null||e.compiledCompoundVariants===null||e.compiledCompoundSlots===null||e.compiledCompoundSlotsBySlot===null||e.slotKeys===null)&&Bc(e),s=e.compiledVariants,c=e.compiledCompoundVariants,l=e.compiledCompoundSlots;let r=e.compiledCompoundSlotsBySlot;u=e.slotKeys,f=c.length>0||l.length>0,h=wc(t);let a=Array(u.length);for(let e=0;e<u.length;e++){let o=u[e],l=r[o]??Vc,d,p=``;a[e]=(e,r)=>{let a=Hc,u=0,m=i[o];return m!==d&&(d=m,p=kc(m)),p&&(a[u++]=p),u=Qc(a,u,o,s,n,e,r),f&&(u=el(a,u,o,c,n,e,r),u=tl(a,u,l,n,e,r)),t.parts(a,u)}}d=a},C=e=>{let t=u,n=d,r=h,i={},a=sl(e,T());for(let e=0;e<t.length;e++){let o=n[e],s=o(a,void 0);i[t[e]]=e=>{if(e==null)return s;let t=!1;for(let n in e)if(n!==`class`&&n!==`className`&&e[n]!==void 0){t=!0;break}return r(t?o(a,e):s,e)}}return i},w=()=>{let e=(_??=bc())(c,l);return e===tc||(Fc(c,l),e!==rc&&(p=null,m=null,g=null,y=null,!0))},ee=()=>p??=al(c,l),T=()=>m??=ol(a,ee()),E=()=>{if(!dl(s,n,b,T()))return!1;let e=u,t=x;for(let n=0;n<e.length;n++)if(i[e[n]]!==t[n])return!1;return!0},te=()=>{if(y===null||!E()){y=C(void 0),ul(s,n,b??=ll(),T());let e=u,t=x??=[];for(let n=0;n<e.length;n++)t[n]=i[e[n]]}return y};return(e=>{if(r)throw r;if(S(),(e==null?rl:cl(e,o,n,ee))!==nl)return f?v>0?(v=0,C(e)):w()?te():C(e):(v=0,te());if(v>0)return v--,C(e);if(f&&!w())return C(e);g??=Cc(T());let t=g.get(n,e);if(t===Xs)return C(e);if(t!==Ks)return t;let i=C(e);return g.set(n,e,i),i})},hl=(e,t)=>{if(e.mode===`plain`)return fl(e,t);let n;return(r=>(n??=e.mode===`slots`?ml(e,t):pl(e,t),n(r)))},gl=(e,t)=>{let n={...e,...t};return e.twMergeConfig&&t.twMergeConfig&&(n.twMergeConfig={...e.twMergeConfig,...t.twMergeConfig}),n},_l=(e,t)=>{e.variantKeys=t.variantKeys,e.extend=t.extend,e.base=t.base,e.slots=t.slots,e.variants=t.variants,e.defaultVariants=t.defaultVariants,e.compoundSlots=t.compoundSlots,e.compoundVariants=t.compoundVariants},vl=(e,t)=>{let n=(n,r)=>{let i=zc(n,r),a=hl(i,e(i.config));return _l(a,i),t?t(a,i,_l):a};return{tv:n,createTV:e=>(t,r)=>n(t,r&&e?gl(e,r):r??e)}},yl=`line`in Error(),bl=-1,xl=-1,Sl=(e,t,n)=>{let r=0x811c9dc5;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Cl=(e,t,n)=>{let r=n-t,i=Math.imul(r,0x9e3779b1)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),0x85ebca6b),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),0xc2b2ae35),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},wl=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:T}=e,E=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)E[y[e]]=e;let te=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>te&&(te=t)}let ne=32;for(;ne<2*(1+te+S.length);)ne<<=1;let re=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)re[e+1]=re[e]+u[f[e]+1]-u[f[e]];let ie=new Uint8Array(r);for(let e=0;e<w.length;e++)ie[w[e]]=1;let ae=i.length-1,oe=new Uint8Array(ae),se=0,ce=!0;for(let e=0;e<m.length;e++){oe[m[e]]=1;let t=_[g[e]*2+1];t>se&&(se=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ce=!1)}let le=1;for(;le<m.length*2;)le<<=1;let ue=new Int32Array(le).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Sl(v,t,t+_[g[e]*2+1])^Math.imul(m[e],0x9e3779b1)|0)&le-1;for(;ue[n]!==-1;)n=n+1&le-1;ue[n]=e}let de=(e,t,n,r)=>{let i=(Sl(t,n,r)^Math.imul(e,0x9e3779b1)|0)&le-1,a=r-n;for(;;){let r=ue[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&le-1}},fe=n.cacheSize??8192,pe=n.prefix??e.prefix??``,me=pe===``?``:pe+`:`,he=me.length,ge=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),_e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,be=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=0,Se=-1,Ce=-1,we=-1,Te=-1,Ee=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,D=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(xe=0,Se=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)xe=1;else if(r===40&&i===41)xe=2;else return;we=t+1,Te=n-1;let a=t+1;if(Ee(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!Ee(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(Se=t+1,Ce=a,we=a+1)}},O=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Oe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k=e=>!!e&&!Number.isNaN(Number(e)),A=(e,t,n)=>{if(n-t<11||!O(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&O(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&O(e,t+10,t+18,`-normal/`)},Ae=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],je=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Me=[2,3,3,6,0,0,4,5,0,0,0,0,0,1,1],Ne=(e,t,n,r)=>{if(e>=10){if(e>=25)return ge[e-25](t.slice(n,r));let i=e-10;if(xe!==Ae[i])return!1;if(Se>=0){for(let e of je[i])if(O(t,Se,Ce,e))return!0;return!1}switch(Me[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(we,Te);return _e.test(e)&&!ve.test(e)}case 3:return k(t.slice(we,Te));case 4:return be.test(t.slice(we,Te));case 5:return ye.test(t.slice(we,Te));default:return!k(t.slice(we,Te))}}switch(e){case 0:return!0;case 1:return xe===0;case 2:return xe===1;case 3:return xe===2;case 4:return Oe.test(t.slice(n,r));case 5:return k(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&k(t.slice(n,r-1));case 8:return ke.test(t.slice(n,r));default:return A(t,n,r)}},Pe=new Set(typeof T==`string`?T.split(` `):T),Fe=(e,t,n,r,i,a)=>{let o=Sl(t,n,r)^(i?0x9e3779b9:0),s=e.get(o);if(s!==void 0)e:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue e;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Ie=new Map,Le=new Map,Re=2,ze=4096,Be=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Pe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Le.get(s);return c===void 0&&Le.set(s,c=Re++),c},Ve=new Map,He=r,Ue=r+4096,We=()=>He++,Ge=2097152,Ke=8192,qe=new Int32Array(Ke),Je=Array(Ke).fill(null),Ye=new Int32Array(Ke),Xe=new Int32Array(Ke),Ze=new Uint8Array(Ke),Qe=0,$e=(e,t,n,r,i,a,o,s)=>{let c=e;if(Je[e]!==null){if(Je[e|1]===null)c=e|1;else if(!(Qe++&3))c=e|Qe>>2&1;else return}Je[c]=t.slice(n,r),qe[c]=i,Ye[c]=a,Xe[c]=o,Ze[c]=s},et=()=>Je.fill(null),tt=256,nt=[new Int32Array(tt),new Int32Array(tt),new Int32Array(tt),new Int32Array(tt)],[rt,it,at,ot]=nt,st=new Uint8Array(tt),ct=new Uint8Array(tt),j=()=>{tt*=2,nt=nt.map(e=>{let t=new Int32Array(tt);return t.set(e),t}),[rt,it,at,ot]=nt;let e=new Uint8Array(tt);e.set(st),st=e,ct=new Uint8Array(tt)},M=64,lt=new Int32Array(M),ut=new Int32Array(M),dt=new Int32Array(r),ft=2048,pt=21,mt=new Float64Array(ft),ht=new Int32Array(ft),gt=0,_t=(e,t)=>{if(e===0&&t<r)return dt[t]===gt?1:(dt[t]=gt,0);let n=e*2097152+t+1,i=Math.imul(n,0x9e3779b1)>>>pt;for(;ht[i]===gt;){if(mt[i]===n)return 1;i=i+1&ft-1}return mt[i]=n,ht[i]=gt,0},vt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?bl:Fe(Ve,e,t+1,r,0,We)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ut[t];if(r>n)continue;let i=lt[t],a=n-r;if(oe[i]===1&&a>0&&a<=se){let t=e.charCodeAt(r);if(ce===!1||t!==91&&t!==40){let t=de(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;De(e,r,n);let h=re[o]-c;for(let t=c;t<m;t++)if(Ne(d[t],e,r,n))return p[h+t]}return bl},yt=e=>{let t=e.length,n=0,c=0,u=!1;(Re>ze||Ie.size>ze)&&(Ie=new Map,Le=new Map,Re=2,et()),He>Ue&&(Ve=new Map,He=r,et());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&D(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&D(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===tt&&j();let _=n++;rt[_]=p,it[_]=h,c+=g,m^=Math.imul(g,0x9e3779b1);let v=m^m>>>15,y=v&8190;{let t=-1;if(qe[y]===v&&Je[y]!==null&&Je[y].length===g?t=y:qe[y|1]===v&&Je[y|1]!==null&&Je[y|1].length===g&&(t=y|1),t>=0){let n=Je[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){at[_]=Ye[t],ot[_]=Xe[t],st[_]=Ze[t];continue}}}let b=p;if(he!==0){if(h-p<=he||!e.startsWith(me,p)){at[_]=bl,$e(y,e,p,h,v,bl,0,0);continue}b=p+he}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,T=ee,E=h,te=!1,ne=0;E>T&&e.charCodeAt(E-1)===33?(te=!0,E--):E>T&&e.charCodeAt(T)===33&&(te=!0,T++,ne=1);let re=-1;w>ee&&(re=w+ne,re>=E&&(re=-1));let ae=T;E-T>1&&e.charCodeAt(T)===45&&(ae=T+1);let se=0,ce=0,le=0,ue=-1,de=0;(l[0]>=0||oe[0]===1)&&(lt[0]=0,ut[0]=ae,de=1);let fe=xl,pe=0;for(let t=ae;t<E;t++)if(t===re&&(fe=ce<le?xl:se,pe=de),se!==xl){let n=e.charCodeAt(t),r=-1;if(ce<le)o.charCodeAt(ce)===n?(ce++,ce===le&&(r=se=ue)):se=xl;else{let e=i[se],t=i[se+1],c=xl;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ce=e+1,le=a[i+1],ue=s[i],c=se);break}}se=c}if(r>=0&&(l[r]>=0||oe[r]===1)&&t+1<E&&e.charCodeAt(t+1)===45){if(de===M){M*=2;let e=new Int32Array(M);e.set(lt),lt=e;let t=new Int32Array(M);t.set(ut),ut=t}lt[de]=r,ut[de]=t+2,de++}}re===E&&(fe=ce<le?xl:se,pe=de);let ge=ce<le?xl:se,_e,ve=!1;if(re>=0){if(ve=!0,_e=vt(e,T,re,fe,pe),_e!==bl&&_e<r&&ie[_e]){let t=vt(e,T,E,ge,de);t!==bl&&t!==_e&&(_e=t,ve=!1)}else _e===bl&&(_e=vt(e,T,E,ge,de),ve=!1)}else _e=vt(e,T,E,ge,de);let ye=0,be=0;_e===bl?at[_]=bl:(be=+!!ve,ye=b>=C?+!!te:Fe(Ie,e,b,C,+!!te,e=>Be(e,te)),at[_]=_e,st[_]=be,ot[_]=ye),$e(y,e,p,h,v,_e,ye,be)}if(n===0)return``;if(n===1)return rt[0]===0&&it[0]===t?e:e.slice(rt[0],it[0]);if(n*ne>ft){for(;n*ne>ft;)ft<<=1,pt--;mt=new Float64Array(ft),ht=new Int32Array(ft)}if(Re>=Ge||He>=Ge)throw Error(`cn: too many distinct classes in one merge`);gt=gt+1|0,gt===0&&(dt.fill(0),ht.fill(0),gt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=at[e];if(t===bl){ct[e]=1;continue}let n=ot[e];if(_t(n,t)===1)ct[e]=0,f=!0;else if(ct[e]=1,t<r){let r=E[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)_t(n,x[e]);if(st[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&_t(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!ct[m]){m++;continue}let t=rt[m],r=it[m],i=m+1;for(;i<n&&ct[i]&&rt[i]===r+1&&e.charCodeAt(r)===32;)r=it[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},bt=16384,xt=new Int32Array(bt*2),N=0,St=1,Ct=Object.create(null),wt=Object.create(null),Tt=new Map,Et=new Map,Dt=0,Ot=0,kt=()=>{N^=bt,St=St+1|0,Ot=0},At=e=>{let t=Ct[e];if(t!==void 0)return t;let n=Cl(e,0,e.length),r=(n&16383)+N,i=xt[r]===(n^St)||xt[r^bt]===(n^St-1);return i&&(t=wt[e],t!==void 0)?(Ct[e]=t,t):(t=yt(e),i?(Ct[e]=t,++Dt>fe&&(Dt=0,wt=Ct,Ct=Object.create(null),kt())):(xt[r]=n^St,++Ot>bt&&kt()),t)},P=e=>{let t=Tt.get(e);if(t!==void 0)return t;let n=Cl(e,0,e.length),r=(n&16383)+N,i=xt[r]===(n^St)||xt[r^bt]===(n^St-1);return i&&(t=Et.get(e),t!==void 0)?(Tt.set(e,t),t):(t=yt(e),i?(Tt.set(e,t),++Dt>fe&&(Dt=0,Et=Tt,Tt=new Map,kt())):(xt[r]=n^St,++Ot>bt&&kt()),t)},jt=e=>{let t=Cl(e,0,e.length),n=(t&16383)+N;return xt[n]===(t^St)||xt[n^bt]===(t^St-1)||(xt[n]=t^St,++Ot>bt&&kt(),!1)},Mt=fe===0?yt:yl?e=>{let t=Tt.get(e);return t===void 0?P(e):t}:At;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Mt(arguments[0]):Mt(Dl.apply(null,arguments))},mergeString:Mt,seenBefore:fe===0?()=>!1:jt,mergeUncached:yt}},Tl=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Tl(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},El=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Tl(i,t);a&&(n&&(n+=` `),n+=a)}return n},Dl=function(){return El(arguments,!1)},Ol=256,kl=16,Al=1024,jl=4096,Ml=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(jl).fill(``),l=Array(jl).fill(``),u=Array(jl).fill(``));let i=Cl(t,0,t.length)&jl-2;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Tl(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;e:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue e}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>kl&&(_.miss=kl,_.skip=Al,_.e.length=0,_.at=0);let u=_.e;u.length<Ol?u.push(v):(u[_.at]=v,_.at=_.at+1&Ol-1),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):t===0||t===0n?`0`:e(Tl(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Nl=48,Pl=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Nl-t;return n},Fl=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Il=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Nl;n+=i>>>1^-(i&1),t[r]=n}return t},Ll=384,Rl=[],zl=Fl(Pl(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),Bl=Fl(Pl(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),Vl=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,Hl=(()=>{let e=zl.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=zl[n];i<zl[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(zl[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=zl[i];a<zl[i+1];a++)n[r++]=e,e+=t[e]}return n})(),Ul=Pl(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),Wl=Fl(Pl(`1233333593464636351265367151576`)),Gl=Pl(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0324325853;D>E?3257D>03258432585:0325B:;0328B:032`),Kl=Pl(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EJK4444::EJ4444441691;644444114244444:;L6666555555555555555999666664444444444444444444444226?6:66644M9N?D:111::::6DJ199`),ql=Il(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),Jl=(()=>{let e=new Int32Array(319).fill(-1),t=Il(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=Il(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),Yl=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),Xl=Il(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),Zl=Il(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),Ql=Il(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~‚22…ˆ‡:22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨©000¬00000000000000021M®­00°“000000000000000000000–222›HGHa1º222¿2À2222ÉÌ000­°2±`),$l=new Int32Array(995),eu=new Int32Array(995),tu=new Int32Array(995),nu=``,ru=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<Xl.length;r++)for(let i of Yl[Ql[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),ru[a*2]=nu.length,ru[a*2+1]=i.length,nu+=i),$l[n]=Xl[r],eu[n]=Zl[r],tu[n]=a,n++}}var iu=Il(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),au=Fl(Pl(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),ou=Il(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),su=Pl(`ij`),cu=Pl(`—`),lu=Pl(`1`),uu={GROUP_COUNT:Ll,customValidatorNames:Rl,edgeStart:zl,labelStart:Bl,labelText:Vl,edgeTarget:Hl,nodeGroup:Ul,nodeVlist:Jl,vlistPat:Wl,vlistOps:Gl,vlistRef:Kl,vlistGroup:ql,litAnchor:$l,litGroup:eu,litPool:tu,poolOffsets:ru,poolText:nu,adjGid:iu,adjStart:au,adjTgt:ou,patGid:su,patTgt:cu,postfixLookupGroups:lu,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},du=8192,fu=wl(uu,void 0,{cacheSize:du}),pu=Ml(fu.mergeString,fu);fu.merge;var mu=e=>e,hu=[],gu={reset(){for(let e=0;e<hu.length;e++)hu[e]()},onReset(e){hu.push(e)}},_u=e=>{if(e.indexOf(` `)!==-1)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=9&&n<=13)return!1}return!0},vu=1024,yu=256,bu=1e3,xu=e=>typeof e==`string`?e:e==null?``:ks(e),Su=(e,t,n)=>e?t?n?`${e} ${t} ${n}`:`${e} ${t}`:n?`${e} ${n}`:e:t?n?`${t} ${n}`:t:n,Cu=((e,t,n)=>{let{mergeString:r,mergeUncached:i,seenBefore:a}=e,o=n>0,s=new Map,c=new Map,l=0,u=(e,t)=>{if(t===0)return``;let n=e[0];if(t===1)return _u(n)?n:o&&a(n)?r(n):i(n);if(!o){let r=n;for(let n=1;n<t;n++)r+=` ${e[n]}`;return i(r)}let u=s.get(n);if(u===void 0&&(u=c.get(n),u!==void 0&&s.set(n,u)),u!==void 0)e:for(let n=0;n<u.length;n++){let r=u[n],i=r.a;if(i.length===t){for(let n=1;n<t;n++)if(e[n]!==i[n])continue e;return r.r}}let d=n;for(let n=1;n<t;n++)d+=` ${e[n]}`;if(!a(d))return i(d);let f=r(d);return u===void 0&&s.set(n,u=[]),u.length>=yu&&u.shift(),u.push({a:e.slice(0,t),r:f}),++l>bu&&(l=0,c=s,s=new Map),f},d=new Map,f=new Map,p=0,m=``,h=``,g=``,_=``;return{engine:e,cn:t,adapter:{parts:u,override:(e,t,n)=>{let s=xu(t),c=xu(n);if(!s&&!c)return e;if(!o)return i(Su(e,s,c));if(e===m&&s===h&&c===g)return _;let l=s?c?`${s}\0${c}`:s:c,u=d.get(e);u===void 0&&(u=f.get(e),u!==void 0&&d.set(e,u));let v=u===void 0?void 0:u.get(l);if(v===void 0){let t=Su(e,s,c);if(!a(t))return i(t);v=r(t),u===void 0&&d.set(e,u=new Map),u.set(l,v),++p>vu&&(p=0,f=d,d=new Map)}return m=e,h=s,g=c,_=v,v}},reset(){s=new Map,c=new Map,l=0,d=new Map,f=new Map,p=0,m=``,h=``,g=``,_=``}}})(fu,pu,du);gu.onReset(()=>{Cu.reset()});var wu=e=>{let t=e.twMergeConfig;return t!=null&&!Rs(t)},Tu=()=>TypeError("[tailwind-variants] `twMergeConfig` is only supported by the `tailwind-variants/config` entry. Import `tv`, `createTV`, or `cnMerge` from there, or inject a merge function with `twMerge`."),Eu=(e,t)=>{if(t===0)return``;let n=e[0];for(let r=1;r<t;r++)n+=` ${e[r]}`;return n},Du={parts:Eu,override:(e,t,n)=>Is(e,t,n)},Ou=e=>{let t=t=>t?e(t):``;return{parts:(e,n)=>t(Eu(e,n)),override:(e,n,r)=>t(Is(e,n,r))}},ku=e=>e.twMerge===!1?Du:typeof e.twMerge==`function`?Ou(e.twMerge):wu(e)?null:Cu.adapter,Au=vl(e=>{let t=ku(e);if(t===null)throw Tu();return t},mu),ju=Au.tv;Au.createTV;var Mu=48,Nu=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Mu-t;return n},Pu=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Fu=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Mu;n+=i>>>1^-(i&1),t[r]=n}return t},Iu=384,Lu=[],Ru=Pu(Nu(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),zu=Pu(Nu(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),Bu=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,Vu=(()=>{let e=Ru.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=Ru[n];i<Ru[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(Ru[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=Ru[i];a<Ru[i+1];a++)n[r++]=e,e+=t[e]}return n})(),Hu=Nu(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),Uu=Pu(Nu(`123333359346463635126536711576`)),Wu=Nu(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),Gu=Nu(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),Ku=Fu(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),qu=(()=>{let e=new Int32Array(319).fill(-1),t=Fu(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=Fu(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),Ju=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),Yu=Fu(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),Xu=Fu(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),Zu=Fu(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±`),Qu=new Int32Array(987),$u=new Int32Array(987),ed=new Int32Array(987),td=``,nd=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<Yu.length;r++)for(let i of Ju[Zu[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),nd[a*2]=td.length,nd[a*2+1]=i.length,td+=i),Qu[n]=Yu[r],$u[n]=Xu[r],ed[n]=a,n++}}var rd=Fu(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),id=Pu(Nu(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),ad=Fu(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),od=Nu(`ij`),sd=Nu(`—`),cd=Nu(`1`),ld={GROUP_COUNT:Iu,customValidatorNames:Lu,edgeStart:Ru,labelStart:zu,labelText:Bu,edgeTarget:Vu,nodeGroup:Hu,nodeVlist:qu,vlistPat:Uu,vlistOps:Wu,vlistRef:Gu,vlistGroup:Ku,litAnchor:Qu,litGroup:$u,litPool:ed,poolOffsets:nd,poolText:td,adjGid:rd,adjStart:id,adjTgt:ad,patGid:od,patTgt:sd,postfixLookupGroups:cd,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},ud=`line`in Error(),dd=-1,fd=-1,pd=(e,t,n)=>{let r=0x811c9dc5;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},md=(e,t,n)=>{let r=n-t,i=Math.imul(r,0x9e3779b1)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),0x85ebca6b),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),0xc2b2ae35),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},hd=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:T}=e,E=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)E[y[e]]=e;let te=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>te&&(te=t)}let ne=32;for(;ne<2*(1+te+S.length);)ne<<=1;let re=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)re[e+1]=re[e]+u[f[e]+1]-u[f[e]];let ie=new Uint8Array(r);for(let e=0;e<w.length;e++)ie[w[e]]=1;let ae=i.length-1,oe=new Uint8Array(ae),se=0,ce=!0;for(let e=0;e<m.length;e++){oe[m[e]]=1;let t=_[g[e]*2+1];t>se&&(se=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ce=!1)}let le=1;for(;le<m.length*2;)le<<=1;let ue=new Int32Array(le).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(pd(v,t,t+_[g[e]*2+1])^Math.imul(m[e],0x9e3779b1)|0)&le-1;for(;ue[n]!==-1;)n=n+1&le-1;ue[n]=e}let de=(e,t,n,r)=>{let i=(pd(t,n,r)^Math.imul(e,0x9e3779b1)|0)&le-1,a=r-n;for(;;){let r=ue[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&le-1}},fe=n.cacheSize??8192,pe=n.prefix??e.prefix??``,me=pe===``?``:pe+`:`,he=me.length,ge=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),_e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,be=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=0,Se=-1,Ce=-1,we=-1,Te=-1,Ee=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,D=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(xe=0,Se=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)xe=1;else if(r===40&&i===41)xe=2;else return;we=t+1,Te=n-1;let a=t+1;if(Ee(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!Ee(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(Se=t+1,Ce=a,we=a+1)}},O=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Oe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k=e=>!!e&&!Number.isNaN(Number(e)),A=(e,t,n)=>{if(n-t<11||!O(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&O(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&O(e,t+10,t+18,`-normal/`)},Ae=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],je=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Me=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Ne=(e,t,n,r)=>{if(e>=10){if(e>=25)return ge[e-25](t.slice(n,r));let i=e-10;if(xe!==Ae[i])return!1;if(Se>=0){for(let e of je[i])if(O(t,Se,Ce,e))return!0;return!1}switch(Me[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(we,Te);return _e.test(e)&&!ve.test(e)}case 3:return k(t.slice(we,Te));case 4:return be.test(t.slice(we,Te));default:return ye.test(t.slice(we,Te))}}switch(e){case 0:return!0;case 1:return xe===0;case 2:return xe===1;case 3:return xe===2;case 4:return Oe.test(t.slice(n,r));case 5:return k(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&k(t.slice(n,r-1));case 8:return ke.test(t.slice(n,r));default:return A(t,n,r)}},Pe=new Set(typeof T==`string`?T.split(` `):T),Fe=(e,t,n,r,i,a)=>{let o=pd(t,n,r)^(i?0x9e3779b9:0),s=e.get(o);if(s!==void 0)e:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue e;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Ie=new Map,Le=new Map,Re=2,ze=4096,Be=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Pe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Le.get(s);return c===void 0&&Le.set(s,c=Re++),c},Ve=new Map,He=r,Ue=r+4096,We=()=>He++,Ge=2097152,Ke=8192,qe=new Int32Array(Ke),Je=Array(Ke).fill(null),Ye=new Int32Array(Ke),Xe=new Int32Array(Ke),Ze=new Uint8Array(Ke),Qe=0,$e=(e,t,n,r,i,a,o,s)=>{let c=e;if(Je[e]!==null){if(Je[e|1]===null)c=e|1;else if(!(Qe++&3))c=e|Qe>>2&1;else return}Je[c]=t.slice(n,r),qe[c]=i,Ye[c]=a,Xe[c]=o,Ze[c]=s},et=()=>Je.fill(null),tt=256,nt=[new Int32Array(tt),new Int32Array(tt),new Int32Array(tt),new Int32Array(tt)],[rt,it,at,ot]=nt,st=new Uint8Array(tt),ct=new Uint8Array(tt),j=()=>{tt*=2,nt=nt.map(e=>{let t=new Int32Array(tt);return t.set(e),t}),[rt,it,at,ot]=nt;let e=new Uint8Array(tt);e.set(st),st=e,ct=new Uint8Array(tt)},M=64,lt=new Int32Array(M),ut=new Int32Array(M),dt=new Int32Array(r),ft=2048,pt=21,mt=new Float64Array(ft),ht=new Int32Array(ft),gt=0,_t=(e,t)=>{if(e===0&&t<r)return dt[t]===gt?1:(dt[t]=gt,0);let n=e*2097152+t+1,i=Math.imul(n,0x9e3779b1)>>>pt;for(;ht[i]===gt;){if(mt[i]===n)return 1;i=i+1&ft-1}return mt[i]=n,ht[i]=gt,0},vt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?dd:Fe(Ve,e,t+1,r,0,We)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ut[t];if(r>n)continue;let i=lt[t],a=n-r;if(oe[i]===1&&a>0&&a<=se){let t=e.charCodeAt(r);if(ce===!1||t!==91&&t!==40){let t=de(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;De(e,r,n);let h=re[o]-c;for(let t=c;t<m;t++)if(Ne(d[t],e,r,n))return p[h+t]}return dd},yt=e=>{let t=e.length,n=0,c=0,u=!1;(Re>ze||Ie.size>ze)&&(Ie=new Map,Le=new Map,Re=2,et()),He>Ue&&(Ve=new Map,He=r,et());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&D(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&D(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===tt&&j();let _=n++;rt[_]=p,it[_]=h,c+=g,m^=Math.imul(g,0x9e3779b1);let v=m^m>>>15,y=v&8190;{let t=-1;if(qe[y]===v&&Je[y]!==null&&Je[y].length===g?t=y:qe[y|1]===v&&Je[y|1]!==null&&Je[y|1].length===g&&(t=y|1),t>=0){let n=Je[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){at[_]=Ye[t],ot[_]=Xe[t],st[_]=Ze[t];continue}}}let b=p;if(he!==0){if(h-p<=he||!e.startsWith(me,p)){at[_]=dd,$e(y,e,p,h,v,dd,0,0);continue}b=p+he}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,T=ee,E=h,te=!1,ne=0;E>T&&e.charCodeAt(E-1)===33?(te=!0,E--):E>T&&e.charCodeAt(T)===33&&(te=!0,T++,ne=1);let re=-1;w>ee&&(re=w+ne,re>=E&&(re=-1));let ae=T;E-T>1&&e.charCodeAt(T)===45&&(ae=T+1);let se=0,ce=0,le=0,ue=-1,de=0;(l[0]>=0||oe[0]===1)&&(lt[0]=0,ut[0]=ae,de=1);let fe=fd,pe=0;for(let t=ae;t<E;t++)if(t===re&&(fe=ce<le?fd:se,pe=de),se!==fd){let n=e.charCodeAt(t),r=-1;if(ce<le)o.charCodeAt(ce)===n?(ce++,ce===le&&(r=se=ue)):se=fd;else{let e=i[se],t=i[se+1],c=fd;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ce=e+1,le=a[i+1],ue=s[i],c=se);break}}se=c}if(r>=0&&(l[r]>=0||oe[r]===1)&&t+1<E&&e.charCodeAt(t+1)===45){if(de===M){M*=2;let e=new Int32Array(M);e.set(lt),lt=e;let t=new Int32Array(M);t.set(ut),ut=t}lt[de]=r,ut[de]=t+2,de++}}re===E&&(fe=ce<le?fd:se,pe=de);let ge=ce<le?fd:se,_e,ve=!1;if(re>=0){if(ve=!0,_e=vt(e,T,re,fe,pe),_e!==dd&&_e<r&&ie[_e]){let t=vt(e,T,E,ge,de);t!==dd&&t!==_e&&(_e=t,ve=!1)}else _e===dd&&(_e=vt(e,T,E,ge,de),ve=!1)}else _e=vt(e,T,E,ge,de);let ye=0,be=0;_e===dd?at[_]=dd:(be=+!!ve,ye=b>=C?+!!te:Fe(Ie,e,b,C,+!!te,e=>Be(e,te)),at[_]=_e,st[_]=be,ot[_]=ye),$e(y,e,p,h,v,_e,ye,be)}if(n===0)return``;if(n===1)return rt[0]===0&&it[0]===t?e:e.slice(rt[0],it[0]);if(n*ne>ft){for(;n*ne>ft;)ft<<=1,pt--;mt=new Float64Array(ft),ht=new Int32Array(ft)}if(Re>=Ge||He>=Ge)throw Error(`cn: too many distinct classes in one merge`);gt=gt+1|0,gt===0&&(dt.fill(0),ht.fill(0),gt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=at[e];if(t===dd){ct[e]=1;continue}let n=ot[e];if(_t(n,t)===1)ct[e]=0,f=!0;else if(ct[e]=1,t<r){let r=E[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)_t(n,x[e]);if(st[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&_t(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!ct[m]){m++;continue}let t=rt[m],r=it[m],i=m+1;for(;i<n&&ct[i]&&rt[i]===r+1&&e.charCodeAt(r)===32;)r=it[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},bt=16384,xt=new Int32Array(bt*2),N=0,St=1,Ct=Object.create(null),wt=Object.create(null),Tt=new Map,Et=new Map,Dt=0,Ot=0,kt=()=>{N^=bt,St=St+1|0,Ot=0},At=e=>{let t=Ct[e];if(t!==void 0)return t;let n=md(e,0,e.length),r=(n&16383)+N,i=xt[r]===(n^St)||xt[r^bt]===(n^St-1);return i&&(t=wt[e],t!==void 0)?(Ct[e]=t,t):(t=yt(e),i?(Ct[e]=t,++Dt>fe&&(Dt=0,wt=Ct,Ct=Object.create(null),kt())):(xt[r]=n^St,++Ot>bt&&kt()),t)},P=e=>{let t=Tt.get(e);if(t!==void 0)return t;let n=md(e,0,e.length),r=(n&16383)+N,i=xt[r]===(n^St)||xt[r^bt]===(n^St-1);return i&&(t=Et.get(e),t!==void 0)?(Tt.set(e,t),t):(t=yt(e),i?(Tt.set(e,t),++Dt>fe&&(Dt=0,Et=Tt,Tt=new Map,kt())):(xt[r]=n^St,++Ot>bt&&kt()),t)},jt=e=>{let t=md(e,0,e.length),n=(t&16383)+N;return xt[n]===(t^St)||xt[n^bt]===(t^St-1)||(xt[n]=t^St,++Ot>bt&&kt(),!1)},Mt=fe===0?yt:ud?e=>{let t=Tt.get(e);return t===void 0?P(e):t}:At;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Mt(arguments[0]):Mt(vd.apply(null,arguments))},mergeString:Mt,seenBefore:fe===0?()=>!1:jt,mergeUncached:yt}},gd=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:gd(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},_d=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:gd(i,t);a&&(n&&(n+=` `),n+=a)}return n},vd=function(){return _d(arguments,!1)},yd=256,bd=16,xd=1024,Sd=4096,Cd=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Sd).fill(``),l=Array(Sd).fill(``),u=Array(Sd).fill(``));let i=md(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=gd(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;e:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue e}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>bd&&(_.miss=bd,_.skip=xd,_.e.length=0,_.at=0);let u=_.e;u.length<yd?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(gd(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},wd=hd(ld),Td=Cd(wd.mergeString,wd);wd.merge;var Ed=ju({base:`h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none`,variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}}),Dd=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`href`,`class`,`variant`,`children`]);function Od(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`variant`,3,`default`),i=Z(t,Dd);var a=G();fo(R(a),()=>t.href?`a`:`span`,!1,(e,a)=>{Ko(e,e=>n(e),()=>n()),Lo(e,e=>({"data-slot":`badge`,href:t.href,class:e,...i}),[()=>Td(Ed({variant:r()}),t.class)]);var o=G();Y(R(o),()=>t.children??f),K(a,o)}),K(e,a),M()}var kd=ju({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,lg:`h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}}),Ad=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]),jd=U(`<a><!></a>`),Md=U(`<button><!></button>`);function Nd(e,t){j(t,!0);let n=Q(t,`variant`,3,`default`),r=Q(t,`size`,3,`default`),i=Q(t,`ref`,15,null),a=Q(t,`href`,3,void 0),o=Q(t,`type`,3,`button`),s=Z(t,Ad);var c=G(),l=R(c),u=e=>{var o=jd();Lo(o,e=>({"data-slot":`button`,class:e,href:t.disabled?void 0:a(),"aria-disabled":t.disabled,role:t.disabled?`link`:void 0,tabindex:t.disabled?-1:void 0,...s}),[()=>Td(kd({variant:n(),size:r()}),t.class)]),Y(L(o),()=>t.children??f),k(o),Ko(o,e=>i(e),()=>i()),K(e,o)},d=e=>{var a=Md();Lo(a,e=>({"data-slot":`button`,class:e,type:o(),disabled:t.disabled,...s}),[()=>Td(kd({variant:n(),size:r()}),t.class)]),Y(L(a),()=>t.children??f),k(a),Ko(a,e=>i(e),()=>i()),K(e,a)};J(l,e=>{a()?e(u):e(d,-1)}),K(e,c),M()}var Pd=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),Fd=U(`<input/>`);function Id(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`value`,15),i=Q(t,`files`,15),a=Q(t,`data-slot`,3,`input`),o=Z(t,Pd);var s=G(),c=R(s),l=e=>{var s=Fd();Lo(s,e=>({"data-slot":a(),class:e,type:`file`,...o}),[()=>Td(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),Ko(s,e=>n(e),()=>n()),Wo(s,i),Vo(s,r),K(e,s)},u=e=>{var i=Fd();Lo(i,e=>({"data-slot":a(),class:e,type:t.type,...o}),[()=>Td(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),Ko(i,e=>n(e),()=>n()),Vo(i,r),K(e,i)};J(c,e=>{t.type===`file`?e(l):e(u,-1)}),K(e,s),M()}function Ld(e){return typeof e==`function`}function Rd(e){return typeof e==`object`&&!!e}var zd=[`string`,`number`,`bigint`,`boolean`];function Bd(e){return e==null||zd.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Bd(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var Vd=Symbol(`box`),Hd=Symbol(`is-writable`);function $(e,t){let n=N(e);return t?{[Vd]:!0,[Hd]:!0,get current(){return H(n)},set current(e){t(e)}}:{[Vd]:!0,get current(){return e()}}}function Ud(e){return Rd(e)&&Vd in e}function Wd(e){return Ud(e)&&Hd in e}function Gd(e){return Ud(e)?e:Ld(e)?$(e):Kd(e)}function Kd(e){let t=F(xn(e));return{[Vd]:!0,[Hd]:!0,get current(){return H(t)},set current(e){I(t,e,!0)}}}function qd(e){let t=F(xn(e));return{[Vd]:!0,[Hd]:!0,get current(){return H(t)},set current(e){I(t,e,!0)}}}qd.from=Gd,qd.with=$,qd.flatten=function(e){return Object.entries(e).reduce((e,[t,n])=>Ud(n)?(Wd(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})},qd.readonly=function(e){return Wd(e)?{[Vd]:!0,get current(){return e.current}}:e},qd.isBox=Ud,qd.isWritableBox=Wd;function Jd(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Yd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Xd=/\n/g,Zd=/^\s*/,Qd=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$d=/^:\s*/,ef=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tf=/^[;\s]*/,nf=/^\s+|\s+$/g,rf=`
3
+ `,af=`/`,of=`*`,sf=``,cf=`comment`,lf=`declaration`;function uf(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Xd);t&&(n+=t.length);var i=e.lastIndexOf(rf);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Zd)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(af==e.charAt(0)&&of==e.charAt(1)){for(var n=2;sf!=e.charAt(n)&&(of!=e.charAt(n)||af!=e.charAt(n+1));)++n;if(n+=2,sf===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:cf,comment:o})}}function f(){var e=a(),t=c(Qd);if(t){if(d(),!c($d))return s(`property missing ':'`);var n=c(ef),r=e({type:lf,property:df(t[0].replace(Yd,sf)),value:n?df(n[0].replace(Yd,sf)):sf});return c(tf),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function df(e){return e?e.replace(nf,sf):sf}function ff(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=uf(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var pf=/\d/,mf=[`-`,`_`,`/`,`.`];function hf(e=``){if(!pf.test(e))return e!==e.toLowerCase()}function gf(e){let t=[],n=``,r,i;for(let a of e){let e=mf.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=hf(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function _f(e){return e?gf(e).map(e=>yf(e)).join(``):``}function vf(e){return bf(_f(e||``))}function yf(e){return e?e[0].toUpperCase()+e.slice(1):``}function bf(e){return e?e[0].toLowerCase()+e.slice(1):``}var xf=1e3,Sf=new Map;function Cf(e){let t=Sf.get(e);return t===void 0&&(t=e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)?_f(e):e.startsWith(`--`)?e:vf(e),Sf.size>=xf&&Sf.clear(),Sf.set(e,t)),t}var wf=/["'\\{}]|\/\*/,Tf=/^[-\w]+$/;function Ef(e){if(wf.test(e))return null;let t=[],n=0,r=0,i=-1;for(let a=0;a<=e.length;a++){let o=a<e.length?e.charCodeAt(a):59;if(o===40)n++;else if(o===41){if(--n<0)return null}else if(o===58)i<0&&(i=a);else if(o===59){if(n!==0)return null;let o=e.slice(r,a);if(i<0){if(o.trim()||t.length===0)return null}else{let n=e.slice(r,i).trim(),o=e.slice(i+1,a).trim();if(!Tf.test(n)||!o)return null;t.push(n,o)}r=a+1,i=-1}}return t}function Df(e,t){let n=Ef(t);if(n)for(let t=0;t<n.length;t+=2)e[Cf(n[t])]=n[t+1];else ff(t,(t,n)=>{e[Cf(t)]=n})}function Of(e){if(!e)return{};let t={};return Df(t,e),t}function kf(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Af(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var jf=Af(/[A-Z]/,e=>`-${e.toLowerCase()}`),Mf=new Map;function Nf(e){let t=Mf.get(e);return t===void 0&&(t=jf(e),Mf.size>=1e3&&Mf.clear(),Mf.set(e,t)),t}function Pf(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);let t=``;for(let n of Object.keys(e)){let r=e[n];r!=null&&r!==``&&(t+=`${t?`
4
+ `:``}${Nf(n)}: ${r};`)}return t}function Ff(e={}){return Pf(e).replace(`
5
+ `,` `)}var If=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function Lf(e){return If.has(e)}function Rf(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&o&&Lf(e))t[e]=Jd(n,i);else if(a&&o)t[e]=kf(n,i);else if(e===`class`){let r=Bd(n),a=Bd(i);r&&a?t[e]=Ua(n,i):r?t[e]=Ua(n):a&&(t[e]=Ua(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Of(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Of(n),...i};else if(o&&s){let r=Of(n),a=Of(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=Ff(t.style).replaceAll(`
6
+ `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var zf={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`};Ff(zf);var Bf=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Vf(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Hf=class extends Map{#e=new Map;#t=F(0);#n=F(0);#r=pi||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return pi===this.#r?F(e):dn(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return H(this.#t),!1}return H(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{H(this.#t);return}}return H(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||(pn(this.#t),this.set(e,t(e))),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e);pn(this.#t);var a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),mn(this.#n,super.size),bn(o);else if(i!==t){bn(r);var s=o.reactions===null?null:new Set(o.reactions);s!==null&&r.reactions?.every(e=>s.has(e))||bn(o)}return a}delete(e){var t=this.#e,n=t.get(e);pn(this.#t);var r=super.delete(e);return n!==void 0&&(t.delete(e),mn(n,-1)),r&&(mn(this.#n,super.size),bn(this.#t)),r}clear(){if(pn(this.#t),super.size!==0){super.clear();var e=this.#e;mn(this.#n,0);for(var t of e.values())mn(t,-1);bn(this.#t),e.clear()}}#a(){H(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)H(n)}keys(){return H(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return H(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=Bf,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=Aa(e=>{let n=ha(t,`focusin`,e),r=ha(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Vf(this.#e):null}};function Uf(e){return typeof e==`function`}var Wf=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return st(this.#t)}get(){let e=at(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=at(this.#t);return t===void 0?e:t}set(e){return ot(this.#t,e)}};function Gf(e,t){switch(e){case`post`:Sr(t);break;case`pre`:wr(t)}}function Kf(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;Gf(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Xi(()=>n(t,o));return o=t,r})}function qf(e,t,n){Kf(e,`post`,t,n)}qf.pre=function(e,t,n){Kf(e,`pre`,t,n)};function Jf(e){return Uf(e)?e():e}var Yf=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=N(()=>(H(this.#s)?.(),this.getSize().width));#o=N(()=>(H(this.#s)?.(),this.getSize().height));#s=N(()=>{let e=Jf(this.#r);if(e)return Aa(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??Bf,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=Jf(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return H(this.#s)?.(),this.getSize()}get width(){return H(this.#a)}get height(){return H(this.#o)}},Xf=class{#e=()=>void 0;#t=N(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return H(this.#t)}};function Zf(e){Sr(()=>()=>{e()})}function Qf(e){Sr(()=>Xi(()=>e()))}function $f(e){Gi().then(e)}var ep=1,tp=9,np=11;function rp(e){return Rd(e)&&e.nodeType===ep&&typeof e.nodeName==`string`}function ip(e){return Rd(e)&&e.nodeType===tp}function ap(e){return Rd(e)&&e.constructor?.name===`VisualViewport`}function op(e){return Rd(e)&&e.nodeType!==void 0}function sp(e){return op(e)&&e.nodeType===np&&`host`in e}function cp(e,t){if(!e||!t||!rp(e)||!rp(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&sp(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function lp(e){return ip(e)?e:ap(e)?e.document:e?.ownerDocument??document}function up(e){return sp(e)?up(e.host):ip(e)?e.defaultView??window:rp(e)?e.ownerDocument?.defaultView??window:window}function dp(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var fp=class{element;#e=N(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return H(this.#e)}set root(e){I(this.#e,e)}constructor(e){this.element=typeof e==`function`?$(e):e}getDocument=()=>lp(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>dp(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function pp(e,t){return{[$i()]:n=>Ud(e)?(e.current=n,Xi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Xi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function mp(e){return e?`true`:`false`}function hp(e){return e?`true`:void 0}function gp(e){return e?``:void 0}function _p(e){return e?!0:void 0}function vp(e){return e?`open`:`closed`}function yp(e){return e?`checked`:`unchecked`}function bp(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}function xp(e,t){return t?`mixed`:e?`true`:`false`}var Sp=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Cp(e){let t=new Sp(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var wp=`ArrowDown`,Tp=`ArrowLeft`,Ep=`ArrowRight`,Dp=`ArrowUp`,Op=`Home`,kp=`PageDown`,Ap=`PageUp`;function jp(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var Mp=[wp,Ap,Op],Np=[Dp,kp,`End`];[...Mp,...Np];function Pp(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Tp:Ep,vertical:wp}[t]}function Fp(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Ep:Tp,vertical:Dp}[t]}function Ip(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Pp(e,t),prevKey:Fp(e,t)}}var Lp=typeof document<`u`,Rp=zp();function zp(){return Lp&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Bp(e){return e instanceof HTMLElement}function Vp(e){return e instanceof Element||e instanceof SVGElement}function Hp(e){return e?.matches(`:disabled`)??!1}function Up(e){return e!==null}function Wp(e){if(typeof CSS<`u`&&typeof CSS.escape==`function`)return CSS.escape(e);let t=e.length,n=-1,r,i=``,a=e.charCodeAt(0);if(t===1&&a===45)return`\\`+e;for(;++n<t;)r=e.charCodeAt(n),i+=r===0?`�`:r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&a===45?`\\`+r.toString(16)+` `:r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122?e.charAt(n):`\\`+e.charAt(n);return i}var Gp=class{#e;#t=qd(null);constructor(e){this.#e=e}getCandidateNodes(){if(!this.#e.rootNode.current)return[];if(this.#e.candidateSelector){let e=Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector));return this.#n(this.#e.rootNode.current,e)}if(this.#e.candidateAttr){let e=Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`));return this.#n(this.#e.rootNode.current,e)}return[]}#n(e,t){let n=this.#e.rootAttr;if(!n)return t;let r=`[${n}]`;return t.filter(t=>t.closest(r)===e)}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Ip(jp(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Op]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Ep:wp,t=s===`ArrowUp`?Tp:Dp;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${Wp(e)}`);t&&Bp(t)&&t.focus()}},Kp=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,Zf(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#r,n=()=>{t===this.#r&&this.#a(e)},r=()=>{if(t!==this.#r)return;let i=this.#e.ref.current;if(!i)return;if(typeof i.getAnimations!=`function`){this.#a(e);return}let a=i.getAnimations();a.length===0?n():Promise.all(a.map(e=>e.finished)).then(()=>{n()}).catch(()=>{t===this.#r&&(i.getAnimations().some(e=>e.pending||e.playState!==`finished`)?r():n())})},i=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,r()})};this.#e.afterTick.current?this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`,n=this.#e.ref.current;n&&(n.hasAttribute(e)?(this.#n=new MutationObserver(()=>{t===this.#r&&(n.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,i()))}),this.#n.observe(n,{attributes:!0,attributeFilter:[e]})):i())}):i()}#a(e){let t=this.#r,n=()=>{t===this.#r&&e()};this.#e.afterTick.current?$f(n):n()}},qp=class{#e;#t;#n;#r=F(!1);#i=F(void 0);#a=!1;#o=null;constructor(e){this.#e=e,I(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new Kp({ref:this.#e.ref,afterTick:this.#e.open}),Zf(()=>this.#s()),qf(()=>this.#e.open.current,e=>{!this.#a&&(this.#a=!0,e===H(this.#r))||(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()?(I(this.#r,!1),I(this.#i,void 0),this.#e.onComplete?.()):(e&&I(this.#r,!0),I(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&I(this.#i,void 0)})),this.#t?this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||I(this.#r,!1),I(this.#i,void 0),this.#e.onComplete?.())}):(e||I(this.#r,!1),I(this.#i,void 0),this.#e.onComplete?.())))})}get shouldRender(){return H(this.#r)}get transitionStatus(){return H(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Jp(){}function Yp(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function Xp(e,t){var n=G();Va(R(n),()=>t.children,e=>{var n=G();Y(R(n),()=>t.children??f),K(e,n)}),K(e,n)}var Zp=new Wf(`BitsConfig`);function Qp(){let e=new $p(null,{});return Zp.getOr(e).opts}var $p=class{opts;constructor(e,t){let n=em(e,t);this.opts={dir:n(e=>e.dir),defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function em(e,t){return n=>$(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function tm(e,t){return n=>{let r=Qp();return $(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var nm=tm(e=>e.defaultPortalTo,`body`),rm=tm(e=>e.dir,`ltr`);function im(e,t){j(t,!0);let n=nm(()=>t.to),r=ct(),i=N(a);function a(){if(!Lp||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&=(Ra(o),null)}qf([()=>H(i),()=>t.disabled],([e,n])=>{if(!e||n)s();else return o=Pa(Xp,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=G(),l=R(c),u=e=>{var n=G();Y(R(n),()=>t.children??f),K(e,n)};J(l,e=>{t.disabled&&e(u)}),K(e,c),M()}var am=new WeakMap;function om(e,t=e.composedPath()){am.set(e,t)}function sm(e){return am.get(e)??e.composedPath()}function cm(e,t){return t?Vp(e.target)&&t.contains(e.target)||sm(e).includes(t):!1}function lm(e,t){for(let n of sm(e))if(Vp(n)&&n.matches(t))return n;return Vp(e.target)?e.target.closest(t):null}function um(e,t){om(t,sm(e))}function dm(e,t=500){let n=null,r=null,i=(...e)=>{i.destroy(),r=e,n=setTimeout(i.flush,t)};return i.flush=()=>{if(r===null)return;let t=r;i.destroy(),e(...t)},i.destroy=()=>{n!==null&&(clearTimeout(n),n=null),r=null},i}function fm(e,t){return e===t||e.contains(t)}function pm(e){return e?.ownerDocument??document}function mm(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var hm=`data-context-menu-trigger`,gm=`data-context-menu-content`;globalThis.bitsDismissableLayers??=new Map;var _m=class e{static create(t){return new e(t)}opts;#e=Jp;#t=()=>!1;#n=null;#r=Kd(`close`);#i={pointerdown:!1};#a=!1;#o=null;#s=!1;#c=void 0;#l=Jp;#u=Jp;#d=!1;constructor(e){this.opts=e,wr(()=>{this.#r.current=e.interactOutsideBehavior.current,this.#e=e.onInteractOutside.current,this.#l=e.onFocusOutside.current,this.#t=e.isValidEvent.current,this.#n=e.ref.current});let t=Jp,n=null,r=()=>{n=null,this.#x(),globalThis.bitsDismissableLayers.delete(this),this.#g.destroy(),this.#u(),t()};qf([()=>this.opts.enabled.current,()=>this.opts.ref.current],([e,i])=>{let a=e?i:null;n!==a&&(r(),a&&(n=a,this.#c=pm(a),globalThis.bitsDismissableLayers.set(this,this.#r),t=this.#p()))}),Zf(()=>{this.#d=!0,r()})}#f=e=>{e.defaultPrevented||this.#d||!this.#n||$f(()=>{this.#d||this.#n&&!this.#b(e.target)&&e.target&&!this.#s&&this.#l?.(e)})};#p(){let e=this.#c,t=e=>{Xi(()=>{this.#g.flush(),this.#_(e),this.#y(e)})},n=e=>{e.cancelBubble||e!==this.#o||(this.#v(e),e.pointerType===`touch`?(this.#g.destroy(),this.#h(e)):this.#g(e))};return e.addEventListener(`pointerdown`,t,!0),e.addEventListener(`pointerdown`,n),kf(()=>e.removeEventListener(`pointerdown`,t,!0),()=>e.removeEventListener(`pointerdown`,n),ha(e,`focusin`,this.#f))}#m=e=>{let t=e;t.defaultPrevented&&(t=xm(e)),this.#e(e)};#h=e=>{if(!this.#n){this.#u();return}let t=this.#t(e,this.#n)||bm(e,this.#n);if(!this.#a||this.#S()||!t){this.#u();return}let n=e;if(n.defaultPrevented&&(n=xm(n)),this.#r.current!==`close`&&this.#r.current!==`defer-otherwise-close`)this.#u();else if(e.pointerType===`touch`){this.#u();let e=null,t=Jp,n=e=>{t(),this.#m(e)};t=kf(ha(this.#c,`click`,n,{once:!0}),ha(this.#c,`click`,t=>{om(t),e=setTimeout(()=>n(t),0)},{once:!0,capture:!0}),()=>{e!==null&&clearTimeout(e),e=null}),this.#u=t}else this.#e(n)};#g=dm(this.#h,10);#_=e=>{this.#i[e.type]=!0};#v=e=>{this.#i[e.type]=!1};#y=e=>{this.#o=e,om(e),this.#n&&(this.#a=ym(this))};#b=e=>this.#n?fm(this.#n,e):!1;#x=()=>{for(let e in this.#i)this.#i[e]=!1;this.#a=!1,this.#o=null};#S(){return Object.values(this.#i).some(Boolean)}#C=()=>{this.#s=!0};#w=()=>{this.#s=!1};props={onfocuscapture:this.#C,onblurcapture:this.#w}};function vm(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function ym(e){let t=[...globalThis.bitsDismissableLayers],n=vm(t);if(n)return n[0]===e;let[r]=t[0];return r===e}function bm(e,t){let n=e.target;if(!Vp(n))return!1;let r=!!lm(e,`[${hm}]`),i=!!t.closest(`[${gm}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:pm(n).documentElement.contains(n)&&!cm(e,t)&&mm(e,t)}function xm(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1,a=new Proxy(r,{get:(r,a)=>{if(a===`currentTarget`)return t;if(a===`target`)return n;if(a===`preventDefault`)return()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()};if(a===`defaultPrevented`)return i;if(a in r){let e=r[a];return typeof e==`function`?e.bind(r):e}let o=e[a];return typeof o==`function`?o.bind(e):o}});return um(e,a),a}function Sm(e,t){j(t,!0);let n=Q(t,`interactOutsideBehavior`,3,`close`),r=Q(t,`onInteractOutside`,3,Jp),i=Q(t,`onFocusOutside`,3,Jp),a=Q(t,`isValidEvent`,3,()=>!1),o=_m.create({id:$(()=>t.id),interactOutsideBehavior:$(()=>n()),onInteractOutside:$(()=>r()),enabled:$(()=>t.enabled),onFocusOutside:$(()=>i()),isValidEvent:$(()=>a()),ref:Xi(()=>t.ref)});var s=G();Y(R(s),()=>t.children??f,()=>({props:o.props})),K(e,s),M()}globalThis.bitsEscapeLayers??=new Map;var Cm=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new fp(this.opts.ref);let t=Jp;qf(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>ha(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!wm(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}};function wm(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Tm(e,t){j(t,!0);let n=Q(t,`escapeKeydownBehavior`,3,`close`),r=Q(t,`onEscapeKeydown`,3,Jp);Cm.create({escapeKeydownBehavior:$(()=>n()),onEscapeKeydown:$(()=>r()),enabled:$(()=>t.enabled),ref:Xi(()=>t.ref)});var i=G();Y(R(i),()=>t.children??f),K(e,i),M()}var Em=class e{static instance;#e=Kd([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=dp(document);n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e),e.resume()}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},Dm=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],Om=Dm.join(`,`),km=typeof Element>`u`,Am=km?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jm=!km&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},Mm=function(e,t){t===void 0&&(t=!0);var n=e==null||e.getAttribute==null?void 0:e.getAttribute(`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Mm(e.parentNode))},Nm=function(e){var t,n=e==null||e.getAttribute==null||(t=e.getAttribute(`contenteditable`))==null?void 0:t.toLowerCase();return n===``||n===`true`||n===`plaintext-only`},Pm=function(e,t,n){if(Mm(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Om));return t&&Am.call(e,Om)&&r.unshift(e),r=r.filter(n),r},Fm=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Mm(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Fm(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Am.call(a,Om)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Mm(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Fm(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},Im=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Lm=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Nm(e))&&!Im(e)?0:e.tabIndex},Rm=function(e,t){var n=Lm(e);return n<0&&t&&!Im(e)?0:n},zm=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Bm=function(e){return e.tagName===`INPUT`},Vm=function(e){return Bm(e)&&e.type===`hidden`},Hm=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Um=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Wm=function(e){if(!e.name)return!0;var t=e.form||jm(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Um(r,e.form);return!i||i===e},Gm=function(e){return Bm(e)&&e.type===`radio`},Km=function(e){return Gm(e)&&!Wm(e)},qm=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Jm=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=Am.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Am.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=jm(e);if(s&&!s.shadowRoot&&r(s)===!0)return qm(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(e.isConnected)return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return qm(e);return!1},Ym=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Am.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Xm=function(e,t){return!(t.disabled||Vm(t)||Jm(t,e)||Hm(t)||Ym(t))},Zm=function(e,t){return!(Km(t)||Lm(t)<0||!Xm(e,t))},Qm=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},$m=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Rm(a,i),s=i?$m(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(zm).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},eh=function(e,t){return t||={},$m(t.getShadowRoot?Fm([e],t.includeContainer,{filter:Zm.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Qm}):Pm(e,t.includeContainer,Zm.bind(null,t)))},th=function(e,t){return t||={},t.getShadowRoot?Fm([e],t.includeContainer,{filter:Xm.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Pm(e,t.includeContainer,Xm.bind(null,t))},nh=Dm.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),rh=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Am.call(e,nh)!==!1&&Xm(t,e)};function ih(e,t){let n=t.getRootNode();for(;e;){let t=e.getRootNode();if(t===n)return e;e=t!==e&&`host`in t?t.host:null}return null}var ah=class e{#e=!1;#t=null;#n=Em.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t!==e&&(this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o())}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t||this.#e||!this.#n.isActiveScope(this)||this.#t.contains(ih(dp(this.#t.ownerDocument),this.#t)))return;let e=this.#u();e?(e.focus({preventScroll:!0}),this.#n.setFocusMemory(this,e)):this.#t.focus({preventScroll:!0})})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(ha(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=ih(t.composedPath()[0],e);if(n!==null&&e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&rh(n))t.preventDefault(),n.focus({preventScroll:!0});else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus({preventScroll:!0})}}},{capture:!0}),ha(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&dp(t)===i?(e.preventDefault(),r.focus()):e.shiftKey&&dp(t)===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus({preventScroll:!0}),this.#n.setFocusMemory(this,r)):e.focus({preventScroll:!0})}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?eh(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?th(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return qf([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),Zf(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function oh(e,t){j(t,!0);let n=Q(t,`enabled`,3,!1),r=Q(t,`trapFocus`,3,!1),i=Q(t,`loop`,3,!1),a=Q(t,`onCloseAutoFocus`,3,Jp),o=Q(t,`onOpenAutoFocus`,3,Jp),s=ah.use({enabled:$(()=>n()),trap:$(()=>r()),loop:Xi(()=>i()),onCloseAutoFocus:$(()=>a()),onOpenAutoFocus:$(()=>o()),ref:Xi(()=>t.ref)});var c=G();Y(R(c),()=>t.focusScope??f,()=>({props:s.props})),K(e,c),M()}var sh=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var ch=class e{static create(t){return new e(t)}opts;domContext;#e=Jp;#t=!1;#n=sh;#r=sh;constructor(e){this.opts=e,this.domContext=new fp(e.ref);let t=Jp;qf(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return kf(ha(this.domContext.getDocument(),`pointerdown`,this.#o),ha(this.domContext.getDocument(),`pointerup`,this.#a))}#a=e=>{this.#s(),e.defaultPrevented||this.#r(e)};#o=e=>{if(!this.#t)return;this.#s();let t=this.opts.ref.current,n=e.target;Bp(t)&&Bp(n)&&fh(this)&&cp(t,n)&&(this.#n(e),e.defaultPrevented||(this.#e=uh(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=Jp}},lh=e=>e.style.userSelect||e.style.webkitUserSelect;function uh(e,t){let n=lh(t),r=lh(e);return dh(t,`none`),dh(e,`text`),()=>{dh(t,n),dh(e,r)}}function dh(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function fh(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function ph(e,t){j(t,!0);let n=Q(t,`preventOverflowTextSelection`,3,!0),r=Q(t,`onPointerDown`,3,Jp),i=Q(t,`onPointerUp`,3,Jp);ch.create({id:$(()=>t.id),onPointerDown:$(()=>r()),onPointerUp:$(()=>i()),enabled:$(()=>t.enabled&&n()),ref:Xi(()=>t.ref)});var a=G();Y(R(a),()=>t.children??f),K(e,a),M()}globalThis.bitsIdCounter??={current:0};function mh(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var hh=class{#e;#t=0;#n=F();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),I(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,H(this.#n)===void 0&&(this.#r=Tr(()=>{I(this.#n,this.#e(...e),!0)})),Sr(()=>()=>{this.#i()}),H(this.#n)}},gh=new Hf,_h=new Map,vh=[`padding-right`,`margin-right`,`overflow`,`overflow-x`,`overflow-y`,`pointer-events`,`--scrollbar-width`],yh=null,bh=!1,xh=new Set,Sh=null,Ch=null,wh=!1;function Th(e,t,n){e.setProperty(t,n),xh.add(t),t===`overflow`&&(xh.add(`overflow-x`),xh.add(`overflow-y`))}var Eh=$(()=>{for(let e of gh.values())if(e)return!0;return!1}),Dh=$(()=>{for(let[e,t]of gh)if(t&&(_h.get(e)?.()??!0))return!0;return!1}),Oh=null,kh=new hh(()=>{function e(e,t){let n=yh?.get(t);n?.value?e.body.style.setProperty(t,n.value,n.priority):e.body.style.removeProperty(t)}function t(t){for(let n of vh)xh.has(n)&&e(t,n);!bh&&t.body.style.length===0&&t.body.removeAttribute(`style`),yh=null,xh.clear(),Rp&&Sh?.()}function n(t){xh.delete(`pointer-events`)&&e(t,`pointer-events`)}function r(){Ch!==null&&(window.clearTimeout(Ch),Ch=null)}function i(e,t){r(),wh=!0,Oh=Date.now();let n=Oh,i=()=>{Ch=null,Oh===n&&(jh(gh)?wh=!1:(wh=!1,t()))},a=e===null?24:e;Ch=window.setTimeout(i,a)}function a(){if(yh===null&&gh.size===0&&!wh){bh=document.body.hasAttribute(`style`),yh=new Map;for(let e of vh)yh.set(e,{value:document.body.style.getPropertyValue(e),priority:document.body.style.getPropertyPriority(e)})}}return qf(()=>Eh.current,()=>{if(!Eh.current)return;a(),wh=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),r=window.innerWidth-document.documentElement.clientWidth,i={padding:Number.parseInt(t.paddingRight??`0`,10)+r,margin:Number.parseInt(t.marginRight??`0`,10)};r>0&&!n&&(Th(document.body.style,`padding-right`,`${i.padding}px`),Th(document.body.style,`margin-right`,`${i.margin}px`),Th(document.body.style,`--scrollbar-width`,`${r}px`)),Th(document.body.style,`overflow`,`hidden`),Rp&&(Sh=ha(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),$f(()=>{Dh.current&&Th(document.body.style,`pointer-events`,`none`),Th(document.body.style,`overflow`,`hidden`)})}),qf(()=>Dh.current,()=>{Eh.current&&$f(()=>{Eh.current&&(Dh.current?Th(document.body.style,`pointer-events`,`none`):n(document))})},{lazy:!0}),Zf(()=>()=>{Sh?.()}),{get lockMap(){return gh},resetBodyStyle:t,restorePointerEvents:n,scheduleCleanupIfNoNewLocks:i,cancelPendingCleanup:r,ensureInitialStyleCaptured:a}}),Ah=class{#e=mh();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null,n=()=>!0){this.#t=e,this.#n=t,this.#r=kh.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),_h.set(this.#e,n),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=$(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),Zf(()=>{if(this.#r.lockMap.delete(this.#e),_h.delete(this.#e),jh(this.#r.lockMap))return;let e=this.#n(),t=document;this.#r.restorePointerEvents(t),this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle(t)})}))}};function jh(e){for(let[t,n]of e)if(n)return!0;return!1}function Mh(e,t){j(t,!0);let n=Q(t,`preventScroll`,3,!0),r=Q(t,`restoreScrollDelay`,3,null),i=Q(t,`blockPointer`,3,()=>!0);Xi(()=>{n()&&new Ah(n(),()=>r(),i())}),M()}function Nh(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function Ph(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function Fh(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function Ih(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function Lh(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return Lh(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return Rh(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=Rh(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function Rh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zh=new Set([`$$slots`,`$$events`,`$$legacy`,`value`]),Bh=U(`<input/>`);function Vh(e,t){j(t,!0);let n=Q(t,`value`,15),r=Z(t,zh),i=N(()=>Rf(r,{"aria-hidden":`true`,tabindex:-1,style:{...zf,position:`absolute`,top:`0`,left:`0`}}));var a=G(),o=R(a),s=e=>{var t=Bh();Lo(t,()=>({...H(i),value:n(),defaultChecked:H(i).checked})),K(e,t)},c=e=>{var t=Bh(),r=e=>n(e.currentTarget.value);Lo(t,()=>({...H(i),value:n(),defaultValue:n()??``,oninput:r})),K(e,t)};J(o,e=>{H(i).type===`checkbox`?e(s):e(c,-1)}),K(e,a),M()}var Hh=new Wf(`Floating.Root`),Uh=new Wf(`Floating.Root`),Wh=class e{static create(t=!1){return t?Uh.set(new e):Hh.set(new e)}anchorNode=Kd(null);customAnchorNode=Kd(null);triggerNode=Kd(null);constructor(){Sr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},Gh=class e{static create(t,n=!1){return n?new e(t,Uh.get()):new e(t,Hh.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Gd(e.virtualEl.current):e.ref}};function Kh(e,t){j(t,!0);let n=Q(t,`tooltip`,3,!1);Wh.create(Xi(()=>n()));var r=G();Y(R(r),()=>t.children??f),K(e,r),M()}function qh(e){return typeof e==`function`?e():e}function Jh(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yh(e,t){let n=Jh(e);return Math.round(t*n)/n}function Xh(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}var Zh={afterMs:1e4,onChange:Jp};function Qh(e,t){let{afterMs:n,onChange:r,getWindow:i}={...Zh,...t},a=null,o=F(xn(e));function s(){return i().setTimeout(()=>{I(o,e,!0),r?.(e)},n)}return Sr(()=>()=>{a&&i().clearTimeout(a)}),$(()=>H(o),e=>{I(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var $h=class{#e;#t=N(()=>this.#e.candidateValues());#n;constructor(e){this.#e=e,this.#n=Qh(``,{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!H(this.#t).length)return;this.#n.current=this.#n.current+e;let t=this.#e.getCurrentItem(),n=H(this.#t).find(e=>e===t)??``,r=Lh(H(this.#t).map(e=>e??``),this.#n.current,n),i=H(this.#t).find(e=>e===r);return i&&this.#e.onMatch(i),i}resetTypeahead(){this.#n.current=``}},eg=class{#e;#t;#n=N(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=N(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=Qh(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=H(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=Lh(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&H(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},tg=[wp,Ap,Op],ng=[Dp,kp,`End`],rg=[...tg,...ng],ig=Cp({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),ag=new Wf(`Select.Root | Combobox.Root`);new Wf(`Select.Group | Combobox.Group`);var og=new Wf(`Select.Content | Combobox.Content`),sg=class{opts;#e=F(!1);get touchedInput(){return H(this.#e)}set touchedInput(e){I(this.#e,e,!0)}#t=F(null);get inputNode(){return H(this.#t)}set inputNode(e){I(this.#t,e,!0)}#n=F(null);get contentNode(){return H(this.#n)}set contentNode(e){I(this.#n,e,!0)}contentPresence;#r=F(null);get viewportNode(){return H(this.#r)}set viewportNode(e){I(this.#r,e,!0)}#i=F(null);get triggerNode(){return H(this.#i)}set triggerNode(e){I(this.#i,e,!0)}#a=F(null);get valueNode(){return H(this.#a)}set valueNode(e){I(this.#a,e,!0)}#o=F(``);get valueId(){return H(this.#o)}set valueId(e){I(this.#o,e,!0)}selectedLabelsByValue=new Hf;#s=F(null);get highlightedNode(){return H(this.#s)}set highlightedNode(e){I(this.#s,e,!0)}#c=N(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return H(this.#c)}set highlightedValue(e){I(this.#c,e)}#l=N(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return H(this.#l)}set highlightedId(e){I(this.#l,e)}#u=N(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return H(this.#u)}set highlightedLabel(e){I(this.#u,e)}#d=F(!1);get contentIsPositioned(){return H(this.#d)}set contentIsPositioned(e){I(this.#d,e,!0)}isUsingKeyboard=!1;pressedItem=null;isCombobox=!1;domContext=new fp(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new qp({ref:$(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),wr(()=>{this.opts.open.current||(this.setHighlightedNode(null),this.pressedItem=null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&this.scrollHighlightedNodeIntoView(e)}scrollHighlightedNodeIntoView(e){let t=this.viewportNode;if(!t||!this.contentIsPositioned)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();this.opts.scrollAlignment.current===`center`?t.scrollTop+=n.top+n.height/2-(r.top+r.height/2):n.top<r.top?t.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(t.scrollTop+=n.bottom-r.bottom)}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}getLabelForValue(e){if(e===``)return``;let t=this.opts.items.current.find(t=>t.value===e)?.label;return t?.trim()?t:this.selectedLabelsByValue.get(e)??e}resolveItemLabel(e,t,n){return t?.trim()?t:n?.textContent?.trim()||e}setSelectedLabel(e,t){e===``||t===e?this.selectedLabelsByValue.delete(e):this.selectedLabelsByValue.set(e,t)}pruneSelectedLabels(e){for(let t of this.selectedLabelsByValue.keys())e.includes(t)||this.selectedLabelsByValue.delete(t)}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>ig.getAttr(e,this.isCombobox?`combobox`:void 0)},cg=class extends sg{opts;isMulti=!1;#e=N(()=>this.opts.value.current!==``);get hasValue(){return H(this.#e)}set hasValue(e){I(this.#e,e)}#t=N(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return H(this.#t)}set currentLabel(e){I(this.#t,e)}#n=N(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return H(this.#n)}set candidateLabels(e){I(this.#n,e)}#r=N(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return H(this.#r)}set dataTypeaheadEnabled(e){I(this.#r,e)}constructor(e){super(e),this.opts=e,Sr(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),qf(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),qf(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e===``?[]:[e])})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.setSelectedLabel(e,t),this.opts.inputValue.current=t)}setInitialHighlightedNode(){$f(()=>{if(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))return;let e=this.getNodeByValue(this.opts.value.current);e?this.setHighlightedNode(e,!0):this.setHighlightedToFirstCandidate(!0)})}},lg=class extends sg{opts;isMulti=!0;#e=N(()=>this.opts.value.current.length>0);get hasValue(){return H(this.#e)}set hasValue(e){I(this.#e,e)}#t=N(()=>new Set(this.opts.value.current));constructor(e){super(e),this.opts=e,Sr(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),qf(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),qf(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e)})}includesItem(e){return H(this.#t).has(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):(this.opts.value.current=[...this.opts.value.current,e],this.setSelectedLabel(e,t)),this.opts.inputValue.current=t}setInitialHighlightedNode(){$f(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},ug=class{static create(e){let{type:t,...n}=e,r=t===`single`?new cg(n):new lg(n);return ag.set(r)}},dg=class e{static create(t){return new e(t,ag.get())}root;opts;attachment;constructor(e,t){this.root=t,this.opts=e,this.attachment=pp(e.ref,e=>this.root.valueNode=e),this.setValue=this.setValue.bind(this)}setValue(e){this.root.isMulti&&!Array.isArray(e)||!this.root.isMulti&&typeof e!=`string`||(this.root.opts.value.current=e)}#e=N(()=>{if(this.root.isMulti)return{selection:{type:`multiple`,selected:this.root.opts.value.current.length>0?this.root.opts.value.current.map(e=>({value:e,label:this.root.getLabelForValue(e)})):[],setValue:this.setValue},placeholder:this.opts.placeholder.current??null,disabled:this.root.opts.disabled.current};let e=this.root.opts.value.current;return{selection:{type:`single`,selected:e===``?void 0:{value:e,label:this.root.getLabelForValue(e)},setValue:this.setValue},placeholder:this.opts.placeholder.current??null,disabled:this.root.opts.disabled.current}});get snippetProps(){return H(this.#e)}set snippetProps(e){I(this.#e,e)}#t=N(()=>({id:this.opts.id.current,"data-placeholder":this.root.hasValue?void 0:``,"data-select-value":``,...this.attachment}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},fg=class e{static create(t){return new e(t,ag.get())}opts;root;attachment;#e;#t;constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref,e=>this.root.triggerNode=e),this.root.domContext=new fp(e.ref),this.#e=new eg({getCurrentItem:()=>this.root.highlightedNode,onMatch:e=>{this.root.setHighlightedNode(e)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new $h({getCurrentItem:()=>this.root.isMulti?``:this.root.currentLabel,onMatch:e=>{if(this.root.isMulti||!this.root.opts.items.current)return;let t=this.root.opts.items.current.find(t=>t.label===e);t&&(this.root.opts.value.current=t.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#n(){this.root.opts.open.current=!0,this.#t.resetTypeahead(),this.#e.resetTypeahead()}#r(e){this.#n()}#i(){if(this.root.opts.disabled.current)return!1;let e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti||(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.resolveItemLabel(this.root.highlightedValue,this.root.highlightedLabel,this.root.highlightedNode)),!this.root.isMulti&&!e)?(this.root.handleClose(),!0):!1}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#t.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if((e.key===`Enter`||e.key===` `&&this.#e.search===``)&&!e.isComposing&&(e.preventDefault(),this.#i()||e.key===` `))return;if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),rg.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=Nh(t,r,i):e.key===`ArrowUp`?a=Ph(t,r,i):e.key===`PageDown`?a=Fh(t,r,10,i):e.key===`PageUp`?a=Ih(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}let t=e.ctrlKey||e.altKey||e.metaKey,n=e.key.length===1,r=e.key===` `,i=this.root.getCandidateNodes();if(e.key!==`Tab`){if(!t&&(n||r)){let t=this.#e.handleTypeaheadSearch(e.key,i);r&&(e.preventDefault(),t||this.#i())}else this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus(),this.root.opts.disabled.current||e.detail!==0||(this.root.opts.open.current?this.root.handleClose():this.#n(),e.preventDefault())}onpointerdown(e){if(this.root.opts.disabled.current||Hp(this.opts.ref.current))return;if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||Hp(this.opts.ref.current)||(e.preventDefault(),e.pointerType===`touch`&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose()))}#a=N(()=>({id:this.opts.id.current,role:`combobox`,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"aria-expanded":mp(this.root.opts.open.current),"aria-controls":this.root.contentNode?.id||void 0,"aria-activedescendant":this.root.highlightedId,"data-state":vp(this.root.opts.open.current),"data-disabled":gp(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:``,[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return H(this.#a)}set props(e){I(this.#a,e)}},pg=class e{static create(t){return og.set(new e(t,ag.get()))}opts;root;attachment;#e=F(!1);get isPositioned(){return H(this.#e)}set isPositioned(e){I(this.#e,e,!0)}userHasScrolled=!1;domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref,e=>this.root.contentNode=e),this.domContext=new fp(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),Zf(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),qf(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1,this.userHasScrolled=!1)}),qf([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{this.isPositioned&&this.root.highlightedNode&&(this.root.isUsingKeyboard&&(this.userHasScrolled=!1),this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode))}),qf([()=>this.isPositioned,()=>this.root.viewportNode],()=>{let e=this.root.viewportNode;if(!this.isPositioned||!e)return;let t=()=>{this.userHasScrolled=!0},n=new(this.domContext.getWindow()).ResizeObserver(()=>{!this.userHasScrolled&&this.root.highlightedNode&&this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)});return n.observe(e),kf(ha(e,`wheel`,t,{passive:!0}),ha(e,`touchmove`,t,{passive:!0}),()=>n.disconnect())}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}onpointerdowncapture=()=>{this.root.pressedItem=null};#t=N(()=>Xh(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{cm(e,this.root.triggerNode)||cm(e,this.root.inputNode)?e.preventDefault():(this.opts.onInteractOutside.current(e),e.defaultPrevented||this.root.handleClose())};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),e.defaultPrevented||this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=N(()=>({open:this.root.opts.open.current}));get snippetProps(){return H(this.#n)}set snippetProps(e){I(this.#n,e)}#r=N(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":vp(this.root.opts.open.current),...bp(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...H(this.#t)},onpointermove:this.onpointermove,onpointerdowncapture:this.onpointerdowncapture,...this.attachment}));get props(){return H(this.#r)}set props(e){I(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}},mg=class e{static create(t){return new e(t,ag.get())}opts;root;attachment;#e=N(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return H(this.#e)}set isDisabled(e){I(this.#e,e)}#t=N(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return H(this.#t)}set isSelected(e){I(this.#t,e)}#n=N(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return H(this.#n)}set isHighlighted(e){I(this.#n,e)}#r=N(()=>this.isHighlighted&&!this.isDisabled);prevHighlighted=new Xf(()=>this.isHighlighted);#i=F(!1);get mounted(){return H(this.#i)}set mounted(e){I(this.#i,e,!0)}#a;constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref),qf([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),qf(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),qf([()=>this.isSelected,()=>this.mounted,()=>this.opts.value.current,()=>this.opts.label.current],([e,t,n])=>{e&&t&&this.root.setSelectedLabel(n,this.#o())}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}#o(){return this.root.resolveItemLabel(this.opts.value.current,this.opts.label.current,this.opts.ref.current)}handleSelect(){if(this.isDisabled)return;let e=this.opts.value.current===this.root.opts.value.current;!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?this.root.handleClose():(this.root.toggleItem(this.opts.value.current,this.#o()),!this.root.isMulti&&!e&&this.root.handleClose())}#s=N(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return H(this.#s)}set snippetProps(e){I(this.#s,e)}onpointerdown(e){e.preventDefault(),this.root.pressedItem={item:this,x:e.clientX,y:e.clientY}}onpointerup(e){if(this.#a?.(),e.defaultPrevented||!this.opts.ref.current)return;let t=this.root.pressedItem;this.root.pressedItem=null,t&&t.item!==this&&Math.hypot(e.clientX-t.x,e.clientY-t.y)<4?(e.preventDefault(),t.item.handleSelect()):e.pointerType===`touch`&&!Rp?this.#a=ha(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0}):(e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current))}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#c=N(()=>({id:this.opts.id.current,role:`option`,"aria-selected":mp(this.isSelected),"data-value":this.opts.value.current,"data-disabled":gp(this.isDisabled),"data-highlighted":gp(H(this.#r)),"data-selected":gp(this.isSelected),"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return H(this.#c)}set props(e){I(this.#c,e)}},hg=class e{static create(t){return new e(t,ag.get())}opts;root;#e=N(()=>this.root.opts.name.current!==``);get shouldRender(){return H(this.#e)}set shouldRender(e){I(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=N(()=>({disabled:_p(this.root.opts.disabled.current),required:_p(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},gg=class e{static create(t){return new e(t,og.get())}opts;content;root;attachment;#e=F(0);get prevScrollTop(){return H(this.#e)}set prevScrollTop(e){I(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=pp(e.ref,e=>{this.root.viewportNode=e})}#t=N(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},_g=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=Jp;#e=F(!1);get mounted(){return H(this.#e)}set mounted(e){I(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=pp(e.ref),qf([()=>this.mounted],()=>{this.mounted||(this.isUserScrolling=!1)}),Sr(()=>{this.mounted&&this.root.opts.open.current||this.clearAutoScrollInterval()}),Zf(()=>this.clearAutoScrollInterval()),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null||!this.root.opts.open.current)return;this.content.userHasScrolled=!0;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=N(()=>({id:this.opts.id.current,"aria-hidden":hp(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},vg=class e{static create(t){return new e(new _g(t,og.get()))}scrollButtonState;content;root;#e=F(!1);get canScrollDown(){return H(this.#e)}set canScrollDown(e){I(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,qf([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{let e=this.root.viewportNode;if(e&&this.content.isPositioned)return this.handleScroll(!0),ha(e,`scroll`,()=>this.handleScroll())}),qf([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{this.root.viewportNode&&this.content.isPositioned&&this.handleScroll(!0)})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;e&&t&&(e.scrollTop+=t.offsetHeight)};#t=N(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},yg=class e{static create(t){return new e(new _g(t,og.get()))}scrollButtonState;content;root;#e=F(!1);get canScrollUp(){return H(this.#e)}set canScrollUp(e){I(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,qf([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(this.root.viewportNode&&this.content.isPositioned)return this.handleScroll(!0),ha(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{this.root.viewportNode&&this.root.highlightedNode&&(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=N(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}};function bg(e,t){j(t,!0);let n=Q(t,`value`,15),r=hg.create({value:$(()=>n())});var i=G(),a=R(i),o=e=>{Vh(e,ts(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return n()},set value(e){n(e)}}))};J(a,e=>{r.shouldRender&&e(o)}),K(e,i),M()}function xg(e,t){j(t,!0);let n=Q(t,`tooltip`,3,!1);Gh.create({id:$(()=>t.id),virtualEl:$(()=>t.virtualEl),ref:Xi(()=>t.ref)},Xi(()=>n()));var r=G();Y(R(r),()=>t.children??f),K(e,r),M()}var Sg=[`top`,`right`,`bottom`,`left`],Cg=Math.min,wg=Math.max,Tg=Math.round,Eg=Math.floor,Dg=e=>({x:e,y:e}),Og={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function kg(e,t,n){return wg(e,Cg(t,n))}function Ag(e,t){return typeof e==`function`?e(t):e}function jg(e){return e.split(`-`)[0]}function Mg(e){return e.split(`-`)[1]}function Ng(e){return e===`x`?`y`:`x`}function Pg(e){return e===`y`?`height`:`width`}function Fg(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ig(e){return Ng(Fg(e))}function Lg(e,t,n){n===void 0&&(n=!1);let r=Mg(e),i=Ig(e),a=Pg(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Kg(o)),[o,Kg(o)]}function Rg(e){let t=Kg(e);return[zg(e),t,zg(t)]}function zg(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Bg=[`left`,`right`],Vg=[`right`,`left`],Hg=[`top`,`bottom`],Ug=[`bottom`,`top`];function Wg(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Vg:Bg:t?Bg:Vg;case`left`:case`right`:return t?Hg:Ug;default:return[]}}function Gg(e,t,n,r){let i=Mg(e),a=Wg(jg(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(zg)))),a}function Kg(e){let t=jg(e);return Og[t]+e.slice(t.length)}function qg(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Jg(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:qg(e)}function Yg(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Xg(e,t,n){let{reference:r,floating:i}=e,a=Fg(t),o=Ig(t),s=Pg(o),c=jg(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Mg(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Zg(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ag(t,e),p=Jg(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Yg(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Yg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Qg=50,$g=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Zg},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Xg(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Qg&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Xg(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},e_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ag(e,t)||{};if(l==null)return{};let d=Jg(u),f={x:n,y:r},p=Ig(i),m=Pg(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,ee=C/2-h[m]/2-1,T=Cg(d[_],ee),E=Cg(d[v],ee),te=C-h[m]-E,ne=C/2-h[m]/2+w,re=kg(T,ne,te),ie=!c.arrow&&Mg(i)!=null&&ne!==re&&a.reference[m]/2-(ne<T?T:E)-h[m]/2<0,ae=ie?ne<T?ne-T:ne-te:0;return{[p]:f[p]+ae,data:{[p]:re,centerOffset:ne-re-ae,...ie&&{alignmentOffset:ae}},reset:ie}}}),t_=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ag(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=jg(r),_=Fg(o),v=jg(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Kg(o)]:Rg(o)),x=p!==`none`;!d&&x&&b.push(...Gg(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],ee=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Lg(r,a,y);w.push(C[e[0]],C[e[1]])}if(ee=[...ee,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Fg(t)||ee.every(e=>Fg(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:ee},reset:{placement:t}};let n=ee.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=ee.filter(e=>{if(x){let t=Fg(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function n_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function r_(e){return Sg.some(t=>e[t]>=0)}var i_=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ag(e,t);switch(i){case`referenceHidden`:{let e=n_(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:r_(e)}}}case`escaped`:{let e=n_(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:r_(e)}}}default:return{}}}}},a_=new Set([`left`,`top`]);async function o_(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=jg(n),s=Mg(n),c=Fg(n)===`y`,l=a_.has(o)?-1:1,u=a&&c?-1:1,d=Ag(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var s_=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await o_(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},c_=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ag(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Fg(i),p=Ng(f),m=u[p],h=u[f],g=(e,t)=>kg(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},l_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ag(e,t),u={x:n,y:r},d=Fg(i),f=Ng(d),p=u[f],m=u[d],h=Ag(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=a_.has(jg(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},u_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Ag(e,t),c=await i.detectOverflow(t,s),l=jg(n),u=Mg(n),d=Fg(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Cg(p-c[m],g),y=Cg(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*wg(c.left,c.right):S=p-2*wg(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function d_(){return typeof window<`u`}function f_(e){return h_(e)?(e.nodeName||``).toLowerCase():`#document`}function p_(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function m_(e){return((h_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function h_(e){return d_()?e instanceof Node||e instanceof p_(e).Node:!1}function g_(e){return d_()?e instanceof Element||e instanceof p_(e).Element:!1}function __(e){return d_()?e instanceof HTMLElement||e instanceof p_(e).HTMLElement:!1}function v_(e){return!d_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof p_(e).ShadowRoot}function y_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=A_(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function b_(e){return/^(table|td|th)$/.test(f_(e))}function x_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var S_=/transform|translate|scale|rotate|perspective|filter/,C_=/paint|layout|strict|content/,w_=e=>!!e&&e!==`none`,T_;function E_(e){let t=g_(e)?A_(e):e;return w_(t.transform)||w_(t.translate)||w_(t.scale)||w_(t.rotate)||w_(t.perspective)||!O_()&&(w_(t.backdropFilter)||w_(t.filter))||S_.test(t.willChange||``)||C_.test(t.contain||``)}function D_(e){let t=M_(e);for(;__(t)&&!k_(t);){if(E_(t))return t;if(x_(t))return null;t=M_(t)}return null}function O_(){return T_??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),T_}function k_(e){return/^(html|body|#document)$/.test(f_(e))}function A_(e){return p_(e).getComputedStyle(e)}function j_(e){return g_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function M_(e){if(f_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||v_(e)&&e.host||m_(e);return v_(t)?t.host:t}function N_(e){let t=M_(e);return k_(t)?(e.ownerDocument||e).body:__(t)&&y_(t)?t:N_(t)}function P_(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=N_(e),i=r===e.ownerDocument?.body,a=p_(r);if(i){let e=F_(a);return t.concat(a,a.visualViewport||[],y_(r)?r:[],e&&n?P_(e):[])}return t.concat(r,P_(r,[],n))}function F_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function I_(e){let t=A_(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=__(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Tg(n)!==a||Tg(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function L_(e){return g_(e)?e:e.contextElement}function R_(e){let t=L_(e);if(!__(t))return Dg(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=I_(t),o=(a?Tg(n.width):n.width)/r,s=(a?Tg(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var z_=Dg(0);function B_(e){let t=p_(e);return!O_()||!t.visualViewport?z_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V_(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===p_(e)}function H_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=L_(e),o=Dg(1);t&&(r?g_(r)&&(o=R_(r)):o=R_(e));let s=V_(a,n,r)?B_(a):Dg(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=p_(a),t=g_(r)?p_(r):r,n=e,i=F_(n);for(;i&&t!==n;){let e=R_(i),t=i.getBoundingClientRect(),r=A_(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=p_(i),i=F_(n)}}return Yg({width:u,height:d,x:c,y:l})}function U_(e,t){let n=j_(e).scrollLeft;return t?t.left+n:H_(m_(e)).left+n}function W_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-U_(e,n),y:n.top+t.scrollTop}}function G_(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=m_(r),s=t?x_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Dg(1),u=Dg(0),d=__(r);if((d||!a)&&((f_(r)!==`body`||y_(o))&&(c=j_(r)),d)){let e=H_(r);l=R_(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?W_(o,c):Dg(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function K_(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function q_(e){let t=j_(e),n=e.ownerDocument.body,r=wg(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=wg(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+U_(e),o=-t.scrollTop;return A_(n).direction===`rtl`&&(a+=wg(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var J_=25;function Y_(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=p_(e),a=m_(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!O_()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(U_(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=J_&&(s-=o)}return{width:s,height:c,x:l,y:u}}function X_(e,t){let n=H_(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=R_(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Z_(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Y_(e,n,t);else if(t===`document`)r=q_(m_(e));else if(g_(t))r=X_(t,n);else{let n=B_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Yg(r)}function Q_(e,t){let n=t.get(e);if(n)return n;let r=P_(e,[],!1).filter(e=>g_(e)&&f_(e)!==`body`),i=null,a=A_(e).position===`fixed`,o=a?M_(e):e;for(;g_(o)&&!k_(o);){let e=A_(o),t=E_(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=M_(o)}return t.set(e,r),r}function $_(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?x_(t)?[]:Q_(t,this._c):[].concat(n),r],o=Z_(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Z_(t,a[e],i);s=wg(n.top,s),c=Cg(n.right,c),l=Cg(n.bottom,l),u=wg(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function e1(e){let{width:t,height:n}=I_(e);return{width:t,height:n}}function t1(e,t,n){let r=__(t),i=m_(t),a=n===`fixed`,o=H_(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Dg(0);if((r||!a)&&((f_(t)!==`body`||y_(i))&&(s=j_(t)),r)){let e=H_(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=U_(i));let l=i&&!r&&!a?W_(i,s):Dg(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function n1(e){return A_(e).position===`static`}function r1(e,t){if(!__(e)||A_(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return m_(e)===n&&(n=n.ownerDocument.body),n}function i1(e,t){let n=p_(e);if(x_(e))return n;if(!__(e)){let t=M_(e);for(;t&&!k_(t);){if(g_(t)&&!n1(t))return t;t=M_(t)}return n}let r=r1(e,t);for(;r&&b_(r)&&n1(r);)r=r1(r,t);return r&&k_(r)&&n1(r)&&!E_(r)?n:r||D_(e)||n}var a1=async function(e){let t=this.getOffsetParent||i1,n=await(0,this.getDimensions)(e.floating);return{reference:t1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function o1(e){return A_(e).direction===`rtl`}var s1={convertOffsetParentRelativeRectToViewportRelativeRect:G_,getDocumentElement:m_,getClippingRect:$_,getOffsetParent:i1,getElementRects:a1,getClientRects:K_,getDimensions:e1,getScale:R_,isElement:g_,isRTL:o1};function c1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function l1(e,t,n){let r=null,i,a=m_(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Eg(d),h=Eg(a.clientWidth-(u+f)),g=Eg(a.clientHeight-(d+p)),_=Eg(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:wg(0,Cg(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!c1(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=p_(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function u1(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=L_(e),u=i||a?[...l?P_(l):[],...t?P_(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?l1(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?H_(e):null;c&&g();function g(){let t=H_(e);h&&!c1(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var d1=s_,f1=c_,p1=t_,m1=u_,h1=i_,g1=e_,_1=l_,v1=(e,t,n)=>{let r=new Map,i=n??{},a={...s1,...i.platform,_c:r};return $g(e,t,{...i,platform:a})};function y1(e){let t=e.whileElementsMounted,n=N(()=>qh(e.open)??!0),r=N(()=>qh(e.middleware)),i=N(()=>qh(e.transform)??!0),a=N(()=>qh(e.placement)??`bottom`),o=N(()=>qh(e.strategy)??`absolute`),s=N(()=>qh(e.sideOffset)??0),c=N(()=>qh(e.alignOffset)??0),l=e.reference,u;wr(()=>{u={middleware:H(r),placement:H(a),strategy:H(o),open:H(n),sideOffset:H(s),alignOffset:H(c)}});let d=F(0),f=F(0),p=Kd(null),m=F(xn(H(o))),h=F(xn(H(a))),g=F(xn({})),_=F(!1),v=!1,y=0,b=!1,x=N(()=>{let e=p.current?Yh(p.current,H(d)):H(d),t=p.current?Yh(p.current,H(f)):H(f);return H(i)?{position:H(m),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...p.current&&Jh(p.current)>=1.5&&{willChange:`transform`}}:{position:H(m),left:`${e}px`,top:`${t}px`}}),S;function C(){if(b||l.current===null||p.current===null)return;let e=l.current,t=p.current,n=++y;v1(e,t,{middleware:u.middleware,placement:u.placement,strategy:u.strategy}).then(r=>{if(n===y&&l.current===e&&p.current===t){if(b1(e))I(g,{...H(g),hide:{...H(g).hide,referenceHidden:!0}},!0);else{if(!u.open&&H(d)!==0&&H(f)!==0){let e=Math.max(Math.abs(u.sideOffset),Math.abs(u.alignOffset),15);if(r.x<=e&&r.y<=e)return}I(d,r.x,!0),I(f,r.y,!0),I(m,r.strategy,!0),I(h,r.placement,!0),I(g,r.middlewareData,!0),I(_,!0)}}})}function w(){typeof S==`function`&&(S(),S=void 0),y++}function ee(){w(),t===void 0?(T(),C()):H(n)&&l.current!==null&&p.current!==null&&(T(),S=t(l.current,p.current,C))}function T(){return[H(r),H(a),H(o)]}function E(){!H(n)&&p.current===null&&I(_,!1)}function te(){return[H(r),H(a),H(o),H(s),H(c),H(n)]}return Sr(()=>{t===void 0&&H(n)&&(T(),C())}),Sr(ee),Sr(()=>{t!==void 0&&(te(),H(n)&&H(_)?v?C():v=!0:v=!1)}),Sr(E),Sr(()=>()=>{b=!0,w()}),{floating:p,reference:l,get strategy(){return H(m)},get placement(){return H(h)},get middlewareData(){return H(g)},get isPositioned(){return H(_)},get floatingStyles(){return H(x)},get update(){return C}}}function b1(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var x1={top:`bottom`,right:`left`,bottom:`top`,left:`right`},S1=new Wf(`Floating.Content`),C1=class e{static create(t,n=!1){return n?S1.set(new e(t,Uh.get())):S1.set(new e(t,Hh.get()))}opts;root;contentRef=Kd(null);wrapperRef=Kd(null);arrowRef=Kd(null);contentAttachment=pp(this.contentRef);wrapperAttachment=pp(this.wrapperRef);arrowAttachment=pp(this.arrowRef);arrowId=Kd(mh());#e=N(()=>{if(typeof this.opts.style==`string`)return Of(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new Yf(()=>this.arrowRef.current??void 0);#r=N(()=>this.#n?.width??0);#i=N(()=>this.#n?.height??0);#a=N(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=N(()=>(Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]).filter(Up));#s=N(()=>H(this.#o).length>0);get hasExplicitBoundaries(){return H(this.#s)}set hasExplicitBoundaries(e){I(this.#s,e)}#c=N(()=>({padding:this.opts.collisionPadding.current,boundary:H(this.#o),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return H(this.#c)}set detectOverflowOptions(e){I(this.#c,e)}#l=F(void 0);#u=F(void 0);#d=F(void 0);#f=F(void 0);#p=N(()=>[d1({mainAxis:this.opts.sideOffset.current+H(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&f1({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?_1():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&p1({...this.detectOverflowOptions}),m1({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;I(this.#l,t,!0),I(this.#u,n,!0),I(this.#d,r,!0),I(this.#f,i,!0)}}),this.arrowRef.current&&g1({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),w1({arrowWidth:H(this.#r),arrowHeight:H(this.#i)}),this.opts.hideWhenDetached.current&&h1({strategy:`referenceHidden`,...this.detectOverflowOptions}),this.opts.hideWhenDetached.current&&!this.hasExplicitBoundaries&&{...h1({strategy:`referenceHidden`,boundary:`clippingAncestors`}),name:`hideClipping`}].filter(Boolean));get middleware(){return H(this.#p)}set middleware(e){I(this.#p,e)}floating;#m=N(()=>E1(this.floating.placement));get placedSide(){return H(this.#m)}set placedSide(e){I(this.#m,e)}#h=N(()=>D1(this.floating.placement));get placedAlign(){return H(this.#h)}set placedAlign(e){I(this.#h,e)}#g=N(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return H(this.#g)}set arrowX(e){I(this.#g,e)}#_=N(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return H(this.#_)}set arrowY(e){I(this.#_,e)}#v=N(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return H(this.#v)}set cannotCenterArrow(e){I(this.#v,e)}#y=F(`auto`);get contentZIndex(){return H(this.#y)}set contentZIndex(e){I(this.#y,e,!0)}#b=N(()=>x1[this.placedSide]);get arrowBaseSide(){return H(this.#b)}set arrowBaseSide(e){I(this.#b,e)}#x=N(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${H(this.#l)}px`,"--bits-floating-available-height":`${H(this.#u)}px`,"--bits-floating-anchor-width":`${H(this.#d)}px`,"--bits-floating-anchor-height":`${H(this.#f)}px`,...(this.floating.middlewareData.hide?.referenceHidden||this.floating.middlewareData.hideClipping?.referenceHidden)&&{visibility:`hidden`,"pointer-events":`none`},...H(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return H(this.#x)}set wrapperProps(e){I(this.#x,e)}#S=N(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Ff({...H(this.#e)}),...this.contentAttachment}));get props(){return H(this.#S)}set props(e){I(this.#S,e)}#C=N(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return H(this.#C)}set arrowStyle(e){I(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),qf(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=y1({strategy:()=>this.opts.strategy.current,placement:()=>H(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>u1(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Sr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),qf([()=>this.contentRef.current,()=>this.opts.enabled.current],([e,t])=>{if(!e||!t)return;let n=up(e),r=n.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let t=n.getComputedStyle(e).zIndex;t!==this.contentZIndex&&(this.contentZIndex=t)});return()=>{n.cancelAnimationFrame(r)}}),Sr(()=>{this.floating.floating.current=this.wrapperRef.current})}};function w1(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=T1(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function T1(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function E1(e){return T1(e)[0]}function D1(e){return T1(e)[1]}function O1(e,t){let n=ka();j(t,!0);let r=Q(t,`side`,3,`bottom`),i=Q(t,`sideOffset`,3,0),a=Q(t,`align`,3,`center`),o=Q(t,`alignOffset`,3,0),s=Q(t,`arrowPadding`,3,0),c=Q(t,`avoidCollisions`,3,!0),l=Q(t,`collisionBoundary`,19,()=>[]),u=Q(t,`collisionPadding`,3,0),d=Q(t,`hideWhenDetached`,3,!1),p=Q(t,`onPlaced`,3,()=>{}),m=Q(t,`sticky`,3,`partial`),h=Q(t,`updatePositionStrategy`,3,`optimized`),g=Q(t,`strategy`,3,`fixed`),_=Q(t,`style`,19,()=>({})),v=Q(t,`wrapperId`,19,()=>Yp(n)),y=Q(t,`customAnchor`,3,null),b=Q(t,`tooltip`,3,!1),x=C1.create({side:$(()=>r()),sideOffset:$(()=>i()),align:$(()=>a()),alignOffset:$(()=>o()),id:$(()=>t.id),arrowPadding:$(()=>s()),avoidCollisions:$(()=>c()),collisionBoundary:$(()=>l()),collisionPadding:$(()=>u()),hideWhenDetached:$(()=>d()),onPlaced:$(()=>p()),sticky:$(()=>m()),updatePositionStrategy:$(()=>h()),strategy:$(()=>g()),dir:rm(()=>t.dir),style:$(()=>_()),enabled:$(()=>t.enabled),wrapperId:$(()=>v()),customAnchor:$(()=>y())},Xi(()=>b())),S=N(()=>Rf(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=G();Y(R(C),()=>t.content??f,()=>({props:x.props,wrapperProps:H(S)})),K(e,C),M()}function k1(e,t){j(t,!0),ns(()=>{t.onPlaced?.()});var n=G();Y(R(n),()=>t.content??f,()=>({props:{},wrapperProps:{}})),K(e,n),M()}var A1=Cp({component:`separator`,parts:[`root`]}),j1=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pp(e.ref)}#e=N(()=>({id:this.opts.id.current,role:this.opts.decorative.current?`none`:`separator`,"aria-orientation":this.opts.orientation.current,"aria-hidden":hp(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[A1.root]:``,...this.attachment}));get props(){return H(this.#e)}set props(e){I(this.#e,e)}},M1=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`decorative`,`orientation`]),N1=U(`<div><!></div>`);function P1(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`decorative`,3,!1),o=Q(t,`orientation`,3,`horizontal`),s=Z(t,M1),c=j1.create({ref:$(()=>i(),e=>i(e)),id:$(()=>r()),decorative:$(()=>a()),orientation:$(()=>o())}),l=N(()=>Rf(s,c.props));var u=G(),d=R(u),p=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(l)})),K(e,n)},m=e=>{var n=N1();Lo(n,()=>({...H(l)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(d,e=>{t.child?e(p):e(m,-1)}),K(e,u),M()}var F1=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function I1(e,t){let n=Q(t,`isStatic`,3,!1),r=Z(t,F1);var i=G(),a=R(i),o=e=>{k1(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{O1(e,ts({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};J(a,e=>{n()?e(o):e(s,-1)}),K(e,i)}var L1=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.forceMount.ref.tooltip.contentPointerEvents`.split(`.`)),R1=U(`<!> <!>`,1);function z1(e,t){j(t,!0);let n=Q(t,`interactOutsideBehavior`,3,`close`),r=Q(t,`trapFocus`,3,!0),i=Q(t,`isValidEvent`,3,()=>!1),a=Q(t,`customAnchor`,3,null),o=Q(t,`isStatic`,3,!1),s=Q(t,`tooltip`,3,!1),c=Q(t,`contentPointerEvents`,3,`auto`),l=Z(t,L1),u=N(()=>t.preventScroll??!0),d=N(()=>t.strategy??(H(u)?`fixed`:`absolute`));I1(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return H(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=R1(),p=R(d),m=e=>{Mh(e,{get preventScroll(){return H(u)}})},h=e=>{Mh(e,{get preventScroll(){return H(u)}})};J(p,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),oh(B(p,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;Tm(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Sm(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;ph(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=G(),u=R(i);{let e=N(()=>({props:Rf(l,o(),r(),a(),{id:t.id,style:{pointerEvents:c()}}),wrapperProps:s()}));Y(u,()=>t.popper??f,()=>H(e))}K(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),K(e,d)},$$slots:{content:!0}}),M()}var B1=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function V1(e,t){let n=Q(t,`interactOutsideBehavior`,3,`close`),r=Q(t,`trapFocus`,3,!0),i=Q(t,`isValidEvent`,3,()=>!1),a=Q(t,`customAnchor`,3,null),o=Q(t,`isStatic`,3,!1),s=Z(t,B1);var c=G(),l=R(c),u=e=>{z1(e,ts({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};J(l,e=>{t.shouldRender&&e(u)}),K(e,c)}var H1=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function U1(e,t){let n=Q(t,`interactOutsideBehavior`,3,`close`),r=Q(t,`trapFocus`,3,!0),i=Q(t,`isValidEvent`,3,()=>!1),a=Q(t,`customAnchor`,3,null),o=Q(t,`isStatic`,3,!1),s=Z(t,H1);z1(e,ts({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}var W1=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),G1=U(`<div><div><!></div></div>`);function K1(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`forceMount`,3,!1),o=Q(t,`side`,3,`bottom`),s=Q(t,`onInteractOutside`,3,Jp),c=Q(t,`onEscapeKeydown`,3,Jp),l=Q(t,`preventScroll`,3,!1),u=Z(t,W1),d=pg.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),onInteractOutside:$(()=>s()),onEscapeKeydown:$(()=>c())}),p=N(()=>Rf(u,d.props));var m=G(),h=R(m),g=e=>{U1(e,ts(()=>H(p),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return o()},get enabled(){return d.root.opts.open.current},get id(){return r()},get preventScroll(){return l()},forceMount:!0,get shouldRender(){return d.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=N(()=>Rf(r(),{style:d.props.style},{style:t.style}));var o=G(),s=R(o),c=e=>{var n=G(),r=R(n);{let e=N(()=>({props:H(a),wrapperProps:i(),...d.snippetProps}));Y(r,()=>t.child,()=>H(e))}K(e,n)},l=e=>{var n=G1();Lo(n,()=>({...i()}));var r=L(n);Lo(r,()=>({...H(a)})),Y(L(r),()=>t.children??f),k(r),k(n),K(e,n)};J(s,e=>{t.child?e(c):e(l,-1)}),K(e,o)},$$slots:{popper:!0}}))},_=e=>{V1(e,ts(()=>H(p),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return o()},get open(){return d.root.opts.open.current},get id(){return r()},get preventScroll(){return l()},forceMount:!1,get shouldRender(){return d.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=N(()=>Rf(r(),{style:d.props.style},{style:t.style}));var o=G(),s=R(o),c=e=>{var n=G(),r=R(n);{let e=N(()=>({props:H(a),wrapperProps:i(),...d.snippetProps}));Y(r,()=>t.child,()=>H(e))}K(e,n)},l=e=>{var n=G1();Lo(n,()=>({...i()}));var r=L(n);Lo(r,()=>({...H(a)})),Y(L(r),()=>t.children??f),k(r),k(n),K(e,n)};J(s,e=>{t.child?e(c):e(l,-1)}),K(e,o)},$$slots:{popper:!0}}))};J(h,e=>{a()?e(g):a()||e(_,1)}),K(e,m),M()}function q1(e,t){j(t,!0);let n=Q(t,`mounted`,15,!1),r=Q(t,`onMountedChange`,3,Jp);Qf(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),M()}var J1=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),Y1=U(`<div><!></div>`),X1=U(`<!> <!>`,1);function Z1(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`label`,19,()=>t.value),o=Q(t,`disabled`,3,!1),s=Q(t,`onHighlight`,3,Jp),c=Q(t,`onUnhighlight`,3,Jp),l=Z(t,J1),u=mg.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),value:$(()=>t.value),disabled:$(()=>o()),label:$(()=>a()),onHighlight:$(()=>s()),onUnhighlight:$(()=>c())}),d=N(()=>Rf(l,u.props));var p=X1(),m=R(p),h=e=>{var n=G(),r=R(n);{let e=N(()=>({props:H(d),...u.snippetProps}));Y(r,()=>t.child,()=>H(e))}K(e,n)},g=e=>{var n=Y1();Lo(n,()=>({...H(d)})),Y(L(n),()=>t.children??f,()=>u.snippetProps),k(n),K(e,n)};J(m,e=>{t.child?e(h):e(g,-1)}),q1(B(m,2),{get mounted(){return u.mounted},set mounted(e){u.mounted=e}}),K(e,p),M()}var Q1=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),$1=U(`<div><!></div>`);function e0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Z(t,Q1),o=gg.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=N(()=>Rf(a,o.props));var c=G(),l=R(c),u=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(s)})),K(e,n)},d=e=>{var n=$1();Lo(n,()=>({...H(s)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(l,e=>{t.child?e(u):e(d,-1)}),K(e,c),M()}var t0=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),n0=U(`<div><!></div>`),r0=U(`<!> <!>`,1);function i0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`delay`,3,()=>50),o=Z(t,t0),s=vg.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=N(()=>Rf(o,s.props));var l=G(),u=R(l),d=e=>{var n=r0(),r=R(n);q1(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=B(r,2),a=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:o})),K(e,n)},l=e=>{var n=n0();Lo(n,()=>({...H(c)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(i,e=>{t.child?e(a):e(l,-1)}),K(e,n)};J(u,e=>{s.canScrollDown&&e(d)}),K(e,l),M()}var a0=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),o0=U(`<div><!></div>`),s0=U(`<!> <!>`,1);function c0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`delay`,3,()=>50),o=Z(t,a0),s=yg.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=N(()=>Rf(o,s.props));var l=G(),u=R(l),d=e=>{var n=s0(),r=R(n);q1(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=B(r,2),a=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:o})),K(e,n)},l=e=>{var n=o0();Lo(n,()=>({...H(c)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(i,e=>{t.child?e(a):e(l,-1)}),K(e,n)};J(u,e=>{s.canScrollUp&&e(d)}),K(e,l),M()}var l0=Cp({component:`label`,parts:[`root`]}),u0=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pp(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=N(()=>({id:this.opts.id.current,[l0.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return H(this.#e)}set props(e){I(this.#e,e)}},d0=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),f0=U(`<label><!></label>`);function p0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Z(t,d0),o=u0.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=N(()=>Rf(a,o.props,{for:t.for}));var c=G(),l=R(c),u=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(s)})),K(e,n)},d=e=>{var n=f0();Lo(n,()=>({...H(s),for:t.for})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(l,e=>{t.child?e(u):e(d,-1)}),K(e,c),M()}var m0=Cp({component:`progress`,parts:[`root`]}),h0=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=pp(this.opts.ref)}#e=N(()=>({role:`progressbar`,value:this.opts.value.current,"aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":this.opts.value.current===null?void 0:this.opts.value.current,"data-value":this.opts.value.current===null?void 0:this.opts.value.current,"data-state":g0(this.opts.value.current,this.opts.max.current),"data-max":this.opts.max.current,"data-min":this.opts.min.current,"data-indeterminate":this.opts.value.current===null?``:void 0,[m0.root]:``,...this.attachment}));get props(){return H(this.#e)}set props(e){I(this.#e,e)}};function g0(e,t){return e===null?`indeterminate`:e===t?`loaded`:`loading`}var _0=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`value`,`max`,`min`,`id`,`ref`]),v0=U(`<div><!></div>`);function y0(e,t){let n=ka();j(t,!0);let r=Q(t,`value`,3,0),i=Q(t,`max`,3,100),a=Q(t,`min`,3,0),o=Q(t,`id`,19,()=>Yp(n)),s=Q(t,`ref`,15,null),c=Z(t,_0),l=h0.create({value:$(()=>r()),max:$(()=>i()),min:$(()=>a()),id:$(()=>o()),ref:$(()=>s(),e=>s(e))}),u=N(()=>Rf(c,l.props));var d=G(),p=R(d),m=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(u)})),K(e,n)},h=e=>{var n=v0();Lo(n,()=>({...H(u)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(p,e=>{t.child?e(m):e(h,-1)}),K(e,d),M()}var b0=U(`<!> <!>`,1);function x0(e,t){j(t,!0);let n=Q(t,`value`,15),r=Q(t,`onValueChange`,3,Jp),i=Q(t,`name`,3,``),a=Q(t,`disabled`,3,!1),o=Q(t,`open`,15,!1),s=Q(t,`onOpenChange`,3,Jp),c=Q(t,`onOpenChangeComplete`,3,Jp),l=Q(t,`loop`,3,!1),u=Q(t,`scrollAlignment`,3,`nearest`),d=Q(t,`required`,3,!1),p=Q(t,`items`,19,()=>[]),m=Q(t,`allowDeselect`,3,!1);function h(){n()===void 0&&n(t.type===`single`?``:[])}h(),qf.pre(()=>n(),()=>{h()});let g=F(``),_=ug.create({type:Xi(()=>t.type),value:$(()=>n(),e=>{n(e),r()(e)}),disabled:$(()=>a()),required:$(()=>d()),open:$(()=>o(),e=>{o(e),s()(e)}),loop:$(()=>l()),scrollAlignment:$(()=>u()),name:$(()=>i()),isCombobox:!1,items:$(()=>p()),allowDeselect:$(()=>m()),inputValue:$(()=>H(g),e=>I(g,e,!0)),onOpenChangeComplete:$(()=>c())});var v=b0(),y=R(v);Kh(y,{children:(e,n)=>{var r=G();Y(R(r),()=>t.children??f),K(e,r)},$$slots:{default:!0}});var b=B(y,2),x=e=>{var n=G(),r=R(n),i=e=>{bg(e,{get autocomplete(){return t.autocomplete}})},a=e=>{var n=G();io(R(n),16,()=>_.opts.value.current,e=>e,(e,n)=>{bg(e,{get value(){return n},get autocomplete(){return t.autocomplete}})}),K(e,n)};J(r,e=>{_.opts.value.current.length===0?e(i):e(a,-1)}),K(e,n)},S=N(()=>Array.isArray(_.opts.value.current)),C=e=>{bg(e,{get autocomplete(){return t.autocomplete},get value(){return _.opts.value.current},set value(e){_.opts.value.current=e}})};J(b,e=>{H(S)?e(x):e(C,-1)}),K(e,v),M()}var S0=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`id`,`placeholder`,`child`,`children`]),C0=U(`<span><!></span>`);function w0(e,t){let n=ka();j(t,!0);let r=Q(t,`ref`,15,null),i=Q(t,`id`,19,()=>Yp(n)),a=Z(t,S0),o=dg.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e)),placeholder:$(()=>t.placeholder)}),s=N(()=>Rf(a,o.props));var c=G(),l=R(c),u=e=>{var n=G(),r=R(n);{let e=N(()=>({props:H(s),...o.snippetProps}));Y(r,()=>t.child,()=>H(e))}K(e,n)},d=e=>{var n=C0();Lo(n,()=>({...H(s)}));var r=L(n),i=e=>{var n=G();Y(R(n),()=>t.children??f,()=>o.snippetProps),K(e,n)},a=e=>{var n=W();V(()=>q(n,o.snippetProps.selection.selected?.label??t.placeholder)),K(e,n)},c=e=>{var n=W();V(e=>q(n,e),[()=>o.snippetProps.selection.selected.length>0?o.snippetProps.selection.selected.map(e=>e.label).join(`, `):t.placeholder]),K(e,n)},l=e=>{var n=W();V(()=>q(n,t.placeholder)),K(e,n)};J(r,e=>{t.children?e(i):o.snippetProps.selection.type===`single`?e(a,1):o.snippetProps.selection.type===`multiple`&&o.snippetProps.selection.selected?e(c,2):e(l,-1)}),k(n),K(e,n)};J(l,e=>{t.child?e(u):e(d,-1)}),K(e,c),M()}var T0=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`type`]),E0=U(`<button><!></button>`);function D0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`type`,3,`button`),o=Z(t,T0),s=fg.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=N(()=>Rf(o,s.props,{type:a()}));var l=G();X(R(l),()=>xg,(e,n)=>{n(e,{get id(){return r()},get ref(){return s.opts.ref},children:(e,n)=>{var r=G(),i=R(r),a=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(c)})),K(e,n)},o=e=>{var n=E0();Lo(n,()=>({...H(c)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(i,e=>{t.child?e(a):e(o,-1)}),K(e,r)},$$slots:{default:!0}})}),K(e,l),M()}var O0=Cp({component:`switch`,parts:[`root`,`thumb`]}),k0=new Wf(`Switch.Root`),A0=class e{static create(t){return k0.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=pp(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){e.key!==`Enter`&&e.key!==` `||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=N(()=>({"data-disabled":gp(this.opts.disabled.current),"data-state":yp(this.opts.checked.current),"data-required":gp(this.opts.required.current)}));get sharedProps(){return H(this.#t)}set sharedProps(e){I(this.#t,e)}#n=N(()=>({checked:this.opts.checked.current}));get snippetProps(){return H(this.#n)}set snippetProps(e){I(this.#n,e)}#r=N(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:_p(this.opts.disabled.current),"aria-checked":xp(this.opts.checked.current,!1),"aria-required":mp(this.opts.required.current),[O0.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return H(this.#r)}set props(e){I(this.#r,e)}},j0=class e{static create(){return new e(k0.get())}root;#e=N(()=>this.root.opts.name.current!==void 0);get shouldRender(){return H(this.#e)}set shouldRender(e){I(this.#e,e)}constructor(e){this.root=e}#t=N(()=>({type:`checkbox`,name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},M0=class e{static create(t){return new e(t,k0.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref)}#e=N(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return H(this.#e)}set snippetProps(e){I(this.#e,e)}#t=N(()=>({...this.root.sharedProps,id:this.opts.id.current,[O0.thumb]:``,...this.attachment}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}};function N0(e,t){j(t,!1);let n=j0.create();qo();var r=G(),i=R(r),a=e=>{Vh(e,ts(()=>n.props))};J(i,e=>{n.shouldRender&&e(a)}),K(e,r),M()}var P0=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),F0=U(`<button><!></button>`),I0=U(`<!> <!>`,1);function L0(e,t){let n=ka();j(t,!0);let r=Q(t,`ref`,15,null),i=Q(t,`id`,19,()=>Yp(n)),a=Q(t,`disabled`,3,!1),o=Q(t,`required`,3,!1),s=Q(t,`checked`,15,!1),c=Q(t,`value`,3,`on`),l=Q(t,`name`,3,void 0),u=Q(t,`type`,3,`button`),d=Q(t,`onCheckedChange`,3,Jp),p=Z(t,P0),m=A0.create({checked:$(()=>s(),e=>{s(e),d()?.(e)}),disabled:$(()=>a()??!1),required:$(()=>o()),value:$(()=>c()),name:$(()=>l()),id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),h=N(()=>Rf(p,m.props,{type:u()}));var g=I0(),_=R(g),v=e=>{var n=G(),r=R(n);{let e=N(()=>({props:H(h),...m.snippetProps}));Y(r,()=>t.child,()=>H(e))}K(e,n)},y=e=>{var n=F0();Lo(n,()=>({...H(h)})),Y(L(n),()=>t.children??f,()=>m.snippetProps),k(n),K(e,n)};J(_,e=>{t.child?e(v):e(y,-1)}),N0(B(_,2),{}),K(e,g),M()}var R0=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),z0=U(`<span><!></span>`);function B0(e,t){let n=ka();j(t,!0);let r=Q(t,`ref`,15,null),i=Q(t,`id`,19,()=>Yp(n)),a=Z(t,R0),o=M0.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),s=N(()=>Rf(a,o.props));var c=G(),l=R(c),u=e=>{var n=G(),r=R(n);{let e=N(()=>({props:H(s),...o.snippetProps}));Y(r,()=>t.child,()=>H(e))}K(e,n)},d=e=>{var n=z0();Lo(n,()=>({...H(s)})),Y(L(n),()=>t.children??f,()=>o.snippetProps),k(n),K(e,n)};J(l,e=>{t.child?e(u):e(d,-1)}),K(e,c),M()}var V0=Cp({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),H0=new Wf(`Tabs.Root`),U0=class e{static create(t){return H0.set(new e(t))}opts;attachment;rovingFocusGroup;#e=F(xn([]));get triggerIds(){return H(this.#e)}set triggerIds(e){I(this.#e,e,!0)}valueToTriggerId=new Hf;valueToContentId=new Hf;constructor(e){this.opts=e,this.attachment=pp(e.ref),this.rovingFocusGroup=new Gp({candidateAttr:V0.trigger,rootAttr:V0.root,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=N(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[V0.root]:``,...this.attachment}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},W0=class e{static create(t){return new e(t,H0.get())}opts;root;attachment;#e=N(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref)}#t=N(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[V0.list]:``,"data-disabled":gp(H(this.#e)),...this.attachment}));get props(){return H(this.#t)}set props(e){I(this.#t,e)}},G0=class e{static create(t){return new e(t,H0.get())}opts;root;attachment;#e=F(0);#t=N(()=>this.root.opts.value.current===this.opts.value.current);#n=N(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=N(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref),qf([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),Sr(()=>{this.root.triggerIds.length,H(this.#t)||!this.root.opts.value.current?I(this.#e,0):I(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||H(this.#n)||this.#i()}onclick(e){H(this.#n)||this.#i()}onkeydown(e){H(this.#n)||(e.key===` `||e.key===`Enter`?(e.preventDefault(),this.#i()):this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e))}#a=N(()=>({id:this.opts.id.current,role:`tab`,"data-state":q0(H(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":gp(H(this.#n)),"aria-selected":mp(H(this.#t)),"aria-controls":H(this.#r),[V0.trigger]:``,disabled:_p(H(this.#n)),tabindex:H(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return H(this.#a)}set props(e){I(this.#a,e)}},K0=class e{static create(t){return new e(t,H0.get())}opts;root;attachment;#e=N(()=>this.root.opts.value.current===this.opts.value.current);#t=N(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=pp(e.ref),qf([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=N(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:_p(!H(this.#e)),tabindex:this.opts.tabindex.current,"data-value":this.opts.value.current,"data-state":q0(H(this.#e)),"aria-labelledby":H(this.#t),"data-orientation":this.root.opts.orientation.current,[V0.content]:``,...this.attachment}));get props(){return H(this.#n)}set props(e){I(this.#n,e)}};function q0(e){return e?`active`:`inactive`}var J0=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),Y0=U(`<div><!></div>`);function X0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`value`,15,``),o=Q(t,`onValueChange`,3,Jp),s=Q(t,`orientation`,3,`horizontal`),c=Q(t,`loop`,3,!0),l=Q(t,`activationMode`,3,`automatic`),u=Q(t,`disabled`,3,!1),d=Z(t,J0),p=U0.create({id:$(()=>r()),value:$(()=>a(),e=>{a(e),o()(e)}),orientation:$(()=>s()),loop:$(()=>c()),activationMode:$(()=>l()),disabled:$(()=>u()),ref:$(()=>i(),e=>i(e))}),m=N(()=>Rf(d,p.props));var h=G(),g=R(h),_=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(m)})),K(e,n)},v=e=>{var n=Y0();Lo(n,()=>({...H(m)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(g,e=>{t.child?e(_):e(v,-1)}),K(e,h),M()}var Z0=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`,`tabindex`]),Q0=U(`<div><!></div>`);function $0(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Q(t,`tabindex`,3,0),o=Z(t,Z0),s=K0.create({value:$(()=>t.value),tabindex:$(()=>a()??0),id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=N(()=>Rf(o,s.props));var l=G(),u=R(l),d=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(c)})),K(e,n)},p=e=>{var n=Q0();Lo(n,()=>({...H(c)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(u,e=>{t.child?e(d):e(p,-1)}),K(e,l),M()}var ev=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),tv=U(`<div><!></div>`);function nv(e,t){let n=ka();j(t,!0);let r=Q(t,`id`,19,()=>Yp(n)),i=Q(t,`ref`,15,null),a=Z(t,ev),o=W0.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=N(()=>Rf(a,o.props));var c=G(),l=R(c),u=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(s)})),K(e,n)},d=e=>{var n=tv();Lo(n,()=>({...H(s)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(l,e=>{t.child?e(u):e(d,-1)}),K(e,c),M()}var rv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),iv=U(`<button><!></button>`);function av(e,t){let n=ka();j(t,!0);let r=Q(t,`disabled`,3,!1),i=Q(t,`id`,19,()=>Yp(n)),a=Q(t,`type`,3,`button`),o=Q(t,`ref`,15,null),s=Z(t,rv),c=G0.create({id:$(()=>i()),disabled:$(()=>r()??!1),value:$(()=>t.value),ref:$(()=>o(),e=>o(e))}),l=N(()=>Rf(s,c.props,{type:a()}));var u=G(),d=R(u),p=e=>{var n=G();Y(R(n),()=>t.child,()=>({props:H(l)})),K(e,n)},m=e=>{var n=iv();Lo(n,()=>({...H(l)})),Y(L(n),()=>t.children??f),k(n),K(e,n)};J(d,e=>{t.child?e(p):e(m,-1)}),K(e,u),M()}var ov=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function sv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,ov);var i=G(),a=R(i);{let e=N(()=>Td(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));X(a,()=>p0,(t,i)=>{i(t,ts({"data-slot":`label`,get class(){return H(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}K(e,i),M()}var cv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);function lv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`data-slot`,3,`separator`),i=Z(t,cv);var a=G(),o=R(a);{let e=N(()=>Td(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,t.class));X(o,()=>P1,(t,a)=>{a(t,ts({get"data-slot"(){return r()},get class(){return H(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}K(e,a),M()}var uv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function dv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,uv);var i=G(),a=R(i);{let e=N(()=>Td(`text-sm flex-1 outline-none`,t.class));X(a,()=>$0,(t,i)=>{i(t,ts({"data-slot":`tabs-content`,get class(){return H(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}K(e,i),M()}var fv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function pv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,fv);var i=G(),a=R(i);{let e=N(()=>Td(`gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 relative inline-flex h-[calc(100%_-_1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,t.class));X(a,()=>av,(t,i)=>{i(t,ts({"data-slot":`tabs-trigger`,get class(){return H(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}K(e,i),M()}var mv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function hv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`value`,15,``),i=Z(t,mv);var a=G(),o=R(a);{let e=N(()=>Td(`gap-2 group/tabs flex data-horizontal:flex-col`,t.class));X(o,()=>X0,(t,a)=>{a(t,ts({"data-slot":`tabs`,get class(){return H(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))})}K(e,a),M()}var gv=ju({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col`,variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),_v=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function vv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`variant`,3,`default`),i=Z(t,_v);var a=G(),o=R(a);{let e=N(()=>Td(gv({variant:r()}),t.class));X(o,()=>nv,(t,a)=>{a(t,ts({"data-slot":`tabs-list`,get"data-variant"(){return r()},get class(){return H(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}K(e,a),M()}var yv=new Set([`$$slots`,`$$events`,`$$legacy`]);function bv(e,t){let n=Z(t,yv);var r=G();X(R(r),()=>im,(e,t)=>{t(e,ts(()=>n))}),K(e,r)}var xv={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Sv=(...e)=>{let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of n.split(/\s+/))e&&t.add(e);return[...t].join(` `)};function Cv(e){return e!=null}function wv(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??xv.width,a=e.size??e.height??xv.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Sv(...c):Sv(`lucide`,...s,...c),u=t.strokeWidth??xv[`stroke-width`];if(t.absoluteStrokeWidth){let n=Number(u)*Number(e.size??e.width??xv.width)/Number(t.size??t.width??xv.width);Number.isFinite(n)&&(u=n)}return[`svg`,{...Object.entries(xv).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Cv(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Cv(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Cv(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var Tv=e=>{if(typeof e!=`object`||!e)return!1;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith(`aria-`)||t===`role`||t===`title`)&&e[t]!=null)return!0;return!1},Ev=Symbol(`lucide-context`),Dv=()=>at(Ev),Ov=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),kv=Oa(`<svg><!><!></svg>`);function Av(e,t){j(t,!0);let n=Dv()??{},r=Q(t,`color`,19,()=>n.color??`currentColor`),i=Q(t,`size`,19,()=>n.size??24),a=Q(t,`width`,19,i),o=Q(t,`height`,19,i),s=Q(t,`strokeWidth`,19,()=>n.strokeWidth??2),c=Q(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),l=Q(t,`nonScalingStroke`,19,()=>n.nonScalingStroke??!1),u=Q(t,`iconNode`,19,()=>[]),d=Q(t,`icon`,19,()=>({node:u(),aliases:[],size:24})),p=Z(t,Ov),m=N(()=>!!t.children||Tv(p)),h=N(()=>wv(d(),{color:r(),width:a(),height:o(),strokeWidth:s(),absoluteStrokeWidth:c(),nonScalingStroke:l(),className:Sv(`lucide-icon`,n.class),hasA11yProp:H(m),attributes:p})),v=N(()=>_(H(h),3)),y=N(()=>H(v)[1]),b=N(()=>g(H(v)[2],()=>[],!0)),x=N(()=>({...H(y),class:[...H(y).class.split(` `),t.class]}));var S=kv();Lo(S,()=>({...H(x)}));var C=L(S);io(C,17,()=>H(b),Xa,(e,t)=>{var n=N(()=>_(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=G();fo(R(a),r,!0,(e,t)=>{Lo(e,()=>({...i()}))}),K(e,a)}),Y(B(C),()=>t.children??f),k(S),K(e,S),M()}var jv={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`}]]};jv.node;var Mv=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nv(e,t){let n=Z(t,Mv);Av(e,ts(()=>n,{get icon(){return jv}}))}var Pv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Fv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,Pv);var i=G(),a=R(i);{let e=N(()=>Td(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));X(a,()=>i0,(t,i)=>{i(t,ts({"data-slot":`select-scroll-down-button`,get class(){return H(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{Nv(e,{})},$$slots:{default:!0}}))})}K(e,i),M()}var Iv={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`}]]};Iv.node;var Lv=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rv(e,t){let n=Z(t,Lv);Av(e,ts(()=>n,{get icon(){return Iv}}))}var zv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Bv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,zv);var i=G(),a=R(i);{let e=N(()=>Td(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));X(a,()=>c0,(t,i)=>{i(t,ts({"data-slot":`select-scroll-up-button`,get class(){return H(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{Rv(e,{})},$$slots:{default:!0}}))})}K(e,i),M()}var Vv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`portalProps`,`children`,`preventScroll`]),Hv=U(`<!> <!> <!>`,1);function Uv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`sideOffset`,3,4),i=Q(t,`preventScroll`,3,!0),a=Z(t,Vv);bv(e,ts(()=>t.portalProps,{children:(e,o)=>{var s=G(),c=R(s);{let e=N(()=>Td(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--bits-select-content-available-height) origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,t.class));X(c,()=>K1,(o,s)=>{s(o,ts({get sideOffset(){return r()},get preventScroll(){return i()},"data-slot":`select-content`,get class(){return H(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=Hv(),i=R(r);Bv(i,{});var a=B(i,2);{let e=N(()=>Td(`h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1`));X(a,()=>e0,(n,r)=>{r(n,{get class(){return H(e)},children:(e,n)=>{var r=G();Y(R(r),()=>t.children??f),K(e,r)},$$slots:{default:!0}})})}Fv(B(a,2),{}),K(e,r)},$$slots:{default:!0}}))})}K(e,s)},$$slots:{default:!0}})),M()}var Wv={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`}]]};Wv.node;var Gv=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kv(e,t){let n=Z(t,Gv);Av(e,ts(()=>n,{get icon(){return Wv}}))}var qv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`,`label`,`children`]),Jv=U(`<span class="pointer-events-none absolute right-2 flex size-4 items-center justify-center"><!></span> <span class="flex flex-1 gap-2 shrink-0 whitespace-nowrap"><!></span>`,1);function Yv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,qv);var i=G(),a=R(i);{let e=(e,n)=>{let r=()=>(n?.()).selected,i=()=>(n?.()).highlighted;var a=Jv(),o=R(a),s=L(o),c=e=>{Kv(e,{class:`pointer-events-none`})};J(s,e=>{r()&&e(c)}),k(o);var l=B(o,2),u=L(l),d=e=>{var n=G();Y(R(n),()=>t.children,()=>({selected:r(),highlighted:i()})),K(e,n)},f=e=>{var n=W();V(()=>q(n,t.label||t.value)),K(e,n)};J(u,e=>{t.children?e(d):e(f,-1)}),k(l),K(e,a)},i=N(()=>Td(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-highlighted:bg-accent data-highlighted:text-accent-foreground`,t.class));X(a,()=>Z1,(a,o)=>{o(a,ts({get value(){return t.value},get label(){return t.label},"data-slot":`select-item`,get class(){return H(i)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:e,$$slots:{default:!0}}))})}K(e,i),M()}var Xv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),Zv=U(`<!> <!>`,1);function Qv(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`size`,3,`default`),i=Z(t,Xv);var a=G(),o=R(a);{let e=N(()=>Td(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,t.class));X(o,()=>D0,(a,o)=>{o(a,ts({"data-slot":`select-trigger`,get"data-size"(){return r()},get class(){return H(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=Zv(),i=R(r);Y(i,()=>t.children??f),Nv(B(i,2),{class:`text-muted-foreground size-4 pointer-events-none`}),K(e,r)},$$slots:{default:!0}}))})}K(e,a),M()}var $v=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function ey(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,$v);var i=G();X(R(i),()=>w0,(e,t)=>{t(e,ts({"data-slot":`select-value`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),K(e,i),M()}var ty=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`]);function ny(e,t){j(t,!0);let n=Q(t,`open`,15,!1),r=Q(t,`value`,15),i=Z(t,ty);var a=G();X(R(a),()=>x0,(e,t)=>{t(e,ts(()=>i,{get open(){return n()},set open(e){n(e)},get value(){return r()},set value(e){r(e)}}))}),K(e,a),M()}var ry=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),iy=U(`<tbody><!></tbody>`);function ay(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,ry);var i=iy();Lo(i,e=>({"data-slot":`table-body`,class:e,...r}),[()=>Td(`[&_tr:last-child]:border-0`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var oy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),sy=U(`<td><!></td>`);function cy(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,oy);var i=sy();Lo(i,e=>({"data-slot":`table-cell`,class:e,...r}),[()=>Td(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var ly=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),uy=U(`<th><!></th>`);function dy(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,ly);var i=uy();Lo(i,e=>({"data-slot":`table-head`,class:e,...r}),[()=>Td(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var fy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),py=U(`<thead><!></thead>`);function my(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,fy);var i=py();Lo(i,e=>({"data-slot":`table-header`,class:e,...r}),[()=>Td(`[&_tr]:border-b`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var hy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),gy=U(`<tr><!></tr>`);function _y(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,hy);var i=gy();Lo(i,e=>({"data-slot":`table-row`,class:e,...r}),[()=>Td(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var vy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),yy=U(`<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>`);function by(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,vy);var i=yy(),a=L(i);Lo(a,e=>({"data-slot":`table`,class:e,...r}),[()=>Td(`w-full caption-bottom text-sm`,t.class)]),Y(L(a),()=>t.children??f),k(a),Ko(a,e=>n(e),()=>n()),k(i),K(e,i),M()}var xy=0;function Sy(){return xy+=1,xy}var Cy=U(` <button type="button" class="hover:text-destructive"><!></button>`,1),wy=U(`<button type="button" role="option"> </button>`),Ty=U(`<div role="listbox" class="bg-popover text-popover-foreground absolute top-9 left-0 z-50 max-h-56 w-56 overflow-auto rounded-md p-1 shadow-md ring-1 ring-foreground/10"></div>`),Ey=U(`<div class="flex flex-wrap items-center gap-2"><!> <div class="relative"><!> <!></div></div>`);function Dy(e,t){j(t,!0);let n=Q(t,`value`,31,()=>xn([])),r=Q(t,`numeric`,3,!1),i=F(``),a=F(!1),o=F(-1),s=N(()=>(t.options??[]).filter(e=>!n().includes(e)).filter(e=>{let t=H(i).trim().toLowerCase();return t===``||e.toLowerCase().includes(t)})),c=N(()=>H(o)>=0?H(s)[H(o)]:void 0),l=`tag-input-list-${Sy()}`;function u(e){e&&(n().includes(e)||n([...n(),e]),t.onchange?.(n()))}function d(){let e=H(i).trim();e&&(r()&&!/^\d+$/.test(e)||u(e),I(i,``))}function f(e){u(e),I(i,``),I(a,!1),I(o,-1)}function p(e){n(n().filter(t=>t!==e)),t.onchange?.(n())}function m(e){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(H(s).length===0)return;e.preventDefault(),I(a,!0),I(o,e.key===`ArrowDown`?(H(o)+1)%H(s).length:(H(o)-1+H(s).length)%H(s).length,!0)}else e.key===`Enter`||e.key===`,`?(e.preventDefault(),H(c)?f(H(c)):d()):e.key===`Escape`&&(I(a,!1),I(o,-1))}function h(){I(a,!1),I(o,-1);let e=H(i).trim();if(!e)return;let t=H(s).find(t=>t.toLowerCase()===e.toLowerCase());t?(u(t),I(i,``)):H(s).length>0||d()}var g=Ey(),_=L(g);io(_,16,n,e=>e,(e,t)=>{Od(e,{variant:`secondary`,class:`gap-1`,children:(e,n)=>{A();var r=Cy(),i=R(r),a=B(i);Cs(L(a),{class:`size-3`}),k(a),V(()=>{q(i,`${t??``} `),Fo(a,`aria-label`,`删除 ${t}`)}),ga(`click`,a,()=>p(t)),K(e,r)},$$slots:{default:!0}})});var v=B(_,2),y=L(v);{let e=N(()=>r()?`numeric`:`text`),n=N(()=>t.options?`combobox`:void 0),s=N(()=>t.options?H(a):void 0),u=N(()=>t.options?`list`:void 0),d=N(()=>t.options?l:void 0),f=N(()=>t.options&&H(c)?`${l}-option-${H(o)}`:void 0);Id(y,{get id(){return t.id},class:`h-8 w-44`,get placeholder(){return t.placeholder},get inputmode(){return H(e)},get role(){return H(n)},get"aria-expanded"(){return H(s)},get"aria-autocomplete"(){return H(u)},get"aria-controls"(){return H(d)},get"aria-activedescendant"(){return H(f)},onfocus:()=>{t.options&&I(a,!0)},oninput:()=>{I(o,-1),t.options&&I(a,!0)},onkeydown:m,onblur:h,get value(){return H(i)},set value(e){I(i,e,!0)}})}var b=B(y,2),x=e=>{var t=Ty();io(t,22,()=>H(s),e=>e,(e,t,n)=>{var r=wy();let i;var a=z(r,!0);V(()=>{Fo(r,`id`,`${l}-option-${H(n)}`),Fo(r,`aria-selected`,t===H(c)),i=mo(r,1,`hover:bg-accent hover:text-accent-foreground w-full rounded-sm px-2 py-1 text-left font-mono text-xs`,null,i,{"bg-accent":t===H(c)}),q(a,t)}),ga(`mousedown`,r,e=>{e.preventDefault(),f(t)}),K(e,r)}),k(t),V(()=>Fo(t,`id`,l)),K(e,t)};J(b,e=>{t.options&&H(a)&&H(s).length>0&&e(x)}),k(v),k(g),K(e,g),M()}_a([`click`,`mousedown`]);function Oy(e){return e==null?``:String(e)}function ky(e){return Array.isArray(e)?e.map(e=>String(e)):typeof e==`string`&&e.trim()?e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0):[]}var Ay=U(`<!> 新增聊天`,1),jy=U(`<p> </p>`),My=U(`<li> </li>`),Ny=U(`<ul class="text-muted-foreground space-y-1 text-xs"></ul>`),Py=U(`<p class="text-muted-foreground text-sm">正在读取会话覆盖…</p>`),Fy=U(`<p class="text-muted-foreground text-sm">没有明确放行的聊天:access 名单为空时按 access.allowAllWhenEmpty 决定放不放行。</p>`),Iy=U(`<span class="text-muted-foreground">已配置</span> <!>`,1),Ly=U(`<li class="flex items-center gap-2 rounded-md border px-2 py-1 text-xs"><span class="font-mono"> </span> <!></li>`),Ry=U(`<ul class="flex flex-wrap gap-2"></ul>`),zy=U(`<p class="text-muted-foreground text-xs">配置里有某一类聊天是「名单为空就全放行」,实际放行范围以运行时判定为准。</p>`),By=U(`<p class="text-muted-foreground text-sm">还没有任何覆盖,全部按默认行为走。</p>`),Vy=U(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),Hy=U(` <!>`,1),Uy=U(`<!> 编辑`,1),Wy=U(`<!> 删除`,1),Gy=U(`<div class="flex items-center gap-1"><!> <!></div>`),Ky=U(`<!> <!>`,1),qy=U(`<p class="text-destructive text-xs"> </p>`),Jy=U(`<!> <!> <!>`,1),Yy=U(`<div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs"> </p> <!></div>`),Xy=U(`<!> 保存`,1),Zy=U(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="space-y-1.5"><!> <!> <!></div> <div class="grid gap-4 md:grid-cols-2"></div> <div class="flex items-center gap-2"><!> <!></div></section>`),Qy=U(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">准入放行的聊天</h2> <!> <!></section> <section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">聊天覆盖</h2> <p class="text-muted-foreground text-xs">会话覆盖只对准入放行的聊天生效:没放行的聊天改不了覆盖,已经写好的条目原样留着,等这个聊天放行时自然生效。</p> <!></section> <!>`,1),$y=U(`<p class="text-muted-foreground text-sm">没有放行的聊天,也没有已经写好的档案:填上面的聊天键就能上传。</p>`),e2=U(`<!> <!> <!> <!> <!> <!>`,1),t2=U(`<details><summary class="cursor-pointer">查看内容</summary> <pre class="mt-1 max-h-48 overflow-auto whitespace-pre-wrap"> </pre></details>`),n2=U(`<a class="text-primary inline-flex items-center gap-1 text-xs underline"><!> 下载</a>`),r2=U(`<input type="file" accept=".md,.markdown,.txt"/>`),i2=U(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground font-mono text-xs"> </span> <!> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!> <!> <section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">用户档案(USER.md)</h2> <p class="text-muted-foreground text-xs">每个聊天一份档案,写在 chats/&lt;kind&gt;-&lt;id&gt;/USER.md:上传的文件整份覆盖它,模型只读不改。
7
+ 没放行的聊天不能上传,也不能下载,已经写好的档案原样留着,等这个聊天放行时自然生效。</p> <div class="flex flex-wrap items-end gap-2"><div class="space-y-1.5"><!> <!></div> <input type="file" accept=".md,.markdown,.txt" aria-label="上传到指定聊天的 USER.md"/></div> <p class="text-muted-foreground text-xs">放行范围枚举不出来时,填上面的聊天键再选文件就能上传。</p> <!> <!></section></div>`);function a2(e,t){j(t,!0);let n=[{path:`wake`,label:`唤醒方式`,hint:`all / mention / prefix / none`},{path:`wake.prefixes`,label:`唤醒前缀`,hint:`wake 为 prefix 时用,留空表示不覆盖`},{path:`wake.ignorePrefixes`,label:`忽略前缀`,hint:`命中即整条不理,留空表示跟随全局`},{path:`proactive.enabled`,label:`主动说话`,hint:`留空表示不参与,选中是才参与`},{path:`proactive.startProbability`,label:`主动概率`,hint:`0 到 1 之间的数字`},{path:`diary.enabled`,label:`日记`,hint:`留空表示不生成,选中是才生成`},{path:`collect.privateMs`,label:`私聊收集窗口(毫秒)`,hint:`留空表示跟随全局,0 表示立即回复`},{path:`collect.groupMs`,label:`群聊收集窗口(毫秒)`,hint:`留空表示跟随全局,0 表示立即回复`},{path:`profile`,label:`工具配置档`,hint:`该聊天使用的工具配置档名,留空表示跟随默认`},{path:`agent`,label:`agent`,hint:`覆盖这个聊天用的 agent`},{path:`model`,label:`模型`,hint:`provider/model[/variant]`},{path:`soulPath`,label:`角色设定路径`,hint:`覆盖 soulPath`},{path:`soulName`,label:`角色设定文件名`,hint:`覆盖 soulName`}],r=[`all`,`mention`,`prefix`,`none`],i=`__empty__`,a=F(void 0),o=F(!0),s=F(!1),c=F(``),l=F(`ok`),u=F(xn([])),d=F(xn({})),f=F(xn([])),p=F(void 0),m=F(``),h=F(void 0),g=F(``),v=F(xn({})),y=N(()=>H(a)?.value?.chats??{}),b=N(()=>H(a)?.admitted??{keys:[],allowAll:!1}),x=N(()=>H(p)?.chats??[]);function S(e){return!H(b).allowAll&&!H(b).keys.includes(e)}ns(()=>{C()});async function C(){I(o,!0);try{I(a,await Es.chatOverrides(),!0),I(u,H(a).warnings??[],!0),await w(),await ee(),I(c,``),I(l,`ok`)}catch(e){fe(e)}finally{I(o,!1)}}async function w(){try{let e=await Es.toolProfiles();I(f,Object.keys(e.value?.profiles??{}),!0)}catch{I(f,[],!0)}}async function ee(){try{let e=await Es.userMd();I(p,{chats:e.chats??[],maxBytes:e.maxBytes},!0)}catch{I(p,void 0)}}async function T(e){let t=H(p)?.maxBytes;if(t!==void 0&&e.size>t)throw Error(`档案太大:最多 ${Math.floor(t/1024)} KiB`);let n=await e.arrayBuffer();try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(n)}catch{throw Error(`档案必须是 UTF-8 文本`)}}async function E(e,t){I(s,!0);try{let n=await Es.saveUserMd(e,t);I(p,{chats:n.chats??[],maxBytes:n.maxBytes},!0),I(l,`ok`),I(c,`已上传 ${e} 的 USER.md(${n.bytes} 字节)。${n.note}`)}catch(e){fe(e)}finally{I(s,!1)}}async function te(e,t){let n=t.currentTarget,r=n.files?.[0];if(r)try{await E(e,await T(r))}catch(e){fe(e)}finally{n.value=``}}async function ne(e){let t=e.currentTarget,n=t.files?.[0],r=H(m).trim();if(n&&r)try{await E(r,await T(n)),I(m,``)}catch(e){fe(e)}finally{t.value=``}}function re(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e,n=`${t.providerID??``}/${t.id??``}`;return t.variant?`${n}/${t.variant}`:n}return``}function ie(e){return(H(a)?.masked??[]).includes(e)}function ae(e){let t=H(y)[e];I(h,e,!0),I(g,e,!0),I(v,{wake:t?.wake??``,"wake.prefixes":ky(t?.[`wake.prefixes`]),"wake.ignorePrefixes":ky(t?.[`wake.ignorePrefixes`]),"proactive.enabled":t?.[`proactive.enabled`]===void 0?``:String(t[`proactive.enabled`]),"proactive.startProbability":t?.[`proactive.startProbability`]===void 0?``:String(t[`proactive.startProbability`]),"diary.enabled":t?.[`diary.enabled`]===void 0?``:String(t[`diary.enabled`]),"collect.privateMs":t?.[`collect.privateMs`]===void 0?``:String(t[`collect.privateMs`]),"collect.groupMs":t?.[`collect.groupMs`]===void 0?``:String(t[`collect.groupMs`]),profile:t?.profile??``,agent:t?.agent??``,model:re(t?.model),soulPath:t?.soulPath??``,soulName:t?.soulName??``},!0);for(let t of n)ie(`chats.${e}.${t.path}`)&&(H(v)[t.path]=``);I(d,{},!0),I(c,``)}function oe(e){I(h,``),I(g,typeof e==`string`?e:``,!0),I(v,{wake:``,"wake.prefixes":[],"wake.ignorePrefixes":[],"proactive.enabled":``,"proactive.startProbability":``,"diary.enabled":``,"collect.privateMs":``,"collect.groupMs":``,profile:``,agent:``,model:``,soulPath:``,soulName:``},!0),I(d,{},!0),I(c,``)}function se(){I(h,void 0),I(d,{},!0)}function ce(e){let t=H(v)[e];if(e===`wake.prefixes`||e===`wake.ignorePrefixes`){let e=ky(t);return e.length>0?e:null}if(e===`proactive.enabled`||e===`diary.enabled`)return t===`true`||t!==`false`&&null;if(e===`proactive.startProbability`||e===`collect.privateMs`||e===`collect.groupMs`){if(t===``||t==null)return null;let e=Number(t);return Number.isFinite(e)?e:String(t)}let n=String(t??``).trim();return n===``?null:n}async function le(){let e=H(g).trim();if(e===``){I(d,{key:`请填写聊天键`},!0),I(l,`error`),I(c,`聊天键不能为空`);return}let r=H(h)===``;if(r&&Object.hasOwn(H(y),e)){I(d,{key:`这个聊天已经有覆盖了,点「编辑」来改`},!0),I(l,`error`),I(c,`这个聊天已经有覆盖了,点「编辑」来改`);return}if(H(v).wake===`prefix`&&ky(H(v)[`wake.prefixes`]).length===0){I(d,{[`chats.${e}.wake.prefixes`]:`选择 prefix 唤醒时必须写至少一个前缀`},!0),I(l,`error`),I(c,`选择 prefix 唤醒时必须写至少一个前缀`);return}let i={};for(let t of n){if(ie(`chats.${e}.${t.path}`)&&de(H(v)[t.path]))continue;let n=ce(t.path);r&&n===null||(i[t.path]=n)}if(Object.keys(i).length===0)I(d,{key:`至少填写一项再保存`},!0),I(l,`error`),I(c,`至少填写一项再保存`);else{I(s,!0);try{let n=await Es.saveChatOverrides({chats:{[e]:i}});I(a,n.document,!0),I(u,n.warnings??[],!0),I(h,void 0),I(d,{},!0),I(l,`ok`),I(c,n.restartRequired?n.note:`已保存。${n.note}`,!0),n.restartRequired&&t.onrestart?.([`chat-overrides:${e}`])}catch(e){fe(e)}finally{I(s,!1)}}}async function ue(e){I(s,!0);try{let t=await Es.saveChatOverrides({chats:{[e]:null}});I(a,t.document,!0),I(u,t.warnings??[],!0),I(d,{},!0),I(l,`ok`),I(c,`已删除 ${e}。${t.note}`),H(h)===e&&I(h,void 0)}catch(e){fe(e)}finally{I(s,!1)}}function de(e){return e==null?!0:Array.isArray(e)?e.length===0:String(e).trim()===``}function fe(e){if(I(l,`error`),e instanceof ws){if(e.fields.length>0){let t={};for(let n of e.fields)t[n.path]=n.message;I(d,t,!0),I(c,e.fields.map(e=>e.message).join(`;`),!0)}else I(c,e.message,!0)}else I(c,e instanceof Error?e.message:String(e),!0)}function pe(e){return H(d)[e]??``}function me(e){return e==null||e===``?`-`:Array.isArray(e)?e.length>0?e.join(` / `):`-`:String(e)}function he(e){let t=[];return e[`collect.privateMs`]!==void 0&&t.push(`私 ${e[`collect.privateMs`]}ms`),e[`collect.groupMs`]!==void 0&&t.push(`群 ${e[`collect.groupMs`]}ms`),t.length>0?t.join(` / `):`-`}var ge=i2(),_e=L(ge),ve=L(_e),ye=z(ve,!0),be=B(ve,2),xe=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`文件不存在,保存后新建`))},$$slots:{default:!0}})};J(be,e=>{H(a)&&!H(a).exists&&e(xe)});var Se=B(be,2),Ce=L(Se);Nd(Ce,{variant:`ghost`,size:`sm`,onclick:()=>void C(),children:(e,t)=>{A(),K(e,W(`重新读取`))},$$slots:{default:!0}}),Nd(B(Ce,2),{size:`sm`,onclick:()=>oe(),children:(e,t)=>{var n=Ay();gs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),k(Se),k(_e);var we=B(_e,2),Te=e=>{var t=jy(),n=z(t,!0);V(()=>{mo(t,1,Wa(H(l)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),q(n,H(c))}),K(e,t)};J(we,e=>{H(c)&&e(Te)});var Ee=B(we,2),D=e=>{var t=Ny();io(t,21,()=>H(u),Xa,(e,t)=>{var n=My(),r=z(n);V(()=>q(r,`· ${H(t)??``}`)),K(e,n)}),k(t),K(e,t)};J(Ee,e=>{H(u).length>0&&e(D)});var De=B(Ee,2),O=e=>{K(e,Py())},Oe=e=>{var t=Qy(),a=R(t),o=B(L(a),2),c=e=>{K(e,Fy())},l=e=>{var t=Ry();io(t,20,()=>H(b).keys,e=>e,(e,t)=>{var n=Ly(),r=L(n),i=z(r,!0),a=B(r,2),o=e=>{var n=Iy();Nd(B(R(n),2),{variant:`ghost`,size:`sm`,onclick:()=>ae(t),children:(e,t)=>{A(),K(e,W(`编辑`))},$$slots:{default:!0}}),K(e,n)},s=N(()=>Object.hasOwn(H(y),t)),c=e=>{Nd(e,{variant:`ghost`,size:`sm`,onclick:()=>oe(t),children:(e,t)=>{A(),K(e,W(`新增覆盖`))},$$slots:{default:!0}})};J(a,e=>{H(s)?e(o):e(c,-1)}),k(n),V(()=>q(i,t)),K(e,n)}),k(t),K(e,t)};J(o,e=>{H(b).keys.length===0?e(c):e(l,-1)});var u=B(o,2),d=e=>{K(e,zy())};J(u,e=>{H(b).allowAll&&e(d)}),k(a);var p=B(a,2),m=B(L(p),4),x=e=>{K(e,By())},C=N(()=>Object.keys(H(y)).length===0),w=e=>{var t=G();X(R(t),()=>by,(e,t)=>{t(e,{children:(e,t)=>{var n=Ky(),r=R(n);X(r,()=>my,(e,t)=>{t(e,{children:(e,t)=>{var n=G();X(R(n),()=>_y,(e,t)=>{t(e,{children:(e,t)=>{var n=Vy(),r=R(n);X(r,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`聊天键`))},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`唤醒`))},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`前缀`))},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`忽略前缀`))},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`主动`))},$$slots:{default:!0}})});var c=B(s,2);X(c,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`概率`))},$$slots:{default:!0}})});var l=B(c,2);X(l,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`日记`))},$$slots:{default:!0}})});var u=B(l,2);X(u,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`收集`))},$$slots:{default:!0}})});var d=B(u,2);X(d,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`配置档`))},$$slots:{default:!0}})});var f=B(d,2);X(f,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`agent`))},$$slots:{default:!0}})});var p=B(f,2);X(p,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`模型`))},$$slots:{default:!0}})});var m=B(p,2);X(m,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`角色设定`))},$$slots:{default:!0}})}),X(B(m,2),()=>dy,(e,t)=>{t(e,{})}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(r,2),()=>ay,(e,t)=>{t(e,{children:(e,t)=>{var n=G();io(R(n),17,()=>Object.entries(H(y)),([e,t])=>e,(e,t)=>{var n=N(()=>_(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=G();X(R(a),()=>_y,(e,t)=>{t(e,{children:(e,t)=>{var n=Vy(),a=R(n);X(a,()=>cy,(e,t)=>{t(e,{class:`font-mono text-xs`,children:(e,t)=>{A();var n=Hy(),i=R(n),a=B(i),o=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`未放行`))},$$slots:{default:!0}})},s=N(()=>S(r()));J(a,e=>{H(s)&&e(o)}),V(()=>q(i,`${r()??``} `)),K(e,n)},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>cy,(e,t)=>{t(e,{children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i().wake)]),K(e,n)},$$slots:{default:!0}})});var c=B(o,2);X(c,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i()[`wake.prefixes`])]),K(e,n)},$$slots:{default:!0}})});var l=B(c,2);X(l,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i()[`wake.ignorePrefixes`])]),K(e,n)},$$slots:{default:!0}})});var u=B(l,2);X(u,()=>cy,(e,t)=>{t(e,{children:(e,t)=>{A();var n=W();V(()=>q(n,i()[`proactive.enabled`]===void 0?`默认`:i()[`proactive.enabled`]?`开`:`关`)),K(e,n)},$$slots:{default:!0}})});var d=B(u,2);X(d,()=>cy,(e,t)=>{t(e,{children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i()[`proactive.startProbability`])]),K(e,n)},$$slots:{default:!0}})});var f=B(d,2);X(f,()=>cy,(e,t)=>{t(e,{children:(e,t)=>{A();var n=W();V(()=>q(n,i()[`diary.enabled`]===void 0?`默认`:i()[`diary.enabled`]?`开`:`关`)),K(e,n)},$$slots:{default:!0}})});var p=B(f,2);X(p,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>he(i())]),K(e,n)},$$slots:{default:!0}})});var m=B(p,2);X(m,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i().profile)]),K(e,n)},$$slots:{default:!0}})});var h=B(m,2);X(h,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i().agent)]),K(e,n)},$$slots:{default:!0}})});var g=B(h,2);X(g,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(re(i().model))]),K(e,n)},$$slots:{default:!0}})});var _=B(g,2);X(_,()=>cy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{A();var n=W();V(e=>q(n,e),[()=>me(i().soulPath??i().soulName)]),K(e,n)},$$slots:{default:!0}})}),X(B(_,2),()=>cy,(e,t)=>{t(e,{children:(e,t)=>{var n=Gy(),i=L(n);{let e=N(()=>S(r())),t=N(()=>S(r())?`这个聊天还没放行,放行后才能改覆盖`:``);Nd(i,{variant:`ghost`,size:`sm`,get disabled(){return H(e)},get title(){return H(t)},onclick:()=>ae(r()),children:(e,t)=>{var n=Uy();ms(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}})}Nd(B(i,2),{variant:`ghost`,size:`sm`,get disabled(){return H(s)},onclick:()=>void ue(r()),children:(e,t)=>{var n=Wy();Ss(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),k(n),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,a)}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,t)};J(m,e=>{H(C)?e(x):e(w,-1)}),k(p);var ee=B(p,2),T=e=>{var t=Zy(),a=L(t),o=z(a,!0),c=B(a,2),l=L(c);sv(l,{for:`chat-key`,class:`text-sm`,children:(e,t)=>{A(),K(e,W(`聊天键`))},$$slots:{default:!0}});var u=B(l,2);{let e=N(()=>H(h)!==``);Id(u,{id:`chat-key`,get value(){return H(g)},get disabled(){return H(e)},placeholder:`group:100 或 private:200`,oninput:e=>I(g,e.currentTarget.value,!0)})}var d=B(u,2),p=e=>{var t=qy(),n=z(t,!0);V(e=>q(n,e),[()=>pe(`chats`)||pe(`chats.${H(g).trim()}`)]),K(e,t)},m=N(()=>pe(`chats`)||pe(`chats.${H(g).trim()}`));J(d,e=>{H(m)&&e(p)}),k(c);var _=B(c,2);io(_,21,()=>n,e=>e.path,(e,t)=>{var n=Yy(),a=L(n);{let e=N(()=>`chat-${H(t).path}`);sv(a,{get for(){return H(e)},class:`text-sm`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).label)),K(e,r)},$$slots:{default:!0}})}var o=B(a,2),s=e=>{var n=G(),a=R(n);{let e=N(()=>String(H(v)[H(t).path]??``)===``?i:String(H(v)[H(t).path]));X(a,()=>ny,(n,a)=>{a(n,{type:`single`,get value(){return H(e)},onValueChange:e=>H(v)[H(t).path]=e===i?``:e??``,children:(e,n)=>{var a=Ky(),o=R(a);{let e=N(()=>`chat-${H(t).path}`);X(o,()=>Qv,(t,n)=>{n(t,{get id(){return H(e)},class:`w-full`,children:(e,t)=>{var n=G();X(R(n),()=>ey,(e,t)=>{t(e,{placeholder:`跟随默认`})}),K(e,n)},$$slots:{default:!0}})})}X(B(o,2),()=>Uv,(e,t)=>{t(e,{children:(e,t)=>{var n=Ky(),a=R(n);X(a,()=>Yv,(e,t)=>{t(e,{value:i,children:(e,t)=>{A(),K(e,W(`跟随默认`))},$$slots:{default:!0}})}),io(B(a,2),16,()=>r,e=>e,(e,t)=>{var n=G();X(R(n),()=>Yv,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{A();var r=W();V(()=>q(r,t)),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,n)},$$slots:{default:!0}})}),K(e,a)},$$slots:{default:!0}})})}K(e,n)},c=e=>{{let n=N(()=>`chat-${H(t).path}`),r=N(()=>ky(H(v)[H(t).path]));Dy(e,{get id(){return H(n)},get value(){return H(r)},placeholder:`输入前缀后回车`,onchange:e=>H(v)[H(t).path]=e})}},l=e=>{var n=G(),r=R(n);{let e=N(()=>String(H(v)[H(t).path]??``)===``?i:String(H(v)[H(t).path]));X(r,()=>ny,(n,r)=>{r(n,{type:`single`,get value(){return H(e)},onValueChange:e=>H(v)[H(t).path]=e===i?``:e??``,children:(e,n)=>{var r=Ky(),a=R(r);{let e=N(()=>`chat-${H(t).path}`);X(a,()=>Qv,(t,n)=>{n(t,{get id(){return H(e)},class:`w-full`,children:(e,t)=>{var n=G();X(R(n),()=>ey,(e,t)=>{t(e,{placeholder:`不参与`})}),K(e,n)},$$slots:{default:!0}})})}X(B(a,2),()=>Uv,(e,t)=>{t(e,{children:(e,t)=>{var n=Jy(),r=R(n);X(r,()=>Yv,(e,t)=>{t(e,{value:i,children:(e,t)=>{A(),K(e,W(`不参与`))},$$slots:{default:!0}})});var a=B(r,2);X(a,()=>Yv,(e,t)=>{t(e,{value:`true`,children:(e,t)=>{A(),K(e,W(`开`))},$$slots:{default:!0}})}),X(B(a,2),()=>Yv,(e,t)=>{t(e,{value:`false`,children:(e,t)=>{A(),K(e,W(`关`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})})}K(e,n)},u=e=>{var n=G(),r=R(n);{let e=N(()=>String(H(v)[H(t).path]??``)===``?i:String(H(v)[H(t).path]));X(r,()=>ny,(n,r)=>{r(n,{type:`single`,get value(){return H(e)},onValueChange:e=>H(v)[H(t).path]=e===i?``:e??``,children:(e,n)=>{var r=Ky(),a=R(r);{let e=N(()=>`chat-${H(t).path}`);X(a,()=>Qv,(t,n)=>{n(t,{get id(){return H(e)},class:`w-full`,children:(e,t)=>{var n=G();X(R(n),()=>ey,(e,t)=>{t(e,{placeholder:`跟随默认`})}),K(e,n)},$$slots:{default:!0}})})}X(B(a,2),()=>Uv,(e,t)=>{t(e,{children:(e,t)=>{var n=Ky(),r=R(n);X(r,()=>Yv,(e,t)=>{t(e,{value:i,children:(e,t)=>{A(),K(e,W(`跟随默认`))},$$slots:{default:!0}})}),io(B(r,2),16,()=>H(f),e=>e,(e,t)=>{var n=G();X(R(n),()=>Yv,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{A();var r=W();V(()=>q(r,t)),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,n)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})})}K(e,n)},d=e=>{{let n=N(()=>`chat-${H(t).path}`),r=N(()=>String(H(v)[H(t).path]??``));Id(e,{get id(){return H(n)},type:`number`,min:`0`,max:`1`,step:`0.05`,get value(){return H(r)},oninput:e=>H(v)[H(t).path]=e.currentTarget.value})}},p=e=>{{let n=N(()=>`chat-${H(t).path}`),r=N(()=>String(H(v)[H(t).path]??``));Id(e,{get id(){return H(n)},type:`number`,min:`0`,step:`100`,get value(){return H(r)},oninput:e=>H(v)[H(t).path]=e.currentTarget.value})}},m=N(()=>H(t).path.startsWith(`collect.`)),h=e=>{{let n=N(()=>`chat-${H(t).path}`),r=N(()=>String(H(v)[H(t).path]??``)),i=N(()=>ie(`chats.${H(g).trim()}.${H(t).path}`)?`已隐藏,留空表示不修改`:`留空表示不覆盖`);Id(e,{get id(){return H(n)},type:`text`,get value(){return H(r)},get placeholder(){return H(i)},oninput:e=>H(v)[H(t).path]=e.currentTarget.value})}};J(o,e=>{H(t).path===`wake`?e(s):H(t).path===`wake.prefixes`||H(t).path===`wake.ignorePrefixes`?e(c,1):H(t).path===`proactive.enabled`||H(t).path===`diary.enabled`?e(l,2):H(t).path===`profile`?e(u,3):H(t).path===`proactive.startProbability`?e(d,4):H(m)?e(p,5):e(h,-1)});var _=B(o,2),y=z(_,!0),b=B(_,2),x=e=>{var n=qy(),r=z(n,!0);V(e=>q(r,e),[()=>pe(`chats.${H(g).trim()}.${H(t).path}`)]),K(e,n)},S=N(()=>pe(`chats.${H(g).trim()}.${H(t).path}`));J(b,e=>{H(S)&&e(x)}),k(n),V(()=>q(y,H(t).hint)),K(e,n)}),k(_);var y=B(_,2),b=L(y);Nd(b,{size:`sm`,get disabled(){return H(s)},onclick:()=>void le(),children:(e,t)=>{var n=Xy();bs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),Nd(B(b,2),{variant:`ghost`,size:`sm`,onclick:se,children:(e,t)=>{A(),K(e,W(`取消`))},$$slots:{default:!0}}),k(y),k(t),V(()=>q(o,H(h)===``?`新增聊天覆盖`:`编辑 ${H(h)}`)),K(e,t)};J(ee,e=>{H(h)!==void 0&&e(T)}),K(e,t)};J(De,e=>{H(o)?e(O):e(Oe,-1)});var ke=B(De,2),Ae=B(L(ke),4),je=L(Ae),Me=L(je);sv(Me,{for:`archive-key`,class:`text-sm`,children:(e,t)=>{A(),K(e,W(`上传到聊天`))},$$slots:{default:!0}}),Id(B(Me,2),{id:`archive-key`,get value(){return H(m)},placeholder:`group:100 或 private:200`,oninput:e=>I(m,e.currentTarget.value,!0)}),k(je);var Ne=B(je,2);k(Ae);var Pe=B(Ae,4),Fe=e=>{K(e,$y())},Ie=e=>{var t=G();X(R(t),()=>by,(e,t)=>{t(e,{children:(e,t)=>{var n=Ky(),r=R(n);X(r,()=>my,(e,t)=>{t(e,{children:(e,t)=>{var n=G();X(R(n),()=>_y,(e,t)=>{t(e,{children:(e,t)=>{var n=e2(),r=R(n);X(r,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`聊天键`))},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`状态`))},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`大小`))},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`内容`))},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`下载`))},$$slots:{default:!0}})}),X(B(s,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`上传`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(r,2),()=>ay,(e,t)=>{t(e,{children:(e,t)=>{var n=G();io(R(n),17,()=>H(x),e=>e.chat,(e,t)=>{var n=G();X(R(n),()=>_y,(e,n)=>{n(e,{children:(e,n)=>{var r=e2(),i=R(r);X(i,()=>cy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=Hy(),i=R(r),a=B(i),o=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`未放行`))},$$slots:{default:!0}})};J(a,e=>{H(t).admitted||e(o)}),V(()=>q(i,`${H(t).chat??``} `)),K(e,r)},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>cy,(e,n)=>{n(e,{children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).exists?`已上传`:`未上传`)),K(e,r)},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>cy,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).exists?`${H(t).bytes} 字节`:`-`)),K(e,r)},$$slots:{default:!0}})});var c=B(o,2);X(c,()=>cy,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{var r=G(),i=R(r),a=e=>{var n=t2(),r=z(B(L(n),2),!0);k(n),V(()=>q(r,H(t).content)),K(e,n)},o=e=>{K(e,W(`过大,不回传正文`))},s=e=>{K(e,W(`-`))};J(i,e=>{H(t).content?e(a):H(t).oversized?e(o,1):e(s,-1)}),K(e,r)},$$slots:{default:!0}})});var l=B(c,2);X(l,()=>cy,(e,n)=>{n(e,{children:(e,n)=>{var r=G(),i=R(r),a=e=>{var n=n2();us(L(n),{class:`size-4`}),A(),k(n),V((e,r)=>{Fo(n,`href`,e),Fo(n,`download`,r),Fo(n,`aria-label`,`下载 ${H(t).chat} 的 USER.md`)},[()=>`/api/user-md/file?chat=${encodeURIComponent(H(t).chat)}`,()=>`${H(t).chat.replace(`:`,`-`)}-USER.md`]),K(e,n)},o=e=>{K(e,W(`-`))};J(i,e=>{H(t).exists&&H(t).admitted?e(a):e(o,-1)}),K(e,r)},$$slots:{default:!0}})}),X(B(l,2),()=>cy,(e,n)=>{n(e,{children:(e,n)=>{var r=r2();V(()=>{Fo(r,`aria-label`,`上传 ${H(t).chat} 的 USER.md`),r.disabled=!H(t).admitted||H(s)}),ga(`change`,r,e=>void te(H(t).chat,e)),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,t)};J(Pe,e=>{H(x).length===0?e(Fe):e(Ie,-1)});var Le=B(Pe,2),Re=e=>{var t=qy(),n=z(t,!0);V(e=>q(n,e),[()=>pe(`chat`)||pe(`content`)]),K(e,t)},ze=N(()=>pe(`chat`)||pe(`content`));J(Le,e=>{H(ze)&&e(Re)}),k(ke),k(ge),V(e=>{q(ye,H(a)?.path??`-`),Ne.disabled=e},[()=>H(s)||H(m).trim()===``]),ga(`change`,Ne,e=>void ne(e)),K(e,ge),M()}_a([`change`]);var o2=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`,`size`]);function s2(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`checked`,15,!1),i=Q(t,`size`,3,`default`),a=Z(t,o2);var o=G(),s=R(o);{let e=N(()=>Td(`data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,t.class));X(s,()=>L0,(t,o)=>{o(t,ts({"data-slot":`switch`,get"data-size"(){return i()},get class(){return H(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get checked(){return r()},set checked(e){r(e)},children:(e,t)=>{var n=G(),r=R(n);{let e=N(()=>Td(`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%_-_2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%_-_2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`,`rtl:data-[state=checked]:translate-x-[calc(-100%)]`));X(r,()=>B0,(t,n)=>{n(t,{"data-slot":`switch-thumb`,get class(){return H(e)}})})}K(e,n)},$$slots:{default:!0}}))})}K(e,o),M()}var c2=U(`<!> 还原`,1),l2=U(`<!> 保存`,1),u2=U(`<p> </p>`),d2=U(`<p class="text-muted-foreground text-sm">正在读取配置…</p>`),f2=U(`<p class="text-muted-foreground text-sm">字段元数据加载失败。</p>`),p2=U(`<button type="button" class="text-muted-foreground hover:text-foreground ml-auto text-xs">还原</button>`),m2=U(`<div class="flex h-9 items-center"><!></div>`),h2=U(`<!> <!>`,1),g2=U(`<p class="text-muted-foreground text-xs"> </p>`),_2=U(`<p class="text-destructive text-xs"> </p>`),v2=U(`<div class="space-y-1.5"><div class="flex items-center gap-2"><!> <!> <!> <!></div> <!> <!> <!> <p class="text-muted-foreground font-mono text-[11px]"> </p></div>`),y2=U(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="grid gap-4 md:grid-cols-2"></div></section>`),b2=U(`<p class="text-muted-foreground text-sm">没有匹配的字段。</p>`),x2=U(`<!> <!> <!>`,1),S2=U(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><div class="relative"><!> <!></div> <span class="text-muted-foreground text-sm"><!></span> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!></div>`);function C2(e,t){j(t,!0);let n=F(void 0),r=F(xn([])),i=F(xn({})),a=F(xn({})),o=F(xn([])),s=F(xn({})),c=F(``),l=F(`ok`),u=F(!1),d=F(!0),f=F(``),p=F(``),m=F(xn({})),h,g=N(()=>new Map((H(n)?.fields??[]).map(e=>[e.path,e]))),_=N(()=>(H(n)?.groups??[]).map(e=>({...e,fields:(H(n)?.fields??[]).filter(t=>t.group===e.id&&(H(f).trim()===``||t.path.includes(H(f).trim())||t.label.includes(H(f).trim())||(t.description??``).includes(H(f).trim())))})));ns(()=>{v()}),Sr(()=>{let e=t.config;e&&e!==h&&(H(o).length>0||(h=e,y(e.fields)))});async function v(){I(d,!0);try{let[e,t]=await Promise.all([Es.schema(),Es.config()]);I(n,e,!0),y(t.fields);try{I(r,(await Es.models()).models,!0)}catch(e){I(p,e instanceof Error?e.message:String(e),!0)}}catch(e){T(e)}finally{I(d,!1)}}function y(e){let t={},n={};for(let r of e){let e=H(g).get(r.path);e&&(t[r.path]=e.secret?``:r.value,e.secret&&(n[r.path]=r.hasValue===!0))}I(i,t,!0),I(a,{...t},!0),I(m,n,!0),I(o,[],!0),I(s,{},!0)}function b(e,t){H(i)[e.path]=t,delete H(s)[e.path],H(o).includes(e.path)||I(o,[...H(o),e.path],!0),I(c,``)}function x(e){H(i)[e]=H(a)[e],I(o,H(o).filter(t=>t!==e),!0),delete H(s)[e]}function S(){I(i,{...H(a)},!0),I(o,[],!0),I(s,{},!0),I(c,``)}function C(e){return H(o).includes(e)}function w(e,t){switch(e.type){case`number`:{if(t===``||t==null)return null;let e=typeof t==`number`?t:Number(t);return Number.isFinite(e)?e:null}case`numberList`:return ky(t).map(e=>Number(e)).filter(e=>Number.isFinite(e));case`stringList`:case`enum`:return Array.isArray(t)?t:String(t??``);case`modelRef`:case`text`:case`path`:case`clock`:return typeof t==`string`&&t.trim()!==``?t.trim():null;case`secret`:return typeof t==`string`&&t!==``?t:void 0;default:return t}}async function ee(){if(H(o).length===0){I(c,`没有需要保存的改动`),I(l,`ok`);return}let e={};for(let t of H(o)){let n=H(g).get(t);if(!n)continue;let r=w(n,H(i)[t]);r!==void 0&&(e[t]=r)}if(Object.keys(e).length===0)I(c,`没有需要保存的改动`),I(l,`ok`);else{I(u,!0);try{let n=await Es.save(e);y(n.fields),n.restartRequired.length>0?(I(c,`已保存;以下字段需要重启插件后生效:${n.restartRequired.join(`、`)}`),t.onrestart?.(n.restartRequired)):I(c,`已保存并立即生效`),I(l,`ok`)}catch(e){if(e instanceof ws){if(I(c,e.message,!0),e.fields.length>0){let t={...H(s)};for(let n of e.fields)t[n.path]=n.message;I(s,t,!0),I(c,e.fields.map(e=>e.message).join(`;`),!0)}}else I(c,e instanceof Error?e.message:String(e),!0);I(l,`error`)}finally{I(u,!1)}}}function T(e){I(c,e instanceof Error?e.message:String(e),!0),I(l,`error`)}function E(e){if(e.type===`modelRef`){let t=H(r).map(e=>`${e.providerID}/${e.id}`),n=String(H(i)[e.path]??``);return n&&!t.includes(n)?[n,...t]:t}return e.options??[]}let te=`__empty__`;var ne=S2(),re=L(ne),ie=L(re),ae=L(ie);xs(ae,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),Id(B(ae,2),{class:`w-64 pl-8`,placeholder:`搜索字段名或说明`,get value(){return H(f)},set value(e){I(f,e,!0)}}),k(ie);var oe=B(ie,2),se=L(oe),ce=e=>{var t=W();V(()=>q(t,`${H(o).length??``} 项待保存`)),K(e,t)},le=e=>{K(e,W(`全部为已保存的值`))};J(se,e=>{H(o).length>0?e(ce):e(le,-1)}),k(oe);var ue=B(oe,2),de=L(ue);{let e=N(()=>H(o).length===0);Nd(de,{variant:`ghost`,size:`sm`,get disabled(){return H(e)},onclick:S,children:(e,t)=>{var n=c2();vs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}})}var fe=B(de,2);{let e=N(()=>H(u)||H(o).length===0);Nd(fe,{size:`sm`,get disabled(){return H(e)},onclick:()=>void ee().catch(T),children:(e,t)=>{var n=l2();bs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}})}k(ue),k(re);var pe=B(re,2),me=e=>{var t=u2(),n=z(t,!0);V(()=>{mo(t,1,Wa(H(l)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),q(n,H(c))}),K(e,t)};J(pe,e=>{H(c)&&e(me)});var he=B(pe,2),ge=e=>{K(e,d2())},_e=e=>{K(e,f2())},ve=e=>{var t=x2(),n=R(t);io(n,17,()=>H(_),e=>e.id,(e,t)=>{var n=G(),r=R(n),a=e=>{var n=y2(),r=L(n),a=z(r,!0),o=B(r,2);io(o,21,()=>H(t).fields,e=>e.path,(e,t)=>{var n=v2(),r=L(n),a=L(r);{let e=N(()=>`field-${H(t).path}`);sv(a,{get for(){return H(e)},class:`text-sm`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).label)),K(e,r)},$$slots:{default:!0}})}var o=B(a,2),c=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`待保存`))},$$slots:{default:!0}})},l=N(()=>C(H(t).path));J(o,e=>{H(l)&&e(c)});var u=B(o,2),d=e=>{Od(e,{variant:`secondary`,children:(e,t)=>{A(),K(e,W(`需重启`))},$$slots:{default:!0}})};J(u,e=>{H(t).hot||e(d)});var f=B(u,2),p=e=>{var n=p2();ga(`click`,n,()=>x(H(t).path)),K(e,n)},h=N(()=>C(H(t).path));J(f,e=>{H(h)&&e(p)}),k(r);var g=B(r,2),_=e=>{var n=m2(),r=L(n);{let e=N(()=>`field-${H(t).path}`),n=N(()=>H(i)[H(t).path]===!0);s2(r,{get id(){return H(e)},get checked(){return H(n)},onCheckedChange:e=>b(H(t),e)})}k(n),K(e,n)},v=e=>{let n=N(()=>E(H(t)));var r=G(),a=R(r);{let e=N(()=>String(H(i)[H(t).path]??``)||te);X(a,()=>ny,(r,i)=>{i(r,{type:`single`,get value(){return H(e)},onValueChange:e=>b(H(t),e===te?``:e??``),children:(e,r)=>{var i=h2(),a=R(i);{let e=N(()=>`field-${H(t).path}`);X(a,()=>Qv,(t,n)=>{n(t,{get id(){return H(e)},class:`w-full`,children:(e,t)=>{var n=G();X(R(n),()=>ey,(e,t)=>{t(e,{placeholder:`跟随默认`})}),K(e,n)},$$slots:{default:!0}})})}X(B(a,2),()=>Uv,(e,t)=>{t(e,{children:(e,t)=>{var r=h2(),i=R(r);X(i,()=>Yv,(e,t)=>{t(e,{value:te,children:(e,t)=>{A(),K(e,W(`跟随默认`))},$$slots:{default:!0}})}),io(B(i,2),16,()=>H(n),e=>e,(e,t)=>{var n=G();X(R(n),()=>Yv,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{A();var r=W();V(()=>q(r,t)),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,r)},$$slots:{default:!0}})}),K(e,i)},$$slots:{default:!0}})})}K(e,r)},y=e=>{{let n=N(()=>`field-${H(t).path}`),r=N(()=>String(H(i)[H(t).path]??``)),a=N(()=>H(m)[H(t).path]?`已设置;留空表示不修改`:`未设置;留空表示不修改`);Id(e,{get id(){return H(n)},type:`password`,get value(){return H(r)},get placeholder(){return H(a)},oninput:e=>b(H(t),e.currentTarget.value)})}},S=e=>{{let n=N(()=>`field-${H(t).path}`),r=N(()=>Oy(H(i)[H(t).path])),a=N(()=>H(t).step??1);Id(e,{get id(){return H(n)},type:`number`,get value(){return H(r)},get min(){return H(t).min},get max(){return H(t).max},get step(){return H(a)},oninput:e=>{let n=e.currentTarget.value;b(H(t),n===``?``:Number(n))}})}},w=e=>{{let n=N(()=>ky(H(i)[H(t).path])),r=N(()=>H(t).type===`numberList`),a=N(()=>H(t).type===`numberList`?`输入数字后回车`:`输入后回车`);Dy(e,{get value(){return H(n)},get numeric(){return H(r)},get placeholder(){return H(a)},onchange:e=>b(H(t),e)})}},ee=e=>{{let n=N(()=>`field-${H(t).path}`),r=N(()=>String(H(i)[H(t).path]??``));Id(e,{get id(){return H(n)},type:`time`,get value(){return H(r)},oninput:e=>b(H(t),e.currentTarget.value)})}},T=e=>{{let n=N(()=>`field-${H(t).path}`),r=N(()=>String(H(i)[H(t).path]??``)),a=N(()=>H(t).type===`path`?`留空使用默认路径`:`留空使用默认值`);Id(e,{get id(){return H(n)},type:`text`,get value(){return H(r)},get placeholder(){return H(a)},oninput:e=>b(H(t),e.currentTarget.value)})}};J(g,e=>{H(t).type===`boolean`?e(_):H(t).type===`enum`||H(t).type===`modelRef`?e(v,1):H(t).type===`secret`?e(y,2):H(t).type===`number`?e(S,3):H(t).type===`numberList`||H(t).type===`stringList`?e(w,4):H(t).type===`clock`?e(ee,5):e(T,-1)});var ne=B(g,2),re=e=>{var n=g2(),r=z(n,!0);V(()=>q(r,H(t).description)),K(e,n)};J(ne,e=>{H(t).description&&e(re)});var ie=B(ne,2),ae=e=>{var n=_2(),r=z(n,!0);V(()=>q(r,H(s)[H(t).path])),K(e,n)};J(ie,e=>{H(s)[H(t).path]&&e(ae)});var oe=z(B(ie,2),!0);k(n),V(()=>q(oe,H(t).path)),K(e,n)}),k(o),k(n),V(()=>q(a,H(t).label)),K(e,n)};J(r,e=>{H(t).fields.length>0&&e(a)}),K(e,n)});var r=B(n,2),a=e=>{var t=g2(),n=z(t);V(()=>q(n,`模型列表读取失败:${H(p)??``}`)),K(e,t)};J(r,e=>{H(p)&&e(a)});var o=B(r,2),c=e=>{K(e,b2())},l=N(()=>H(f).trim()&&H(_).every(e=>e.fields.length===0));J(o,e=>{H(l)&&e(c)}),K(e,t)};J(he,e=>{H(d)?e(ge):H(n)?e(ve,-1):e(_e,1)}),k(ne),K(e,ne),M()}_a([`click`]);var w2=new Intl.DateTimeFormat(`zh-CN`,{dateStyle:`short`,timeStyle:`medium`}),T2=new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`}),E2=new Intl.NumberFormat(`zh-CN`);function D2(e){return e===void 0||!Number.isFinite(e)?`-`:w2.format(e)}function O2(e){return e===void 0||!Number.isFinite(e)?`-`:T2.format(e)}function k2(e){if(e===void 0||!Number.isFinite(e)||e<0)return`-`;let t=Math.floor(e/1e3);if(t<60)return`${t} 秒`;let n=Math.floor(t/60);if(n<60)return`${n} 分 ${t%60} 秒`;let r=Math.floor(n/60);return r<24?`${r} 小时 ${n%60} 分`:`${Math.floor(r/24)} 天 ${r%24} 小时`}function A2(e){return e===void 0||!Number.isFinite(e)?`-`:E2.format(e)}function j2(e){return e==null?`不限`:A2(e)}function M2(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var N2=U(`<option> </option>`),P2=U(`<!> 继续`,1),F2=U(`<!> 暂停`,1),I2=U(`<!> 清空`,1),L2=U(`<!> 重新读取`,1),R2=U(`<p class="text-destructive text-sm"> </p>`),z2=U(`<span class="text-muted-foreground break-all"> </span>`),B2=U(`<div class="hover:bg-muted flex gap-2 rounded px-1 py-0.5"><span class="text-muted-foreground shrink-0"> </span> <span> </span> <span class="break-all whitespace-pre-wrap"> </span> <!></div>`),V2=U(`<p class="text-muted-foreground p-4 text-sm">没有日志。</p>`),H2=U(`<div class="flex flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><select class="border-input bg-transparent h-9 rounded-md border px-2 text-sm shadow-xs"><option>全部级别</option><!></select> <div class="relative"><!> <!></div> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!> <!> <!></div></div> <!> <div class="bg-muted/40 h-[65vh] overflow-auto rounded-lg border p-2 font-mono text-xs"></div> <div class="text-muted-foreground flex items-center gap-2 text-xs"><!> <span></span></div></div>`);function U2(e,t){j(t,!0);let n=Q(t,`logs`,19,()=>[]),r=[`debug`,`info`,`warn`,`error`],i=2e3,a=F(xn([])),o=F(`all`),s=F(``),c=F(!0),l=F(!1),u=F(!1),d=F(``),f,p=new Set;function m(e){return`${e.time}|${e.level}|${e.message}`}function h(e){let t=[...H(a)];for(let n of e){let e=m(n);p.has(e)||(p.add(e),t.push(n))}if(t.length>i){let e=t.splice(0,t.length-i);for(let t of e)p.delete(m(t))}I(a,t,!0)}async function g(){I(u,!0),I(d,``);try{let e=await Es.logs({limit:500});p=new Set,I(a,[],!0),h(e.entries)}catch(e){I(d,e instanceof Error?e.message:String(e),!0)}finally{I(u,!1)}}ns(()=>{g()}),Sr(()=>{let e=n();e.length===0||H(l)||h(e)}),Sr(()=>{H(a).length,H(c)&&f&&(f.scrollTop=f.scrollHeight)});let _=N(()=>H(a).filter(e=>{if(H(o)!==`all`&&e.level!==H(o))return!1;let t=H(s).trim();return!t||e.message.includes(t)||M2(e.meta).includes(t)}));function v(){I(a,[],!0),p=new Set}function y(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-amber-600`;case`debug`:return`text-muted-foreground`;default:return`text-sky-600`}}var b=H2(),x=L(b),S=L(x),C=L(S);C.value=C.__value=`all`,io(B(C),16,()=>r,e=>e,(e,t)=>{var n=N2(),r=z(n,!0),i={};V(()=>{q(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),K(e,n)}),k(S),xo(S);var w=B(S,2),ee=L(w);xs(ee,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),Id(B(ee,2),{class:`w-56 pl-8`,placeholder:`搜索日志内容`,get value(){return H(s)},set value(e){I(s,e,!0)}}),k(w);var T=B(w,2),E=z(T),te=B(T,2),ne=L(te);Nd(ne,{variant:`ghost`,size:`sm`,onclick:()=>I(l,!H(l)),children:(e,t)=>{var n=G(),r=R(n),i=e=>{var t=P2();hs(R(t),{class:`size-4`}),A(),K(e,t)},a=e=>{var t=F2();ps(R(t),{class:`size-4`}),A(),K(e,t)};J(r,e=>{H(l)?e(i):e(a,-1)}),K(e,n)},$$slots:{default:!0}});var re=B(ne,2);Nd(re,{variant:`ghost`,size:`sm`,onclick:()=>I(c,!H(c)),get"aria-pressed"(){return H(c)},children:(e,t)=>{A();var n=W();V(()=>q(n,H(c)?`自动滚动:开`:`自动滚动:关`)),K(e,n)},$$slots:{default:!0}});var ie=B(re,2);Nd(ie,{variant:`ghost`,size:`sm`,onclick:v,children:(e,t)=>{var n=I2();ds(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),Nd(B(ie,2),{variant:`ghost`,size:`sm`,get disabled(){return H(u)},onclick:()=>void g(),children:(e,t)=>{var n=L2();_s(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),k(te),k(x);var ae=B(x,2),oe=e=>{var t=R2(),n=z(t,!0);V(()=>q(n,H(d))),K(e,t)};J(ae,e=>{H(d)&&e(oe)});var se=B(ae,2);io(se,23,()=>H(_),(e,t)=>m(e)+t,(e,t)=>{var n=B2(),r=L(n),i=z(r,!0),a=B(r,2),o=z(a,!0),s=B(a,2),c=z(s,!0),l=B(s,2),u=e=>{var n=z2(),r=z(n,!0);V(e=>q(r,e),[()=>M2(H(t).meta)]),K(e,n)};J(l,e=>{H(t).meta.length>0&&e(u)}),k(n),V((e,n)=>{q(i,e),mo(a,1,`${n??``} w-10 shrink-0 uppercase`),q(o,H(t).level),q(c,H(t).message)},[()=>O2(Date.parse(H(t).time)),()=>y(H(t).level)]),K(e,n)},e=>{K(e,V2())}),k(se),Ko(se,e=>f=e,()=>f);var ce=B(se,2),le=L(ce);Od(le,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`环形缓冲`))},$$slots:{default:!0}});var ue=B(le,2);ue.textContent=`面板只保留最近 2000 条;完整日志在日志目录里。`,k(ce),k(b),V(()=>q(E,`${H(_).length??``} / ${H(a).length??``} 条`)),So(S,()=>H(o),e=>I(o,e)),K(e,b),M()}var W2=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),G2=U(`<div><!></div>`);function K2(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,W2);var i=G2();Lo(i,e=>({"data-slot":`card-content`,class:e,...r}),[()=>Td(`flex flex-col gap-3 px-(--card-spacing)`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var q2=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),J2=U(`<p><!></p>`);function Y2(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,q2);var i=J2();Lo(i,e=>({"data-slot":`card-description`,class:e,...r}),[()=>Td(`text-muted-foreground text-sm`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var X2=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Z2=U(`<div><!></div>`);function Q2(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,X2);var i=Z2();Lo(i,e=>({"data-slot":`card-header`,class:e,...r}),[()=>Td(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var $2=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),e4=U(`<div><!></div>`);function t4(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Z(t,$2);var i=e4();Lo(i,e=>({"data-slot":`card-title`,class:e,...r}),[()=>Td(`text-base leading-normal font-medium group-data-[size=sm]/card:text-sm`,t.class)]),Y(L(i),()=>t.children??f),k(i),Ko(i,e=>n(e),()=>n()),K(e,i),M()}var n4=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),r4=U(`<div><!></div>`);function i4(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`size`,3,`default`),i=Z(t,n4);var a=r4();Lo(a,e=>({"data-slot":`card`,"data-size":r(),class:e,...i}),[()=>Td(`ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]),Y(L(a),()=>t.children??f),k(a),Ko(a,e=>n(e),()=>n()),K(e,a),M()}var a4=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`max`,`value`]),o4=U(`<div data-slot="progress-indicator" class="bg-primary size-full flex-1 transition-all"></div>`);function s4(e,t){j(t,!0);let n=Q(t,`ref`,15,null),r=Q(t,`max`,3,100),i=Z(t,a4);var a=G(),o=R(a);{let e=N(()=>Td(`bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden`,t.class));X(o,()=>y0,(a,o)=>{o(a,ts({"data-slot":`progress`,get class(){return H(e)},get value(){return t.value},get max(){return r()}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var i=o4();V(()=>go(i,`transform: translateX(-${100-100*(t.value??0)/(r()??1)}%)`)),K(e,i)},$$slots:{default:!0}}))})}K(e,a),M()}var c4=U(`<p class="text-muted-foreground p-4 text-sm">正在读取运行状态…</p>`),l4=U(`<!> <!>`,1),u4=U(`<div class="flex items-center gap-2"><span class="text-muted-foreground w-24">状态</span> <!></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">机器人</span> <span class="font-mono"> </span></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">重连次数</span> <span> </span></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">上次重连</span> <span> </span></div>`,1),d4=U(`<div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">版本</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">已运行</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">工作目录</span> <span class="font-mono break-all"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">日志目录</span> <span class="font-mono break-all"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">agent</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">模型</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">面板</span> <span class="font-mono"> </span></div>`,1),f4=U(`<p class="text-muted-foreground text-sm">还没有任何会话。</p>`),p4=U(`<!> <!> <!> <!> <!> <!>`,1),m4=U(`<p class="text-muted-foreground text-sm">限流模块未启用或还没有记录。</p>`),h4=U(`<div class="space-y-1"><div class="flex items-center justify-between text-xs"><span class="font-mono"> </span> <span class="text-muted-foreground"> </span></div> <!> <div class="text-muted-foreground flex justify-between text-[11px]"><span> </span> <span> </span></div></div>`),g4=U(`<div class="flex gap-2"><span class="text-muted-foreground w-24">状态</span> <!></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">生成时间</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">下次生成</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">下次轮询</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">上次轮询</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">上次结果</span> <span> </span></div>`,1),_4=U(`<span class="text-muted-foreground">-</span>`),v4=U(`<div class="flex items-center justify-between rounded border px-2 py-1"><span class="font-mono text-xs"> </span> <!></div>`),y4=U(`<div class="grid gap-1 sm:grid-cols-2"></div>`),b4=U(`<p class="text-muted-foreground text-xs">没有按聊天的策略覆盖。</p>`),x4=U(`<div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground">默认配置档</span> <!> <span class="text-muted-foreground ml-4">可用配置档</span> <!></div> <!>`,1),S4=U(`<div class="grid gap-4 lg:grid-cols-2"><!> <!> <!> <!> <!> <!></div> <p class="text-muted-foreground mt-2 text-xs"> </p>`,1);function C4(e,t){j(t,!0);function n(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}var r=G(),i=R(r),a=e=>{K(e,c4())},o=e=>{var r=S4(),i=R(r),a=L(i);X(a,()=>i4,(e,n)=>{n(e,{children:(e,n)=>{var r=l4(),i=R(r);X(i,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var n=l4(),r=R(n);X(r,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`连接`))},$$slots:{default:!0}})}),X(B(r,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`NapCat / NapLink WebSocket`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>K2,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=u4(),i=R(r),a=B(L(i),2);{let e=N(()=>t.status.connection.connected?`default`:`destructive`);Od(a,{get variant(){return H(e)},children:(e,n)=>{A();var r=W();V(()=>q(r,t.status.connection.connected?`已连接`:`未连接`)),K(e,r)},$$slots:{default:!0}})}k(i);var o=B(i,2),s=z(B(L(o),2),!0);k(o);var c=B(o,2),l=z(B(L(c),2),!0);k(c);var u=B(c,2),d=z(B(L(u),2),!0);k(u),V((e,n)=>{q(s,t.status.connection.selfId??`-`),q(l,e),q(d,n)},[()=>A2(t.status.connection.reconnects),()=>D2(t.status.connection.lastReconnectAt)]),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>i4,(e,n)=>{n(e,{children:(e,n)=>{var r=l4(),i=R(r);X(i,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var n=l4(),r=R(n);X(r,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`运行时`))},$$slots:{default:!0}})}),X(B(r,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`工作目录、模型与面板`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>K2,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=d4(),i=R(r),a=z(B(L(i),2));k(i);var o=B(i,2),s=z(B(L(o),2),!0);k(o);var c=B(o,2),l=z(B(L(c),2),!0);k(c);var u=B(c,2),d=z(B(L(u),2),!0);k(u);var f=B(u,2),p=z(B(L(f),2),!0);k(f);var m=B(f,2),h=z(B(L(m),2),!0);k(m);var g=B(m,2),_=z(B(L(g),2));k(g),V(e=>{q(a,`v${t.status.version??``}`),q(s,e),q(l,t.status.runtime.home),q(d,t.status.runtime.logDir),q(p,t.status.runtime.agent??`-`),q(h,t.status.runtime.model??`跟随默认`),q(_,`${t.status.runtime.panel.enabled?`已启用`:`已关闭`}
8
+ · ${t.status.runtime.panel.host??``}:${t.status.runtime.panel.port??``}`)},[()=>k2(t.status.uptimeMs)]),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>i4,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=l4(),i=R(r);X(i,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var n=l4(),r=R(n);X(r,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`会话`))},$$slots:{default:!0}})}),X(B(r,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`每个聊天目标的上游会话与消息缓存`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>K2,(e,n)=>{n(e,{children:(e,n)=>{var r=G(),i=R(r),a=e=>{K(e,f4())},o=e=>{var n=G();X(R(n),()=>by,(e,n)=>{n(e,{children:(e,n)=>{var r=l4(),i=R(r);X(i,()=>my,(e,t)=>{t(e,{children:(e,t)=>{var n=G();X(R(n),()=>_y,(e,t)=>{t(e,{children:(e,t)=>{var n=p4(),r=R(n);X(r,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`目标`))},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`会话`))},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`状态`))},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`缓存`))},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`唤醒`))},$$slots:{default:!0}})}),X(B(s,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`主动`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>ay,(e,n)=>{n(e,{children:(e,n)=>{var r=G();io(R(r),17,()=>t.status.sessions,e=>e.target,(e,t)=>{var n=G();X(R(n),()=>_y,(e,n)=>{n(e,{children:(e,n)=>{var r=p4(),i=R(r);X(i,()=>cy,(e,n)=>{n(e,{class:`font-mono`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).target)),K(e,r)},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>cy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).sessionID??`-`)),K(e,r)},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>cy,(e,n)=>{n(e,{children:(e,n)=>{var r=G(),i=R(r),a=e=>{Od(e,{children:(e,t)=>{A(),K(e,W(`处理中`))},$$slots:{default:!0}})},o=e=>{Od(e,{variant:`secondary`,children:(e,t)=>{A(),K(e,W(`等待重试`))},$$slots:{default:!0}})},s=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`空闲`))},$$slots:{default:!0}})};J(i,e=>{H(t).busy?e(a):H(t).pending?e(o,1):e(s,-1)}),K(e,r)},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>cy,(e,n)=>{n(e,{children:(e,n)=>{A();var r=W();V(e=>q(r,e),[()=>A2(H(t).buffered)]),K(e,r)},$$slots:{default:!0}})});var c=B(s,2);X(c,()=>cy,(e,n)=>{n(e,{children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).wake??`默认`)),K(e,r)},$$slots:{default:!0}})}),X(B(c,2),()=>cy,(e,n)=>{n(e,{children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).proactive===void 0?`默认`:H(t).proactive?`开`:`关`)),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,n)};J(i,e=>{t.status.sessions.length===0?e(a):e(o,-1)}),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})});var c=B(s,2);X(c,()=>i4,(e,r)=>{r(e,{children:(e,r)=>{var i=l4(),a=R(i);X(a,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var n=l4(),r=R(n);X(r,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`出站限流`))},$$slots:{default:!0}})}),X(B(r,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`按聊天目标统计的分钟与小时用量`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(a,2),()=>K2,(e,r)=>{r(e,{class:`space-y-3`,children:(e,r)=>{var i=G(),a=R(i),o=e=>{K(e,m4())},s=e=>{var r=G();io(R(r),17,()=>t.status.rateLimit,e=>e.scope,(e,t)=>{var r=h4(),i=L(r),a=L(i),o=z(a,!0),s=z(B(a,2));k(i);var c=B(i,2);{let e=N(()=>n(H(t).usedPerMinute,H(t).maxPerMinute));s4(c,{get value(){return H(e)}})}var l=B(c,2),u=L(l),d=z(u),f=z(B(u,2));k(l),k(r),V((e,n,r,i,a,c)=>{q(o,H(t).scope),q(s,`${e??``}/${n??``} 每分钟 ·
9
+ ${r??``}/${i??``} 每小时`),q(d,`分钟剩余 ${a??``}`),q(f,`小时剩余 ${c??``}`)},[()=>A2(H(t).usedPerMinute),()=>j2(H(t).maxPerMinute),()=>A2(H(t).usedPerHour),()=>j2(H(t).maxPerHour),()=>j2(H(t).minuteLeft),()=>j2(H(t).hourLeft)]),K(e,r)}),K(e,r)};J(a,e=>{t.status.rateLimit.length===0?e(o):e(s,-1)}),K(e,i)},$$slots:{default:!0}})}),K(e,i)},$$slots:{default:!0}})});var l=B(c,2);X(l,()=>i4,(e,n)=>{n(e,{children:(e,n)=>{var r=l4(),i=R(r);X(i,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var n=l4(),r=R(n);X(r,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`日记调度`))},$$slots:{default:!0}})}),X(B(r,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`日记的生成时间与结果`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>K2,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=g4(),i=R(r),a=B(L(i),2);{let e=N(()=>t.status.diary.enabled?`default`:`outline`);Od(a,{get variant(){return H(e)},children:(e,n)=>{A();var r=W();V(()=>q(r,t.status.diary.enabled?`已启用`:`已关闭`)),K(e,r)},$$slots:{default:!0}})}k(i);var o=B(i,2),s=z(B(L(o),2),!0);k(o);var c=B(o,2),l=z(B(L(c),2),!0);k(c);var u=B(c,2),d=z(B(L(u),2),!0);k(u);var f=B(u,2),p=z(B(L(f),2),!0);k(f);var m=B(f,2),h=z(B(L(m),2),!0);k(m),V((e,n,r)=>{q(s,t.status.diary.summaryTime),q(l,e),q(d,n),q(p,r),q(h,t.status.diary.lastResult??`-`)},[()=>D2(t.status.diary.nextSummaryAt),()=>D2(t.status.diary.nextRunAt),()=>D2(t.status.diary.lastRunAt)]),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),X(B(l,2),()=>i4,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=l4(),i=R(r);X(i,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var n=l4(),r=R(n);X(r,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`工具策略`))},$$slots:{default:!0}})}),X(B(r,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`默认配置档与按聊天的覆盖`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>K2,(e,n)=>{n(e,{class:`space-y-3 text-sm`,children:(e,n)=>{var r=x4(),i=R(r),a=B(L(i),2);Od(a,{variant:`secondary`,children:(e,n)=>{A();var r=W();V(()=>q(r,t.status.policy.defaultProfile)),K(e,r)},$$slots:{default:!0}}),io(B(a,4),16,()=>t.status.policy.profiles,e=>e,(e,t)=>{Od(e,{variant:`outline`,children:(e,n)=>{A();var r=W();V(()=>q(r,t)),K(e,r)},$$slots:{default:!0}})},e=>{K(e,_4())}),k(i);var o=B(i,2),s=e=>{var n=y4();io(n,21,()=>Object.entries(t.status.policy.chats),([e,t])=>e,(e,t)=>{var n=N(()=>_(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=v4(),o=L(a),s=z(o,!0);Od(B(o,2),{variant:`outline`,children:(e,t)=>{A();var n=W();V(()=>q(n,i())),K(e,n)},$$slots:{default:!0}}),k(a),V(()=>q(s,r())),K(e,a)}),k(n),K(e,n)},c=N(()=>Object.keys(t.status.policy.chats).length>0),l=e=>{K(e,b4())};J(o,e=>{H(c)?e(s):e(l,-1)}),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),k(i);var u=z(B(i,2));V((e,t)=>q(u,`启动于 ${e??``} · 快照时间 ${t??``}`),[()=>O2(t.status.startedAt),()=>O2(Date.now())]),K(e,r)};J(i,e=>{t.status?e(o,-1):e(a)}),K(e,r),M()}var w4=U(`<!> 新增配置档`,1),T4=U(`<p> </p>`),E4=U(`<li> </li>`),D4=U(`<ul class="text-muted-foreground space-y-1 text-xs"></ul>`),O4=U(`<p class="text-muted-foreground text-sm">正在读取工具配置…</p>`),k4=U(`<!> <!>`,1),A4=U(`<p class="text-destructive text-xs"> </p>`),j4=U(`<p class="text-muted-foreground text-sm">还没有任何配置档。</p>`),M4=U(`<!> <!> <!> <!>`,1),N4=U(` <!>`,1),P4=U(`<!> 编辑`,1),F4=U(`<!> 删除`,1),I4=U(`<div class="flex items-center gap-1"><!> <!></div>`),L4=U(`<!> 保存`,1),R4=U(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="space-y-1.5"><!> <!> <!></div> <div class="grid gap-4 md:grid-cols-2"><div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">命中的工具才可用;输入框会给出下拉建议,也可以直接手写工具名或通配符(如 <code>qq_*</code>、<code>*</code>),回车添加。</p> <!></div> <div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">deny 优先于 allow,手写通配符同样可用。</p> <!></div></div> <div class="flex items-center gap-2"><!> <!></div></section>`),z4=U(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">默认配置档</h2> <div class="flex flex-wrap items-center gap-2"><!> <span class="text-muted-foreground text-xs">没有按聊天指定的配置档时用这一档;「跟随默认」表示用内置默认档。</span></div> <!></section> <section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">配置档</h2> <!></section> <!>`,1),B4=U(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground font-mono text-xs"> </span> <!> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!> <!></div>`);function V4(e,t){j(t,!0);let n=F(void 0),r=F(!0),i=F(!1),a=F(``),o=F(`ok`),s=F(xn([])),c=F(xn({})),l=F(xn([])),u=F(void 0),d=F(``),f=F(xn([])),p=F(xn([])),m=N(()=>H(n)?.value??void 0),h=N(()=>H(n)?.fileValue?.profiles??{}),g=N(()=>H(n)?.fileValue?.defaultProfile??``),_=N(()=>Object.keys(H(m)?.profiles??{})),v=`__empty__`;ns(()=>{y(),b()});async function y(){I(r,!0);try{I(n,await Es.toolProfiles(),!0),I(s,H(n).warnings??[],!0),I(a,``),I(o,`ok`)}catch(e){ne(e)}finally{I(r,!1)}}async function b(){try{I(l,(await Es.tools()).tools??[],!0)}catch{I(l,[],!0)}}function x(e){return(H(n)?.masked??[]).includes(e)}function S(e){return!Object.hasOwn(H(h),e)}function C(e){let t=H(m)?.profiles?.[e];I(u,e,!0),I(d,e,!0),I(f,ky(t?.allow),!0),I(p,ky(t?.deny),!0),x(`profiles.${e}.allow`)&&I(f,[],!0),x(`profiles.${e}.deny`)&&I(p,[],!0),I(c,{},!0),I(a,``)}function w(){I(u,``),I(d,``),I(f,[],!0),I(p,[],!0),I(c,{},!0),I(a,``)}function ee(){I(u,void 0),I(c,{},!0)}async function T(){let e=H(d).trim();if(e===``){I(c,{name:`请填写配置档名字`},!0),I(o,`error`),I(a,`配置档名字不能为空`);return}let r=H(u)===``;if(r&&Object.hasOwn(H(m)?.profiles??{},e)){I(c,{name:`这个配置档已经存在,点「编辑」来改`},!0),I(o,`error`),I(a,`这个配置档已经存在,点「编辑」来改`);return}let l={};if(x(`profiles.${e}.allow`)&&H(f).length===0||(!r||H(f).length>0)&&(l.allow=H(f)),x(`profiles.${e}.deny`)&&H(p).length===0||(!r||H(p).length>0)&&(l.deny=H(p)),Object.keys(l).length===0)I(c,{name:`至少填写一个工具名再保存`},!0),I(o,`error`),I(a,`至少填写一个工具名再保存`);else{I(i,!0);try{let r=await Es.saveToolProfiles({profiles:{[e]:l}});I(n,r.document,!0),I(s,r.warnings??[],!0),I(u,void 0),I(c,{},!0),I(o,`ok`),I(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:${e}`])}catch(e){ne(e)}finally{I(i,!1)}}}async function E(e){let t={profiles:{[e]:null}},r=!1;H(g)===e&&(t.defaultProfile=null,r=!0),I(i,!0);try{let i=await Es.saveToolProfiles(t);I(n,i.document,!0),I(s,i.warnings??[],!0),I(c,{},!0),I(o,`ok`);let l=[`会话覆盖里可能还有引用,需要自行调整。`];r&&l.push(`已把默认配置档改回内置默认`),I(a,[`已删除配置档 ${e}。`,...l,i.note].join(` `),!0),H(u)===e&&I(u,void 0)}catch(e){ne(e)}finally{I(i,!1)}}async function te(e){I(i,!0);try{let r=await Es.saveToolProfiles({defaultProfile:e});I(n,r.document,!0),I(s,r.warnings??[],!0),I(c,{},!0),I(o,`ok`),I(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:defaultProfile`])}catch(e){ne(e)}finally{I(i,!1)}}function ne(e){if(I(o,`error`),e instanceof ws){if(e.fields.length>0){let t={};for(let n of e.fields)t[n.path]=n.message;I(c,t,!0),I(a,e.fields.map(e=>e.message).join(`;`),!0)}else I(a,e.message,!0)}else I(a,e instanceof Error?e.message:String(e),!0)}function re(e){return H(c)[e]??``}var ie=B4(),ae=L(ie),oe=L(ae),se=z(oe,!0),ce=B(oe,2),le=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`文件不存在,保存后新建`))},$$slots:{default:!0}})};J(ce,e=>{H(n)&&!H(n).exists&&e(le)});var ue=B(ce,2),de=L(ue);Nd(de,{variant:`ghost`,size:`sm`,onclick:()=>void y(),children:(e,t)=>{A(),K(e,W(`重新读取`))},$$slots:{default:!0}}),Nd(B(de,2),{size:`sm`,onclick:w,children:(e,t)=>{var n=w4();gs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),k(ue),k(ae);var fe=B(ae,2),pe=e=>{var t=T4(),n=z(t,!0);V(()=>{mo(t,1,Wa(H(o)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),q(n,H(a))}),K(e,t)};J(fe,e=>{H(a)&&e(pe)});var me=B(fe,2),he=e=>{var t=D4();io(t,21,()=>H(s),Xa,(e,t)=>{var n=E4(),r=z(n);V(()=>q(r,`· ${H(t)??``}`)),K(e,n)}),k(t),K(e,t)};J(me,e=>{H(s).length>0&&e(he)});var ge=B(me,2),_e=e=>{K(e,O4())},ve=e=>{var t=z4(),n=R(t),r=B(L(n),2),a=L(r);{let e=N(()=>H(g)===``?v:H(g));X(a,()=>ny,(t,n)=>{n(t,{type:`single`,get value(){return H(e)},onValueChange:e=>{e===v?te(null):e&&te(e)},children:(e,t)=>{var n=k4(),r=R(n);X(r,()=>Qv,(e,t)=>{t(e,{class:`w-64`,children:(e,t)=>{var n=G();X(R(n),()=>ey,(e,t)=>{t(e,{placeholder:`选择默认配置档`})}),K(e,n)},$$slots:{default:!0}})}),X(B(r,2),()=>Uv,(e,t)=>{t(e,{children:(e,t)=>{var n=k4(),r=R(n);X(r,()=>Yv,(e,t)=>{t(e,{value:v,children:(e,t)=>{A(),K(e,W(`跟随默认`))},$$slots:{default:!0}})}),io(B(r,2),16,()=>H(_),e=>e,(e,t)=>{var n=G();X(R(n),()=>Yv,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{A();var r=W();V(()=>q(r,t)),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})})}A(2),k(r);var o=B(r,2),s=e=>{var t=A4(),n=z(t,!0);V(e=>q(n,e),[()=>re(`defaultProfile`)]),K(e,t)},c=N(()=>re(`defaultProfile`));J(o,e=>{H(c)&&e(s)}),k(n);var h=B(n,2),y=B(L(h),2),b=e=>{K(e,j4())},w=e=>{var t=G();X(R(t),()=>by,(e,t)=>{t(e,{children:(e,t)=>{var n=k4(),r=R(n);X(r,()=>my,(e,t)=>{t(e,{children:(e,t)=>{var n=G();X(R(n),()=>_y,(e,t)=>{t(e,{children:(e,t)=>{var n=M4(),r=R(n);X(r,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`档名`))},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`allow`))},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`deny`))},$$slots:{default:!0}})}),X(B(a,2),()=>dy,(e,t)=>{t(e,{})}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(r,2),()=>ay,(e,t)=>{t(e,{children:(e,t)=>{var n=G();io(R(n),16,()=>H(_),e=>e,(e,t)=>{var n=G();X(R(n),()=>_y,(e,n)=>{n(e,{children:(e,n)=>{var r=M4(),a=R(r);X(a,()=>cy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=N4(),i=R(r),a=B(i),o=e=>{Od(e,{variant:`secondary`,class:`ml-1`,children:(e,t)=>{A(),K(e,W(`内置`))},$$slots:{default:!0}})},s=N(()=>S(t));J(a,e=>{H(s)&&e(o)}),V(()=>q(i,`${t??``} `)),K(e,r)},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>cy,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{A();var r=W();V(e=>q(r,e),[()=>x(`profiles.${t}.allow`)?`已隐藏`:(H(m)?.profiles?.[t]?.allow??[]).join(` / `)||`-`]),K(e,r)},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>cy,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{A();var r=W();V(e=>q(r,e),[()=>x(`profiles.${t}.deny`)?`已隐藏`:(H(m)?.profiles?.[t]?.deny??[]).join(` / `)||`-`]),K(e,r)},$$slots:{default:!0}})}),X(B(s,2),()=>cy,(e,n)=>{n(e,{children:(e,n)=>{var r=I4(),a=L(r);Nd(a,{variant:`ghost`,size:`sm`,onclick:()=>C(t),children:(e,t)=>{var n=P4();ms(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}});var o=B(a,2);{let e=N(()=>H(i)||S(t));Nd(o,{variant:`ghost`,size:`sm`,get disabled(){return H(e)},onclick:()=>void E(t),children:(e,t)=>{var n=F4();Ss(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}})}k(r),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,t)};J(y,e=>{H(_).length===0?e(b):e(w,-1)}),k(h);var ne=B(h,2),ie=e=>{var t=R4(),n=L(t),r=z(n,!0),a=B(n,2),o=L(a);sv(o,{for:`profile-name`,class:`text-sm`,children:(e,t)=>{A(),K(e,W(`档名`))},$$slots:{default:!0}});var s=B(o,2);{let e=N(()=>H(u)!==``);Id(s,{id:`profile-name`,get value(){return H(d)},get disabled(){return H(e)},placeholder:`例如 readonly`,oninput:e=>I(d,e.currentTarget.value,!0)})}var c=B(s,2),m=e=>{var t=A4(),n=z(t,!0);V(e=>q(n,e),[()=>re(`profiles`)||re(`profiles.${H(d).trim()}`)]),K(e,t)},h=N(()=>re(`profiles`)||re(`profiles.${H(d).trim()}`));J(c,e=>{H(h)&&e(m)}),k(a);var g=B(a,2),_=L(g),v=L(_);sv(v,{for:`profile-allow`,class:`text-sm`,children:(e,t)=>{A(),K(e,W(`allow`))},$$slots:{default:!0}});var y=B(v,2);{let e=N(()=>H(l).length>0?H(l):void 0);Dy(y,{id:`profile-allow`,get value(){return H(f)},placeholder:`工具名或通配符,输入后回车`,get options(){return H(e)},onchange:e=>I(f,e,!0)})}var b=B(y,4),x=e=>{var t=A4(),n=z(t,!0);V(e=>q(n,e),[()=>re(`profiles.${H(d).trim()}.allow`)]),K(e,t)},S=N(()=>re(`profiles.${H(d).trim()}.allow`));J(b,e=>{H(S)&&e(x)}),k(_);var C=B(_,2),w=L(C);sv(w,{for:`profile-deny`,class:`text-sm`,children:(e,t)=>{A(),K(e,W(`deny`))},$$slots:{default:!0}});var E=B(w,2);{let e=N(()=>H(l).length>0?H(l):void 0);Dy(E,{id:`profile-deny`,get value(){return H(p)},placeholder:`工具名或通配符,输入后回车`,get options(){return H(e)},onchange:e=>I(p,e,!0)})}var te=B(E,4),ne=e=>{var t=A4(),n=z(t,!0);V(e=>q(n,e),[()=>re(`profiles.${H(d).trim()}.deny`)]),K(e,t)},ie=N(()=>re(`profiles.${H(d).trim()}.deny`));J(te,e=>{H(ie)&&e(ne)}),k(C),k(g);var ae=B(g,2),oe=L(ae);Nd(oe,{size:`sm`,get disabled(){return H(i)},onclick:()=>void T(),children:(e,t)=>{var n=L4();bs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),Nd(B(oe,2),{variant:`ghost`,size:`sm`,onclick:ee,children:(e,t)=>{A(),K(e,W(`取消`))},$$slots:{default:!0}}),k(ae),k(t),V(()=>q(r,H(u)===``?`新增配置档`:`编辑配置档 ${H(u)}`)),K(e,t)};J(ne,e=>{H(u)!==void 0&&e(ie)}),K(e,t)};J(ge,e=>{H(r)?e(_e):e(ve,-1)}),k(ie),V(()=>q(se,H(n)?.path??`-`)),K(e,ie),M()}var H4=U(`<p class="text-muted-foreground p-4 text-sm">正在读取追踪数据…</p>`),U4=U(`<!> <!>`,1),W4=U(`<p class="text-muted-foreground text-sm">还没有追踪节点。</p>`),G4=U(`<!> <!> <!> <!> <!>`,1),K4=U(`<details><summary class="text-muted-foreground cursor-pointer text-xs"> </summary> <pre class="bg-muted mt-1 overflow-auto rounded p-2 text-[11px]"> </pre></details>`),q4=U(`<span class="text-muted-foreground text-xs">-</span>`);function J4(e,t){j(t,!0);let n=N(()=>[...t.status?.traces??[]].reverse());var r=G(),i=R(r),a=e=>{K(e,H4())},o=e=>{var t=G();X(R(t),()=>i4,(e,t)=>{t(e,{children:(e,t)=>{var r=U4(),i=R(r);X(i,()=>Q2,(e,t)=>{t(e,{children:(e,t)=>{var r=U4(),i=R(r);X(i,()=>t4,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`调用追踪`))},$$slots:{default:!0}})}),X(B(i,2),()=>Y2,(e,t)=>{t(e,{children:(e,t)=>{A();var r=W();V(()=>q(r,`最近 ${H(n).length??``} 个节点;完整调用链在 trace 目录里,这里只展示运行中的摘要。`)),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),X(B(i,2),()=>K2,(e,t)=>{t(e,{children:(e,t)=>{var r=G(),i=R(r),a=e=>{K(e,W4())},o=e=>{var t=G();X(R(t),()=>by,(e,t)=>{t(e,{children:(e,t)=>{var r=U4(),i=R(r);X(i,()=>my,(e,t)=>{t(e,{children:(e,t)=>{var n=G();X(R(n),()=>_y,(e,t)=>{t(e,{children:(e,t)=>{var n=G4(),r=R(n);X(r,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`时间`))},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`节点`))},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`目标`))},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`trace`))},$$slots:{default:!0}})}),X(B(o,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{A(),K(e,W(`属性`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),X(B(i,2),()=>ay,(e,t)=>{t(e,{children:(e,t)=>{var r=G();io(R(r),17,()=>H(n),e=>e.spanId,(e,t)=>{var n=G();X(R(n),()=>_y,(e,n)=>{n(e,{children:(e,n)=>{var r=G4(),i=R(r);X(i,()=>cy,(e,n)=>{n(e,{class:`whitespace-nowrap font-mono text-xs`,children:(e,n)=>{A();var r=W();V(e=>q(r,e),[()=>O2(H(t).at)]),K(e,r)},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>cy,(e,n)=>{n(e,{children:(e,n)=>{Od(e,{variant:`outline`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).name)),K(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>cy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=W();V(()=>q(r,H(t).target??`-`)),K(e,r)},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>cy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=W();V(e=>q(r,e),[()=>H(t).traceId.slice(0,8)]),K(e,r)},$$slots:{default:!0}})}),X(B(s,2),()=>cy,(e,n)=>{n(e,{class:`max-w-72`,children:(e,n)=>{var r=G(),i=R(r),a=e=>{var n=K4(),r=L(n),i=z(r),a=z(B(r,2),!0);k(n),V((e,t)=>{q(i,`${e??``} 项`),q(a,t)},[()=>Object.keys(H(t).attributes).length,()=>M2(H(t).attributes)]),K(e,n)},o=N(()=>H(t).attributes&&Object.keys(H(t).attributes).length>0),s=e=>{K(e,q4())};J(i,e=>{H(o)?e(a):e(s,-1)}),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,n)}),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,t)};J(i,e=>{H(n).length===0?e(a):e(o,-1)}),K(e,r)},$$slots:{default:!0}})}),K(e,r)},$$slots:{default:!0}})}),K(e,t)};J(i,e=>{t.status?e(o,-1):e(a)}),K(e,r),M()}var Y4=U(`<!> `,1),X4=U(`<!> 刷新`,1),Z4=U(`<!> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!> <!></div>`,1),Q4=U(`<p class="text-destructive text-sm"> </p>`),$4=U(`<!> 登录`,1),e3=U(`<div class="mx-auto mt-16 w-full max-w-sm space-y-3"><h2 class="text-base font-medium">需要访问令牌</h2> <p class="text-muted-foreground text-sm">令牌在 <code>config.json</code> 的 <code>panel.token</code> 里;没有配置时插件启动会生成一个并写回文件。</p> <!> <!> <!> <!></div>`),t3=U(`<!> <!> <!> <!> <!> <!>`,1),n3=U(`<!> <!> <!> <!> <!> <!> <!>`,1),r3=U(`<span>·</span> <span> </span>`,1),i3=U(`<div class="mx-auto flex min-h-screen max-w-6xl flex-col gap-4 p-4"><header class="flex flex-wrap items-center gap-3"><h1 class="text-lg font-semibold">opencode-qq-bot 面板</h1> <!></header> <!> <!> <!> <footer class="text-muted-foreground mt-auto flex items-center gap-2 pt-4 text-xs"><!> <span> </span> <span>·</span> <span> </span> <!> <span>·</span> <span> </span></footer></div>`);function a3(e,t){j(t,!0);let n=F(``),r=F(!1),i=F(``),a=F(!1),o=F(`config`),s=F(void 0),c=F(xn([])),l=F(void 0),u,d=F(!1),f=F(!1),p=F(``);new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`});let m=new Intl.NumberFormat(`zh-CN`);ns(()=>(h(),()=>u?.()));async function h(){try{I(s,await Es.status(),!0),I(r,!0),I(i,``),g()}catch(e){if(e instanceof ws&&e.status===401){I(r,!1);return}I(i,e instanceof Error?e.message:String(e),!0)}}function g(){u?.(),u=Ds({status:e=>{I(s,e,!0)},log:e=>{I(c,[...H(c),e].slice(-500),!0)},config:e=>{I(l,e,!0)}})}async function _(){I(a,!0),I(i,``);try{await Es.login(H(n)),I(p,H(n),!0),I(n,``),await h()}catch(e){I(i,e instanceof Error?e.message:String(e),!0)}finally{I(a,!1)}}function v(){I(d,!0)}async function y(){if(!H(f)){I(f,!0),I(i,``),u?.(),u=void 0;try{if(await Es.restart(),!await b())return;I(d,!1)}catch(e){I(i,e instanceof ws&&e.status===501?`当前运行时不支持重启,请手动重启。`:e instanceof Error?e.message:String(e),!0)}finally{I(f,!1)}}}async function b(){for(let e=0;e<60;e+=1){await new Promise(e=>setTimeout(e,500));try{return I(s,await Es.status(),!0),I(r,!0),I(c,[],!0),g(),!0}catch(e){if(e instanceof ws&&e.status===401){if(H(p)&&await x())continue;return I(r,!1),I(i,`插件已重启,请重新登录。`),!1}}}return I(i,`重启超时,请手动刷新页面。`),!1}async function x(){try{return await Es.login(H(p)),!0}catch{return I(p,``),!1}}var S=i3(),C=L(S),w=B(L(C),2),ee=e=>{var t=Z4(),n=R(t);{let e=N(()=>H(s).connection.connected?`default`:`destructive`);Od(n,{get variant(){return H(e)},children:(e,t)=>{A();var n=W();V(()=>q(n,H(s).connection.connected?`已连接`:`未连接`)),K(e,n)},$$slots:{default:!0}})}var r=B(n,2),i=z(r),a=B(r,2),o=L(a),c=e=>{Od(e,{variant:`outline`,children:(e,t)=>{A(),K(e,W(`有字段需要重启生效`))},$$slots:{default:!0}})};J(o,e=>{H(d)&&e(c)});var l=B(o,2);{let e=N(()=>H(d)?`default`:`outline`);Nd(l,{get variant(){return H(e)},size:`sm`,get disabled(){return H(f)},onclick:()=>void y(),children:(e,t)=>{var n=Y4(),r=R(n);{let e=N(()=>H(f)?`size-4 animate-spin`:`size-4`);ys(r,{get class(){return H(e)}})}var i=B(r);V(()=>q(i,` ${H(f)?`正在重启…`:`重启插件`}`)),K(e,n)},$$slots:{default:!0}})}Nd(B(l,2),{variant:`ghost`,size:`sm`,get disabled(){return H(f)},onclick:()=>void h(),children:(e,t)=>{var n=X4();_s(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}}),k(a),V(e=>q(i,`v${H(s).version??``} · 运行 ${e??``} 秒`),[()=>Math.floor(H(s).uptimeMs/1e3)]),K(e,t)};J(w,e=>{H(s)&&e(ee)}),k(C);var T=B(C,2);lv(T,{});var E=B(T,2),te=e=>{var t=Q4(),n=z(t,!0);V(()=>q(n,H(i))),K(e,t)};J(E,e=>{H(r)&&H(i)&&e(te)});var ne=B(E,2),re=e=>{var t=e3(),r=B(L(t),4);sv(r,{for:`token`,children:(e,t)=>{A(),K(e,W(`令牌`))},$$slots:{default:!0}});var o=B(r,2);Id(o,{id:`token`,type:`password`,placeholder:`面板访问令牌`,onkeydown:e=>{e.key===`Enter`&&_()},get value(){return H(n)},set value(e){I(n,e,!0)}});var s=B(o,2),c=e=>{var t=Q4(),n=z(t,!0);V(()=>q(n,H(i))),K(e,t)};J(s,e=>{H(i)&&e(c)});var l=B(s,2);{let e=N(()=>H(a)||!H(n));Nd(l,{class:`w-full`,get disabled(){return H(e)},onclick:()=>void _(),children:(e,t)=>{var n=$4();fs(R(n),{class:`size-4`}),A(),K(e,n)},$$slots:{default:!0}})}k(t),K(e,t)},ie=e=>{var t=G();X(R(t),()=>hv,(e,t)=>{t(e,{class:`flex-1`,get value(){return H(o)},set value(e){I(o,e,!0)},children:(e,t)=>{var n=n3(),r=R(n);X(r,()=>vv,(e,t)=>{t(e,{children:(e,t)=>{var n=t3(),r=R(n);X(r,()=>pv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{A(),K(e,W(`配置`))},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>pv,(e,t)=>{t(e,{value:`chat-overrides`,children:(e,t)=>{A(),K(e,W(`会话覆盖`))},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>pv,(e,t)=>{t(e,{value:`tool-profiles`,children:(e,t)=>{A(),K(e,W(`工具档案`))},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>pv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{A(),K(e,W(`状态`))},$$slots:{default:!0}})});var s=B(o,2);X(s,()=>pv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{A(),K(e,W(`日志`))},$$slots:{default:!0}})}),X(B(s,2),()=>pv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{A(),K(e,W(`追踪`))},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})});var i=B(r,2);X(i,()=>dv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{C2(e,{get config(){return H(l)},onrestart:v})},$$slots:{default:!0}})});var a=B(i,2);X(a,()=>dv,(e,t)=>{t(e,{value:`chat-overrides`,children:(e,t)=>{a2(e,{onrestart:v})},$$slots:{default:!0}})});var o=B(a,2);X(o,()=>dv,(e,t)=>{t(e,{value:`tool-profiles`,children:(e,t)=>{V4(e,{onrestart:v})},$$slots:{default:!0}})});var u=B(o,2);X(u,()=>dv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{C4(e,{get status(){return H(s)}})},$$slots:{default:!0}})});var d=B(u,2);X(d,()=>dv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{U2(e,{get logs(){return H(c)}})},$$slots:{default:!0}})}),X(B(d,2),()=>dv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{J4(e,{get status(){return H(s)}})},$$slots:{default:!0}})}),K(e,n)},$$slots:{default:!0}})}),K(e,t)};J(ne,e=>{H(r)?e(ie,-1):e(re)});var ae=B(ne,2),oe=L(ae);ls(oe,{class:`size-3`});var se=B(oe,2),ce=z(se),le=B(se,4),ue=z(le),de=B(le,2),fe=e=>{var t=r3(),n=z(B(R(t),2));V(()=>q(n,`agent ${H(s).runtime.agent??``}`)),K(e,t)};J(de,e=>{H(s)?.runtime.agent&&e(fe)});var pe=z(B(de,4));k(ae),k(S),V(e=>{q(ce,`工作目录 ${H(s)?.runtime.home??`-`??``}`),q(ue,`日志 ${H(s)?.runtime.logDir??`-`??``}`),q(pe,`${e??``} 个会话`)},[()=>m.format(H(s)?.sessions.length??0)]),K(e,S),M()}var o3=document.getElementById(`app`);if(!o3)throw Error(`缺少 #app 挂载点`);Pa(a3,{target:o3});