@thaodangspace/argos 0.1.3 → 0.1.5

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 (70) hide show
  1. package/dist/commands/doctor.d.ts +16 -0
  2. package/dist/commands/doctor.d.ts.map +1 -1
  3. package/dist/commands/doctor.js +58 -0
  4. package/dist/commands/doctor.js.map +1 -1
  5. package/dist/commands/rex-agents.d.ts +26 -0
  6. package/dist/commands/rex-agents.d.ts.map +1 -0
  7. package/dist/commands/rex-agents.js +505 -0
  8. package/dist/commands/rex-agents.js.map +1 -0
  9. package/dist/commands/runs.d.ts.map +1 -1
  10. package/dist/commands/runs.js +5 -1
  11. package/dist/commands/runs.js.map +1 -1
  12. package/dist/commands/schedule.d.ts.map +1 -1
  13. package/dist/commands/schedule.js +2 -1
  14. package/dist/commands/schedule.js.map +1 -1
  15. package/dist/commands/serve.d.ts +149 -10
  16. package/dist/commands/serve.d.ts.map +1 -1
  17. package/dist/commands/serve.js +221 -37
  18. package/dist/commands/serve.js.map +1 -1
  19. package/dist/main.d.ts.map +1 -1
  20. package/dist/main.js +3 -0
  21. package/dist/main.js.map +1 -1
  22. package/dist/output.d.ts +1 -1
  23. package/dist/output.d.ts.map +1 -1
  24. package/dist/output.js +8 -4
  25. package/dist/output.js.map +1 -1
  26. package/package.json +2 -2
  27. package/ui/_app/immutable/assets/0.CUSoXXAe.css +1 -0
  28. package/ui/_app/immutable/chunks/7kS98abs.js +1 -0
  29. package/ui/_app/immutable/chunks/BcmE4Pmo.js +2 -0
  30. package/ui/_app/immutable/chunks/BeleWrn1.js +5 -0
  31. package/ui/_app/immutable/chunks/CJuNNExc.js +1 -0
  32. package/ui/_app/immutable/chunks/CSzwgvai.js +55 -0
  33. package/ui/_app/immutable/chunks/CrMz2YMe.js +1 -0
  34. package/ui/_app/immutable/chunks/DK3Fl9T5.js +1 -0
  35. package/ui/_app/immutable/chunks/DR13iyEP.js +3 -0
  36. package/ui/_app/immutable/chunks/DxF9htzl.js +1 -0
  37. package/ui/_app/immutable/chunks/{CqLqOuLw.js → KjnrVwp0.js} +3 -3
  38. package/ui/_app/immutable/chunks/Ta9EVp1m.js +1 -0
  39. package/ui/_app/immutable/chunks/UEYpU5e_.js +1 -0
  40. package/ui/_app/immutable/chunks/XmWYLfMV.js +1 -0
  41. package/ui/_app/immutable/entry/app.fpTlr2bV.js +2 -0
  42. package/ui/_app/immutable/entry/{start.D3LG_apg.js → start.CmdXdr1Q.js} +2 -2
  43. package/ui/_app/immutable/nodes/0.CexwxgPf.js +1 -0
  44. package/ui/_app/immutable/nodes/1.CXvw6Lx4.js +1 -0
  45. package/ui/_app/immutable/nodes/2.CVRWg4vc.js +2 -0
  46. package/ui/_app/immutable/nodes/3.Te_SG5Lg.js +1 -0
  47. package/ui/_app/immutable/nodes/4.9tMyBzuY.js +3 -0
  48. package/ui/_app/immutable/nodes/5.G4bzLcKA.js +1 -0
  49. package/ui/_app/version.json +1 -1
  50. package/ui/build.json +3 -3
  51. package/ui/index.html +20 -19
  52. package/ui/_app/immutable/assets/0.CTk3h7Zx.css +0 -2
  53. package/ui/_app/immutable/chunks/9Dk6YhUf.js +0 -1
  54. package/ui/_app/immutable/chunks/BDgjZRhb.js +0 -1
  55. package/ui/_app/immutable/chunks/BXIfM5K1.js +0 -1
  56. package/ui/_app/immutable/chunks/B_XCALJf.js +0 -1
  57. package/ui/_app/immutable/chunks/BiQUXUyr.js +0 -1
  58. package/ui/_app/immutable/chunks/CPty2F6V.js +0 -2
  59. package/ui/_app/immutable/chunks/Cta5wR5U.js +0 -1
  60. package/ui/_app/immutable/chunks/DlHMls5I.js +0 -1
  61. package/ui/_app/immutable/chunks/DqmgjiJ7.js +0 -3
  62. package/ui/_app/immutable/chunks/DxP_sZrQ.js +0 -55
  63. package/ui/_app/immutable/chunks/PR6kdzSw.js +0 -1
  64. package/ui/_app/immutable/entry/app.DefioTIJ.js +0 -2
  65. package/ui/_app/immutable/nodes/0.Bxn1Q-bg.js +0 -1
  66. package/ui/_app/immutable/nodes/1.DVMonhb0.js +0 -1
  67. package/ui/_app/immutable/nodes/2.DiUZ9i2y.js +0 -2
  68. package/ui/_app/immutable/nodes/3.C6GP2DYu.js +0 -1
  69. package/ui/_app/immutable/nodes/4._uRXFvRQ.js +0 -3
  70. package/ui/_app/immutable/nodes/5.BwtM7IQO.js +0 -1
@@ -0,0 +1,5 @@
1
+ import{$ as e,B as t,C as n,D as r,E as i,Et as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,R as h,S as g,T as _,Tt as v,U as ee,V as y,W as te,X as b,Y as x,_ as S,_t as C,a as w,at as T,bt as E,c as D,ct as O,d as ne,dt as k,et as A,ft as j,gt as M,h as re,ht as ie,i as N,it as P,j as ae,k as F,l as oe,lt as I,m as se,n as L,nt as ce,o as le,ot as R,p as ue,pt as z,r as B,st as V,t as H,tt as de,ut as U,v as W,vt as G,wt as fe,y as pe,yt as K}from"./DR13iyEP.js";import{a as me,c as he,d as ge,l as q,n as _e,o as J,r as ve,s as ye,u as be}from"./CSzwgvai.js";import{n as xe,r as Se,t as Ce}from"./CJuNNExc.js";import{n as we,r as Te,t as Ee}from"./BQUxoyXx.js";function Y(e){return typeof e==`object`&&!!e}var De=[`string`,`number`,`bigint`,`boolean`];function Oe(e){return e==null||De.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Oe(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var ke=Symbol(`box`),Ae=Symbol(`is-writable`);function X(e,t){let n=z(e);return t?{[ke]:!0,[Ae]:!0,get current(){return d(n)},set current(e){t(e)}}:{[ke]:!0,get current(){return e()}}}function je(e){return Y(e)&&ke in e}function Me(e){let t=j(O(e));return{[ke]:!0,[Ae]:!0,get current(){return d(t)},set current(e){U(t,e,!0)}}}function Ne(...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 Pe=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Fe=/\n/g,Ie=/^\s*/,Le=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Re=/^:\s*/,ze=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Be=/^[;\s]*/,Ve=/^\s+|\s+$/g,He=`
2
+ `,Ue=`/`,We=`*`,Ge=``,Ke=`comment`,qe=`declaration`;function Je(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(Fe);t&&(n+=t.length);var i=e.lastIndexOf(He);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(Ie)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Ue==e.charAt(0)&&We==e.charAt(1)){for(var n=2;Ge!=e.charAt(n)&&(We!=e.charAt(n)||Ue!=e.charAt(n+1));)++n;if(n+=2,Ge===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:Ke,comment:o})}}function f(){var e=a(),t=c(Le);if(t){if(d(),!c(Re))return s(`property missing ':'`);var n=c(ze),r=e({type:qe,property:Ye(t[0].replace(Pe,Ge)),value:n?Ye(n[0].replace(Pe,Ge)):Ge});return c(Be),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 Ye(e){return e?e.replace(Ve,Ge):Ge}function Xe(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Je(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 Ze=/\d/,Qe=[`-`,`_`,`/`,`.`];function $e(e=``){if(!Ze.test(e))return e!==e.toLowerCase()}function et(e){let t=[],n=``,r,i;for(let a of e){let e=Qe.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=$e(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 tt(e){return e?et(e).map(e=>rt(e)).join(``):``}function nt(e){return it(tt(e||``))}function rt(e){return e?e[0].toUpperCase()+e.slice(1):``}function it(e){return e?e[0].toLowerCase()+e.slice(1):``}var at=1e3,ot=new Map;function st(e){let t=ot.get(e);return t===void 0&&(t=e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)?tt(e):e.startsWith(`--`)?e:nt(e),ot.size>=at&&ot.clear(),ot.set(e,t)),t}var ct=/["'\\{}]|\/\*/,lt=/^[-\w]+$/;function ut(e){if(ct.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(!lt.test(n)||!o)return null;t.push(n,o)}r=a+1,i=-1}}return t}function dt(e,t){let n=ut(t);if(n)for(let t=0;t<n.length;t+=2)e[st(n[t])]=n[t+1];else Xe(t,(t,n)=>{e[st(t)]=n})}function ft(e){if(!e)return{};let t={};return dt(t,e),t}function pt(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function mt(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 ht=mt(/[A-Z]/,e=>`-${e.toLowerCase()}`),gt=new Map;function _t(e){let t=gt.get(e);return t===void 0&&(t=ht(e),gt.size>=1e3&&gt.clear(),gt.set(e,t)),t}function vt(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?`
3
+ `:``}${_t(n)}: ${r};`)}return t}function yt(e={}){return vt(e).replace(`
4
+ `,` `)}var bt=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 xt(e){return bt.has(e)}function Z(...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&&xt(e))t[e]=Ne(n,i);else if(a&&o)t[e]=pt(n,i);else if(e===`class`){let r=Oe(n),a=Oe(i);r&&a?t[e]=pe(n,i):r?t[e]=pe(n):a&&(t[e]=pe(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=ft(i);t[e]={...n,...r}}else if(o&&a)t[e]={...ft(n),...i};else if(o&&s){let r=ft(n),a=ft(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=yt(t.style).replaceAll(`
5
+ `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var St=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Ct(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var wt=class extends Map{#e=new Map;#t=j(0);#n=j(0);#r=b||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return b===this.#r?j(e):k(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 d(this.#t),!1}return d(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{d(this.#t);return}}return d(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),U(this.#n,super.size),I(o);else if(i!==t){I(r);var s=o.reactions===null?null:new Set(o.reactions);s!==null&&r.reactions?.every(e=>s.has(e))||I(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),U(n,-1)),r&&(U(this.#n,super.size),I(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;U(this.#n,0);for(var t of e.values())U(t,-1);I(this.#t),e.clear()}}#a(){d(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)d(n)}keys(){return d(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=St,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=o(e=>{let n=s(t,`focusin`,e),r=s(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Ct(this.#e):null}};var Tt=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return C(this.#t)}get(){let e=M(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=M(this.#t);return t===void 0?e:t}set(e){return E(this.#t,e)}};function Et(e,t){switch(e){case`post`:de(t);break;case`pre`:ce(t)}}function Dt(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;Et(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=x(()=>n(t,o));return o=t,r})}function Q(e,t,n){Dt(e,`post`,t,n)}function Ot(e,t,n){Dt(e,`pre`,t,n)}Q.pre=Ot;function kt(e){de(()=>()=>{e()})}function At(e){u().then(e)}var jt=1,Mt=9,Nt=11;function Pt(e){return Y(e)&&e.nodeType===jt&&typeof e.nodeName==`string`}function Ft(e){return Y(e)&&e.nodeType===Mt}function It(e){return Y(e)&&e.constructor?.name===`VisualViewport`}function Lt(e){return Y(e)&&e.nodeType!==void 0}function Rt(e){return Lt(e)&&e.nodeType===Nt&&`host`in e}function zt(e,t){if(!e||!t||!Pt(e)||!Pt(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&Rt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Bt(e){return Ft(e)?e:It(e)?e.document:e?.ownerDocument??document}function Vt(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Ht=class{element;#e=z(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#e)}set root(e){U(this.#e,e)}constructor(e){this.element=typeof e==`function`?X(e):e}getDocument=()=>Bt(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Vt(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 Ut(e,t){return{[r()]:n=>je(e)?(e.current=n,x(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),x(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Wt(e){return e?``:void 0}function Gt(e){return e?`open`:`closed`}function Kt(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var qt=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 Jt(e){let t=new qt(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Yt=typeof document<`u`,Xt=Zt();function Zt(){return Yt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Qt(e){return e instanceof HTMLElement}function $t(e){return e instanceof Element||e instanceof SVGElement}var en=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,kt(()=>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?At(n):n()}},tn=class{#e;#t;#n;#r=j(!1);#i=j(void 0);#a=!1;#o=null;constructor(e){this.#e=e,U(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new en({ref:this.#e.ref,afterTick:this.#e.open}),kt(()=>this.#s()),Q(()=>this.#e.open.current,e=>{!this.#a&&(this.#a=!0,e===d(this.#r))||(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()?(U(this.#r,!1),U(this.#i,void 0),this.#e.onComplete?.()):(e&&U(this.#r,!0),U(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&U(this.#i,void 0)})),this.#t?this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||U(this.#r,!1),U(this.#i,void 0),this.#e.onComplete?.())}):(e||U(this.#r,!1),U(this.#i,void 0),this.#e.onComplete?.())))})}get shouldRender(){return d(this.#r)}get transitionStatus(){return d(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function $(){}function nn(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var rn=Jt({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),an=new Tt(`Dialog.Root | AlertDialog.Root`),on=class e{static create(t){let n=an.getOr(null);return an.set(new e(t,n))}opts;#e=j(null);get triggerNode(){return d(this.#e)}set triggerNode(e){U(this.#e,e,!0)}#t=j(null);get contentNode(){return d(this.#t)}set contentNode(e){U(this.#t,e,!0)}#n=j(null);get overlayNode(){return d(this.#n)}set overlayNode(e){U(this.#n,e,!0)}#r=j(null);get descriptionNode(){return d(this.#r)}set descriptionNode(e){U(this.#r,e,!0)}#i=j(void 0);get contentId(){return d(this.#i)}set contentId(e){U(this.#i,e,!0)}#a=j(void 0);get titleId(){return d(this.#a)}set titleId(e){U(this.#a,e,!0)}#o=j(void 0);get triggerId(){return d(this.#o)}set triggerId(e){U(this.#o,e,!0)}#s=j(void 0);get descriptionId(){return d(this.#s)}set descriptionId(e){U(this.#s,e,!0)}#c=j(null);get cancelNode(){return d(this.#c)}set cancelNode(e){U(this.#c,e,!0)}#l=j(0);get nestedOpenCount(){return d(this.#l)}set nestedOpenCount(e){U(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new tn({ref:X(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new tn({ref:X(()=>this.overlayNode),open:this.opts.open,enabled:!0}),Q(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),kt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>rn.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=z(()=>({"data-state":Gt(this.opts.open.current)}));get sharedProps(){return d(this.#u)}set sharedProps(e){U(this.#u,e)}},sn=class e{static create(t){return new e(t,an.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ut(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=z(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(e){U(this.#e,e)}},cn=class e{static create(t){return new e(t,an.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=Ut(this.opts.ref),Q.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=z(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(e){U(this.#e,e)}},ln=class e{static create(t){return new e(t,an.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=Ut(this.opts.ref,e=>{this.root.descriptionNode=e}),Q.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=z(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(e){U(this.#e,e)}},un=class e{static create(t){return new e(t,an.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ut(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=z(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(e){U(this.#e,e)}#t=z(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":Wt(this.root.nestedOpenCount>0),"data-nested":Wt(this.root.parent!==null),...Kt(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(e){U(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},dn=class e{static create(t){return new e(t,an.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ut(this.opts.ref,e=>this.root.overlayNode=e)}#e=z(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#e)}set snippetProps(e){U(this.#e,e)}#t=z(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Wt(this.root.nestedOpenCount>0),"data-nested":Wt(this.root.parent!==null),...Kt(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(e){U(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},fn=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`level`]),pn=h(`<div><!></div>`);function mn(e,n){let r=t();K(n,!0);let o=H(n,`id`,19,()=>nn(r)),s=H(n,`ref`,15,null),c=H(n,`level`,3,2),u=L(n,fn),p=cn.create({id:X(()=>o()),level:X(()=>c()),ref:X(()=>s(),e=>s(e))}),m=z(()=>Z(u,p.props));var h=f(),g=T(h),_=e=>{var t=f(),r=T(t);F(r,()=>n.child,()=>({props:d(m)})),l(e,t)},ee=e=>{var t=pn();D(t,()=>({...d(m)}));var r=P(t);F(r,()=>n.children??a),v(t),l(e,t)};i(g,e=>{n.child?e(_):e(ee,-1)}),l(e,h),G()}function hn(e,t){var n=f(),r=T(n);_(r,()=>t.children,e=>{var n=f(),r=T(n);F(r,()=>t.children??a),l(e,n)}),l(e,n)}var gn=new Tt(`BitsConfig`);function _n(){let e=new vn(null,{});return gn.getOr(e).opts}var vn=class{opts;constructor(e,t){let n=yn(e,t);this.opts={dir:n(e=>e.dir),defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function yn(e,t){return n=>X(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function bn(e,t){return n=>{let r=_n();return X(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var xn=bn(e=>e.defaultPortalTo,`body`);function Sn(e,t){K(t,!0);let n=xn(()=>t.to),r=ie(),o=z(s);function s(){if(!Yt||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let c;function u(){c&&=(m(c),null)}Q([()=>d(o),()=>t.disabled],([e,n])=>{if(!e||n)u();else return c=ae(hn,{target:e,props:{children:t.children},context:r}),()=>{u()}});var p=f(),h=T(p),g=e=>{var n=f(),r=T(n);F(r,()=>t.children??a),l(e,n)};i(h,e=>{t.disabled&&e(g)}),l(e,p),G()}var Cn=new WeakMap;function wn(e,t=e.composedPath()){Cn.set(e,t)}function Tn(e){return Cn.get(e)??e.composedPath()}function En(e,t){return t?$t(e.target)&&t.contains(e.target)||Tn(e).includes(t):!1}function Dn(e,t){for(let n of Tn(e))if($t(n)&&n.matches(t))return n;return $t(e.target)?e.target.closest(t):null}function On(e,t){wn(t,Tn(e))}function kn(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 An(e,t){return e===t||e.contains(t)}function jn(e){return e?.ownerDocument??document}function Mn(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 Nn=`data-context-menu-trigger`,Pn=`data-context-menu-content`;globalThis.bitsDismissableLayers??=new Map;var Fn=class e{static create(t){return new e(t)}opts;#e=$;#t=()=>!1;#n=null;#r=Me(`close`);#i={pointerdown:!1};#a=!1;#o=null;#s=!1;#c=void 0;#l=$;#u=$;#d=!1;constructor(e){this.opts=e,ce(()=>{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=$,n=null,r=()=>{n=null,this.#x(),globalThis.bitsDismissableLayers.delete(this),this.#g.destroy(),this.#u(),t()};Q([()=>this.opts.enabled.current,()=>this.opts.ref.current],([e,i])=>{let a=e?i:null;n!==a&&(r(),a&&(n=a,this.#c=jn(a),globalThis.bitsDismissableLayers.set(this,this.#r),t=this.#p()))}),kt(()=>{this.#d=!0,r()})}#f=e=>{e.defaultPrevented||this.#d||!this.#n||At(()=>{this.#d||this.#n&&!this.#b(e.target)&&e.target&&!this.#s&&this.#l?.(e)})};#p(){let e=this.#c,t=e=>{x(()=>{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),pt(()=>e.removeEventListener(`pointerdown`,t,!0),()=>e.removeEventListener(`pointerdown`,n),s(e,`focusin`,this.#f))}#m=e=>{let t=e;t.defaultPrevented&&(t=zn(e)),this.#e(e)};#h=e=>{if(!this.#n){this.#u();return}let t=this.#t(e,this.#n)||Rn(e,this.#n);if(!this.#a||this.#S()||!t){this.#u();return}let n=e;if(n.defaultPrevented&&(n=zn(n)),this.#r.current!==`close`&&this.#r.current!==`defer-otherwise-close`)this.#u();else if(e.pointerType===`touch`){this.#u();let e=null,t=$,n=e=>{t(),this.#m(e)};t=pt(s(this.#c,`click`,n,{once:!0}),s(this.#c,`click`,t=>{wn(t),e=setTimeout(()=>n(t),0)},{once:!0,capture:!0}),()=>{e!==null&&clearTimeout(e),e=null}),this.#u=t}else this.#e(n)};#g=kn(this.#h,10);#_=e=>{this.#i[e.type]=!0};#v=e=>{this.#i[e.type]=!1};#y=e=>{this.#o=e,wn(e),this.#n&&(this.#a=Ln(this))};#b=e=>this.#n?An(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 In(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Ln(e){let t=[...globalThis.bitsDismissableLayers],n=In(t);if(n)return n[0]===e;let[r]=t[0];return r===e}function Rn(e,t){let n=e.target;if(!$t(n))return!1;let r=!!Dn(e,`[${Nn}]`),i=!!t.closest(`[${Pn}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:jn(n).documentElement.contains(n)&&!En(e,t)&&Mn(e,t)}function zn(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 On(e,a),a}function Bn(e,t){K(t,!0);let n=H(t,`interactOutsideBehavior`,3,`close`),r=H(t,`onInteractOutside`,3,$),i=H(t,`onFocusOutside`,3,$),o=H(t,`isValidEvent`,3,()=>!1),s=Fn.create({id:X(()=>t.id),interactOutsideBehavior:X(()=>n()),onInteractOutside:X(()=>r()),enabled:X(()=>t.enabled),onFocusOutside:X(()=>i()),isValidEvent:X(()=>o()),ref:x(()=>t.ref)});var c=f(),u=T(c);F(u,()=>t.children??a,()=>({props:s.props})),l(e,c),G()}globalThis.bitsEscapeLayers??=new Map;var Vn=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Ht(this.opts.ref);let t=$;Q(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>s(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!Hn(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 Hn(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 Un(e,t){K(t,!0);let n=H(t,`escapeKeydownBehavior`,3,`close`),r=H(t,`onEscapeKeydown`,3,$);Vn.create({escapeKeydownBehavior:X(()=>n()),onEscapeKeydown:X(()=>r()),enabled:X(()=>t.enabled),ref:x(()=>t.ref)});var i=f(),o=T(i);F(o,()=>t.children??a),l(e,i),G()}var Wn=class e{static instance;#e=Me([]);#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=Vt(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)}},Gn=[`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] *)`],Kn=Gn.join(`,`),qn=typeof Element>`u`,Jn=qn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yn=!qn&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},Xn=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]`):Xn(e.parentNode))},Zn=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`},Qn=function(e,t,n){if(Xn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Kn));return t&&Jn.call(e,Kn)&&r.unshift(e),r=r.filter(n),r},$n=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Xn(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=$n(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Jn.call(a,Kn)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Xn(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=$n(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},er=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},tr=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Zn(e))&&!er(e)?0:e.tabIndex},nr=function(e,t){var n=tr(e);return n<0&&t&&!er(e)?0:n},rr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ir=function(e){return e.tagName===`INPUT`},ar=function(e){return ir(e)&&e.type===`hidden`},or=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},sr=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},cr=function(e){if(!e.name)return!0;var t=e.form||Yn(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=sr(r,e.form);return!i||i===e},lr=function(e){return ir(e)&&e.type===`radio`},ur=function(e){return lr(e)&&!cr(e)},dr=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},fr=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=Jn.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Jn.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=Yn(e);if(s&&!s.shadowRoot&&r(s)===!0)return dr(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(e.isConnected)return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return dr(e);return!1},pr=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 Jn.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},mr=function(e,t){return!(t.disabled||ar(t)||fr(t,e)||or(t)||pr(t))},hr=function(e,t){return!(ur(t)||tr(t)<0||!mr(e,t))},gr=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},_r=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=nr(a,i),s=i?_r(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(rr).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},vr=function(e,t){return t||={},_r(t.getShadowRoot?$n([e],t.includeContainer,{filter:hr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gr}):Qn(e,t.includeContainer,hr.bind(null,t)))},yr=function(e,t){return t||={},t.getShadowRoot?$n([e],t.includeContainer,{filter:mr.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Qn(e,t.includeContainer,mr.bind(null,t))},br=Gn.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),xr=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Jn.call(e,br)!==!1&&mr(t,e)};function Sr(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 Cr=class e{#e=!1;#t=null;#n=Wn.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(Sr(Vt(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(s(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=Sr(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)&&xr(n))t.preventDefault(),n.focus({preventScroll:!0});else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus({preventScroll:!0})}}},{capture:!0}),s(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&&Vt(t)===i?(e.preventDefault(),r.focus()):e.shiftKey&&Vt(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?vr(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?yr(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return Q([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),kt(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function wr(e,t){K(t,!0);let n=H(t,`enabled`,3,!1),r=H(t,`trapFocus`,3,!1),i=H(t,`loop`,3,!1),o=H(t,`onCloseAutoFocus`,3,$),s=H(t,`onOpenAutoFocus`,3,$),c=Cr.use({enabled:X(()=>n()),trap:X(()=>r()),loop:x(()=>i()),onCloseAutoFocus:X(()=>o()),onOpenAutoFocus:X(()=>s()),ref:x(()=>t.ref)});var u=f(),d=T(u);F(d,()=>t.focusScope??a,()=>({props:c.props})),l(e,u),G()}var Tr=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var Er=class e{static create(t){return new e(t)}opts;domContext;#e=$;#t=!1;#n=Tr;#r=Tr;constructor(e){this.opts=e,this.domContext=new Ht(e.ref);let t=$;Q(()=>[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 pt(s(this.domContext.getDocument(),`pointerdown`,this.#o),s(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;Qt(t)&&Qt(n)&&Ar(this)&&zt(t,n)&&(this.#n(e),e.defaultPrevented||(this.#e=Or(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=$}},Dr=e=>e.style.userSelect||e.style.webkitUserSelect;function Or(e,t){let n=Dr(t),r=Dr(e);return kr(t,`none`),kr(e,`text`),()=>{kr(t,n),kr(e,r)}}function kr(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Ar(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function jr(e,t){K(t,!0);let n=H(t,`preventOverflowTextSelection`,3,!0),r=H(t,`onPointerDown`,3,$),i=H(t,`onPointerUp`,3,$);Er.create({id:X(()=>t.id),onPointerDown:X(()=>r()),onPointerUp:X(()=>i()),enabled:X(()=>t.enabled&&n()),ref:x(()=>t.ref)});var o=f(),s=T(o);F(s,()=>t.children??a),l(e,o),G()}globalThis.bitsIdCounter??={current:0};function Mr(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Nr=class{#e;#t=0;#n=j();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),U(this.#n,void 0),this.#r=void 0)}get(...t){return this.#t+=1,d(this.#n)===void 0&&(this.#r=e(()=>{U(this.#n,this.#e(...t),!0)})),de(()=>()=>{this.#i()}),d(this.#n)}},Pr=new wt,Fr=new Map,Ir=[`padding-right`,`margin-right`,`overflow`,`overflow-x`,`overflow-y`,`pointer-events`,`--scrollbar-width`],Lr=null,Rr=!1,zr=new Set,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){e.setProperty(t,n),zr.add(t),t===`overflow`&&(zr.add(`overflow-x`),zr.add(`overflow-y`))}var Wr=X(()=>{for(let e of Pr.values())if(e)return!0;return!1}),Gr=X(()=>{for(let[e,t]of Pr)if(t&&(Fr.get(e)?.()??!0))return!0;return!1}),Kr=null,qr=new Nr(()=>{function e(e,t){let n=Lr?.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 Ir)zr.has(n)&&e(t,n);!Rr&&t.body.style.length===0&&t.body.removeAttribute(`style`),Lr=null,zr.clear(),Xt&&Br?.()}function n(t){zr.delete(`pointer-events`)&&e(t,`pointer-events`)}function r(){Vr!==null&&(window.clearTimeout(Vr),Vr=null)}function i(e,t){r(),Hr=!0,Kr=Date.now();let n=Kr,i=()=>{Vr=null,Kr===n&&(Yr(Pr)?Hr=!1:(Hr=!1,t()))},a=e===null?24:e;Vr=window.setTimeout(i,a)}function a(){if(Lr===null&&Pr.size===0&&!Hr){Rr=document.body.hasAttribute(`style`),Lr=new Map;for(let e of Ir)Lr.set(e,{value:document.body.style.getPropertyValue(e),priority:document.body.style.getPropertyPriority(e)})}}return Q(()=>Wr.current,()=>{if(!Wr.current)return;a(),Hr=!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&&(Ur(document.body.style,`padding-right`,`${i.padding}px`),Ur(document.body.style,`margin-right`,`${i.margin}px`),Ur(document.body.style,`--scrollbar-width`,`${r}px`)),Ur(document.body.style,`overflow`,`hidden`),Xt&&(Br=s(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),At(()=>{Gr.current&&Ur(document.body.style,`pointer-events`,`none`),Ur(document.body.style,`overflow`,`hidden`)})}),Q(()=>Gr.current,()=>{Wr.current&&At(()=>{Wr.current&&(Gr.current?Ur(document.body.style,`pointer-events`,`none`):n(document))})},{lazy:!0}),kt(()=>()=>{Br?.()}),{get lockMap(){return Pr},resetBodyStyle:t,restorePointerEvents:n,scheduleCleanupIfNoNewLocks:i,cancelPendingCleanup:r,ensureInitialStyleCaptured:a}}),Jr=class{#e=Mr();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null,n=()=>!0){this.#t=e,this.#n=t,this.#r=qr.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),Fr.set(this.#e,n),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=X(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),kt(()=>{if(this.#r.lockMap.delete(this.#e),Fr.delete(this.#e),Yr(this.#r.lockMap))return;let e=this.#n(),t=document;this.#r.restorePointerEvents(t),this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle(t)})}))}};function Yr(e){for(let[t,n]of e)if(n)return!0;return!1}function Xr(e,t){K(t,!0);let n=H(t,`preventScroll`,3,!0),r=H(t,`restoreScrollDelay`,3,null),i=H(t,`blockPointer`,3,()=>!0);x(()=>{n()&&new Jr(n(),()=>r(),i())}),G()}var Zr=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`forceMount`,`child`,`children`,`ref`]),Qr=h(`<div><!></div>`);function $r(e,n){let r=t();K(n,!0);let o=H(n,`id`,19,()=>nn(r)),s=H(n,`forceMount`,3,!1),c=H(n,`ref`,15,null),u=L(n,Zr),p=dn.create({id:X(()=>o()),ref:X(()=>c(),e=>c(e))}),m=z(()=>Z(u,p.props));var h=f(),g=T(h),_=e=>{var t=f(),r=T(t),o=e=>{var t=f(),r=T(t);{let e=z(()=>({props:Z(d(m)),...p.snippetProps}));F(r,()=>n.child,()=>d(e))}l(e,t)},s=e=>{var t=Qr();D(t,e=>({...e}),[()=>Z(d(m))]);var r=P(t);F(r,()=>n.children??a,()=>p.snippetProps),v(t),l(e,t)};i(r,e=>{n.child?e(o):e(s,-1)}),l(e,t)};i(g,e=>{(p.shouldRender||s())&&e(_)}),l(e,h),G()}var ei=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`]),ti=h(`<div><!></div>`);function ni(e,n){let r=t();K(n,!0);let o=H(n,`id`,19,()=>nn(r)),s=H(n,`ref`,15,null),c=L(n,ei),u=ln.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e))}),p=z(()=>Z(c,u.props));var m=f(),h=T(m),g=e=>{var t=f(),r=T(t);F(r,()=>n.child,()=>({props:d(p)})),l(e,t)},_=e=>{var t=ti();D(t,()=>({...d(p)}));var r=P(t);F(r,()=>n.children??a),v(t),l(e,t)};i(h,e=>{n.child?e(g):e(_,-1)}),l(e,m),G()}function ri(e,t){K(t,!0);let n=H(t,`open`,15,!1),r=H(t,`onOpenChange`,3,$),i=H(t,`onOpenChangeComplete`,3,$);on.create({variant:X(()=>`dialog`),open:X(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:X(()=>i())});var o=f(),s=T(o);F(s,()=>t.children??a),l(e,o),G()}var ii=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`disabled`]),ai=h(`<button><!></button>`);function oi(e,n){let r=t();K(n,!0);let o=H(n,`id`,19,()=>nn(r)),s=H(n,`ref`,15,null),c=H(n,`disabled`,3,!1),u=L(n,ii),p=sn.create({variant:X(()=>`close`),id:X(()=>o()),ref:X(()=>s(),e=>s(e)),disabled:X(()=>!!c())}),m=z(()=>Z(u,p.props));var h=f(),g=T(h),_=e=>{var t=f(),r=T(t);F(r,()=>n.child,()=>({props:d(m)})),l(e,t)},ee=e=>{var t=ai();D(t,()=>({...d(m)}));var r=P(t);F(r,()=>n.children??a),v(t),l(e,t)};i(g,e=>{n.child?e(_):e(ee,-1)}),l(e,h),G()}var si=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`preventOverflowTextSelection`,`restoreScrollDelay`,`preventBodyPointerEvents`]),ci=h(`<!> <!>`,1),li=h(`<!> <div><!></div>`,1);function ui(e,n){let r=t();K(n,!0);let o=H(n,`id`,19,()=>nn(r)),s=H(n,`ref`,15,null),c=H(n,`forceMount`,3,!1),u=H(n,`onCloseAutoFocus`,3,$),p=H(n,`onOpenAutoFocus`,3,$),m=H(n,`onEscapeKeydown`,3,$),h=H(n,`onInteractOutside`,3,$),g=H(n,`trapFocus`,3,!0),_=H(n,`preventScroll`,3,!0),ee=H(n,`preventOverflowTextSelection`,3,!0),y=H(n,`restoreScrollDelay`,3,null),te=H(n,`preventBodyPointerEvents`,3,!0),b=L(n,si),x=un.create({id:X(()=>o()),ref:X(()=>s(),e=>s(e))}),S=()=>te()||!x.root.overlayNode,C=z(()=>Z(b,x.props));var w=f(),E=T(w),O=e=>{wr(e,{get ref(){return x.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return x.root.opts.open.current},get onOpenAutoFocus(){return p()},get onCloseAutoFocus(){return u()},focusScope:(e,t)=>{let r=()=>(t?.()).props;Un(e,B(()=>d(C),{get enabled(){return x.root.opts.open.current},get ref(){return x.opts.ref},onEscapeKeydown:e=>{m()(e),e.defaultPrevented||x.root.handleClose()},children:(e,t)=>{Bn(e,B(()=>d(C),{get ref(){return x.opts.ref},get enabled(){return x.root.opts.open.current},onInteractOutside:e=>{h()(e),e.defaultPrevented||x.root.handleClose()},children:(e,t)=>{jr(e,B(()=>d(C),{get preventOverflowTextSelection(){return ee()},get ref(){return x.opts.ref},get enabled(){return x.root.opts.open.current},children:(e,t)=>{var o=f(),s=T(o),c=e=>{var t=ci(),a=T(t),o=e=>{Xr(e,{get preventScroll(){return _()},get restoreScrollDelay(){return y()},blockPointer:S})};i(a,e=>{x.root.opts.open.current&&e(o)});var s=V(a,2);{let e=z(()=>({props:Z(d(C),r()),...x.snippetProps}));F(s,()=>n.child,()=>d(e))}l(e,t)},u=e=>{var t=li(),i=T(t);Xr(i,{get preventScroll(){return _()},blockPointer:S});var o=V(i,2);D(o,e=>({...e}),[()=>Z(d(C),r())]);var s=P(o);F(s,()=>n.children??a),v(o),l(e,t)};i(s,e=>{n.child?e(c):e(u,-1)}),l(e,o)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};i(E,e=>{(x.shouldRender||c())&&e(O)}),l(e,w),G()}var di=new Set([`$$slots`,`$$events`,`$$legacy`,`open`]);function fi(e,t){K(t,!0);let n=H(t,`open`,15,!1),r=L(t,di);var i=f(),a=T(i);g(a,()=>ri,(e,t)=>{t(e,B(()=>r,{get open(){return n()},set open(e){n(e)}}))}),l(e,i),G()}var pi=new Set([`$$slots`,`$$events`,`$$legacy`]);function mi(e,t){let n=L(t,pi);var r=f(),i=T(r);g(i,()=>Sn,(e,t)=>{t(e,B(()=>n))}),l(e,r)}var hi=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function gi(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=L(t,hi);var i=f(),a=T(i);{let e=z(()=>q(`text-lg leading-none font-semibold`,t.class));g(a,()=>mn,(t,i)=>{i(t,B({"data-slot":`dialog-title`,get class(){return d(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}l(e,i),G()}var _i=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),vi=h(`<div><!></div>`);function yi(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=L(t,_i);var i=vi();D(i,e=>({"data-slot":`dialog-header`,class:e,...r}),[()=>q(`flex flex-col gap-2 text-center sm:text-start`,t.class)]);var o=P(i);F(o,()=>t.children??a),v(i),N(i,e=>n(e),()=>n()),l(e,i),G()}var bi=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function xi(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=L(t,bi);var i=f(),a=T(i);{let e=z(()=>q(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,t.class));g(a,()=>$r,(t,i)=>{i(t,B({"data-slot":`dialog-overlay`,get class(){return d(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}l(e,i),G()}var Si=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`portalProps`,`children`,`showCloseButton`]),Ci=h(`<span aria-hidden="true">×</span> <span class="sr-only">Close</span>`,1),wi=h(`<!> <!>`,1);function Ti(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=H(t,`showCloseButton`,3,!0),o=L(t,Si);mi(e,B(()=>t.portalProps,{children:(e,s)=>{var c=wi(),u=T(c);g(u,()=>xi,(e,t)=>{t(e,{})});var p=V(u,2);{let e=z(()=>q(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,t.class));g(p,()=>ui,(s,c)=>{c(s,B({"data-slot":`dialog-content`,get class(){return d(e)}},()=>o,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var o=wi(),s=T(o);F(s,()=>t.children??a);var c=V(s,2),u=e=>{var t=f(),n=T(t);g(n,()=>oi,(e,t)=>{t(e,{class:`ring-offset-background focus:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:(e,t)=>{var n=Ci();fe(2),l(e,n)},$$slots:{default:!0}})}),l(e,t)};i(c,e=>{r()&&e(u)}),l(e,o)},$$slots:{default:!0}}))})}l(e,c)},$$slots:{default:!0}})),G()}var Ei=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Di(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=L(t,Ei);var i=f(),a=T(i);{let e=z(()=>q(`text-muted-foreground text-sm`,t.class));g(a,()=>ni,(t,i)=>{i(t,B({"data-slot":`dialog-description`,get class(){return d(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}l(e,i),G()}var Oi=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function ki(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=L(t,Oi);var i=f(),a=T(i);g(a,()=>oi,(e,t)=>{t(e,B({"data-slot":`dialog-close`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),l(e,i),G()}var Ai=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),ji=h(`<input/>`);function Mi(e,t){K(t,!0);let n=H(t,`ref`,15,null),r=H(t,`value`,15),a=H(t,`files`,15),o=H(t,`data-slot`,3,`input`),s=L(t,Ai);var c=f(),u=T(c),d=e=>{var i=ji();D(i,e=>({"data-slot":o(),class:e,type:`file`,...s}),[()=>q(`selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,t.class)],void 0,void 0,void 0,!0),N(i,e=>n(e),()=>n()),w(i,a),le(i,r),l(e,i)},p=e=>{var i=ji();D(i,e=>({"data-slot":o(),class:e,type:t.type,...s}),[()=>q(`border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,t.class)],void 0,void 0,void 0,!0),N(i,e=>n(e),()=>n()),le(i,r),l(e,i)};i(u,e=>{t.type===`file`?e(d):e(p,-1)}),l(e,c),G()}var Ni=h(`<span aria-hidden="true">×</span>`),Pi=h(`<!> <!>`,1),Fi=h(`<option></option>`),Ii=h(`<span data-tone="danger"> </span>`),Li=h(`<p data-tone="danger" role="alert"><code class="font-mono"> </code> </p>`),Ri=h(`<option> </option>`),zi=h(`<li><code class="font-mono"> </code> </li>`),Bi=h(`<details class="text-[12px] text-muted-foreground"><summary> </summary> <ul></ul></details>`),Vi=h(`<span data-tone="danger" aria-hidden="true">*</span>`),Hi=h(`<input type="checkbox" class="size-4 accent-primary"/>`),Ui=h(`<select><option>—</option><!></select>`),Wi=h(`<span class="text-[11px] text-muted-foreground"> </span>`),Gi=h(`<label class="flex flex-col gap-1 text-[12px] text-muted-foreground"><span> <!> <!></span> <!> <!> <!></label>`),Ki=h(`<!> <div class="grid grid-cols-1 gap-2.5 sm:grid-cols-2"><label class="flex flex-col gap-1 text-[12px] text-muted-foreground"><span>Isolation</span> <select><option>none</option><option>worktree</option></select></label> <label class="flex flex-col gap-1 text-[12px] text-muted-foreground"><span>Executor</span> <select><option>server default</option><!></select></label></div>`,1),qi=h(`<label class="flex flex-col gap-1 text-[12px] text-muted-foreground"><span>Playbook</span> <select></select></label> <!> <!>`,1),Ji=h(`<p class="m-0 text-[11px] text-muted-foreground">Enter a repository directory and press Load to list its playbooks.</p>`),Yi=h(`<!> <!> <form class="flex flex-col gap-3 px-4 pt-3.5 pb-4"><label class="flex flex-col gap-1 text-[12px] text-muted-foreground"><span>Working directory</span> <div class="flex gap-1.5"><!> <!></div> <datalist id="argos-cwd-recents"></datalist> <!></label> <!> <!> <!> <footer class="flex justify-end gap-2 pt-1"><!> <!></footer></form>`,1);function Xi(e,t){K(t,!0);let r=H(t,`api`,19,be),a=j(``),o=j(O([])),s=j(!1),c=j(O([])),m=j(null),h=j(O([])),_=j(``),b=j(O({})),x=j(`none`),C=j(``),w=j(O([])),E=j(O({})),D=j(null),k=j(!1),M=j(O(Se())),ie=j(null),N=z(()=>d(c).find(e=>e.id===d(_))??null),ae=`h-9 rounded-md border border-input bg-background px-3 text-sm text-foreground`;function F(){let e=we();U(o,e,!0),U(a,t.initial?.cwd??e[0]??``,!0),U(c,[],!0),U(m,null),U(h,[],!0),U(_,t.initial?.playbookId??``,!0),U(b,{},!0),U(x,`none`),U(C,``),U(w,[],!0),U(E,{},!0),U(D,null),U(k,!1),U(M,Se(),!0)}async function I(){let e=d(a).trim();if(e===``)U(m,{code:`invalid_request`,message:`Enter a working directory first.`},!0);else{U(s,!0),U(m,null);try{let t=await r().listPlaybooks(e);U(c,t.playbooks,!0),U(h,t.errors,!0),d(_)!==``&&!d(c).some(e=>e.id===d(_))&&U(_,d(c)[0]?.id??``,!0),d(_)===``&&U(_,d(c)[0]?.id??``,!0),L()}catch(e){let t=ge(e);U(m,{code:t.code,message:t.message},!0)}finally{U(s,!1)}}}function L(){let e=d(c).find(e=>e.id===d(_));if(e!==void 0){U(b,xe(e.inputs),!0);for(let[e,n]of Object.entries(t.initial?.inputs??{}))d(b)[e]=typeof n==`boolean`?n:String(n);U(x,e.isolation??`none`,!0),U(C,e.executor??``,!0),U(o,Ee(d(o),d(a)),!0),Te(d(o))}}function ce(e){U(_,e.currentTarget.value,!0),L()}function le(e){return d(E)[e]}async function B(e){if(e.preventDefault(),d(N)===null||d(k))return;let n=Ce({playbook:d(N),cwd:d(a),values:d(b),isolation:d(x),...d(C)===``?{}:{executor:d(C)}});if(U(E,n.ok?{}:n.errors,!0),!n.ok)return;let i={...n.request,clientRequestId:d(M)};U(k,!0),U(D,null);try{let e=await r().startRun(i);U(o,Ee(d(o),d(a)),!0),Te(d(o)),t.onStarted(e.runId)}catch(e){let t=ge(e);U(D,{code:t.code,message:t.message},!0)}finally{U(k,!1)}}let pe=!1;de(()=>{t.open?pe||(pe=!0,F(),d(a).trim()!==``&&I(),u().then(()=>{d(ie)?.focus()}),r().info().then(e=>{U(w,(e.executors??[]).map(e=>e.id),!0)}).catch(()=>{U(w,[],!0)})):pe=!1});function q(e){return e.type===`boolean`?`boolean`:e.type===`number`?`number`:e.type===`enum`||e.values!==void 0&&e.values.length>0?`enum`:`text`}var Y=f(),De=T(Y);g(De,()=>fi,(e,r)=>{r(e,{get open(){return t.open},onOpenChange:e=>{e||t.onClose()},children:(e,r)=>{var u=f(),O=T(u);g(O,()=>Ti,(e,r)=>{r(e,{class:`max-h-[calc(100vh-4rem)] w-full max-w-[620px] gap-0 overflow-y-auto bg-card p-0 text-card-foreground sm:max-w-[620px]`,showCloseButton:!1,children:(e,r)=>{var u=Yi(),f=T(u);g(f,()=>yi,(e,t)=>{t(e,{class:`flex-row items-center justify-between gap-2 border-b border-border px-4 py-3 text-start`,children:(e,t)=>{var n=Pi(),r=T(n);g(r,()=>gi,(e,t)=>{t(e,{class:`text-[15px] font-semibold`,children:(e,t)=>{fe();var n=y(`Run workflow`);l(e,n)},$$slots:{default:!0}})});var i=V(r,2);g(i,()=>ki,(e,t)=>{t(e,{class:`inline-flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground`,"aria-label":`Close`,children:(e,t)=>{var n=Ni();l(e,n)},$$slots:{default:!0}})}),l(e,n)},$$slots:{default:!0}})});var O=V(f,2);g(O,()=>Di,(e,t)=>{t(e,{class:`sr-only`,children:(e,t)=>{fe();var n=y(`List a repository's playbooks and start one.`);l(e,n)},$$slots:{default:!0}})});var j=V(O,2),M=P(j),F=V(P(M),2),L=P(F);Mi(L,{list:`argos-cwd-recents`,placeholder:`/absolute/path/to/repo`,spellcheck:`false`,autocomplete:`off`,get ref(){return d(ie)},set ref(e){U(ie,e,!0)},get value(){return d(a)},set value(e){U(a,e,!0)}});var H=V(L,2);ye(H,{type:`button`,variant:`secondary`,class:`shrink-0`,get disabled(){return d(s)},onclick:I,children:(e,t)=>{fe();var n=y();A(()=>p(n,d(s)?`Loading…`:`Load`)),l(e,n)},$$slots:{default:!0}}),v(F);var de=V(F,2);n(de,20,()=>d(o),e=>e,(e,t)=>{var n=Fi(),r={};A(()=>{r!==(r=t)&&(n.value=(n.__value=r)??``)}),l(e,n)}),v(de);var G=V(de,2),pe=e=>{var t=Ii(),n=R(t,!0);A(e=>{S(t,1,e),p(n,d(E).cwd)},[()=>W([`text-[12px]`,J(me,`danger`)])]),l(e,t)};i(G,e=>{d(E).cwd&&e(pe)}),v(M);var K=V(M,2),ge=e=>{var t=Li(),n=P(t),r=R(n,!0),i=V(n);v(t),A(e=>{S(t,1,e),p(r,d(m).code),p(i,` ${d(m).message??``}`)},[()=>W([`m-0 rounded-md border p-2.5 text-[13px]`,J(_e,`danger`),J(ve,`danger`),J(me,`danger`)])]),l(e,t)};i(K,e=>{d(m)!==null&&e(ge)});var be=V(K,2),xe=e=>{var t=qi(),r=T(t),a=V(P(r),2);S(a,1,W(ae)),n(a,21,()=>d(c),e=>e.id,(e,t)=>{var n=Ri(),r=R(n),i={};A(()=>{p(r,`${d(t).id??``} · ${d(t).stepCount??``} steps${d(t).inputs.length>0?` · ${d(t).inputs.length} inputs`:``}`),i!==(i=d(t).id)&&(n.value=(n.__value=i)??``)}),l(e,n)}),v(a);var o;se(a),v(r);var s=V(r,2),u=e=>{var t=Bi(),r=P(t),i=R(r),a=V(r,2);n(a,21,()=>d(h),e=>e.file,(e,t)=>{var n=zi(),r=P(n),i=R(r,!0),a=V(r);v(n),A(()=>{p(i,d(t).code),p(a,` ${d(t).file??``}`)}),l(e,n)}),v(a),v(t),A(()=>p(i,`${d(h).length??``} playbook(s) could not be loaded`)),l(e,t)};i(s,e=>{d(h).length>0&&e(u)});var f=V(s,2),m=e=>{var t=Ki(),r=T(t);n(r,17,()=>d(N).inputs,e=>e.name,(e,t)=>{var r=Gi(),a=P(r),o=P(a),s=V(o),c=e=>{var t=Vi();A(e=>S(t,1,e),[()=>W([`ml-0.5`,J(me,`danger`)])]),l(e,t)};i(s,e=>{d(t).required&&e(c)});var u=V(s,2);he(u,{variant:`outline`,class:`ml-1.5 text-[10px] uppercase`,children:(e,n)=>{fe();var r=y();A(()=>p(r,d(t).type)),l(e,r)},$$slots:{default:!0}}),v(a);var f=V(a,2),m=e=>{var n=Hi();oe(n),A(()=>ne(n,d(b)[d(t).name]===!0)),ee(`change`,n,e=>{d(b)[d(t).name]=e.currentTarget.checked}),l(e,n)},h=z(()=>q(d(t))===`boolean`),g=e=>{var r=Ui();S(r,1,W(ae));var i=P(r);i.value=i.__value=``;var a=V(i);n(a,16,()=>d(t).values??[],e=>e,(e,t)=>{var n=Ri(),r=R(n,!0),i={};A(()=>{p(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),l(e,n)}),v(r);var o;se(r),A(e=>{o!==(o=e)&&(r.value=(r.__value=o)??``,re(r,o))},[()=>String(d(b)[d(t).name]??``)]),ee(`change`,r,e=>{d(b)[d(t).name]=e.currentTarget.value}),l(e,r)},_=z(()=>q(d(t))===`enum`),te=e=>{{let n=z(()=>q(d(t))===`number`?`decimal`:void 0),r=z(()=>String(d(b)[d(t).name]??``)),i=z(()=>le(d(t).name)!==void 0);Mi(e,{type:`text`,get inputmode(){return d(n)},get value(){return d(r)},get"aria-invalid"(){return d(i)},oninput:e=>{d(b)[d(t).name]=e.currentTarget.value}})}};i(f,e=>{d(h)?e(m):d(_)?e(g,1):e(te,-1)});var x=V(f,2),C=e=>{var n=Wi(),r=R(n,!0);A(()=>p(r,d(t).description)),l(e,n)};i(x,e=>{d(t).description&&e(C)});var w=V(x,2),T=e=>{var n=Ii(),r=R(n,!0);A((e,t)=>{S(n,1,e),p(r,t)},[()=>W([`text-[12px]`,J(me,`danger`)]),()=>le(d(t).name)]),l(e,n)},E=z(()=>le(d(t).name));i(w,e=>{d(E)&&e(T)}),v(r),A(()=>p(o,`${d(t).name??``} `)),l(e,r)});var a=V(r,2),o=P(a),s=V(P(o),2);S(s,1,W(ae));var c=P(s);c.value=c.__value=`none`;var u=V(c);u.value=u.__value=`worktree`,v(s),se(s),v(o);var f=V(o,2),m=V(P(f),2);S(m,1,W(ae));var h=P(m);h.value=h.__value=``;var g=V(h);n(g,16,()=>d(w),e=>e,(e,t)=>{var n=Ri(),r=R(n,!0),i={};A(()=>{p(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),l(e,n)}),v(m),se(m),v(f),v(a),ue(s,()=>d(x),e=>U(x,e)),ue(m,()=>d(C),e=>U(C,e)),l(e,t)};i(f,e=>{d(N)!==null&&e(m)}),A(()=>{o!==(o=d(_))&&(a.value=(a.__value=o)??``,re(a,o))}),ee(`change`,a,ce),l(e,t)},Se=e=>{var t=Ji();l(e,t)};i(be,e=>{d(c).length>0?e(xe):d(s)||e(Se,1)});var Ce=V(be,2),we=e=>{var t=Li(),n=P(t),r=R(n,!0),i=V(n);v(t),A(e=>{S(t,1,e),p(r,d(D).code),p(i,` ${d(D).message??``}`)},[()=>W([`m-0 rounded-md border p-2.5 text-[13px]`,J(_e,`danger`),J(ve,`danger`),J(me,`danger`)])]),l(e,t)};i(Ce,e=>{d(D)!==null&&e(we)});var Te=V(Ce,2),Ee=P(Te);ye(Ee,{type:`button`,variant:`secondary`,get onclick(){return t.onClose},get disabled(){return d(k)},children:(e,t)=>{fe();var n=y(`Cancel`);l(e,n)},$$slots:{default:!0}});var Y=V(Ee,2);{let e=z(()=>d(k)||d(N)===null);ye(Y,{type:`submit`,get disabled(){return d(e)},children:(e,t)=>{fe();var n=y();A(()=>p(n,d(k)?`Starting…`:`Run workflow`)),l(e,n)},$$slots:{default:!0}})}v(Te),v(j),te(`submit`,j,B),l(e,u)},$$slots:{default:!0}})}),l(e,u)},$$slots:{default:!0}})}),l(e,Y),G()}c([`change`]);export{Xi as t};
@@ -0,0 +1 @@
1
+ import{K as e,Y as t,ct as n,ft as r,pt as i,ut as a}from"./DR13iyEP.js";function o(...e){return e.filter(Boolean).join(` `)}var s=typeof document<`u`,c=0;function l(e){return typeof e?.id==`number`||typeof e?.id==`string`&&e.id.length>0?e.id:c++}var u=class{#e=r(n([]));get toasts(){return e(this.#e)}set toasts(e){a(this.#e,e,!0)}#t=r(n([]));get heights(){return e(this.#t)}set heights(e){a(this.#t,e,!0)}#n=new Map;#r=e=>{let t=this.toasts.findIndex(t=>t.id===e);return t===-1?null:t};#i=e=>this.heights.findIndex(t=>t.toastId===e);addToast=e=>{s&&this.toasts.unshift(e)};updateToast=({id:e,data:t,type:n,message:r})=>{let i=this.toasts.findIndex(t=>t.id===e),a=this.toasts[i];this.toasts[i]={...a,...t,id:e,title:r,type:n,dismiss:!1,delete:!1,updated:!0}};markDismissed=e=>{let t=this.#r(e);if(t===null)return;let n=this.toasts[t];n&&(n.dismiss&&n.delete||(this.toasts[t]={...n,dismiss:!0,delete:!0}))};scheduleRemoval=(e,t)=>{this.cancelRemoval(e),this.#n.set(e,setTimeout(()=>{this.#n.delete(e),this.remove(e)},t))};cancelRemoval=e=>{let t=this.#n.get(e);t!==void 0&&(clearTimeout(t),this.#n.delete(e))};create=e=>{let{message:n,...r}=e,i=l(e),a=e.dismissible===void 0?e.dismissable===void 0||e.dismissable:e.dismissible,o=e.type===void 0?`default`:e.type;return t(()=>{this.cancelRemoval(i);let t=this.toasts.find(e=>e.id===i);t?.dismiss||t?.delete?(this.remove(i),this.addToast({...r,id:i,title:n,dismissible:a,type:o,updated:!0})):t?this.updateToast({id:i,data:e,type:o,message:n,dismissible:a}):this.addToast({...r,id:i,title:n,dismissible:a,type:o})}),i};dismiss=e=>(t(()=>{if(e===void 0){this.toasts=this.toasts.map(e=>e.dismiss?e:{...e,dismiss:!0});return}let t=this.toasts.findIndex(t=>t.id===e);this.toasts[t]&&(this.toasts[t]={...this.toasts[t],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}let t=this.#r(e);if(t!==null)return this.toasts.splice(t,1),e};message=(e,t)=>this.create({...t,type:`default`,message:e});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:typeof t.loading==`string`?t.loading:t.loading()}));let r=e instanceof Promise?e:e(),i=n!==void 0;return r.then(e=>{if(typeof e==`object`&&e&&`ok`in e&&typeof e.ok==`boolean`&&!e.ok){i=!1;let t=d(e);this.create({id:n,type:`error`,message:t})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?t.success(e):t.success;this.create({id:n,type:`success`,message:r})}}).catch(e=>{if(t.error!==void 0){i=!1;let r=typeof t.error==`function`?t.error(e):t.error;this.create({id:n,type:`error`,message:r})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),n};custom=(e,t)=>{let n=l(t);return this.create({component:e,...t,id:n}),n};removeHeight=e=>{this.heights=this.heights.filter(t=>t.toastId!==e)};setHeight=e=>{t(()=>{let t=this.#i(e.toastId);if(t!==-1){this.heights[t]=e;return}let n=new Map(this.toasts.map((e,t)=>[e.id,t])),r=n.get(e.toastId)??-1,i=this.heights.findIndex(e=>(n.get(e.toastId)??1/0)>r);i===-1?this.heights.push(e):this.heights.splice(i,0,e)})};reset=()=>{this.toasts=[],this.heights=[],this.#n.forEach(e=>clearTimeout(e)),this.#n.clear()}};function d(e){return e&&typeof e==`object`&&`status`in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}var f=new u;function p(e,t){return f.message(e,t)}var m=class{#e=i(()=>f.toasts.filter(e=>!e.dismiss));get toasts(){return e(this.#e)}},h=Object.assign(p,{success:f.success,info:f.info,warning:f.warning,error:f.error,custom:f.custom,message:f.message,promise:f.promise,dismiss:f.dismiss,loading:f.loading,getActiveToasts:()=>f.toasts.filter(e=>!e.dismiss)});function g(e,t){if(e.type===`boolean`)return t===void 0?e.required?{error:`${e.name} is required`}:{}:{value:t===!0||t===`true`};let n=typeof t==`number`?String(t):typeof t==`string`?t.trim():``;if(n===``)return e.required?{error:`${e.name} is required`}:{};switch(e.type){case`number`:{let t=Number(n);return Number.isFinite(t)?{value:t}:{error:`${e.name} must be a number`}}case`enum`:return e.values!==void 0&&!e.values.includes(n)?{error:`${e.name} must be one of ${e.values.join(`, `)}`}:{value:n};case`string`:return{value:n}}}function _(e){let t={},n=e.cwd.trim();n===``&&(t.cwd=`a working directory is required`);let r={};for(let n of e.playbook.inputs){let i=g(n,e.values[n.name]);i.error===void 0?i.value!==void 0&&(r[n.name]=i.value):t[n.name]=i.error}return Object.keys(t).length>0?{ok:!1,errors:t}:{ok:!0,request:{playbookId:e.playbook.id,cwd:n,...Object.keys(r).length===0?{}:{inputs:r},...e.isolation===void 0?{}:{isolation:{mode:e.isolation}},...e.executor===void 0?{}:{executor:e.executor}}}}function v(e){let t={};for(let n of e)n.type===`boolean`?t[n.name]=n.default===!0:n.default===void 0?t[n.name]=``:t[n.name]=String(n.default);return t}function y(e=Math.random){let t=Math.floor(e()*(2**53-1));return`ui-${Date.now().toString(36)}-${t.toString(36)}`}export{h as a,m as i,v as n,f as o,y as r,o as s,_ as t};