@cmach_socket/opencode-qq-bot 0.9.0 → 0.10.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.
Files changed (45) hide show
  1. package/NOTICE +0 -1
  2. package/README.md +152 -494
  3. package/chat-overrides.example.json +3 -3
  4. package/config.example.json +12 -0
  5. package/package.json +7 -2
  6. package/src/chat.ts +5 -0
  7. package/src/commands.ts +88 -1
  8. package/src/config/fields.ts +48 -5
  9. package/src/config/live.ts +61 -3
  10. package/src/config/store.ts +6 -11
  11. package/src/config/types.ts +24 -0
  12. package/src/config.ts +3 -0
  13. package/src/diary/command.ts +13 -12
  14. package/src/diary/format.ts +17 -0
  15. package/src/diary/scheduler.ts +1 -1
  16. package/src/diary/summary.ts +6 -5
  17. package/src/emoji/collection.ts +321 -0
  18. package/src/emoji/favorite-index.ts +40 -3
  19. package/src/emoji/favorites.ts +7 -1
  20. package/src/fs/atomic.ts +82 -0
  21. package/src/home.ts +6 -2
  22. package/src/index.ts +41 -36
  23. package/src/keepalive.ts +60 -2
  24. package/src/known-secrets.ts +20 -0
  25. package/src/logger.ts +2 -1
  26. package/src/overrides.ts +209 -47
  27. package/src/panel/api.ts +61 -7
  28. package/src/panel/documents.ts +621 -0
  29. package/src/panel/server.ts +66 -25
  30. package/src/panel/status.ts +8 -1
  31. package/src/safe-object.ts +48 -0
  32. package/src/sensitive.ts +31 -2
  33. package/src/session/find.ts +3 -2
  34. package/src/session/manager.ts +646 -43
  35. package/src/session/proactive.ts +3 -1
  36. package/src/session/soul-guard.ts +162 -0
  37. package/src/session/soul.ts +78 -13
  38. package/src/state-lock.ts +74 -0
  39. package/src/tools/policy.ts +65 -24
  40. package/src/tools/qq.ts +103 -22
  41. package/web/dist/assets/index-C5lRsdbz.css +1 -0
  42. package/web/dist/assets/index-YqorZD0I.js +8 -0
  43. package/web/dist/index.html +2 -2
  44. package/web/dist/assets/index-7eMQEM7-.css +0 -1
  45. package/web/dist/assets/index-DCkgUY7y.js +0 -15
@@ -1,15 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 f=Array.isArray,p=Array.prototype.indexOf,m=Array.prototype.includes,h=Array.from,g=Object.defineProperty,_=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyDescriptors,y=Object.prototype,b=Array.prototype,x=Object.getPrototypeOf,S=Object.isExtensible;function C(e){return typeof e==`function`}var w=()=>{};function ee(e){return e()}function T(e){for(var t=0;t<e.length;t++)e[t]()}function te(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function ne(e,t,n=!1){return e===void 0?n?t():t:e}function re(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var ie=1<<24,ae=1024,E=2048,oe=4096,se=8192,ce=16384,D=32768,le=1<<25,ue=65536,de=1<<19,fe=1<<20,pe=1<<25,me=1<<21,he=1<<22,ge=1<<23,_e=Symbol(`$state`),ve=Symbol(`component`),ye=Symbol(`legacy props`),be=Symbol(``),xe=Symbol(`attributes`),Se=Symbol(`class`),Ce=Symbol(`style`),we=Symbol(`text`),Te=Symbol(`form reset`),Ee=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},De=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),Oe={},ke=Symbol(`uninitialized`),Ae=`http://www.w3.org/1999/xhtml`,je=`http://www.w3.org/2000/svg`,Me=`@attach`;function Ne(){console.warn(`https://svelte.dev/e/derived_inert`)}function Pe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Fe(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Ie(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var O=!1;function Le(e){O=e}var Re;function ze(e){if(e===null)throw Pe(),Oe;return Re=e}function Be(){return ze(An(Re))}function k(e){if(O){if(An(Re)!==null)throw Pe(),Oe;Re=e}}function A(e=1){if(O){for(var t=e,n=Re;t--;)n=An(n);Re=n}}function Ve(e=!0){for(var t=0,n=Re;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=An(n);e&&n.remove(),n=i}}function He(e){if(!e||e.nodeType!==8)throw Pe(),Oe;return e.data}function Ue(e){return e===this.v}function We(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ge(e){return!We(e,this.v)}function Ke(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function qe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Je(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ye(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Xe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ze(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Qe(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function $e(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function et(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function tt(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function nt(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function rt(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var it=!1;function at(){it=!0}function ot(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function st(e,t){return e===null&&Ke(t),e.c??=new Map(ot(e)||void 0)}var ct=null;function lt(e){ct=e}function ut(e){return st(ct,`getContext`).get(e)}function dt(e,t){return st(ct,`setContext`).set(e,t),t}function ft(e){return st(ct,`hasContext`).has(e)}function pt(){return st(ct,`getAllContexts`)}function j(e,t=!1,n){ct={p:ct,i:!1,c:null,e:null,s:e,x:null,r:_r,l:it&&!t?{s:null,u:null,$:[]}:null}}function M(e){var t=ct,n=t.e;if(n!==null){t.e=null;for(var r of n)Wn(r)}return e!==void 0&&(t.x=e),t.i=!0,ct=t.p,mt(e)}function mt(e={}){return g(e,ve,{value:!0}),e}function ht(){return!it||ct!==null&&ct.l===null}var gt=[];function _t(){var e=gt;gt=[],T(e)}function vt(e){if(gt.length===0&&!qt){var t=gt;queueMicrotask(()=>{t===gt&&_t()})}gt.push(e)}function yt(){for(;gt.length>0;)_t()}var bt=~(E|oe|ae);function xt(e,t){e.f=e.f&bt|t}function St(e){e.f&512||e.deps===null?xt(e,ae):xt(e,oe)}function Ct(e,t){e.f&2048?t.set(e,E):e.f&4096&&t.get(e)!==2048&&t.set(e,oe),xt(e,ae)}function wt(e,t){if(t){let t=document.body;e.autofocus=!0,vt(()=>{document.activeElement===t&&e.focus()})}}var Tt=!1;function Et(){Tt||(Tt=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Te]?.()})},{capture:!0}))}function Dt(e){var t=mr,n=_r;gr(null),vr(null);try{return e()}finally{gr(t),vr(n)}}function Ot(e,t,n,r=n){e.addEventListener(t,()=>Dt(n));let i=e[Te];e[Te]=i?()=>{i(),r(!0)}:()=>r(!0),Et()}function kt(e,t,n,r){let i=ht()?Nt:It;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=_r,c=At(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){Ln(e,s)}jt()}}var d=Mt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>Ft(e))).then(u).catch(e=>Ln(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),jt())}):f()}function At(){var e=_r,t=mr,n=ct,r=Ut;return function(i=!0){vr(e),gr(t),lt(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function jt(e=!0){vr(null),gr(null),lt(null),e&&Ut?.deactivate()}function Mt(){var e=_r,t=e.b,n=Ut,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Nt(e){var t=2|E;return _r!==null&&(_r.f|=de),{ctx:ct,deps:null,effects:null,equals:Ue,f:t,fn:e,reactions:null,rv:0,v:ke,wv:0,parent:_r,ac:null}}var Pt=Symbol(`obsolete`);function Ft(e,t,n){let r=_r;r===null&&qe();var i=void 0,a=dn(ke),o=!mr,s=new Set;return Yn(()=>{var t=_r,n=te();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==Ee&&n.reject(e)}).finally(jt)}catch(e){n.reject(e),jt()}var c=Ut;if(o){if(t.f&32768)var l=Mt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Pt);else for(let e of s.values())e.reject(Pt);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Pt&&(c.activate(),t?(a.f|=ge,hn(a,t)):(a.f&8388608&&(a.f^=ge),hn(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Hn(()=>{for(let e of s)e.reject(Pt)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function N(e){let t=Nt(e);return br(t),t}function It(e){let t=Nt(e);return t.equals=Ge,t}function Lt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)rr(t[n])}}function Rt(e){var t,n=_r,r=e.parent;if(!fr&&r!==null&&e.v!==ke&&r.f&24576)return Ne(),e.v;vr(r);try{Lt(e),t=Mr(e)}finally{vr(n)}return t}function zt(e){var t=Rt(e);!e.equals(t)&&(e.wv=kr(),(!Ut?.is_fork||e.deps===null)&&(Ut===null?e.v=t:(Ut.capture(e,t,!0),Wt?.capture(e,t,!0)),e.deps===null))?xt(e,ae):fr||(Gt===null?St(e):(Vn()||Ut?.is_fork)&&Gt.set(e,t))}function Bt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Dt(()=>{t.ac.abort(Ee),t.ac=null}),t.fn!==null&&(t.teardown=w),Fr(t,0),tr(t))}function Vt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Ir(t)}var Ht=null,Ut=null,Wt=null,Gt=null,Kt=null,qt=!1,Jt=!1,Yt=null,Xt=null,Zt=0,Qt=1,$t=class e{id=Qt++;started=!1;linked=!0;prev=null;next=null;async_deriveds=new Map;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=new Map;#i=null;#a=[];#o=[];#s=new Map;#c=new Map;#l=new Set;is_fork=!1;#u=!1;constructor(){Ht===null?Ht=this:(Ht.next=this,this.prev=Ht),Ht=this}#d(){if(this.is_fork)return!0;for(let e of this.#r.keys())if(!this.#f(e))return!0;return!1}#f(e){for(var t=e;t!==null;t=t.parent)if(this.#c.has(t))return!0;return!1}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]}),this.#l.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#c.get(e);if(n){this.#c.delete(e);for(var r of n.d)xt(r,E),t(r);for(r of n.m)xt(r,oe),t(r)}this.#l.add(e)}#p(){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^=ae}}n||e.push(t)}return this.#a=[],e}#m(){this.started=!0;for(let[e,t]of this.#s)xt(e,t),this.schedule(e);this.apply();for(var t=Yt=[],n=[],r=Xt=[];this.#a.length>0;){Zt++>1e3&&(this.#b(),tn());for(let e of this.#p())try{this.#h(e,t,n)}catch(t){throw sn(e),this.#d()||this.discard(),t}}if(Ut=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(Yt=null,Xt=null,this.#d()){this.#y(n),this.#y(t);for(let[e,t]of this.#c)on(e,t);r.length>0&&Ut.#m();return}let a=this.#g();if(a)this.#y(n),this.#y(t),a.#v(this);else{this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Wt=this,rn(n),rn(t),Wt=null,this.#i?.resolve();var o=Ut;this.#n===0&&(this.#a.length===0||o!==null)&&this.#b(),o!==null&&(ln.clear(),o.#m())}}#h(e,t,n){e.f^=ae;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=ae:i&4?t.push(r):Ar(r)&&(i&16&&this.add_dirty_reaction(r,oe),Ir(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.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,[,n]]of this.current)if(!n&&e.current.has(t))return!0;return!1}#v(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_reactions(e.#s);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#s.delete(i),xt(i,E),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#b(),Ut=this,this.#m()}#y(e){for(var t=0;t<e.length;t+=1)Ct(e[t],this.#s)}capture(e,t,n=!1){e.v!==ke&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Gt?.set(e,t)),this.is_fork||(e.v=t)}activate(){Ut=this}deactivate(){Ut=null,Gt=null}flush(){try{Jt=!0,Ut=this,this.#m()}finally{Zt=0,Kt=null,Yt=null,Xt=null,Jt=!1,Ut=null,Gt=null,ln.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear();for(let e of this.async_deriveds.values())e.reject(Pt);this.#b(),this.#i?.resolve()}register_created_effect(e){this.#o.push(e)}increment(e,t){if(this.#n+=1,e){let e=this.#r.get(t)??0;this.#r.set(t,e+1)}}decrement(e,t){if(--this.#n,e){let e=this.#r.get(t)??0;e===1?this.#r.delete(t):this.#r.set(t,e-1)}this.#u||(this.#u=!0,vt(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_reactions(e){for(let[t,n]of e)this.add_dirty_reaction(t,n);e.clear()}add_dirty_reaction(e,t){(t===2048||this.#s.get(e)!==2048)&&this.#s.set(e,t)}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=te()).promise}static ensure(){if(Ut===null){let t=Ut=new e;!Jt&&!qt&&vt(()=>{t.started||t.flush()})}return Ut}apply(){Gt=null}schedule(e){Kt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#a.push(e)}#b(){if(this.linked){var e=this.prev,t=this.next;e===null||(e.next=t),t===null?Ht=e:t.prev=e,this.linked=!1}}};function en(e){var t=qt,n=Wt;Wt=null,qt=!0;try{var r;for(e&&(en(),r=e());;){if(yt(),Ut===null)return r;Ut.flush()}}finally{qt=t,Wt=n}}function tn(){try{Qe()}catch(e){Ln(e,Kt)}}var nn=null;function rn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ar(r)&&(nn=new Set,Ir(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ar(r),nn?.size>0)){ln.clear();for(let e of nn){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)nn.has(n)&&(nn.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ir(n)}}nn.clear()}}nn=null}}function an(e){Ut.schedule(e)}function on(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),xt(e,ae);for(var n=e.first;n!==null;)on(n,t),n=n.next}}function sn(e){xt(e,ae);for(var t=e.first;t!==null;)sn(t),t=t.next}var cn=new Set,ln=new Map,un=!1;function dn(e,t){return{f:0,v:e,reactions:null,equals:Ue,rv:0,wv:0}}function P(e,t){let n=dn(e,t);return br(n),n}function fn(e,t=!1,n=!0){let r=dn(e);return t||(r.equals=Ge),it&&n&&ct!==null&&ct.l!==null&&(ct.l.s??=[]).push(r),r}function F(e,t,n=!1){return mr!==null&&(!hr||mr.f&131072)&&ht()&&mr.f&4325394&&(yr===null||!yr.has(e))&&nt(),hn(e,n?bn(t):t,Xt)}var pn=null,mn=0;function hn(e,t,n=null){if(!e.equals(t)){fr?ln.set(e,t):ln.has(e)||ln.set(e,e.v);var r=$t.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Rt(t),Gt===null&&St(t)}e.wv=kr(),pn=null,mn=0,yn(e,E,n),pn=null,ht()&&_r!==null&&_r.f&1024&&!(_r.f&96)&&(Cr===null?wr([e]):Cr.push(e)),!r.is_fork&&cn.size>0&&!un&&gn()}return t}function gn(){un=!1;for(let e of cn){e.f&1024&&xt(e,oe);let t;try{t=Ar(e)}catch{t=!0}t&&Ir(e)}cn.clear()}function _n(e,t=1){var n=B(e),r=t===1?n++:n--;return F(e,n),r}function vn(e){F(e,e.v+1)}function yn(e,t,n){var r=e.reactions;if(r!==null){var i=ht(),a=r.length;if(mn+=a,mn>1e5&&pn===null&&(pn=new Set),pn!==null){if(pn.has(e))return;pn.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==_r){var l=(c&E)===0;if(l&&xt(s,t),c&131072)cn.add(s);else if(c&2){var u=s;Gt?.delete(u),yn(u,oe,n)}else if(l){var d=s;c&16&&nn!==null&&nn.add(d),n===null?an(d):n.push(d)}}}}}function bn(e){if(typeof e!=`object`||!e||_e in e||ve in e)return e;let t=x(e);if(t!==y&&t!==b)return e;var n=new Map,r=f(e),i=P(0),a=null,o=Dr,s=e=>{if(Dr===o)return e();var t=mr,n=Dr;gr(null),Or(o);var r=e();return gr(t),Or(n),r};return r&&n.set(`length`,P(e.length,a)),new Proxy(e,{defineProperty(e,t,r){`value`in r&&r.configurable!==!1&&r.enumerable!==!1&&r.writable!==!1||et();var i=n.get(t);return i===void 0?s(()=>{var e=P(r.value,a);return n.set(t,e),e}):F(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>P(ke,a));n.set(t,e),vn(i)}}else F(r,ke),vn(i);return!0},get(t,r,i){if(r===_e)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||_(t,r)?.writable)&&(o=s(()=>P(bn(c?t[r]:ke),a)),n.set(r,o)),o!==void 0){var l=B(o);return l===ke?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var r=Reflect.getOwnPropertyDescriptor(e,t),i=n.get(t);if(i!==void 0){var a=B(i);if(a===ke)return;if(r&&`value`in r)r.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return r},has(e,t){if(t===_e)return!0;var r=n.get(t),i=r!==void 0&&r.v!==ke||Reflect.has(e,t);return(r!==void 0||(_r!==null||mr!==null)&&(!i||_(e,t)?.writable))&&(r===void 0&&(r=s(()=>P(i?bn(e[t]):ke,a)),n.set(t,r)),B(r)===ke)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>P(ke,a)),n.set(d+``,f)):F(f,ke)}if(l===void 0)(!u||_(e,t)?.writable)&&(l=s(()=>P(void 0,a)),F(l,bn(o)),n.set(t,l));else{u=l.v!==ke;var p=s(()=>bn(o));F(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&F(h,g+1)}vn(i)}return!0},ownKeys(e){B(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==ke});for(var[r,a]of n)a.v!==ke&&!(r in e)&&t.push(r);return t},setPrototypeOf(){tt()}})}function xn(e){try{if(typeof e==`object`&&e&&_e in e)return e[_e]}catch{}return e}function Sn(e,t){return Object.is(xn(e),xn(t))}var Cn,wn,Tn,En;function Dn(){if(Cn===void 0){Cn=window,wn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Tn=_(t,`firstChild`).get,En=_(t,`nextSibling`).get,S(e)&&(e[Se]=void 0,e[xe]=null,e[Ce]=void 0,e.__e=void 0),S(n)&&(n[we]=void 0)}}function On(e=``){return document.createTextNode(e)}function kn(e){return Tn.call(e)}function An(e){return En.call(e)}function I(e,t){if(!O)return kn(e);var n=kn(Re);if(n===null)n=Re.appendChild(On());else if(t&&n.nodeType!==3){var r=On();return n?.before(r),ze(r),r}return t&&Fn(n),ze(n),n}function L(e,t=!1){if(!O){var n=kn(e);return n instanceof Comment&&n.data===``?An(n):n}if(t){if(Re?.nodeType!==3){var r=On();return Re?.before(r),ze(r),r}Fn(Re)}return Re}function jn(e,t=!1){if(!O)return kn(e);var n=I(e,t);return k(e),n}function R(e,t=1,n=!1){let r=O?Re:e;for(var i;t--;)i=r,r=An(r);if(!O)return r;if(n){if(r?.nodeType!==3){var a=On();return r===null?i?.after(a):r.before(a),ze(a),a}Fn(r)}return ze(r),r}function Mn(e){e.textContent=``}function Nn(){return!1}function Pn(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 Fn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function In(e){var t=_r;if(t===null)return mr.f|=ge,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ln(e,t)}function Ln(e,t){if(e===Oe)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 Rn(e){_r===null&&(mr===null&&Ze(e),Xe()),fr&&Ye(e)}function zn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Bn(e,t){var n=_r;n!==null&&n.f&8192&&(e|=se);var r={ctx:ct,deps:null,nodes:null,f:e|E|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Ut?.register_created_effect(r);var i=r;if(e&4)Yt===null?$t.ensure().schedule(r):Yt.push(r);else if(t!==null){try{Ir(r)}catch(e){throw rr(r),e}i.deps===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|=ue))}if(i!==null&&(i.parent=n,n!==null&&zn(i,n),mr!==null&&mr.f&2&&!(e&64))){var a=mr;(a.effects??=[]).push(i)}return r}function Vn(){return mr!==null&&!hr}function Hn(e){let t=Bn(8,null);return xt(t,ae),t.teardown=e,t}function Un(e){Rn(`$effect`);var t=_r.f;if(!mr&&t&32&&ct!==null&&!ct.i){var n=ct;(n.e??=[]).push(e)}else return Wn(e)}function Wn(e){return Bn(4|fe,e)}function Gn(e){return Rn(`$effect.pre`),Bn(8|fe,e)}function Kn(e){$t.ensure();let t=Bn(64|de,e);return()=>{rr(t)}}function qn(e){$t.ensure();let t=Bn(64|de,e);return(e={})=>new Promise(n=>{e.outro?or(t,()=>{rr(t),n(void 0)}):(rr(t),n(void 0))})}function Jn(e){return Bn(4,e)}function Yn(e){return Bn(he|de,e)}function Xn(e,t=0){return Bn(8|t,e)}function z(e,t=[],n=[],r=[]){kt(r,t,n,t=>{Bn(8,()=>{e(...t.map(B))})})}function Zn(e,t=0){return Bn(16|t,e)}function Qn(e,t=0){return Bn(ie|t,e)}function $n(e){return Bn(32|de,e)}function er(e){var t=e.teardown;if(t!==null){let n=fr,r=mr;pr(!0),gr(null);try{t.call(null)}catch(t){Ln(t,e.parent)}finally{pr(n),gr(r)}}}function tr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Dt(()=>{e.abort(Ee)});var r=n.next;n.f&64?n.parent=null:rr(n,t),n=r}}function nr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||rr(t),t=n}}function rr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(ir(e.nodes.start,e.nodes.end),n=!0),e.f|=le,tr(e,t&&!n),Fr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();er(e),e.f^=le,e.f|=ce;var i=e.parent;i!==null&&i.first!==null&&ar(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ir(e,t){for(;e!==null;){var n=e===t?null:An(e);e.remove(),e=n}}function ar(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 or(e,t,n=!0){var r=[];e.f|=256,sr(e,r,!0);var i=()=>{n&&rr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function sr(e,t,n){if(!(e.f&8192)){e.f^=se;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);sr(i,t,o?n:!1)}i=a}}}function cr(e){e.f&=-257,lr(e,!0)}function lr(e,t){if(!(e.f&256)&&e.f&8192){e.f^=se,e.f&1024||(xt(e,E),$t.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);lr(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)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:An(n);t.append(n),n=i}}var dr=null,fr=!1;function pr(e){fr=e}var mr=null,hr=!1;function gr(e){mr=e}var _r=null;function vr(e){_r=e}var yr=null;function br(e){mr!==null&&(mr.f&2097152||mr.f&2)&&(yr??=new Set).add(e)}var xr=null,Sr=0,Cr=null;function wr(e){Cr=e}var Tr=1,Er=0,Dr=Er;function Or(e){Dr=e}function kr(){return++Tr}function Ar(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ar(a)&&zt(a),a.wv>e.wv)return!0}t&512&&Gt===null&&xt(e,ae)}return!1}function jr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(yr!==null&&yr.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?jr(a,t,!1):t===a&&(n?xt(a,E):a.f&1024&&xt(a,oe),an(a))}}function Mr(e){var t=xr,n=Sr,r=Cr,i=mr,a=yr,o=ct,s=hr,c=Dr,l=e.f;xr=null,Sr=0,Cr=null,mr=l&96?null:e,yr=null,lt(e.ctx),hr=!1,Dr=++Er,e.ac!==null&&(Dt(()=>{e.ac.abort(Ee)}),e.ac=null);try{e.f|=me;var u=e.fn,d=u();e.f|=D;var f=Nr(e);if(ht()&&Cr!==null&&!hr&&f!==null&&!(e.f&6146))for(var p=0;p<Cr.length;p++)jr(Cr[p],e);if(i!==null&&i!==e){if(Er++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Er;if(t!==null)for(let e of t)e.rv=Er;Cr!==null&&(r===null?r=Cr:r.push(...Cr))}return e.f&8388608&&(e.f^=ge),d}catch(t){return Nr(e),In(t)}finally{e.f^=me,xr=t,Sr=n,Cr=r,mr=i,yr=a,lt(o),hr=s,Dr=c}}function Nr(e){var t=e.deps,n=Ut?.is_fork;if(xr!==null){var r;if(n||Fr(e,Sr),t!==null&&Sr>0)for(t.length=Sr+xr.length,r=0;r<xr.length;r++)t[Sr+r]=xr[r];else e.deps=t=xr;if(Vn()&&e.f&512)for(r=Sr;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Sr<t.length&&(Fr(e,Sr),t.length=Sr);return t}function Pr(e,t){let n=t.reactions;if(n!==null){var r=p.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(xr===null||!m.call(xr,t))){var a=t;a.f&512&&(a.f^=512),a.v!==ke&&St(a),a.ac!==null&&Dt(()=>{a.ac.abort(Ee),a.ac=null,xt(a,E)}),Bt(a),Fr(a,0)}}function Fr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Pr(e,n[r])}function Ir(e){var t=e.f;if(!(t&16384)){xt(e,ae);var n=_r;_r=e;try{t&16777232?nr(e):tr(e),er(e);var r=Mr(e);e.teardown=typeof r==`function`?r:null,e.wv=Tr}finally{_r=n}}}async function Lr(){await Promise.resolve(),en()}function B(e){var t=!!(e.f&2);if(dr?.add(e),mr!==null&&!hr&&!(_r!==null&&_r.f&16384)&&(yr===null||!yr.has(e))){var n=mr.deps;if(mr.f&2097152)e.rv<Er&&(e.rv=Er,xr===null&&n!==null&&n[Sr]===e?Sr++:xr===null?xr=[e]:xr.push(e));else{mr.deps??=[],m.call(mr.deps,e)||mr.deps.push(e);var r=e.reactions;r===null?e.reactions=[mr]:m.call(r,mr)||r.push(mr)}}if(fr&&ln.has(e))return ln.get(e);if(t){var i=e;if(fr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||zr(i))&&(a=Rt(i)),ln.set(i,a),a}var o=!(i.f&512)&&!hr&&mr!==null&&!!(mr.f&512),s=(i.f&D)===0;Ar(i)&&(o&&(i.f|=512),zt(i)),o&&!s&&(Vt(i),Rr(i))}if(Gt?.has(e))return Gt.get(e);if(e.f&8388608)throw e.v;return e.v}function Rr(e){if(e.f|=512,e.deps!==null)for(let n of e.deps){var t=n.reactions;t===null?n.reactions=[e]:m.call(t,e)||t.push(e),n.f&2&&!(n.f&512)&&(Vt(n),Rr(n))}}function zr(e){if(e.v===ke)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(ln.has(t)||t.f&2&&zr(t))return!0;return!1}function Br(e){var t=hr;try{return hr=!0,e()}finally{hr=t}}function Vr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(_e in e)Hr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&_e in n&&Hr(n)}}}function Hr(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{Hr(e[n],t)}catch{}let n=x(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=v(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Ur(){return Symbol(Me)}function Wr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Gr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Kr(e){return Gr.includes(e)}var qr=`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(`.`),Jr={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 Yr(e){return e=e.toLowerCase(),Jr[e]??e}[...qr];var Xr=[`touchstart`,`touchmove`];function Zr(e){return Xr.includes(e)}var Qr=[`textarea`,`script`,`style`,`title`];function $r(e){return Qr.includes(e)}var ei=Symbol(`events`),ti=new Set,ni=new Set;function ri(e,t,n,r={}){function i(e){if(r.capture||li.call(t,e),!e.cancelBubble)return Dt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,vt(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function ii(e,t,n,r={}){var i=ri(t,e,n,r);return()=>{i.__removed=!0,e.removeEventListener(t,i,r)}}function ai(e,t,n){(t[ei]??={})[e]=n}function oi(e){for(var t=0;t<e.length;t++)ti.add(e[t]);for(var n of ni)n(e)}var si=null,ci=!1;function li(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;si=e,ci||(ci=!0,setTimeout(()=>{ci=!1,si=null}));var o=0,s=si===e&&e[ei];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ei]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){g(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=mr,d=_r;gr(null),vr(null);try{for(var f,p=[];a!==null&&a!==t;){try{var m=a[ei]?.[r];m==null||a.disabled&&e.target!==a||m.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[ei]=t,delete e.currentTarget,gr(u),vr(d)}}}var ui=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function di(e){return ui?.createHTML(e)??e}function fi(e){var t=Pn(`template`);return t.innerHTML=di(e.replaceAll(`<!>`,`<!---->`)),t.content}function pi(e,t){var n=_r;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(O)return pi(Re,null),Re;i===void 0&&(i=fi(a?e:`<!>`+e),n||(i=kn(i)));var t=r||wn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=kn(t),s=t.lastChild;pi(o,s)}else pi(t,t);return t}}function mi(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(O)return pi(Re,null),Re;if(!o){var e=kn(fi(a));if(i)for(o=document.createDocumentFragment();kn(e);)o.appendChild(kn(e));else o=kn(e)}var t=o.cloneNode(!0);if(i){var n=kn(t),r=t.lastChild;pi(n,r)}else pi(t,t);return t}}function hi(e,t){return mi(e,t,`svg`)}function H(e=``){if(!O){var t=On(e+``);return pi(t,t),t}var n=Re;return n.nodeType===3?Fn(n):(n.before(n=On()),ze(n)),pi(n,n),n}function U(){if(O)return pi(Re,null),Re;var e=document.createDocumentFragment(),t=document.createComment(``),n=On();return e.append(t,n),pi(t,n),e}function W(e,t){if(O){var n=_r;n.f&32768&&n.nodes.end!==null||(n.nodes.end=Re),Be()}else e!==null&&e.before(t)}function gi(){if(O&&Re&&Re.nodeType===8&&Re.textContent?.startsWith(`$`)){let e=Re.textContent.substring(1);return Be(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function _i(e){let t=0,n=dn(0),r;return()=>{Vn()&&(B(n),Xn(()=>(t===0&&(r=Br(()=>e(()=>vn(n)))),t+=1,()=>{vt(()=>{--t,t===0&&(r?.(),r=void 0,vn(n))})})))}}var vi=ue|de;function yi(e,t,n,r){new bi(e,t,n,r)}var bi=class{parent;is_pending=!1;transform_error;#e;#t=O?Re:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Map;#p=null;#m=_i(()=>(this.#p=dn(this.#l),()=>{this.#p=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=_r;t.b=this,t.f|=128,n(e)},this.parent=_r.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Zn(()=>{if(O){let e=He(this.#t);Be();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()},vi),O&&(this.#e=Re)}#h(){try{this.#a=$n(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#_(e);vt(r),t&&(this.#s=$n(()=>{t(this.#e,()=>e,()=>n)}))}#_(e){var t=!1,n=!1;let r=()=>{this.#v()||(t?Ie():(t=!0,n&&rt(),this.#s!==null&&or(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})))};return{reset:r,invoke_onerror:()=>{if(!this.#v())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){Ln(e,this.#i&&this.#i.parent)}}}}#v(){return(this.#i.f&(ce|le))!==0}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=$n(()=>e(this.#e)),vt(()=>{if(!this.#v()){var e=this.#c=document.createDocumentFragment(),t=On(),n=!1;e.append(t),this.#a=this.#S(()=>{try{return $n(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){Ln(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#x(Ut)):this.#u===0&&(this.#e.before(e),this.#c=null,or(this.#o,()=>{this.#o=null}),this.#x(Ut))}}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=$n(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();ur(this.#a,e);let t=this.#n.pending;this.#o=$n(()=>t(this.#e))}else this.#x(Ut)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_reactions(this.#f)}defer_effect(e){Ct(e,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=_r,n=mr,r=ct;vr(this.#i),gr(this.#i),lt(this.#i.ctx);try{return $t.ensure(),e()}finally{vr(t),gr(n),lt(r)}}#C(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&or(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#C(e,t)}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!this.#p||this.#d||(this.#d=!0,vt(()=>{this.#d=!1,this.#p&&hn(this.#p,this.#l)}))}get_effect_pending(){return this.#m(),B(this.#p)}error(e){if(e===Oe||!this.#n.onerror&&!this.#n.failed)throw e;Ut?.is_fork?(this.#a&&Ut.skip_effect(this.#a),this.#o&&Ut.skip_effect(this.#o),this.#s&&Ut.skip_effect(this.#s),Ut.oncommit(()=>{this.#v()||this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(rr(this.#a),null),this.#o&&=(rr(this.#o),null),this.#s&&=(rr(this.#s),null),O&&(ze(this.#t),A(),ze(Ve()));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.#S(()=>{try{return $n(()=>{var r=_r;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return Ln(e,this.#i.parent),null}}))};vt(()=>{if(!this.#v()){var t;try{t=this.transform_error(e)}catch(e){Ln(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>Ln(e,this.#i&&this.#i.parent)):n(t)}})}};function G(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[we]??=e.nodeValue)&&(e[we]=n,e.nodeValue=`${n}`)}function xi(e,t){return Ci(e,t)}var Si=new Map;function Ci(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){Dn();var c=void 0,l=qn(()=>{var o=n??t.appendChild(On());yi(o,{pending:()=>{}},t=>{j({});var n=ct;if(a&&(n.c=a),i&&(r.$$events=i),O&&pi(t,null),c=e(t,r)||mt(),O&&(_r.nodes.end=Re,Re===null||Re.nodeType!==8||Re.data!==`]`))throw Pe(),Oe;M()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=Zr(r);for(let e of[t,document]){var a=Si.get(e);a===void 0&&(a=new Map,Si.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,li,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(h(ti)),ni.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=Si.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,li),r.delete(e),r.size===0&&Si.delete(n)):r.set(e,i)}ni.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return wi.set(c,l),c}var wi=new WeakMap;function Ti(e,t){let n=wi.get(e);return n?(wi.delete(e),n(t)):Promise.resolve()}var Ei=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)cr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(cr(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(rr(r.effect),this.#n.delete(n))}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=document.createDocumentFragment();ur(r,t),t.append(On()),this.#n.set(e,{effect:r,fragment:t})}else rr(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),or(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(rr(n.effect),this.#n.delete(e))};ensure(e,t){var n=Ut,r=Nn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=On();i.append(a),this.#n.set(e,{effect:$n(()=>t(a)),fragment:i})}else this.#t.set(e,$n(()=>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.#a),n.ondiscard(this.#o)}else O&&(this.anchor=Re),this.#a(n)}};function K(e,t,n=!1){var r;O&&(r=Re,Be());var i=new Ei(e),a=n?ue:0;function o(e,t){if(O){var n=He(r);if(e!==parseInt(n.substring(1))){var a=Ve();ze(a),i.anchor=a,Le(!1),i.ensure(e,t),Le(!0);return}}i.ensure(e,t)}Zn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Di=Symbol(`NaN`);function Oi(e,t,n){O&&Be();var r=new Ei(e),i=!ht();Zn(()=>{var e=t();e!==e&&(e=Di),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function ki(e,t){return t}function Ai(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];or(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;ji(e,h(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var c=r.length===0&&n!==null&&e.pending.size===0;if(c){var l=n,u=l.parentNode;Mn(u),u.append(l),e.items.clear()}ji(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function ji(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=pe,ur(a,document.createDocumentFragment())):rr(t[i],n)}}var Mi;function Ni(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=O?ze(kn(c)):c.appendChild(On())}O&&Be();var l=null,u=It(()=>{var e=n();return f(e)?e:e==null?[]:h(e)}),d=new Map,p=!0;function m(e){if(!(_.effect.f&16384)){_.pending.delete(e);var n=B(u);_.fallback=l,Fi(_,n,o,t,r),l!==null&&(n.length===0?l.f&33554432?(l.f^=pe,Li(l,null,o)):cr(l):or(l,()=>{l=null}))}}function g(e){_.pending.delete(e)}var _={effect:Zn(()=>{var e=B(u),c=e.length;let f=!1;O&&He(o)===`[!`!=(c===0)&&(o=Ve(),ze(o),Le(!1),f=!0);for(var h=new Set,_=Ut,v=Nn(),y=0;y<c;y+=1){O&&Re.nodeType===8&&Re.data===`]`&&(o=Re,f=!0,Le(!1));var b=e[y],x=r(b,y),S=p?null:s.get(x);S?(S.v&&hn(S.v,b),S.i&&hn(S.i,y),v&&_.unskip_effect(S.e)):(S=Ii(s,p?o:Mi??=On(),b,x,y,i,t,n),p||(S.e.f|=pe),s.set(x,S)),h.add(x)}if(c===0&&a&&!l&&(p?l=$n(()=>a(o)):(l=$n(()=>a(Mi??=On())),l.f|=pe)),c>h.size&&Je(``,``,``),O&&c>0&&ze(Ve()),!p){if(d.set(_,h),v){for(let[e,t]of s)h.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(g)}else m(_)}f&&Le(!0),B(u)}),flags:t,items:s,pending:d,outrogroups:null,fallback:l};p=!1,O&&(o=Re)}function Pi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Fi(e,t,n,r,i){var a=!!(r&8),o=t.length,s=e.items,c=Pi(e.effect.first),l,u=null,d,f=[],p=[],m,g,_,v;if(a)for(v=0;v<o;v+=1)m=t[v],g=i(m,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(d??=new Set).add(_));for(v=0;v<o;v+=1){if(m=t[v],g=i(m,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(cr(_),a&&(_.nodes?.a?.unfix(),(d??=new Set).delete(_))),_.f&33554432){if(_.f^=pe,_===c)Li(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ri(e,u,_),Ri(e,_,y),Li(_,y,n),u=_,f=[],p=[],c=Pi(u.next);continue}}if(_!==c){if(l!==void 0&&l.has(_)){if(f.length<p.length){var b=p[0],x;u=b.prev;var S=f[0],C=f[f.length-1];for(x=0;x<f.length;x+=1)Li(f[x],b,n);for(x=0;x<p.length;x+=1)l.delete(p[x]);Ri(e,S.prev,C.next),Ri(e,u,S),Ri(e,C,b),c=b,u=C,--v,f=[],p=[]}else l.delete(_),Li(_,c,n),Ri(e,_.prev,_.next),Ri(e,_,u===null?e.effect.first:u.next),Ri(e,u,_),u=_;continue}for(f=[],p=[];c!==null&&c!==_;)(l??=new Set).add(c),p.push(c),c=Pi(c.next);if(c===null)continue}_.f&33554432||f.push(_),u=_,c=Pi(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(ji(e,h(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var w=[];if(l!==void 0)for(_ of l)_.f&8192||w.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&w.push(c),c=Pi(c.next);var ee=w.length;if(ee>0){var T=r&4&&o===0?n:null;if(a){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}Ai(e,w,T)}}a&&vt(()=>{if(d!==void 0)for(_ of d)_.nodes?.a?.apply()})}function Ii(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:$n(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Li(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=An(r);if(a.before(r),r===i)return;r=o}}function Ri(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function zi(e,t,n,r,i){if(O&&Be(),t.$$host?.$$shadowRoot){let t=Pn(`slot`);if(n!=="default"&&(t.name=n),W(e,t),i!==null){let e=On();t.append(e),i(e)}}else{var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n==="default"?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}}function q(e,t,...n){var r=new Ei(e);Zn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ue)}function J(e,t,n){var r;O&&(r=Re,Be());var i=new Ei(e);Zn(()=>{var e=t()??null;if(O&&He(r)===`[`!=(e!==null)){var a=Ve();ze(a),i.anchor=a,Le(!1),i.ensure(e,e&&(t=>n(t,e))),Le(!0)}else i.ensure(e,e&&(t=>n(t,e)))},ue)}function Bi(e,t,n,r,i,a){let o=O;O&&Be();var s=null;O&&Re.nodeType===1&&(s=Re,Be());var c=O?Re:e,l=new Ei(c,!1);Zn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?je:void 0;if(e===null)l.ensure(null,null);else return l.ensure(e,t=>{if(e){var n=O;if(s=O?s:Pn(e,a),pi(s,s),r){var i=null;O&&$r(e)&&s.append(i=document.createComment(``));var o=O?kn(s):s.appendChild(On());O&&(o===null?Le(!1):ze(o)),r(s,o),i?.remove()}_r.nodes.end=s,n||t.before(s)}O&&ze(t)}),()=>{}},ue),Hn(()=>{}),o&&(Le(!0),ze(c))}function Vi(e,t){var n=void 0,r;Qn(()=>{n!==(n=t())&&(r&&=(rr(r),null),n&&(r=$n(()=>{Jn(()=>n(e))})))})}function Hi(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=Hi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Ui(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hi(e))&&(r&&(r+=` `),r+=t);return r}function Wi(e){return typeof e==`object`?Ui(e):e??``}var Gi=[...`
2
- \r\f\xA0\v`];function Ki(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||Gi.includes(r[o-1]))&&(s===r.length||Gi.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function qi(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 Ji(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Yi(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(Ji)),i&&c.push(...Object.keys(i).map(Ji));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=Ji(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+=qi(r)),i&&(n+=qi(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Xi(e,t,n,r,i,a){var o=e[Se];if(O||o!==n||o===void 0){var s=Ki(n,r,a);O&&s===e.getAttribute(`class`)||(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[Se]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Zi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Qi(e,t,n,r){var i=e[Ce];if(O||i!==t){var a=Yi(t,r);O&&a===e.getAttribute(`style`)||(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[Ce]=t}else r&&(Array.isArray(r)?(Zi(e,n?.[0],r[0]),Zi(e,n?.[1],r[1],`important`)):Zi(e,n,r));return r}function $i(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function ea(e,t){var n=!(`__defaultValue`in e);(n||e.__defaultValue!==t)&&(e.__defaultValue=t,ta(e,!n||`__value`in e))}function ta(e,t){var n=e.__defaultValue,r=e.multiple,i=r?n??[]:null;if(!r||f(i)){var a=e.selectedIndex,o=t&&r?new Set(e.selectedOptions):null;for(var s of e.options){var c=aa(s);$i(s,r?i.includes(c):Sn(c,n))}if(t){if(o!==null)for(s of e.options){var l=o.has(s);s.selected!==l&&(s.selected=l)}else e.selectedIndex!==a&&(e.selectedIndex=a)}}}function na(e,t,n=!1){if(e.multiple){if(t==null)return;if(!f(t))return Fe();for(var r of e.options)r.selected=t.includes(aa(r))}else{for(r of e.options)if(Sn(aa(r),t)){r.selected=!0;return}n&&t===void 0||(e.selectedIndex=-1)}}function ra(e){var t=new MutationObserver(t=>{t.every(oa)||(`__defaultValue`in e&&ta(e,!1),`__value`in e&&na(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Hn(()=>{t.disconnect()})}function ia(e,t,n=t){var r=new WeakSet,i=!0;Ot(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),aa);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&aa(o)}n(a),e.__value=a,Ut!==null&&r.add(Ut)}),Jn(()=>{var a=t();if(e===document.activeElement){var o=Ut;if(r.has(o))return}if(na(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=aa(s),n(a))}e.__value=a,i=!1})}function aa(e){return`__value`in e?e.__value:e.value}function oa(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 sa=Symbol(`class`),ca=Symbol(`style`),la=Symbol(`is custom element`),ua=Symbol(`is html`),da=De?`link`:`LINK`,fa=De?`input`:`INPUT`,pa=De?`option`:`OPTION`,ma=De?`select`:`SELECT`,ha=De?`progress`:`PROGRESS`;function ga(e){if(O){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;_a(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;_a(e,`checked`,null),e.checked=r}}};e[Te]=n,vt(n),Et()}}function _a(e,t,n,r){var i=ba(e);if(!(O&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===da))){var a=i[t];a!==(i[t]=n)&&(t===`loading`&&(e[be]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Sa(e).has(t)?e[t]=n:(!O||typeof n!=`number`&&typeof n!=`boolean`||a!==String(n))&&e.setAttribute(t,n))}}function va(e,t,n,r,i=!1,a=!1){O&&i&&e.nodeName===fa&&(`defaultValue`in n||`defaultChecked`in n||ga(e));var o=ba(e),s=o[la],c=!o[ua];let l=O&&s;l&&Le(!1);var u=t||{},d=e.nodeName===pa,f=e.nodeName===ma;try{for(var p in t)!(p in n)&&p[0]+p[1]!==`$$`&&(n[p]=null);n.class?n.class=Wi(n.class):(r||n[sa])&&(n.class=null),n[ca]&&(n.style??=null);var m=Sa(e);if(e.nodeName===fa&&`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,_a(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`)Xi(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,l,r,t?.[sa],n[sa]),u[i]=l,u[sa]=n[sa];else if(i===`style`)Qi(e,l,t?.[ca],n[ca]),u[i]=l,u[ca]=n[ca];else{var g=u[i];if(l!==g||l===void 0&&e.hasAttribute(i)){u[i]=l;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Kr(r);if(Wr(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(l!=null)continue;e.removeEventListener(r,u[n],t),u[n]=null}if(v)ai(r,e,l),oi([r]);else if(l!=null){function a(e){u[i].call(this,e)}u[n]=ri(r,e,a,t)}}else if(i===`style`)_a(e,i,l);else if(i===`autofocus`)wt(e,!!l);else if(!s&&(i===`__value`||i===`value`&&l!=null))e.__value=l,(g==null||e.value!==l||l===0&&e.nodeName===ha)&&(e.value=l);else if(i===`selected`&&d)$i(e,l);else{var y=i;c||(y=Yr(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`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else b||(s||typeof l!=`string`)&&m.has(y)?(e[y]=l,y in o&&(o[y]=ke)):typeof l!=`function`&&_a(e,y,l,a)}}}}}}finally{l&&Le(!0)}return u}function ya(e,t,n=[],r=[],i=[],a,o=!1,s=!1){kt(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===ma,l=!1;if(Qn(()=>{var u=t(...n.map(B)),d=va(e,r,u,a,o,s);if(l&&c){var f=e;`defaultValue`in u&&ea(f,u.defaultValue),`value`in u&&na(f,u.value)}for(let e of Object.getOwnPropertySymbols(i))u[e]||rr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var p=u[t];t.description!==`@attach`||r&&p===r[t]||(i[t]&&rr(i[t]),i[t]=$n(()=>Vi(e,()=>p))),d[t]=p}r=d}),c){var u=e;Jn(()=>{var e=r;`defaultValue`in e&&ea(u,e.defaultValue),na(u,e.value,!0),ra(u)})}l=!0})}function ba(e){return e[xe]??={[la]:e.nodeName.includes(`-`),[ua]:e.namespaceURI===Ae}}var xa=new Map;function Sa(e){var t=e.getAttribute(`is`)||e.nodeName,n=xa.get(t);if(n)return n;xa.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=v(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=x(i)}return n}function Ca(e,t,n=t){var r=new WeakSet;Ot(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=wa(e)?Ta(a):a,n(a),Ut!==null&&r.add(Ut),await Lr(),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))}}}),(O&&e.defaultValue!==e.value||Br(t)==null&&e.value)&&(n(wa(e)?Ta(e.value):e.value),Ut!==null&&r.add(Ut)),Xn(()=>{var n=t();if(e===document.activeElement){var i=Ut;if(r.has(i))return}wa(e)&&n===Ta(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function wa(e){var t=e.type;return t===`number`||t===`range`}function Ta(e){return e===``?null:+e}function Ea(e,t,n=t){Ot(e,`change`,()=>{n(e.files)}),O&&e.files&&n(e.files),Xn(()=>{e.files=t()})}function Da(e,t){return e===t||e?.[_e]===t}function Oa(e=mt(),t,n,r){var i=ct.r,a=_r;return Jn(()=>{var o,s;return Xn(()=>{o=s,s=r?.()||[],Br(()=>{Da(n(...s),e)||(t(e,...s),o&&Da(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&&Da(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function ka(e=!1){let t=ct,n=t.l.u;if(!n)return;let r=()=>Vr(t.s);if(e){let e=0,n={},i=Nt(()=>{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=()=>B(i)}n.b.length&&Gn(()=>{Aa(t,r),T(n.b)}),Un(()=>{let e=Br(()=>n.m.map(ee));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&Un(()=>{Aa(t,r),T(n.a)})}function Aa(e,t){if(e.l.s)for(let t of e.l.s)B(t);t()}var ja=!1;function Ma(e){var t=ja;try{return ja=!1,[e(),ja]}finally{ja=t}}var Na={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 Y(e,t,n){return new Proxy({props:e,exclude:t},Na)}var Pa={get(e,t){if(!e.exclude.includes(t))return B(e.version),t in e.special?e.special[t]():e.props[t]},set(e,t,n){if(!(t in e.special)){var r=_r;try{vr(e.parent_effect),e.special[t]=X({get[t](){return e.props[t]}},t,4)}finally{vr(r)}}return e.special[t](n),_n(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),_n(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 Fa(e,t){return new Proxy({props:e,exclude:t,special:{},version:dn(0),parent_effect:_r},Pa)}var Ia={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(C(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];C(i)&&(i=i());let a=_(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(C(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=_(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===_e||t===ye)return!1;for(let n of e.props)if(C(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(C(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 La(...e){return new Proxy({props:e},Ia)}function X(e,t,n,r){var i=!it||!!(n&2),a=!!(n&8),o=!!(n&16),s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Nt(r),B(l)):(c&&(c=!1,s=o?Br(r):r),s);let d;if(a){var f=_e in e||ye in e;d=_(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=Ma(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&$e(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var v=!1,y=(n&1?Nt:It)(()=>(v=!1,h()));a&&B(y);var b=_r;return(function(e,t){if(arguments.length>0){let n=t?B(y):i&&a?bn(e):e;return F(y,n),v=!0,s!==void 0&&(s=n),e}return fr&&v||b.f&16384?y.v:B(y)})}function Ra(e){ct===null&&Ke(`onMount`),it&&ct.l!==null?za(ct).m.push(e):Un(()=>{let t=Br(e);if(typeof t==`function`)return t})}function za(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`),at();var Ba={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`},Va=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ha=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ua=hi(`<svg><!><!></svg>`);function Wa(e,t){let n=Fa(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=Fa(n,[`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`]);j(t,!1);let i=X(t,`name`,8,void 0),a=X(t,`color`,8,`currentColor`),o=X(t,`size`,8,24),s=X(t,`strokeWidth`,8,2),c=X(t,`absoluteStrokeWidth`,8,!1),l=X(t,`iconNode`,24,()=>[]);ka();var u=Ua();ya(u,(e,t,n)=>({...Ba,...e,...r,width:o(),height:o(),stroke:a(),"stroke-width":t,class:n}),[()=>Va(r)?void 0:{"aria-hidden":`true`},()=>(Vr(c()),Vr(s()),Vr(o()),Br(()=>c()?Number(s())*24/Number(o()):s())),()=>(Vr(Ha),Vr(i()),Vr(n),Br(()=>Ha(`lucide-icon`,`lucide`,i()?`lucide-${i()}`:``,n.class)))]);var d=I(u);Ni(d,1,l,ki,(e,t)=>{var n=N(()=>re(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();Bi(L(a),r,!0,(e,t)=>{ya(e,()=>({...i()}))}),W(e,a)}),zi(R(d),t,`default`,{},null),k(u),W(e,u),M()}function Ga(e,t){let n=Fa(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`}]];Wa(e,La({name:`activity`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ka(e,t){let n=Fa(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`}]];Wa(e,La({name:`eraser`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function qa(e,t){let n=Fa(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`}]];Wa(e,La({name:`log-out`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ja(e,t){let n=Fa(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`}]];Wa(e,La({name:`pause`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ya(e,t){let n=Fa(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`}]];Wa(e,La({name:`play`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Xa(e,t){let n=Fa(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`}]];Wa(e,La({name:`refresh-cw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Za(e,t){let n=Fa(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`}]];Wa(e,La({name:`rotate-ccw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Qa(e,t){let n=Fa(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`}]];Wa(e,La({name:`save`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function $a(e,t){let n=Fa(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Wa(e,La({name:`search`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function eo(e,t){let n=Fa(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Wa(e,La({name:`x`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();zi(L(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}var to=class extends Error{status;fields;constructor(e,t,n=[]){super(t),this.status=e,this.fields=n,this.name=`ApiError`}};async function no(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 to(n.status,e,t)}return await n.json()}var ro={async login(e){await no(`/api/login`,{method:`POST`,body:JSON.stringify({token:e})})},schema(){return no(`/api/config/schema`)},config(){return no(`/api/config`)},save(e){return no(`/api/config`,{method:`PUT`,body:JSON.stringify(e)})},models(){return no(`/api/models`)},status(){return no(`/api/status`)},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 no(`/api/logs${n?`?${n}`:``}`)}};function io(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 ao=Array.isArray,oo=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(ao(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:oo(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},so=/\s+/g,co=Array.isArray,lo=e=>typeof e!=`string`||!e?e:e.replace(so,` `).trim(),uo=e=>{let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0),r=e.charCodeAt(t-1);if(n===32||r===32||n>=9&&n<=13||n===160||r>=9&&r<=13||r===160)return!0;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(r>=9&&r<=13||r===160||r===32&&n+1<t&&e.charCodeAt(n+1)===32)return!0}return!1},fo=(...e)=>{let t=oo(e);if(t)return uo(t)?lo(t):t},po=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,mo=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},ho=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e=0;e<i.length;e++){let t=i[e];if(!a.includes(t)||n[t]!==r[t])return!1}return!0},go=(e,t)=>{let n=e;for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];n[e]=e in n?fo(n[e],r):r}return e},_o=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];co(r)?_o(r,t):r&&t.push(r)}},vo=(...e)=>{let t=[];_o(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},yo=(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]=co(t)||co(n)?vo(n,t):typeof t==`object`&&typeof n==`object`&&t&&n?yo(t,n):n+` `+t}else i[e]=t}for(let e in r)e in n||(i[e]=r[e]);return i},bo={twMerge:!0,twMergeConfig:{}},xo=256,So=128,Co=Symbol(`tv-cache-miss`),wo=e=>e?.class!=null&&e.class!==``||e?.className!=null&&e.className!==``,To=e=>{if(e===void 0)return``;if(e===null)return`null`;if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return e===0?`0`:String(e);if(typeof e==`bigint`)return String(e);let t=po(e),n=typeof t;if(n===`string`||n===`number`||n===`boolean`||n===`bigint`)return String(t);if(n===`object`)try{return JSON.stringify(t)}catch{return null}return null},Eo=(e,t)=>{if(t===void 0)return e;if(t===null)return e+`null`;let n=typeof t;if(n===`string`||n===`number`||n===`boolean`||n===`bigint`)return e+String(t);if(Array.isArray(t))return e+t.join(`\0`);try{return e+JSON.stringify(t)}catch{return e+`?`}},Do=(e,t,n,r)=>{let i=``,a=Object.create(null);for(let r=0;r<e.length;r++){let o=e[r];a[o]=1;let s=t[o];n&&n[o]!==void 0&&(s=n[o]);let c=To(s);if(c===null)return null;i+=o+`:`+c+`;`}let o=[];for(let e in t)e===`class`||e===`className`||a[e]||(a[e]=1,o.push(e));if(n)for(let e in n)e===`class`||e===`className`||a[e]||n[e]===void 0||(a[e]=1,o.push(e));o.length>1&&o.sort();for(let e=0;e<o.length;e++){let r=o[e],a=t[r];n&&n[r]!==void 0&&(a=n[r]);let s=To(a);if(s===null)return null;i+=r+`:`+s+`;`}return i},Oo=(e,t)=>{let n=``;for(let t=0;t<e.length;t++){let{conditionKeys:r,source:i}=e[t];for(let e=0;e<r.length;e++){let t=r[e];n+=t+`=`,n=Eo(n,i[t]),n+=`,`}n+=`c=`,n=Eo(n,i.class),n+=`|cn=`,n=Eo(n,i.className),n+=`;`}for(let e=0;e<t.length;e++){let{conditionKeys:r,source:i}=t[e];for(let e=0;e<r.length;e++){let t=r[e];n+=t+`=`,n=Eo(n,i[t]),n+=`,`}Array.isArray(i.slots)&&(n+=`slots=`+i.slots.join(`,`)+`,`),n+=`c=`,n=Eo(n,i.class),n+=`|cn=`,n=Eo(n,i.className),n+=`;`}return n},ko=(e=xo)=>{let t=new Map,n=null;return{get(e){if(t.has(e))return t.get(e);if(n?.has(e)){let r=n.get(e);return t.set(e,r),r}return Co},set(r,i){t.size>=e&&(n=t,t=new Map),t.set(r,i)}}},Ao=(e=xo)=>{let t=ko(e);return{get(e){return t.get(e)},set(e,n){t.set(e,n)}}},jo=(e=So)=>{let t=new Map,n=null,r=0;return{get(e,i){let a=t.get(e);if(a){let e=a.get(i);if(e!==void 0||a.has(i))return e}if(n){let a=n.get(e);if(a){let n=a.get(i);if(n!==void 0||a.has(i)){let a=t.get(e);return a||(a=new Map,t.set(e,a)),a.has(i)||r++,a.set(i,n),n}}}return Co},set(i,a,o){r>=e&&(n=t,t=new Map,r=0);let s=t.get(i);s||(s=new Map,t.set(i,s)),s.has(a)||r++,s.set(a,o)}}},Mo=(e,t)=>{let n=null;return(r,i)=>{if(!wo(i))return r;let a=i.class,o=i.className;if(a!=null&&a!==``&&typeof a!=`string`||o!=null&&o!==``&&typeof o!=`string`)return e(t,r,a,o);n??=jo();let s=r??``,c=(typeof a==`string`?a:``)+`\0`+(typeof o==`string`?o:``),l=n.get(s,c);if(l!==Co)return l;let u=e(t,r,a,o);return n.set(s,c,u),u}};function No(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Po=No(),Fo=e=>{!mo(e.twMergeConfig)&&!ho(e.twMergeConfig,Po.cachedTwMergeConfig)&&(Po.didTwMergeConfigChange=!0,Po.cachedTwMergeConfig=e.twMergeConfig)},Io=(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:mo(a)})}return n},Lo=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})}return t},Ro=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})}return t},zo=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},Bo=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:a=[],compoundSlots:o=[],defaultVariants:s={}}=e,c={...bo,...t},l=e.slots!==void 0,u=n?.base?fo(n.base,e?.base):e?.base,d=n?.variants&&!mo(n.variants)?yo(i,n.variants):i,f=n?.defaultVariants&&!mo(n.defaultVariants)?{...n.defaultVariants,...s}:s;Fo(c);let p=!n?.slots||mo(n.slots),m=l?p&&n?.base?fo(e?.base,n.base):typeof e?.base==`string`||e?.base==null?e.base:fo(e.base):void 0,h=l?{base:m,...r}:{},g=p?h:go({...n?.slots},mo(h)?{base:e?.base}:h),_=!n?.compoundVariants||mo(n.compoundVariants)?a:vo(n?.compoundVariants,a),v=!n?.compoundSlots||mo(n.compoundSlots)?o:vo(n?.compoundSlots,o),y=Object.keys(d);return{config:c,extend:n,base:u,variants:d,defaultVariants:f,slots:g,compoundVariants:_,compoundSlots:v,compiledVariants:null,compiledCompoundVariants:null,compiledCompoundSlots:null,compiledCompoundSlotsBySlot:null,deferredError:_&&!Array.isArray(_)?TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof _}`):v&&!Array.isArray(v)?TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof v}`):null,mode:l||!p?`slots`:y.length===0?`plain`:`variants`,slotKeys:null,variantKeys:y}},Vo=e=>(e.compiledVariants===null&&(e.compiledVariants=Io(e.variants,e.variantKeys),e.compiledCompoundVariants=Lo(e.compoundVariants),e.compiledCompoundSlots=Ro(e.compoundSlots),e.compiledCompoundSlotsBySlot=zo(e.compiledCompoundSlots),e.slotKeys=e.slots&&typeof e.slots==`object`?Object.keys(e.slots):[]),e),Ho=[],Uo=[],Wo=[],Go=[],Ko=[],qo=(e,t,n)=>{let r={};for(let t in e)r[t]=e[t];if(t)for(let e in t)t[e]!==void 0&&(r[e]=t[e]);if(n)for(let e in n)n[e]!==void 0&&(r[e]=n[e]);return r},Jo=e=>e==null||e===!1,Yo=(e,t)=>{if(!Array.isArray(e))return e===t||Jo(e)&&Jo(t);for(let n=0;n<e.length;n++){let r=e[n];if(r===t||Jo(r)&&Jo(t))return!0}return!1},Xo=(e,t,n,r)=>{if(e.isEmpty)return null;let i=r?.[e.key]??n?.[e.key];if(i===null)return null;let a=po(i);if(typeof a==`object`)return null;let o=t?.[e.key],s=a??po(o);return e.values[s||`false`]},Zo=(e,t)=>{let{conditionKeys:n,source:r}=e;for(let e=0;e<n.length;e++){let i=n[e];if(!Yo(r[i],t[i]))return!1}return!0},Qo=(e,t,n)=>{typeof n==`string`?t===`base`&&e.push(n):n&&typeof n==`object`&&n[t]&&e.push(n[t])},$o=(e,t,n)=>{let r=Uo;r.length=0;for(let i=0;i<e.length;i++){let a=Xo(e[i],t,n);a&&r.push(a)}return r},es=(e,t,n,r,i)=>{let a=Uo;a.length=0;for(let o=0;o<t.length;o++){let s=Xo(t[o],n,r,i),c=e===`base`&&typeof s==`string`?s:s&&s[e];c&&a.push(c)}return a},ts=(e,t)=>{let n=Wo;n.length=0;for(let r=0;r<e.length;r++){let i=e[r];Zo(i,t)&&(i.source.class&&n.push(i.source.class),i.source.className&&n.push(i.source.className))}return n},ns=(e,t,n)=>{let r=Go;r.length=0;for(let i=0;i<t.length;i++){let a=t[i];Zo(a,n)&&(Qo(r,e,a.source.class),Qo(r,e,a.source.className))}return r},rs=(e,t)=>{let n=Ko;n.length=0;for(let r=0;r<e.length;r++){let i=e[r];Zo(i,t)&&(i.source.class&&n.push(i.source.class),i.source.className&&n.push(i.source.className))}return n},is=(e,t)=>{let{base:n,config:r}=e,i=Co,a=Mo(t,r);return(e=>(i===Co&&(i=t(r,n)),a(i,e)))},as=(e,t)=>{let{base:n,config:r,defaultVariants:i,deferredError:a,variantKeys:o}=e,s=e.compiledCompoundVariants,c=e.compiledVariants,l=Ho,u=null,d=Mo(t,r),f=1,p=e=>{let a=s.length>0?ts(s,qo(i,e)):void 0;return t(r,n,$o(c,i,e),a)};return(t=>{if(a)throw a;(c===null||s===null)&&(Vo(e),c=e.compiledVariants,s=e.compiledCompoundVariants,l=e.compiledCompoundSlots??Ho);let n;if(f>0)f--,n=p(t);else{u??=Ao();let e=Do(o,i,t);if(e!==null){let r=s.length>0||l.length>0?Oo(s,l):``,i=e+`#`+r,a=u.get(i);a===Co?(n=p(t),u.set(i,n)):n=a}else n=p(t)}return d(n,t)})},os=(e,t)=>{let{config:n,defaultVariants:r,deferredError:i,slots:a,variantKeys:o}=e,s=null,c=null,l=null,u=null,d=!1,f=null,p=null,m=1,h=()=>{if(l!==null)return;(e.compiledVariants===null||e.compiledCompoundVariants===null||e.compiledCompoundSlots===null||e.compiledCompoundSlotsBySlot===null||e.slotKeys===null)&&Vo(e);let i=e.compiledVariants;s=e.compiledCompoundVariants,c=e.compiledCompoundSlots;let o=e.compiledCompoundSlotsBySlot;l=e.slotKeys,d=s.length>0||c.length>0,f=Mo(t,n);let p=Array(l.length);for(let e=0;e<l.length;e++){let c=l[e],u=o[c]??Ho;p[e]=(e,o)=>{let l=d?qo(r,e,o):void 0,f=l?ns(c,s,l):void 0,p=l?rs(u,l):void 0;return t(n,a[c],es(c,i,r,e,o),f,p)}}u=p},g=e=>{let t=l,n=u,r=f,i={};for(let a=0;a<t.length;a++){let o=n[a],s=o(e);i[t[a]]=t=>{if(t==null)return s;let n=!1;for(let e in t)if(e!==`class`&&e!==`className`&&t[e]!==void 0){n=!0;break}return r(n?o(e,t):s,t)}}return i};return(e=>{if(i)throw i;if(h(),m>0)return m--,g(e);let t=Do(o,r,e);if(t===null)return g(e);let n=d?Oo(s,c):``,a=t+`#`+n;p??=ko();let l=p.get(a);if(l!==Co)return l;let u=g(e);return p.set(a,u),u})},ss=(e,t)=>{if(e.mode===`plain`)return is(e,t);let n;return(r=>(n??=e.mode===`slots`?os(e,t):as(e,t),n(r)))},cs=(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},ls=e=>{let t=(t,n)=>{let r=Bo(t,n),i=ss(r,e);return cs(i,r),i};return{tv:t,createTV:e=>(n,r)=>t(n,r?yo(e,r):e)}},us=(e,t)=>{let n=e.length,r=t.length,i=Array(n+r);for(let t=0;t<n;t++)i[t]=e[t];for(let e=0;e<r;e++)i[n+e]=t[e];return i},ds=(e,t)=>({classGroupId:e,validator:t}),fs=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ps=`-`,ms=[],hs=`arbitrary..`,gs=e=>{let t=ys(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e[0]===`[`&&e[e.length-1]===`]`)return vs(e);let n=e.split(ps);return _s(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?us(i,t):t:i||ms}return n[e]||ms}}},_s=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=_s(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ps):e.slice(t).join(ps),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},vs=e=>{let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?hs+r:void 0},ys=e=>{let{theme:t,classGroups:n}=e;return bs(n,t)},bs=(e,t)=>{let n=fs();for(let r in e){let i=e[r];xs(i,n,r,t)}return n},xs=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ss(i,t,n,r)}},Ss=(e,t,n,r)=>{typeof e==`string`?Cs(e,t,n):typeof e==`function`?ws(e,t,n,r):Ts(e,t,n,r)},Cs=(e,t,n)=>{let r=e===``?t:Es(t,e);r.classGroupId=n},ws=(e,t,n,r)=>{Ds(e)?xs(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(ds(n,e)))},Ts=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];xs(o,Es(t,a),n,r)}},Es=(e,t)=>{let n=e,r=t.split(ps),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=fs(),n.nextPart.set(t,i)),n=i}return n},Ds=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Os=`!`,ks=58,As=47,js=91,Ms=93,Ns=40,Ps=41,Fs=33,Is=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),Ls=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e.charCodeAt(s);if(n===0&&r===0){if(o===ks){t.push(e.slice(i,s)),i=s+1;continue}if(o===As){a=s;continue}}o===js?n++:o===Ms?n--:o===Ns?r++:o===Ps&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1,u=s.length-1;s.charCodeAt(u)===Fs?(c=s.slice(0,-1),l=!0):s.charCodeAt(0)===Fs&&(c=s.slice(1),l=!0);let d=a&&a>i?a-i:void 0;return Is(t,l,c,d)},Rs=e=>{let t=new Set(e.orderSensitiveModifiers);return e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);if(o||s){if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e]);r=[]}n.push(a)}else r.push(a)}if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e])}return n}},zs={isExternal:!0,classId:-1,conflictIds:[]},Bs=4096,Vs=16384,Hs=e=>{let t=Rs(e),n=Us(e),{getClassGroupId:r,getConflictingClassGroupIds:i}=gs(e),a=Object.create(null),o=Object.create(null),s=0,c=new Int32Array(256),l=0,u=new Uint8Array(64),d=!1,f=e=>{let t=[],n=e.length,r=-1;d=!1;for(let i=0;i<n;i++){let n=e.charCodeAt(i);n===32?r!==-1&&(t.push(e.slice(r,i)),r=-1):n>=9&&n<=13?(d=!0,r!==-1&&(t.push(e.slice(r,i)),r=-1)):r===-1&&(r=i)}return r!==-1&&t.push(e.slice(r)),t},p=new Map,m=0,h=e=>{let t=p.get(e);if(t===void 0&&(t=m++,p.set(e,t),t>=c.length)){let e=new Int32Array(c.length*2);e.set(c),c=e}return t},g=e=>{let{isExternal:a,modifiers:o,hasImportantModifier:s,baseClassName:c,maybePostfixModifierPosition:l}=Ls(e);if(a)return zs;let u=!!l,d;if(u){let e=c.substring(0,l);d=r(e);let t=d&&n[d]?r(c):void 0;t&&t!==d&&(d=t,u=!1)}else d=r(c);if(!d){if(!u||(d=r(c),!d))return zs;u=!1}let f=o.length===0?``:o.length===1?o[0]:t(o).join(`:`),p=s?f+Os:f,m=i(d,u),g=[];for(let e=0;e<m.length;e++)g.push(h(p+m[e]));return{isExternal:!1,classId:h(p+d),conflictIds:g}},_=e=>{let t=a[e];return t===void 0&&(t=o[e],t===void 0&&(t=g(e)),a[e]=t,++s>Bs&&(s=0,o=a,a=Object.create(null))),t};return{parseClassName:Ls,sortModifiers:t,postfixLookupClassGroupIds:n,getClassGroupId:r,getConflictingClassGroupIds:i,getClassDescriptor:_,mergeClassList:e=>{let t=f(e),n=t.length;if(n===1)return t[0];m>Vs&&(p.clear(),m=0,a=Object.create(null),o=Object.create(null),s=0),l=l+1|0,l===0&&(l=1);let r=l;if(n>u.length){let e=u.length;for(;e<n;)e*=2;u=new Uint8Array(e)}let i=!1,h=0;for(let e=n-1;e>=0;--e){let n=t[e];h+=n.length;let a=_(n);if(a.isExternal){u[e]=1;continue}let o=a.classId;if(c[o]===r){u[e]=0,i=!0;continue}c[o]=r;let s=a.conflictIds;for(let e=0;e<s.length;e++)c[s[e]]=r;u[e]=1}if(!i&&!d&&e.length===h+n-1)return e;let g=``;for(let e=0;e<n;e++)u[e]===1&&(g&&(g+=` `),g+=t[e]);return g}}},Us=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Ws=500,Gs=e=>{let t,n,r=Object.create(null),i=Object.create(null),a=0,o=r=>(t=Hs(e()),n=t.mergeClassList,c.mergeString=s,s(r)),s=e=>{let t=r[e];return t===void 0&&(t=i[e],t===void 0&&(t=n(e)),r[e]=t,++a>Ws&&(a=0,i=r,r=Object.create(null))),t},c=(...e)=>c.mergeString(oo(e));return c.mergeString=o,c},Ks=[],qs=e=>{let t=t=>t[e]||Ks;return t.isThemeGetter=!0,t},Js=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ys=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zs=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qs=/\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$/,$s=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ec=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nc=Number,rc=Number.isNaN,ic=Number.isInteger,ac=e=>Xs.test(e),oc=e=>!!e&&!rc(nc(e)),sc=e=>!!e&&ic(nc(e)),cc=e=>e.endsWith(`%`)&&oc(e.slice(0,-1)),lc=e=>Zs.test(e),uc=()=>!0,dc=e=>Qs.test(e)&&!$s.test(e),fc=()=>!1,pc=e=>ec.test(e),mc=e=>tc.test(e),hc=e=>!Z(e)&&!Q(e),gc=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),_c=e=>Mc(e,Ic,fc),Z=e=>Js.test(e),vc=e=>Mc(e,Lc,dc),yc=e=>Mc(e,Rc,oc),bc=e=>Mc(e,Bc,uc),xc=e=>Mc(e,zc,fc),Sc=e=>Mc(e,Pc,fc),Cc=e=>Mc(e,Fc,mc),wc=e=>Mc(e,Vc,pc),Q=e=>Ys.test(e),Tc=e=>Nc(e,Lc),Ec=e=>Nc(e,zc),Dc=e=>Nc(e,Pc),Oc=e=>Nc(e,Ic),kc=e=>Nc(e,Fc),Ac=e=>Nc(e,Vc,!0),jc=e=>Nc(e,Bc,!0),Mc=(e,t,n)=>{let r=Js.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nc=(e,t,n=!1)=>{let r=Ys.exec(e);return r?r[1]?t(r[1]):n:!1},Pc=e=>e===`position`||e===`percentage`,Fc=e=>e===`image`||e===`url`,Ic=e=>e===`length`||e===`size`||e===`bg-size`,Lc=e=>e===`length`,Rc=e=>e===`number`,zc=e=>e===`family-name`,Bc=e=>e===`number`||e===`weight`,Vc=e=>e===`shadow`,Hc=()=>{let e=qs(`color`),t=qs(`font`),n=qs(`text`),r=qs(`font-weight`),i=qs(`tracking`),a=qs(`leading`),o=qs(`breakpoint`),s=qs(`container`),c=qs(`spacing`),l=qs(`radius`),u=qs(`shadow`),d=qs(`inset-shadow`),f=qs(`text-shadow`),p=qs(`drop-shadow`),m=qs(`blur`),h=qs(`perspective`),g=qs(`aspect`),_=qs(`ease`),v=qs(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Q,Z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Q,Z,c],ee=()=>[ac,`full`,`auto`,...w()],T=()=>[sc,`none`,`subgrid`,Q,Z],te=()=>[`auto`,{span:[`full`,sc,Q,Z]},sc,Q,Z],ne=()=>[sc,`auto`,Q,Z],re=()=>[`auto`,`min`,`max`,`fr`,Q,Z],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],E=()=>[`auto`,...w()],oe=()=>[ac,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],se=()=>[ac,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ce=()=>[ac,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],D=()=>[e,Q,Z],le=()=>[...b(),Dc,Sc,{position:[Q,Z]}],ue=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],de=()=>[`auto`,`cover`,`contain`,Oc,_c,{size:[Q,Z]}],fe=()=>[cc,Tc,vc],pe=()=>[``,`none`,`full`,l,Q,Z],me=()=>[``,oc,Tc,vc],he=()=>[`solid`,`dashed`,`dotted`,`double`],ge=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],_e=()=>[oc,cc,Dc,Sc],ve=()=>[``,`none`,m,Q,Z],ye=()=>[`none`,oc,Q,Z],be=()=>[`none`,oc,Q,Z],xe=()=>[oc,Q,Z],Se=()=>[ac,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[lc],breakpoint:[lc],color:[uc],container:[lc],"drop-shadow":[lc],ease:[`in`,`out`,`in-out`],font:[hc],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[lc],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[lc],shadow:[lc],spacing:[`px`,oc],text:[lc],"text-shadow":[lc],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ac,Z,Q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Q,Z]}],"container-named":[gc],columns:[{columns:[oc,Z,Q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[sc,`auto`,Q,Z]}],basis:[{basis:[ac,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[oc,ac,`auto`,`initial`,`none`,Z]}],grow:[{grow:[``,oc,Q,Z]}],shrink:[{shrink:[``,oc,Q,Z]}],order:[{order:[sc,`first`,`last`,`none`,Q,Z]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:oe()}],"inline-size":[{inline:[`auto`,...se()]}],"min-inline-size":[{"min-inline":[`auto`,...se()]}],"max-inline-size":[{"max-inline":[`none`,...se()]}],"block-size":[{block:[`auto`,...ce()]}],"min-block-size":[{"min-block":[`auto`,...ce()]}],"max-block-size":[{"max-block":[`none`,...ce()]}],w:[{w:[s,`screen`,...oe()]}],"min-w":[{"min-w":[s,`screen`,`none`,...oe()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...oe()]}],h:[{h:[`screen`,`lh`,...oe()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...oe()]}],"max-h":[{"max-h":[`screen`,`lh`,...oe()]}],"font-size":[{text:[`base`,n,Tc,vc]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,jc,bc]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,cc,Z]}],"font-family":[{font:[Ec,xc,t]}],"font-features":[{"font-features":[Z]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Q,Z]}],"line-clamp":[{"line-clamp":[oc,`none`,Q,yc]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Q,Z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Q,Z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...he(),`wavy`]}],"text-decoration-thickness":[{decoration:[oc,`from-font`,`auto`,Q,vc]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[oc,`auto`,Q,Z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[sc,Q,Z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Q,Z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Q,Z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:de()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},sc,Q,Z],radial:[``,Q,Z],conic:[sc,Q,Z]},kc,Cc]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":me()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...he(),`hidden`,`none`]}],"divide-style":[{divide:[...he(),`hidden`,`none`]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...he(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[oc,Q,Z]}],"outline-w":[{outline:[``,oc,Tc,vc]}],"outline-color":[{outline:D()}],shadow:[{shadow:[``,`none`,u,Ac,wc]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ac,wc]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:me()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[oc,vc]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":[`none`,f,Ac,wc]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[oc,Q,Z]}],"mix-blend":[{"mix-blend":[...ge(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[oc]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Q,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[oc]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Q,Z]}],filter:[{filter:[``,`none`,Q,Z]}],blur:[{blur:ve()}],brightness:[{brightness:[oc,Q,Z]}],contrast:[{contrast:[oc,Q,Z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ac,wc]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:[``,oc,Q,Z]}],"hue-rotate":[{"hue-rotate":[oc,Q,Z]}],invert:[{invert:[``,oc,Q,Z]}],saturate:[{saturate:[oc,Q,Z]}],sepia:[{sepia:[``,oc,Q,Z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Q,Z]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[oc,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[oc,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,oc,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oc,Q,Z]}],"backdrop-invert":[{"backdrop-invert":[``,oc,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[oc,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[oc,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":[``,oc,Q,Z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Q,Z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[oc,`initial`,Q,Z]}],ease:[{ease:[`linear`,`initial`,_,Q,Z]}],delay:[{delay:[oc,Q,Z]}],animate:[{animate:[`none`,v,Q,Z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Q,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":[`scale-3d`],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[Q,Z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":[`translate-none`],zoom:[{zoom:[sc,Q,Z]}],accent:[{accent:D()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Q,Z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Q,Z]}],fill:[{fill:[`none`,...D()]}],"stroke-w":[{stroke:[oc,Tc,vc,yc]}],stroke:[{stroke:[`none`,...D()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Uc=(e,{extend:t={},override:n={}})=>(Gc(e.theme,n.theme),Gc(e.classGroups,n.classGroups),Gc(e.conflictingClassGroups,n.conflictingClassGroups),Gc(e.conflictingClassGroupModifiers,n.conflictingClassGroupModifiers),Wc(e,`postfixLookupClassGroups`,n.postfixLookupClassGroups),Wc(e,`orderSensitiveModifiers`,n.orderSensitiveModifiers),Kc(e.theme,t.theme),Kc(e.classGroups,t.classGroups),Kc(e.conflictingClassGroups,t.conflictingClassGroups),Kc(e.conflictingClassGroupModifiers,t.conflictingClassGroupModifiers),qc(e,t,`postfixLookupClassGroups`),qc(e,t,`orderSensitiveModifiers`),e),Wc=(e,t,n)=>{n!==void 0&&(e[t]=n)},Gc=(e,t)=>{if(t)for(let n in t)Wc(e,n,t[n])},Kc=(e,t)=>{if(t)for(let n in t)qc(e,t,n)},qc=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Jc=e=>Gs(e?typeof e==`function`?()=>e(Hc()):()=>Uc(Hc(),e):Hc),Yc=e=>{if(mo(e))return;let t=e,n={...t.extend??{}};for(let e of[`theme`,`classGroups`,`conflictingClassGroups`,`conflictingClassGroupModifiers`,`postfixLookupClassGroups`,`orderSensitiveModifiers`,`cacheSize`,`prefix`,`separator`,`experimentalParseClassName`])t[e]!==void 0&&n[e]===void 0&&(n[e]=t[e]);let r={};if(Object.keys(n).length>0&&(r.extend=n),t.override!=null&&!mo(t.override)&&(r.override=t.override),r.extend||r.override)return r},Xc=e=>{let t=Jc(Yc(e));return e=>t.mergeString(e)},Zc,Qc=()=>(Zc||=Jc(),Zc),$c=()=>((!Po.cachedTwMerge||Po.didTwMergeConfigChange)&&(Po.didTwMergeConfigChange=!1,Po.cachedTwMerge=Xc(Po.cachedTwMergeConfig)),Po.cachedTwMerge),el=e=>{let t=e?.twMergeConfig;t&&!mo(t)&&(ho(t,Po.cachedTwMergeConfig)||(Po.cachedTwMergeConfig=t,Po.didTwMergeConfigChange=!0))},tl=e=>oo(e);(()=>{let e=Error();return!(`line`in e)&&!(`lineNumber`in e)})();var nl=Po.reset.bind(Po);Po.reset=()=>{Zc=void 0,nl()};var rl=(e,t)=>{let n=tl(e);return!n||!(t?.twMerge??!0)?n||void 0:n.indexOf(` `)===-1?n:(el(t),(t?.twMergeConfig&&!mo(t.twMergeConfig)?$c():Qc().mergeString)(n)||void 0)},il=ls((e,...t)=>rl(t,e)),al=il.tv;il.createTV;var ol=48,sl=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-ol-t;return n},cl=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},ll=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-ol;n+=i>>>1^-(i&1),t[r]=n}return t},ul=384,dl=[],fl=cl(sl(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),pl=cl(sl(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),ml=`@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=fl.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=fl[n];i<fl[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(fl[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=fl[i];a<fl[i+1];a++)n[r++]=e,e+=t[e]}return n})(),gl=sl(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),_l=cl(sl(`123333359346463635126536711576`)),vl=sl(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),yl=sl(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),bl=ll(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),xl=(()=>{let e=new Int32Array(319).fill(-1),t=ll(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=ll(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),Sl=`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}),Cl=ll(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),wl=ll(`ɠ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`),Tl=ll(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±`),El=new Int32Array(987),Dl=new Int32Array(987),Ol=new Int32Array(987),kl=``,Al=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<Cl.length;r++)for(let i of Sl[Tl[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),Al[a*2]=kl.length,Al[a*2+1]=i.length,kl+=i),El[n]=Cl[r],Dl[n]=wl[r],Ol[n]=a,n++}}var jl=ll(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Ml=cl(sl(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Nl=ll(`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`),Pl=sl(`ij`),Fl=sl(`—`),Il=sl(`1`),Ll={GROUP_COUNT:ul,customValidatorNames:dl,edgeStart:fl,labelStart:pl,labelText:ml,edgeTarget:hl,nodeGroup:gl,nodeVlist:xl,vlistPat:_l,vlistOps:vl,vlistRef:yl,vlistGroup:bl,litAnchor:El,litGroup:Dl,litPool:Ol,poolOffsets:Al,poolText:kl,adjGid:jl,adjStart:Ml,adjTgt:Nl,patGid:Pl,patTgt:Fl,postfixLookupGroups:Il,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Rl=`line`in Error(),zl=-1,Bl=-1,Vl=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Hl=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^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),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),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},Ul=(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,te=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)te[y[e]]=e;let ne=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>ne&&(ne=t)}let re=32;for(;re<2*(1+ne+S.length);)re<<=1;let ie=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)ie[e+1]=ie[e]+u[f[e]+1]-u[f[e]];let ae=new Uint8Array(r);for(let e=0;e<w.length;e++)ae[w[e]]=1;let E=i.length-1,oe=new Uint8Array(E),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 D=1;for(;D<m.length*2;)D<<=1;let le=new Int32Array(D).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Vl(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&D-1;for(;le[n]!==-1;)n=n+1&D-1;le[n]=e}let ue=(e,t,n,r)=>{let i=(Vl(t,n,r)^Math.imul(e,2654435761)|0)&D-1,a=r-n;for(;;){let r=le[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&D-1}},de=n.cacheSize??8192,fe=n.prefix??e.prefix??``,pe=fe===``?``:fe+`:`,me=pe.length,he=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ge=/\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$/,_e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,be=0,xe=-1,Se=-1,Ce=-1,we=-1,Te=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Ee=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(be=0,xe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)be=1;else if(r===40&&i===41)be=2;else return;Ce=t+1,we=n-1;let a=t+1;if(Te(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!Te(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(xe=t+1,Se=a,Ce=a+1)}},Oe=(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},ke=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,je=e=>!!e&&!Number.isNaN(Number(e)),Me=(e,t,n)=>{if(n-t<11||!Oe(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&&Oe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&Oe(e,t+10,t+18,`-normal/`)},Ne=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Pe=`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(` `)),Fe=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Ie=(e,t,n,r)=>{if(e>=10){if(e>=25)return he[e-25](t.slice(n,r));let i=e-10;if(be!==Ne[i])return!1;if(xe>=0){for(let e of Pe[i])if(Oe(t,xe,Se,e))return!0;return!1}switch(Fe[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(Ce,we);return ge.test(e)&&!_e.test(e)}case 3:return je(t.slice(Ce,we));case 4:return ye.test(t.slice(Ce,we));default:return ve.test(t.slice(Ce,we))}}switch(e){case 0:return!0;case 1:return be===0;case 2:return be===1;case 3:return be===2;case 4:return ke.test(t.slice(n,r));case 5:return je(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&&je(t.slice(n,r-1));case 8:return Ae.test(t.slice(n,r));default:return Me(t,n,r)}},O=new Set(typeof T==`string`?T.split(` `):T),Le=(e,t,n,r,i,a)=>{let o=Vl(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer: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 outer;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},Re=new Map,ze=new Map,Be=2,k=4096,A=(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||O.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=ze.get(s);return c===void 0&&ze.set(s,c=Be++),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),lt=()=>{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)},ut=64,dt=new Int32Array(ut),ft=new Int32Array(ut),pt=new Int32Array(r),j=2048,M=21,mt=new Float64Array(j),ht=new Int32Array(j),gt=0,_t=(e,t)=>{if(e===0&&t<r)return pt[t]===gt?1:(pt[t]=gt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>M;for(;ht[i]===gt;){if(mt[i]===n)return 1;i=i+1&j-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?zl:Le(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=ft[t];if(r>n)continue;let i=dt[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=ue(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=ie[o]-c;for(let t=c;t<m;t++)if(Ie(d[t],e,r,n))return p[h+t]}return zl},yt=e=>{let t=e.length,n=0,c=0,u=!1;(Be>k||Re.size>k)&&(Re=new Map,ze=new Map,Be=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&&Ee(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&&Ee(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===tt&&lt();let _=n++;rt[_]=p,it[_]=h,c+=g,m^=Math.imul(g,2654435761);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(me!==0){if(h-p<=me||!e.startsWith(pe,p)){at[_]=zl,$e(y,e,p,h,v,zl,0,0);continue}b=p+me}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,te=h,ne=!1,re=0;te>T&&e.charCodeAt(te-1)===33?(ne=!0,te--):te>T&&e.charCodeAt(T)===33&&(ne=!0,T++,re=1);let ie=-1;w>ee&&(ie=w+re,ie>=te&&(ie=-1));let E=T;te-T>1&&e.charCodeAt(T)===45&&(E=T+1);let se=0,ce=0,D=0,le=-1,ue=0;(l[0]>=0||oe[0]===1)&&(dt[0]=0,ft[0]=E,ue=1);let de=Bl,fe=0;for(let t=E;t<te;t++)if(t===ie&&(de=ce<D?Bl:se,fe=ue),se!==Bl){let n=e.charCodeAt(t),r=-1;if(ce<D)o.charCodeAt(ce)===n?(ce++,ce===D&&(r=se=le)):se=Bl;else{let e=i[se],t=i[se+1],c=Bl;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,D=a[i+1],le=s[i],c=se);break}}se=c}if(r>=0&&(l[r]>=0||oe[r]===1)&&t+1<te&&e.charCodeAt(t+1)===45){if(ue===ut){ut*=2;let e=new Int32Array(ut);e.set(dt),dt=e;let t=new Int32Array(ut);t.set(ft),ft=t}dt[ue]=r,ft[ue]=t+2,ue++}}ie===te&&(de=ce<D?Bl:se,fe=ue);let he=ce<D?Bl:se,ge,_e=!1;if(ie>=0){if(_e=!0,ge=vt(e,T,ie,de,fe),ge!==zl&&ge<r&&ae[ge]){let t=vt(e,T,te,he,ue);t!==zl&&t!==ge&&(ge=t,_e=!1)}else ge===zl&&(ge=vt(e,T,te,he,ue),_e=!1)}else ge=vt(e,T,te,he,ue);let ve=0,ye=0;ge===zl?at[_]=zl:(ye=+!!_e,ve=b>=C?+!!ne:Le(Re,e,b,C,+!!ne,e=>A(e,ne)),at[_]=ge,st[_]=ye,ot[_]=ve),$e(y,e,p,h,v,ge,ve,ye)}if(n===0)return``;if(n===1)return rt[0]===0&&it[0]===t?e:e.slice(rt[0],it[0]);if(n*re>j){for(;n*re>j;)j<<=1,M--;mt=new Float64Array(j),ht=new Int32Array(j)}if(Be>=Ge||He>=Ge)throw Error(`cn: too many distinct classes in one merge`);gt=gt+1|0,gt===0&&(pt.fill(0),ht.fill(0),gt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=at[e];if(t===zl){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=te[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),St=0,Ct=1,wt=Object.create(null),Tt=Object.create(null),Et=new Map,Dt=new Map,Ot=0,kt=0,At=()=>{St^=bt,Ct=Ct+1|0,kt=0},jt=e=>{let t=wt[e];if(t!==void 0)return t;let n=Hl(e,0,e.length),r=(n&16383)+St,i=xt[r]===(n^Ct)||xt[r^bt]===(n^Ct-1);return i&&(t=Tt[e],t!==void 0)?(wt[e]=t,t):(t=yt(e),i?(wt[e]=t,++Ot>de&&(Ot=0,Tt=wt,wt=Object.create(null),At())):(xt[r]=n^Ct,++kt>bt&&At()),t)},Mt=e=>{let t=Et.get(e);if(t!==void 0)return t;let n=Hl(e,0,e.length),r=(n&16383)+St,i=xt[r]===(n^Ct)||xt[r^bt]===(n^Ct-1);return i&&(t=Dt.get(e),t!==void 0)?(Et.set(e,t),t):(t=yt(e),i?(Et.set(e,t),++Ot>de&&(Ot=0,Dt=Et,Et=new Map,At())):(xt[r]=n^Ct,++kt>bt&&At()),t)},Nt=e=>{let t=Hl(e,0,e.length),n=(t&16383)+St;return xt[n]===(t^Ct)||xt[n^bt]===(t^Ct-1)||(xt[n]=t^Ct,++kt>bt&&At(),!1)},Pt=de===0?yt:Rl?e=>{let t=Et.get(e);return t===void 0?Mt(e):t}:jt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Pt(arguments[0]):Pt(Kl.apply(null,arguments))},mergeString:Pt,seenBefore:de===0?()=>!1:Nt,mergeUncached:yt}},Wl=(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:Wl(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},Gl=(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:Wl(i,t);a&&(n&&(n+=` `),n+=a)}return n},Kl=function(){return Gl(arguments,!1)},ql=256,Jl=16,Yl=1024,Xl=4096,Zl=(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(Xl).fill(``),l=Array(Xl).fill(``),u=Array(Xl).fill(``));let i=Hl(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]=Wl(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;outer: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 outer}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>Jl&&(_.miss=Jl,_.skip=Yl,_.e.length=0,_.at=0);let u=_.e;u.length<ql?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(Wl(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)}},Ql=Ul(Ll),$l=Zl(Ql.mergeString,Ql);Ql.merge;var eu=al({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`}}),tu=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`href`,`class`,`variant`,`children`]);function nu(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`variant`,3,`default`),i=Y(t,tu);var a=U();Bi(L(a),()=>t.href?`a`:`span`,!1,(e,a)=>{Oa(e,e=>n(e),()=>n()),ya(e,e=>({"data-slot":`badge`,href:t.href,class:e,...i}),[()=>$l(eu({variant:r()}),t.class)]);var o=U();q(L(o),()=>t.children??w),W(a,o)}),W(e,a),M()}var ru=al({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`}}),iu=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]),au=V(`<a><!></a>`),ou=V(`<button><!></button>`);function su(e,t){j(t,!0);let n=X(t,`variant`,3,`default`),r=X(t,`size`,3,`default`),i=X(t,`ref`,15,null),a=X(t,`href`,3,void 0),o=X(t,`type`,3,`button`),s=Y(t,iu);var c=U(),l=L(c),u=e=>{var o=au();ya(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}),[()=>$l(ru({variant:n(),size:r()}),t.class)]),q(I(o),()=>t.children??w),k(o),Oa(o,e=>i(e),()=>i()),W(e,o)},d=e=>{var a=ou();ya(a,e=>({"data-slot":`button`,class:e,type:o(),disabled:t.disabled,...s}),[()=>$l(ru({variant:n(),size:r()}),t.class)]),q(I(a),()=>t.children??w),k(a),Oa(a,e=>i(e),()=>i()),W(e,a)};K(l,e=>{a()?e(u):e(d,-1)}),W(e,c),M()}var cu=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),lu=V(`<input/>`);function uu(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`value`,15),i=X(t,`files`,15),a=X(t,`data-slot`,3,`input`),o=Y(t,cu);var s=U(),c=L(s),l=e=>{var s=lu();ya(s,e=>({"data-slot":a(),class:e,type:`file`,...o}),[()=>$l(`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),Oa(s,e=>n(e),()=>n()),Ea(s,i),Ca(s,r),W(e,s)},u=e=>{var i=lu();ya(i,e=>({"data-slot":a(),class:e,type:t.type,...o}),[()=>$l(`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),Oa(i,e=>n(e),()=>n()),Ca(i,r),W(e,i)};K(c,e=>{t.type===`file`?e(l):e(u,-1)}),W(e,s),M()}function du(e){return typeof e==`function`}function fu(e){return typeof e==`object`&&!!e}var pu=[`string`,`number`,`bigint`,`boolean`];function mu(e){return e==null||pu.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>mu(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var hu=Symbol(`box`),gu=Symbol(`is-writable`);function $(e,t){let n=N(e);return t?{[hu]:!0,[gu]:!0,get current(){return B(n)},set current(e){t(e)}}:{[hu]:!0,get current(){return e()}}}function _u(e){return fu(e)&&hu in e}function vu(e){return _u(e)&&gu in e}function yu(e){return _u(e)?e:du(e)?$(e):Su(e)}function bu(e){return Object.entries(e).reduce((e,[t,n])=>_u(n)?(vu(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}),{})}function xu(e){return vu(e)?{[hu]:!0,get current(){return e.current}}:e}function Su(e){let t=P(bn(e));return{[hu]:!0,[gu]:!0,get current(){return B(t)},set current(e){F(t,e,!0)}}}function Cu(e){let t=P(bn(e));return{[hu]:!0,[gu]:!0,get current(){return B(t)},set current(e){F(t,e,!0)}}}Cu.from=yu,Cu.with=$,Cu.flatten=bu,Cu.readonly=xu,Cu.isBox=_u,Cu.isWritableBox=vu;function wu(...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 Tu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Eu=/\n/g,Du=/^\s*/,Ou=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ku=/^:\s*/,Au=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ju=/^[;\s]*/,Mu=/^\s+|\s+$/g,Nu=`
3
- `,Pu=`/`,Fu=`*`,Iu=``,Lu=`comment`,Ru=`declaration`;function zu(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(Eu);t&&(n+=t.length);var i=e.lastIndexOf(Nu);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(Du)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Pu==e.charAt(0)&&Fu==e.charAt(1)){for(var n=2;Iu!=e.charAt(n)&&(Fu!=e.charAt(n)||Pu!=e.charAt(n+1));)++n;if(n+=2,Iu===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:Lu,comment:o})}}function f(){var e=a(),t=c(Ou);if(t){if(d(),!c(ku))return s(`property missing ':'`);var n=c(Au),r=e({type:Ru,property:Bu(t[0].replace(Tu,Iu)),value:n?Bu(n[0].replace(Tu,Iu)):Iu});return c(ju),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 Bu(e){return e?e.replace(Mu,Iu):Iu}function Vu(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=zu(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 Hu=/\d/,Uu=[`-`,`_`,`/`,`.`];function Wu(e=``){if(!Hu.test(e))return e!==e.toLowerCase()}function Gu(e){let t=[],n=``,r,i;for(let a of e){let e=Uu.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Wu(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 Ku(e){return e?Gu(e).map(e=>Ju(e)).join(``):``}function qu(e){return Yu(Ku(e||``))}function Ju(e){return e?e[0].toUpperCase()+e.slice(1):``}function Yu(e){return e?e[0].toLowerCase()+e.slice(1):``}var Xu=1e3,Zu=new Map;function Qu(e){let t=Zu.get(e);return t===void 0&&(t=e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)?Ku(e):e.startsWith(`--`)?e:qu(e),Zu.size>=Xu&&Zu.clear(),Zu.set(e,t)),t}var $u=/["'\\{}]|\/\*/,ed=/^[-\w]+$/;function td(e){if($u.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(!ed.test(n)||!o)return null;t.push(n,o)}r=a+1,i=-1}}return t}function nd(e,t){let n=td(t);if(n)for(let t=0;t<n.length;t+=2)e[Qu(n[t])]=n[t+1];else Vu(t,(t,n)=>{e[Qu(t)]=n})}function rd(e){if(!e)return{};let t={};return nd(t,e),t}function id(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function ad(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 od=ad(/[A-Z]/,e=>`-${e.toLowerCase()}`),sd=new Map;function cd(e){let t=sd.get(e);return t===void 0&&(t=od(e),sd.size>=1e3&&sd.clear(),sd.set(e,t)),t}function ld(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
- `:``}${cd(n)}: ${r};`)}return t}function ud(e={}){return ld(e).replace(`
5
- `,` `)}var dd=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 fd(e){return dd.has(e)}function pd(...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&&fd(e))t[e]=wu(n,i);else if(a&&o)t[e]=id(n,i);else if(e===`class`){let r=mu(n),a=mu(i);r&&a?t[e]=Ui(n,i):r?t[e]=Ui(n):a&&(t[e]=Ui(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=rd(i);t[e]={...n,...r}}else if(o&&a)t[e]={...rd(n),...i};else if(o&&s){let r=rd(n),a=rd(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=ud(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 md={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%)`};ud(md);var hd=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function gd(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var _d=class extends Map{#e=new Map;#t=P(0);#n=P(0);#r=Dr||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return Dr===this.#r?P(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 B(this.#t),!1}return B(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{B(this.#t);return}}return B(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)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),F(this.#n,super.size),vn(o);else if(i!==t){vn(r);var s=o.reactions===null?null:new Set(o.reactions);s!==null&&r.reactions?.every(e=>s.has(e))||vn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),F(n,-1)),r&&(F(this.#n,super.size),vn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;F(this.#n,0);for(var t of e.values())F(t,-1);vn(this.#t),e.clear()}}#a(){B(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)B(n)}keys(){return B(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return B(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=hd,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=_i(e=>{let n=ii(t,`focusin`,e),r=ii(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?gd(this.#e):null}};function vd(e){return typeof e==`function`}var yd=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return ft(this.#t)}get(){let e=ut(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=ut(this.#t);return t===void 0?e:t}set(e){return dt(this.#t,e)}};function bd(e,t){switch(e){case`post`:Un(t);break;case`pre`:Gn(t)}}function xd(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;bd(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Br(()=>n(t,o));return o=t,r})}function Sd(e,t,n){xd(e,`post`,t,n)}function Cd(e,t,n){xd(e,`pre`,t,n)}Sd.pre=Cd;function wd(e){return vd(e)?e():e}var Td=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=N(()=>(B(this.#s)?.(),this.getSize().width));#o=N(()=>(B(this.#s)?.(),this.getSize().height));#s=N(()=>{let e=wd(this.#r);if(e)return _i(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??hd,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=wd(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 B(this.#s)?.(),this.getSize()}get width(){return B(this.#a)}get height(){return B(this.#o)}},Ed=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 B(this.#t)}};function Dd(e){Un(()=>()=>{e()})}function Od(e){Un(()=>Br(()=>e()))}function kd(e){Lr().then(e)}var Ad=1,jd=9,Md=11;function Nd(e){return fu(e)&&e.nodeType===Ad&&typeof e.nodeName==`string`}function Pd(e){return fu(e)&&e.nodeType===jd}function Fd(e){return fu(e)&&e.constructor?.name===`VisualViewport`}function Id(e){return fu(e)&&e.nodeType!==void 0}function Ld(e){return Id(e)&&e.nodeType===Md&&`host`in e}function Rd(e,t){if(!e||!t||!Nd(e)||!Nd(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&Ld(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function zd(e){return Pd(e)?e:Fd(e)?e.document:e?.ownerDocument??document}function Bd(e){return Ld(e)?Bd(e.host):Pd(e)?e.defaultView??window:Nd(e)?e.ownerDocument?.defaultView??window:window}function Vd(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Hd=class{element;#e=N(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return B(this.#e)}set root(e){F(this.#e,e)}constructor(e){this.element=typeof e==`function`?$(e):e}getDocument=()=>zd(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Vd(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 Ud(e,t){return{[Ur()]:n=>_u(e)?(e.current=n,Br(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Br(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Wd(e){return e?`true`:`false`}function Gd(e){return e?`true`:void 0}function Kd(e){return e?``:void 0}function qd(e){return e?!0:void 0}function Jd(e){return e?`open`:`closed`}function Yd(e){return e?`checked`:`unchecked`}function Xd(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}function Zd(e,t){return t?`mixed`:e?`true`:`false`}var Qd=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 $d(e){let t=new Qd(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var ef=`ArrowDown`,tf=`ArrowLeft`,nf=`ArrowRight`,rf=`ArrowUp`,af=`Home`,of=`PageDown`,sf=`PageUp`;function cf(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var lf=[ef,sf,af],uf=[rf,of,`End`];[...lf,...uf];function df(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?tf:nf,vertical:ef}[t]}function ff(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?nf:tf,vertical:rf}[t]}function pf(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:df(e,t),prevKey:ff(e,t)}}var mf=typeof document<`u`,hf=gf();function gf(){return mf&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function _f(e){return e instanceof HTMLElement}function vf(e){return e instanceof Element||e instanceof SVGElement}function yf(e){return e?.matches(`:disabled`)??!1}function bf(e){return e!==null}function xf(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 Sf=class{#e;#t=Cu(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}=pf(cf(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[af]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?nf:ef,t=s===`ArrowUp`?tf:rf;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(`#${xf(e)}`);t&&_f(t)&&t.focus()}},Cf=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,Dd(()=>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?kd(n):n()}},wf=class{#e;#t;#n;#r=P(!1);#i=P(void 0);#a=!1;#o=null;constructor(e){this.#e=e,F(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new Cf({ref:this.#e.ref,afterTick:this.#e.open}),Dd(()=>this.#s()),Sd(()=>this.#e.open.current,e=>{!this.#a&&(this.#a=!0,e===B(this.#r))||(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()?(F(this.#r,!1),F(this.#i,void 0),this.#e.onComplete?.()):(e&&F(this.#r,!0),F(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&F(this.#i,void 0)})),this.#t?this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||F(this.#r,!1),F(this.#i,void 0),this.#e.onComplete?.())}):(e||F(this.#r,!1),F(this.#i,void 0),this.#e.onComplete?.())))})}get shouldRender(){return B(this.#r)}get transitionStatus(){return B(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function Tf(){}function Ef(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function Df(e,t){var n=U();Oi(L(n),()=>t.children,e=>{var n=U();q(L(n),()=>t.children??w),W(e,n)}),W(e,n)}var Of=new yd(`BitsConfig`);function kf(){let e=new Af(null,{});return Of.getOr(e).opts}var Af=class{opts;constructor(e,t){let n=jf(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function jf(e,t){return n=>$(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function Mf(e,t){return n=>{let r=kf();return $(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var Nf=Mf(e=>e.defaultPortalTo,`body`);function Pf(e,t){j(t,!0);let n=Nf(()=>t.to),r=pt(),i=N(a);function a(){if(!mf||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&&=(Ti(o),null)}Sd([()=>B(i),()=>t.disabled],([e,n])=>{if(!e||n)s();else return o=xi(Df,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=U(),l=L(c),u=e=>{var n=U();q(L(n),()=>t.children??w),W(e,n)};K(l,e=>{t.disabled&&e(u)}),W(e,c),M()}var Ff=new WeakMap;function If(e,t=e.composedPath()){Ff.set(e,t)}function Lf(e){return Ff.get(e)??e.composedPath()}function Rf(e,t){return t?vf(e.target)&&t.contains(e.target)||Lf(e).includes(t):!1}function zf(e,t){for(let n of Lf(e))if(vf(n)&&n.matches(t))return n;return vf(e.target)?e.target.closest(t):null}function Bf(e,t){If(t,Lf(e))}function Vf(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 Hf(e,t){return e===t||e.contains(t)}function Uf(e){return e?.ownerDocument??document}function Wf(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 Gf=`data-context-menu-trigger`,Kf=`data-context-menu-content`;globalThis.bitsDismissableLayers??=new Map;var qf=class e{static create(t){return new e(t)}opts;#e=Tf;#t=()=>!1;#n=null;#r=Su(`close`);#i={pointerdown:!1};#a=!1;#o=null;#s=!1;#c=void 0;#l=Tf;#u=Tf;#d=!1;constructor(e){this.opts=e,Gn(()=>{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=Tf,n=null,r=()=>{n=null,this.#x(),globalThis.bitsDismissableLayers.delete(this),this.#g.destroy(),this.#u(),t()};Sd([()=>this.opts.enabled.current,()=>this.opts.ref.current],([e,i])=>{let a=e?i:null;n!==a&&(r(),a&&(n=a,this.#c=Uf(a),globalThis.bitsDismissableLayers.set(this,this.#r),t=this.#p()))}),Dd(()=>{this.#d=!0,r()})}#f=e=>{e.defaultPrevented||this.#d||!this.#n||kd(()=>{this.#d||this.#n&&!this.#b(e.target)&&e.target&&!this.#s&&this.#l?.(e)})};#p(){let e=this.#c,t=e=>{Br(()=>{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),id(()=>e.removeEventListener(`pointerdown`,t,!0),()=>e.removeEventListener(`pointerdown`,n),ii(e,`focusin`,this.#f))}#m=e=>{let t=e;t.defaultPrevented&&(t=Zf(e)),this.#e(e)};#h=e=>{if(!this.#n){this.#u();return}let t=this.#t(e,this.#n)||Xf(e,this.#n);if(!this.#a||this.#S()||!t){this.#u();return}let n=e;if(n.defaultPrevented&&(n=Zf(n)),this.#r.current!==`close`&&this.#r.current!==`defer-otherwise-close`)this.#u();else if(e.pointerType===`touch`){this.#u();let e=null,t=Tf,n=e=>{t(),this.#m(e)};t=id(ii(this.#c,`click`,n,{once:!0}),ii(this.#c,`click`,t=>{If(t),e=setTimeout(()=>n(t),0)},{once:!0,capture:!0}),()=>{e!==null&&clearTimeout(e),e=null}),this.#u=t}else this.#e(n)};#g=Vf(this.#h,10);#_=e=>{this.#i[e.type]=!0};#v=e=>{this.#i[e.type]=!1};#y=e=>{this.#o=e,If(e),this.#n&&(this.#a=Yf(this))};#b=e=>this.#n?Hf(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 Jf(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Yf(e){let t=[...globalThis.bitsDismissableLayers],n=Jf(t);if(n)return n[0]===e;let[r]=t[0];return r===e}function Xf(e,t){let n=e.target;if(!vf(n))return!1;let r=!!zf(e,`[${Gf}]`),i=!!t.closest(`[${Kf}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:Uf(n).documentElement.contains(n)&&!Rf(e,t)&&Wf(e,t)}function Zf(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 Bf(e,a),a}function Qf(e,t){j(t,!0);let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`onInteractOutside`,3,Tf),i=X(t,`onFocusOutside`,3,Tf),a=X(t,`isValidEvent`,3,()=>!1),o=qf.create({id:$(()=>t.id),interactOutsideBehavior:$(()=>n()),onInteractOutside:$(()=>r()),enabled:$(()=>t.enabled),onFocusOutside:$(()=>i()),isValidEvent:$(()=>a()),ref:Br(()=>t.ref)});var s=U();q(L(s),()=>t.children??w,()=>({props:o.props})),W(e,s),M()}globalThis.bitsEscapeLayers??=new Map;var $f=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Hd(this.opts.ref);let t=Tf;Sd(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>ii(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!ep(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 ep(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 tp(e,t){j(t,!0);let n=X(t,`escapeKeydownBehavior`,3,`close`),r=X(t,`onEscapeKeydown`,3,Tf);$f.create({escapeKeydownBehavior:$(()=>n()),onEscapeKeydown:$(()=>r()),enabled:$(()=>t.enabled),ref:Br(()=>t.ref)});var i=U();q(L(i),()=>t.children??w),W(e,i),M()}var np=class e{static instance;#e=Su([]);#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=Vd(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)}},rp=[`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] *)`],ip=rp.join(`,`),ap=typeof Element>`u`,op=ap?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,sp=!ap&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},cp=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]`):cp(e.parentNode))},lp=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`},up=function(e,t,n){if(cp(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ip));return t&&op.call(e,ip)&&r.unshift(e),r=r.filter(n),r},dp=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!cp(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=dp(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{op.call(a,ip)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!cp(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=dp(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},fp=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},pp=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||lp(e))&&!fp(e)?0:e.tabIndex},mp=function(e,t){var n=pp(e);return n<0&&t&&!fp(e)?0:n},hp=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},gp=function(e){return e.tagName===`INPUT`},_p=function(e){return gp(e)&&e.type===`hidden`},vp=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},yp=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},bp=function(e){if(!e.name)return!0;var t=e.form||sp(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=yp(r,e.form);return!i||i===e},xp=function(e){return gp(e)&&e.type===`radio`},Sp=function(e){return xp(e)&&!bp(e)},Cp=function(e){var t=e&&sp(e),n=t?.host,r=!1;if(t&&t!==e){var i,a;for(r=!!((i=n)!=null&&(i=i.ownerDocument)!=null&&i.contains(n)||e!=null&&(a=e.ownerDocument)!=null&&a.contains(e));!r&&n;){var o;t=sp(n),n=t?.host,r=!!((o=n)!=null&&(o=o.ownerDocument)!=null&&o.contains(n))}}return r},wp=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Tp=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=op.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(op.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=sp(e);if(s&&!s.shadowRoot&&r(s)===!0)return wp(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(Cp(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return wp(e);return!1},Ep=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 op.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Dp=function(e,t){return!(t.disabled||_p(t)||Tp(t,e)||vp(t)||Ep(t))},Op=function(e,t){return!(Sp(t)||pp(t)<0||!Dp(e,t))},kp=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Ap=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=mp(a,i),s=i?Ap(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(hp).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},jp=function(e,t){return t||={},Ap(t.getShadowRoot?dp([e],t.includeContainer,{filter:Op.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:kp}):up(e,t.includeContainer,Op.bind(null,t)))},Mp=function(e,t){return t||={},t.getShadowRoot?dp([e],t.includeContainer,{filter:Dp.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):up(e,t.includeContainer,Dp.bind(null,t))},Np=rp.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Pp=function(e,t){if(t||={},!e)throw Error(`No node provided`);return op.call(e,Np)!==!1&&Dp(t,e)};function Fp(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 Ip=class e{#e=!1;#t=null;#n=np.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(Fp(Vd(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(ii(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=Fp(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)&&Pp(n))t.preventDefault(),n.focus({preventScroll:!0});else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus({preventScroll:!0})}}},{capture:!0}),ii(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&&Vd(t)===i?(e.preventDefault(),r.focus()):e.shiftKey&&Vd(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?jp(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?Mp(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return Sd([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),Dd(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function Lp(e,t){j(t,!0);let n=X(t,`enabled`,3,!1),r=X(t,`trapFocus`,3,!1),i=X(t,`loop`,3,!1),a=X(t,`onCloseAutoFocus`,3,Tf),o=X(t,`onOpenAutoFocus`,3,Tf),s=Ip.use({enabled:$(()=>n()),trap:$(()=>r()),loop:Br(()=>i()),onCloseAutoFocus:$(()=>a()),onOpenAutoFocus:$(()=>o()),ref:Br(()=>t.ref)});var c=U();q(L(c),()=>t.focusScope??w,()=>({props:s.props})),W(e,c),M()}var Rp=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var zp=class e{static create(t){return new e(t)}opts;domContext;#e=Tf;#t=!1;#n=Rp;#r=Rp;constructor(e){this.opts=e,this.domContext=new Hd(e.ref);let t=Tf;Sd(()=>[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 id(ii(this.domContext.getDocument(),`pointerdown`,this.#o),ii(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;_f(t)&&_f(n)&&Up(this)&&Rd(t,n)&&(this.#n(e),e.defaultPrevented||(this.#e=Vp(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=Tf}},Bp=e=>e.style.userSelect||e.style.webkitUserSelect;function Vp(e,t){let n=Bp(t),r=Bp(e);return Hp(t,`none`),Hp(e,`text`),()=>{Hp(t,n),Hp(e,r)}}function Hp(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Up(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function Wp(e,t){j(t,!0);let n=X(t,`preventOverflowTextSelection`,3,!0),r=X(t,`onPointerDown`,3,Tf),i=X(t,`onPointerUp`,3,Tf);zp.create({id:$(()=>t.id),onPointerDown:$(()=>r()),onPointerUp:$(()=>i()),enabled:$(()=>t.enabled&&n()),ref:Br(()=>t.ref)});var a=U();q(L(a),()=>t.children??w),W(e,a),M()}globalThis.bitsIdCounter??={current:0};function Gp(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Kp=class{#e;#t=0;#n=P();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),F(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,B(this.#n)===void 0&&(this.#r=Kn(()=>{F(this.#n,this.#e(...e),!0)})),Un(()=>()=>{this.#i()}),B(this.#n)}},qp=new _d,Jp=new Map,Yp=[`padding-right`,`margin-right`,`overflow`,`overflow-x`,`overflow-y`,`pointer-events`,`--scrollbar-width`],Xp=null,Zp=!1,Qp=new Set,$p=null,em=null,tm=!1;function nm(e,t,n){e.setProperty(t,n),Qp.add(t),t===`overflow`&&(Qp.add(`overflow-x`),Qp.add(`overflow-y`))}var rm=$(()=>{for(let e of qp.values())if(e)return!0;return!1}),im=$(()=>{for(let[e,t]of qp)if(t&&(Jp.get(e)?.()??!0))return!0;return!1}),am=null,om=new Kp(()=>{function e(e,t){let n=Xp?.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 Yp)Qp.has(n)&&e(t,n);!Zp&&t.body.style.length===0&&t.body.removeAttribute(`style`),Xp=null,Qp.clear(),hf&&$p?.()}function n(t){Qp.delete(`pointer-events`)&&e(t,`pointer-events`)}function r(){em!==null&&(window.clearTimeout(em),em=null)}function i(e,t){r(),tm=!0,am=Date.now();let n=am,i=()=>{em=null,am===n&&(cm(qp)?tm=!1:(tm=!1,t()))},a=e===null?24:e;em=window.setTimeout(i,a)}function a(){if(Xp===null&&qp.size===0&&!tm){Zp=document.body.hasAttribute(`style`),Xp=new Map;for(let e of Yp)Xp.set(e,{value:document.body.style.getPropertyValue(e),priority:document.body.style.getPropertyPriority(e)})}}return Sd(()=>rm.current,()=>{if(!rm.current)return;a(),tm=!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&&(nm(document.body.style,`padding-right`,`${i.padding}px`),nm(document.body.style,`margin-right`,`${i.margin}px`),nm(document.body.style,`--scrollbar-width`,`${r}px`)),nm(document.body.style,`overflow`,`hidden`),hf&&($p=ii(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),kd(()=>{im.current&&nm(document.body.style,`pointer-events`,`none`),nm(document.body.style,`overflow`,`hidden`)})}),Sd(()=>im.current,()=>{rm.current&&kd(()=>{rm.current&&(im.current?nm(document.body.style,`pointer-events`,`none`):n(document))})},{lazy:!0}),Dd(()=>()=>{$p?.()}),{get lockMap(){return qp},resetBodyStyle:t,restorePointerEvents:n,scheduleCleanupIfNoNewLocks:i,cancelPendingCleanup:r,ensureInitialStyleCaptured:a}}),sm=class{#e=Gp();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null,n=()=>!0){this.#t=e,this.#n=t,this.#r=om.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),Jp.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)),Dd(()=>{if(this.#r.lockMap.delete(this.#e),Jp.delete(this.#e),cm(this.#r.lockMap))return;let e=this.#n(),t=document;this.#r.restorePointerEvents(t),this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle(t)})}))}};function cm(e){for(let[t,n]of e)if(n)return!0;return!1}function lm(e,t){j(t,!0);let n=X(t,`preventScroll`,3,!0),r=X(t,`restoreScrollDelay`,3,null),i=X(t,`blockPointer`,3,()=>!0);Br(()=>{n()&&new sm(n(),()=>r(),i())}),M()}function um(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 dm(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 fm(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 pm(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 mm(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 mm(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 hm(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=hm(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 hm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`]),_m=V(`<input/>`);function vm(e,t){j(t,!0);let n=X(t,`value`,15),r=Y(t,gm),i=N(()=>pd(r,{"aria-hidden":`true`,tabindex:-1,style:{...md,position:`absolute`,top:`0`,left:`0`}}));var a=U(),o=L(a),s=e=>{var t=_m();ya(t,()=>({...B(i),value:n(),defaultChecked:B(i).checked})),W(e,t)},c=e=>{var t=_m(),r=e=>n(e.currentTarget.value);ya(t,()=>({...B(i),value:n(),defaultValue:n()??``,oninput:r})),W(e,t)};K(o,e=>{B(i).type===`checkbox`?e(s):e(c,-1)}),W(e,a),M()}var ym=new yd(`Floating.Root`),bm=new yd(`Floating.Root`),xm=class e{static create(t=!1){return t?bm.set(new e):ym.set(new e)}anchorNode=Su(null);customAnchorNode=Su(null);triggerNode=Su(null);constructor(){Un(()=>{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})}},Sm=class e{static create(t,n=!1){return n?new e(t,bm.get()):new e(t,ym.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?yu(e.virtualEl.current):e.ref}};function Cm(e,t){j(t,!0);let n=X(t,`tooltip`,3,!1);xm.create(Br(()=>n()));var r=U();q(L(r),()=>t.children??w),W(e,r),M()}function wm(e){return typeof e==`function`?e():e}function Tm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Em(e,t){let n=Tm(e);return Math.round(t*n)/n}function Dm(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 Om={afterMs:1e4,onChange:Tf};function km(e,t){let{afterMs:n,onChange:r,getWindow:i}={...Om,...t},a=null,o=P(bn(e));function s(){return i().setTimeout(()=>{F(o,e,!0),r?.(e)},n)}return Un(()=>()=>{a&&i().clearTimeout(a)}),$(()=>B(o),e=>{F(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var Am=class{#e;#t=N(()=>this.#e.candidateValues());#n;constructor(e){this.#e=e,this.#n=km(``,{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!B(this.#t).length)return;this.#n.current=this.#n.current+e;let t=this.#e.getCurrentItem(),n=B(this.#t).find(e=>e===t)??``,r=mm(B(this.#t).map(e=>e??``),this.#n.current,n),i=B(this.#t).find(e=>e===r);return i&&this.#e.onMatch(i),i}resetTypeahead(){this.#n.current=``}},jm=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=km(``,{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=B(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=mm(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&B(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},Mm=[ef,sf,af],Nm=[rf,of,`End`],Pm=[...Mm,...Nm],Fm=$d({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),Im=new yd(`Select.Root | Combobox.Root`);new yd(`Select.Group | Combobox.Group`);var Lm=new yd(`Select.Content | Combobox.Content`),Rm=class{opts;#e=P(!1);get touchedInput(){return B(this.#e)}set touchedInput(e){F(this.#e,e,!0)}#t=P(null);get inputNode(){return B(this.#t)}set inputNode(e){F(this.#t,e,!0)}#n=P(null);get contentNode(){return B(this.#n)}set contentNode(e){F(this.#n,e,!0)}contentPresence;#r=P(null);get viewportNode(){return B(this.#r)}set viewportNode(e){F(this.#r,e,!0)}#i=P(null);get triggerNode(){return B(this.#i)}set triggerNode(e){F(this.#i,e,!0)}#a=P(null);get valueNode(){return B(this.#a)}set valueNode(e){F(this.#a,e,!0)}#o=P(``);get valueId(){return B(this.#o)}set valueId(e){F(this.#o,e,!0)}selectedLabelsByValue=new _d;#s=P(null);get highlightedNode(){return B(this.#s)}set highlightedNode(e){F(this.#s,e,!0)}#c=N(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return B(this.#c)}set highlightedValue(e){F(this.#c,e)}#l=N(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return B(this.#l)}set highlightedId(e){F(this.#l,e)}#u=N(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return B(this.#u)}set highlightedLabel(e){F(this.#u,e)}#d=P(!1);get contentIsPositioned(){return B(this.#d)}set contentIsPositioned(e){F(this.#d,e,!0)}isUsingKeyboard=!1;pressedItem=null;isCombobox=!1;domContext=new Hd(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new wf({ref:$(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Gn(()=>{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=>Fm.getAttr(e,this.isCombobox?`combobox`:void 0)},zm=class extends Rm{opts;isMulti=!1;#e=N(()=>this.opts.value.current!==``);get hasValue(){return B(this.#e)}set hasValue(e){F(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 B(this.#t)}set currentLabel(e){F(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 B(this.#n)}set candidateLabels(e){F(this.#n,e)}#r=N(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return B(this.#r)}set dataTypeaheadEnabled(e){F(this.#r,e)}constructor(e){super(e),this.opts=e,Un(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Sd(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),Sd(()=>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(){kd(()=>{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)})}},Bm=class extends Rm{opts;isMulti=!0;#e=N(()=>this.opts.value.current.length>0);get hasValue(){return B(this.#e)}set hasValue(e){F(this.#e,e)}#t=N(()=>new Set(this.opts.value.current));constructor(e){super(e),this.opts=e,Un(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Sd(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),Sd(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e)})}includesItem(e){return B(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(){kd(()=>{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)}})}},Vm=class{static create(e){let{type:t,...n}=e,r=t===`single`?new zm(n):new Bm(n);return Im.set(r)}},Hm=class e{static create(t){return new e(t,Im.get())}root;opts;attachment;constructor(e,t){this.root=t,this.opts=e,this.attachment=Ud(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 B(this.#e)}set snippetProps(e){F(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 B(this.#t)}set props(e){F(this.#t,e)}},Um=class e{static create(t){return new e(t,Im.get())}opts;root;attachment;#e;#t;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ud(e.ref,e=>this.root.triggerNode=e),this.root.domContext=new Hd(e.ref),this.#e=new jm({getCurrentItem:()=>this.root.highlightedNode,onMatch:e=>{this.root.setHighlightedNode(e)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new Am({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(),Pm.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=um(t,r,i):e.key===`ArrowUp`?a=dm(t,r,i):e.key===`PageDown`?a=fm(t,r,10,i):e.key===`PageUp`?a=pm(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||yf(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||yf(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":Wd(this.root.opts.open.current),"aria-controls":this.root.contentNode?.id||void 0,"aria-activedescendant":this.root.highlightedId,"data-state":Jd(this.root.opts.open.current),"data-disabled":Kd(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 B(this.#a)}set props(e){F(this.#a,e)}},Wm=class e{static create(t){return Lm.set(new e(t,Im.get()))}opts;root;attachment;#e=P(!1);get isPositioned(){return B(this.#e)}set isPositioned(e){F(this.#e,e,!0)}userHasScrolled=!1;domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ud(e.ref,e=>this.root.contentNode=e),this.domContext=new Hd(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),Dd(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),Sd(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1,this.userHasScrolled=!1)}),Sd([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{this.isPositioned&&this.root.highlightedNode&&(this.root.isUsingKeyboard&&(this.userHasScrolled=!1),this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode))}),Sd([()=>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),id(ii(e,`wheel`,t,{passive:!0}),ii(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(()=>Dm(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{Rf(e,this.root.triggerNode)||Rf(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 B(this.#n)}set snippetProps(e){F(this.#n,e)}#r=N(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":Jd(this.root.opts.open.current),...Xd(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...B(this.#t)},onpointermove:this.onpointermove,onpointerdowncapture:this.onpointerdowncapture,...this.attachment}));get props(){return B(this.#r)}set props(e){F(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)}}},Gm=class e{static create(t){return new e(t,Im.get())}opts;root;attachment;#e=N(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return B(this.#e)}set isDisabled(e){F(this.#e,e)}#t=N(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return B(this.#t)}set isSelected(e){F(this.#t,e)}#n=N(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return B(this.#n)}set isHighlighted(e){F(this.#n,e)}#r=N(()=>this.isHighlighted&&!this.isDisabled);prevHighlighted=new Ed(()=>this.isHighlighted);#i=P(!1);get mounted(){return B(this.#i)}set mounted(e){F(this.#i,e,!0)}#a;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ud(e.ref),Sd([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Sd(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),Sd([()=>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 B(this.#s)}set snippetProps(e){F(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`&&!hf?this.#a=ii(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":Wd(this.isSelected),"data-value":this.opts.value.current,"data-disabled":Kd(this.isDisabled),"data-highlighted":Kd(B(this.#r)),"data-selected":Kd(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 B(this.#c)}set props(e){F(this.#c,e)}},Km=class e{static create(t){return new e(t,Im.get())}opts;root;#e=N(()=>this.root.opts.name.current!==``);get shouldRender(){return B(this.#e)}set shouldRender(e){F(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:qd(this.root.opts.disabled.current),required:qd(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return B(this.#t)}set props(e){F(this.#t,e)}},qm=class e{static create(t){return new e(t,Lm.get())}opts;content;root;attachment;#e=P(0);get prevScrollTop(){return B(this.#e)}set prevScrollTop(e){F(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Ud(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 B(this.#t)}set props(e){F(this.#t,e)}},Jm=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=Tf;#e=P(!1);get mounted(){return B(this.#e)}set mounted(e){F(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Ud(e.ref),Sd([()=>this.mounted],()=>{this.mounted||(this.isUserScrolling=!1)}),Un(()=>{this.mounted&&this.root.opts.open.current||this.clearAutoScrollInterval()}),Dd(()=>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":Gd(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return B(this.#t)}set props(e){F(this.#t,e)}},Ym=class e{static create(t){return new e(new Jm(t,Lm.get()))}scrollButtonState;content;root;#e=P(!1);get canScrollDown(){return B(this.#e)}set canScrollDown(e){F(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Sd([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{let e=this.root.viewportNode;if(e&&this.content.isPositioned)return this.handleScroll(!0),ii(e,`scroll`,()=>this.handleScroll())}),Sd([()=>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 B(this.#t)}set props(e){F(this.#t,e)}},Xm=class e{static create(t){return new e(new Jm(t,Lm.get()))}scrollButtonState;content;root;#e=P(!1);get canScrollUp(){return B(this.#e)}set canScrollUp(e){F(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Sd([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(this.root.viewportNode&&this.content.isPositioned)return this.handleScroll(!0),ii(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 B(this.#t)}set props(e){F(this.#t,e)}};function Zm(e,t){j(t,!0);let n=X(t,`value`,15),r=Km.create({value:$(()=>n())});var i=U(),a=L(i),o=e=>{vm(e,La(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return n()},set value(e){n(e)}}))};K(a,e=>{r.shouldRender&&e(o)}),W(e,i),M()}function Qm(e,t){j(t,!0);let n=X(t,`tooltip`,3,!1);Sm.create({id:$(()=>t.id),virtualEl:$(()=>t.virtualEl),ref:Br(()=>t.ref)},Br(()=>n()));var r=U();q(L(r),()=>t.children??w),W(e,r),M()}var $m=[`top`,`right`,`bottom`,`left`],eh=Math.min,th=Math.max,nh=Math.round,rh=Math.floor,ih=e=>({x:e,y:e}),ah={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function oh(e,t,n){return th(e,eh(t,n))}function sh(e,t){return typeof e==`function`?e(t):e}function ch(e){return e.split(`-`)[0]}function lh(e){return e.split(`-`)[1]}function uh(e){return e===`x`?`y`:`x`}function dh(e){return e===`y`?`height`:`width`}function fh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ph(e){return uh(fh(e))}function mh(e,t,n){n===void 0&&(n=!1);let r=lh(e),i=ph(e),a=dh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ch(o)),[o,Ch(o)]}function hh(e){let t=Ch(e);return[gh(e),t,gh(t)]}function gh(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var _h=[`left`,`right`],vh=[`right`,`left`],yh=[`top`,`bottom`],bh=[`bottom`,`top`];function xh(e,t,n){switch(e){case`top`:case`bottom`:return n?t?vh:_h:t?_h:vh;case`left`:case`right`:return t?yh:bh;default:return[]}}function Sh(e,t,n,r){let i=lh(e),a=xh(ch(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(gh)))),a}function Ch(e){let t=ch(e);return ah[t]+e.slice(t.length)}function wh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Th(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:wh(e)}function Eh(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 Dh(e,t,n){let{reference:r,floating:i}=e,a=fh(t),o=ph(t),s=dh(o),c=ch(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=lh(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Oh(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}=sh(t,e),p=Th(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Eh(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=Eh(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 kh=50,Ah=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Oh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Dh(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<kh&&(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}=Dh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},jh=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}=sh(e,t)||{};if(l==null)return{};let d=Th(u),f={x:n,y:r},p=ph(i),m=dh(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=eh(d[_],ee),te=eh(d[v],ee),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=oh(T,re,ne),ae=!c.arrow&&lh(i)!=null&&re!==ie&&a.reference[m]/2-(re<T?T:te)-h[m]/2<0,E=ae?re<T?re-T:re-ne:0;return{[p]:f[p]+E,data:{[p]:ie,centerOffset:re-ie-E,...ae&&{alignmentOffset:E}},reset:ae}}}),Mh=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}=sh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ch(r),_=fh(o),v=ch(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ch(o)]:hh(o)),x=p!==`none`;!d&&x&&b.push(...Sh(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=mh(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`||_===fh(t)||ee.every(e=>fh(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=fh(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 Nh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ph(e){return $m.some(t=>e[t]>=0)}var Fh=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=sh(e,t);switch(i){case`referenceHidden`:{let e=Nh(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ph(e)}}}case`escaped`:{let e=Nh(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ph(e)}}}default:return{}}}}},Ih=new Set([`left`,`top`]);async function Lh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ch(n),s=lh(n),c=fh(n)===`y`,l=Ih.has(o)?-1:1,u=a&&c?-1:1,d=sh(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 Rh=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 Lh(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}}}}},zh=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}=sh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=fh(i),p=uh(f),m=u[p],h=u[f],g=(e,t)=>oh(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}}}}}},Bh=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}=sh(e,t),u={x:n,y:r},d=fh(i),f=uh(d),p=u[f],m=u[d],h=sh(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=Ih.has(ch(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}}}},Vh=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}=sh(e,t),c=await i.detectOverflow(t,s),l=ch(n),u=lh(n),d=fh(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=eh(p-c[m],g),y=eh(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*th(c.left,c.right):S=p-2*th(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 Hh(){return typeof window<`u`}function Uh(e){return Kh(e)?(e.nodeName||``).toLowerCase():`#document`}function Wh(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gh(e){return((Kh(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Kh(e){return Hh()?e instanceof Node||e instanceof Wh(e).Node:!1}function qh(e){return Hh()?e instanceof Element||e instanceof Wh(e).Element:!1}function Jh(e){return Hh()?e instanceof HTMLElement||e instanceof Wh(e).HTMLElement:!1}function Yh(e){return!Hh()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Wh(e).ShadowRoot}function Xh(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=sg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Zh(e){return/^(table|td|th)$/.test(Uh(e))}function Qh(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var $h=/transform|translate|scale|rotate|perspective|filter/,eg=/paint|layout|strict|content/,tg=e=>!!e&&e!==`none`,ng;function rg(e){let t=qh(e)?sg(e):e;return tg(t.transform)||tg(t.translate)||tg(t.scale)||tg(t.rotate)||tg(t.perspective)||!ag()&&(tg(t.backdropFilter)||tg(t.filter))||$h.test(t.willChange||``)||eg.test(t.contain||``)}function ig(e){let t=lg(e);for(;Jh(t)&&!og(t);){if(rg(t))return t;if(Qh(t))return null;t=lg(t)}return null}function ag(){return ng??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ng}function og(e){return/^(html|body|#document)$/.test(Uh(e))}function sg(e){return Wh(e).getComputedStyle(e)}function cg(e){return qh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lg(e){if(Uh(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Yh(e)&&e.host||Gh(e);return Yh(t)?t.host:t}function ug(e){let t=lg(e);return og(t)?(e.ownerDocument||e).body:Jh(t)&&Xh(t)?t:ug(t)}function dg(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ug(e),i=r===e.ownerDocument?.body,a=Wh(r);if(i){let e=fg(a);return t.concat(a,a.visualViewport||[],Xh(r)?r:[],e&&n?dg(e):[])}return t.concat(r,dg(r,[],n))}function fg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pg(e){let t=sg(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Jh(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=nh(n)!==a||nh(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function mg(e){return qh(e)?e:e.contextElement}function hg(e){let t=mg(e);if(!Jh(t))return ih(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=pg(t),o=(a?nh(n.width):n.width)/r,s=(a?nh(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var gg=ih(0);function _g(e){let t=Wh(e);return!ag()||!t.visualViewport?gg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vg(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Wh(e)}function yg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=mg(e),o=ih(1);t&&(r?qh(r)&&(o=hg(r)):o=hg(e));let s=vg(a,n,r)?_g(a):ih(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=Wh(a),t=qh(r)?Wh(r):r,n=e,i=fg(n);for(;i&&t!==n;){let e=hg(i),t=i.getBoundingClientRect(),r=sg(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=Wh(i),i=fg(n)}}return Eh({width:u,height:d,x:c,y:l})}function bg(e,t){let n=cg(e).scrollLeft;return t?t.left+n:yg(Gh(e)).left+n}function xg(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-bg(e,n),y:n.top+t.scrollTop}}function Sg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Gh(r),s=t?Qh(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ih(1),u=ih(0),d=Jh(r);if((d||!a)&&((Uh(r)!==`body`||Xh(o))&&(c=cg(r)),d)){let e=yg(r);l=hg(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?xg(o,c):ih(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 Cg(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function wg(e){let t=cg(e),n=e.ownerDocument.body,r=th(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=th(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+bg(e),o=-t.scrollTop;return sg(n).direction===`rtl`&&(a+=th(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Tg=25;function Eg(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Wh(e),a=Gh(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ag()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(bg(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<=Tg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Dg(e,t){let n=yg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=hg(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Og(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Eg(e,n,t);else if(t===`document`)r=wg(Gh(e));else if(qh(t))r=Dg(t,n);else{let n=_g(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Eh(r)}function kg(e,t){let n=t.get(e);if(n)return n;let r=dg(e,[],!1).filter(e=>qh(e)&&Uh(e)!==`body`),i=null,a=sg(e).position===`fixed`,o=a?lg(e):e;for(;qh(o)&&!og(o);){let e=sg(o),t=rg(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=lg(o)}return t.set(e,r),r}function Ag(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Qh(t)?[]:kg(t,this._c):[].concat(n),r],o=Og(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=Og(t,a[e],i);s=th(n.top,s),c=eh(n.right,c),l=eh(n.bottom,l),u=th(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function jg(e){let{width:t,height:n}=pg(e);return{width:t,height:n}}function Mg(e,t,n){let r=Jh(t),i=Gh(t),a=n===`fixed`,o=yg(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ih(0);if((r||!a)&&((Uh(t)!==`body`||Xh(i))&&(s=cg(t)),r)){let e=yg(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=bg(i));let l=i&&!r&&!a?xg(i,s):ih(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 Ng(e){return sg(e).position===`static`}function Pg(e,t){if(!Jh(e)||sg(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Gh(e)===n&&(n=n.ownerDocument.body),n}function Fg(e,t){let n=Wh(e);if(Qh(e))return n;if(!Jh(e)){let t=lg(e);for(;t&&!og(t);){if(qh(t)&&!Ng(t))return t;t=lg(t)}return n}let r=Pg(e,t);for(;r&&Zh(r)&&Ng(r);)r=Pg(r,t);return r&&og(r)&&Ng(r)&&!rg(r)?n:r||ig(e)||n}var Ig=async function(e){let t=this.getOffsetParent||Fg,n=this.getDimensions,r=await n(e.floating);return{reference:Mg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lg(e){return sg(e).direction===`rtl`}var Rg={convertOffsetParentRelativeRectToViewportRelativeRect:Sg,getDocumentElement:Gh,getClippingRect:Ag,getOffsetParent:Fg,getElementRects:Ig,getClientRects:Cg,getDimensions:jg,getScale:hg,isElement:qh,isRTL:Lg};function zg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bg(e,t,n){let r=null,i,a=Gh(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=rh(d),h=rh(a.clientWidth-(u+f)),g=rh(a.clientHeight-(d+p)),_=rh(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:th(0,eh(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!zg(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=Wh(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Vg(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=mg(e),u=i||a?[...l?dg(l):[],...t?dg(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Bg(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?yg(e):null;c&&g();function g(){let t=yg(e);h&&!zg(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 Hg=Rh,Ug=zh,Wg=Mh,Gg=Vh,Kg=Fh,qg=jh,Jg=Bh,Yg=(e,t,n)=>{let r=new Map,i=n??{},a={...Rg,...i.platform,_c:r};return Ah(e,t,{...i,platform:a})};function Xg(e){let t=e.whileElementsMounted,n=N(()=>wm(e.open)??!0),r=N(()=>wm(e.middleware)),i=N(()=>wm(e.transform)??!0),a=N(()=>wm(e.placement)??`bottom`),o=N(()=>wm(e.strategy)??`absolute`),s=N(()=>wm(e.sideOffset)??0),c=N(()=>wm(e.alignOffset)??0),l=e.reference,u;Gn(()=>{u={middleware:B(r),placement:B(a),strategy:B(o),open:B(n),sideOffset:B(s),alignOffset:B(c)}});let d=P(0),f=P(0),p=Su(null),m=P(bn(B(o))),h=P(bn(B(a))),g=P(bn({})),_=P(!1),v=!1,y=0,b=!1,x=N(()=>{let e=p.current?Em(p.current,B(d)):B(d),t=p.current?Em(p.current,B(f)):B(f);return B(i)?{position:B(m),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...p.current&&Tm(p.current)>=1.5&&{willChange:`transform`}}:{position:B(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;Yg(e,t,{middleware:u.middleware,placement:u.placement,strategy:u.strategy}).then(r=>{if(n===y&&l.current===e&&p.current===t){if(Zg(e))F(g,{...B(g),hide:{...B(g).hide,referenceHidden:!0}},!0);else{if(!u.open&&B(d)!==0&&B(f)!==0){let e=Math.max(Math.abs(u.sideOffset),Math.abs(u.alignOffset),15);if(r.x<=e&&r.y<=e)return}F(d,r.x,!0),F(f,r.y,!0),F(m,r.strategy,!0),F(h,r.placement,!0),F(g,r.middlewareData,!0),F(_,!0)}}})}function w(){typeof S==`function`&&(S(),S=void 0),y++}function ee(){w(),t===void 0?(T(),C()):B(n)&&l.current!==null&&p.current!==null&&(T(),S=t(l.current,p.current,C))}function T(){return[B(r),B(a),B(o)]}function te(){!B(n)&&p.current===null&&F(_,!1)}function ne(){return[B(r),B(a),B(o),B(s),B(c),B(n)]}return Un(()=>{t===void 0&&B(n)&&(T(),C())}),Un(ee),Un(()=>{t!==void 0&&(ne(),B(n)&&B(_)?v?C():v=!0:v=!1)}),Un(te),Un(()=>()=>{b=!0,w()}),{floating:p,reference:l,get strategy(){return B(m)},get placement(){return B(h)},get middlewareData(){return B(g)},get isPositioned(){return B(_)},get floatingStyles(){return B(x)},get update(){return C}}}function Zg(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var Qg={top:`bottom`,right:`left`,bottom:`top`,left:`right`},$g=new yd(`Floating.Content`),e_=class e{static create(t,n=!1){return n?$g.set(new e(t,bm.get())):$g.set(new e(t,ym.get()))}opts;root;contentRef=Su(null);wrapperRef=Su(null);arrowRef=Su(null);contentAttachment=Ud(this.contentRef);wrapperAttachment=Ud(this.wrapperRef);arrowAttachment=Ud(this.arrowRef);arrowId=Su(Gp());#e=N(()=>{if(typeof this.opts.style==`string`)return rd(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new Td(()=>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(bf));#s=N(()=>B(this.#o).length>0);get hasExplicitBoundaries(){return B(this.#s)}set hasExplicitBoundaries(e){F(this.#s,e)}#c=N(()=>({padding:this.opts.collisionPadding.current,boundary:B(this.#o),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return B(this.#c)}set detectOverflowOptions(e){F(this.#c,e)}#l=P(void 0);#u=P(void 0);#d=P(void 0);#f=P(void 0);#p=N(()=>[Hg({mainAxis:this.opts.sideOffset.current+B(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Ug({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?Jg():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Wg({...this.detectOverflowOptions}),Gg({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;F(this.#l,t,!0),F(this.#u,n,!0),F(this.#d,r,!0),F(this.#f,i,!0)}}),this.arrowRef.current&&qg({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),t_({arrowWidth:B(this.#r),arrowHeight:B(this.#i)}),this.opts.hideWhenDetached.current&&Kg({strategy:`referenceHidden`,...this.detectOverflowOptions}),this.opts.hideWhenDetached.current&&!this.hasExplicitBoundaries&&{...Kg({strategy:`referenceHidden`,boundary:`clippingAncestors`}),name:`hideClipping`}].filter(Boolean));get middleware(){return B(this.#p)}set middleware(e){F(this.#p,e)}floating;#m=N(()=>r_(this.floating.placement));get placedSide(){return B(this.#m)}set placedSide(e){F(this.#m,e)}#h=N(()=>i_(this.floating.placement));get placedAlign(){return B(this.#h)}set placedAlign(e){F(this.#h,e)}#g=N(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return B(this.#g)}set arrowX(e){F(this.#g,e)}#_=N(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return B(this.#_)}set arrowY(e){F(this.#_,e)}#v=N(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return B(this.#v)}set cannotCenterArrow(e){F(this.#v,e)}#y=P(`auto`);get contentZIndex(){return B(this.#y)}set contentZIndex(e){F(this.#y,e,!0)}#b=N(()=>Qg[this.placedSide]);get arrowBaseSide(){return B(this.#b)}set arrowBaseSide(e){F(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":`${B(this.#l)}px`,"--bits-floating-available-height":`${B(this.#u)}px`,"--bits-floating-anchor-width":`${B(this.#d)}px`,"--bits-floating-anchor-height":`${B(this.#f)}px`,...(this.floating.middlewareData.hide?.referenceHidden||this.floating.middlewareData.hideClipping?.referenceHidden)&&{visibility:`hidden`,"pointer-events":`none`},...B(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return B(this.#x)}set wrapperProps(e){F(this.#x,e)}#S=N(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:ud({...B(this.#e)}),...this.contentAttachment}));get props(){return B(this.#S)}set props(e){F(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 B(this.#C)}set arrowStyle(e){F(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),Sd(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=Xg({strategy:()=>this.opts.strategy.current,placement:()=>B(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>Vg(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Un(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Sd([()=>this.contentRef.current,()=>this.opts.enabled.current],([e,t])=>{if(!e||!t)return;let n=Bd(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)}}),Un(()=>{this.floating.floating.current=this.wrapperRef.current})}};function t_(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]=n_(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 n_(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function r_(e){return n_(e)[0]}function i_(e){return n_(e)[1]}function a_(e,t){j(t,!0);let n=X(t,`side`,3,`bottom`),r=X(t,`sideOffset`,3,0),i=X(t,`align`,3,`center`),a=X(t,`alignOffset`,3,0),o=X(t,`arrowPadding`,3,0),s=X(t,`avoidCollisions`,3,!0),c=X(t,`collisionBoundary`,19,()=>[]),l=X(t,`collisionPadding`,3,0),u=X(t,`hideWhenDetached`,3,!1),d=X(t,`onPlaced`,3,()=>{}),f=X(t,`sticky`,3,`partial`),p=X(t,`updatePositionStrategy`,3,`optimized`),m=X(t,`strategy`,3,`fixed`),h=X(t,`dir`,3,`ltr`),g=X(t,`style`,19,()=>({})),_=X(t,`wrapperId`,19,Gp),v=X(t,`customAnchor`,3,null),y=X(t,`tooltip`,3,!1),b=e_.create({side:$(()=>n()),sideOffset:$(()=>r()),align:$(()=>i()),alignOffset:$(()=>a()),id:$(()=>t.id),arrowPadding:$(()=>o()),avoidCollisions:$(()=>s()),collisionBoundary:$(()=>c()),collisionPadding:$(()=>l()),hideWhenDetached:$(()=>u()),onPlaced:$(()=>d()),sticky:$(()=>f()),updatePositionStrategy:$(()=>p()),strategy:$(()=>m()),dir:$(()=>h()),style:$(()=>g()),enabled:$(()=>t.enabled),wrapperId:$(()=>_()),customAnchor:$(()=>v())},Br(()=>y())),x=N(()=>pd(b.wrapperProps,{style:{pointerEvents:`auto`}}));var S=U();q(L(S),()=>t.content??w,()=>({props:b.props,wrapperProps:B(x)})),W(e,S),M()}function o_(e,t){j(t,!0),Ra(()=>{t.onPlaced?.()});var n=U();q(L(n),()=>t.content??w,()=>({props:{},wrapperProps:{}})),W(e,n),M()}var s_=$d({component:`separator`,parts:[`root`]}),c_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Ud(e.ref)}#e=N(()=>({id:this.opts.id.current,role:this.opts.decorative.current?`none`:`separator`,"aria-orientation":this.opts.orientation.current,"aria-hidden":Gd(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[s_.root]:``,...this.attachment}));get props(){return B(this.#e)}set props(e){F(this.#e,e)}},l_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`decorative`,`orientation`]),u_=V(`<div><!></div>`);function d_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`decorative`,3,!1),o=X(t,`orientation`,3,`horizontal`),s=Y(t,l_),c=c_.create({ref:$(()=>i(),e=>i(e)),id:$(()=>r()),decorative:$(()=>a()),orientation:$(()=>o())}),l=N(()=>pd(s,c.props));var u=U(),d=L(u),f=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(l)})),W(e,n)},p=e=>{var n=u_();ya(n,()=>({...B(l)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(d,e=>{t.child?e(f):e(p,-1)}),W(e,u),M()}var f_=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function p_(e,t){let n=X(t,`isStatic`,3,!1),r=Y(t,f_);var i=U(),a=L(i),o=e=>{o_(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{a_(e,La({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};K(a,e=>{n()?e(o):e(s,-1)}),W(e,i)}var m_=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(`.`)),h_=V(`<!> <!>`,1);function g_(e,t){j(t,!0);let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=X(t,`tooltip`,3,!1),c=X(t,`contentPointerEvents`,3,`auto`),l=Y(t,m_),u=N(()=>t.preventScroll??!0),d=N(()=>t.strategy??(B(u)?`fixed`:`absolute`));p_(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 B(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=h_(),f=L(d),p=e=>{lm(e,{get preventScroll(){return B(u)}})},m=e=>{lm(e,{get preventScroll(){return B(u)}})};K(f,e=>{t.forceMount&&t.enabled?e(p):t.forceMount||e(m,1)}),Lp(R(f,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;tp(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Qf(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;Wp(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=U(),u=L(i);{let e=N(()=>({props:pd(l,o(),r(),a(),{id:t.id,style:{pointerEvents:c()}}),wrapperProps:s()}));q(u,()=>t.popper??w,()=>B(e))}W(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),W(e,d)},$$slots:{content:!0}}),M()}var __=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 v_(e,t){let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=Y(t,__);var c=U(),l=L(c),u=e=>{g_(e,La({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))};K(l,e=>{t.shouldRender&&e(u)}),W(e,c)}var y_=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 b_(e,t){let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=Y(t,y_);g_(e,La({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 x_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),S_=V(`<div><div><!></div></div>`);function C_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`forceMount`,3,!1),o=X(t,`side`,3,`bottom`),s=X(t,`onInteractOutside`,3,Tf),c=X(t,`onEscapeKeydown`,3,Tf),l=X(t,`preventScroll`,3,!1),u=Y(t,x_),d=Wm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),onInteractOutside:$(()=>s()),onEscapeKeydown:$(()=>c())}),f=N(()=>pd(u,d.props));var p=U(),m=L(p),h=e=>{b_(e,La(()=>B(f),()=>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(()=>pd(r(),{style:d.props.style},{style:t.style}));var o=U(),s=L(o),c=e=>{var n=U(),r=L(n);{let e=N(()=>({props:B(a),wrapperProps:i(),...d.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},l=e=>{var n=S_();ya(n,()=>({...i()}));var r=I(n);ya(r,()=>({...B(a)})),q(I(r),()=>t.children??w),k(r),k(n),W(e,n)};K(s,e=>{t.child?e(c):e(l,-1)}),W(e,o)},$$slots:{popper:!0}}))},g=e=>{v_(e,La(()=>B(f),()=>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(()=>pd(r(),{style:d.props.style},{style:t.style}));var o=U(),s=L(o),c=e=>{var n=U(),r=L(n);{let e=N(()=>({props:B(a),wrapperProps:i(),...d.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},l=e=>{var n=S_();ya(n,()=>({...i()}));var r=I(n);ya(r,()=>({...B(a)})),q(I(r),()=>t.children??w),k(r),k(n),W(e,n)};K(s,e=>{t.child?e(c):e(l,-1)}),W(e,o)},$$slots:{popper:!0}}))};K(m,e=>{a()?e(h):a()||e(g,1)}),W(e,p),M()}function w_(e,t){j(t,!0);let n=X(t,`mounted`,15,!1),r=X(t,`onMountedChange`,3,Tf);Od(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),M()}var T_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),E_=V(`<div><!></div>`),D_=V(`<!> <!>`,1);function O_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`label`,19,()=>t.value),o=X(t,`disabled`,3,!1),s=X(t,`onHighlight`,3,Tf),c=X(t,`onUnhighlight`,3,Tf),l=Y(t,T_),u=Gm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),value:$(()=>t.value),disabled:$(()=>o()),label:$(()=>a()),onHighlight:$(()=>s()),onUnhighlight:$(()=>c())}),d=N(()=>pd(l,u.props));var f=D_(),p=L(f),m=e=>{var n=U(),r=L(n);{let e=N(()=>({props:B(d),...u.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},h=e=>{var n=E_();ya(n,()=>({...B(d)})),q(I(n),()=>t.children??w,()=>u.snippetProps),k(n),W(e,n)};K(p,e=>{t.child?e(m):e(h,-1)}),w_(R(p,2),{get mounted(){return u.mounted},set mounted(e){u.mounted=e}}),W(e,f),M()}var k_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),A_=V(`<div><!></div>`);function j_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=Y(t,k_),o=qm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=N(()=>pd(a,o.props));var c=U(),l=L(c),u=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=A_();ya(n,()=>({...B(s)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),M()}var M_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),N_=V(`<div><!></div>`),P_=V(`<!> <!>`,1);function F_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`delay`,3,()=>50),o=Y(t,M_),s=Ym.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=N(()=>pd(o,s.props));var l=U(),u=L(l),d=e=>{var n=P_(),r=L(n);w_(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=R(r,2),a=e=>{var n=U();q(L(n),()=>t.child,()=>({props:o})),W(e,n)},l=e=>{var n=N_();ya(n,()=>({...B(c)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(i,e=>{t.child?e(a):e(l,-1)}),W(e,n)};K(u,e=>{s.canScrollDown&&e(d)}),W(e,l),M()}var I_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),L_=V(`<div><!></div>`),R_=V(`<!> <!>`,1);function z_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`delay`,3,()=>50),o=Y(t,I_),s=Xm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=N(()=>pd(o,s.props));var l=U(),u=L(l),d=e=>{var n=R_(),r=L(n);w_(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=R(r,2),a=e=>{var n=U();q(L(n),()=>t.child,()=>({props:o})),W(e,n)},l=e=>{var n=L_();ya(n,()=>({...B(c)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(i,e=>{t.child?e(a):e(l,-1)}),W(e,n)};K(u,e=>{s.canScrollUp&&e(d)}),W(e,l),M()}var B_=$d({component:`label`,parts:[`root`]}),V_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Ud(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=N(()=>({id:this.opts.id.current,[B_.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return B(this.#e)}set props(e){F(this.#e,e)}},H_=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),U_=V(`<label><!></label>`);function W_(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=Y(t,H_),o=V_.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=N(()=>pd(a,o.props,{for:t.for}));var c=U(),l=L(c),u=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=U_();ya(n,()=>({...B(s),for:t.for})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),M()}var G_=$d({component:`progress`,parts:[`root`]}),K_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Ud(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":q_(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,[G_.root]:``,...this.attachment}));get props(){return B(this.#e)}set props(e){F(this.#e,e)}};function q_(e,t){return e===null?`indeterminate`:e===t?`loaded`:`loading`}var J_=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`value`,`max`,`min`,`id`,`ref`]),Y_=V(`<div><!></div>`);function X_(e,t){let n=gi();j(t,!0);let r=X(t,`value`,3,0),i=X(t,`max`,3,100),a=X(t,`min`,3,0),o=X(t,`id`,19,()=>Ef(n)),s=X(t,`ref`,15,null),c=Y(t,J_),l=K_.create({value:$(()=>r()),max:$(()=>i()),min:$(()=>a()),id:$(()=>o()),ref:$(()=>s(),e=>s(e))}),u=N(()=>pd(c,l.props));var d=U(),f=L(d),p=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(u)})),W(e,n)},m=e=>{var n=Y_();ya(n,()=>({...B(u)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(f,e=>{t.child?e(p):e(m,-1)}),W(e,d),M()}var Z_=V(`<!> <!>`,1);function Q_(e,t){j(t,!0);let n=X(t,`value`,15),r=X(t,`onValueChange`,3,Tf),i=X(t,`name`,3,``),a=X(t,`disabled`,3,!1),o=X(t,`open`,15,!1),s=X(t,`onOpenChange`,3,Tf),c=X(t,`onOpenChangeComplete`,3,Tf),l=X(t,`loop`,3,!1),u=X(t,`scrollAlignment`,3,`nearest`),d=X(t,`required`,3,!1),f=X(t,`items`,19,()=>[]),p=X(t,`allowDeselect`,3,!1);function m(){n()===void 0&&n(t.type===`single`?``:[])}m(),Sd.pre(()=>n(),()=>{m()});let h=P(``),g=Vm.create({type:Br(()=>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:$(()=>f()),allowDeselect:$(()=>p()),inputValue:$(()=>B(h),e=>F(h,e,!0)),onOpenChangeComplete:$(()=>c())});var _=Z_(),v=L(_);Cm(v,{children:(e,n)=>{var r=U();q(L(r),()=>t.children??w),W(e,r)},$$slots:{default:!0}});var y=R(v,2),b=e=>{var n=U(),r=L(n),i=e=>{Zm(e,{get autocomplete(){return t.autocomplete}})},a=e=>{var n=U();Ni(L(n),16,()=>g.opts.value.current,e=>e,(e,n)=>{Zm(e,{get value(){return n},get autocomplete(){return t.autocomplete}})}),W(e,n)};K(r,e=>{g.opts.value.current.length===0?e(i):e(a,-1)}),W(e,n)},x=N(()=>Array.isArray(g.opts.value.current)),S=e=>{Zm(e,{get autocomplete(){return t.autocomplete},get value(){return g.opts.value.current},set value(e){g.opts.value.current=e}})};K(y,e=>{B(x)?e(b):e(S,-1)}),W(e,_),M()}var $_=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`id`,`placeholder`,`child`,`children`]),ev=V(`<span><!></span>`);function tv(e,t){let n=gi();j(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>Ef(n)),a=Y(t,$_),o=Hm.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e)),placeholder:$(()=>t.placeholder)}),s=N(()=>pd(a,o.props));var c=U(),l=L(c),u=e=>{var n=U(),r=L(n);{let e=N(()=>({props:B(s),...o.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},d=e=>{var n=ev();ya(n,()=>({...B(s)}));var r=I(n),i=e=>{var n=U();q(L(n),()=>t.children??w,()=>o.snippetProps),W(e,n)},a=e=>{var n=H();z(()=>G(n,o.snippetProps.selection.selected?.label??t.placeholder)),W(e,n)},c=e=>{var n=H();z(e=>G(n,e),[()=>o.snippetProps.selection.selected.length>0?o.snippetProps.selection.selected.map(e=>e.label).join(`, `):t.placeholder]),W(e,n)},l=e=>{var n=H();z(()=>G(n,t.placeholder)),W(e,n)};K(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),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),M()}var nv=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`type`]),rv=V(`<button><!></button>`);function iv(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`type`,3,`button`),o=Y(t,nv),s=Um.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=N(()=>pd(o,s.props,{type:a()}));var l=U();J(L(l),()=>Qm,(e,n)=>{n(e,{get id(){return r()},get ref(){return s.opts.ref},children:(e,n)=>{var r=U(),i=L(r),a=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(c)})),W(e,n)},o=e=>{var n=rv();ya(n,()=>({...B(c)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(i,e=>{t.child?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,l),M()}var av=$d({component:`switch`,parts:[`root`,`thumb`]}),ov=new yd(`Switch.Root`),sv=class e{static create(t){return ov.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=Ud(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":Kd(this.opts.disabled.current),"data-state":Yd(this.opts.checked.current),"data-required":Kd(this.opts.required.current)}));get sharedProps(){return B(this.#t)}set sharedProps(e){F(this.#t,e)}#n=N(()=>({checked:this.opts.checked.current}));get snippetProps(){return B(this.#n)}set snippetProps(e){F(this.#n,e)}#r=N(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:qd(this.opts.disabled.current),"aria-checked":Zd(this.opts.checked.current,!1),"aria-required":Wd(this.opts.required.current),[av.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return B(this.#r)}set props(e){F(this.#r,e)}},cv=class e{static create(){return new e(ov.get())}root;#e=N(()=>this.root.opts.name.current!==void 0);get shouldRender(){return B(this.#e)}set shouldRender(e){F(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 B(this.#t)}set props(e){F(this.#t,e)}},lv=class e{static create(t){return new e(t,ov.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ud(e.ref)}#e=N(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return B(this.#e)}set snippetProps(e){F(this.#e,e)}#t=N(()=>({...this.root.sharedProps,id:this.opts.id.current,[av.thumb]:``,...this.attachment}));get props(){return B(this.#t)}set props(e){F(this.#t,e)}};function uv(e,t){j(t,!1);let n=cv.create();ka();var r=U(),i=L(r),a=e=>{vm(e,La(()=>n.props))};K(i,e=>{n.shouldRender&&e(a)}),W(e,r),M()}var dv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),fv=V(`<button><!></button>`),pv=V(`<!> <!>`,1);function mv(e,t){let n=gi();j(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>Ef(n)),a=X(t,`disabled`,3,!1),o=X(t,`required`,3,!1),s=X(t,`checked`,15,!1),c=X(t,`value`,3,`on`),l=X(t,`name`,3,void 0),u=X(t,`type`,3,`button`),d=X(t,`onCheckedChange`,3,Tf),f=Y(t,dv),p=sv.create({checked:$(()=>s(),e=>{s(e),d()?.(e)}),disabled:$(()=>a()??!1),required:$(()=>o()),value:$(()=>c()),name:$(()=>l()),id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),m=N(()=>pd(f,p.props,{type:u()}));var h=pv(),g=L(h),_=e=>{var n=U(),r=L(n);{let e=N(()=>({props:B(m),...p.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},v=e=>{var n=fv();ya(n,()=>({...B(m)})),q(I(n),()=>t.children??w,()=>p.snippetProps),k(n),W(e,n)};K(g,e=>{t.child?e(_):e(v,-1)}),uv(R(g,2),{}),W(e,h),M()}var hv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),gv=V(`<span><!></span>`);function _v(e,t){let n=gi();j(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>Ef(n)),a=Y(t,hv),o=lv.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),s=N(()=>pd(a,o.props));var c=U(),l=L(c),u=e=>{var n=U(),r=L(n);{let e=N(()=>({props:B(s),...o.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},d=e=>{var n=gv();ya(n,()=>({...B(s)})),q(I(n),()=>t.children??w,()=>o.snippetProps),k(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),M()}var vv=$d({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),yv=new yd(`Tabs.Root`),bv=class e{static create(t){return yv.set(new e(t))}opts;attachment;rovingFocusGroup;#e=P(bn([]));get triggerIds(){return B(this.#e)}set triggerIds(e){F(this.#e,e,!0)}valueToTriggerId=new _d;valueToContentId=new _d;constructor(e){this.opts=e,this.attachment=Ud(e.ref),this.rovingFocusGroup=new Sf({candidateAttr:vv.trigger,rootAttr:vv.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,[vv.root]:``,...this.attachment}));get props(){return B(this.#t)}set props(e){F(this.#t,e)}},xv=class e{static create(t){return new e(t,yv.get())}opts;root;attachment;#e=N(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Ud(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,[vv.list]:``,"data-disabled":Kd(B(this.#e)),...this.attachment}));get props(){return B(this.#t)}set props(e){F(this.#t,e)}},Sv=class e{static create(t){return new e(t,yv.get())}opts;root;attachment;#e=P(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=Ud(e.ref),Sd([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),Un(()=>{this.root.triggerIds.length,B(this.#t)||!this.root.opts.value.current?F(this.#e,0):F(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`||B(this.#n)||this.#i()}onclick(e){B(this.#n)||this.#i()}onkeydown(e){B(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":wv(B(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Kd(B(this.#n)),"aria-selected":Wd(B(this.#t)),"aria-controls":B(this.#r),[vv.trigger]:``,disabled:qd(B(this.#n)),tabindex:B(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return B(this.#a)}set props(e){F(this.#a,e)}},Cv=class e{static create(t){return new e(t,yv.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=Ud(e.ref),Sd([()=>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:qd(!B(this.#e)),tabindex:this.opts.tabindex.current,"data-value":this.opts.value.current,"data-state":wv(B(this.#e)),"aria-labelledby":B(this.#t),"data-orientation":this.root.opts.orientation.current,[vv.content]:``,...this.attachment}));get props(){return B(this.#n)}set props(e){F(this.#n,e)}};function wv(e){return e?`active`:`inactive`}var Tv=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),Ev=V(`<div><!></div>`);function Dv(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`value`,15,``),o=X(t,`onValueChange`,3,Tf),s=X(t,`orientation`,3,`horizontal`),c=X(t,`loop`,3,!0),l=X(t,`activationMode`,3,`automatic`),u=X(t,`disabled`,3,!1),d=Y(t,Tv),f=bv.create({id:$(()=>r()),value:$(()=>a(),e=>{a(e),o()(e)}),orientation:$(()=>s()),loop:$(()=>c()),activationMode:$(()=>l()),disabled:$(()=>u()),ref:$(()=>i(),e=>i(e))}),p=N(()=>pd(d,f.props));var m=U(),h=L(m),g=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(p)})),W(e,n)},_=e=>{var n=Ev();ya(n,()=>({...B(p)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(h,e=>{t.child?e(g):e(_,-1)}),W(e,m),M()}var Ov=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`,`tabindex`]),kv=V(`<div><!></div>`);function Av(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=X(t,`tabindex`,3,0),o=Y(t,Ov),s=Cv.create({value:$(()=>t.value),tabindex:$(()=>a()??0),id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=N(()=>pd(o,s.props));var l=U(),u=L(l),d=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(c)})),W(e,n)},f=e=>{var n=kv();ya(n,()=>({...B(c)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(u,e=>{t.child?e(d):e(f,-1)}),W(e,l),M()}var jv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),Mv=V(`<div><!></div>`);function Nv(e,t){let n=gi();j(t,!0);let r=X(t,`id`,19,()=>Ef(n)),i=X(t,`ref`,15,null),a=Y(t,jv),o=xv.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=N(()=>pd(a,o.props));var c=U(),l=L(c),u=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=Mv();ya(n,()=>({...B(s)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),M()}var Pv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),Fv=V(`<button><!></button>`);function Iv(e,t){let n=gi();j(t,!0);let r=X(t,`disabled`,3,!1),i=X(t,`id`,19,()=>Ef(n)),a=X(t,`type`,3,`button`),o=X(t,`ref`,15,null),s=Y(t,Pv),c=Sv.create({id:$(()=>i()),disabled:$(()=>r()??!1),value:$(()=>t.value),ref:$(()=>o(),e=>o(e))}),l=N(()=>pd(s,c.props,{type:a()}));var u=U(),d=L(u),f=e=>{var n=U();q(L(n),()=>t.child,()=>({props:B(l)})),W(e,n)},p=e=>{var n=Fv();ya(n,()=>({...B(l)})),q(I(n),()=>t.children??w),k(n),W(e,n)};K(d,e=>{t.child?e(f):e(p,-1)}),W(e,u),M()}var Lv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Rv(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Lv);var i=U(),a=L(i);{let e=N(()=>$l(`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));J(a,()=>W_,(t,i)=>{i(t,La({"data-slot":`label`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),M()}var zv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);function Bv(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`data-slot`,3,`separator`),i=Y(t,zv);var a=U(),o=L(a);{let e=N(()=>$l(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,t.class));J(o,()=>d_,(t,a)=>{a(t,La({get"data-slot"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,a),M()}var Vv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Hv(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Vv);var i=U(),a=L(i);{let e=N(()=>$l(`text-sm flex-1 outline-none`,t.class));J(a,()=>Av,(t,i)=>{i(t,La({"data-slot":`tabs-content`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),M()}var Uv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Wv(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Uv);var i=U(),a=L(i);{let e=N(()=>$l(`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));J(a,()=>Iv,(t,i)=>{i(t,La({"data-slot":`tabs-trigger`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),M()}var Gv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Kv(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`value`,15,``),i=Y(t,Gv);var a=U(),o=L(a);{let e=N(()=>$l(`gap-2 group/tabs flex data-horizontal:flex-col`,t.class));J(o,()=>Dv,(t,a)=>{a(t,La({"data-slot":`tabs`,get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))})}W(e,a),M()}var qv=al({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`}}),Jv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function Yv(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`variant`,3,`default`),i=Y(t,Jv);var a=U(),o=L(a);{let e=N(()=>$l(qv({variant:r()}),t.class));J(o,()=>Nv,(t,a)=>{a(t,La({"data-slot":`tabs-list`,get"data-variant"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,a),M()}var Xv=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Zv=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Xv(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Qv=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Xv(),n=Zv(),r=Xv();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Zv();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=re(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=re(this.rhs,e,n),this}get names(){return ne(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=re(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ie(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>te(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ae(t),n instanceof e?[n]:n.nodes);if(t!==!1&&this.nodes.length)return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=re(this.condition,e,t),this}get names(){let e=super.names;return ne(e,this.condition),this.else&&te(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=re(this.iteration,e,t),this}get names(){return te(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return ne(ne(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=re(this.iterable,e,t),this}get names(){return te(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&te(e,this.catch.names),this.finally&&te(e,this.finally.names),e}},ee=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ee.kind=`catch`;var T=class extends m{render(e){return`finally`+super.render(e)}};T.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
7
- `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new ee(e),t(e)}return n&&(this._currNode=r.finally=new T,this.code(n)),this._endBlockNode(ee,T)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function te(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function ne(e,n){return n instanceof t._CodeOrName?te(e,n.names):e}function re(e,n,r){return e instanceof t.Name?i(e):a(e)?new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[])):e;function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ie(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function ae(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${le(e)}`}e.not=ae;var E=D(e.operators.AND);function oe(...e){return e.reduce(E)}e.and=oe;var se=D(e.operators.OR);function ce(...e){return e.reduce(se)}e.or=ce;function D(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${le(n)} ${e} ${le(r)}`}function le(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),$v=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=Qv(),n=Xv();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0||(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),ey=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),ty=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=Qv(),n=$v(),r=ey();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),ny=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=ty(),n=Qv(),r=ey(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),ry=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),iy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),ay=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=ry(),n=iy(),r=ty(),i=Qv(),a=$v(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
8
- || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
9
- || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
10
- || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),oy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=Qv(),n=$v();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),sy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=Qv(),n=$v(),r=ey(),i=$v();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),cy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=Qv(),n=ey(),r=sy(),i=ty();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),ly=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=Qv(),n=$v();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),uy=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),dy=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),fy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=$v(),n=uy(),r=dy(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),py=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=ny(),n=ay(),r=iy(),i=ay(),a=oy(),o=cy(),s=ly(),c=Qv(),l=ey(),u=fy(),d=$v(),f=ty();function p(e){S(e)&&(w(e),x(e))?_(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ie(e),te(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),ee(e),ae(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){S(e)&&(w(e),x(e))?C(e,n):(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ie(e),ne(e),re(e);let a=r.const(`_errs`,l.default.errors);ee(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),T(e)}function ee(e,t){if(e.opts.jtd)return oe(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);oe(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function T(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function te(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function ne(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function re(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ie({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function ae(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&E(e),t.return((0,c._)`${l.default.errors} === 0`))}function E({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function oe(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ge(e,`$ref`,h.all.$ref.definition));return}p.jtd||ce(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),se(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):se(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function se(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ge(e,n.keyword,n.definition,t.type)})}function ce(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(D(e,t),e.opts.allowUnionTypes||le(e,t),ue(e,e.dataTypes))}function D(e,t){t.length&&(e.dataTypes.length?(t.forEach(t=>{fe(e.dataTypes,t)||me(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),pe(e,t)):e.dataTypes=t)}function le(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&me(e,`use allowUnionTypes to allow union type keyword`)}function ue(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>de(t,e))&&me(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function de(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function fe(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function pe(e,t){let n=[];for(let r of e.dataTypes)fe(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function me(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var he=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,ye(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){e===void 0?(this.error(),this.allErrors||this.gen.if(!1)):(this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else())}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){t?(this.setParams(t),this._error(e,n),this.setParams({})):this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=he;function ge(e,t,n,r){let i=new he(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var _e=/^\/(?:[^~]|~0|~1)*$/,ve=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!_e.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ve.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=ye})),my=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),hy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=fy();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),gy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=Qv(),n=my(),r=ey(),i=fy(),a=$v(),o=py(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),_y=c({$id:()=>vy,additionalProperties:()=>!1,default:()=>Cy,description:()=>yy,properties:()=>Sy,required:()=>xy,type:()=>by}),vy,yy,by,xy,Sy,Cy,wy=o((()=>{vy=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,yy=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,by=`object`,xy=[`$data`],Sy={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},Cy={$id:vy,description:yy,type:by,required:xy,properties:Sy,additionalProperties:!1}})),Ty=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^\d*$/u),a=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),l=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),u=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)u[t]=`%`+e[t>>4]+e[t&15]}function d(e){return e<2048?u[192|e>>6]+u[128|e&63]:e<65536?u[224|e>>12]+u[128|e>>6&63]+u[128|e&63]:u[240|e>>18]+u[128|e>>12&63]+u[128|e>>6&63]+u[128|e&63]}function f(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var p=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),h=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),g=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function _(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!h(e[t])){if(e[t]===`%`&&t+2<e.length&&a(e.slice(t+1,t+3)))t+=2;else return!1}return!0}function v(e){let t=-1,n=0,r=-1,i=0;for(let a=0;a<e.length;a++)e[a]===`0`?(r===-1&&(r=a),i++,i>n&&(n=i,t=r)):(r=-1,i=0);if(n<2)return e.join(`:`);let a=e.slice(0,t).join(`:`),o=e.slice(t+n).join(`:`);return a+`::`+o}function y(e){let t=e.indexOf(`::`);if(t!==-1&&e.indexOf(`::`,t+1)!==-1)return;let n=t===-1?e.split(`:`):e.slice(0,t).split(`:`),i=t===-1?[]:e.slice(t+2).split(`:`);t!==-1&&(n.length===1&&n[0]===``&&(n.length=0),i.length===1&&i[0]===``&&(i.length=0));let a=n.concat(i),o=0;for(let e=0;e<a.length;e++){let n=a[e];if(n===``)return;if(n.indexOf(`.`)!==-1){if(e!==a.length-1||t!==-1&&i.length===0||!r(n))return;o+=2}else{if(!p(n))return;a[e]=parseInt(n,16).toString(16),o++}}if(t===-1)return o===8?v(a):void 0;if(o>=8)return;let s=a.slice(0,n.length);for(let e=o;e<8;e++)s.push(`0`);for(let e=n.length;e<a.length;e++)s.push(a[e]);return v(s)}function b(e){let t=e[0]===`[`&&e[e.length-1]===`]`;if((e[0]===`[`||e[e.length-1]===`]`)&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&m(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(x(n,`:`)<2)return{host:e,isIPV6:!1,error:t};let r=``,i=n.indexOf(`%`);if(i!==-1){let t=n.slice(i,i+3).toLowerCase()===`%25`?3:1;if(r=n.slice(i+t),!_(r))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,i)}let a=y(n);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(r?`%`+r:``),escapedHost:a+(r?`%25`+r:``),isIPV6:!0}}function x(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function S(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}n.push(t);break}if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function C(e){if(e===``||e[0]===`/`)return S(e);let t=e.split(`/`),n=t.length-1,r=[],i=!1;for(let e=0;e<=n;e++){let a=t[e];a===`.`||a===`..`?(a===`..`&&(r.length!==0&&r[r.length-1]!==`..`?r.pop():r.push(`..`)),i=e===n):r.push(a)}return i&&r[r.length-1]!==`..`&&r.push(``),(r.length===0||r[0]===``||r[0].includes(`:`))&&r.unshift(`.`),r.join(`/`)}var w={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},ee=/[@/?#:]/g,T=/[@/?#]/g;function te(e,t){let n=t?T:ee;return n.lastIndex=0,e.replace(n,e=>w[e])}function ne(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let i=e.slice(r+1,r+3);if(a(i)){let e=i.toUpperCase(),a=String.fromCharCode(parseInt(e,16));t&&o(a)?n+=a:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function re(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ce(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function ie(e,t=!1){let n=``,r=t&&e[0]!==`/`;for(let t=0;t<e.length;t++){let i=e[t];if(i===`%`&&t+2<e.length){let r=e.slice(t+1,t+3);if(a(r)){n+=`%`+r.toUpperCase(),t+=2;continue}}if(i===`/`&&(r=!1),s(i)&&(i!==`:`||!r))n+=i;else{let r=e.charCodeAt(t);if(r<128)n+=u[r];else if(r<55296||r>57343)n+=d(r);else if(r<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);i>=56320&&i<=57343?(n+=d(65536+(r-55296<<10)+(i-56320)),t++):n+=d(65533)}else n+=d(65533)}}return n}function ae(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`%`&&r+2<e.length){let t=e.slice(r+1,r+3);if(a(t)){n+=`%`+t.toUpperCase(),r+=2;continue}}if(t(i))n+=i;else{let t=e.charCodeAt(r);if(t<128)n+=u[t];else if(t<55296||t>57343)n+=d(t);else if(t<=56319&&r+1<e.length){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(n+=d(65536+(t-55296<<10)+(i-56320)),r++):n+=d(65533)}else n+=d(65533)}}return n}function E(e){return ae(e,l)}function oe(e){return ae(e,c)}function se(e){return ae(e,c)}function ce(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function D(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(c(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ce(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function le(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function ue(e){let t=[];if(e.userinfo!==void 0&&(t.push(E(e.userinfo)),t.push(`@`)),e.host!==void 0){let n=e.host;if(!r(n)){let e=b(n);e.isIPV6!==!0&&e.isIPVFuture!==!0&&(n=ne(n,!0),e=b(n)),n=e.isIPV6===!0||e.isIPVFuture===!0?`[${e.escapedHost}]`:te(n,!1)}t.push(n)}if(typeof e.port==`number`||typeof e.port==`string`){let n=String(e.port);if(!i(n))throw TypeError(`URI port is malformed.`);t.push(`:`),t.push(n)}return t.length?t.join(``):void 0}t.exports={nonSimpleDomain:g,recomposeAuthority:ue,reescapeHostDelimiters:te,normalizePercentEncoding:ne,normalizePathEncoding:re,serializePathEncoding:ie,normalizeQueryFragmentEncoding:D,encodeUserinfo:E,encodeQuery:oe,encodeFragment:se,escapePreservingEscapes:le,removeDotSegments:S,removeDotSegmentsRelative:C,isIPv4:r,isUUID:n,normalizeIPv6:b,stringArrayToHexStripped:f}})),Ey=s(((e,t)=>{var{isUUID:n}=Ty(),r=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf(`?`),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!==`/`?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n&&n[0]===e.path){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&n(r.uuid)||(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),Dy=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,removeDotSegmentsRelative:i,recomposeAuthority:a,normalizePercentEncoding:o,normalizePathEncoding:s,serializePathEncoding:c,normalizeQueryFragmentEncoding:l,encodeQuery:u,encodeFragment:d,reescapeHostDelimiters:f,isIPv4:p,nonSimpleDomain:m}=Ty(),{SCHEMES:h,getSchemeHandler:g}=Ey(),_=/^[A-Za-z][A-Za-z0-9+.-]*$/u,v=`URI scheme is malformed.`,y=`URI host is malformed.`,b=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function x(e){let t=String(e);if(!_.test(t))throw TypeError(v);return t}function S(e,t){return typeof e==`string`?e=de(e,t):typeof e==`object`&&(e=ue(T(e,t),t)),e}function C(e,t,r){let i=r?Object.assign({scheme:`null`},r):{scheme:`null`},{parsed:a,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:c,malformedHost:l,malformedScheme:u}=le(e,i),{parsed:d,malformedAuthorityOrPort:f,malformedPercentEncoding:m,malformedSchemeSpecific:h,malformedHost:_,malformedScheme:v}=le(t,i);if(o||f||s||m||c||h||l||_||u||v)throw Error(a.error||d.error||`URI is malformed.`);let b=w(a,d,i,!0),x=g(r&&r.scheme||b.scheme),S=b.host,C=S!==void 0&&S!==``&&(p(S)||n(S).isIPV6);if(ce(b,r||{},x,C))throw Error(y);se(b,r||{},x,C);let ee=S&&S.indexOf(`%`)!==-1&&!/\P{ASCII}/u.test(S);if(b.error&&!ee)throw Error(b.error);return i.skipEscape=!0,T(b,i)}function w(e,t,n,a){let o={};if(a||(e=ue(T(e,n),n),t=ue(T(t,n),n)),n||={},!n.tolerant&&t.scheme)o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=r(t.path||``),o.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=r(t.path||``),o.query=t.query;else{if(!t.path)o.path=e.path,o.query=t.query===void 0?e.query:t.query;else{if(t.path[0]===`/`)o.path=r(t.path);else{let n=e.userinfo!==void 0||e.host!==void 0||e.port!==void 0;o.path=n&&!e.path?`/`+t.path:e.path?e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:t.path,o.path=e.scheme===void 0&&!n&&o.path[0]!==`/`?i(o.path):r(o.path)}o.query=t.query}o.userinfo=e.userinfo,o.host=e.host,o.port=e.port}o.scheme=e.scheme}return o.fragment=t.fragment,o}function ee(e,t,n){let r=pe(e,n),i=pe(t,n);return r!==void 0&&i!==void 0&&r===i}function T(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},s=Object.assign({},t),l=[];n.scheme&&=x(n.scheme);let f=g(s.scheme||n.scheme);f&&f.serialize&&f.serialize(n,s);let p=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,m=(n.scheme===void 0||s.reference===`suffix`)&&!p,h=!s.skipEscape&&m;n.path!==void 0&&(n.path=s.skipEscape?o(n.path):c(n.path,h)),s.reference!==`suffix`&&n.scheme&&(n.scheme=x(n.scheme),l.push(n.scheme,`:`));let _=a(n);if(_!==void 0&&(s.reference!==`suffix`&&l.push(`//`),l.push(_),n.path&&n.path[0]!==`/`&&l.push(`/`)),n.path!==void 0){let e=n.path;s.absolutePath||f&&f.absolutePath||(e=m&&e[0]!==`/`?i(e):r(e)),m&&(e=c(e,!0)),_===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),l.push(e)}return n.query!==void 0&&l.push(`?`,u(n.query)),n.fragment!==void 0&&l.push(`#`,d(n.fragment)),l.join(``)}var te=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,ne=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,re=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function ie(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function ae(e){if(e===void 0)return!1;let t=e.indexOf(`%`);for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf(`%`,t+3)}return!1}function E(e){return e[0]===`[`&&e[e.length-1]===`]`}function oe(e){let t=e[4];return ae(e[3])||t!==void 0&&!E(t)&&ae(t)||ae(e[6])||ae(e[7])||ae(e[8])}function se(e,t,n,r){if(ce(e,t,n,r))return e.error=e.error||y,!0;if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!E(e.host)&&(t.domainHost||n&&n.domainHost)&&r===!1&&m(e.host)){let t;try{t=new URL(`http://`+e.host)}catch(t){return e.error=e.error||`Host's domain name can not be converted to ASCII: `+t,!0}if(!D(t))return e.error=e.error||y,!0;e.host=t.hostname}return!1}function ce(e,t,n,r){return!!(e.host&&r===!1&&!E(e.host)&&(t.domainHost||n&&n.domainHost)&&b.test(e.host))}function D(e){return e.username===``&&e.password===``&&e.port===``&&e.pathname===`/`&&e.search===``&&e.hash===``&&e.hostname!==``}function le(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,c=!1,u=!1,d=!1,m=!1,b=!1,x=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let S=e.match(ne);S!==null&&S[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,a=!0);let C=e.match(re);if(C!==null){let e=C[1],t=e.replace(/[\t\n\r]/g,``);t.length>=2&&(t.slice(0,2)===`//`?e.length!==t.length&&(i.error=i.error||`URI authority introducer must not contain whitespace.`,a=!0):(i.error=i.error||`URI authority must not contain a literal backslash.`,a=!0))}let w=e.match(te);if(w){i.scheme=w[1],i.userinfo=w[3],i.host=w[4],i.port=parseInt(w[5],10),i.path=w[6]||``,i.query=w[7],i.fragment=w[8],i.scheme!==void 0&&(_.test(i.scheme)?i.scheme=i.scheme.toLowerCase():(i.error=i.error||v,b=!0)),c=oe(w),c&&(i.error=i.error||`URI contains malformed percent-encoding.`),isNaN(i.port)&&(i.port=w[5]);let t=ie(i,w);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host){if(p(i.host)===!1){let e=E(i.host),t=i.host.indexOf(`[`)!==-1||i.host.indexOf(`]`)!==-1,r=n(i.host);x=r.isIPV6||r.isIPVFuture===!0,m=t&&(!e||r.error===!0),i.host=x?r.host:r.host.toLowerCase(),m&&(i.error=i.error||y,a=!0)}else x=!0}i.reference=i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?`same-document`:i.scheme===void 0?`relative`:i.fragment===void 0?`absolute`:`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let S=g(r.scheme||i.scheme);if(m||(d=se(i,r,S,x)),e.indexOf(`%`)!==-1&&i.host!==void 0&&!m){let e=x?i.host:o(i.host,!0);x||(e=o(e.toLowerCase())),i.host=x||r.scheme!==`null`?f(e,x):e}(!S||S&&!S.skipNormalize)&&(i.path&&=s(i.path),i.query&&=l(i.query),i.fragment&&=l(i.fragment)),S&&S.parse&&(S.parse(i,r),S===h.urn&&i.nid===void 0&&(u=!0))}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a,malformedPercentEncoding:c,malformedSchemeSpecific:u,malformedHost:d,malformedScheme:b}}function ue(e,t){return le(e,t).parsed}function de(e,t){return fe(e,t).normalized}function fe(e,t){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}=le(e,t);return{normalized:r||i||a||o||s?e:T(n,t),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}}function pe(e,t){if(typeof e!=`string`&&typeof e!=`object`)return;let n;try{n=typeof e==`string`?e:T(e,t)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:c}=fe(n,t);return i||a||o||s||c?void 0:r}var me={SCHEMES:h,normalize:S,resolve:C,resolveComponent:w,equal:ee,serialize:T,parse:ue};t.exports=me,t.exports.default=me,t.exports.fastUri=me})),Oy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dy();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),ky=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=py();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Qv();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=my(),i=hy(),a=ry(),o=gy(),s=Qv(),c=fy(),l=ay(),u=$v(),f=(wy(),d(_y).default),p=Oy(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=re(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=te.call(this),e.formats&&ee.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(ae.call(this,n,t),!t)return(0,u.eachItem)(n,e=>E.call(this,e)),this;se.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>E.call(this,e,r):e=>r.type.forEach(t=>E.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=D(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e){if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}}function ee(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}}function te(){let e={...this.opts};for(let t of h)delete e[t];return e}var ne={log(){},warn(){},error(){}};function re(e){if(e===!1)return ne;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ie=/^[a-z_$][a-z0-9_$:-]*$/i;function ae(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ie.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function E(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?oe.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function oe(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function se(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}var ce={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function D(e){return{anyOf:[e,ce]}}})),Ay=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),jy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=hy(),n=sy(),r=Qv(),i=ey(),a=gy(),o=$v(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);return h instanceof a.SchemaEnv?_(h):v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0){if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}}if(l.items!==!0){if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}}e.callRef=l,e.default=s})),My=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ay(),n=jy();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),Ny=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),Py=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),Fy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),Iy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v(),r=Fy();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),Ly=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sy(),n=$v(),r=Qv();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),Ry=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),zy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sy(),n=Qv(),r=$v();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),By=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),Vy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=uy();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Hy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ay(),n=Qv(),r=$v(),i=Vy();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),Uy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v(),r=Vy();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),Wy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v(),r=Vy();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),Gy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ny(),n=Py(),r=Iy(),i=Ly(),a=Ry(),o=zy(),s=By(),c=Hy(),l=Uy(),u=Wy();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Ky=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=Qv(),n=$v(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;Array.isArray(a)?i(e,a):(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),qy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=Qv(),n=$v(),r=sy(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,(0,n.alwaysValidSchema)(i,t)||e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Jy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=qy();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Yy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v(),r=sy(),i=Ky();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,(0,n.alwaysValidSchema)(o,t)||(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Xy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Zy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=Qv(),n=$v(),r=sy();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
11
- missingProperty: ${i},
12
- depsCount: ${n},
13
- deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Qy=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),$y=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sy(),n=Qv(),r=ey(),i=$v();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1)_(t);else if(o===!1)e.setParams({additionalProperty:t}),e.error(),d||a.break();else if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),eb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=py(),n=sy(),r=$v(),i=$y();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),tb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sy(),n=Qv(),r=$v(),i=$v();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),nb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$v();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),rb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:sy().validateUnion,error:{message:`must match a schema in anyOf`}}})),ib=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),ab=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$v();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),ob=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=$v(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),sb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$v();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),cb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ky(),n=Jy(),r=qy(),i=Yy(),a=Xy(),o=Zy(),s=Qy(),c=$y(),l=eb(),u=tb(),d=nb(),f=rb(),p=ib(),m=ab(),h=ob(),g=sb();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),lb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),ub=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[lb().default]})),db=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),fb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=My(),n=Gy(),r=cb(),i=ub(),a=db();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),pb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),mb=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qv(),n=pb(),r=gy(),i=hy(),a=$v();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),hb=c({$id:()=>_b,$schema:()=>gb,default:()=>Sb,definitions:()=>yb,properties:()=>xb,title:()=>vb,type:()=>bb}),gb,_b,vb,yb,bb,xb,Sb,Cb=o((()=>{gb=`http://json-schema.org/draft-07/schema#`,_b=`http://json-schema.org/draft-07/schema#`,vb=`Core schema meta-schema`,yb={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},bb=[`object`,`boolean`],xb={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},Sb={$schema:gb,$id:_b,title:vb,definitions:yb,type:bb,properties:xb,default:!0}})),wb=u(s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=ky(),r=fb(),i=mb(),a=(Cb(),d(hb).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=py();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Qv();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=my();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=hy();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}))()),Tb=new Set([`$$slots`,`$$events`,`$$legacy`]);function Eb(e,t){let n=Y(t,Tb);var r=U();J(L(r),()=>Pf,(e,t)=>{t(e,La(()=>n))}),W(e,r)}var Db={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`},Ob=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function kb(e){return e!=null}function Ab(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Db.width,a=e.size??e.height??Db.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?Ob(...c):Ob(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Db[`stroke-width`])*Number(e.size??e.width??Db.width)/Number(t.size??t.width??Db.width):t.strokeWidth??Db[`stroke-width`];return[`svg`,{...Object.entries(Db).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&kb(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&kb(t.width)&&{[r(`width`)]:t.width},...`height`in t&&kb(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 jb=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Mb=Symbol(`lucide-context`),Nb=()=>ut(Mb),Pb=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),Fb=hi(`<svg><!><!></svg>`);function Ib(e,t){j(t,!0);let n=Nb()??{},r=X(t,`color`,19,()=>n.color??`currentColor`),i=X(t,`size`,19,()=>n.size??24),a=X(t,`width`,19,i),o=X(t,`height`,19,i),s=X(t,`strokeWidth`,19,()=>n.strokeWidth??2),c=X(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),l=X(t,`nonScalingStroke`,19,()=>n.nonScalingStroke??!1),u=X(t,`iconNode`,19,()=>[]),d=X(t,`icon`,19,()=>({node:u(),aliases:[],size:24})),f=Y(t,Pb),p=N(()=>!!t.children||jb(f)),m=N(()=>Ab(d(),{color:r(),width:a(),height:o(),strokeWidth:s(),absoluteStrokeWidth:c(),nonScalingStroke:l(),className:Ob(`lucide-icon`,n.class),hasA11yProp:B(p),attributes:f})),h=N(()=>re(B(m),3)),g=N(()=>B(h)[1]),_=N(()=>ne(B(h)[2],()=>[],!0)),v=N(()=>({...B(g),class:[...B(g).class.split(` `),t.class]}));var y=Fb();ya(y,()=>({...B(v)}));var b=I(y);Ni(b,17,()=>B(_),ki,(e,t)=>{var n=N(()=>re(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();Bi(L(a),r,!0,(e,t)=>{ya(e,()=>({...i()}))}),W(e,a)}),q(R(b),()=>t.children??w),k(y),W(e,y),M()}var Lb={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`}]]};Lb.node;var Rb=new Set([`$$slots`,`$$events`,`$$legacy`]);function zb(e,t){let n=Y(t,Rb);Ib(e,La(()=>n,{get icon(){return Lb}}))}var Bb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Vb(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Bb);var i=U(),a=L(i);{let e=N(()=>$l(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));J(a,()=>F_,(t,i)=>{i(t,La({"data-slot":`select-scroll-down-button`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{zb(e,{})},$$slots:{default:!0}}))})}W(e,i),M()}var Hb={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`}]]};Hb.node;var Ub=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wb(e,t){let n=Y(t,Ub);Ib(e,La(()=>n,{get icon(){return Hb}}))}var Gb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Kb(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Gb);var i=U(),a=L(i);{let e=N(()=>$l(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));J(a,()=>z_,(t,i)=>{i(t,La({"data-slot":`select-scroll-up-button`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{Wb(e,{})},$$slots:{default:!0}}))})}W(e,i),M()}var qb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`portalProps`,`children`,`preventScroll`]),Jb=V(`<!> <!> <!>`,1);function Yb(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`sideOffset`,3,4),i=X(t,`preventScroll`,3,!0),a=Y(t,qb);Eb(e,La(()=>t.portalProps,{children:(e,o)=>{var s=U(),c=L(s);{let e=N(()=>$l(`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));J(c,()=>C_,(o,s)=>{s(o,La({get sideOffset(){return r()},get preventScroll(){return i()},"data-slot":`select-content`,get class(){return B(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=Jb(),i=L(r);Kb(i,{});var a=R(i,2);{let e=N(()=>$l(`h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1`));J(a,()=>j_,(n,r)=>{r(n,{get class(){return B(e)},children:(e,n)=>{var r=U();q(L(r),()=>t.children??w),W(e,r)},$$slots:{default:!0}})})}Vb(R(a,2),{}),W(e,r)},$$slots:{default:!0}}))})}W(e,s)},$$slots:{default:!0}})),M()}var Xb={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`}]]};Xb.node;var Zb=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qb(e,t){let n=Y(t,Zb);Ib(e,La(()=>n,{get icon(){return Xb}}))}var $b=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`,`label`,`children`]),ex=V(`<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 tx(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,$b);var i=U(),a=L(i);{let e=(e,n)=>{let r=()=>(n?.()).selected,i=()=>(n?.()).highlighted;var a=ex(),o=L(a),s=I(o),c=e=>{Qb(e,{class:`pointer-events-none`})};K(s,e=>{r()&&e(c)}),k(o);var l=R(o,2),u=I(l),d=e=>{var n=U();q(L(n),()=>t.children,()=>({selected:r(),highlighted:i()})),W(e,n)},f=e=>{var n=H();z(()=>G(n,t.label||t.value)),W(e,n)};K(u,e=>{t.children?e(d):e(f,-1)}),k(l),W(e,a)},i=N(()=>$l(`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));J(a,()=>O_,(a,o)=>{o(a,La({get value(){return t.value},get label(){return t.label},"data-slot":`select-item`,get class(){return B(i)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:e,$$slots:{default:!0}}))})}W(e,i),M()}var nx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),rx=V(`<!> <!>`,1);function ix(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`size`,3,`default`),i=Y(t,nx);var a=U(),o=L(a);{let e=N(()=>$l(`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));J(o,()=>iv,(a,o)=>{o(a,La({"data-slot":`select-trigger`,get"data-size"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=rx(),i=L(r);q(i,()=>t.children??w),zb(R(i,2),{class:`text-muted-foreground size-4 pointer-events-none`}),W(e,r)},$$slots:{default:!0}}))})}W(e,a),M()}var ax=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function ox(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ax);var i=U();J(L(i),()=>tv,(e,t)=>{t(e,La({"data-slot":`select-value`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),W(e,i),M()}var sx=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`]);function cx(e,t){j(t,!0);let n=X(t,`open`,15,!1),r=X(t,`value`,15),i=Y(t,sx);var a=U();J(L(a),()=>Q_,(e,t)=>{t(e,La(()=>i,{get open(){return n()},set open(e){n(e)},get value(){return r()},set value(e){r(e)}}))}),W(e,a),M()}var lx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`,`size`]);function ux(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`checked`,15,!1),i=X(t,`size`,3,`default`),a=Y(t,lx);var o=U(),s=L(o);{let e=N(()=>$l(`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));J(s,()=>mv,(t,o)=>{o(t,La({"data-slot":`switch`,get"data-size"(){return i()},get class(){return B(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=U(),r=L(n);{let e=N(()=>$l(`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%)]`));J(r,()=>_v,(t,n)=>{n(t,{"data-slot":`switch-thumb`,get class(){return B(e)}})})}W(e,n)},$$slots:{default:!0}}))})}W(e,o),M()}var dx=V(` <button type="button" class="hover:text-destructive"><!></button>`,1),fx=V(`<div class="flex flex-wrap items-center gap-2"><!> <!></div>`);function px(e,t){j(t,!0);let n=X(t,`value`,31,()=>bn([])),r=X(t,`numeric`,3,!1),i=P(``);function a(){let e=B(i).trim();e&&(r()&&!/^\d+$/.test(e)?F(i,``):(n().includes(e)||n([...n(),e]),F(i,``),t.onchange?.(n())))}function o(e){n(n().filter(t=>t!==e)),t.onchange?.(n())}function s(e){(e.key===`Enter`||e.key===`,`)&&(e.preventDefault(),a())}var c=fx(),l=I(c);Ni(l,16,n,e=>e,(e,t)=>{nu(e,{variant:`secondary`,class:`gap-1`,children:(e,n)=>{A();var r=dx(),i=L(r),a=R(i);eo(I(a),{class:`size-3`}),k(a),z(()=>{G(i,`${t??``} `),_a(a,`aria-label`,`删除 ${t}`)}),ai(`click`,a,()=>o(t)),W(e,r)},$$slots:{default:!0}})});var u=R(l,2);{let e=N(()=>r()?`numeric`:`text`);uu(u,{class:`h-8 w-40`,get placeholder(){return t.placeholder},get inputmode(){return B(e)},onkeydown:s,onblur:a,get value(){return B(i)},set value(e){F(i,e,!0)}})}k(c),W(e,c),M()}oi([`click`]);function mx(e,t,n){let r=t.split(`.`),i=e;for(let e of r.slice(0,-1)){let t=i[e];if(!t||typeof t!=`object`||Array.isArray(t)){let t={};i[e]=t,i=t}else i=t}let a=r[r.length-1];a!==void 0&&(i[a]=n)}function hx(e){return e==null?``:String(e)}function gx(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 _x=V(`<!> 还原`,1),vx=V(`<!> 保存`,1),yx=V(`<p> </p>`),bx=V(`<p class="text-muted-foreground text-sm">正在读取配置…</p>`),xx=V(`<p class="text-muted-foreground text-sm">字段元数据加载失败。</p>`),Sx=V(`<button type="button" class="text-muted-foreground hover:text-foreground ml-auto text-xs">还原</button>`),Cx=V(`<div class="flex h-9 items-center"><!></div>`),wx=V(`<!> <!>`,1),Tx=V(`<p class="text-muted-foreground text-xs"> </p>`),Ex=V(`<p class="text-destructive text-xs"> </p>`),Dx=V(`<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>`),Ox=V(`<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>`),kx=V(`<p class="text-muted-foreground text-sm">没有匹配的字段。</p>`),Ax=V(`<!> <!> <!>`,1),jx=V(`<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 Mx(e,t){j(t,!0);let n=new wb.default({allErrors:!0,strict:!1}),r=P(void 0),i=P(bn([])),a=P(bn({})),o=P(bn({})),s=P(bn([])),c=P(bn({})),l=P(``),u=P(`ok`),d=P(!1),f=P(!0),p=P(``),m=P(``),h=P(bn({})),g,_=N(()=>new Map((B(r)?.fields??[]).map(e=>[e.path,e]))),v=N(()=>(B(r)?.groups??[]).map(e=>({...e,fields:(B(r)?.fields??[]).filter(t=>t.group===e.id&&(B(p).trim()===``||t.path.includes(B(p).trim())||t.label.includes(B(p).trim())||(t.description??``).includes(B(p).trim())))})));Ra(()=>{y()}),Un(()=>{let e=t.config;e&&e!==g&&(B(s).length>0||(g=e,b(e.fields)))});async function y(){F(f,!0);try{let[e,t]=await Promise.all([ro.schema(),ro.config()]);F(r,e,!0),b(t.fields);try{F(i,(await ro.models()).models,!0)}catch(e){F(m,e instanceof Error?e.message:String(e),!0)}}catch(e){re(e)}finally{F(f,!1)}}function b(e){let t={},n={};for(let r of e){let e=B(_).get(r.path);e&&(t[r.path]=e.secret?``:r.value,e.secret&&(n[r.path]=r.hasValue===!0))}F(a,t,!0),F(o,{...t},!0),F(h,n,!0),F(s,[],!0),F(c,{},!0)}function x(e,t){B(a)[e.path]=t,delete B(c)[e.path],B(s).includes(e.path)||F(s,[...B(s),e.path],!0),F(l,``)}function S(e){B(a)[e]=B(o)[e],F(s,B(s).filter(t=>t!==e),!0),delete B(c)[e]}function C(){F(a,{...B(o)},!0),F(s,[],!0),F(c,{},!0),F(l,``)}function w(e){return B(s).includes(e)}function ee(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 gx(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}}function T(){let e={};for(let t of B(r)?.fields??[]){if(t.secret)continue;let n=B(a)[t.path];n!=null&&n!==``&&mx(e,t.path,n)}return e}function te(e){if(!B(r))return{};let t=n.compile(B(r).jsonSchema);if(t(e))return{};let i={};for(let e of t.errors??[]){let t=e.instancePath.replace(/^\//,``).replace(/\//g,`.`),n=e.keyword===`required`?[t,String(e.params.missingProperty)].filter(Boolean).join(`.`):t,r=e.keyword===`required`?`必填项,不能留空`:e.message??`取值不合法`;n&&(i[n]=r)}return i}async function ne(){if(B(s).length===0){F(l,`没有需要保存的改动`),F(u,`ok`);return}let e={};for(let t of B(s)){let n=B(_).get(t);if(!n)continue;let r=ee(n,B(a)[t]);r!==void 0&&(e[t]=(n.secret,r))}if(Object.keys(e).length===0){F(l,`没有需要保存的改动`),F(u,`ok`);return}let n=te(T());if(Object.keys(n).length>0)F(c,n,!0),F(l,`校验不通过,请检查标红的字段`),F(u,`error`);else{F(d,!0);try{let n=await ro.save(e);b(n.fields),n.restartRequired.length>0?(F(l,`已保存;以下字段需要重启插件后生效:${n.restartRequired.join(`、`)}`),t.onrestart?.(n.restartRequired)):F(l,`已保存并立即生效`),F(u,`ok`)}catch(e){if(e instanceof to){if(F(l,e.message,!0),e.fields.length>0){let t={...B(c)};for(let n of e.fields)t[n.path]=n.message;F(c,t,!0),F(l,e.fields.map(e=>e.message).join(`;`),!0)}}else F(l,e instanceof Error?e.message:String(e),!0);F(u,`error`)}finally{F(d,!1)}}}function re(e){F(l,e instanceof Error?e.message:String(e),!0),F(u,`error`)}function ie(e){if(e.type===`modelRef`){let t=B(i).map(e=>`${e.providerID}/${e.id}`),n=String(B(a)[e.path]??``);return n&&!t.includes(n)?[n,...t]:t}return e.options??[]}let ae=`__empty__`;var E=jx(),oe=I(E),se=I(oe),ce=I(se);$a(ce,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),uu(R(ce,2),{class:`w-64 pl-8`,placeholder:`搜索字段名或说明`,get value(){return B(p)},set value(e){F(p,e,!0)}}),k(se);var D=R(se,2),le=I(D),ue=e=>{var t=H();z(()=>G(t,`${B(s).length??``} 项待保存`)),W(e,t)},de=e=>{W(e,H(`全部为已保存的值`))};K(le,e=>{B(s).length>0?e(ue):e(de,-1)}),k(D);var fe=R(D,2),pe=I(fe);{let e=N(()=>B(s).length===0);su(pe,{variant:`ghost`,size:`sm`,get disabled(){return B(e)},onclick:C,children:(e,t)=>{var n=_x();Za(L(n),{class:`size-4`}),A(),W(e,n)},$$slots:{default:!0}})}var me=R(pe,2);{let e=N(()=>B(d)||B(s).length===0);su(me,{size:`sm`,get disabled(){return B(e)},onclick:()=>void ne(),children:(e,t)=>{var n=vx();Qa(L(n),{class:`size-4`}),A(),W(e,n)},$$slots:{default:!0}})}k(fe),k(oe);var he=R(oe,2),ge=e=>{var t=yx(),n=jn(t,!0);z(()=>{Xi(t,1,Wi(B(u)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(l))}),W(e,t)};K(he,e=>{B(l)&&e(ge)});var _e=R(he,2),ve=e=>{W(e,bx())},ye=e=>{W(e,xx())},be=e=>{var t=Ax(),n=L(t);Ni(n,17,()=>B(v),e=>e.id,(e,t)=>{var n=U(),r=L(n),i=e=>{var n=Ox(),r=I(n),i=jn(r,!0),o=R(r,2);Ni(o,21,()=>B(t).fields,e=>e.path,(e,t)=>{var n=Dx(),r=I(n),i=I(r);{let e=N(()=>`field-${B(t).path}`);Rv(i,{get for(){return B(e)},class:`text-sm`,children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).label)),W(e,r)},$$slots:{default:!0}})}var o=R(i,2),s=e=>{nu(e,{variant:`outline`,children:(e,t)=>{A(),W(e,H(`待保存`))},$$slots:{default:!0}})},l=N(()=>w(B(t).path));K(o,e=>{B(l)&&e(s)});var u=R(o,2),d=e=>{nu(e,{variant:`secondary`,children:(e,t)=>{A(),W(e,H(`需重启`))},$$slots:{default:!0}})};K(u,e=>{B(t).hot||e(d)});var f=R(u,2),p=e=>{var n=Sx();ai(`click`,n,()=>S(B(t).path)),W(e,n)},m=N(()=>w(B(t).path));K(f,e=>{B(m)&&e(p)}),k(r);var g=R(r,2),_=e=>{var n=Cx(),r=I(n);{let e=N(()=>`field-${B(t).path}`),n=N(()=>B(a)[B(t).path]===!0);ux(r,{get id(){return B(e)},get checked(){return B(n)},onCheckedChange:e=>x(B(t),e)})}k(n),W(e,n)},v=e=>{let n=N(()=>ie(B(t)));var r=U(),i=L(r);{let e=N(()=>String(B(a)[B(t).path]??``)||ae);J(i,()=>cx,(r,i)=>{i(r,{type:`single`,get value(){return B(e)},onValueChange:e=>x(B(t),e===ae?``:e??``),children:(e,r)=>{var i=wx(),a=L(i);{let e=N(()=>`field-${B(t).path}`);J(a,()=>ix,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(L(n),()=>ox,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(a,2),()=>Yb,(e,t)=>{t(e,{children:(e,t)=>{var r=wx(),i=L(r);J(i,()=>tx,(e,t)=>{t(e,{value:ae,children:(e,t)=>{A(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),Ni(R(i,2),16,()=>B(n),e=>e,(e,t)=>{var n=U();J(L(n),()=>tx,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{A();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,i)},$$slots:{default:!0}})})}W(e,r)},y=e=>{{let n=N(()=>`field-${B(t).path}`),r=N(()=>String(B(a)[B(t).path]??``)),i=N(()=>B(h)[B(t).path]?`已设置;留空表示不修改`:`未设置;留空表示不修改`);uu(e,{get id(){return B(n)},type:`password`,get value(){return B(r)},get placeholder(){return B(i)},oninput:e=>x(B(t),e.currentTarget.value)})}},b=e=>{{let n=N(()=>`field-${B(t).path}`),r=N(()=>hx(B(a)[B(t).path])),i=N(()=>B(t).step??1);uu(e,{get id(){return B(n)},type:`number`,get value(){return B(r)},get min(){return B(t).min},get max(){return B(t).max},get step(){return B(i)},oninput:e=>{let n=e.currentTarget.value;x(B(t),n===``?``:Number(n))}})}},C=e=>{{let n=N(()=>gx(B(a)[B(t).path])),r=N(()=>B(t).type===`numberList`),i=N(()=>B(t).type===`numberList`?`输入数字后回车`:`输入后回车`);px(e,{get value(){return B(n)},get numeric(){return B(r)},get placeholder(){return B(i)},onchange:e=>x(B(t),e)})}},ee=e=>{{let n=N(()=>`field-${B(t).path}`),r=N(()=>String(B(a)[B(t).path]??``));uu(e,{get id(){return B(n)},type:`time`,get value(){return B(r)},oninput:e=>x(B(t),e.currentTarget.value)})}},T=e=>{{let n=N(()=>`field-${B(t).path}`),r=N(()=>String(B(a)[B(t).path]??``)),i=N(()=>B(t).type===`path`?`留空使用默认路径`:`留空使用默认值`);uu(e,{get id(){return B(n)},type:`text`,get value(){return B(r)},get placeholder(){return B(i)},oninput:e=>x(B(t),e.currentTarget.value)})}};K(g,e=>{B(t).type===`boolean`?e(_):B(t).type===`enum`||B(t).type===`modelRef`?e(v,1):B(t).type===`secret`?e(y,2):B(t).type===`number`?e(b,3):B(t).type===`numberList`||B(t).type===`stringList`?e(C,4):B(t).type===`clock`?e(ee,5):e(T,-1)});var te=R(g,2),ne=e=>{var n=Tx(),r=jn(n,!0);z(()=>G(r,B(t).description)),W(e,n)};K(te,e=>{B(t).description&&e(ne)});var re=R(te,2),E=e=>{var n=Ex(),r=jn(n,!0);z(()=>G(r,B(c)[B(t).path])),W(e,n)};K(re,e=>{B(c)[B(t).path]&&e(E)});var oe=jn(R(re,2),!0);k(n),z(()=>G(oe,B(t).path)),W(e,n)}),k(o),k(n),z(()=>G(i,B(t).label)),W(e,n)};K(r,e=>{B(t).fields.length>0&&e(i)}),W(e,n)});var r=R(n,2),i=e=>{var t=Tx(),n=jn(t);z(()=>G(n,`模型列表读取失败:${B(m)??``}`)),W(e,t)};K(r,e=>{B(m)&&e(i)});var o=R(r,2),s=e=>{W(e,kx())},l=N(()=>B(p).trim()&&B(v).every(e=>e.fields.length===0));K(o,e=>{B(l)&&e(s)}),W(e,t)};K(_e,e=>{B(f)?e(ve):B(r)?e(be,-1):e(ye,1)}),k(E),W(e,E),M()}oi([`click`]);var Nx=new Intl.DateTimeFormat(`zh-CN`,{dateStyle:`short`,timeStyle:`medium`}),Px=new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`}),Fx=new Intl.NumberFormat(`zh-CN`);function Ix(e){return e===void 0||!Number.isFinite(e)?`-`:Nx.format(e)}function Lx(e){return e===void 0||!Number.isFinite(e)?`-`:Px.format(e)}function Rx(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 zx(e){return e===void 0||!Number.isFinite(e)?`-`:Fx.format(e)}function Bx(e){return e==null?`不限`:zx(e)}function Vx(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var Hx=V(`<option> </option>`),Ux=V(`<!> 继续`,1),Wx=V(`<!> 暂停`,1),Gx=V(`<!> 清空`,1),Kx=V(`<!> 重新读取`,1),qx=V(`<p class="text-destructive text-sm"> </p>`),Jx=V(`<span class="text-muted-foreground break-all"> </span>`),Yx=V(`<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>`),Xx=V(`<p class="text-muted-foreground p-4 text-sm">没有日志。</p>`),Zx=V(`<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 Qx(e,t){j(t,!0);let n=X(t,`logs`,19,()=>[]),r=[`debug`,`info`,`warn`,`error`],i=2e3,a=P(bn([])),o=P(`all`),s=P(``),c=P(!0),l=P(!1),u=P(!1),d=P(``),f,p=new Set;function m(e){return`${e.time}|${e.level}|${e.message}`}function h(e){let t=[...B(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))}F(a,t,!0)}async function g(){F(u,!0),F(d,``);try{let e=await ro.logs({limit:500});p=new Set,F(a,[],!0),h(e.entries)}catch(e){F(d,e instanceof Error?e.message:String(e),!0)}finally{F(u,!1)}}Ra(()=>{g()}),Un(()=>{let e=n();e.length===0||B(l)||h(e)}),Un(()=>{B(a).length,B(c)&&f&&(f.scrollTop=f.scrollHeight)});let _=N(()=>B(a).filter(e=>{if(B(o)!==`all`&&e.level!==B(o))return!1;let t=B(s).trim();return!t||e.message.includes(t)||Vx(e.meta).includes(t)}));function v(){F(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=Zx(),x=I(b),S=I(x),C=I(S);C.value=C.__value=`all`,Ni(R(C),16,()=>r,e=>e,(e,t)=>{var n=Hx(),r=jn(n,!0),i={};z(()=>{G(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),W(e,n)}),k(S),ra(S);var w=R(S,2),ee=I(w);$a(ee,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),uu(R(ee,2),{class:`w-56 pl-8`,placeholder:`搜索日志内容`,get value(){return B(s)},set value(e){F(s,e,!0)}}),k(w);var T=R(w,2),te=jn(T),ne=R(T,2),re=I(ne);su(re,{variant:`ghost`,size:`sm`,onclick:()=>F(l,!B(l)),children:(e,t)=>{var n=U(),r=L(n),i=e=>{var t=Ux();Ya(L(t),{class:`size-4`}),A(),W(e,t)},a=e=>{var t=Wx();Ja(L(t),{class:`size-4`}),A(),W(e,t)};K(r,e=>{B(l)?e(i):e(a,-1)}),W(e,n)},$$slots:{default:!0}});var ie=R(re,2);su(ie,{variant:`ghost`,size:`sm`,onclick:()=>F(c,!B(c)),get"aria-pressed"(){return B(c)},children:(e,t)=>{A();var n=H();z(()=>G(n,B(c)?`自动滚动:开`:`自动滚动:关`)),W(e,n)},$$slots:{default:!0}});var ae=R(ie,2);su(ae,{variant:`ghost`,size:`sm`,onclick:v,children:(e,t)=>{var n=Gx();Ka(L(n),{class:`size-4`}),A(),W(e,n)},$$slots:{default:!0}}),su(R(ae,2),{variant:`ghost`,size:`sm`,get disabled(){return B(u)},onclick:()=>void g(),children:(e,t)=>{var n=Kx();Xa(L(n),{class:`size-4`}),A(),W(e,n)},$$slots:{default:!0}}),k(ne),k(x);var E=R(x,2),oe=e=>{var t=qx(),n=jn(t,!0);z(()=>G(n,B(d))),W(e,t)};K(E,e=>{B(d)&&e(oe)});var se=R(E,2);Ni(se,23,()=>B(_),(e,t)=>m(e)+t,(e,t)=>{var n=Yx(),r=I(n),i=jn(r,!0),a=R(r,2),o=jn(a,!0),s=R(a,2),c=jn(s,!0),l=R(s,2),u=e=>{var n=Jx(),r=jn(n,!0);z(e=>G(r,e),[()=>Vx(B(t).meta)]),W(e,n)};K(l,e=>{B(t).meta.length>0&&e(u)}),k(n),z((e,n)=>{G(i,e),Xi(a,1,`${n??``} w-10 shrink-0 uppercase`),G(o,B(t).level),G(c,B(t).message)},[()=>Lx(Date.parse(B(t).time)),()=>y(B(t).level)]),W(e,n)},e=>{W(e,Xx())}),k(se),Oa(se,e=>f=e,()=>f);var ce=R(se,2),D=I(ce);nu(D,{variant:`outline`,children:(e,t)=>{A(),W(e,H(`环形缓冲`))},$$slots:{default:!0}});var le=R(D,2);le.textContent=`面板只保留最近 2000 条;完整日志在日志目录里。`,k(ce),k(b),z(()=>G(te,`${B(_).length??``} / ${B(a).length??``} 条`)),ia(S,()=>B(o),e=>F(o,e)),W(e,b),M()}var $x=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),eS=V(`<div><!></div>`);function tS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,$x);var i=eS();ya(i,e=>({"data-slot":`card-content`,class:e,...r}),[()=>$l(`flex flex-col gap-3 px-(--card-spacing)`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var nS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),rS=V(`<p><!></p>`);function iS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,nS);var i=rS();ya(i,e=>({"data-slot":`card-description`,class:e,...r}),[()=>$l(`text-muted-foreground text-sm`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var aS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),oS=V(`<div><!></div>`);function sS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,aS);var i=oS();ya(i,e=>({"data-slot":`card-header`,class:e,...r}),[()=>$l(`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)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var cS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),lS=V(`<div><!></div>`);function uS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,cS);var i=lS();ya(i,e=>({"data-slot":`card-title`,class:e,...r}),[()=>$l(`text-base leading-normal font-medium group-data-[size=sm]/card:text-sm`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var dS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),fS=V(`<div><!></div>`);function pS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`size`,3,`default`),i=Y(t,dS);var a=fS();ya(a,e=>({"data-slot":`card`,"data-size":r(),class:e,...i}),[()=>$l(`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)]),q(I(a),()=>t.children??w),k(a),Oa(a,e=>n(e),()=>n()),W(e,a),M()}var mS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`max`,`value`]),hS=V(`<div data-slot="progress-indicator" class="bg-primary size-full flex-1 transition-all"></div>`);function gS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=X(t,`max`,3,100),i=Y(t,mS);var a=U(),o=L(a);{let e=N(()=>$l(`bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden`,t.class));J(o,()=>X_,(a,o)=>{o(a,La({"data-slot":`progress`,get class(){return B(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=hS();z(()=>Qi(i,`transform: translateX(-${100-100*(t.value??0)/(r()??1)}%)`)),W(e,i)},$$slots:{default:!0}}))})}W(e,a),M()}var _S=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),vS=V(`<tbody><!></tbody>`);function yS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,_S);var i=vS();ya(i,e=>({"data-slot":`table-body`,class:e,...r}),[()=>$l(`[&_tr:last-child]:border-0`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var bS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xS=V(`<td><!></td>`);function SS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,bS);var i=xS();ya(i,e=>({"data-slot":`table-cell`,class:e,...r}),[()=>$l(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var CS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),wS=V(`<th><!></th>`);function TS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,CS);var i=wS();ya(i,e=>({"data-slot":`table-head`,class:e,...r}),[()=>$l(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var ES=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),DS=V(`<thead><!></thead>`);function OS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ES);var i=DS();ya(i,e=>({"data-slot":`table-header`,class:e,...r}),[()=>$l(`[&_tr]:border-b`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var kS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),AS=V(`<tr><!></tr>`);function jS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,kS);var i=AS();ya(i,e=>({"data-slot":`table-row`,class:e,...r}),[()=>$l(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50`,t.class)]),q(I(i),()=>t.children??w),k(i),Oa(i,e=>n(e),()=>n()),W(e,i),M()}var MS=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),NS=V(`<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>`);function PS(e,t){j(t,!0);let n=X(t,`ref`,15,null),r=Y(t,MS);var i=NS(),a=I(i);ya(a,e=>({"data-slot":`table`,class:e,...r}),[()=>$l(`w-full caption-bottom text-sm`,t.class)]),q(I(a),()=>t.children??w),k(a),Oa(a,e=>n(e),()=>n()),k(i),W(e,i),M()}var FS=V(`<p class="text-muted-foreground p-4 text-sm">正在读取运行状态…</p>`),IS=V(`<!> <!>`,1),LS=V(`<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),RS=V(`<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),zS=V(`<p class="text-muted-foreground text-sm">还没有任何会话。</p>`),BS=V(`<!> <!> <!> <!> <!> <!>`,1),VS=V(`<p class="text-muted-foreground text-sm">限流模块未启用或还没有记录。</p>`),HS=V(`<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>`),US=V(`<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),WS=V(`<span class="text-muted-foreground">-</span>`),GS=V(`<div class="flex items-center justify-between rounded border px-2 py-1"><span class="font-mono text-xs"> </span> <!></div>`),KS=V(`<div class="grid gap-1 sm:grid-cols-2"></div>`),qS=V(`<p class="text-muted-foreground text-xs">没有按聊天的策略覆盖。</p>`),JS=V(`<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),YS=V(`<div class="grid gap-4 lg:grid-cols-2"><!> <!> <!> <!> <!> <!></div> <p class="text-muted-foreground mt-2 text-xs"> </p>`,1);function XS(e,t){j(t,!0);function n(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}var r=U(),i=L(r),a=e=>{W(e,FS())},o=e=>{var r=YS(),i=L(r),a=I(i);J(a,()=>pS,(e,n)=>{n(e,{children:(e,n)=>{var r=IS(),i=L(r);J(i,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var n=IS(),r=L(n);J(r,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`连接`))},$$slots:{default:!0}})}),J(R(r,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`NapCat / NapLink WebSocket`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>tS,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=LS(),i=L(r),a=R(I(i),2);{let e=N(()=>t.status.connection.connected?`default`:`destructive`);nu(a,{get variant(){return B(e)},children:(e,n)=>{A();var r=H();z(()=>G(r,t.status.connection.connected?`已连接`:`未连接`)),W(e,r)},$$slots:{default:!0}})}k(i);var o=R(i,2),s=jn(R(I(o),2),!0);k(o);var c=R(o,2),l=jn(R(I(c),2),!0);k(c);var u=R(c,2),d=jn(R(I(u),2),!0);k(u),z((e,n)=>{G(s,t.status.connection.selfId??`-`),G(l,e),G(d,n)},[()=>zx(t.status.connection.reconnects),()=>Ix(t.status.connection.lastReconnectAt)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>pS,(e,n)=>{n(e,{children:(e,n)=>{var r=IS(),i=L(r);J(i,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var n=IS(),r=L(n);J(r,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`运行时`))},$$slots:{default:!0}})}),J(R(r,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`工作目录、模型与面板`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>tS,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=RS(),i=L(r),a=jn(R(I(i),2));k(i);var o=R(i,2),s=jn(R(I(o),2),!0);k(o);var c=R(o,2),l=jn(R(I(c),2),!0);k(c);var u=R(c,2),d=jn(R(I(u),2),!0);k(u);var f=R(u,2),p=jn(R(I(f),2),!0);k(f);var m=R(f,2),h=jn(R(I(m),2),!0);k(m);var g=R(m,2),_=jn(R(I(g),2));k(g),z(e=>{G(a,`v${t.status.version??``}`),G(s,e),G(l,t.status.runtime.home),G(d,t.status.runtime.logDir),G(p,t.status.runtime.agent??`-`),G(h,t.status.runtime.model??`跟随默认`),G(_,`${t.status.runtime.panel.enabled?`已启用`:`已关闭`}
14
- · ${t.status.runtime.panel.host??``}:${t.status.runtime.panel.port??``}`)},[()=>Rx(t.status.uptimeMs)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>pS,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=IS(),i=L(r);J(i,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var n=IS(),r=L(n);J(r,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`会话`))},$$slots:{default:!0}})}),J(R(r,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`每个聊天目标的上游会话与消息缓存`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>tS,(e,n)=>{n(e,{children:(e,n)=>{var r=U(),i=L(r),a=e=>{W(e,zS())},o=e=>{var n=U();J(L(n),()=>PS,(e,n)=>{n(e,{children:(e,n)=>{var r=IS(),i=L(r);J(i,()=>OS,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(L(n),()=>jS,(e,t)=>{t(e,{children:(e,t)=>{var n=BS(),r=L(n);J(r,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`目标`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`会话`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`状态`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`缓存`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`唤醒`))},$$slots:{default:!0}})}),J(R(s,2),()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`主动`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>yS,(e,n)=>{n(e,{children:(e,n)=>{var r=U();Ni(L(r),17,()=>t.status.sessions,e=>e.target,(e,t)=>{var n=U();J(L(n),()=>jS,(e,n)=>{n(e,{children:(e,n)=>{var r=BS(),i=L(r);J(i,()=>SS,(e,n)=>{n(e,{class:`font-mono`,children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).target)),W(e,r)},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>SS,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).sessionID??`-`)),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>SS,(e,n)=>{n(e,{children:(e,n)=>{var r=U(),i=L(r),a=e=>{nu(e,{children:(e,t)=>{A(),W(e,H(`处理中`))},$$slots:{default:!0}})},o=e=>{nu(e,{variant:`secondary`,children:(e,t)=>{A(),W(e,H(`等待重试`))},$$slots:{default:!0}})},s=e=>{nu(e,{variant:`outline`,children:(e,t)=>{A(),W(e,H(`空闲`))},$$slots:{default:!0}})};K(i,e=>{B(t).busy?e(a):B(t).pending?e(o,1):e(s,-1)}),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>SS,(e,n)=>{n(e,{children:(e,n)=>{A();var r=H();z(e=>G(r,e),[()=>zx(B(t).buffered)]),W(e,r)},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>SS,(e,n)=>{n(e,{children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).wake??`默认`)),W(e,r)},$$slots:{default:!0}})}),J(R(c,2),()=>SS,(e,n)=>{n(e,{children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).proactive===void 0?`默认`:B(t).proactive?`开`:`关`)),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)};K(i,e=>{t.status.sessions.length===0?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>pS,(e,r)=>{r(e,{children:(e,r)=>{var i=IS(),a=L(i);J(a,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var n=IS(),r=L(n);J(r,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`出站限流`))},$$slots:{default:!0}})}),J(R(r,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`按聊天目标统计的分钟与小时用量`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(a,2),()=>tS,(e,r)=>{r(e,{class:`space-y-3`,children:(e,r)=>{var i=U(),a=L(i),o=e=>{W(e,VS())},s=e=>{var r=U();Ni(L(r),17,()=>t.status.rateLimit,e=>e.scope,(e,t)=>{var r=HS(),i=I(r),a=I(i),o=jn(a,!0),s=jn(R(a,2));k(i);var c=R(i,2);{let e=N(()=>n(B(t).usedPerMinute,B(t).maxPerMinute));gS(c,{get value(){return B(e)}})}var l=R(c,2),u=I(l),d=jn(u),f=jn(R(u,2));k(l),k(r),z((e,n,r,i,a,c)=>{G(o,B(t).scope),G(s,`${e??``}/${n??``} 每分钟 ·
15
- ${r??``}/${i??``} 每小时`),G(d,`分钟剩余 ${a??``}`),G(f,`小时剩余 ${c??``}`)},[()=>zx(B(t).usedPerMinute),()=>Bx(B(t).maxPerMinute),()=>zx(B(t).usedPerHour),()=>Bx(B(t).maxPerHour),()=>Bx(B(t).minuteLeft),()=>Bx(B(t).hourLeft)]),W(e,r)}),W(e,r)};K(a,e=>{t.status.rateLimit.length===0?e(o):e(s,-1)}),W(e,i)},$$slots:{default:!0}})}),W(e,i)},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>pS,(e,n)=>{n(e,{children:(e,n)=>{var r=IS(),i=L(r);J(i,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var n=IS(),r=L(n);J(r,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`日记调度`))},$$slots:{default:!0}})}),J(R(r,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`每日总结的生成时间与结果`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>tS,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=US(),i=L(r),a=R(I(i),2);{let e=N(()=>t.status.diary.enabled?`default`:`outline`);nu(a,{get variant(){return B(e)},children:(e,n)=>{A();var r=H();z(()=>G(r,t.status.diary.enabled?`已启用`:`已关闭`)),W(e,r)},$$slots:{default:!0}})}k(i);var o=R(i,2),s=jn(R(I(o),2),!0);k(o);var c=R(o,2),l=jn(R(I(c),2),!0);k(c);var u=R(c,2),d=jn(R(I(u),2),!0);k(u);var f=R(u,2),p=jn(R(I(f),2),!0);k(f);var m=R(f,2),h=jn(R(I(m),2),!0);k(m),z((e,n,r)=>{G(s,t.status.diary.summaryTime),G(l,e),G(d,n),G(p,r),G(h,t.status.diary.lastResult??`-`)},[()=>Ix(t.status.diary.nextSummaryAt),()=>Ix(t.status.diary.nextRunAt),()=>Ix(t.status.diary.lastRunAt)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),J(R(l,2),()=>pS,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=IS(),i=L(r);J(i,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var n=IS(),r=L(n);J(r,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`工具策略`))},$$slots:{default:!0}})}),J(R(r,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`默认配置档与按聊天的覆盖`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>tS,(e,n)=>{n(e,{class:`space-y-3 text-sm`,children:(e,n)=>{var r=JS(),i=L(r),a=R(I(i),2);nu(a,{variant:`secondary`,children:(e,n)=>{A();var r=H();z(()=>G(r,t.status.policy.defaultProfile)),W(e,r)},$$slots:{default:!0}}),Ni(R(a,4),16,()=>t.status.policy.profiles,e=>e,(e,t)=>{nu(e,{variant:`outline`,children:(e,n)=>{A();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})},e=>{W(e,WS())}),k(i);var o=R(i,2),s=e=>{var n=KS();Ni(n,21,()=>Object.entries(t.status.policy.chats),([e,t])=>e,(e,t)=>{var n=N(()=>re(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=GS(),o=I(a),s=jn(o,!0);nu(R(o,2),{variant:`outline`,children:(e,t)=>{A();var n=H();z(()=>G(n,i())),W(e,n)},$$slots:{default:!0}}),k(a),z(()=>G(s,r())),W(e,a)}),k(n),W(e,n)},c=N(()=>Object.keys(t.status.policy.chats).length>0),l=e=>{W(e,qS())};K(o,e=>{B(c)?e(s):e(l,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),k(i);var u=jn(R(i,2));z((e,t)=>G(u,`启动于 ${e??``} · 快照时间 ${t??``}`),[()=>Lx(t.status.startedAt),()=>Lx(Date.now())]),W(e,r)};K(i,e=>{t.status?e(o,-1):e(a)}),W(e,r),M()}var ZS=V(`<p class="text-muted-foreground p-4 text-sm">正在读取追踪数据…</p>`),QS=V(`<!> <!>`,1),$S=V(`<p class="text-muted-foreground text-sm">还没有追踪节点。</p>`),eC=V(`<!> <!> <!> <!> <!>`,1),tC=V(`<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>`),nC=V(`<span class="text-muted-foreground text-xs">-</span>`);function rC(e,t){j(t,!0);let n=N(()=>[...t.status?.traces??[]].reverse());var r=U(),i=L(r),a=e=>{W(e,ZS())},o=e=>{var t=U();J(L(t),()=>pS,(e,t)=>{t(e,{children:(e,t)=>{var r=QS(),i=L(r);J(i,()=>sS,(e,t)=>{t(e,{children:(e,t)=>{var r=QS(),i=L(r);J(i,()=>uS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`调用追踪`))},$$slots:{default:!0}})}),J(R(i,2),()=>iS,(e,t)=>{t(e,{children:(e,t)=>{A();var r=H();z(()=>G(r,`最近 ${B(n).length??``} 个节点;完整调用链在 trace 目录里,这里只展示运行中的摘要。`)),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),J(R(i,2),()=>tS,(e,t)=>{t(e,{children:(e,t)=>{var r=U(),i=L(r),a=e=>{W(e,$S())},o=e=>{var t=U();J(L(t),()=>PS,(e,t)=>{t(e,{children:(e,t)=>{var r=QS(),i=L(r);J(i,()=>OS,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(L(n),()=>jS,(e,t)=>{t(e,{children:(e,t)=>{var n=eC(),r=L(n);J(r,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`时间`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`节点`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`目标`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`trace`))},$$slots:{default:!0}})}),J(R(o,2),()=>TS,(e,t)=>{t(e,{children:(e,t)=>{A(),W(e,H(`属性`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>yS,(e,t)=>{t(e,{children:(e,t)=>{var r=U();Ni(L(r),17,()=>B(n),e=>e.spanId,(e,t)=>{var n=U();J(L(n),()=>jS,(e,n)=>{n(e,{children:(e,n)=>{var r=eC(),i=L(r);J(i,()=>SS,(e,n)=>{n(e,{class:`whitespace-nowrap font-mono text-xs`,children:(e,n)=>{A();var r=H();z(e=>G(r,e),[()=>Lx(B(t).at)]),W(e,r)},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>SS,(e,n)=>{n(e,{children:(e,n)=>{nu(e,{variant:`outline`,children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).name)),W(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>SS,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=H();z(()=>G(r,B(t).target??`-`)),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>SS,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{A();var r=H();z(e=>G(r,e),[()=>B(t).traceId.slice(0,8)]),W(e,r)},$$slots:{default:!0}})}),J(R(s,2),()=>SS,(e,n)=>{n(e,{class:`max-w-72`,children:(e,n)=>{var r=U(),i=L(r),a=e=>{var n=tC(),r=I(n),i=jn(r),a=jn(R(r,2),!0);k(n),z((e,t)=>{G(i,`${e??``} 项`),G(a,t)},[()=>Object.keys(B(t).attributes).length,()=>Vx(B(t).attributes)]),W(e,n)},o=N(()=>B(t).attributes&&Object.keys(B(t).attributes).length>0),s=e=>{W(e,nC())};K(i,e=>{B(o)?e(a):e(s,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,t)};K(i,e=>{B(n).length===0?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,t)};K(i,e=>{t.status?e(o,-1):e(a)}),W(e,r),M()}var iC=V(`<!> 刷新`,1),aC=V(`<!> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!></div>`,1),oC=V(`<p class="text-destructive text-sm"> </p>`),sC=V(`<!> 登录`,1),cC=V(`<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>`),lC=V(`<!> <!> <!> <!>`,1),uC=V(`<!> <!> <!> <!> <!>`,1),dC=V(`<span>·</span> <span> </span>`,1),fC=V(`<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 pC(e,t){j(t,!0);let n=P(``),r=P(!1),i=P(``),a=P(!1),o=P(`config`),s=P(void 0),c=P(bn([])),l=P(void 0),u,d=P(!1);new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`});let f=new Intl.NumberFormat(`zh-CN`);Ra(()=>(p(),()=>u?.()));async function p(){try{F(s,await ro.status(),!0),F(r,!0),F(i,``),m()}catch(e){if(e instanceof to&&e.status===401){F(r,!1);return}F(i,e instanceof Error?e.message:String(e),!0)}}function m(){u?.(),u=io({status:e=>{F(s,e,!0)},log:e=>{F(c,[...B(c),e].slice(-500),!0)},config:e=>{F(l,e,!0)}})}async function h(){F(a,!0),F(i,``);try{await ro.login(B(n)),F(n,``),await p()}catch(e){F(i,e instanceof Error?e.message:String(e),!0)}finally{F(a,!1)}}function g(){F(d,!0)}var _=fC(),v=I(_),y=R(I(v),2),b=e=>{var t=aC(),n=L(t);{let e=N(()=>B(s).connection.connected?`default`:`destructive`);nu(n,{get variant(){return B(e)},children:(e,t)=>{A();var n=H();z(()=>G(n,B(s).connection.connected?`已连接`:`未连接`)),W(e,n)},$$slots:{default:!0}})}var r=R(n,2),i=jn(r),a=R(r,2),o=I(a),c=e=>{nu(e,{variant:`outline`,children:(e,t)=>{A(),W(e,H(`有字段需要重启生效`))},$$slots:{default:!0}})};K(o,e=>{B(d)&&e(c)}),su(R(o,2),{variant:`ghost`,size:`sm`,onclick:()=>void p(),children:(e,t)=>{var n=iC();Xa(L(n),{class:`size-4`}),A(),W(e,n)},$$slots:{default:!0}}),k(a),z(e=>G(i,`v${B(s).version??``} · 运行 ${e??``} 秒`),[()=>Math.floor(B(s).uptimeMs/1e3)]),W(e,t)};K(y,e=>{B(s)&&e(b)}),k(v);var x=R(v,2);Bv(x,{});var S=R(x,2),C=e=>{var t=cC(),r=R(I(t),4);Rv(r,{for:`token`,children:(e,t)=>{A(),W(e,H(`令牌`))},$$slots:{default:!0}});var o=R(r,2);uu(o,{id:`token`,type:`password`,placeholder:`面板访问令牌`,onkeydown:e=>{e.key===`Enter`&&h()},get value(){return B(n)},set value(e){F(n,e,!0)}});var s=R(o,2),c=e=>{var t=oC(),n=jn(t,!0);z(()=>G(n,B(i))),W(e,t)};K(s,e=>{B(i)&&e(c)});var l=R(s,2);{let e=N(()=>B(a)||!B(n));su(l,{class:`w-full`,get disabled(){return B(e)},onclick:()=>void h(),children:(e,t)=>{var n=sC();qa(L(n),{class:`size-4`}),A(),W(e,n)},$$slots:{default:!0}})}k(t),W(e,t)},w=e=>{var t=U();J(L(t),()=>Kv,(e,t)=>{t(e,{class:`flex-1`,get value(){return B(o)},set value(e){F(o,e,!0)},children:(e,t)=>{var n=uC(),r=L(n);J(r,()=>Yv,(e,t)=>{t(e,{children:(e,t)=>{var n=lC(),r=L(n);J(r,()=>Wv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{A(),W(e,H(`配置`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Wv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{A(),W(e,H(`状态`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Wv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{A(),W(e,H(`日志`))},$$slots:{default:!0}})}),J(R(a,2),()=>Wv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{A(),W(e,H(`追踪`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Hv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{Mx(e,{get config(){return B(l)},onrestart:g})},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Hv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{XS(e,{get status(){return B(s)}})},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Hv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{Qx(e,{get logs(){return B(c)}})},$$slots:{default:!0}})}),J(R(o,2),()=>Hv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{rC(e,{get status(){return B(s)}})},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(S,e=>{B(r)?e(w,-1):e(C)});var ee=R(S,2),T=I(ee);Ga(T,{class:`size-3`});var te=R(T,2),ne=jn(te),re=R(te,4),ie=jn(re),ae=R(re,2),E=e=>{var t=dC(),n=jn(R(L(t),2));z(()=>G(n,`agent ${B(s).runtime.agent??``}`)),W(e,t)};K(ae,e=>{B(s)?.runtime.agent&&e(E)});var oe=jn(R(ae,4));k(ee),k(_),z(e=>{G(ne,`工作目录 ${B(s)?.runtime.home??`-`??``}`),G(ie,`日志 ${B(s)?.runtime.logDir??`-`??``}`),G(oe,`${e??``} 个会话`)},[()=>f.format(B(s)?.sessions.length??0)]),W(e,_),M()}var mC=document.getElementById(`app`);if(!mC)throw Error(`缺少 #app 挂载点`);xi(pC,{target:mC});