live-sfu-demo/internal/server/static/assets/ui-BEZm0Fjb.js

1 line
72 KiB
JavaScript

var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}var r=(e,t)=>e===t,i=Symbol(`solid-proxy`),a=typeof Proxy==`function`,o=Symbol(`solid-track`),s={equals:r},c=null,l=Ce,u=1,d=2,f={owned:null,cleanups:null,context:null,owner:null},p={},m=null,h=null,g=null,_=null,v=null,y=0;function b(e,t){let n=g,r=m,i=e.length===0,a=t===void 0?r:t,o=i?f:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>T(()=>A(o)));m=o,g=null;try{return k(s,!0)}finally{g=n,m=r}}function x(e,t){t=t?Object.assign({},s,t):s;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ge.bind(n),e=>(typeof e==`function`&&(e=h&&h.running&&h.sources.has(n)?e(n.tValue):e(n.value)),_e(n,e))]}function ee(e,t,n){ve(be(e,t,!0,u))}function S(e,t,n){ve(be(e,t,!1,u))}function C(e,t,n){l=we;let r=be(e,t,!1,u),i=me&&fe(me);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),v?v.push(r):ve(r)}function w(e,t,n){n=n?Object.assign({},s,n):s;let r=be(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ve(r),ge.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function ne(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=p,l=null,u=!1,d=!1,f=`initialValue`in o,_=typeof i==`function`&&w(i),v=new Set,[y,b]=(o.storage||x)(o.initialValue),[S,C]=x(void 0),[ne,re]=x(void 0,{equals:!1}),[ie,E]=x(f?`ready`:`unresolved`);m&&D(()=>{for(let e of v.keys())e.decrement();v.clear(),h&&s&&h.promises.delete(s),s=null}),e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function O(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=p,h&&e&&u?(h.promises.delete(e),u=!1,k(()=>{h.running=!0,ae(t,n)},!1)):ae(t,n)),t}function ae(e,t){k(()=>{t===void 0&&b(()=>e),E(t===void 0?f?`ready`:`unresolved`:`errored`),C(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function se(){let e=me&&fe(me),t=y(),n=S();if(n!==void 0&&!s)throw n;return g&&!g.user&&e&&ee(()=>{ne(),s&&(e.resolved&&h&&u?h.promises.add(s):v.has(e)||(e.increment(),v.add(e)))}),t}function ce(e=!0){if(e!==!1&&d)return;d=!1;let t=_?_():i;if(u=h&&h.running,t==null||t===!1){O(s,T(y));return}h&&s&&h.promises.delete(s);let n,r=c===p?T(()=>{try{return a(t,{value:y(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){O(s,void 0,Oe(n),t);return}return te(r)?(s=r,`v`in r?(r.s===1?O(s,r.v,void 0,t):O(s,void 0,Oe(r.v),t),r):(d=!0,queueMicrotask(()=>d=!1),k(()=>{E(f?`refreshing`:`pending`),re()},!1),r.then(e=>O(r,e,void 0,t),e=>O(r,void 0,Oe(e),t)))):(O(s,r,void 0,t),r)}Object.defineProperties(se,{state:{get:()=>ie()},error:{get:()=>S()},loading:{get(){let e=ie();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return se();let e=S();if(e&&!s)throw e;return y()}}});let le=m;return _?ee(()=>(le=m,ce(!1))):ce(!1),[se,{refetch:e=>oe(le,()=>ce(e)),mutate:b}]}function re(e){return k(e,!1)}function T(e){if(g===null)return e();let t=g;g=null;try{return e()}finally{g=t}}function ie(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=T(()=>t(o,i,n));return i=o,s}}function E(e){C(()=>T(e))}function D(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function O(e,t){c||=Symbol(`error`),m=be(void 0,void 0,!0),m.context={...m.context,[c]:[t]},h&&h.running&&h.sources.add(m);try{return e()}catch(e){Ae(e)}finally{m=m.owner}}function ae(){return m}function oe(e,t){let n=m,r=g;m=e,g=null;try{return k(t,!0)}catch(e){Ae(e)}finally{m=n,g=r}}function se(e){if(h&&h.running)return e(),h.done;let t=g,n=m;return Promise.resolve().then(()=>{g=t,m=n;let r;return me&&(r=h||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||(r.done=new Promise(e=>r.resolve=e)),r.running=!0),k(e,!1),g=m=null,r?r.done:void 0})}var[ce,le]=x(!1);function ue(e){v.push.apply(v,e),e.length=0}function de(e,t){let n=Symbol(`context`);return{id:n,Provider:Me(n),defaultValue:e}}function fe(e){let t;return m&&m.context&&(t=m.context[e.id])!==void 0?t:e.defaultValue}function pe(e){let t=w(e),n=w(()=>je(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var me;function he(){return me||=de()}function ge(){let e=h&&h.running;if(this.sources&&(e?this.tState:this.state)){if((e?this.tState:this.state)===u)ve(this);else{let e=_;_=null,k(()=>Te(this),!1),_=e}}if(g){let e=this.observers;if(!e||e[e.length-1]!==g){let t=e?e.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(t)):(g.sources=[this],g.sourceSlots=[t]),e?(e.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}}return e&&h.sources.has(this)?this.tValue:this.value}function _e(e,t,n){let r=h&&h.running&&h.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(h){let r=h.running;(r||!n&&h.sources.has(e))&&(h.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&k(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=h&&h.running;r&&h.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?_.push(n):v.push(n),n.observers&&Ee(n)),r?n.tState=u:n.state=u)}if(_.length>1e6)throw _=[],Error()},!1)}return t}function ve(e){if(!e.fn)return;A(e);let t=y;ye(e,h&&h.running&&h.sources.has(e)?e.tValue:e.value,t),h&&!h.running&&h.sources.has(e)&&queueMicrotask(()=>{k(()=>{h&&(h.running=!0),g=m=e,ye(e,e.tValue,t),g=m=null},!1)})}function ye(e,t,n){let r,i=m,a=g;g=m=e;try{r=e.fn(t)}catch(t){return e.pure&&(h&&h.running?(e.tState=u,e.tOwned&&e.tOwned.forEach(A),e.tOwned=void 0):(e.state=u,e.owned&&e.owned.forEach(A),e.owned=null)),e.updatedAt=n+1,Ae(t)}finally{g=a,m=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?_e(e,r,!0):h&&h.running&&e.pure?(h.sources.has(e)||(e.value=r),h.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function be(e,t,n,r=u,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:n};return h&&h.running&&(a.state=0,a.tState=r),m===null||m!==f&&(h&&h.running&&m.pure?m.tOwned?m.tOwned.push(a):m.tOwned=[a]:m.owned?m.owned.push(a):m.owned=[a]),a}function xe(e){let t=h&&h.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===d)return Te(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<y);){if(t&&h.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(h.disposed.has(t))return}if((t?e.tState:e.state)===u)ve(e);else if((t?e.tState:e.state)===d){let t=_;_=null,k(()=>Te(e,n[0]),!1),_=t}}}function k(e,t){if(_)return e();let n=!1;t||(_=[]),v?n=!0:v=[],y++;try{let t=e();return Se(n),t}catch(e){n||(v=null),_=null,Ae(e)}}function Se(e){if(_&&=(Ce(_),null),e)return;let t;if(h){if(!h.promises.size&&!h.queue.size){let e=h.sources,n=h.disposed;v.push.apply(v,h.effects),t=h.resolve;for(let e of v)`tState`in e&&(e.state=e.tState),delete e.tState;h=null,k(()=>{for(let e of n)A(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)A(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}le(!1)},!1)}else if(h.running){h.running=!1,h.effects.push.apply(h.effects,v),v=null,le(!0);return}}let n=v;v=null,n.length&&k(()=>l(n),!1),t&&t()}function Ce(e){for(let t=0;t<e.length;t++)xe(e[t])}function we(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:xe(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)xe(t[r])}function Te(e,t){let n=h&&h.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===u?i!==t&&(!i.updatedAt||i.updatedAt<y)&&xe(i):e===d&&Te(i,t)}}}function Ee(e){let t=h&&h.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=d:r.state=d,r.pure?_.push(r):v.push(r),r.observers&&Ee(r))}}function A(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)A(e.tOwned[t]);delete e.tOwned}if(h&&h.running&&e.pure)De(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)A(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}h&&h.running?e.tState=0:e.state=0}function De(e,t){if(t||(e.tState=0,h.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)De(e.owned[t])}function Oe(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function ke(e,t,n){try{for(let n of t)n(e)}catch(e){Ae(e,n&&n.owner||null)}}function Ae(e,t=m){let n=c&&t&&t.context&&t.context[c],r=Oe(e);if(!n)throw r;v?v.push({fn(){ke(r,n,t)},state:u}):ke(r,n,t)}function je(e){if(typeof e==`function`&&!e.length)return je(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=je(e[n]);if(Array.isArray(r)){if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e])}else t.push(r)}return t}return e}function Me(e,t){return function(t){let n;return S(()=>n=T(()=>(m.context={...m.context,[e]:t.value},pe(()=>t.children))),void 0),n}}var Ne=Symbol(`fallback`);function Pe(e){for(let t=0;t<e.length;t++)e[t]()}function Fe(e,t,n={}){let r=[],i=[],a=[],s=0,c=t.length>1?[]:null;return D(()=>Pe(a)),()=>{let l=e()||[],u=l.length,d,f;return l[o],T(()=>{let e,t,o,m,h,g,_,v,y;if(u===0)s!==0&&(Pe(a),a=[],r=[],i=[],s=0,c&&=[]),n.fallback&&(r=[Ne],i[0]=b(e=>(a[0]=e,n.fallback())),s=1);else if(s===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=b(p);s=u}else{for(o=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(s,u);g<_&&r[g]===l[g];g++);for(_=s-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)o[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(o[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in o?(i[f]=o[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=b(p);i=i.slice(0,s=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=x(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}function j(e,t){return T(()=>e(t||{}))}function Ie(){return!0}var Le={get(e,t,n){return t===i?n:e.get(t)},has(e,t){return t===i||e.has(t)},set:Ie,deleteProperty:Ie,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ie,deleteProperty:Ie}},ownKeys(e){return e.keys()}};function Re(e){return(e=typeof e==`function`?e():e)?e:{}}function ze(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function M(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&i in r,e[n]=typeof r==`function`?(t=!0,w(r)):r}if(a&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=Re(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Re(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Re(e[n])));return[...new Set(t)]}},Le);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:ze.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let o={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(o,t,n):o[t]=n?n.value:void 0}return o}function N(e,...t){let n=t.length;if(a&&i in e){let r=n>1?t.flat():t[0],i=new Set,a=t.map(t=>{let n=t.filter(e=>!i.has(e)&&(i.add(e),!0));return new Proxy({get(t){return n.includes(t)?e[t]:void 0},has(t){return n.includes(t)&&t in e},keys(){return n.filter(t=>t in e)}},Le)});return a.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Le)),a}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function Be(t){let r,i,a=()=>{if(!i){let e=i=t();e.then(e=>{r=()=>e.default},()=>{i===e&&(i=void 0)})}return i},o=t=>{let i=e.context;if(i){let[t,o]=x();e.count||=0,e.count++,a().then(t=>{!e.done&&n(i),e.count--,o(()=>t.default),n()},t=>{!e.done&&n(i),e.count--,o(()=>()=>{throw t}),n()}),r=t}else if(!r){let[e]=ne(()=>a().then(e=>e.default));r=e,D(()=>r=void 0)}let o;return w(()=>(o=r?.())?T(()=>{if(!i||e.done)return o(t);let r=e.context;n(i);let a=o(t);return n(r),a}):``)};return o.preload=()=>a(),o}var Ve=0;function He(){return e.context?e.getNextContextId():`cl-${Ve++}`}var Ue=e=>`Stale read from <${e}>.`;function We(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return w(Fe(()=>e.each,e.children,t||void 0))}function P(e){let t=e.keyed,n=w(()=>e.when,void 0,void 0),r=t?n:w(n,void 0,{equals:(e,t)=>!e==!t});return w(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?T(()=>a(t?i:()=>{if(!T(r))throw Ue(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Ge(e){let t=pe(()=>e.children),n=w(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=w(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:w(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return w(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?T(()=>o(a.keyed?i():()=>{if(T(n)()?.[0]!==r)throw Ue(`Match`);return i()})):o},void 0,void 0)}function Ke(e){return e}var qe;function Je(t){let n;e.context&&e.load&&(n=e.load(e.getContextId()));let[r,i]=x(n,void 0);return qe||=new Set,qe.add(i),D(()=>qe.delete(i)),w(()=>{let e;if(e=r()){let n=t.fallback;return typeof n==`function`&&n.length?T(()=>n(e,()=>i())):n}return O(()=>t.children,i)},void 0,void 0)}var Ye=de();function Xe(t){let r=0,i,a,o,s,c,[l,u]=x(!1),d=he(),f={increment:()=>{++r===1&&u(!0)},decrement:()=>{--r===0&&u(!1)},inFallback:l,effects:[],resolved:!1},p=ae();if(e.context&&e.load){let t=e.getContextId(),r=e.load(t);if(r&&(typeof r!=`object`||r.s!==1?o=r:e.gather(t)),o&&o!==`$$f`){let[r,i]=x(void 0,{equals:!1});s=r,o.then(()=>{if(e.done)return i();e.gather(t),n(a),i(),n()},e=>{c=e,i()})}}let m=fe(Ye);m&&(i=m.register(f.inFallback));let h;return D(()=>h&&h()),j(d.Provider,{value:f,get children(){return w(()=>{if(c)throw c;if(a=e.context,s){s(),s=void 0;return}a&&o===`$$f`&&n();let r=w(()=>t.children);return w(e=>{let s=f.inFallback(),{showContent:c=!0,showFallback:l=!0}=i?i():{};if((!s||o&&o!==`$$f`)&&c)return f.resolved=!0,h&&h(),h=a=o=void 0,ue(f.effects),r();if(l)return h?e:b(e=>(h=e,a&&=(n({id:a.id+`F`,count:0}),void 0),t.fallback),p)})})}})}var Ze=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Qe=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),$e=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),et=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function tt(e,t){let n=et[e];return typeof n==`object`?n[t]?n.$:void 0:n}var nt=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),rt=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),it={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},at=e=>w(()=>e());function ot(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null){if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&(d=l.get(t[c]))!=null&&d===r+u;)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++}else t[o++].remove()}}}var st=`_$DX_DELEGATE`;function ct(e,t,n,r={}){let i;return b(r=>{i=r,t===document?e():R(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function F(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>T(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function lt(e,t=window.document){let n=t[st]||(t[st]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Ct))}}function I(e,t,n){z(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ut(e,t,n,r){z(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function dt(e,t,n){z(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function L(e,t){z(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function ft(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function pt(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(xt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(xt(e,i,!0),n[i]=o)}return n}function mt(e,t,n){if(!t)return n?I(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function ht(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function gt(e,t={},n,r){let i={};return r||S(()=>i.children=wt(e,t.children,i.children)),S(()=>typeof t.ref==`function`&&_t(t.ref,e)),S(()=>vt(e,t,n,!0,i,!0)),i}function _t(e,t,n){return T(()=>e(t,n))}function R(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return wt(e,t,r,n);S(r=>wt(e,t(),r,n),r)}function vt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=St(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||wt(e,t.children);continue}let s=t[o];i[o]=St(e,o,s,i[o],n,a,t)}}function yt(t){let n,r;return!z()||!(n=e.registry.get(r=Ot()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function z(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function bt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function xt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function St(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return mt(e,n,r);if(t===`classList`)return pt(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=nt.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(ft(e,i,n,a),a&&lt([i]))}else if(t.slice(0,5)===`attr:`)I(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)dt(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Qe.has(t))||!i&&((u=tt(t,e.tagName))||(c=Ze.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(z(e))return n;t===`class`||t===`className`?L(e,n):s&&!c&&!l?e[bt(t)]=n:(t===`value`||t===`defaultValue`)&&(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`)?e[u||t]=n??``:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&it[t.split(`:`)[0]];r?ut(e,r,t,n):I(e,$e[t]||t,n)}return n}function Ct(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function wt(e,t,n,r,i){let a=z(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Dt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Dt(e,n,r)}else if(o===`function`)return S(()=>{let i=t();for(;typeof i==`function`;)i=i();n=wt(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Tt(o,t,n,i))return S(()=>n=wt(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Dt(e,n,r),s)return n}else c?n.length===0?Et(e,o,r):ot(e,n,o):(n&&Dt(e),Et(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Dt(e,n,r,t);Dt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Tt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(o!=null&&o!==!0&&o!==!1){if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Tt(e,o,s)||i;else if(c===`function`){if(r){for(;typeof o==`function`;)o=o();i=Tt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0}else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}}return i}function Et(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Dt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function Ot(){return e.getNextContextId()}var kt=`http://www.w3.org/2000/svg`;function At(e,t=!1,n=void 0){return t?document.createElementNS(kt,e):document.createElement(e,{is:n})}function jt(t,n){let r=w(t);return w(()=>{let t=r();switch(typeof t){case`function`:return T(()=>t(n));case`string`:let r=rt.has(t),i=e.context?yt():At(t,r,T(()=>n.is));return gt(i,n,r),i}})}function Mt(e){let[,t]=N(e,[`component`]);return jt(()=>e.component,t)}var Nt=`live-sfu-theme`,[Pt,Ft]=x(`light`);function It(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Lt(e){let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.style.colorScheme=e;try{localStorage.setItem(Nt,e)}catch{}Ft(e)}function Rt(){let e=`light`;try{let t=localStorage.getItem(Nt);e=t===`light`||t===`dark`?t:It()}catch{e=It()}Lt(e)}function zt(){Lt(Pt()===`dark`?`light`:`dark`)}var Bt=``;async function B(e,t,n){let r=await fetch(Bt+t,{method:e,credentials:`same-origin`,headers:n?{"Content-Type":`application/json`}:void 0,body:n?JSON.stringify(n):void 0});if(!r.ok){let e=await r.text().catch(()=>``);throw Error(e||r.statusText||String(r.status))}if(r.status!==204)return await r.json()}var Vt={getConfig:()=>B(`GET`,`/api/config`),listRooms:()=>B(`GET`,`/api/rooms`),publish:(e,t,n=``)=>B(`POST`,`/api/publish`,{room:e,backend:t,identity:n}),subscribe:(e,t,n=``)=>B(`POST`,`/api/subscribe`,{room:e,backend:t,identity:n}),stop:(e,t)=>B(`POST`,`/api/stop`,{room:e,backend:t}),login:(e,t)=>B(`POST`,`/api/auth/login`,{username:e,password:t}),register:(e,t,n)=>B(`POST`,`/api/auth/register`,{username:e,password:t,role:n}),me:()=>B(`GET`,`/api/auth/me`),srsStreams:()=>B(`GET`,`/api/srs/streams`),authCheck:()=>B(`GET`,`/api/auth/check`),listUsers:()=>B(`GET`,`/api/auth/users`),updateUserRole:(e,t)=>B(`POST`,`/api/auth/users/role`,{username:e,role:t}),createRoom:e=>B(`POST`,`/api/rooms`,{name:e})},[Ht,Ut]=x(null),Wt={user:Ht,setUser:Ut,isAuthed:()=>Ht()!=null};async function Gt(){try{Ut(await Vt.me())}catch{Ut(null)}}var[Kt,qt]=x(null),Jt={check:Kt,setCheck:qt,refresh:async()=>{try{qt(await Vt.authCheck())}catch{qt(null)}},can:e=>!!Kt()?.permissions?.[e],role:()=>Kt()?.role??Wt.user()?.role??`guest`,isAuthed:()=>!!Wt.user()||!!Kt()?.authenticated},Yt={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`},Xt=de({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),Zt=F(`<svg>`),Qt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},$t=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),en=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),tn=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),nn=e=>{let t=en(e);return t.charAt(0).toUpperCase()+t.slice(1)},V=e=>{let[t,n]=N(e,[`color`,`size`,`strokeWidth`,`children`,`class`,`name`,`iconNode`,`absoluteStrokeWidth`]),r=fe(Xt);return(()=>{var e=Zt();return gt(e,M(Yt,{get width(){return t.size??r.size??Yt.width},get height(){return t.size??r.size??Yt.height},get stroke(){return t.color??r.color??Yt.stroke},get"stroke-width"(){return at(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??Yt[`stroke-width`])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??Yt[`stroke-width`])},get class(){return $t(`lucide`,`lucide-icon`,r.class,...t.name==null?[]:[`lucide-${tn(nn(t.name))}`,`lucide-${tn(t.name)}`],t.class)},get"aria-hidden"(){return!t.children&&!Qt(n)?`true`:void 0}},n),!0,!0),R(e,j(We,{get each(){return t.iconNode},children:([e,t])=>j(Mt,M({component:e},t))})),e})()},rn=[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]],an=e=>j(V,M(e,{iconNode:rn,name:`check`})),on=[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]],sn=e=>j(V,M(e,{iconNode:on,name:`chevron-down`})),cn=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],ln=e=>j(V,M(e,{iconNode:cn,name:`circle-alert`})),un=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]],dn=e=>j(V,M(e,{iconNode:un,name:`circle-check`})),fn=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]],pn=e=>j(V,M(e,{iconNode:fn,name:`info`})),mn=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]],hn=e=>j(V,M(e,{iconNode:mn,name:`moon`})),gn=[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]],_n=e=>j(V,M(e,{iconNode:gn,name:`sun`})),vn=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],yn=e=>j(V,M(e,{iconNode:vn,name:`triangle-alert`})),bn=e=>typeof e==`function`,xn=(e,t)=>{for(let n of e)bn(n)&&n(t)};function Sn(...e){let t=null;return C(()=>{xn(e,t)}),n=>{t=n,xn(e,n)}}var H=()=>(e,t)=>N(e,t),U=(e,t=[])=>({parts:(...n)=>{if(wn(t))return U(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>U(e,[...t,...n]),omit:(...n)=>U(e,t.filter(e=>!n.includes(e))),rename:e=>U(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${Cn(e)}"][data-part="${Cn(n)}"]`,`& [data-scope="${Cn(e)}"][data-part="${Cn(n)}"]`].join(`, `),attrs:{"data-scope":Cn(e),"data-part":Cn(n)}}}),{})}),Cn=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),wn=e=>e.length===0,Tn=U(`fieldset`).parts(`root`,`errorText`,`helperText`,`legend`).build();function En(e){return e==null?[]:Array.isArray(e)?e:[e]}var Dn=e=>e?.constructor.name===`Array`,On=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!kn(e[n],t[n]))return!1;return!0},kn=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(Dn(e)&&Dn(t))return On(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!kn(e[r],t[r]))return!1}return!0},An=e=>Array.isArray(e),jn=e=>typeof e==`object`&&!!e,Mn=e=>jn(e)&&!An(e),Nn=e=>typeof e==`number`&&!Number.isNaN(e),Pn=e=>typeof e==`string`,W=e=>typeof e==`function`,Fn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),In=e=>Object.prototype.toString.call(e),Ln=Function.prototype.toString,Rn=Ln.call(Object),zn=e=>{if(!jn(e)||In(e)!=`[object Object]`||Hn(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Fn(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ln.call(n)==Rn},Bn=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,Vn=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,Hn=e=>Bn(e)||Vn(e),Un=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})};function Wn(e){if(!zn(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=Wn(t))}return n}function Gn(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function Kn(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function qn(e,t){if(e==null)throw Error(t())}var Jn=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),Yn=(...e)=>Array.from(new Set(Jn(...e).split(/\s+/).filter(Boolean))).join(` `),Xn=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Zn=e=>{let t={},n;for(;n=Xn.exec(e);)t[n[1]]=n[2];return t},Qn=(e,t)=>{if(Pn(e)){if(Pn(t))return`${e};${t}`;e=Zn(e)}else Pn(t)&&(t=Zn(t));return Object.assign({},e??{},t??{})};function $n(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=Un(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=Jn(t[e],n[e]);continue}if(e===`style`){t[e]=Qn(t[e],n[e]);continue}if(e===`data-ownedby`){t[e]=Yn(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}var G=`.`,er=`#`,tr=new WeakMap,nr=new WeakMap;function rr(e){return e.join(G)}function ir(e){return e.includes(G)}function ar(e){return e.startsWith(er)}function or(e){return e.startsWith(G)}function sr(e){return ar(e)?e.slice(er.length):e}function cr(e,t){return e?`${e}${G}${t}`:t}function lr(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&Kn(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){qn(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||Kn(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o)){if(!n)continue;let i=cr(e,t);r(i,n)}}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function ur(e){let t=tr.get(e);if(t)return t;let{index:n,idIndex:r}=lr(e);return tr.set(e,n),nr.set(e,r),n}function dr(e,t){return ur(e),nr.get(e)?.get(t)}function fr(e){return e?String(e).split(G).filter(Boolean):[]}function pr(e,t){if(!t)return[];let n=ur(e),r=fr(t),i=[],a=[];for(let e of r){a.push(e);let t=rr(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function mr(e,t){let n=ur(e),r=fr(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=rr(i);if(!n.has(r))return t}let a=rr(i),o=n.get(a);for(;o?.initial;){let e=`${a}${G}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function hr(e,t){return ur(e).has(t)}function gr(e,t,n){let r=String(t);if(ar(r)){let t=sr(r),n=dr(e,t);return qn(n,()=>`[zag-js] Unknown state id: "${t}"`),mr(e,n)}if(or(r)&&n)return mr(e,cr(n,r.slice(1)));if(!ir(r)&&n){let t=fr(n);for(let n=t.length-1;n>=1;n--){let i=cr(t.slice(0,n).join(G),r);if(hr(e,i))return mr(e,i)}if(hr(e,r))return mr(e,r)}return mr(e,r)}function _r(e,t,n){let r=pr(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function vr(e,t,n,r){let i=t?pr(e,t):[],a=pr(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i[i.length-1]?.path===a[a.length-1]?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function yr(e,t){return e?e===t||e.startsWith(`${t}${G}`):!1}function br(e,t,n){return pr(e,t).some(e=>e.state.tags?.includes(n))}function xr(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function Sr(e){return ur(e),e}var Cr=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(Cr||{}),wr=`__init__`,Tr=(...e)=>t=>e.reduce((e,t)=>t(e),t),Er=()=>void 0,Dr=e=>typeof e==`object`&&!!e,K=e=>e?``:void 0,Or=e=>e?`true`:void 0,kr=1,Ar=9,jr=11,Mr=e=>Dr(e)&&e.nodeType===kr&&typeof e.nodeName==`string`,Nr=e=>Dr(e)&&e.nodeType===Ar,Pr=e=>Dr(e)&&e===e.window,Fr=e=>Dr(e)&&e.nodeType!==void 0,Ir=e=>Fr(e)&&e.nodeType===jr&&`host`in e;function Lr(e){return e?Br(e.getRootNode())===e:!1}function Rr(e,t){if(!e||!t||!Mr(e)||!Fr(t))return!1;if(Mr(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Ir(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function zr(e){return Nr(e)?e:Pr(e)?e.document:e?.ownerDocument??document}function q(e){return Ir(e)?q(e.host):Nr(e)?e.defaultView??window:Mr(e)?e.ownerDocument?.defaultView??window:window}function Br(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}var Vr=new WeakMap;function Hr(e){return Vr.has(e)||Vr.set(e,q(e).getComputedStyle(e)),Vr.get(e)}var Ur=()=>typeof document<`u`;function Wr(){return navigator.userAgentData?.platform??navigator.platform}function Gr(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var Kr=e=>Ur()&&e.test(Wr()),qr=e=>Ur()&&e.test(Gr()),Jr=()=>Kr(/^Mac/i),Yr=()=>qr(/Android/i);function Xr(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Zr(e){return Xr(e)?.[0]??e.target}function Qr(e){return e.pointerType===``&&e.isTrusted?!0:Yr()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var $r=e=>`touches`in e&&e.touches.length>0;function ei(e,t=`client`){let n=$r(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var ti=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function ni(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=q(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function ri(e,t){e&&(ni(e,{type:`HTMLInputElement`,property:`checked`}).set?.call(e,t),t?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}function ii(e,t){let{checked:n,bubbles:r=!0}=t;if(!e)return;let i=q(e);if(!(e instanceof i.HTMLInputElement))return;ri(e,n);let a=new i.Event(`click`,{bubbles:r});e.dispatchEvent(di(a))}function ai(e){return e.matches(`textarea, input, select, button`)}function oi(e,t){if(!e)return;let n=ai(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function si(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(q(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function ci(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[oi(e,r),si(e,n)];return()=>i.forEach(e=>e?.())}var li=Symbol.for(`zag.changeEvent`);function ui(e){return Object.prototype.hasOwnProperty.call(e,li)}function di(e){return ui(e)||Object.defineProperty(e,li,{value:!0}),e}function fi(e){let{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:i,onPressEnd:a,isValidKey:o=e=>e.key===`Enter`}=e;if(!t)return Er;let s=q(t),c=Er,l=Er,u=Er,d=e=>({point:ei(e),event:e});function f(e){i?.(d(e))}function p(e){a?.(d(e))}c=Tr(ti(t,`pointerdown`,e=>{l(),l=Tr(ti(s,`pointerup`,e=>{let n=Zr(e);Rr(t,n)?r?.(d(e)):a?.(d(e))},{passive:!r,once:!0}),ti(s,`pointercancel`,p,{passive:!a,once:!0})),Lr(n)&&e.pointerType===`mouse`&&e.preventDefault(),f(e)},{passive:!i}),ti(n,`focus`,m));function m(){u=Tr(ti(n,`keydown`,e=>{o(e)&&(l(),l=ti(n,`keyup`,e=>{if(!o(e))return;let t=new s.PointerEvent(`pointerup`),n=d(t);r?.(n),a?.(n)}),f(new s.PointerEvent(`pointerdown`)))}),ti(n,`blur`,()=>{p(new s.PointerEvent(`pointercancel`))}))}return()=>{c(),l(),u()}}var pi={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function mi(e){let t=()=>e.getRootNode?.()??document,n=()=>zr(t()),r=()=>n().defaultView??window,i=()=>Br(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:Lr,getById:a}}function hi(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r,i]=x(t),a=w(()=>e().value!==void 0),o={current:r()},s={current:void 0};C(()=>{let t=a()?e().value:r();s.current=t,o.current=t});let c=t=>{let r=s.current,c=W(t)?t(o.current):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:r}),a()||i(c),n(c,r)||e().onChange?.(c,r)};function l(){let t=a()?e().value:r;return W(t)?t():t}return{initial:t,ref:o,get:l,set:c,invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}hi.cleanup=e=>{D(()=>e())},hi.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function gi(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}function _i(e){return W(e)?e():e}var vi=(e,t)=>{let n=[],r=!0;C(()=>{if(r){n=e.map(e=>_i(e)),r=!1;return}let i=!1;for(let t=0;t<e.length;t++)if(!kn(n[t],_i(e[t]))){i=!0;break}i&&(n=e.map(e=>_i(e)),t())})};function yi(e,t={}){let n=w(()=>{let{id:e,ids:n,getRootNode:r}=xi(t);return mi({id:e,ids:n,getRootNode:r})}),r=(...t)=>{e.debug&&console.log(...t)},i=Si(w(()=>e.props?.({props:Wn(xi(t)),scope:n()})??xi(t))),a=e.context?.({prop:i,bindable:hi,get scope(){return n()},flush:bi,getContext(){return o},getComputed(){return y},getRefs(){return p},getEvent(){return d()}}),o={get(e){return a?.[e].get()},set(e,t){a?.[e].set(t)},initial(e){return a?.[e].initial},hash(e){let t=a?.[e].get();return a?.[e].hash(t)}},s={current:new Map},c={current:null},l={current:null},u={current:{type:``}},d=()=>M(u.current,{current(){return u.current},previous(){return l.current}}),f=()=>M(b,{matches(...e){let t=b.get();return e.some(e=>yr(t,e))},hasTag(t){return br(e,b.get(),t)}}),p=gi(e.refs?.({prop:i,context:o})??{}),m=()=>({state:f(),context:o,event:d(),prop:i,send:ee,action:h,guard:g,track:vi,refs:p,computed:y,flush:bi,get scope(){return n()},choose:v}),h=t=>{let n=W(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||Gn(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(m())},g=t=>{if(W(t))return t(m());let n=e.implementations?.guards?.[t];return n||Gn(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(m())},_=t=>{let n=W(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||Gn(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(m());t&&i.push(t)}return()=>i.forEach(e=>e?.())},v=e=>En(e).find(e=>{let t=!e.guard;return Pn(e.guard)?t=!!g(e.guard):W(e.guard)&&(t=e.guard(m())),t}),y=t=>{qn(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:o,event:u.current,prop:i,refs:p,scope:n(),computed:y})},b=hi(()=>({defaultValue:gr(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=vr(e,n,t,c.current?.reenter);if(r.forEach(e=>{s.current.get(e.path)?.(),s.current.delete(e.path)}),r.forEach(e=>{h(e.state?.exit)}),h(c.current?.actions),i.forEach(e=>{let t=_(e.state?.effects);if(t){let n=s.current.get(e.path);s.current.set(e.path,n?Un(n,t):t)}}),n===`__init__`){h(e.entry);let t=_(e.effects);if(t){let e=s.current.get(wr);s.current.set(wr,e?Un(e,t):t)}}i.forEach(e=>{h(e.state?.entry)})}})),x=Cr.NotStarted;E(()=>{let e=x===Cr.Started;x=Cr.Started,r(e?`rehydrating...`:`initializing...`),b.invoke(b.initial,wr)}),D(()=>{x===Cr.Started&&(r(`unmounting...`),x=Cr.Stopped,s.current.forEach(e=>e?.()),s.current=new Map,c.current=null,h(e.exit))});let ee=t=>{queueMicrotask(()=>{if(x!==Cr.Started)return;l.current=u.current,u.current=t;let n=T(()=>b.get()),{transitions:i,source:a}=_r(e,n,t.type),o=v(i);if(!o)return;c.current=o;let s=gr(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?b.invoke(n,n):h(o.actions):b.set(s)})};return e.watch?.(m()),{state:f(),send:ee,context:o,prop:i,get scope(){return n()},refs:p,computed:y,event:d(),getStatus:()=>x}}function bi(e){e()}function xi(e){return W(e)?e():e}function Si(e){return function(t){return e()[t]}}function J(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){let t={};if(r===`style`||r===`class`||r===`className`||r===`data-ownedby`||r.startsWith(`on`)){for(let n=0;n<e.length;n++){let i=e[n];typeof i==`function`&&(i=i()),t=$n(t,{[r]:(i||{})[r]})}return t[r]}for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function Ci(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var wi={onFocus:`onFocusIn`,onBlur:`onFocusOut`,onDoubleClick:`onDblClick`,onChange:`onInput`,defaultChecked:`checked`,defaultValue:`value`,htmlFor:`for`,className:`class`},Ti=e=>e.startsWith(`--`)?e:Ni(e);function Ei(e){return e in wi?wi[e]:e}var Di=Ci(e=>{let t={};for(let n in e){let r=e[n];if(n!==`readOnly`||r!==!1){if(n===`style`&&Mn(r)){t.style=Oi(r);continue}if(n===`children`){Pn(r)&&(t.textContent=r);continue}t[Ei(n)]=r}}return t});function Oi(e){let t={};for(let n in e){let r=e[n];!Pn(r)&&!Nn(r)||(t[Ti(n)]=r)}return t}var ki=/[A-Z]/g,Ai=/^ms-/;function ji(e){return`-`+e.toLowerCase()}var Mi={};function Ni(e){if(Mi.hasOwnProperty(e))return Mi[e];let t=e.replace(ki,ji);return Mi[e]=Ai.test(t)?`-`+t:t}var Pi=e=>t=>{let[n,r]=N(t,[`asChild`]);return n.asChild?n.asChild(e=>{let[,t]=N(r,[`ref`]);return J(t,e)}):j(Mt,M({component:e},r))};function Fi(){let e=new Map;return new Proxy(Pi,{apply(e,t,n){return Pi(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,Pi(r)),e.get(r)}})}var Y=Fi(),Ii=e=>typeof e==`function`,Li=(e,...t)=>Ii(e)?e(...t):e;function Ri(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function zi(e={}){let{strict:t=!0,hookName:n=`useContext`,providerName:r=`Provider`,errorMessage:i,defaultValue:a}=e,o=de(a);function s(){let e=fe(o);if(!e&&t){let e=Error(i??Ri(n,r));throw e.name=`ContextError`,Fn(Error,`captureStackTrace`)&&W(Error.captureStackTrace)&&Error.captureStackTrace(e,s),e}return e}return[o.Provider,s,o]}var[Bi,Vi]=zi({hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),Hi=Object.defineProperty,Ui=(e,t)=>{for(var n in t)Hi(e,n,{get:t[n],enumerable:!0})},[Wi,Gi]=zi({hookName:`useFieldsetContext`,providerName:`<FieldsetProvider />`,strict:!1}),Ki=e=>e.children(Gi()),qi=e=>{let t=Gi(),n=J(()=>t().getErrorTextProps(),e);return j(P,{get when(){return t().invalid},get children(){return j(Y.span,n)}})},Ji=e=>{let t=Gi(),n=J(()=>t().getHelperTextProps(),e);return j(Y.span,n)},Yi=e=>{let t=Gi(),n=J(()=>t().getLegendProps(),e);return j(Y.legend,n)},Xi=e=>{let t=Vi(),n=M({disabled:!1,invalid:!1},Li(e)),[r,i]=x(void 0),a=n.id??He(),o=`fieldset::${a}::legend`,s=`fieldset::${a}::error-text`,c=`fieldset::${a}::helper-text`,[l,u]=x(!1),[d,f]=x(!1);E(()=>{let e=r();if(!e)return;let n=()=>{let e=t().getRootNode();u(!!e.getElementById(s)),f(!!e.getElementById(c))};n();let i=new(t().getWindow()).MutationObserver(n);i.observe(e,{childList:!0,subtree:!0}),D(()=>i.disconnect())});let p=w(()=>{let e=[];return l()&&n.invalid&&e.push(s),d()&&e.push(c),e}),m=()=>({...Tn.root.attrs,disabled:n.disabled,"data-disabled":K(n.disabled),"data-invalid":K(n.invalid),"aria-labelledby":o,"aria-describedby":p().join(` `)||void 0}),h=()=>({id:o,...Tn.legend.attrs,"data-disabled":K(n.disabled),"data-invalid":K(n.invalid)}),g=()=>({id:c,...Tn.helperText.attrs}),_=()=>({id:s,...Tn.errorText.attrs,"aria-live":`polite`});return w(()=>({refs:{rootRef:i},ids:{legend:o,errorText:s,helperText:c},disabled:n.disabled,invalid:n.invalid,getRootProps:m,getLegendProps:h,getHelperTextProps:g,getErrorTextProps:_}))},Zi=e=>{let[t,n]=H()(e,[`id`,`disabled`,`invalid`]),r=Xi(t),i=J(()=>r().getRootProps(),n);return j(Wi,{value:r,get children(){return j(Y.fieldset,M(i,{ref(t){var n=Sn(r().refs.rootRef,e.ref);typeof n==`function`&&n(t)}}))}})};Zi.displayName=`FieldsetRoot`;var Qi=e=>{let[{value:t},n]=H()(e,[`value`]),r=J(()=>t().getRootProps(),n);return j(Wi,{value:t,get children(){return j(Y.fieldset,r)}})};Ui({},{Context:()=>Ki,ErrorText:()=>qi,HelperText:()=>Ji,Legend:()=>Yi,Root:()=>Zi,RootProvider:()=>Qi});var X=U(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),$i=e=>{if(!e)return;let t=Hr(e),n=q(e),r=zr(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(e,`value`),o=a?.set?a:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);o?.set&&Object.defineProperty(e,"value",{...o,set(e){o.set?.call(this,e),i()}});let s=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});s.observe(e);let c=new n.MutationObserver(()=>i());return c.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),s.disconnect(),c.disconnect()}},[ea,Z]=zi({hookName:`useFieldContext`,providerName:`<FieldProvider />`,strict:!1}),ta=e=>e.children(Z()),na=e=>{let t=Z(),n=J(()=>t().getErrorTextProps(),e);return j(P,{get when(){return t?.().invalid},get children(){return j(Y.span,n)}})},ra=e=>{let t=Z(),n=J(()=>t().getHelperTextProps(),e);return j(Y.span,n)},ia=e=>{let t=Z(),n=J(()=>t?.().getInputProps(),e);return j(Y.input,n)},aa=e=>{let t=Z(),n=w(()=>{let n=t?.();if(!n)throw Error(`Field.Item must be used within Field.Root`);let r=`field::${n.ids.control}::item::${e.value}`,i=`${r}::label`,a=()=>({...n.getInputProps(),id:r});return()=>({...n,ids:{...n.ids,control:r,label:i},getLabelProps:()=>({...n.getLabelProps(),id:i,htmlFor:r}),getInputProps:()=>({...a(),...X.input.attrs}),getSelectProps:()=>({...a(),...X.select.attrs}),getTextareaProps:()=>({...a(),...X.textarea.attrs})})});return j(ea,{get value(){return n()},get children(){return e.children}})},oa=e=>{let t=Z(),n=J(()=>t?.().getLabelProps(),e);return j(Y.label,n)},sa=e=>{let t=Z(),n=J(()=>t().getRequiredIndicatorProps(),e);return j(P,{get when(){return t().required},get fallback(){return e.fallback},get children(){return j(Y.span,M(n,{get children(){return e.children??`*`}}))}})},ca=e=>{let t=Gi(),n=Vi(),r=M({disabled:!!t?.().disabled,required:!1,invalid:!1,readOnly:!1},e),[i,a]=x(!1),[o,s]=x(!1),c=r.id??He(),[l,u]=x(void 0),d=r.ids?.control??`field::${c}`,f=r.ids?.errorText??`field::${c}::error-text`,p=r.ids?.helperText??`field::${c}::helper-text`,m=r.ids?.label??`field::${c}::label`;E(()=>{let e=l();if(!e)return;let t=()=>{let e=n().getRootNode();a(!!e.getElementById(f)),s(!!e.getElementById(p))};t();let r=new(n().getWindow()).MutationObserver(t);r.observe(e,{childList:!0,subtree:!0}),D(()=>r.disconnect())});let h=()=>({...X.root.attrs,id:d,role:`group`,"data-disabled":K(r.disabled),"data-invalid":K(r.invalid),"data-readonly":K(r.readOnly)}),g=r.target?`field::${c}::item::${r.target}`:void 0,_=()=>({...X.label.attrs,id:m,"data-disabled":K(r.disabled),"data-invalid":K(r.invalid),"data-readonly":K(r.readOnly),"data-required":K(r.required),htmlFor:g??c}),v=w(()=>i()&&r.invalid?f:void 0),y=()=>({"aria-describedby":o()?p:void 0,"aria-errormessage":v(),"aria-invalid":Or(r.invalid),"data-invalid":K(r.invalid),"data-required":K(r.required),"data-readonly":K(r.readOnly),id:c,required:r.required,disabled:r.disabled,readOnly:r.readOnly||void 0}),b=()=>({...y(),...X.input.attrs}),ee=()=>({...y(),...X.textarea.attrs}),S=()=>({...y(),...X.select.attrs}),C=()=>({id:p,...X.helperText.attrs,"data-disabled":K(r.disabled)}),te=()=>({id:f,...X.errorText.attrs,"aria-live":`polite`}),ne=()=>({"aria-hidden":!0,...X.requiredIndicator.attrs});return w(()=>({ariaDescribedby:o()?p:void 0,ids:{control:c,label:m,errorText:f,helperText:p},refs:{rootRef:u},disabled:r.disabled,invalid:r.invalid,readOnly:r.readOnly,required:r.required,getLabelProps:_,getRootProps:h,getInputProps:b,getTextareaProps:ee,getSelectProps:S,getHelperTextProps:C,getErrorTextProps:te,getRequiredIndicatorProps:ne}))},la=e=>{let[t,n]=H()(e,[`id`,`ids`,`disabled`,`invalid`,`readOnly`,`required`,`target`]),r=ca(t),i=J(()=>r().getRootProps(),n);return j(ea,{value:r,get children(){return j(Y.div,M(i,{ref(t){var n=Sn(r().refs.rootRef,e.ref);typeof n==`function`&&n(t)}}))}})},ua=e=>{let[{value:t},n]=H()(e,[`value`]),r=J(()=>t().getRootProps(),n);return j(ea,{value:t,get children(){return j(Y.div,r)}})},da=e=>{let t=Z(),n=J(()=>t?.().getSelectProps(),e);return j(Y.select,n)},fa=e=>{let t=Z(),n,[r,i]=N(e,[`autoresize`]),a=J(()=>t?.().getTextareaProps(),()=>({style:{resize:r.autoresize?`none`:void 0}}),i);return E(()=>{if(!r.autoresize)return;let e=$i(n);D(()=>e?.())}),j(Y.textarea,M(a,{ref(t){var r=Sn(e=>n=e,e.ref);typeof r==`function`&&r(t)}}))};Ui({},{Context:()=>ta,ErrorText:()=>na,HelperText:()=>ra,Input:()=>ia,Item:()=>aa,Label:()=>oa,RequiredIndicator:()=>sa,Root:()=>la,RootProvider:()=>ua,Select:()=>da,Textarea:()=>fa});var pa=U(`checkbox`).parts(`root`,`label`,`control`,`indicator`),ma=pa.build();function ha(e){return!(e.metaKey||!Jr()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var ga=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),_a=[`a[href]`,`audio[controls]`,`button`,`details`,`embed`,`iframe`,`img[controls]`,`img[usemap]`,`input`,`select`,`textarea`,`video[controls]`].join(`,`);function va(e,t,n){let r=n?Zr(n):null,i=zr(r),a=q(r),o=Br(i);return e=e||o instanceof a.HTMLInputElement&&!ga.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Ta,n.key))}var ya=null,ba=new Set,xa=new Map,Sa=!1,Q=null,Ca=!1,wa=null,Ta={Tab:!0,Escape:!0};function Ea(e,t){for(let n of ba)n(e,t)}function Da(e){Q=null,Sa=!0,ha(e)&&(ya=`keyboard`,Ea(`keyboard`,e))}function $(e){(e.type!==`pointermove`&&e.type!==`mousemove`||wa?.x!==e.clientX||wa?.y!==e.clientY)&&(wa={x:e.clientX,y:e.clientY},ya=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Q=null,Sa=!0,Ea(`pointer`,e)))}function Oa(e){if(Qr(e)){Q=null,Sa=!0,ya=`virtual`;return}Q=null;let t=Zr(e),n=t?.closest(`label`),r=n?.control;if(!n||!r||r.matches(`:disabled`))return;let i=t?.closest(_a);i&&n.contains(i)&&i!==r||r!==Br(n.ownerDocument)&&(Q=r)}function ka(e){let t=Zr(e),n=t===Q;t===q(t)||t===zr(t)||!e.isTrusted||(!Sa&&!n&&!Ca&&(ya=`virtual`,Ea(`virtual`,e)),Sa=!1,Q=null,Ca=!1)}function Aa(){Sa=!1,Q=null,Ca=!0}function ja(e){if(typeof window>`u`||xa.get(q(e)))return;let t=q(e),n=zr(e),r=t.HTMLElement.prototype.focus;function i(){Sa=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,Da,!0),n.addEventListener(`keyup`,Da,!0),n.addEventListener(`click`,Oa,!0),t.addEventListener(`focus`,ka,!0),t.addEventListener(`blur`,Aa,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,$,!0),n.addEventListener(`mousemove`,$,!0),n.addEventListener(`mouseup`,$,!0)):(n.addEventListener(`pointerdown`,$,!0),n.addEventListener(`pointermove`,$,!0),n.addEventListener(`pointerup`,$,!0)),t.addEventListener(`beforeunload`,()=>{Ma(e)},{once:!0}),xa.set(t,{focus:r})}var Ma=(e,t)=>{let n=q(e),r=zr(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=xa.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,Da,!0),r.removeEventListener(`keyup`,Da,!0),r.removeEventListener(`click`,Oa,!0),n.removeEventListener(`focus`,ka,!0),n.removeEventListener(`blur`,Aa,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,$,!0),r.removeEventListener(`mousemove`,$,!0),r.removeEventListener(`mouseup`,$,!0)):(r.removeEventListener(`pointerdown`,$,!0),r.removeEventListener(`pointermove`,$,!0),r.removeEventListener(`pointerup`,$,!0)),xa.delete(n)}};function Na(){return ya===`keyboard`||ya===`virtual`}function Pa(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;ja(i),r?.({isFocusVisible:n||Na(),modality:ya});let a=(e,n)=>{va(!!t,e,n)&&r?.({isFocusVisible:Na(),modality:e})};return ba.add(a),()=>{ba.delete(a)}}var Fa=e=>e.ids?.root??`checkbox:${e.id}`,Ia=e=>e.ids?.label??`checkbox:${e.id}:label`,La=e=>e.ids?.control??`checkbox:${e.id}:control`,Ra=e=>e.ids?.hiddenInput??`checkbox:${e.id}:input`,za=e=>e.getById(Fa(e)),Ba=e=>e.getById(Ra(e));function Va(e,t){let{send:n,context:r,prop:i,computed:a,scope:o}=e,s=!!i(`disabled`),c=!!i(`readOnly`),l=!!i(`required`),u=!!i(`invalid`),d=!s&&r.get(`focused`),f=!s&&r.get(`focusVisible`),p=a(`checked`),m=a(`indeterminate`),h=r.get(`checked`),g={"data-active":K(r.get(`active`)),"data-focus":K(d),"data-focus-visible":K(f),"data-readonly":K(c),"data-hover":K(r.get(`hovered`)),"data-disabled":K(s),"data-state":m?`indeterminate`:p?`checked`:`unchecked`,"data-invalid":K(u),"data-required":K(l)};return{checked:p,disabled:s,indeterminate:m,focused:d,checkedState:h,setChecked(e){n({type:`CHECKED.SET`,checked:e,isTrusted:!1})},toggleChecked(){n({type:`CHECKED.TOGGLE`,checked:p,isTrusted:!1})},getRootProps(){return t.label({...ma.root.attrs,...g,dir:i(`dir`),id:Fa(o),htmlFor:Ra(o),onPointerMove(){s||n({type:`CONTEXT.SET`,context:{hovered:!0}})},onPointerLeave(){s||n({type:`CONTEXT.SET`,context:{hovered:!1}})},onClick(e){Zr(e)===Ba(o)&&e.stopPropagation()}})},getLabelProps(){return t.element({...ma.label.attrs,...g,dir:i(`dir`),id:Ia(o)})},getControlProps(){return t.element({...ma.control.attrs,...g,dir:i(`dir`),id:La(o),"aria-hidden":!0})},getIndicatorProps(){return t.element({...ma.indicator.attrs,...g,dir:i(`dir`),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:Ra(o),type:`checkbox`,required:i(`required`),defaultChecked:p,disabled:s,"aria-labelledby":Ia(o),"aria-invalid":u,name:i(`name`),form:i(`form`),value:i(`value`),style:pi,onFocus(){let e=Na();n({type:`CONTEXT.SET`,context:{focused:!0,focusVisible:e}})},onBlur(){n({type:`CONTEXT.SET`,context:{focused:!1,focusVisible:!1}})},onClick(e){if(c){e.preventDefault();return}let t=e.currentTarget.checked;n({type:`CHECKED.SET`,checked:t,isTrusted:!0})}})}}}var{not:Ha}=xr(),Ua=Sr({props({props:e}){return{value:`on`,...e,defaultChecked:e.defaultChecked??!1}},initialState(){return`ready`},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e(`defaultChecked`),value:e(`checked`),onChange(t){e(`onCheckedChange`)?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:r}){e([()=>n(`disabled`)],()=>{r([`removeFocusIfNeeded`])}),e([()=>t.get(`checked`)],()=>{r([`syncInputElement`])})},effects:[`trackFormControlState`,`trackPressEvent`,`trackFocusVisible`],on:{"CHECKED.TOGGLE":[{guard:Ha(`isTrusted`),actions:[`toggleChecked`,`dispatchChangeEvent`]},{actions:[`toggleChecked`]}],"CHECKED.SET":[{guard:Ha(`isTrusted`),actions:[`setChecked`,`dispatchChangeEvent`]},{actions:[`setChecked`]}],"CONTEXT.SET":{actions:[`setContext`]}},computed:{indeterminate:({context:e})=>Wa(e.get(`checked`)),checked:({context:e})=>Ga(e.get(`checked`)),disabled:({context:e,prop:t})=>!!t(`disabled`)||e.get(`fieldsetDisabled`)},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t(`disabled`))return fi({pointerNode:za(n),keyboardNode:Ba(n),isValidKey:e=>e.key===` `,onPress:()=>e.set(`active`,!1),onPressStart:()=>e.set(`active`,!0),onPressEnd:()=>e.set(`active`,!1)})},trackFocusVisible({computed:e,scope:t}){if(!e(`disabled`))return Pa({root:t.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return ci(Ba(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`checked`,e.initial(`checked`))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let r=Ba(n);r&&(ri(r,t(`checked`)),r.indeterminate=Wa(e.get(`checked`)))},removeFocusIfNeeded({context:e,prop:t}){t(`disabled`)&&e.get(`focused`)&&(e.set(`focused`,!1),e.set(`focusVisible`,!1))},setChecked({context:e,event:t}){e.set(`checked`,t.checked)},toggleChecked({context:e,computed:t}){let n=Wa(t(`checked`))?!0:!t(`checked`);e.set(`checked`,n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{ii(Ba(t),{checked:e(`checked`)})})}}}});function Wa(e){return e===`indeterminate`}function Ga(e){return!Wa(e)&&!!e}var Ka=pa.extendWith(`group`),[qa,Ja]=zi({hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:()=>({dir:`ltr`,locale:`en-US`})}),[Ya,Xa]=zi({hookName:`useCheckboxContext`,providerName:`<CheckboxProvider />`}),Za=e=>e.children(Xa()),Qa=e=>{let t=Xa(),n=J(()=>t().getControlProps(),e);return j(Y.div,n)};function $a(e){let[t,n]=x(Li(e.defaultValue)),r=w(()=>e.value?.()!==void 0),i=w(()=>r()?e.value?.():t());return[i,t=>{T(()=>{let a=Li(t,i());return r()||n(a),e.onChange?.(a)})}]}function eo(e={}){let t=Gi(),n=()=>e.disabled??t?.()?.disabled,r=()=>e.invalid??t?.()?.invalid,i=w(()=>!(n()||e.readOnly)),[a,o]=$a({value:e.value,defaultValue:e.defaultValue||[],onChange:e.onValueChange});return w(()=>{let t=e=>a().some(t=>String(t)===String(e)),s=e=>{t(e)?u(e):l(e)},c=e.maxSelectedValues!=null&&a().length>=e.maxSelectedValues,l=e=>{i()&&(t(e)||c||o(a().concat(e)))},u=e=>{i()&&o(a().filter(t=>String(t)!==String(e)))};return{isChecked:t,value:a,name:e.name,disabled:n(),readOnly:e.readOnly,invalid:r(),setValue:o,addValue:l,toggleValue:s,getItemProps:i=>{let a=i.value==null?void 0:t(i.value);return{checked:a,onCheckedChange(){i.value!=null&&s(i.value)},name:e.name,disabled:n()||c&&!a,readOnly:e.readOnly,invalid:r()}}}})}var[to,no]=zi({hookName:`useCheckboxGroupContext`,providerName:`<CheckboxGroupProvider />`,strict:!1}),ro=e=>{let[t,n]=H()(e,[`defaultValue`,`value`,`onValueChange`,`disabled`,`invalid`,`readOnly`,`name`,`maxSelectedValues`]);return j(to,{value:eo(t),get children(){return j(Y.div,M({role:`group`},n,()=>Ka.build().group.attrs))}})},io=e=>{let[t,n]=H()(e,[`value`]);return j(to,{get value(){return t.value},get children(){return j(Y.div,M({role:`group`},n,()=>Ka.build().group.attrs))}})},ao=e=>{let t=Xa(),n=J(()=>t().getHiddenInputProps(),e),r=Z();return j(Y.input,M({get"aria-describedby"(){return r?.().ariaDescribedby}},n))},oo=e=>{let[t,n]=H()(e,[`indeterminate`]),r=Xa(),i=J(()=>r().getIndicatorProps(),n);return j(Y.div,M(i,{get hidden(){return!(t.indeterminate?r().indeterminate:r().checked)}}))},so=e=>{let t=Xa(),n=J(()=>t().getLabelProps(),e);return j(Y.span,n)},co=(e={})=>{let t=no(),n=w(()=>{let n=Li(e);return J(t?.().getItemProps({value:n.value})??{},n)},[e,t]),r=He(),i=Ja(),a=Vi(),o=Z(),s=yi(Ua,w(()=>({id:r,ids:{label:o?.().ids.label,hiddenInput:o?.().ids.control},disabled:o?.().disabled,readOnly:o?.().readOnly,invalid:o?.().invalid,required:o?.().required,dir:i().dir,getRootNode:a().getRootNode,...n()})));return w(()=>Va(s,Di))},lo=e=>{let[t,n]=H()(e,[`checked`,`defaultChecked`,`disabled`,`form`,`id`,`ids`,`invalid`,`name`,`onCheckedChange`,`readOnly`,`required`,`value`]),r=co(t),i=J(()=>r().getRootProps(),n);return j(Ya,{value:r,get children(){return j(Y.label,i)}})},uo=e=>{let[{value:t},n]=H()(e,[`value`]),r=J(()=>t().getRootProps(),n);return j(Ya,{value:t,get children(){return j(Y.label,r)}})};Ui({},{Context:()=>Za,Control:()=>Qa,Group:()=>ro,GroupProvider:()=>io,HiddenInput:()=>ao,Indicator:()=>oo,Label:()=>so,Root:()=>lo,RootProvider:()=>uo});var fo=F(`<div>`),po=F(`<button>`),mo=F(`<input>`),ho=F(`<div><select class="field field-mono h-9 appearance-none pr-8 text-xs">`),go=F(`<option>`),_o=F(`<span>`),vo=F(`<div><div class="min-w-0 flex-1">`),yo=F(`<button type=button>`),bo=F(`<span class="micro-label mb-2 inline-block text-muted-foreground">`),xo=F(`<div><div class="inline-flex max-w-full border border-line">`),So=F(`<span class="absolute inset-x-0 top-0 h-0.5 bg-foreground dark:bg-primary">`),Co=F(`<span aria-hidden=true>`),wo=F(`<span aria-hidden=true><i></i><i></i><i></i><i></i><i>`),To=F(`<div class="flex shrink-0 items-center">`),Eo=F(`<span class="px-5 font-mono text-[11px] tracking-[0.22em] uppercase text-muted-foreground sm:px-7">`),Do=F(`<span class="size-1.5 shrink-0 rotate-45 bg-acid-lime">`),Oo=F(`<div><div class=marquee-track>`),ko={primary:`btn-primary`,secondary:`btn-secondary`,outline:`btn-outline`,ghost:`btn-ghost`,danger:`btn-destructive`},Ao={sm:`btn-sm`,default:``,lg:`btn-lg`,icon:`btn-icon`};function jo(e){return(()=>{var t=po();return ft(t,`click`,e.onClick,!0),R(t,()=>e.children),S(n=>{var r=e.type??`button`,i=`btn ${ko[e.variant??`primary`]} ${Ao[e.size??`default`]} ${e.class??``}`,a=e.disabled,o=e[`aria-label`],s=e.title;return r!==n.e&&I(t,`type`,n.e=r),i!==n.t&&L(t,n.t=i),a!==n.a&&(t.disabled=n.a=a),o!==n.o&&I(t,`aria-label`,n.o=o),s!==n.i&&I(t,`title`,n.i=s),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}function Mo(e){return(()=>{var t=mo();return ft(t,`keydown`,e.onKeyDown,!0),t.$$input=t=>e.onInput?.(t.currentTarget.value),S(n=>{var r=e.id,i=`field ${e.class??``}`,a=e.type??`text`,o=e.name,s=e.autoComplete,c=e.placeholder,l=e.disabled,u=e[`aria-label`];return r!==n.e&&I(t,`id`,n.e=r),i!==n.t&&L(t,n.t=i),a!==n.a&&I(t,`type`,n.a=a),o!==n.o&&I(t,`name`,n.o=o),s!==n.i&&I(t,`autocomplete`,n.i=s),c!==n.n&&I(t,`placeholder`,n.n=c),l!==n.s&&(t.disabled=n.s=l),u!==n.h&&I(t,`aria-label`,n.h=u),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),S(()=>t.value=e.value??``),t})()}function No(e){return(()=>{var t=ho(),n=t.firstChild;return n.addEventListener(`change`,t=>e.onChange(t.currentTarget.value)),R(n,j(We,{get each(){return e.options},children:e=>(()=>{var t=go();return R(t,()=>e.label),S(()=>t.value=e.value),t})()})),R(t,j(sn,{class:`pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),null),S(r=>{var i=`relative ${e.class??``}`,a=e.disabled,o=e[`aria-label`];return i!==r.e&&L(t,r.e=i),a!==r.t&&(n.disabled=r.t=a),o!==r.a&&I(n,`aria-label`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),S(()=>n.value=e.value),t})()}var Po={default:`border-transparent bg-primary text-primary-foreground`,secondary:`border-line bg-secondary text-secondary-foreground`,outline:`border-line text-foreground`,success:`border-success/30 bg-success/10 text-success`,warning:`border-warning/30 bg-warning/10 text-warning`,danger:`border-destructive/30 bg-destructive/10 text-destructive`,muted:`border-line bg-transparent text-muted-foreground`};function Fo(e){return(()=>{var t=_o();return R(t,()=>e.children),S(()=>L(t,`badge ${Po[e.variant??`muted`]} ${e.class??``}`)),t})()}var Io={error:{box:`border-destructive/40 bg-destructive/10 text-destructive`,icon:ln},warning:{box:`border-warning/40 bg-warning/10 text-warning`,icon:yn},success:{box:`border-success/40 bg-success/10 text-success`,icon:dn},info:{box:`border-acid-cyan/40 bg-acid-cyan/10 text-accent-foreground`,icon:pn}};function Lo(e){let t=e.tone??`info`,n=Io[t],r=n.icon;return(()=>{var i=vo(),a=i.firstChild;return I(i,`role`,t===`error`?`alert`:void 0),R(i,j(r,{class:`mt-px size-4 shrink-0`}),a),R(a,()=>e.children),S(()=>L(i,`flex items-start gap-2.5 border px-3 py-2.5 text-sm ${n.box} ${e.class??``}`)),i})()}function Ro(e){return(()=>{var t=_o();return S(()=>L(t,`inline-block size-2 shrink-0 ${e.active?`bg-success pulse`:`bg-muted-foreground/40`} ${e.class??``}`)),t})()}function zo(e){let t=()=>Pt()===`dark`?`亮色`:`暗色`;return(()=>{var n=yo();return ft(n,`click`,zt,!0),R(n,j(P,{get when(){return Pt()===`dark`},get fallback(){return j(hn,{class:`size-4`})},get children(){return j(_n,{class:`size-4`})}})),S(r=>{var i=`btn btn-ghost btn-icon ${e.class??``}`,a=`切换到${t()}模式`,o=`切换到${t()}模式`;return i!==r.e&&L(n,r.e=i),a!==r.t&&I(n,`aria-label`,r.t=a),o!==r.a&&I(n,`title`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}function Bo(e){return j(lo,{get checked(){return e.checked},get disabled(){return e.disabled},onCheckedChange:t=>e.onChange(!!t.checked),class:`group flex cursor-pointer items-center gap-2.5 select-none`,get children(){return[j(Qa,{get class(){return`flex size-4 shrink-0 items-center justify-center border transition-colors ${e.checked?`border-primary bg-primary text-primary-foreground`:`border-input bg-card text-transparent group-hover:border-primary/60`}`},get children(){return j(oo,{class:`leading-none`,get children(){return j(an,{class:`size-3.5`,strokeWidth:3})}})}}),j(so,{class:`text-sm leading-none text-foreground`,get children(){return e.label}}),j(ao,{})]}})}function Vo(e){return(()=>{var t=xo(),n=t.firstChild;return R(t,j(P,{get when(){return e.label},get children(){var t=bo();return R(t,()=>e.label),t}}),n),R(n,j(We,{get each(){return e.options},children:t=>(()=>{var n=yo();return n.$$click=()=>e.onChange(t.value),R(n,()=>t.icon,null),R(n,()=>t.label,null),R(n,j(P,{get when(){return t.value===e.value},get children(){return So()}}),null),S(()=>L(n,`relative inline-flex h-9 shrink-0 cursor-pointer items-center gap-1.5 border-r border-line px-3 font-mono text-[11px] tracking-[0.14em] uppercase whitespace-nowrap transition-colors last:border-r-0 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none ${t.value===e.value?`bg-acid-lime/15 text-foreground dark:bg-primary/10 dark:text-primary`:`text-muted-foreground hover:bg-accent/60 hover:text-foreground`}`)),n})()})),S(()=>L(t,e.class??``)),t})()}function Ho(e){let t=e.class??``;return[(()=>{var e=Co();return L(e,`hud-corner hud-tl ${t}`),e})(),(()=>{var e=Co();return L(e,`hud-corner hud-tr ${t}`),e})(),(()=>{var e=Co();return L(e,`hud-corner hud-bl ${t}`),e})(),(()=>{var e=Co();return L(e,`hud-corner hud-br ${t}`),e})()]}function Uo(e){return(()=>{var t=wo();return S(()=>L(t,`meter ${e.active?``:`idle`} ${e.class??``}`)),t})()}function Wo(e){let t;return E(()=>{let e=t;if(!e)return;if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){e.classList.add(`is-in`);return}let n=new IntersectionObserver(t=>{for(let r of t)r.isIntersecting&&(e.classList.add(`is-in`),n.disconnect())},{threshold:.08,rootMargin:`0px 0px -6% 0px`});n.observe(e),D(()=>n.disconnect())}),(()=>{var n=fo();return _t(e=>t=e,n),R(n,()=>e.children),S(t=>{var r=`reveal ${e.class??``}`,i={"--i":String(e.delay??0)};return r!==t.e&&L(n,t.e=r),t.t=mt(n,i,t.t),t},{e:void 0,t:void 0}),n})()}function Go(e){let t=t=>(()=>{var n=To();return I(n,`aria-hidden`,t||void 0),R(n,j(We,{get each(){return e.items},children:e=>[(()=>{var t=Eo();return R(t,e),t})(),Do()]})),n})();return(()=>{var n=Oo(),r=n.firstChild;return R(r,()=>t(!1),null),R(r,()=>t(!0),null),S(()=>L(n,`marquee border-y border-line/80 py-3 ${e.class??``}`)),n})()}lt([`click`,`input`,`keydown`]);export{fe as $,Je as A,w as B,at as C,gt as D,ht as E,Ge as F,M as G,b as H,re as I,E as J,ie as K,j as L,Ke as M,P as N,F as O,Xe as P,T as Q,de as R,R as S,I as T,x as U,S as V,Be as W,N as X,e as Y,se as Z,Vt as _,Ho as a,L as b,Uo as c,No as d,Mo as f,Gt as g,Jt as h,Bo as i,We as j,_t as k,Wo as l,V as m,Fo as n,Ro as o,zo as p,D as q,jo as r,Go as s,Lo as t,Vo as u,Rt as v,ct as w,lt as x,Mt as y,C as z};