@railtownai/railtracks-visualizer 0.0.18 → 0.0.19
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.
- package/README.md +32 -0
- package/dist/cjs/index.js +70 -70
- package/dist/esm/index.js +70 -70
- package/dist/types/components/FileSelector.d.ts +2 -0
- package/dist/types/components/Visualizer.d.ts +1 -1
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/lib/theme.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const xs=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperC
|
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Cs=a(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>d("svg",{ref:l,..._s,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Ss("lucide",o),...!a&&!Es(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>d(e,t)),...Array.isArray(a)?a:[a]])),ks=(e,t)=>{const n=a(({className:n,...r},o)=>{return d(Cs,{ref:o,iconNode:t,className:Ss(`lucide-${a=xs(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=xs(e),n},Ns=ks("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ms=ks("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ps=ks("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Os=ks("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),As=ks("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Rs=ks("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Ts=ks("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Ds={colors:{background:"hsl(0 0% 100%)",foreground:"hsl(222.2 84% 4.9%)",card:"hsl(0 0% 100%)",cardForeground:"hsl(222.2 84% 4.9%)",popover:"hsl(0 0% 100%)",popoverForeground:"hsl(222.2 84% 4.9%)",primary:"hsl(221.2 83.2% 53.3%)",primaryForeground:"hsl(210 40% 98%)",secondary:"hsl(210 40% 96%)",secondaryForeground:"hsl(222.2 84% 4.9%)",muted:"hsl(210 40% 96%)",mutedForeground:"hsl(215.4 16.3% 46.9%)",accent:"hsl(210 40% 96%)",accentForeground:"hsl(222.2 84% 4.9%)",destructive:"hsl(0 84.2% 60.2%)",destructiveForeground:"hsl(210 40% 98%)",border:"hsl(214.3 31.8% 91.4%)",input:"hsl(214.3 31.8% 91.4%)",ring:"hsl(221.2 83.2% 53.3%)"},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},borderRadius:{sm:"calc(var(--radius) - 4px)",md:"calc(var(--radius) - 2px)",lg:"var(--radius)",xl:"0.75rem"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"},transitions:{fast:"0.15s ease-in-out",normal:"0.2s ease-in-out",slow:"0.3s ease-in-out"}},$s={colors:{background:"hsl(222.2 84% 4.9%)",foreground:"hsl(210 40% 98%)",card:"hsl(222.2 84% 4.9%)",cardForeground:"hsl(210 40% 98%)",popover:"hsl(222.2 84% 4.9%)",popoverForeground:"hsl(210 40% 98%)",primary:"hsl(217.2 91.2% 59.8%)",primaryForeground:"hsl(222.2 84% 4.9%)",secondary:"hsl(217.2 32.6% 17.5%)",secondaryForeground:"hsl(210 40% 98%)",muted:"hsl(217.2 32.6% 17.5%)",mutedForeground:"hsl(215 20.2% 65.1%)",accent:"hsl(217.2 32.6% 17.5%)",accentForeground:"hsl(210 40% 98%)",destructive:"hsl(0 62.8% 30.6%)",destructiveForeground:"hsl(210 40% 98%)",border:"hsl(217.2 32.6% 17.5%)",input:"hsl(217.2 32.6% 17.5%)",ring:"hsl(224.3 76.3% 94.1%)"},spacing:Ds.spacing,borderRadius:Ds.borderRadius,fontSize:Ds.fontSize,fontWeight:Ds.fontWeight,shadows:Ds.shadows,transitions:Ds.transitions},Is=Ds,zs=()=>{const[e,t]=u(()=>{const e=localStorage.getItem("theme");return!!e&&"dark"===e}),[n,r]=u(e?$s:Ds);i(()=>{const t=document.documentElement;r(e?$s:Ds),e?(t.classList.add("dark"),localStorage.setItem("theme","dark")):(t.classList.remove("dark"),localStorage.setItem("theme","light"))},[e]);return{isDarkMode:e,theme:n,toggleTheme:()=>{t(!e)},setTheme:e=>{t("dark"===e)}}},Ls=({id:e,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:l,style:c={},markerEnd:d,bidirectional:f=!1,data:p,clientToSvgCoords:h,svgRef:m})=>{u(!1);const{theme:g}=zs(),[y,v,b]=o(()=>No({sourceX:n,sourceY:r,targetX:a,targetY:i}),[n,r,a,i]),w={...c,stroke:(()=>{const e=p?.details?.state;switch(e){case"Open":case"Completed":default:return g.colors.mutedForeground;case"Error":return g.colors.destructive}})(),strokeWidth:c.strokeWidth||2};return t.createElement(t.Fragment,null,t.createElement(oo,{path:y,style:w}))};function Bs(){return Bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bs.apply(null,arguments)}var Fs=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Hs="-ms-",Ws="-moz-",Vs="-webkit-",js="comm",Ys="rule",Xs="decl",Ks="@keyframes",Us=Math.abs,qs=String.fromCharCode,Zs=Object.assign;function Gs(e){return e.trim()}function Qs(e,t,n){return e.replace(t,n)}function Js(e,t){return e.indexOf(t)}function el(e,t){return 0|e.charCodeAt(t)}function tl(e,t,n){return e.slice(t,n)}function nl(e){return e.length}function rl(e){return e.length}function ol(e,t){return t.push(e),e}var al=1,il=1,sl=0,ll=0,cl=0,ul="";function dl(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:al,column:il,length:i,return:""}}function fl(e,t){return Zs(dl("",null,null,"",null,null,0),e,{length:-e.length},t)}function pl(){return cl=ll>0?el(ul,--ll):0,il--,10===cl&&(il=1,al--),cl}function hl(){return cl=ll<sl?el(ul,ll++):0,il++,10===cl&&(il=1,al++),cl}function ml(){return el(ul,ll)}function gl(){return ll}function yl(e,t){return tl(ul,e,t)}function vl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function bl(e){return al=il=1,sl=nl(ul=e),ll=0,[]}function wl(e){return ul="",e}function xl(e){return Gs(yl(ll-1,_l(91===e?e+2:40===e?e+1:e)))}function Sl(e){for(;(cl=ml())&&cl<33;)hl();return vl(e)>2||vl(cl)>3?"":" "}function El(e,t){for(;--t&&hl()&&!(cl<48||cl>102||cl>57&&cl<65||cl>70&&cl<97););return yl(e,gl()+(t<6&&32==ml()&&32==hl()))}function _l(e){for(;hl();)switch(cl){case e:return ll;case 34:case 39:34!==e&&39!==e&&_l(cl);break;case 40:41===e&&_l(e);break;case 92:hl()}return ll}function Cl(e,t){for(;hl()&&e+cl!==57&&(e+cl!==84||47!==ml()););return"/*"+yl(t,ll-1)+"*"+qs(47===e?e:hl())}function kl(e){for(;!vl(ml());)hl();return yl(e,ll)}function Nl(e){return wl(Ml("",null,null,null,[""],e=bl(e),0,[0],e))}function Ml(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=a,S=r,E=b;g;)switch(h=v,v=hl()){case 40:if(108!=h&&58==el(E,d-1)){-1!=Js(E+=Qs(xl(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:E+=xl(v);break;case 9:case 10:case 13:case 32:E+=Sl(h);break;case 92:E+=El(gl()-1,7);continue;case 47:switch(ml()){case 42:case 47:ol(Ol(Cl(hl(),gl()),t,n),l);break;default:E+="/"}break;case 123*m:s[c++]=nl(E)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(E=Qs(E,/\f/g,"")),p>0&&nl(E)-d&&ol(p>32?Al(E+";",r,n,d-1):Al(Qs(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(ol(S=Pl(E,t,n,c,u,o,s,b,w=[],x=[],d),a),123===v)if(0===u)Ml(E,t,S,S,w,a,d,s,x);else switch(99===f&&110===el(E,3)?100:f){case 100:case 108:case 109:case 115:Ml(e,S,S,r&&ol(Pl(e,S,S,0,0,o,s,b,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Ml(E,S,S,S,[""],x,0,s,x)}}c=u=p=0,m=y=1,b=E="",d=i;break;case 58:d=1+nl(E),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==pl())continue;switch(E+=qs(v),v*m){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(nl(E)-1)*y,y=1;break;case 64:45===ml()&&(E+=xl(hl())),f=ml(),u=d=nl(b=E+=kl(gl())),v++;break;case 45:45===h&&2==nl(E)&&(m=0)}}return a}function Pl(e,t,n,r,o,a,i,s,l,c,u){for(var d=o-1,f=0===o?a:[""],p=rl(f),h=0,m=0,g=0;h<r;++h)for(var y=0,v=tl(e,d+1,d=Us(m=i[h])),b=e;y<p;++y)(b=Gs(m>0?f[y]+" "+v:Qs(v,/&\f/g,f[y])))&&(l[g++]=b);return dl(e,t,n,0===o?Ys:s,l,c,u)}function Ol(e,t,n){return dl(e,t,n,js,qs(cl),tl(e,2,-2),0)}function Al(e,t,n,r){return dl(e,t,n,Xs,tl(e,0,r),tl(e,r+1,-1),r)}function Rl(e,t){for(var n="",r=rl(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Tl(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Xs:return e.return=e.return||e.value;case js:return"";case Ks:return e.return=e.value+"{"+Rl(e.children,r)+"}";case Ys:e.value=e.props.join(",")}return nl(n=Rl(e.children,r))?e.return=e.value+"{"+n+"}":""}var Dl=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function $l(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Il=function(e,t,n){for(var r=0,o=0;r=o,o=ml(),38===r&&12===o&&(t[n]=1),!vl(o);)hl();return yl(e,ll)},zl=function(e,t){return wl(function(e,t){var n=-1,r=44;do{switch(vl(r)){case 0:38===r&&12===ml()&&(t[n]=1),e[n]+=Il(ll-1,t,n);break;case 2:e[n]+=xl(r);break;case 4:if(44===r){e[++n]=58===ml()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=qs(r)}}while(r=hl());return e}(bl(e),t))},Ll=new WeakMap,Bl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ll.get(n))&&!r){Ll.set(e,!0);for(var o=[],a=zl(t,o),i=n.props,s=0,l=0;s<a.length;s++)for(var c=0;c<i.length;c++,l++)e.props[l]=o[s]?a[s].replace(/&\f/g,i[c]):i[c]+" "+a[s]}}},Fl=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Hl(e,t){switch(function(e,t){return 45^el(e,0)?(((t<<2^el(e,0))<<2^el(e,1))<<2^el(e,2))<<2^el(e,3):0}(e,t)){case 5103:return Vs+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Vs+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Vs+e+Ws+e+Hs+e+e;case 6828:case 4268:return Vs+e+Hs+e+e;case 6165:return Vs+e+Hs+"flex-"+e+e;case 5187:return Vs+e+Qs(e,/(\w+).+(:[^]+)/,Vs+"box-$1$2"+Hs+"flex-$1$2")+e;case 5443:return Vs+e+Hs+"flex-item-"+Qs(e,/flex-|-self/,"")+e;case 4675:return Vs+e+Hs+"flex-line-pack"+Qs(e,/align-content|flex-|-self/,"")+e;case 5548:return Vs+e+Hs+Qs(e,"shrink","negative")+e;case 5292:return Vs+e+Hs+Qs(e,"basis","preferred-size")+e;case 6060:return Vs+"box-"+Qs(e,"-grow","")+Vs+e+Hs+Qs(e,"grow","positive")+e;case 4554:return Vs+Qs(e,/([^-])(transform)/g,"$1"+Vs+"$2")+e;case 6187:return Qs(Qs(Qs(e,/(zoom-|grab)/,Vs+"$1"),/(image-set)/,Vs+"$1"),e,"")+e;case 5495:case 3959:return Qs(e,/(image-set\([^]*)/,Vs+"$1$`$1");case 4968:return Qs(Qs(e,/(.+:)(flex-)?(.*)/,Vs+"box-pack:$3"+Hs+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Vs+e+e;case 4095:case 3583:case 4068:case 2532:return Qs(e,/(.+)-inline(.+)/,Vs+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(nl(e)-1-t>6)switch(el(e,t+1)){case 109:if(45!==el(e,t+4))break;case 102:return Qs(e,/(.+:)(.+)-([^]+)/,"$1"+Vs+"$2-$3$1"+Ws+(108==el(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Js(e,"stretch")?Hl(Qs(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==el(e,t+1))break;case 6444:switch(el(e,nl(e)-3-(~Js(e,"!important")&&10))){case 107:return Qs(e,":",":"+Vs)+e;case 101:return Qs(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Vs+(45===el(e,14)?"inline-":"")+"box$3$1"+Vs+"$2$3$1"+Hs+"$2box$3")+e}break;case 5936:switch(el(e,t+11)){case 114:return Vs+e+Hs+Qs(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Vs+e+Hs+Qs(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Vs+e+Hs+Qs(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Vs+e+Hs+e+e}return e}var Wl,Vl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Xs:e.return=Hl(e.value,e.length);break;case Ks:return Rl([fl(e,{value:Qs(e.value,"@","@"+Vs)})],r);case Ys:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rl([fl(e,{props:[Qs(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Rl([fl(e,{props:[Qs(t,/:(plac\w+)/,":"+Vs+"input-$1")]}),fl(e,{props:[Qs(t,/:(plac\w+)/,":-moz-$1")]}),fl(e,{props:[Qs(t,/:(plac\w+)/,Hs+"input-$1")]})],r)}return""})}}],jl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,a=e.stylisPlugins||Vl,i={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)});var l,c,u=[Tl,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=rl(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}([Bl,Fl].concat(a,u));o=function(e,t,n,r){l=n,Rl(Nl(e?e+"{"+t.styles+"}":t.styles),d),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Fs({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return f.sheet.hydrate(s),f},Yl={exports:{}},Xl={};var Kl,Ul={};"production"===process.env.NODE_ENV?Yl.exports=function(){if(Wl)return Xl;Wl=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case p:case i:return e;default:return f}}case n:return f}}}function w(e){return b(e)===c}return Xl.AsyncMode=l,Xl.ConcurrentMode=c,Xl.ContextConsumer=s,Xl.ContextProvider=i,Xl.Element=t,Xl.ForwardRef=u,Xl.Fragment=r,Xl.Lazy=h,Xl.Memo=p,Xl.Portal=n,Xl.Profiler=a,Xl.StrictMode=o,Xl.Suspense=d,Xl.isAsyncMode=function(e){return w(e)||b(e)===l},Xl.isConcurrentMode=w,Xl.isContextConsumer=function(e){return b(e)===s},Xl.isContextProvider=function(e){return b(e)===i},Xl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Xl.isForwardRef=function(e){return b(e)===u},Xl.isFragment=function(e){return b(e)===r},Xl.isLazy=function(e){return b(e)===h},Xl.isMemo=function(e){return b(e)===p},Xl.isPortal=function(e){return b(e)===n},Xl.isProfiler=function(e){return b(e)===a},Xl.isStrictMode=function(e){return b(e)===o},Xl.isSuspense=function(e){return b(e)===d},Xl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===i||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Xl.typeOf=b,Xl}():Yl.exports=(Kl||(Kl=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case l:case c:case r:case a:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case u:case h:case p:case i:return g;default:return f}}case n:return f}}}var w=l,x=c,S=s,E=i,_=t,C=u,k=r,N=h,M=p,P=n,O=a,A=o,R=d,T=!1;function D(e){return b(e)===c}Ul.AsyncMode=w,Ul.ConcurrentMode=x,Ul.ContextConsumer=S,Ul.ContextProvider=E,Ul.Element=_,Ul.ForwardRef=C,Ul.Fragment=k,Ul.Lazy=N,Ul.Memo=M,Ul.Portal=P,Ul.Profiler=O,Ul.StrictMode=A,Ul.Suspense=R,Ul.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(e)||b(e)===l},Ul.isConcurrentMode=D,Ul.isContextConsumer=function(e){return b(e)===s},Ul.isContextProvider=function(e){return b(e)===i},Ul.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ul.isForwardRef=function(e){return b(e)===u},Ul.isFragment=function(e){return b(e)===r},Ul.isLazy=function(e){return b(e)===h},Ul.isMemo=function(e){return b(e)===p},Ul.isPortal=function(e){return b(e)===n},Ul.isProfiler=function(e){return b(e)===a},Ul.isStrictMode=function(e){return b(e)===o},Ul.isSuspense=function(e){return b(e)===d},Ul.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===i||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Ul.typeOf=b}()),Ul);var ql=Yl.exports,Zl={};Zl[ql.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Zl[ql.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Gl(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Ql=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Jl=function(e,t,n){Ql(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var ec={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tc=/[A-Z]|^ms/g,nc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rc=function(e){return 45===e.charCodeAt(1)},oc=function(e){return null!=e&&"boolean"!=typeof e},ac=$l(function(e){return rc(e)?e:e.replace(tc,"-$&").toLowerCase()}),ic=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(nc,function(e,t,n){return lc={name:t,styles:n,next:lc},t})}return 1===ec[e]||rc(e)||"number"!=typeof t||0===t?t:t+"px"};function sc(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return lc={name:o.name,styles:o.styles,next:lc},o.name;var a=n;if(void 0!==a.styles){var i=a.next;if(void 0!==i)for(;void 0!==i;)lc={name:i.name,styles:i.styles,next:lc},i=i.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=sc(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i){var s=i;null!=t&&void 0!==t[s]?r+=a+"{"+t[s]+"}":oc(s)&&(r+=ac(a)+":"+ic(a,s)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=sc(e,t,i);switch(a){case"animation":case"animationName":r+=ac(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var c=0;c<i.length;c++)oc(i[c])&&(r+=ac(a)+":"+ic(a,i[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=lc,l=n(e);return lc=s,sc(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var lc,cc=/label:\s*([^\s;{]+)\s*(;|$)/g;function uc(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";lc=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=sc(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++){if(o+=sc(n,t,e[i]),r)o+=a[i]}cc.lastIndex=0;for(var s,l="";null!==(s=cc.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:lc}}var dc=!!e.useInsertionEffect&&e.useInsertionEffect,fc=dc||function(e){return e()},pc=dc||e.useLayoutEffect,hc=e.createContext("undefined"!=typeof HTMLElement?jl({key:"css"}):null);hc.Provider;var mc,gc,yc=function(e){return a(function(t,n){var r=c(hc);return e(t,r,n)})},vc=e.createContext({}),bc=Dl(function(e){return Dl(function(t){return function(e,t){return"function"==typeof t?t(e):Bs({},e,t)}(e,t)})}),wc=function(t){var n=e.useContext(vc);return t.theme!==n&&(n=bc(n)(t.theme)),e.createElement(vc.Provider,{value:n},t.children)},xc={}.hasOwnProperty,Sc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ec=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ql(t,n,r),fc(function(){return Jl(t,n,r)}),null},_c=yc(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var a=t[Sc],i=[o],s="";"string"==typeof t.className?s=Gl(n.registered,i,t.className):null!=t.className&&(s=t.className+" ");var l=uc(i,void 0,e.useContext(vc));s+=n.key+"-"+l.name;var c={};for(var u in t)xc.call(t,u)&&"css"!==u&&u!==Sc&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(Ec,{cache:n,serialized:l,isStringTag:"string"==typeof a}),e.createElement(a,c))}),Cc=_c,kc=function(t,n){var r=arguments;if(null==n||!xc.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,a=new Array(o);a[0]=Cc,a[1]=function(e,t){var n={};for(var r in t)xc.call(t,r)&&(n[r]=t[r]);return n[Sc]=e,n}(t,n);for(var i=2;i<o;i++)a[i]=r[i];return e.createElement.apply(null,a)};mc=kc||(kc={}),gc||(gc=mc.JSX||(mc.JSX={}));var Nc=yc(function(t,n){var r=uc([t.styles],void 0,e.useContext(vc)),o=e.useRef();return pc(function(){var e=n.key+"-global",t=new n.sheet.constructor({key:e,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),a=!1,i=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return n.sheet.tags.length&&(t.before=n.sheet.tags[0]),null!==i&&(a=!0,i.setAttribute("data-emotion",e),t.hydrate([i])),o.current=[t,a],function(){t.flush()}},[n]),pc(function(){var e=o.current,t=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Jl(n,r.next,!0),t.tags.length){var a=t.tags[t.tags.length-1].nextElementSibling;t.before=a,t.flush()}n.insert("",r,t,!1)}},[n,r.name]),null});function Mc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return uc(t)}var Pc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Oc=$l(function(e){return Pc.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Ac=function(e){return"theme"!==e},Rc=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Oc:Ac},Tc=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Dc=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ql(t,n,r),fc(function(){return Jl(t,n,r)}),null},$c=function t(n,r){var o,a,i=n.__emotion_real===n,s=i&&n.__emotion_base||n;void 0!==r&&(o=r.label,a=r.target);var l=Tc(n,r,i),c=l||Rc(s),u=!c("as");return function(){var d=arguments,f=i&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],p[m])}var g=yc(function(t,n,r){var o=u&&t.as||s,i="",d=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=e.useContext(vc)}"string"==typeof t.className?i=Gl(n.registered,d,t.className):null!=t.className&&(i=t.className+" ");var m=uc(f.concat(d),n.registered,p);i+=n.key+"-"+m.name,void 0!==a&&(i+=" "+a);var g=u&&void 0===l?Rc(o):c,y={};for(var v in t)u&&"as"===v||g(v)&&(y[v]=t[v]);return y.className=i,r&&(y.ref=r),e.createElement(e.Fragment,null,e.createElement(Dc,{cache:n,serialized:m,isStringTag:"string"==typeof o}),e.createElement(o,y))});return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=f,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+a}}),g.withComponent=function(e,n){return t(e,Bs({},r,n,{shouldForwardProp:Tc(g,n,!0)})).apply(void 0,f)},g}}.bind(null);function Ic(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ic(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zc(...e){return function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ic(e))&&(r&&(r+=" "),r+=t);return r}(e)}function Lc(e){return e.split(/[-_\s]+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function Bc(e){return null==e?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:4}).format(e)}function Fc(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;return`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function Hc(e,t){return e.length<=t?e:e.substring(0,t-3)+"..."}function Wc(e,t,n=""){return e?t:n}function Vc(e,t){return e.spacing[t]||e.spacing.md}function jc(e,t){return e.colors[t]||e.colors.foreground}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){$c[e]=$c(e)});const Yc=$c.div`
|
|
15
|
+
var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Cs=a(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>d("svg",{ref:l,..._s,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Ss("lucide",o),...!a&&!Es(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>d(e,t)),...Array.isArray(a)?a:[a]])),ks=(e,t)=>{const n=a(({className:n,...r},o)=>{return d(Cs,{ref:o,iconNode:t,className:Ss(`lucide-${a=xs(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=xs(e),n},Ns=ks("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ms=ks("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ps=ks("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Os=ks("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),As=ks("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Rs=ks("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Ts=ks("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var Ds=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),$s="-ms-",Is="-moz-",zs="-webkit-",Ls="comm",Bs="rule",Fs="decl",Hs="@keyframes",Ws=Math.abs,Vs=String.fromCharCode,js=Object.assign;function Ys(e){return e.trim()}function Xs(e,t,n){return e.replace(t,n)}function Ks(e,t){return e.indexOf(t)}function Us(e,t){return 0|e.charCodeAt(t)}function qs(e,t,n){return e.slice(t,n)}function Zs(e){return e.length}function Gs(e){return e.length}function Qs(e,t){return t.push(e),e}var Js=1,el=1,tl=0,nl=0,rl=0,ol="";function al(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Js,column:el,length:i,return:""}}function il(e,t){return js(al("",null,null,"",null,null,0),e,{length:-e.length},t)}function sl(){return rl=nl>0?Us(ol,--nl):0,el--,10===rl&&(el=1,Js--),rl}function ll(){return rl=nl<tl?Us(ol,nl++):0,el++,10===rl&&(el=1,Js++),rl}function cl(){return Us(ol,nl)}function ul(){return nl}function dl(e,t){return qs(ol,e,t)}function fl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pl(e){return Js=el=1,tl=Zs(ol=e),nl=0,[]}function hl(e){return ol="",e}function ml(e){return Ys(dl(nl-1,vl(91===e?e+2:40===e?e+1:e)))}function gl(e){for(;(rl=cl())&&rl<33;)ll();return fl(e)>2||fl(rl)>3?"":" "}function yl(e,t){for(;--t&&ll()&&!(rl<48||rl>102||rl>57&&rl<65||rl>70&&rl<97););return dl(e,ul()+(t<6&&32==cl()&&32==ll()))}function vl(e){for(;ll();)switch(rl){case e:return nl;case 34:case 39:34!==e&&39!==e&&vl(rl);break;case 40:41===e&&vl(e);break;case 92:ll()}return nl}function bl(e,t){for(;ll()&&e+rl!==57&&(e+rl!==84||47!==cl()););return"/*"+dl(t,nl-1)+"*"+Vs(47===e?e:ll())}function wl(e){for(;!fl(cl());)ll();return dl(e,nl)}function xl(e){return hl(Sl("",null,null,null,[""],e=pl(e),0,[0],e))}function Sl(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=a,S=r,E=b;g;)switch(h=v,v=ll()){case 40:if(108!=h&&58==Us(E,d-1)){-1!=Ks(E+=Xs(ml(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:E+=ml(v);break;case 9:case 10:case 13:case 32:E+=gl(h);break;case 92:E+=yl(ul()-1,7);continue;case 47:switch(cl()){case 42:case 47:Qs(_l(bl(ll(),ul()),t,n),l);break;default:E+="/"}break;case 123*m:s[c++]=Zs(E)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(E=Xs(E,/\f/g,"")),p>0&&Zs(E)-d&&Qs(p>32?Cl(E+";",r,n,d-1):Cl(Xs(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(Qs(S=El(E,t,n,c,u,o,s,b,w=[],x=[],d),a),123===v)if(0===u)Sl(E,t,S,S,w,a,d,s,x);else switch(99===f&&110===Us(E,3)?100:f){case 100:case 108:case 109:case 115:Sl(e,S,S,r&&Qs(El(e,S,S,0,0,o,s,b,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Sl(E,S,S,S,[""],x,0,s,x)}}c=u=p=0,m=y=1,b=E="",d=i;break;case 58:d=1+Zs(E),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==sl())continue;switch(E+=Vs(v),v*m){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(Zs(E)-1)*y,y=1;break;case 64:45===cl()&&(E+=ml(ll())),f=cl(),u=d=Zs(b=E+=wl(ul())),v++;break;case 45:45===h&&2==Zs(E)&&(m=0)}}return a}function El(e,t,n,r,o,a,i,s,l,c,u){for(var d=o-1,f=0===o?a:[""],p=Gs(f),h=0,m=0,g=0;h<r;++h)for(var y=0,v=qs(e,d+1,d=Ws(m=i[h])),b=e;y<p;++y)(b=Ys(m>0?f[y]+" "+v:Xs(v,/&\f/g,f[y])))&&(l[g++]=b);return al(e,t,n,0===o?Bs:s,l,c,u)}function _l(e,t,n){return al(e,t,n,Ls,Vs(rl),qs(e,2,-2),0)}function Cl(e,t,n,r){return al(e,t,n,Fs,qs(e,0,r),qs(e,r+1,-1),r)}function kl(e,t){for(var n="",r=Gs(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Nl(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Fs:return e.return=e.return||e.value;case Ls:return"";case Hs:return e.return=e.value+"{"+kl(e.children,r)+"}";case Bs:e.value=e.props.join(",")}return Zs(n=kl(e.children,r))?e.return=e.value+"{"+n+"}":""}var Ml=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function Pl(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ol=function(e,t,n){for(var r=0,o=0;r=o,o=cl(),38===r&&12===o&&(t[n]=1),!fl(o);)ll();return dl(e,nl)},Al=function(e,t){return hl(function(e,t){var n=-1,r=44;do{switch(fl(r)){case 0:38===r&&12===cl()&&(t[n]=1),e[n]+=Ol(nl-1,t,n);break;case 2:e[n]+=ml(r);break;case 4:if(44===r){e[++n]=58===cl()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Vs(r)}}while(r=ll());return e}(pl(e),t))},Rl=new WeakMap,Tl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Rl.get(n))&&!r){Rl.set(e,!0);for(var o=[],a=Al(t,o),i=n.props,s=0,l=0;s<a.length;s++)for(var c=0;c<i.length;c++,l++)e.props[l]=o[s]?a[s].replace(/&\f/g,i[c]):i[c]+" "+a[s]}}},Dl=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function $l(e,t){switch(function(e,t){return 45^Us(e,0)?(((t<<2^Us(e,0))<<2^Us(e,1))<<2^Us(e,2))<<2^Us(e,3):0}(e,t)){case 5103:return zs+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return zs+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zs+e+Is+e+$s+e+e;case 6828:case 4268:return zs+e+$s+e+e;case 6165:return zs+e+$s+"flex-"+e+e;case 5187:return zs+e+Xs(e,/(\w+).+(:[^]+)/,zs+"box-$1$2"+$s+"flex-$1$2")+e;case 5443:return zs+e+$s+"flex-item-"+Xs(e,/flex-|-self/,"")+e;case 4675:return zs+e+$s+"flex-line-pack"+Xs(e,/align-content|flex-|-self/,"")+e;case 5548:return zs+e+$s+Xs(e,"shrink","negative")+e;case 5292:return zs+e+$s+Xs(e,"basis","preferred-size")+e;case 6060:return zs+"box-"+Xs(e,"-grow","")+zs+e+$s+Xs(e,"grow","positive")+e;case 4554:return zs+Xs(e,/([^-])(transform)/g,"$1"+zs+"$2")+e;case 6187:return Xs(Xs(Xs(e,/(zoom-|grab)/,zs+"$1"),/(image-set)/,zs+"$1"),e,"")+e;case 5495:case 3959:return Xs(e,/(image-set\([^]*)/,zs+"$1$`$1");case 4968:return Xs(Xs(e,/(.+:)(flex-)?(.*)/,zs+"box-pack:$3"+$s+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zs+e+e;case 4095:case 3583:case 4068:case 2532:return Xs(e,/(.+)-inline(.+)/,zs+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Zs(e)-1-t>6)switch(Us(e,t+1)){case 109:if(45!==Us(e,t+4))break;case 102:return Xs(e,/(.+:)(.+)-([^]+)/,"$1"+zs+"$2-$3$1"+Is+(108==Us(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ks(e,"stretch")?$l(Xs(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Us(e,t+1))break;case 6444:switch(Us(e,Zs(e)-3-(~Ks(e,"!important")&&10))){case 107:return Xs(e,":",":"+zs)+e;case 101:return Xs(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zs+(45===Us(e,14)?"inline-":"")+"box$3$1"+zs+"$2$3$1"+$s+"$2box$3")+e}break;case 5936:switch(Us(e,t+11)){case 114:return zs+e+$s+Xs(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zs+e+$s+Xs(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zs+e+$s+Xs(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zs+e+$s+e+e}return e}var Il=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Fs:e.return=$l(e.value,e.length);break;case Hs:return kl([il(e,{value:Xs(e.value,"@","@"+zs)})],r);case Bs:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return kl([il(e,{props:[Xs(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return kl([il(e,{props:[Xs(t,/:(plac\w+)/,":"+zs+"input-$1")]}),il(e,{props:[Xs(t,/:(plac\w+)/,":-moz-$1")]}),il(e,{props:[Xs(t,/:(plac\w+)/,$s+"input-$1")]})],r)}return""})}}],zl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,a=e.stylisPlugins||Il,i={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)});var l,c,u=[Nl,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=Gs(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}([Tl,Dl].concat(a,u));o=function(e,t,n,r){l=n,kl(xl(e?e+"{"+t.styles+"}":t.styles),d),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Ds({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return f.sheet.hydrate(s),f};function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(null,arguments)}var Bl,Fl={exports:{}},Hl={};var Wl,Vl={};"production"===process.env.NODE_ENV?Fl.exports=function(){if(Bl)return Hl;Bl=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case p:case i:return e;default:return f}}case n:return f}}}function w(e){return b(e)===c}return Hl.AsyncMode=l,Hl.ConcurrentMode=c,Hl.ContextConsumer=s,Hl.ContextProvider=i,Hl.Element=t,Hl.ForwardRef=u,Hl.Fragment=r,Hl.Lazy=h,Hl.Memo=p,Hl.Portal=n,Hl.Profiler=a,Hl.StrictMode=o,Hl.Suspense=d,Hl.isAsyncMode=function(e){return w(e)||b(e)===l},Hl.isConcurrentMode=w,Hl.isContextConsumer=function(e){return b(e)===s},Hl.isContextProvider=function(e){return b(e)===i},Hl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Hl.isForwardRef=function(e){return b(e)===u},Hl.isFragment=function(e){return b(e)===r},Hl.isLazy=function(e){return b(e)===h},Hl.isMemo=function(e){return b(e)===p},Hl.isPortal=function(e){return b(e)===n},Hl.isProfiler=function(e){return b(e)===a},Hl.isStrictMode=function(e){return b(e)===o},Hl.isSuspense=function(e){return b(e)===d},Hl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===i||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Hl.typeOf=b,Hl}():Fl.exports=(Wl||(Wl=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case l:case c:case r:case a:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case u:case h:case p:case i:return g;default:return f}}case n:return f}}}var w=l,x=c,S=s,E=i,_=t,C=u,k=r,N=h,M=p,P=n,O=a,A=o,R=d,T=!1;function D(e){return b(e)===c}Vl.AsyncMode=w,Vl.ConcurrentMode=x,Vl.ContextConsumer=S,Vl.ContextProvider=E,Vl.Element=_,Vl.ForwardRef=C,Vl.Fragment=k,Vl.Lazy=N,Vl.Memo=M,Vl.Portal=P,Vl.Profiler=O,Vl.StrictMode=A,Vl.Suspense=R,Vl.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(e)||b(e)===l},Vl.isConcurrentMode=D,Vl.isContextConsumer=function(e){return b(e)===s},Vl.isContextProvider=function(e){return b(e)===i},Vl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Vl.isForwardRef=function(e){return b(e)===u},Vl.isFragment=function(e){return b(e)===r},Vl.isLazy=function(e){return b(e)===h},Vl.isMemo=function(e){return b(e)===p},Vl.isPortal=function(e){return b(e)===n},Vl.isProfiler=function(e){return b(e)===a},Vl.isStrictMode=function(e){return b(e)===o},Vl.isSuspense=function(e){return b(e)===d},Vl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===i||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Vl.typeOf=b}()),Vl);var jl=Fl.exports,Yl={};Yl[jl.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yl[jl.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Xl(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Kl=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ul=function(e,t,n){Kl(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var ql={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Zl=/[A-Z]|^ms/g,Gl=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ql=function(e){return 45===e.charCodeAt(1)},Jl=function(e){return null!=e&&"boolean"!=typeof e},ec=Pl(function(e){return Ql(e)?e:e.replace(Zl,"-$&").toLowerCase()}),tc=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Gl,function(e,t,n){return rc={name:t,styles:n,next:rc},t})}return 1===ql[e]||Ql(e)||"number"!=typeof t||0===t?t:t+"px"};function nc(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return rc={name:o.name,styles:o.styles,next:rc},o.name;var a=n;if(void 0!==a.styles){var i=a.next;if(void 0!==i)for(;void 0!==i;)rc={name:i.name,styles:i.styles,next:rc},i=i.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=nc(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i){var s=i;null!=t&&void 0!==t[s]?r+=a+"{"+t[s]+"}":Jl(s)&&(r+=ec(a)+":"+tc(a,s)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=nc(e,t,i);switch(a){case"animation":case"animationName":r+=ec(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var c=0;c<i.length;c++)Jl(i[c])&&(r+=ec(a)+":"+tc(a,i[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=rc,l=n(e);return rc=s,nc(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var rc,oc=/label:\s*([^\s;{]+)\s*(;|$)/g;function ac(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";rc=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=nc(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++){if(o+=nc(n,t,e[i]),r)o+=a[i]}oc.lastIndex=0;for(var s,l="";null!==(s=oc.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:rc}}var ic=!!e.useInsertionEffect&&e.useInsertionEffect,sc=ic||function(e){return e()},lc=ic||e.useLayoutEffect,cc=e.createContext("undefined"!=typeof HTMLElement?zl({key:"css"}):null);cc.Provider;var uc,dc,fc=function(e){return a(function(t,n){var r=c(cc);return e(t,r,n)})},pc=e.createContext({}),hc=Ml(function(e){return Ml(function(t){return function(e,t){return"function"==typeof t?t(e):Ll({},e,t)}(e,t)})}),mc=function(t){var n=e.useContext(pc);return t.theme!==n&&(n=hc(n)(t.theme)),e.createElement(pc.Provider,{value:n},t.children)},gc={}.hasOwnProperty,yc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",vc=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Kl(t,n,r),sc(function(){return Ul(t,n,r)}),null},bc=fc(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var a=t[yc],i=[o],s="";"string"==typeof t.className?s=Xl(n.registered,i,t.className):null!=t.className&&(s=t.className+" ");var l=ac(i,void 0,e.useContext(pc));s+=n.key+"-"+l.name;var c={};for(var u in t)gc.call(t,u)&&"css"!==u&&u!==yc&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(vc,{cache:n,serialized:l,isStringTag:"string"==typeof a}),e.createElement(a,c))}),wc=bc,xc=function(t,n){var r=arguments;if(null==n||!gc.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,a=new Array(o);a[0]=wc,a[1]=function(e,t){var n={};for(var r in t)gc.call(t,r)&&(n[r]=t[r]);return n[yc]=e,n}(t,n);for(var i=2;i<o;i++)a[i]=r[i];return e.createElement.apply(null,a)};uc=xc||(xc={}),dc||(dc=uc.JSX||(uc.JSX={}));var Sc=fc(function(t,n){var r=ac([t.styles],void 0,e.useContext(pc)),o=e.useRef();return lc(function(){var e=n.key+"-global",t=new n.sheet.constructor({key:e,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),a=!1,i=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return n.sheet.tags.length&&(t.before=n.sheet.tags[0]),null!==i&&(a=!0,i.setAttribute("data-emotion",e),t.hydrate([i])),o.current=[t,a],function(){t.flush()}},[n]),lc(function(){var e=o.current,t=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Ul(n,r.next,!0),t.tags.length){var a=t.tags[t.tags.length-1].nextElementSibling;t.before=a,t.flush()}n.insert("",r,t,!1)}},[n,r.name]),null});function Ec(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ac(t)}const _c={colors:{background:"hsl(0 0% 100%)",foreground:"hsl(222.2 84% 4.9%)",card:"hsl(0 0% 100%)",cardForeground:"hsl(222.2 84% 4.9%)",popover:"hsl(0 0% 100%)",popoverForeground:"hsl(222.2 84% 4.9%)",primary:"hsl(221.2 83.2% 53.3%)",primaryForeground:"hsl(210 40% 98%)",secondary:"hsl(210 40% 96%)",secondaryForeground:"hsl(222.2 84% 4.9%)",muted:"hsl(210 40% 96%)",mutedForeground:"hsl(215.4 16.3% 46.9%)",accent:"hsl(210 40% 96%)",accentForeground:"hsl(222.2 84% 4.9%)",destructive:"hsl(0 84.2% 60.2%)",destructiveForeground:"hsl(210 40% 98%)",border:"hsl(214.3 31.8% 91.4%)",mutedBorder:"hsl(214.3 31.8% 91.4%)",input:"hsl(214.3 31.8% 91.4%)",ring:"hsl(221.2 83.2% 53.3%)"},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},borderRadius:{sm:"calc(var(--radius) - 4px)",md:"calc(var(--radius) - 2px)",lg:"var(--radius)",xl:"0.75rem"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"},transitions:{fast:"0.15s ease-in-out",normal:"0.2s ease-in-out",slow:"0.3s ease-in-out"}},Cc={colors:{background:"hsl(222.2 84% 4.9%)",foreground:"hsl(210 40% 98%)",card:"hsl(222.2 84% 4.9%)",cardForeground:"hsl(210 40% 98%)",popover:"hsl(222.2 84% 4.9%)",popoverForeground:"hsl(210 40% 98%)",primary:"hsl(217.2 91.2% 59.8%)",primaryForeground:"hsl(222.2 84% 4.9%)",secondary:"hsl(217.2 32.6% 17.5%)",secondaryForeground:"hsl(210 40% 98%)",muted:"hsl(217.2 32.6% 17.5%)",mutedForeground:"hsl(215 20.2% 65.1%)",accent:"hsl(217.2 32.6% 17.5%)",accentForeground:"hsl(210 40% 98%)",destructive:"hsl(0 62.8% 30.6%)",destructiveForeground:"hsl(210 40% 98%)",border:"hsl(217.2 32.6% 17.5%)",mutedBorder:"hsl(217.2 32.6% 5%)",input:"hsl(217.2 32.6% 17.5%)",ring:"hsl(224.3 76.3% 94.1%)"},spacing:_c.spacing,borderRadius:_c.borderRadius,fontSize:_c.fontSize,fontWeight:_c.fontWeight,shadows:_c.shadows,transitions:_c.transitions},kc=_c,Nc=n(void 0),Mc=({children:e,theme:n})=>{const[r,o]=t.useState(()=>{if(n)return n;return"dark"===localStorage.getItem("theme")?Cc:_c});i(()=>{const e=()=>{const e=localStorage.getItem("theme");o("dark"===e?Cc:_c)};if(window.addEventListener("storage",e),!n){const e=localStorage.getItem("theme");o("dark"===e?Cc:_c)}return()=>{window.removeEventListener("storage",e)}},[n]),i(()=>{n&&o(n)},[n]);const a=t.useMemo(()=>({theme:r,setTheme:o}),[r]);return t.createElement(Nc.Provider,{value:a},t.createElement(mc,{theme:r},e))},Pc=()=>{const e=c(Nc);return void 0===e?{theme:kc,setTheme:()=>{console.warn("Theme context not available. setTheme called but ignored.")}}:e},Oc=()=>{const{theme:e}=Pc();return e},Ac=({id:e,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:l,style:c={},markerEnd:d,bidirectional:f=!1,data:p,clientToSvgCoords:h,svgRef:m})=>{u(!1);const{theme:g}=Pc(),[y,v,b]=o(()=>No({sourceX:n,sourceY:r,targetX:a,targetY:i}),[n,r,a,i]),w={...c,stroke:(()=>{const e=p?.details?.state;switch(e){case"Open":case"Completed":default:return g.colors.mutedForeground;case"Error":return g.colors.destructive}})(),strokeWidth:c.strokeWidth||2};return t.createElement(t.Fragment,null,t.createElement(oo,{path:y,style:w}))};var Rc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Tc=Pl(function(e){return Rc.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Dc=function(e){return"theme"!==e},$c=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Tc:Dc},Ic=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},zc=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Kl(t,n,r),sc(function(){return Ul(t,n,r)}),null},Lc=function t(n,r){var o,a,i=n.__emotion_real===n,s=i&&n.__emotion_base||n;void 0!==r&&(o=r.label,a=r.target);var l=Ic(n,r,i),c=l||$c(s),u=!c("as");return function(){var d=arguments,f=i&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],p[m])}var g=fc(function(t,n,r){var o=u&&t.as||s,i="",d=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=e.useContext(pc)}"string"==typeof t.className?i=Xl(n.registered,d,t.className):null!=t.className&&(i=t.className+" ");var m=ac(f.concat(d),n.registered,p);i+=n.key+"-"+m.name,void 0!==a&&(i+=" "+a);var g=u&&void 0===l?$c(o):c,y={};for(var v in t)u&&"as"===v||g(v)&&(y[v]=t[v]);return y.className=i,r&&(y.ref=r),e.createElement(e.Fragment,null,e.createElement(zc,{cache:n,serialized:m,isStringTag:"string"==typeof o}),e.createElement(o,y))});return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=f,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+a}}),g.withComponent=function(e,n){return t(e,Ll({},r,n,{shouldForwardProp:Ic(g,n,!0)})).apply(void 0,f)},g}}.bind(null);function Bc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Bc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fc(...e){return function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Bc(e))&&(r&&(r+=" "),r+=t);return r}(e)}function Hc(e){return e.split(/[-_\s]+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function Wc(e){return null==e?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:4}).format(e)}function Vc(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;return`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function jc(e,t){return e.length<=t?e:e.substring(0,t-3)+"..."}function Yc(e,t,n=""){return e?t:n}function Xc(e,t){return e.spacing[t]||e.spacing.md}function Kc(e,t){return e.colors[t]||e.colors.foreground}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){Lc[e]=Lc(e)});const Uc=Lc.div`
|
|
16
16
|
display: inline-flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
border-radius: 9999px;
|
|
@@ -29,9 +29,9 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
${({variant:e,theme:t})=>{switch(e){case"default":default:return`\n background-color: ${t.colors.primary};\n color: ${t.colors.primaryForeground};\n &:hover {\n background-color: ${t.colors.primary};\n opacity: 0.9;\n }\n `;case"secondary":case"cost":case"gray":case"latency":case"latencyLow":case"latencyMedium":return`\n background-color: ${t.colors.secondary};\n color: ${t.colors.secondaryForeground};\n &:hover {\n background-color: ${t.colors.muted};\n }\n `;case"destructive":case"latencyHigh":return`\n background-color: ${t.colors.destructive};\n color: ${t.colors.destructiveForeground};\n &:hover {\n background-color: ${t.colors.destructive};\n opacity: 0.9;\n }\n `;case"outline":return`\n background-color: transparent;\n color: ${t.colors.cardForeground};\n border-color: ${t.colors.border};\n `}}}
|
|
32
|
-
`;function
|
|
32
|
+
`;function qc({className:t,variant:n="default",...r}){return e.createElement(Uc,{variant:n,className:t,...r})}const Zc=Lc.div`
|
|
33
33
|
user-select: none;
|
|
34
|
-
`,
|
|
34
|
+
`,Gc=Lc.div`
|
|
35
35
|
display: flex;
|
|
36
36
|
align-items: center;
|
|
37
37
|
gap: 0.25rem;
|
|
@@ -43,7 +43,7 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
43
43
|
&:hover {
|
|
44
44
|
background-color: ${e=>e.isExpandable?e.theme.colors.muted:"transparent"};
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`,Qc=Lc.div`
|
|
47
47
|
width: 0.5rem;
|
|
48
48
|
height: 0.5rem;
|
|
49
49
|
flex-shrink: 0;
|
|
@@ -51,31 +51,31 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
51
51
|
align-items: center;
|
|
52
52
|
justify-content: center;
|
|
53
53
|
color: ${e=>e.theme.colors.mutedForeground};
|
|
54
|
-
`,
|
|
54
|
+
`,Jc=Lc.span`
|
|
55
55
|
font-weight: 500;
|
|
56
|
-
color: ${e=>e.theme.colors.
|
|
56
|
+
color: ${e=>e.theme.colors.foreground};
|
|
57
57
|
font-size: 0.75rem;
|
|
58
|
-
`,
|
|
58
|
+
`,eu=Lc.span`
|
|
59
59
|
font-size: 0.75rem;
|
|
60
|
-
color: ${e=>
|
|
61
|
-
`,
|
|
60
|
+
color: ${e=>e.theme.colors.primary};
|
|
61
|
+
`,tu=Lc.span`
|
|
62
62
|
font-size: 0.75rem;
|
|
63
63
|
color: ${e=>e.theme.colors.mutedForeground};
|
|
64
|
-
`,
|
|
64
|
+
`,nu=Lc.div`
|
|
65
65
|
border-left: 1px solid ${e=>e.theme.colors.border};
|
|
66
66
|
margin-left: 0.5rem;
|
|
67
|
-
`,
|
|
67
|
+
`,ru=Lc.div`
|
|
68
68
|
width: 100%;
|
|
69
69
|
background-color: ${e=>e.theme.colors.muted};
|
|
70
70
|
border-radius: 0.5rem;
|
|
71
71
|
border: 1px solid ${e=>e.theme.colors.border};
|
|
72
72
|
overflow: hidden;
|
|
73
|
-
`,
|
|
73
|
+
`,ou=Lc.div`
|
|
74
74
|
width: 100%;
|
|
75
75
|
max-height: 16rem;
|
|
76
76
|
overflow-y: auto;
|
|
77
77
|
padding: 0.5rem;
|
|
78
|
-
`,
|
|
78
|
+
`,au=Lc.div`
|
|
79
79
|
width: 100%;
|
|
80
80
|
padding: 1rem;
|
|
81
81
|
text-align: center;
|
|
@@ -84,20 +84,20 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
84
84
|
background-color: ${e=>e.theme.colors.muted};
|
|
85
85
|
border-radius: 0.5rem;
|
|
86
86
|
border: 1px solid ${e=>e.theme.colors.border};
|
|
87
|
-
`,
|
|
87
|
+
`,iu=Lc.div`
|
|
88
88
|
width: 100%;
|
|
89
89
|
padding: 0.5rem;
|
|
90
90
|
background-color: ${e=>e.theme.colors.muted};
|
|
91
91
|
border-radius: 0.5rem;
|
|
92
92
|
border: 1px solid ${e=>e.theme.colors.border};
|
|
93
|
-
`,
|
|
93
|
+
`,su=Lc.span`
|
|
94
94
|
font-weight: 500;
|
|
95
95
|
color: ${e=>e.theme.colors.cardForeground};
|
|
96
96
|
font-size: 0.875rem;
|
|
97
|
-
`,
|
|
98
|
-
color: ${e=>e.theme.colors.
|
|
97
|
+
`,lu=Lc.span`
|
|
98
|
+
color: ${e=>e.theme.colors.foreground};
|
|
99
99
|
font-size: 0.875rem;
|
|
100
|
-
`,
|
|
100
|
+
`,cu=Lc.div`
|
|
101
101
|
width: 100%;
|
|
102
102
|
padding: 1rem;
|
|
103
103
|
text-align: center;
|
|
@@ -106,9 +106,9 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
106
106
|
background-color: ${e=>e.theme.colors.muted};
|
|
107
107
|
border-radius: 0.5rem;
|
|
108
108
|
border: 1px solid ${e=>e.theme.colors.border};
|
|
109
|
-
`,
|
|
109
|
+
`,uu=Lc.span`
|
|
110
110
|
color: ${e=>e.theme.colors.mutedForeground};
|
|
111
|
-
`,
|
|
111
|
+
`,du=(e,t=["input","output"])=>Object.entries(e).sort(([e],[n])=>{const r=t.indexOf(e),o=t.indexOf(n);return-1!==r&&-1!==o?r-o:-1!==r?-1:-1!==o?1:e.localeCompare(n)}),fu=({data:e,label:n,depth:r,maxDepth:o,path:a,priorityKeys:i})=>{const[s,l]=u(!1),c=null!==e&&"object"==typeof e&&!Array.isArray(e),d=Array.isArray(e),f=(c||d)&&r<o,p=f&&Object.keys(e).length>0;return t.createElement(Zc,null,t.createElement(Gc,{isExpandable:f,onClick:()=>{f&&l(!s)},style:{paddingLeft:12*r+8+"px"}},t.createElement(Qc,null,f&&p?s?t.createElement(Ms,{size:12}):t.createElement(Ps,{size:12}):t.createElement("div",{style:{width:"12px",height:"12px"}})),t.createElement(Jc,null,n,":"),!f&&t.createElement(eu,{valueType:(h=e,null===h?"null":void 0===h?"undefined":typeof h)},(e=>null===e?"null":void 0===e?"undefined":"string"==typeof e?`"${e}"`:"number"==typeof e||"boolean"==typeof e?e.toString():Array.isArray(e)?`Array(${e.length})`:"object"==typeof e?`Object(${Object.keys(e).length})`:String(e))(e)),f&&!p&&t.createElement(tu,null,d?"[]":"{}"),f&&p&&!s&&t.createElement(tu,null,d?`[${Object.keys(e).length} items]`:`{${Object.keys(e).length} keys}`)),s&&p&&t.createElement(nu,null,du(e,i).map(([e,n])=>t.createElement(fu,{key:`${a}.${e}`,data:n,label:e,depth:r+1,maxDepth:o,path:`${a}.${e}`,priorityKeys:i}))));var h},pu=({data:e,maxDepth:n=4,initialExpanded:r=!1,className:o="",priorityKeys:a=["input","output"]})=>null==e?t.createElement(au,{className:o},"No data available"):"object"!=typeof e?t.createElement(iu,{className:o},t.createElement(su,null,"Value:")," ",t.createElement(lu,null,String(e))):0===Object.keys(e).length?t.createElement(cu,{className:o},t.createElement(uu,null,Array.isArray(e)?"Empty array":"Empty object")):t.createElement(ru,{className:o},t.createElement(ou,null,du(e,a).map(([e,r])=>t.createElement(fu,{key:e,data:r,label:e,depth:0,maxDepth:n,path:e,priorityKeys:a})))),hu=({width:e="1.5rem",height:n="1.5rem"})=>t.createElement("svg",{style:{width:"number"==typeof e?`${e}px`:e,height:"number"==typeof n?`${n}px`:n,display:"block"},fill:"currentColor",viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"OpenAI icon"),t.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})),mu=({width:e="1.5rem",height:n="1.5rem"})=>t.createElement("svg",{style:{width:"number"==typeof e?`${e}px`:e,height:"number"==typeof n?`${n}px`:n},xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},t.createElement("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),t.createElement("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),t.createElement("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),t.createElement("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),t.createElement("path",{d:"M1 1h22v22H1z",fill:"none"})),gu=({width:e="1.5rem",height:n="1.5rem"})=>t.createElement("svg",{style:{width:"number"==typeof e?`${e}px`:e,height:"number"==typeof n?`${n}px`:n},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",height:"24",width:"24"},t.createElement("path",{fill:"currentColor",d:"m13.788825 3.932 6.43325 16.136075h3.5279L17.316725 3.932H13.788825Z",strokeWidth:"0.25"}),t.createElement("path",{fill:"currentColor",d:"m6.325375 13.682775 2.20125 -5.67065 2.201275 5.67065H6.325375ZM6.68225 3.932 0.25 20.068075h3.596525l1.3155 -3.3886h6.729425l1.315275 3.3886h3.59655L10.371 3.932H6.68225Z",strokeWidth:"0.25"})),yu=({label:e,content:n,isExpanded:r,onToggle:o,theme:a})=>{const i=r?n:n?.slice(0,100)+(n?.length>100?"...":"");return t.createElement(ku,null,t.createElement(Nu,{onClick:o,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=a.colors.muted},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},t.createElement(Mu,{style:{color:a.colors.mutedForeground}},e),t.createElement(Ou,null,r?t.createElement(Ms,{style:{width:"12px",height:"12px",color:a.colors.mutedForeground}}):t.createElement(Ps,{style:{width:"12px",height:"12px",color:a.colors.mutedForeground}}))),t.createElement(Pu,{theme:a,value:i||"",readOnly:!0,rows:r?Math.max(3,Math.max(n?.split("\n").length||0,Math.ceil((n?.length||0)/60))):2,style:{border:`1px solid ${a.colors.border}`,backgroundColor:a.colors.muted,color:a.colors.foreground}}))},vu=({data:e,id:n})=>{za();const{theme:r}=Pc(),[o,a]=u(!1),[i,s]=u(!1),l=e.edges?.some(e=>e.source===n)||!1,c=e.edges?.some(e=>e.target===n)||!1,d=e.nodeType||"Agent",f=e.label||Hc(d)||"Agent",p=e.details?.internals?.llm_details?.[0]?.model_provider,h=((e,n)=>{if("tool"===e)return"🔧";if("coordinator"===e)return"🎯";if("agent"===e){if("OpenAI"===n)return t.createElement(hu,null);if("Anthropic"===n)return t.createElement(gu,null);if("Google"===n||"Vertex_AI"===n)return t.createElement(mu,null)}return"🤖"})(d.toLowerCase(),p),m=e.details?.internals?.llm_details?.[0]?.model_name||"Unknown",g=Wc(e.details?.internals?.llm_details?.[0]?.total_cost),y=e.details?.internals?.llm_details?.[0]?.input?.[0]?.content||"",v=e.details?.internals?.llm_details?.[0]?.input?.[1]?.content||"",b=e.details?.internals?.latency?.total_time;return t.createElement(bu,{onClick:()=>{console.log("Node clicked:",{label:e.label,nodeType:e.nodeType,details:e.details})},theme:r},c&&t.createElement(Jo,{type:"target",position:ho.Top,style:{width:"8px",height:"8px",border:`2px solid ${r.colors.primary}`,backgroundColor:r.colors.background,cursor:"default"},isConnectable:!1}),t.createElement(wu,{theme:r},t.createElement(xu,null,t.createElement(Su,null,h),t.createElement(Eu,{theme:r},f)),"Agent"===d&&t.createElement(_u,null,t.createElement(qc,{variant:"gray"},m),t.createElement(qc,{variant:"cost"},g)),"Tool"===d&&null!=b&&t.createElement(_u,null,t.createElement(qc,{variant:"latency"},Vc(b))),"Coordinator"===d&&t.createElement(_u,null,t.createElement(qc,{variant:"gray"},"Coordinator"))),t.createElement(Cu,null,"Agent"===d?t.createElement(t.Fragment,null,t.createElement(yu,{label:"System Message",content:y,isExpanded:o,onToggle:()=>a(!o),theme:r}),t.createElement(yu,{label:"User Message",content:v,isExpanded:i,onToggle:()=>s(!i),theme:r})):"Tool"===d?t.createElement(pu,{data:(()=>{const t=e.details?.internals||{};return e.edgeDetails&&e.edgeDetails.length>0?{...t,input:{args:e.edgeDetails[0]?.input_args,kwargs:e.edgeDetails[0]?.input_kwargs},output:e.edgeDetails[0]?.output,state:e.edgeDetails[0]?.state,status:e.edgeDetails[0]?.status}:t})()}):"Coordinator"===d?t.createElement(pu,{data:e.details?.internals||{}}):null),l&&t.createElement(Jo,{type:"source",position:ho.Bottom,style:{width:"8px",height:"8px",border:`2px solid ${r.colors.primary}`,backgroundColor:r.colors.background,cursor:"default"},isConnectable:!1}))},bu=Lc.div`
|
|
112
112
|
font-family: ui-sans-serif, system-ui, sans-serif;
|
|
113
113
|
border-radius: 0.5rem;
|
|
114
114
|
background-color: ${e=>e.theme.colors.card};
|
|
@@ -121,45 +121,45 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
121
121
|
cursor: pointer;
|
|
122
122
|
|
|
123
123
|
&:hover {
|
|
124
|
-
border-color:
|
|
124
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
125
125
|
box-shadow: ${e=>e.theme.shadows.md};
|
|
126
126
|
}
|
|
127
|
-
`,
|
|
127
|
+
`,wu=Lc.div`
|
|
128
128
|
display: flex;
|
|
129
129
|
justify-content: space-between;
|
|
130
130
|
align-items: center;
|
|
131
131
|
gap: 0.5rem;
|
|
132
132
|
padding: 0.75rem;
|
|
133
133
|
border-bottom: 1px solid ${e=>e.theme.colors.border};
|
|
134
|
-
`,
|
|
134
|
+
`,xu=Lc.div`
|
|
135
135
|
display: flex;
|
|
136
136
|
align-items: center;
|
|
137
137
|
gap: 0.5rem;
|
|
138
|
-
`,
|
|
138
|
+
`,Su=Lc.div`
|
|
139
139
|
font-size: 1.25rem;
|
|
140
140
|
display: flex;
|
|
141
141
|
align-items: center;
|
|
142
142
|
justify-content: center;
|
|
143
|
-
`,
|
|
143
|
+
`,Eu=Lc.div`
|
|
144
144
|
font-weight: 600;
|
|
145
145
|
color: ${e=>e.theme.colors.foreground};
|
|
146
146
|
font-size: 0.875rem;
|
|
147
147
|
word-break: break-words;
|
|
148
|
-
`,
|
|
148
|
+
`,_u=Lc.div`
|
|
149
149
|
display: flex;
|
|
150
150
|
gap: 0.5rem;
|
|
151
151
|
justify-content: flex-end;
|
|
152
152
|
align-items: center;
|
|
153
|
-
`,
|
|
153
|
+
`,Cu=Lc.div`
|
|
154
154
|
padding: 0.75rem;
|
|
155
155
|
display: flex;
|
|
156
156
|
flex-direction: column;
|
|
157
157
|
align-items: flex-start;
|
|
158
158
|
justify-content: center;
|
|
159
159
|
gap: 0.5rem;
|
|
160
|
-
`,
|
|
160
|
+
`,ku=Lc.div`
|
|
161
161
|
width: 100%;
|
|
162
|
-
`,
|
|
162
|
+
`,Nu=Lc.div`
|
|
163
163
|
display: flex;
|
|
164
164
|
justify-content: space-between;
|
|
165
165
|
align-items: center;
|
|
@@ -173,10 +173,10 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
173
173
|
&:hover {
|
|
174
174
|
background-color: transparent;
|
|
175
175
|
}
|
|
176
|
-
`,
|
|
176
|
+
`,Mu=Lc.span`
|
|
177
177
|
font-weight: 600;
|
|
178
178
|
font-size: 0.75rem;
|
|
179
|
-
`,
|
|
179
|
+
`,Pu=Lc.textarea`
|
|
180
180
|
box-sizing: border-box;
|
|
181
181
|
width: 100%;
|
|
182
182
|
border-radius: 0.25rem;
|
|
@@ -188,33 +188,33 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
188
188
|
|
|
189
189
|
&:focus {
|
|
190
190
|
outline: none;
|
|
191
|
-
border-color:
|
|
192
|
-
box-shadow: 0 0 0 1px
|
|
191
|
+
border-color: ${e=>e.theme.colors.primary};
|
|
192
|
+
box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary};
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
transition: all 0.2s ease-in-out;
|
|
196
|
-
`,
|
|
196
|
+
`,Ou=Lc.div`
|
|
197
197
|
transition: transform 0.2s ease-in-out;
|
|
198
|
-
`,
|
|
198
|
+
`,Au=Lc.div`
|
|
199
199
|
background-color: ${e=>e.theme.colors.card};
|
|
200
200
|
border: 1px solid ${e=>e.theme.colors.border};
|
|
201
201
|
border-radius: 0.5rem;
|
|
202
202
|
overflow: hidden;
|
|
203
203
|
width: 100%;
|
|
204
204
|
max-width: 400px;
|
|
205
|
-
`,
|
|
205
|
+
`,Ru=Lc.div`
|
|
206
206
|
display: flex;
|
|
207
207
|
justify-content: space-between;
|
|
208
208
|
align-items: center;
|
|
209
209
|
padding: 0.75rem;
|
|
210
210
|
border-bottom: 1px solid ${e=>e.theme.colors.border};
|
|
211
211
|
background-color: ${e=>e.theme.colors.muted};
|
|
212
|
-
`,
|
|
212
|
+
`,Tu=Lc.h3`
|
|
213
213
|
margin: 0;
|
|
214
214
|
font-size: 0.875rem;
|
|
215
215
|
font-weight: 600;
|
|
216
216
|
color: ${e=>e.theme.colors.cardForeground};
|
|
217
|
-
`,
|
|
217
|
+
`,Du=Lc.button`
|
|
218
218
|
display: flex;
|
|
219
219
|
align-items: center;
|
|
220
220
|
justify-content: center;
|
|
@@ -230,11 +230,11 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
230
230
|
background-color: ${e=>e.theme.colors.accent};
|
|
231
231
|
color: ${e=>e.theme.colors.accentForeground};
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
`,$u=Lc.div`
|
|
234
234
|
padding: 0.75rem;
|
|
235
235
|
max-height: 400px;
|
|
236
236
|
overflow-y: auto;
|
|
237
|
-
`,
|
|
237
|
+
`,Iu=Lc.div`
|
|
238
238
|
position: relative;
|
|
239
239
|
padding: 0.5rem;
|
|
240
240
|
border-radius: 0.375rem;
|
|
@@ -247,26 +247,26 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
247
247
|
&:hover {
|
|
248
248
|
background-color: ${e=>e.hasStep&&!e.isActive?e.theme.colors.accent:e.isActive?e.theme.colors.primary:"transparent"};
|
|
249
249
|
}
|
|
250
|
-
`,
|
|
250
|
+
`,zu=Lc.div`
|
|
251
251
|
display: flex;
|
|
252
252
|
align-items: center;
|
|
253
253
|
gap: 0.5rem;
|
|
254
254
|
margin-bottom: 0.25rem;
|
|
255
|
-
|
|
255
|
+
`,Lu=Lc.div`
|
|
256
256
|
width: 0.5rem;
|
|
257
257
|
height: 0.5rem;
|
|
258
258
|
border-radius: 50%;
|
|
259
259
|
background-color: ${e=>e.isActive?e.theme.colors.primaryForeground:e.isPast?e.theme.colors.primary:e.hasStep?e.theme.colors.mutedForeground:e.theme.colors.border};
|
|
260
260
|
flex-shrink: 0;
|
|
261
|
-
`,
|
|
261
|
+
`,Bu=Lc.span`
|
|
262
262
|
font-weight: 600;
|
|
263
263
|
font-size: 0.75rem;
|
|
264
264
|
color: ${e=>e.isActive?e.theme.colors.primaryForeground:e.theme.colors.cardForeground};
|
|
265
|
-
`,
|
|
265
|
+
`,Fu=Lc.div`
|
|
266
266
|
font-size: 0.75rem;
|
|
267
267
|
color: ${e=>e.hasStep?e.theme.colors.cardForeground:e.theme.colors.mutedForeground};
|
|
268
268
|
font-style: ${e=>e.hasStep?"normal":"italic"};
|
|
269
|
-
`,
|
|
269
|
+
`,Hu=Lc.div`
|
|
270
270
|
position: absolute;
|
|
271
271
|
top: 0;
|
|
272
272
|
left: 0;
|
|
@@ -286,7 +286,7 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
286
286
|
opacity: 0.5;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
`,Bu=({stamps:e,currentStep:n,onStepChange:r,onToggle:o})=>{const a=e.length>0?Math.max(...e.map(e=>e.step)):0,i=e.length>0?Math.min(...e.map(e=>e.step)):0,s=a-i+1,l=e=>e<5e3?"latencyLow":e<=3e4?"latencyMedium":"latencyHigh";return t.createElement(Mu,null,t.createElement(Pu,null,t.createElement(Ou,null,"Timeline"),o&&t.createElement(Au,{onClick:o,title:"Collapse Panel"},t.createElement(Rs,{size:16}))),t.createElement(Ru,null,Array.from({length:s},(o,a)=>{const s=i+a,c=s===n,u=s<n,d=e.some(e=>e.step===s),f=(t=>{const n=e.filter(e=>e.step===t);if(0===n.length)return null;const r=t-1,o=e.filter(e=>e.step===r);return 0===o.length?null:Math.min(...n.map(e=>e.time))-Math.max(...o.map(e=>e.time))})(s),p=(t=>{const n=e.filter(e=>e.step===t);return 0===n.length?`Step ${t}`:n[0]?.identifier||`Step ${t}`})(s);return t.createElement(Tu,{key:s,isActive:c,isPast:u,hasStep:d,onClick:()=>d&&r(s)},t.createElement(Du,null,t.createElement($u,{isActive:c,isPast:u,hasStep:d}),t.createElement(Iu,{isActive:c},"Step ",s),f&&t.createElement(Xc,{variant:l(f),style:{marginLeft:"auto"}},(e=>e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`)(f))),t.createElement(zu,{hasStep:d},d?p:"No activity"),c&&t.createElement(Lu,null))})))};function Fu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Hu(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Wu(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Hu(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Hu(e[t],null)}}}}function Vu(...t){return e.useCallback(Wu(...t),t)}function ju(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const a=e.createContext(o),i=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[i]||a,c=e.useMemo(()=>s,Object.values(s));return m(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[i]||a,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Yu(o,...n)]}function Yu(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var Xu=globalThis?.document?e.useLayoutEffect:()=>{},Ku=e[" useId ".trim().toString()]||(()=>{}),Uu=0;function qu(t){const[n,r]=e.useState(Ku());return Xu(()=>{t||r(e=>e??String(Uu++))},[t]),t||(n?`radix-${n}`:"")}var Zu=e[" useInsertionEffect ".trim().toString()]||Xu;function Gu({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[a,i,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),a=e.useRef(r),i=e.useRef(n);return Zu(()=>{i.current=n},[n]),e.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,o,i]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:a;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l},[l,o])}const u=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else i(e)},[l,t,i,s]);return[c,u]}function Qu(t){const n=Ju(t),r=e.forwardRef((t,r)=>{const{children:o,...a}=t,i=e.Children.toArray(o),s=i.find(td);if(s){const t=s.props.children,o=i.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return m(n,{...a,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}function Ju(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),a=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(a.ref=n?Wu(n,t):t),e.cloneElement(r,a)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var ed=Symbol("radix.slottable");function td(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===ed}var nd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=Qu(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...a}=e,i=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(i,{...a,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function rd(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var od,ad="dismissableLayer.update",id="dismissableLayer.pointerDownOutside",sd="dismissableLayer.focusOutside",ld=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cd=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(ld),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=e.useState({}),g=Vu(n,e=>f(e)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),w=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,E=function(t,n=globalThis?.document){const r=rd(t),o=e.useRef(!1),a=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){fd(id,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));S&&!n&&(a?.(e),s?.(e),e.defaultPrevented||l?.())},p),_=function(t,n=globalThis?.document){const r=rd(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){fd(sd,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},p);return function(t,n=globalThis?.document){const r=rd(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{w===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),e.useEffect(()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(od=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),dd(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=od)}},[d,p,r,u]),e.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),dd())},[d,u]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(ad,e),()=>document.removeEventListener(ad,e)},[]),m(nd.div,{...c,ref:g,style:{pointerEvents:x?S?"auto":"none":void 0,...t.style},onFocusCapture:Fu(t.onFocusCapture,_.onFocusCapture),onBlurCapture:Fu(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Fu(t.onPointerDownCapture,E.onPointerDownCapture)})});cd.displayName="DismissableLayer";var ud=e.forwardRef((t,n)=>{const r=e.useContext(ld),o=e.useRef(null),a=Vu(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),m(nd.div,{...t,ref:a})});function dd(){const e=new CustomEvent(ad);document.dispatchEvent(e)}function fd(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&p.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}ud.displayName="DismissableLayerBranch";var pd="focusScope.autoFocusOnMount",hd="focusScope.autoFocusOnUnmount",md={bubbles:!1,cancelable:!0},gd=e.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=t,[l,c]=e.useState(null),u=rd(a),d=rd(i),f=e.useRef(null),p=Vu(n,e=>c(e)),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:wd(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||wd(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&wd(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,l,h.paused]),e.useEffect(()=>{if(l){xd.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(pd,md);l.addEventListener(pd,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wd(r,{select:t}),document.activeElement!==n)return}((e=yd(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&wd(l))}return()=>{l.removeEventListener(pd,u),setTimeout(()=>{const e=new CustomEvent(hd,md);l.addEventListener(hd,d),l.dispatchEvent(e),e.defaultPrevented||wd(t??document.body,{select:!0}),l.removeEventListener(hd,d),xd.remove(h)},0)}}var e},[l,u,d,h]);const g=e.useCallback(e=>{if(!r&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,a]=function(e){const t=yd(e),n=vd(t,e),r=vd(t.reverse(),e);return[n,r]}(t);o&&a?e.shiftKey||n!==a?e.shiftKey&&n===o&&(e.preventDefault(),r&&wd(a,{select:!0})):(e.preventDefault(),r&&wd(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,h.paused]);return m(nd.div,{tabIndex:-1,...s,ref:p,onKeyDown:g})});function yd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vd(e,t){for(const n of e)if(!bd(n,{upTo:t}))return n}function bd(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function wd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}gd.displayName="FocusScope";var xd=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Sd(e,t),e.unshift(t)},remove(t){e=Sd(e,t),e[0]?.resume()}}}();function Sd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Ed=e.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=e.useState(!1);Xu(()=>i(!0),[]);const s=r||a&&globalThis?.document?.body;return s?h.createPortal(m(nd.div,{...o,ref:n}),s):null});Ed.displayName="Portal";var _d=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),a=e.useRef(t),i=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Cd(o.current);i.current="mounted"===l?e:"none"},[l]),Xu(()=>{const e=o.current,n=a.current;if(n!==t){const r=i.current,o=Cd(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=t}},[t,c]),Xu(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const i=Cd(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&i&&(c("ANIMATION_END"),!a.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(i.current=Cd(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),a="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),i=Vu(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||o.isPresent?e.cloneElement(a,{ref:i}):null};function Cd(e){return e?.animationName||"none"}_d.displayName="Presence";var kd=0;function Nd(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Md()),document.body.insertAdjacentElement("beforeend",e[1]??Md()),kd++,()=>{1===kd&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kd--}},[])}function Md(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pd=function(){return Pd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pd.apply(this,arguments)};function Od(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Ad="right-scroll-bar-position",Rd="width-before-scroll-bar";function Td(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Dd="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,$d=new WeakMap;function Id(e,t){var n,r,o,a=(n=t||null,r=function(t){return e.forEach(function(e){return Td(e,t)})},(o=u(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return Dd(function(){var t=$d.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||Td(e,null)}),r.forEach(function(e){n.has(e)||Td(e,o)})}$d.set(a,e)},[e]),a}function zd(e){return e}var Ld=function(t){var n=t.sideCar,r=Od(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,Pd({},r))};Ld.isSideCarExport=!0;var Bd=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=zd);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=Pd({async:!0,ssr:!1},e),t}(),Fd=function(){},Hd=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:Fd,onWheelCapture:Fd,onTouchMoveCapture:Fd}),a=o[0],i=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,h=t.noRelative,m=t.noIsolation,g=t.inert,y=t.allowPinchZoom,v=t.as,b=void 0===v?"div":v,w=t.gapMode,x=Od(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=Id([r,n]),_=Pd(Pd({},x),a);return e.createElement(e.Fragment,null,d&&e.createElement(S,{sideCar:Bd,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:w}),s?e.cloneElement(e.Children.only(l),Pd(Pd({},_),{ref:E})):e.createElement(b,Pd({},_,{className:c,ref:E}),l))});Hd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Hd.classNames={fullWidth:Rd,zeroRight:Ad};function Wd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Vd=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=Wd())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jd=function(){var t,n=(t=Vd(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Yd={left:0,top:0,right:0,gap:0},Xd=function(e){return parseInt(e||"",10)||0},Kd=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Yd;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Xd(n),Xd(r),Xd(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ud=jd(),qd="data-scroll-locked",Zd=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(qd,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ad," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Rd," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ad," .").concat(Ad," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Rd," .").concat(Rd," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(qd,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Gd=function(){var e=parseInt(document.body.getAttribute(qd)||"0",10);return isFinite(e)?e:0},Qd=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(qd,(Gd()+1).toString()),function(){var e=Gd()-1;e<=0?document.body.removeAttribute(qd):document.body.setAttribute(qd,e.toString())}},[]);var i=e.useMemo(function(){return Kd(a)},[a]);return e.createElement(Ud,{styles:Zd(i,!n,a,r?"":"!important")})},Jd=!1;if("undefined"!=typeof window)try{var ef=Object.defineProperty({},"passive",{get:function(){return Jd=!0,!0}});window.addEventListener("test",ef,ef),window.removeEventListener("test",ef,ef)}catch(e){Jd=!1}var tf=!!Jd&&{passive:!1},nf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},rf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),of(e,r)){var o=af(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},of=function(e,t){return"v"===e?function(e){return nf(e,"overflowY")}(t):function(e){return nf(e,"overflowX")}(t)},af=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},sf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lf=function(e){return[e.deltaX,e.deltaY]},cf=function(e){return e&&"current"in e?e.current:e},uf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},df=0,ff=[];function pf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var hf,mf=(hf=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(df++)[0],i=e.useState(jd)[0],s=e.useRef(t);e.useEffect(function(){s.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(cf),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,a=sf(e),i=r.current,l="deltaX"in e?e.deltaX:i[0]-a[0],c="deltaY"in e?e.deltaY:i[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=rf(d,u);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=rf(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var p=af(e,s),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&of(e,s)&&(d+=m,f+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(d)<1||!o&&i>d)||!u&&(o&&Math.abs(f)<1||!o&&-i>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)},[]),c=e.useCallback(function(e){var t=e;if(ff.length&&ff[ff.length-1]===i){var r="deltaY"in t?lf(t):sf(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(s.current.shards||[]).map(cf).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?l(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:pf(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=e.useCallback(function(e){r.current=sf(e),o.current=void 0},[]),f=e.useCallback(function(e){u(e.type,lf(e),e.target,l(e,t.lockRef.current))},[]),p=e.useCallback(function(e){u(e.type,sf(e),e.target,l(e,t.lockRef.current))},[]);e.useEffect(function(){return ff.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,tf),document.addEventListener("touchmove",c,tf),document.addEventListener("touchstart",d,tf),function(){ff=ff.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,tf),document.removeEventListener("touchmove",c,tf),document.removeEventListener("touchstart",d,tf)}},[]);var h=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(i,{styles:uf(a)}):null,h?e.createElement(Qd,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},Bd.useMedium(hf),Ld),gf=e.forwardRef(function(t,n){return e.createElement(Hd,Pd({},t,{ref:n,sideCar:mf}))});gf.classNames=Hd.classNames;var yf=gf,vf=new WeakMap,bf=new WeakMap,wf={},xf=0,Sf=function(e){return e&&(e.host||Sf(e.parentNode))},Ef=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Sf(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);wf[n]||(wf[n]=new WeakMap);var a=wf[n],i=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(vf.get(e)||0)+1,c=(a.get(e)||0)+1;vf.set(e,l),a.set(e,c),i.push(e),1===l&&o&&bf.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),xf++,function(){i.forEach(function(e){var t=vf.get(e)-1,o=a.get(e)-1;vf.set(e,t),a.set(e,o),t||(bf.has(e)||e.removeAttribute(r),bf.delete(e)),o||e.removeAttribute(n)}),--xf||(vf=new WeakMap,vf=new WeakMap,bf=new WeakMap,wf={})}},_f=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Ef(r,o,n,"aria-hidden")):function(){return null}},Cf="Dialog",[kf,Nf]=ju(Cf),[Mf,Pf]=kf(Cf),Of=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u,d]=Gu({prop:o,defaultProp:a??!1,onChange:i,caller:Cf});return m(Mf,{scope:n,triggerRef:l,contentRef:c,contentId:qu(),titleId:qu(),descriptionId:qu(),open:u,onOpenChange:d,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};Of.displayName=Cf;var Af="DialogTrigger",Rf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pf(Af,n),a=Vu(t,o.triggerRef);return m(nd.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qf(o.open),...r,ref:a,onClick:Fu(e.onClick,o.onOpenToggle)})});Rf.displayName=Af;var Tf="DialogPortal",[Df,$f]=kf(Tf,{forceMount:void 0}),If=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,i=Pf(Tf,n);return m(Df,{scope:n,forceMount:r,children:e.Children.map(o,e=>m(_d,{present:r||i.open,children:m(Ed,{asChild:!0,container:a,children:e})}))})};If.displayName=Tf;var zf="DialogOverlay",Lf=e.forwardRef((e,t)=>{const n=$f(zf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pf(zf,e.__scopeDialog);return a.modal?m(_d,{present:r||a.open,children:m(Ff,{...o,ref:t})}):null});Lf.displayName=zf;var Bf=Qu("DialogOverlay.RemoveScroll"),Ff=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pf(zf,n);return m(yf,{as:Bf,allowPinchZoom:!0,shards:[o.contentRef],children:m(nd.div,{"data-state":Qf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Hf="DialogContent",Wf=e.forwardRef((e,t)=>{const n=$f(Hf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Pf(Hf,e.__scopeDialog);return m(_d,{present:r||a.open,children:a.modal?m(Vf,{...o,ref:t}):m(jf,{...o,ref:t})})});Wf.displayName=Hf;var Vf=e.forwardRef((t,n)=>{const r=Pf(Hf,t.__scopeDialog),o=e.useRef(null),a=Vu(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return _f(e)},[]),m(Yf,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fu(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Fu(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Fu(t.onFocusOutside,e=>e.preventDefault())})}),jf=e.forwardRef((t,n)=>{const r=Pf(Hf,t.__scopeDialog),o=e.useRef(!1),a=e.useRef(!1);return m(Yf,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=r.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Yf=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=t,l=Pf(Hf,r),c=e.useRef(null),u=Vu(n,c);return Nd(),g(y,{children:[m(gd,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:m(cd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Qf(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),g(y,{children:[m(np,{titleId:l.titleId}),m(rp,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Xf="DialogTitle",Kf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pf(Xf,n);return m(nd.h2,{id:o.titleId,...r,ref:t})});Kf.displayName=Xf;var Uf="DialogDescription",qf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pf(Uf,n);return m(nd.p,{id:o.descriptionId,...r,ref:t})});qf.displayName=Uf;var Zf="DialogClose",Gf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Pf(Zf,n);return m(nd.button,{type:"button",...r,ref:t,onClick:Fu(e.onClick,()=>o.onOpenChange(!1))})});function Qf(e){return e?"open":"closed"}Gf.displayName=Zf;var Jf="DialogTitleWarning",[ep,tp]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,a=e.useMemo(()=>o,Object.values(o));return m(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(o){const a=e.useContext(r);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(Jf,{contentName:Hf,titleName:Xf,docsSlug:"dialog"}),np=({titleId:t})=>{const n=tp(Jf),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},rp=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tp("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},op=Of,ap=Rf,ip=If,sp=Lf,lp=Wf,cp=Kf,up=qf,dp=Gf;const fp=op,pp=ap,hp=ip,mp=e.forwardRef(({className:t,...n},r)=>e.createElement(sp,{style:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:50,backgroundColor:"hsla(var(--background), 0.8)",backdropFilter:"blur(4px)"},className:t,...n,ref:r}));mp.displayName=sp.displayName;const gp=(e="right")=>{const t={position:"fixed",zIndex:50,gap:"16px",backgroundColor:"hsl(var(--background))",padding:"24px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",transition:"all 0.3s ease-in-out"};switch(e){case"top":return{...t,left:0,right:0,top:0,borderBottom:"1px solid hsl(var(--border))"};case"bottom":return{...t,left:0,right:0,bottom:0,borderTop:"1px solid hsl(var(--border))"};case"left":return{...t,top:0,bottom:0,left:0,height:"100%",width:"75%",borderRight:"1px solid hsl(var(--border))",maxWidth:"384px"};default:return{...t,top:0,bottom:0,right:0,height:"100%",width:"75%",borderLeft:"1px solid hsl(var(--border))",maxWidth:"384px"}}},yp=e.forwardRef(({side:t="right",className:n,children:r,...o},a)=>e.createElement(hp,null,e.createElement(mp,null),e.createElement(lp,{ref:a,style:gp(t),className:n,...o},r,e.createElement(dp,{style:{position:"absolute",right:"16px",top:"16px",borderRadius:"4px",opacity:.7,transition:"opacity 0.2s ease-in-out",cursor:"pointer",border:"none",background:"transparent",padding:"4px"},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.7"}},e.createElement("svg",{style:{height:"16px",width:"16px"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})),e.createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}},"Close")))));yp.displayName=lp.displayName;e.forwardRef(({className:t,...n},r)=>e.createElement(cp,{ref:r,style:{fontSize:"18px",fontWeight:600,color:"hsl(var(--foreground))"},className:t,...n})).displayName=cp.displayName;e.forwardRef(({className:t,...n},r)=>e.createElement(up,{ref:r,style:{fontSize:"14px",color:"hsl(var(--muted-foreground))"},className:t,...n})).displayName=up.displayName;const vp=(e,t,n={})=>{const{minNodeSpacing:r=200,containerWidth:o=600}=n;if(!e||0===e.length)return new Map;new Map(e.map(e=>[e.identifier,e]));const a=new Map,i=new Map;e.forEach(e=>a.set(e.identifier,[])),t.length>0?t.forEach(e=>{e.source&&e.target&&(a.get(e.source)?.push(e.target),i.set(e.target,e.source))}):e.forEach(e=>{e.parent&&e.parent.identifier!==e.identifier&&(a.get(e.parent.identifier)?.push(e.identifier),i.set(e.identifier,e.parent.identifier))});const s=e.filter(e=>!i.has(e.identifier)),l=new Map,c=(e,t)=>{l.set(e,t);for(const n of a.get(e)||[])c(n,t+1)};s.forEach(e=>c(e.identifier,0));const u=[];e.forEach(e=>{const t=l.get(e.identifier)??0;u[t]||(u[t]=[]),u[t].push(e.identifier)});const d=new Map,f=200,p=Math.max(250,r+50),h=e=>{const t=a.get(e)||[];if(0===t.length)return d.set(e,f),f;let n=0;for(const e of t)n+=h(e);return n+=(t.length-1)*p,d.set(e,n),n};s.forEach(e=>h(e.identifier));const m=new Map,g=Math.max(400,r+200),y=(e,t,n)=>{const r=d.get(e)||f,o=n*g+100,i=a.get(e)||[];if(0===i.length)m.set(e,{x:t+r/2-100,y:o});else{let r=t;for(const e of i){const t=d.get(e)||f;y(e,r,n+1),r+=t+p}const a=i[0],s=i[i.length-1],l=m.get(a),c=m.get(s),u=(l.x+c.x)/2;m.set(e,{x:u,y:o})}};let v=0;for(const e of s)v+=d.get(e.identifier)||f;s.length>1&&(v+=(s.length-1)*p*2);let b=Math.max(0,(o-v)/2);for(const e of s)y(e.identifier,b,0),b+=(d.get(e.identifier)||f)+2*p;const w=r,x=Array.from(m.keys());for(let e=0;e<x.length;e++)for(let t=e+1;t<x.length;t++){const n=m.get(x[e]),r=m.get(x[t]);if(Math.sqrt((r.x-n.x)**2+(r.y-n.y)**2)<w){const e=r.x-n.x,t=r.y-n.y,o=Math.sqrt(e*e+t*t);if(o>0){const a=w/o,i=(e*a-e)/2,s=(t*a-t)/2;n.x-=i,n.y-=s,r.x+=i,r.y+=s}else n.x-=w/2,r.x+=w/2}}return m},bp={Agent:mu,Tool:mu,Coordinator:mu},wp=({flowData:e,width:n="100%",height:r="1000px",className:a="",defaultZoom:c=1,defaultPan:d={x:0,y:0},disableAutoFit:f=!0,showTimeline:p=!1,minNodeSpacing:h=200})=>{const{theme:m}=zs(),g=e;if(!g)return t.createElement("div",{style:{width:"number"==typeof n?`${n}px`:n,height:"number"==typeof r?`${r}px`:r,border:`1px solid ${m.colors.border}`,borderRadius:"8px",background:m.colors.muted,position:"relative",minWidth:"800px",minHeight:"600px",display:"flex",alignItems:"center",justifyContent:"center"},className:a},t.createElement("div",{style:{textAlign:"center"}},t.createElement("div",{style:{fontSize:"16px",color:m.colors.mutedForeground,marginBottom:"8px"}},"No flow data available"),t.createElement("div",{style:{fontSize:"14px",color:m.colors.mutedForeground}},"Please provide flowData prop")));const y=l(null),v=l(null),[b,w]=u({width:"number"==typeof n?n:1200,height:"number"==typeof r?r:600}),[x,S]=u(0),[E,_]=u(!1),C=l(null),[k,N]=u(!1),M=o(()=>{const e=g.stamps||g.steps||[];return e.length>0?Math.max(...e.map(e=>e.step)):0},[g.stamps,g.steps]);i(()=>(E?C.current=setInterval(()=>{S(e=>e>=M?(_(!1),e):e+1)},250):C.current&&(clearInterval(C.current),C.current=null),()=>{C.current&&clearInterval(C.current)}),[E,M]),i(()=>{const e=g.stamps||g.steps||[];e.length>0&&S(Math.max(...e.map(e=>e.step)))},[g.stamps,g.steps]),i(()=>{const e=()=>{if(y.current){const e=y.current.getBoundingClientRect();w({width:Math.max(e.width||("number"==typeof n?n:1200),1200),height:e.height||("number"==typeof r?r:600)})}};if(e(),window.ResizeObserver&&y.current){const t=new ResizeObserver(e);return t.observe(y.current),()=>t.disconnect()}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[n,r]);const P=o(()=>{if(!g.nodes)return new Map;const e=Math.max(b.width||800,1200);return vp(g.nodes,g.edges||[],{minNodeSpacing:h,containerWidth:e})},[g.nodes,g.edges,b.width,h]),O=s(e=>g.nodes?g.nodes.filter(t=>t.stamp.step<=e):[],[g.nodes]),A=s(e=>(g.edges||[]).filter(t=>t.stamp.step<=e),[g.edges]),R=o(()=>{const e=O(x),t=A(x);return e.map(e=>{const n=P.get(e.identifier)||{x:0,y:0},r=e.stamp.step===x,o="Tool"===e.node_type?t.filter(t=>t.target===e.identifier&&t.details).map(e=>e.details):void 0;return{id:e.identifier,type:e.node_type||"Agent",position:n,data:{label:e.name||e.node_type,nodeType:e.node_type,details:e.details,isActive:r,id:e.identifier,edges:t,edgeDetails:o},style:{filter:r?"drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3))":"none"}}})},[P,x,O,A]),T=o(()=>A(x).filter(e=>e.source&&e.target).map(e=>{const t=e.stamp.step===x;return{id:e.identifier,type:"default",source:e.source,target:e.target,animated:t,bidirectional:!0,style:{stroke:t?"#6366f1":"#9ca3af",strokeWidth:t?3:2},label:e.stamp?.identifier?Hc(String(e.stamp.identifier),50):void 0,data:{label:e.stamp?.identifier?Hc(String(e.stamp.identifier),50):void 0,source:e.source,target:e.target,step:e.stamp?.step,time:e.stamp?.time,details:e.details}}}),[x,A]),[D,$,I]=ds(R),[z,L,B]=fs(T);i(()=>{$(R)},[R,$]),i(()=>{L(T)},[T,L]);const F=s(e=>L(t=>To(e,t)),[L]),H=s(e=>{S(e),_(!1)},[]);s(()=>{_(e=>!e)},[]);const W=(e,t)=>{if(!v.current)return{x:0,y:0};const n=v.current.createSVGPoint();n.x=e,n.y=t;const r=n.matrixTransform(v.current.getScreenCTM()?.inverse());return{x:r.x,y:r.y}},V=za();return i(()=>{if(f||!V||0===R.length)return;const e=new Map;T.forEach(t=>{const n=e.get(t.source)||0;e.set(t.source,n+1);const r=e.get(t.target)||0;e.set(t.target,r+1)});let t="",n=0;e.forEach((e,r)=>{e>n&&(n=e,t=r)}),!t&&R.length>0&&(t=R[0].id),t&&setTimeout(()=>{V.fitView({nodes:[{id:t}],duration:1e3,padding:.2,minZoom:c,maxZoom:1})},500)},[R,T,V,f,c]),t.createElement("div",{ref:y,style:{width:"number"==typeof n?`${n}px`:n,height:"number"==typeof r?`${r}px`:r,border:`1px solid ${m.colors.border}`,borderRadius:"8px",overflow:"hidden",position:"relative",minWidth:"800px",minHeight:"600px",background:m.colors.background},className:a},p&&t.createElement(fp,{open:k,onOpenChange:N},t.createElement(pp,{asChild:!0},t.createElement("button",{style:{position:"absolute",top:"16px",left:"16px",zIndex:50,width:"40px",height:"40px",backgroundColor:m.colors.card,border:`1px solid ${m.colors.border}`,borderRadius:"8px",boxShadow:m.shadows.sm,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease-in-out",cursor:"pointer"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=m.colors.muted},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=m.colors.card},title:"Open Timeline"},t.createElement(Rs,{size:20,style:{color:m.colors.mutedForeground}}))),t.createElement(hp,null,t.createElement(lp,{style:{position:"fixed",top:0,bottom:0,left:0,height:"100%",width:"280px",zIndex:50,backgroundColor:m.colors.background,borderRight:`1px solid ${m.colors.border}`,boxShadow:m.shadows.lg,transition:"all 0.3s ease-in-out",padding:0},onPointerDownOutside:e=>e.preventDefault()},t.createElement("div",{style:{display:"flex",flexDirection:"column",height:"100%"}},t.createElement("div",{style:{flex:1,overflowY:"auto"}},t.createElement(Bu,{stamps:g.stamps||g.steps||[],currentStep:x,onStepChange:H}))),t.createElement(dp,{style:{position:"absolute",right:"16px",top:"16px",borderRadius:"4px",opacity:.7,transition:"opacity 0.2s ease-in-out",cursor:"pointer",border:"none",background:"transparent",padding:"4px",color:m.colors.mutedForeground},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.7"}},t.createElement("svg",{style:{height:"16px",width:"16px"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})),t.createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}},"Close"))))),t.createElement(cs,{nodes:D,edges:z,onNodesChange:I,onEdgesChange:B,onConnect:F,nodeTypes:bp,edgeTypes:{default:e=>t.createElement(Ls,{...e,clientToSvgCoords:W,svgRef:v})},attributionPosition:"bottom-left",style:{width:"100%",height:"100%"},defaultViewport:{x:d.x,y:d.y,zoom:c},onInit:()=>{if(y.current){const e=y.current.querySelector("svg");e&&(v.current=e)}}},t.createElement(ws,{variant:ps.Lines,color:m.colors.border,gap:16})),t.createElement("style",null,`\n .react-flow__edge-label {\n font-size: 10px;\n background: ${m.colors.card};\n color: ${m.colors.cardForeground};\n padding: 2px 4px;\n border-radius: 4px;\n border: 1px solid ${m.colors.border};\n max-width: 150px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .react-flow__edge {\n cursor: default !important;\n }\n\n .react-flow__edge-path {\n cursor: default !important;\n }\n `))},xp=e=>t.createElement(ts,null,t.createElement(wp,e));function Sp(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ep=e.createContext(void 0);const _p=["top","right","bottom","left"],Cp=Math.min,kp=Math.max,Np=Math.round,Mp=Math.floor,Pp=e=>({x:e,y:e}),Op={left:"right",right:"left",bottom:"top",top:"bottom"},Ap={start:"end",end:"start"};function Rp(e,t,n){return kp(e,Cp(t,n))}function Tp(e,t){return"function"==typeof e?e(t):e}function Dp(e){return e.split("-")[0]}function $p(e){return e.split("-")[1]}function Ip(e){return"x"===e?"y":"x"}function zp(e){return"y"===e?"height":"width"}const Lp=new Set(["top","bottom"]);function Bp(e){return Lp.has(Dp(e))?"y":"x"}function Fp(e){return Ip(Bp(e))}function Hp(e){return e.replace(/start|end/g,e=>Ap[e])}const Wp=["left","right"],Vp=["right","left"],jp=["top","bottom"],Yp=["bottom","top"];function Xp(e,t,n,r){const o=$p(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Vp:Wp:t?Wp:Vp;case"left":case"right":return t?jp:Yp;default:return[]}}(Dp(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Hp)))),a}function Kp(e){return e.replace(/left|right|bottom|top/g,e=>Op[e])}function Up(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function qp(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zp(e,t,n){let{reference:r,floating:o}=e;const a=Bp(t),i=Fp(t),s=zp(i),l=Dp(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch($p(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function Gp(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Tp(t,e),h=Up(p),m=s[f?"floating"===d?"reference":"floating":d],g=qp(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=qp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function Qp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jp(e){return _p.some(t=>e[t]>=0)}const eh=new Set(["left","top"]);function th(){return"undefined"!=typeof window}function nh(e){return ah(e)?(e.nodeName||"").toLowerCase():"#document"}function rh(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function oh(e){var t;return null==(t=(ah(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ah(e){return!!th()&&(e instanceof Node||e instanceof rh(e).Node)}function ih(e){return!!th()&&(e instanceof Element||e instanceof rh(e).Element)}function sh(e){return!!th()&&(e instanceof HTMLElement||e instanceof rh(e).HTMLElement)}function lh(e){return!(!th()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof rh(e).ShadowRoot)}const ch=new Set(["inline","contents"]);function uh(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ch.has(o)}const dh=new Set(["table","td","th"]);function fh(e){return dh.has(nh(e))}const ph=[":popover-open",":modal"];function hh(e){return ph.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const mh=["transform","translate","scale","rotate","perspective"],gh=["transform","translate","scale","rotate","perspective","filter"],yh=["paint","layout","strict","content"];function vh(e){const t=bh(),n=ih(e)?Sh(e):e;return mh.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||gh.some(e=>(n.willChange||"").includes(e))||yh.some(e=>(n.contain||"").includes(e))}function bh(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const wh=new Set(["html","body","#document"]);function xh(e){return wh.has(nh(e))}function Sh(e){return rh(e).getComputedStyle(e)}function Eh(e){return ih(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _h(e){if("html"===nh(e))return e;const t=e.assignedSlot||e.parentNode||lh(e)&&e.host||oh(e);return lh(t)?t.host:t}function Ch(e){const t=_h(e);return xh(t)?e.ownerDocument?e.ownerDocument.body:e.body:sh(t)&&uh(t)?t:Ch(t)}function kh(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Ch(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=rh(o);if(a){const e=Nh(i);return t.concat(i,i.visualViewport||[],uh(o)?o:[],e&&n?kh(e):[])}return t.concat(o,kh(o,[],n))}function Nh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mh(e){const t=Sh(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=sh(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Np(n)!==a||Np(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Ph(e){return ih(e)?e:e.contextElement}function Oh(e){const t=Ph(e);if(!sh(t))return Pp(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Mh(t);let i=(a?Np(n.width):n.width)/r,s=(a?Np(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Ah=Pp(0);function Rh(e){const t=rh(e);return bh()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ah}function Th(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Ph(e);let i=Pp(1);t&&(r?ih(r)&&(i=Oh(r)):i=Oh(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==rh(e))&&t}(a,n,r)?Rh(a):Pp(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=rh(a),t=r&&ih(r)?rh(r):r;let n=e,o=Nh(n);for(;o&&r&&t!==n;){const e=Oh(o),t=o.getBoundingClientRect(),r=Sh(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=i,n=rh(o),o=Nh(n)}}return qp({width:u,height:d,x:l,y:c})}function Dh(e,t){const n=Eh(e).scrollLeft;return t?t.left+n:Th(oh(e)).left+n}function $h(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Dh(e,n),y:n.top+t.scrollTop}}const Ih=new Set(["absolute","fixed"]);function zh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=rh(e),r=oh(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=bh();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Dh(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=oh(e),n=Eh(e),r=e.ownerDocument.body,o=kp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=kp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Dh(e);const s=-n.scrollTop;return"rtl"===Sh(r).direction&&(i+=kp(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(oh(e));else if(ih(t))r=function(e,t){const n=Th(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=sh(e)?Oh(e):Pp(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=Rh(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return qp(r)}function Lh(e,t){const n=_h(e);return!(n===t||!ih(n)||xh(n))&&("fixed"===Sh(n).position||Lh(n,t))}function Bh(e,t,n){const r=sh(t),o=oh(t),a="fixed"===n,i=Th(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Pp(0);function c(){l.x=Dh(o)}if(r||!r&&!a)if(("body"!==nh(t)||uh(o))&&(s=Eh(t)),r){const e=Th(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const u=!o||r||a?Pp(0):$h(o,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function Fh(e){return"static"===Sh(e).position}function Hh(e,t){if(!sh(e)||"fixed"===Sh(e).position)return null;if(t)return t(e);let n=e.offsetParent;return oh(e)===n&&(n=n.ownerDocument.body),n}function Wh(e,t){const n=rh(e);if(hh(e))return n;if(!sh(e)){let t=_h(e);for(;t&&!xh(t);){if(ih(t)&&!Fh(t))return t;t=_h(t)}return n}let r=Hh(e,t);for(;r&&fh(r)&&Fh(r);)r=Hh(r,t);return r&&xh(r)&&Fh(r)&&!vh(r)?n:r||function(e){let t=_h(e);for(;sh(t)&&!xh(t);){if(vh(t))return t;if(hh(t))return null;t=_h(t)}return null}(e)||n}const Vh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=oh(r),s=!!t&&hh(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Pp(1);const u=Pp(0),d=sh(r);if((d||!d&&!a)&&(("body"!==nh(r)||uh(i))&&(l=Eh(r)),sh(r))){const e=Th(r);c=Oh(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?Pp(0):$h(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:oh,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a="clippingAncestors"===n?hh(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=kh(e,[],!1).filter(e=>ih(e)&&"body"!==nh(e)),o=null;const a="fixed"===Sh(e).position;let i=a?_h(e):e;for(;ih(i)&&!xh(i);){const t=Sh(i),n=vh(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&Ih.has(o.position)||uh(i)&&!n&&Lh(e,i))?r=r.filter(e=>e!==i):o=t,i=_h(i)}return t.set(e,r),r}(t,this._c):[].concat(n),i=[...a,r],s=i[0],l=i.reduce((e,n)=>{const r=zh(t,n,o);return e.top=kp(r.top,e.top),e.right=Cp(r.right,e.right),e.bottom=Cp(r.bottom,e.bottom),e.left=kp(r.left,e.left),e},zh(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Wh,getElementRects:async function(e){const t=this.getOffsetParent||Wh,n=this.getDimensions,r=await n(e.floating);return{reference:Bh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Mh(e);return{width:t,height:n}},getScale:Oh,isElement:ih,isRTL:function(e){return"rtl"===Sh(e).direction}};function jh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yh(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ph(e),u=o||a?[...c?kh(c):[],...kh(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=oh(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-Mp(d)+"px "+-Mp(o.clientWidth-(u+f))+"px "+-Mp(o.clientHeight-(d+p))+"px "+-Mp(u)+"px",threshold:kp(0,Cp(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||jh(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,h=null;i&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m=l?Th(e):null;return l&&function t(){const r=Th(e);m&&!jh(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Xh=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Dp(n),s=$p(n),l="y"===Bp(n),c=eh.has(i)?-1:1,u=a&&l?-1:1,d=Tp(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Kh=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Tp(e,t),c={x:n,y:r},u=await Gp(t,l),d=Bp(Dp(o)),f=Ip(d);let p=c[f],h=c[d];if(a){const e="y"===f?"bottom":"right";p=Rp(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";h=Rp(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},Uh=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Tp(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const y=Dp(o),v=Bp(s),b=Dp(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!m?[Kp(s)]:function(e){const t=Kp(e);return[Hp(e),t,Hp(t)]}(s)),S="none"!==h;!f&&S&&x.push(...Xp(s,m,h,w));const E=[s,...x],_=await Gp(t,g),C=[];let k=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&C.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=$p(e),o=Fp(e),a=zp(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Kp(i)),[i,Kp(i)]}(o,i,w);C.push(_[e[0]],_[e[1]])}if(k=[...k,{placement:o,overflows:C}],!C.every(e=>e<=0)){var N,M;const e=((null==(N=a.flip)?void 0:N.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&v!==Bp(t))||k.every(e=>Bp(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:k},reset:{placement:t}}}let n=null==(M=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=k.filter(e=>{if(S){const t=Bp(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},qh=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Tp(e,t),u=await Gp(t,c),d=Dp(o),f=$p(o),p="y"===Bp(o),{width:h,height:m}=a.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,w=Cp(m-u[g],v),x=Cp(h-u[y],b),S=!t.middlewareData.shift;let E=w,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=v),S&&!f){const e=kp(u.left,0),t=kp(u.right,0),n=kp(u.top,0),r=kp(u.bottom,0);p?_=h-2*(0!==e||0!==t?e+t:kp(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:kp(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const C=await i.getDimensions(s.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},Zh=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Tp(e,t);switch(r){case"referenceHidden":{const e=Qp(await Gp(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Jp(e)}}}case"escaped":{const e=Qp(await Gp(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Jp(e)}}}default:return{}}}}},Gh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Tp(e,t)||{};if(null==c)return{};const d=Up(u),f={x:n,y:r},p=Fp(o),h=zp(p),m=await i.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],x=f[p]-a.reference[p],S=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=S?S[b]:0;E&&await(null==i.isElement?void 0:i.isElement(S))||(E=s.floating[b]||a.floating[h]);const _=w/2-x/2,C=E/2-m[h]/2-1,k=Cp(d[y],C),N=Cp(d[v],C),M=k,P=E-m[h]-N,O=E/2-m[h]/2+_,A=Rp(M,O,P),R=!l.arrow&&null!=$p(o)&&O!==A&&a.reference[h]/2-(O<M?k:N)-m[h]/2<0,T=R?O<M?O-M:O-P:0;return{[p]:f[p]+T,data:{[p]:A,centerOffset:O-A-T,...R&&{alignmentOffset:T}},reset:R}}}),Qh=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Tp(e,t),u={x:n,y:r},d=Bp(o),f=Ip(d);let p=u[f],h=u[d];const m=Tp(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===f?"width":"height",t=eh.has(Dp(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Jh=(e,t,n)=>{const r=new Map,o={platform:Vh,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Zp(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:a,fn:m}=s[n],{x:g,y:y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,p={...p,[a]:{...p[a],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Zp(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};var em="undefined"!=typeof document?f:function(){};function tm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!tm(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tm(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function nm(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rm(e,t){const n=nm(e);return Math.round(t*n)/n}function om(t){const n=e.useRef(t);return em(()=>{n.current=t}),n}const am=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Gh({element:n.current,padding:r}).fn(t):{}:n?Gh({element:n,padding:r}).fn(t):{};var o}}),im=(e,t)=>({...Xh(e),options:[e,t]}),sm=(e,t)=>({...Kh(e),options:[e,t]}),lm=(e,t)=>({...Qh(e),options:[e,t]}),cm=(e,t)=>({...Uh(e),options:[e,t]}),um=(e,t)=>({...qh(e),options:[e,t]}),dm=(e,t)=>({...Zh(e),options:[e,t]}),fm=(e,t)=>({...am(e),options:[e,t]});var pm=e.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return m(nd.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m("polygon",{points:"0,0 30,0 15,10"})})});pm.displayName="Arrow";var hm=pm;function mm(t){const[n,r]=e.useState(void 0);return Xu(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)},[t]),n}var gm="Popper",[ym,vm]=ju(gm),[bm,wm]=ym(gm),xm=t=>{const{__scopePopper:n,children:r}=t,[o,a]=e.useState(null);return m(bm,{scope:n,anchor:o,onAnchorChange:a,children:r})};xm.displayName=gm;var Sm="PopperAnchor",Em=e.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,i=wm(Sm,r),s=e.useRef(null),l=Vu(n,s),c=e.useRef(null);return e.useEffect(()=>{const e=c.current;c.current=o?.current||s.current,e!==c.current&&i.onAnchorChange(c.current)}),o?null:m(nd.div,{...a,ref:l})});Em.displayName=Sm;var _m="PopperContent",[Cm,km]=ym(_m),Nm=e.forwardRef((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=t,b=wm(_m,r),[w,x]=e.useState(null),S=Vu(n,e=>x(e)),[E,_]=e.useState(null),C=mm(E),k=C?.width??0,N=C?.height??0,M=o+("center"!==i?"-"+i:""),P="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],A=O.length>0,R={padding:P,boundary:O.filter(Am),altBoundary:A},{refs:T,floatingStyles:D,placement:$,isPositioned:I,middlewareData:z}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(o);tm(h,o)||m(o);const[g,y]=e.useState(null),[v,b]=e.useState(null),w=e.useCallback(e=>{e!==_.current&&(_.current=e,y(e))},[]),x=e.useCallback(e=>{e!==C.current&&(C.current=e,b(e))},[]),S=i||g,E=s||v,_=e.useRef(null),C=e.useRef(null),k=e.useRef(d),N=null!=c,M=om(c),P=om(a),O=om(u),A=e.useCallback(()=>{if(!_.current||!C.current)return;const e={placement:n,strategy:r,middleware:h};P.current&&(e.platform=P.current),Jh(_.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!tm(k.current,t)&&(k.current=t,p.flushSync(()=>{f(t)}))})},[h,n,r,P,O]);em(()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const R=e.useRef(!1);em(()=>(R.current=!0,()=>{R.current=!1}),[]),em(()=>{if(S&&(_.current=S),E&&(C.current=E),S&&E){if(M.current)return M.current(S,E,A);A()}},[S,E,A,M,N]);const T=e.useMemo(()=>({reference:_,floating:C,setReference:w,setFloating:x}),[w,x]),D=e.useMemo(()=>({reference:S,floating:E}),[S,E]),$=e.useMemo(()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=rm(D.floating,d.x),n=rm(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...nm(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return e.useMemo(()=>({...d,update:A,refs:T,elements:D,floatingStyles:$}),[d,A,T,D,$])}({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>Yh(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[im({mainAxis:a+N,alignmentAxis:s}),c&&sm({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?lm():void 0,...R}),c&&cm({...R}),um({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),E&&fm({element:E,padding:l}),Rm({arrowWidth:k,arrowHeight:N}),h&&dm({strategy:"referenceHidden",...R})]}),[L,B]=Tm($),F=rd(y);Xu(()=>{I&&F?.()},[I,F]);const H=z.arrow?.x,W=z.arrow?.y,V=0!==z.arrow?.centerOffset,[j,Y]=e.useState();return Xu(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),m("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:I?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:m(Cm,{scope:r,placedSide:L,onArrowChange:_,arrowX:H,arrowY:W,shouldHideArrow:V,children:m(nd.div,{"data-side":L,"data-align":B,...v,ref:S,style:{...v.style,animation:I?void 0:"none"}})})})});Nm.displayName=_m;var Mm="PopperArrow",Pm={top:"bottom",right:"left",bottom:"top",left:"right"},Om=e.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=km(Mm,n),a=Pm[o.placedSide];return m("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:m(hm,{...r,ref:t,style:{...r.style,display:"block"}})})});function Am(e){return null!==e}Om.displayName=Mm;var Rm=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=Tm(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===l?(p=a?u:`${d}px`,h=-s+"px"):"top"===l?(p=a?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",h=a?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,h=a?u:`${f}px`),{data:{x:p,y:h}}}});function Tm(e){const[t,n="center"]=e.split("-");return[t,n]}var Dm=xm,$m=Em,Im=Nm,zm=Om;function Lm(t){const n=e.useRef({value:t,previous:t});return e.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var Bm=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});e.forwardRef((e,t)=>m(nd.span,{...e,ref:t,style:{...Bm,...e.style}})).displayName="VisuallyHidden";var Fm=[" ","Enter","ArrowUp","ArrowDown"],Hm=[" ","Enter"],Wm="Select",[Vm,jm,Ym]=function(e){const n=e+"CollectionProvider",[r,o]=ju(n),[a,i]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),i=t.useRef(new Map).current;return m(a,{scope:n,itemMap:i,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=Qu(l),u=t.forwardRef((e,t)=>{const{scope:n,children:r}=e,o=Vu(t,i(l,n).collectionRef);return m(c,{ref:o,children:r})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Qu(d),h=t.forwardRef((e,n)=>{const{scope:r,children:o,...a}=e,s=t.useRef(null),l=Vu(n,s),c=i(d,r);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>{c.itemMap.delete(s)})),m(p,{[f]:"",ref:l,children:o})});return h.displayName=d,[{Provider:s,Slot:u,ItemSlot:h},function(n){const r=i(e+"CollectionConsumer",n);return t.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},o]}(Wm),[Xm,Km]=ju(Wm,[Ym,vm]),Um=vm(),[qm,Zm]=Xm(Wm),[Gm,Qm]=Xm(Wm),Jm=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:p,required:h,form:y}=t,v=Um(n),[b,w]=e.useState(null),[x,S]=e.useState(null),[E,_]=e.useState(!1),C=function(t){const n=e.useContext(Ep);return t||n||"ltr"}(u),[k,N]=Gu({prop:o,defaultProp:a??!1,onChange:i,caller:Wm}),[M,P]=Gu({prop:s,defaultProp:l,onChange:c,caller:Wm}),O=e.useRef(null),A=!b||(y||!!b.closest("form")),[R,T]=e.useState(new Set),D=Array.from(R).map(e=>e.props.value).join(";");return m(Dm,{...v,children:g(qm,{required:h,scope:n,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:qu(),value:M,onValueChange:P,open:k,onOpenChange:N,dir:C,triggerPointerDownPosRef:O,disabled:p,children:[m(Vm.Provider,{scope:n,children:m(Gm,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback(e=>{T(t=>new Set(t).add(e))},[]),onNativeOptionRemove:e.useCallback(e=>{T(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),A?g(Bg,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:M,onChange:e=>P(e.target.value),disabled:p,form:y,children:[void 0===M?m("option",{value:""}):null,Array.from(R)]},D):null]})})};Jm.displayName=Wm;var eg="SelectTrigger",tg=e.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,i=Um(r),s=Zm(eg,r),l=s.disabled||o,c=Vu(n,s.onTriggerChange),u=jm(r),d=e.useRef("touch"),[f,p,h]=Hg(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=Wg(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{l||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return m($m,{asChild:!0,...i,children:m(nd.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Fg(s.value)?"":void 0,...a,ref:c,onClick:Fu(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==d.current&&g(e)}),onPointerDown:Fu(a.onPointerDown,e=>{d.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:Fu(a.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||Fm.includes(e.key)&&(g(),e.preventDefault())})})})});tg.displayName=eg;var ng="SelectValue",rg=e.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=Zm(ng,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==a,d=Vu(t,l.onValueNodeChange);return Xu(()=>{c(u)},[c,u]),m(nd.span,{...s,ref:d,style:{pointerEvents:"none"},children:Fg(l.value)?m(y,{children:i}):a})});rg.displayName=ng;var og=e.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m(nd.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});og.displayName="SelectIcon";var ag=e=>m(Ed,{asChild:!0,...e});ag.displayName="SelectPortal";var ig="SelectContent",sg=e.forwardRef((t,n)=>{const r=Zm(ig,t.__scopeSelect),[o,a]=e.useState();if(Xu(()=>{a(new DocumentFragment)},[]),!r.open){const e=o;return e?p.createPortal(m(cg,{scope:t.__scopeSelect,children:m(Vm.Slot,{scope:t.__scopeSelect,children:m("div",{children:t.children})})}),e):null}return m(fg,{...t,ref:n})});sg.displayName=ig;var lg=10,[cg,ug]=Xm(ig),dg=Qu("SelectContent.RemoveScroll"),fg=e.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:y,avoidCollisions:v,...b}=t,w=Zm(ig,r),[x,S]=e.useState(null),[E,_]=e.useState(null),C=Vu(n,e=>S(e)),[k,N]=e.useState(null),[M,P]=e.useState(null),O=jm(r),[A,R]=e.useState(!1),T=e.useRef(!1);e.useEffect(()=>{if(x)return _f(x)},[x]),Nd();const D=e.useCallback(e=>{const[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&E&&(E.scrollTop=0),n===r&&E&&(E.scrollTop=E.scrollHeight),n?.focus(),document.activeElement!==o)return}},[O,E]),$=e.useCallback(()=>D([k,x]),[D,k,x]);e.useEffect(()=>{A&&$()},[A,$]);const{onOpenChange:I,triggerPointerDownPosRef:z}=w;e.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),z.current=null};return null!==z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[x,I,z]),e.useEffect(()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[I]);const[L,B]=Hg(e=>{const t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Wg(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),F=e.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==w.value&&w.value===t||r)&&(N(e),r&&(T.current=!0))},[w.value]),H=e.useCallback(()=>x?.focus(),[x]),W=e.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==w.value&&w.value===t||r)&&P(e)},[w.value]),V="popper"===o?hg:pg,j=V===hg?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:y,avoidCollisions:v}:{};return m(cg,{scope:r,content:x,viewport:E,onViewportChange:_,itemRefCallback:F,selectedItem:k,onItemLeave:H,itemTextRefCallback:W,focusSelectedItem:$,selectedItemText:M,position:o,isPositioned:A,searchRef:L,children:m(yf,{as:dg,allowPinchZoom:!0,children:m(gd,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Fu(a,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:m(cd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:m(V,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...j,onPlaced:()=>R(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Fu(b.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>D(t)),e.preventDefault()}})})})})})})});fg.displayName="SelectContentImpl";var pg=e.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,i=Zm(ig,r),s=ug(ig,r),[l,c]=e.useState(null),[u,d]=e.useState(null),f=Vu(n,e=>d(e)),p=jm(r),h=e.useRef(!1),g=e.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=s,x=e.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&y&&v&&b){const e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==i.dir){const o=r.left-t.left,a=n.left-o,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-lg,d=Sp(a,[lg,Math.max(lg,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-lg,d=Sp(a,[lg,Math.max(lg,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const a=p(),s=window.innerHeight-2*lg,c=y.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),w=f+m+c+parseInt(d.paddingBottom,10)+g,x=Math.min(5*v.offsetHeight,w),S=window.getComputedStyle(y),E=parseInt(S.paddingTop,10),_=parseInt(S.paddingBottom,10),C=e.top+e.height/2-lg,k=s-C,N=v.offsetHeight/2,M=f+m+(v.offsetTop+N),P=w-M;if(M<=C){const e=a.length>0&&v===a[a.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-y.offsetTop-y.offsetHeight,n=M+Math.max(k,N+(e?_:0)+t+g);l.style.height=n+"px"}else{const e=a.length>0&&v===a[0].ref.current;l.style.top="0px";const t=Math.max(C,f+y.offsetTop+(e?E:0)+N)+P;l.style.height=t+"px",y.scrollTop=M-C+y.offsetTop}l.style.margin=`${lg}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",o?.(),requestAnimationFrame(()=>h.current=!0)}},[p,i.trigger,i.valueNode,l,u,y,v,b,i.dir,o]);Xu(()=>x(),[x]);const[S,E]=e.useState();Xu(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const _=e.useCallback(e=>{e&&!0===g.current&&(x(),w?.(),g.current=!1)},[x,w]);return m(mg,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:_,children:m("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:m(nd.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});pg.displayName="SelectItemAlignedPosition";var hg=e.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lg,...a}=e,i=Um(n);return m(Im,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});hg.displayName="SelectPopperPosition";var[mg,gg]=Xm(ig,{}),yg="SelectViewport",vg=e.forwardRef((t,n)=>{const{__scopeSelect:r,nonce:o,...a}=t,i=ug(yg,r),s=gg(yg,r),l=Vu(n,i.onViewportChange),c=e.useRef(0);return g(y,{children:[m("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m(Vm.Slot,{scope:r,children:m(nd.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Fu(a.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*lg,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});vg.displayName=yg;var bg="SelectGroup",[wg,xg]=Xm(bg);e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qu();return m(wg,{scope:n,id:o,children:m(nd.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=bg;var Sg="SelectLabel",Eg=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xg(Sg,n);return m(nd.div,{id:o.id,...r,ref:t})});Eg.displayName=Sg;var _g="SelectItem",[Cg,kg]=Xm(_g),Ng=e.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:i,...s}=t,l=Zm(_g,r),c=ug(_g,r),u=l.value===o,[d,f]=e.useState(i??""),[p,h]=e.useState(!1),g=Vu(n,e=>c.itemRefCallback?.(e,o,a)),y=qu(),v=e.useRef("touch"),b=()=>{a||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m(Cg,{scope:r,value:o,disabled:a,textId:y,isSelected:u,onItemTextChange:e.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:m(Vm.ItemSlot,{scope:r,value:o,disabled:a,textValue:d,children:m(nd.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:g,onFocus:Fu(s.onFocus,()=>h(!0)),onBlur:Fu(s.onBlur,()=>h(!1)),onClick:Fu(s.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:Fu(s.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:Fu(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:Fu(s.onPointerMove,e=>{v.current=e.pointerType,a?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Fu(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Fu(s.onKeyDown,e=>{""!==c.searchRef?.current&&" "===e.key||(Hm.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});Ng.displayName=_g;var Mg="SelectItemText",Pg=e.forwardRef((t,n)=>{const{__scopeSelect:r,className:o,style:a,...i}=t,s=Zm(Mg,r),l=ug(Mg,r),c=kg(Mg,r),u=Qm(Mg,r),[d,f]=e.useState(null),h=Vu(n,e=>f(e),c.onItemTextChange,e=>l.itemTextRefCallback?.(e,c.value,c.disabled)),v=d?.textContent,b=e.useMemo(()=>m("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:x}=u;return Xu(()=>(w(b),()=>x(b)),[w,x,b]),g(y,{children:[m(nd.span,{id:c.textId,...i,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?p.createPortal(i.children,s.valueNode):null]})});Pg.displayName=Mg;var Og="SelectItemIndicator",Ag=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kg(Og,n).isSelected?m(nd.span,{"aria-hidden":!0,...r,ref:t}):null});Ag.displayName=Og;var Rg="SelectScrollUpButton",Tg=e.forwardRef((t,n)=>{const r=ug(Rg,t.__scopeSelect),o=gg(Rg,t.__scopeSelect),[a,i]=e.useState(!1),s=Vu(n,o.onScrollButtonChange);return Xu(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?m(Ig,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Tg.displayName=Rg;var Dg="SelectScrollDownButton",$g=e.forwardRef((t,n)=>{const r=ug(Dg,t.__scopeSelect),o=gg(Dg,t.__scopeSelect),[a,i]=e.useState(!1),s=Vu(n,o.onScrollButtonChange);return Xu(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?m(Ig,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});$g.displayName=Dg;var Ig=e.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,i=ug("SelectScrollButton",r),s=e.useRef(null),l=jm(r),c=e.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return e.useEffect(()=>()=>c(),[c]),Xu(()=>{const e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),m(nd.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Fu(a.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:Fu(a.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:Fu(a.onPointerLeave,()=>{c()})})}),zg=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m(nd.div,{"aria-hidden":!0,...r,ref:t})});zg.displayName="SelectSeparator";var Lg="SelectArrow";e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Um(n),a=Zm(Lg,n),i=ug(Lg,n);return a.open&&"popper"===i.position?m(zm,{...o,...r,ref:t}):null}).displayName=Lg;var Bg=e.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const a=e.useRef(null),i=Vu(o,a),s=Lm(n);return e.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[s,n]),m(nd.select,{...r,style:{...Bm,...r.style},ref:i,defaultValue:n})});function Fg(e){return""===e||void 0===e}function Hg(t){const n=rd(t),r=e.useRef(""),o=e.useRef(0),a=e.useCallback(e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),i=e.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return e.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,a,i]}function Wg(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(e,Math.max(a,0));1===o.length&&(i=i.filter(e=>e!==n));const s=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}Bg.displayName="SelectBubbleInput";var Vg=tg,jg=og,Yg=ag,Xg=sg,Kg=vg,Ug=Eg,qg=Ng,Zg=Pg,Gg=Ag,Qg=Tg,Jg=$g,ey=zg;const ty=Jm,ny=rg,ry=$c(Vg)`
|
|
289
|
+
`,Wu=({stamps:e,currentStep:n,onStepChange:r,onToggle:o})=>{const a=e.length>0?Math.max(...e.map(e=>e.step)):0,i=e.length>0?Math.min(...e.map(e=>e.step)):0,s=a-i+1,l=e=>e<5e3?"latencyLow":e<=3e4?"latencyMedium":"latencyHigh";return t.createElement(Au,null,t.createElement(Ru,null,t.createElement(Tu,null,"Timeline"),o&&t.createElement(Du,{onClick:o,title:"Collapse Panel"},t.createElement(Rs,{size:16}))),t.createElement($u,null,Array.from({length:s},(o,a)=>{const s=i+a,c=s===n,u=s<n,d=e.some(e=>e.step===s),f=(t=>{const n=e.filter(e=>e.step===t);if(0===n.length)return null;const r=t-1,o=e.filter(e=>e.step===r);return 0===o.length?null:Math.min(...n.map(e=>e.time))-Math.max(...o.map(e=>e.time))})(s),p=(t=>{const n=e.filter(e=>e.step===t);return 0===n.length?`Step ${t}`:n[0]?.identifier||`Step ${t}`})(s);return t.createElement(Iu,{key:s,isActive:c,isPast:u,hasStep:d,onClick:()=>d&&r(s)},t.createElement(zu,null,t.createElement(Lu,{isActive:c,isPast:u,hasStep:d}),t.createElement(Bu,{isActive:c},"Step ",s),f&&t.createElement(qc,{variant:l(f),style:{marginLeft:"auto"}},(e=>e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`)(f))),t.createElement(Fu,{hasStep:d},d?p:"No activity"),c&&t.createElement(Hu,null))})))};function Vu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function ju(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Yu(...e){return t=>{let n=!1;const r=e.map(e=>{const r=ju(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():ju(e[t],null)}}}}function Xu(...t){return e.useCallback(Yu(...t),t)}function Ku(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const a=e.createContext(o),i=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[i]||a,c=e.useMemo(()=>s,Object.values(s));return m(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[i]||a,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Uu(o,...n)]}function Uu(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var qu=globalThis?.document?e.useLayoutEffect:()=>{},Zu=e[" useId ".trim().toString()]||(()=>{}),Gu=0;function Qu(t){const[n,r]=e.useState(Zu());return qu(()=>{t||r(e=>e??String(Gu++))},[t]),t||(n?`radix-${n}`:"")}var Ju=e[" useInsertionEffect ".trim().toString()]||qu;function ed({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[a,i,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),a=e.useRef(r),i=e.useRef(n);return Ju(()=>{i.current=n},[n]),e.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,o,i]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:a;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l},[l,o])}const u=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else i(e)},[l,t,i,s]);return[c,u]}function td(t){const n=nd(t),r=e.forwardRef((t,r)=>{const{children:o,...a}=t,i=e.Children.toArray(o),s=i.find(od);if(s){const t=s.props.children,o=i.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return m(n,{...a,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}function nd(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),a=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(a.ref=n?Yu(n,t):t),e.cloneElement(r,a)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var rd=Symbol("radix.slottable");function od(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===rd}var ad=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=td(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...a}=e,i=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(i,{...a,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function id(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var sd,ld="dismissableLayer.update",cd="dismissableLayer.pointerDownOutside",ud="dismissableLayer.focusOutside",dd=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fd=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(dd),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=e.useState({}),g=Xu(n,e=>f(e)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),w=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,E=function(t,n=globalThis?.document){const r=id(t),o=e.useRef(!1),a=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){md(cd,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));S&&!n&&(a?.(e),s?.(e),e.defaultPrevented||l?.())},p),_=function(t,n=globalThis?.document){const r=id(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){md(ud,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},p);return function(t,n=globalThis?.document){const r=id(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{w===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),e.useEffect(()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(sd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),hd(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=sd)}},[d,p,r,u]),e.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),hd())},[d,u]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(ld,e),()=>document.removeEventListener(ld,e)},[]),m(ad.div,{...c,ref:g,style:{pointerEvents:x?S?"auto":"none":void 0,...t.style},onFocusCapture:Vu(t.onFocusCapture,_.onFocusCapture),onBlurCapture:Vu(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Vu(t.onPointerDownCapture,E.onPointerDownCapture)})});fd.displayName="DismissableLayer";var pd=e.forwardRef((t,n)=>{const r=e.useContext(dd),o=e.useRef(null),a=Xu(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),m(ad.div,{...t,ref:a})});function hd(){const e=new CustomEvent(ld);document.dispatchEvent(e)}function md(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&p.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}pd.displayName="DismissableLayerBranch";var gd="focusScope.autoFocusOnMount",yd="focusScope.autoFocusOnUnmount",vd={bubbles:!1,cancelable:!0},bd=e.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=t,[l,c]=e.useState(null),u=id(a),d=id(i),f=e.useRef(null),p=Xu(n,e=>c(e)),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Ed(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ed(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ed(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,l,h.paused]),e.useEffect(()=>{if(l){_d.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(gd,vd);l.addEventListener(gd,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ed(r,{select:t}),document.activeElement!==n)return}((e=wd(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Ed(l))}return()=>{l.removeEventListener(gd,u),setTimeout(()=>{const e=new CustomEvent(yd,vd);l.addEventListener(yd,d),l.dispatchEvent(e),e.defaultPrevented||Ed(t??document.body,{select:!0}),l.removeEventListener(yd,d),_d.remove(h)},0)}}var e},[l,u,d,h]);const g=e.useCallback(e=>{if(!r&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,a]=function(e){const t=wd(e),n=xd(t,e),r=xd(t.reverse(),e);return[n,r]}(t);o&&a?e.shiftKey||n!==a?e.shiftKey&&n===o&&(e.preventDefault(),r&&Ed(a,{select:!0})):(e.preventDefault(),r&&Ed(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,h.paused]);return m(ad.div,{tabIndex:-1,...s,ref:p,onKeyDown:g})});function wd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xd(e,t){for(const n of e)if(!Sd(n,{upTo:t}))return n}function Sd(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Ed(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}bd.displayName="FocusScope";var _d=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Cd(e,t),e.unshift(t)},remove(t){e=Cd(e,t),e[0]?.resume()}}}();function Cd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var kd=e.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=e.useState(!1);qu(()=>i(!0),[]);const s=r||a&&globalThis?.document?.body;return s?h.createPortal(m(ad.div,{...o,ref:n}),s):null});kd.displayName="Portal";var Nd=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),a=e.useRef(t),i=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Md(o.current);i.current="mounted"===l?e:"none"},[l]),qu(()=>{const e=o.current,n=a.current;if(n!==t){const r=i.current,o=Md(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=t}},[t,c]),qu(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const i=Md(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&i&&(c("ANIMATION_END"),!a.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(i.current=Md(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),a="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),i=Xu(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||o.isPresent?e.cloneElement(a,{ref:i}):null};function Md(e){return e?.animationName||"none"}Nd.displayName="Presence";var Pd=0;function Od(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ad()),document.body.insertAdjacentElement("beforeend",e[1]??Ad()),Pd++,()=>{1===Pd&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Pd--}},[])}function Ad(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Rd=function(){return Rd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rd.apply(this,arguments)};function Td(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Dd="right-scroll-bar-position",$d="width-before-scroll-bar";function Id(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var zd="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Ld=new WeakMap;function Bd(e,t){var n,r,o,a=(n=t||null,r=function(t){return e.forEach(function(e){return Id(e,t)})},(o=u(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return zd(function(){var t=Ld.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||Id(e,null)}),r.forEach(function(e){n.has(e)||Id(e,o)})}Ld.set(a,e)},[e]),a}function Fd(e){return e}var Hd=function(t){var n=t.sideCar,r=Td(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,Rd({},r))};Hd.isSideCarExport=!0;var Wd=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Fd);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=Rd({async:!0,ssr:!1},e),t}(),Vd=function(){},jd=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:Vd,onWheelCapture:Vd,onTouchMoveCapture:Vd}),a=o[0],i=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,h=t.noRelative,m=t.noIsolation,g=t.inert,y=t.allowPinchZoom,v=t.as,b=void 0===v?"div":v,w=t.gapMode,x=Td(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=Bd([r,n]),_=Rd(Rd({},x),a);return e.createElement(e.Fragment,null,d&&e.createElement(S,{sideCar:Wd,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:w}),s?e.cloneElement(e.Children.only(l),Rd(Rd({},_),{ref:E})):e.createElement(b,Rd({},_,{className:c,ref:E}),l))});jd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jd.classNames={fullWidth:$d,zeroRight:Dd};function Yd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Xd=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=Yd())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kd=function(){var t,n=(t=Xd(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Ud={left:0,top:0,right:0,gap:0},qd=function(e){return parseInt(e||"",10)||0},Zd=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ud;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[qd(n),qd(r),qd(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gd=Kd(),Qd="data-scroll-locked",Jd=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Qd,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Dd," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat($d," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Dd," .").concat(Dd," {\n right: 0 ").concat(r,";\n }\n \n .").concat($d," .").concat($d," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Qd,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},ef=function(){var e=parseInt(document.body.getAttribute(Qd)||"0",10);return isFinite(e)?e:0},tf=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(Qd,(ef()+1).toString()),function(){var e=ef()-1;e<=0?document.body.removeAttribute(Qd):document.body.setAttribute(Qd,e.toString())}},[]);var i=e.useMemo(function(){return Zd(a)},[a]);return e.createElement(Gd,{styles:Jd(i,!n,a,r?"":"!important")})},nf=!1;if("undefined"!=typeof window)try{var rf=Object.defineProperty({},"passive",{get:function(){return nf=!0,!0}});window.addEventListener("test",rf,rf),window.removeEventListener("test",rf,rf)}catch(e){nf=!1}var of=!!nf&&{passive:!1},af=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},sf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),lf(e,r)){var o=cf(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lf=function(e,t){return"v"===e?function(e){return af(e,"overflowY")}(t):function(e){return af(e,"overflowX")}(t)},cf=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},uf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},df=function(e){return[e.deltaX,e.deltaY]},ff=function(e){return e&&"current"in e?e.current:e},pf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},hf=0,mf=[];function gf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var yf,vf=(yf=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(hf++)[0],i=e.useState(Kd)[0],s=e.useRef(t);e.useEffect(function(){s.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([t.lockRef.current],(t.shards||[]).map(ff),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,a=uf(e),i=r.current,l="deltaX"in e?e.deltaX:i[0]-a[0],c="deltaY"in e?e.deltaY:i[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=sf(d,u);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=sf(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var p=cf(e,s),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&lf(e,s)&&(d+=m,f+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(d)<1||!o&&i>d)||!u&&(o&&Math.abs(f)<1||!o&&-i>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)},[]),c=e.useCallback(function(e){var t=e;if(mf.length&&mf[mf.length-1]===i){var r="deltaY"in t?df(t):uf(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(s.current.shards||[]).map(ff).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?l(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:gf(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=e.useCallback(function(e){r.current=uf(e),o.current=void 0},[]),f=e.useCallback(function(e){u(e.type,df(e),e.target,l(e,t.lockRef.current))},[]),p=e.useCallback(function(e){u(e.type,uf(e),e.target,l(e,t.lockRef.current))},[]);e.useEffect(function(){return mf.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,of),document.addEventListener("touchmove",c,of),document.addEventListener("touchstart",d,of),function(){mf=mf.filter(function(e){return e!==i}),document.removeEventListener("wheel",c,of),document.removeEventListener("touchmove",c,of),document.removeEventListener("touchstart",d,of)}},[]);var h=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(i,{styles:pf(a)}):null,h?e.createElement(tf,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},Wd.useMedium(yf),Hd),bf=e.forwardRef(function(t,n){return e.createElement(jd,Rd({},t,{ref:n,sideCar:vf}))});bf.classNames=jd.classNames;var wf=bf,xf=new WeakMap,Sf=new WeakMap,Ef={},_f=0,Cf=function(e){return e&&(e.host||Cf(e.parentNode))},kf=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Cf(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Ef[n]||(Ef[n]=new WeakMap);var a=Ef[n],i=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(xf.get(e)||0)+1,c=(a.get(e)||0)+1;xf.set(e,l),a.set(e,c),i.push(e),1===l&&o&&Sf.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),_f++,function(){i.forEach(function(e){var t=xf.get(e)-1,o=a.get(e)-1;xf.set(e,t),a.set(e,o),t||(Sf.has(e)||e.removeAttribute(r),Sf.delete(e)),o||e.removeAttribute(n)}),--_f||(xf=new WeakMap,xf=new WeakMap,Sf=new WeakMap,Ef={})}},Nf=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),kf(r,o,n,"aria-hidden")):function(){return null}},Mf="Dialog",[Pf,Of]=Ku(Mf),[Af,Rf]=Pf(Mf),Tf=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u,d]=ed({prop:o,defaultProp:a??!1,onChange:i,caller:Mf});return m(Af,{scope:n,triggerRef:l,contentRef:c,contentId:Qu(),titleId:Qu(),descriptionId:Qu(),open:u,onOpenChange:d,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};Tf.displayName=Mf;var Df="DialogTrigger",$f=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rf(Df,n),a=Xu(t,o.triggerRef);return m(ad.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":tp(o.open),...r,ref:a,onClick:Vu(e.onClick,o.onOpenToggle)})});$f.displayName=Df;var If="DialogPortal",[zf,Lf]=Pf(If,{forceMount:void 0}),Bf=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,i=Rf(If,n);return m(zf,{scope:n,forceMount:r,children:e.Children.map(o,e=>m(Nd,{present:r||i.open,children:m(kd,{asChild:!0,container:a,children:e})}))})};Bf.displayName=If;var Ff="DialogOverlay",Hf=e.forwardRef((e,t)=>{const n=Lf(Ff,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Rf(Ff,e.__scopeDialog);return a.modal?m(Nd,{present:r||a.open,children:m(Vf,{...o,ref:t})}):null});Hf.displayName=Ff;var Wf=td("DialogOverlay.RemoveScroll"),Vf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rf(Ff,n);return m(wf,{as:Wf,allowPinchZoom:!0,shards:[o.contentRef],children:m(ad.div,{"data-state":tp(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jf="DialogContent",Yf=e.forwardRef((e,t)=>{const n=Lf(jf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Rf(jf,e.__scopeDialog);return m(Nd,{present:r||a.open,children:a.modal?m(Xf,{...o,ref:t}):m(Kf,{...o,ref:t})})});Yf.displayName=jf;var Xf=e.forwardRef((t,n)=>{const r=Rf(jf,t.__scopeDialog),o=e.useRef(null),a=Xu(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return Nf(e)},[]),m(Uf,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vu(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Vu(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Vu(t.onFocusOutside,e=>e.preventDefault())})}),Kf=e.forwardRef((t,n)=>{const r=Rf(jf,t.__scopeDialog),o=e.useRef(!1),a=e.useRef(!1);return m(Uf,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=r.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Uf=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=t,l=Rf(jf,r),c=e.useRef(null),u=Xu(n,c);return Od(),g(y,{children:[m(bd,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:m(fd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":tp(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),g(y,{children:[m(ap,{titleId:l.titleId}),m(ip,{contentRef:c,descriptionId:l.descriptionId})]})]})}),qf="DialogTitle",Zf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rf(qf,n);return m(ad.h2,{id:o.titleId,...r,ref:t})});Zf.displayName=qf;var Gf="DialogDescription",Qf=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rf(Gf,n);return m(ad.p,{id:o.descriptionId,...r,ref:t})});Qf.displayName=Gf;var Jf="DialogClose",ep=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Rf(Jf,n);return m(ad.button,{type:"button",...r,ref:t,onClick:Vu(e.onClick,()=>o.onOpenChange(!1))})});function tp(e){return e?"open":"closed"}ep.displayName=Jf;var np="DialogTitleWarning",[rp,op]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,a=e.useMemo(()=>o,Object.values(o));return m(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,function(o){const a=e.useContext(r);if(a)return a;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(np,{contentName:jf,titleName:qf,docsSlug:"dialog"}),ap=({titleId:t})=>{const n=op(np),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},ip=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${op("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},sp=Tf,lp=$f,cp=Bf,up=Hf,dp=Yf,fp=Zf,pp=Qf,hp=ep;const mp=sp,gp=lp,yp=cp,vp=e.forwardRef(({className:t,...n},r)=>e.createElement(up,{style:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:50,backgroundColor:"hsla(var(--background), 0.8)",backdropFilter:"blur(4px)"},className:t,...n,ref:r}));vp.displayName=up.displayName;const bp=(e="right")=>{const t={position:"fixed",zIndex:50,gap:"16px",backgroundColor:"hsl(var(--background))",padding:"24px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",transition:"all 0.3s ease-in-out"};switch(e){case"top":return{...t,left:0,right:0,top:0,borderBottom:"1px solid hsl(var(--border))"};case"bottom":return{...t,left:0,right:0,bottom:0,borderTop:"1px solid hsl(var(--border))"};case"left":return{...t,top:0,bottom:0,left:0,height:"100%",width:"75%",borderRight:"1px solid hsl(var(--border))",maxWidth:"384px"};default:return{...t,top:0,bottom:0,right:0,height:"100%",width:"75%",borderLeft:"1px solid hsl(var(--border))",maxWidth:"384px"}}},wp=e.forwardRef(({side:t="right",className:n,children:r,...o},a)=>e.createElement(yp,null,e.createElement(vp,null),e.createElement(dp,{ref:a,style:bp(t),className:n,...o},r,e.createElement(hp,{style:{position:"absolute",right:"16px",top:"16px",borderRadius:"4px",opacity:.7,transition:"opacity 0.2s ease-in-out",cursor:"pointer",border:"none",background:"transparent",padding:"4px"},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.7"}},e.createElement("svg",{style:{height:"16px",width:"16px"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})),e.createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}},"Close")))));wp.displayName=dp.displayName;e.forwardRef(({className:t,...n},r)=>e.createElement(fp,{ref:r,style:{fontSize:"18px",fontWeight:600,color:"hsl(var(--foreground))"},className:t,...n})).displayName=fp.displayName;e.forwardRef(({className:t,...n},r)=>e.createElement(pp,{ref:r,style:{fontSize:"14px",color:"hsl(var(--muted-foreground))"},className:t,...n})).displayName=pp.displayName;const xp=(e,t,n={})=>{const{minNodeSpacing:r=200,containerWidth:o=600}=n;if(!e||0===e.length)return new Map;new Map(e.map(e=>[e.identifier,e]));const a=new Map,i=new Map;e.forEach(e=>a.set(e.identifier,[])),t.length>0?t.forEach(e=>{e.source&&e.target&&(a.get(e.source)?.push(e.target),i.set(e.target,e.source))}):e.forEach(e=>{e.parent&&e.parent.identifier!==e.identifier&&(a.get(e.parent.identifier)?.push(e.identifier),i.set(e.identifier,e.parent.identifier))});const s=e.filter(e=>!i.has(e.identifier)),l=new Map,c=(e,t)=>{l.set(e,t);for(const n of a.get(e)||[])c(n,t+1)};s.forEach(e=>c(e.identifier,0));const u=[];e.forEach(e=>{const t=l.get(e.identifier)??0;u[t]||(u[t]=[]),u[t].push(e.identifier)});const d=new Map,f=200,p=Math.max(250,r+50),h=e=>{const t=a.get(e)||[];if(0===t.length)return d.set(e,f),f;let n=0;for(const e of t)n+=h(e);return n+=(t.length-1)*p,d.set(e,n),n};s.forEach(e=>h(e.identifier));const m=new Map,g=Math.max(400,r+200),y=(e,t,n)=>{const r=d.get(e)||f,o=n*g+100,i=a.get(e)||[];if(0===i.length)m.set(e,{x:t+r/2-100,y:o});else{let r=t;for(const e of i){const t=d.get(e)||f;y(e,r,n+1),r+=t+p}const a=i[0],s=i[i.length-1],l=m.get(a),c=m.get(s),u=(l.x+c.x)/2;m.set(e,{x:u,y:o})}};let v=0;for(const e of s)v+=d.get(e.identifier)||f;s.length>1&&(v+=(s.length-1)*p*2);let b=Math.max(0,(o-v)/2);for(const e of s)y(e.identifier,b,0),b+=(d.get(e.identifier)||f)+2*p;const w=r,x=Array.from(m.keys());for(let e=0;e<x.length;e++)for(let t=e+1;t<x.length;t++){const n=m.get(x[e]),r=m.get(x[t]);if(Math.sqrt((r.x-n.x)**2+(r.y-n.y)**2)<w){const e=r.x-n.x,t=r.y-n.y,o=Math.sqrt(e*e+t*t);if(o>0){const a=w/o,i=(e*a-e)/2,s=(t*a-t)/2;n.x-=i,n.y-=s,r.x+=i,r.y+=s}else n.x-=w/2,r.x+=w/2}}return m},Sp={Agent:vu,Tool:vu,Coordinator:vu},Ep=({flowData:e,width:n="100%",height:r="1000px",className:a="",defaultZoom:c=1,defaultPan:d={x:0,y:0},disableAutoFit:f=!0,showTimeline:p=!1,minNodeSpacing:h=200})=>{const{theme:m}=Pc(),g=e;if(!g)return t.createElement("div",{style:{width:"number"==typeof n?`${n}px`:n,height:"number"==typeof r?`${r}px`:r,border:`1px solid ${m.colors.border}`,borderRadius:"8px",background:m.colors.muted,position:"relative",minWidth:"800px",minHeight:"600px",display:"flex",alignItems:"center",justifyContent:"center"},className:a},t.createElement("div",{style:{textAlign:"center"}},t.createElement("div",{style:{fontSize:"16px",color:m.colors.mutedForeground,marginBottom:"8px"}},"No flow data available"),t.createElement("div",{style:{fontSize:"14px",color:m.colors.mutedForeground}},"Please provide flowData prop")));const y=l(null),v=l(null),[b,w]=u({width:"number"==typeof n?n:1200,height:"number"==typeof r?r:600}),[x,S]=u(0),[E,_]=u(!1),C=l(null),[k,N]=u(!1),M=o(()=>{const e=g.stamps||g.steps||[];return e.length>0?Math.max(...e.map(e=>e.step)):0},[g.stamps,g.steps]);i(()=>(E?C.current=setInterval(()=>{S(e=>e>=M?(_(!1),e):e+1)},250):C.current&&(clearInterval(C.current),C.current=null),()=>{C.current&&clearInterval(C.current)}),[E,M]),i(()=>{const e=g.stamps||g.steps||[];e.length>0&&S(Math.max(...e.map(e=>e.step)))},[g.stamps,g.steps]),i(()=>{const e=()=>{if(y.current){const e=y.current.getBoundingClientRect();w({width:Math.max(e.width||("number"==typeof n?n:1200),1200),height:e.height||("number"==typeof r?r:600)})}};if(e(),window.ResizeObserver&&y.current){const t=new ResizeObserver(e);return t.observe(y.current),()=>t.disconnect()}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[n,r]);const P=o(()=>{if(!g.nodes)return new Map;const e=Math.max(b.width||800,1200);return xp(g.nodes,g.edges||[],{minNodeSpacing:h,containerWidth:e})},[g.nodes,g.edges,b.width,h]),O=s(e=>g.nodes?g.nodes.filter(t=>t.stamp.step<=e):[],[g.nodes]),A=s(e=>(g.edges||[]).filter(t=>t.stamp.step<=e),[g.edges]),R=o(()=>{const e=O(x),t=A(x);return e.map(e=>{const n=P.get(e.identifier)||{x:0,y:0},r=e.stamp.step===x,o="Tool"===e.node_type?t.filter(t=>t.target===e.identifier&&t.details).map(e=>e.details):void 0;return{id:e.identifier,type:e.node_type||"Agent",position:n,data:{label:e.name||e.node_type,nodeType:e.node_type,details:e.details,isActive:r,id:e.identifier,edges:t,edgeDetails:o},style:{filter:r?"drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3))":"none"}}})},[P,x,O,A]),T=o(()=>A(x).filter(e=>e.source&&e.target).map(e=>{const t=e.stamp.step===x;return{id:e.identifier,type:"default",source:e.source,target:e.target,animated:t,bidirectional:!0,style:{stroke:t?m.colors.primary:m.colors.mutedForeground,strokeWidth:t?3:2},label:e.stamp?.identifier?jc(String(e.stamp.identifier),50):void 0,data:{label:e.stamp?.identifier?jc(String(e.stamp.identifier),50):void 0,source:e.source,target:e.target,step:e.stamp?.step,time:e.stamp?.time,details:e.details}}}),[x,A]),[D,$,I]=ds(R),[z,L,B]=fs(T);i(()=>{$(R)},[R,$]),i(()=>{L(T)},[T,L]);const F=s(e=>L(t=>To(e,t)),[L]),H=s(e=>{S(e),_(!1)},[]);s(()=>{_(e=>!e)},[]);const W=(e,t)=>{if(!v.current)return{x:0,y:0};const n=v.current.createSVGPoint();n.x=e,n.y=t;const r=n.matrixTransform(v.current.getScreenCTM()?.inverse());return{x:r.x,y:r.y}},V=za();return i(()=>{if(f||!V||0===R.length)return;const e=new Map;T.forEach(t=>{const n=e.get(t.source)||0;e.set(t.source,n+1);const r=e.get(t.target)||0;e.set(t.target,r+1)});let t="",n=0;e.forEach((e,r)=>{e>n&&(n=e,t=r)}),!t&&R.length>0&&(t=R[0].id),t&&setTimeout(()=>{V.fitView({nodes:[{id:t}],duration:1e3,padding:.2,minZoom:c,maxZoom:1})},500)},[R,T,V,f,c]),t.createElement("div",{ref:y,style:{width:"number"==typeof n?`${n}px`:n,height:"number"==typeof r?`${r}px`:r,border:`1px solid ${m.colors.border}`,borderRadius:"8px",overflow:"hidden",position:"relative",minWidth:"800px",minHeight:"600px",background:m.colors.background},className:a},p&&t.createElement(mp,{open:k,onOpenChange:N},t.createElement(gp,{asChild:!0},t.createElement("button",{style:{position:"absolute",top:"16px",left:"16px",zIndex:50,width:"40px",height:"40px",backgroundColor:m.colors.card,border:`1px solid ${m.colors.border}`,borderRadius:"8px",boxShadow:m.shadows.sm,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease-in-out",cursor:"pointer"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=m.colors.muted},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=m.colors.card},title:"Open Timeline"},t.createElement(Rs,{size:20,style:{color:m.colors.mutedForeground}}))),t.createElement(yp,null,t.createElement(dp,{style:{position:"fixed",top:0,bottom:0,left:0,height:"100%",width:"280px",zIndex:50,backgroundColor:m.colors.background,borderRight:`1px solid ${m.colors.border}`,boxShadow:m.shadows.lg,transition:"all 0.3s ease-in-out",padding:0},onPointerDownOutside:e=>e.preventDefault()},t.createElement("div",{style:{display:"flex",flexDirection:"column",height:"100%"}},t.createElement("div",{style:{flex:1,overflowY:"auto"}},t.createElement(Wu,{stamps:g.stamps||g.steps||[],currentStep:x,onStepChange:H}))),t.createElement(hp,{style:{position:"absolute",right:"16px",top:"16px",borderRadius:"4px",opacity:.7,transition:"opacity 0.2s ease-in-out",cursor:"pointer",border:"none",background:"transparent",padding:"4px",color:m.colors.mutedForeground},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.7"}},t.createElement("svg",{style:{height:"16px",width:"16px"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})),t.createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}},"Close"))))),t.createElement(cs,{nodes:D,edges:z,onNodesChange:I,onEdgesChange:B,onConnect:F,nodeTypes:Sp,edgeTypes:{default:e=>t.createElement(Ac,{...e,clientToSvgCoords:W,svgRef:v})},attributionPosition:"bottom-left",style:{width:"100%",height:"100%"},defaultViewport:{x:d.x,y:d.y,zoom:c},onInit:()=>{if(y.current){const e=y.current.querySelector("svg");e&&(v.current=e)}}},t.createElement(ws,{variant:ps.Lines,color:m.colors.mutedBorder,gap:16})),t.createElement("style",null,`\n .react-flow__edge-label {\n font-size: 10px;\n background: ${m.colors.card};\n color: ${m.colors.cardForeground};\n padding: 2px 4px;\n border-radius: 4px;\n border: 1px solid ${m.colors.border};\n max-width: 150px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .react-flow__edge {\n cursor: default !important;\n }\n\n .react-flow__edge-path {\n cursor: default !important;\n }\n `))},_p=e=>t.createElement(Mc,null,t.createElement(ts,null,t.createElement(Ep,e)));function Cp(e,[t,n]){return Math.min(n,Math.max(t,e))}var kp=e.createContext(void 0);const Np=["top","right","bottom","left"],Mp=Math.min,Pp=Math.max,Op=Math.round,Ap=Math.floor,Rp=e=>({x:e,y:e}),Tp={left:"right",right:"left",bottom:"top",top:"bottom"},Dp={start:"end",end:"start"};function $p(e,t,n){return Pp(e,Mp(t,n))}function Ip(e,t){return"function"==typeof e?e(t):e}function zp(e){return e.split("-")[0]}function Lp(e){return e.split("-")[1]}function Bp(e){return"x"===e?"y":"x"}function Fp(e){return"y"===e?"height":"width"}const Hp=new Set(["top","bottom"]);function Wp(e){return Hp.has(zp(e))?"y":"x"}function Vp(e){return Bp(Wp(e))}function jp(e){return e.replace(/start|end/g,e=>Dp[e])}const Yp=["left","right"],Xp=["right","left"],Kp=["top","bottom"],Up=["bottom","top"];function qp(e,t,n,r){const o=Lp(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Xp:Yp:t?Yp:Xp;case"left":case"right":return t?Kp:Up;default:return[]}}(zp(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(jp)))),a}function Zp(e){return e.replace(/left|right|bottom|top/g,e=>Tp[e])}function Gp(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Qp(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Jp(e,t,n){let{reference:r,floating:o}=e;const a=Wp(t),i=Vp(t),s=Fp(i),l=zp(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Lp(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function eh(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ip(t,e),h=Gp(p),m=s[f?"floating"===d?"reference":"floating":d],g=Qp(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=Qp(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function th(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nh(e){return Np.some(t=>e[t]>=0)}const rh=new Set(["left","top"]);function oh(){return"undefined"!=typeof window}function ah(e){return lh(e)?(e.nodeName||"").toLowerCase():"#document"}function ih(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sh(e){var t;return null==(t=(lh(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lh(e){return!!oh()&&(e instanceof Node||e instanceof ih(e).Node)}function ch(e){return!!oh()&&(e instanceof Element||e instanceof ih(e).Element)}function uh(e){return!!oh()&&(e instanceof HTMLElement||e instanceof ih(e).HTMLElement)}function dh(e){return!(!oh()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ih(e).ShadowRoot)}const fh=new Set(["inline","contents"]);function ph(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ch(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!fh.has(o)}const hh=new Set(["table","td","th"]);function mh(e){return hh.has(ah(e))}const gh=[":popover-open",":modal"];function yh(e){return gh.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const vh=["transform","translate","scale","rotate","perspective"],bh=["transform","translate","scale","rotate","perspective","filter"],wh=["paint","layout","strict","content"];function xh(e){const t=Sh(),n=ch(e)?Ch(e):e;return vh.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||bh.some(e=>(n.willChange||"").includes(e))||wh.some(e=>(n.contain||"").includes(e))}function Sh(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Eh=new Set(["html","body","#document"]);function _h(e){return Eh.has(ah(e))}function Ch(e){return ih(e).getComputedStyle(e)}function kh(e){return ch(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nh(e){if("html"===ah(e))return e;const t=e.assignedSlot||e.parentNode||dh(e)&&e.host||sh(e);return dh(t)?t.host:t}function Mh(e){const t=Nh(e);return _h(t)?e.ownerDocument?e.ownerDocument.body:e.body:uh(t)&&ph(t)?t:Mh(t)}function Ph(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Mh(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=ih(o);if(a){const e=Oh(i);return t.concat(i,i.visualViewport||[],ph(o)?o:[],e&&n?Ph(e):[])}return t.concat(o,Ph(o,[],n))}function Oh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ah(e){const t=Ch(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=uh(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Op(n)!==a||Op(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Rh(e){return ch(e)?e:e.contextElement}function Th(e){const t=Rh(e);if(!uh(t))return Rp(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ah(t);let i=(a?Op(n.width):n.width)/r,s=(a?Op(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Dh=Rp(0);function $h(e){const t=ih(e);return Sh()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Dh}function Ih(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Rh(e);let i=Rp(1);t&&(r?ch(r)&&(i=Th(r)):i=Th(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ih(e))&&t}(a,n,r)?$h(a):Rp(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=ih(a),t=r&&ch(r)?ih(r):r;let n=e,o=Oh(n);for(;o&&r&&t!==n;){const e=Th(o),t=o.getBoundingClientRect(),r=Ch(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=i,n=ih(o),o=Oh(n)}}return Qp({width:u,height:d,x:l,y:c})}function zh(e,t){const n=kh(e).scrollLeft;return t?t.left+n:Ih(sh(e)).left+n}function Lh(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-zh(e,n),y:n.top+t.scrollTop}}const Bh=new Set(["absolute","fixed"]);function Fh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ih(e),r=sh(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=Sh();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=zh(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=sh(e),n=kh(e),r=e.ownerDocument.body,o=Pp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+zh(e);const s=-n.scrollTop;return"rtl"===Ch(r).direction&&(i+=Pp(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(sh(e));else if(ch(t))r=function(e,t){const n=Ih(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=uh(e)?Th(e):Rp(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=$h(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qp(r)}function Hh(e,t){const n=Nh(e);return!(n===t||!ch(n)||_h(n))&&("fixed"===Ch(n).position||Hh(n,t))}function Wh(e,t,n){const r=uh(t),o=sh(t),a="fixed"===n,i=Ih(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Rp(0);function c(){l.x=zh(o)}if(r||!r&&!a)if(("body"!==ah(t)||ph(o))&&(s=kh(t)),r){const e=Ih(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const u=!o||r||a?Rp(0):Lh(o,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function Vh(e){return"static"===Ch(e).position}function jh(e,t){if(!uh(e)||"fixed"===Ch(e).position)return null;if(t)return t(e);let n=e.offsetParent;return sh(e)===n&&(n=n.ownerDocument.body),n}function Yh(e,t){const n=ih(e);if(yh(e))return n;if(!uh(e)){let t=Nh(e);for(;t&&!_h(t);){if(ch(t)&&!Vh(t))return t;t=Nh(t)}return n}let r=jh(e,t);for(;r&&mh(r)&&Vh(r);)r=jh(r,t);return r&&_h(r)&&Vh(r)&&!xh(r)?n:r||function(e){let t=Nh(e);for(;uh(t)&&!_h(t);){if(xh(t))return t;if(yh(t))return null;t=Nh(t)}return null}(e)||n}const Xh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=sh(r),s=!!t&&yh(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Rp(1);const u=Rp(0),d=uh(r);if((d||!d&&!a)&&(("body"!==ah(r)||ph(i))&&(l=kh(r)),uh(r))){const e=Ih(r);c=Th(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?Rp(0):Lh(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:sh,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a="clippingAncestors"===n?yh(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ph(e,[],!1).filter(e=>ch(e)&&"body"!==ah(e)),o=null;const a="fixed"===Ch(e).position;let i=a?Nh(e):e;for(;ch(i)&&!_h(i);){const t=Ch(i),n=xh(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&Bh.has(o.position)||ph(i)&&!n&&Hh(e,i))?r=r.filter(e=>e!==i):o=t,i=Nh(i)}return t.set(e,r),r}(t,this._c):[].concat(n),i=[...a,r],s=i[0],l=i.reduce((e,n)=>{const r=Fh(t,n,o);return e.top=Pp(r.top,e.top),e.right=Mp(r.right,e.right),e.bottom=Mp(r.bottom,e.bottom),e.left=Pp(r.left,e.left),e},Fh(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Yh,getElementRects:async function(e){const t=this.getOffsetParent||Yh,n=this.getDimensions,r=await n(e.floating);return{reference:Wh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ah(e);return{width:t,height:n}},getScale:Th,isElement:ch,isRTL:function(e){return"rtl"===Ch(e).direction}};function Kh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Uh(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Rh(e),u=o||a?[...c?Ph(c):[],...Ph(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=sh(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-Ap(d)+"px "+-Ap(o.clientWidth-(u+f))+"px "+-Ap(o.clientHeight-(d+p))+"px "+-Ap(u)+"px",threshold:Pp(0,Mp(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||Kh(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,h=null;i&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m=l?Ih(e):null;return l&&function t(){const r=Ih(e);m&&!Kh(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const qh=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=zp(n),s=Lp(n),l="y"===Wp(n),c=rh.has(i)?-1:1,u=a&&l?-1:1,d=Ip(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Zh=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ip(e,t),c={x:n,y:r},u=await eh(t,l),d=Wp(zp(o)),f=Bp(d);let p=c[f],h=c[d];if(a){const e="y"===f?"bottom":"right";p=$p(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";h=$p(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},Gh=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Ip(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const y=zp(o),v=Wp(s),b=zp(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!m?[Zp(s)]:function(e){const t=Zp(e);return[jp(e),t,jp(t)]}(s)),S="none"!==h;!f&&S&&x.push(...qp(s,m,h,w));const E=[s,...x],_=await eh(t,g),C=[];let k=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&C.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Lp(e),o=Vp(e),a=Fp(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Zp(i)),[i,Zp(i)]}(o,i,w);C.push(_[e[0]],_[e[1]])}if(k=[...k,{placement:o,overflows:C}],!C.every(e=>e<=0)){var N,M;const e=((null==(N=a.flip)?void 0:N.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&v!==Wp(t))||k.every(e=>Wp(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:k},reset:{placement:t}}}let n=null==(M=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=k.filter(e=>{if(S){const t=Wp(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Qh=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Ip(e,t),u=await eh(t,c),d=zp(o),f=Lp(o),p="y"===Wp(o),{width:h,height:m}=a.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,w=Mp(m-u[g],v),x=Mp(h-u[y],b),S=!t.middlewareData.shift;let E=w,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=v),S&&!f){const e=Pp(u.left,0),t=Pp(u.right,0),n=Pp(u.top,0),r=Pp(u.bottom,0);p?_=h-2*(0!==e||0!==t?e+t:Pp(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:Pp(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const C=await i.getDimensions(s.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},Jh=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ip(e,t);switch(r){case"referenceHidden":{const e=th(await eh(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nh(e)}}}case"escaped":{const e=th(await eh(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nh(e)}}}default:return{}}}}},em=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ip(e,t)||{};if(null==c)return{};const d=Gp(u),f={x:n,y:r},p=Vp(o),h=Fp(p),m=await i.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],x=f[p]-a.reference[p],S=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=S?S[b]:0;E&&await(null==i.isElement?void 0:i.isElement(S))||(E=s.floating[b]||a.floating[h]);const _=w/2-x/2,C=E/2-m[h]/2-1,k=Mp(d[y],C),N=Mp(d[v],C),M=k,P=E-m[h]-N,O=E/2-m[h]/2+_,A=$p(M,O,P),R=!l.arrow&&null!=Lp(o)&&O!==A&&a.reference[h]/2-(O<M?k:N)-m[h]/2<0,T=R?O<M?O-M:O-P:0;return{[p]:f[p]+T,data:{[p]:A,centerOffset:O-A-T,...R&&{alignmentOffset:T}},reset:R}}}),tm=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ip(e,t),u={x:n,y:r},d=Wp(o),f=Bp(d);let p=u[f],h=u[d];const m=Ip(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===f?"width":"height",t=rh.has(zp(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},nm=(e,t,n)=>{const r=new Map,o={platform:Xh,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Jp(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:a,fn:m}=s[n],{x:g,y:y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,p={...p,[a]:{...p[a],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Jp(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:a})};var rm="undefined"!=typeof document?f:function(){};function om(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!om(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!om(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function am(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function im(e,t){const n=am(e);return Math.round(t*n)/n}function sm(t){const n=e.useRef(t);return rm(()=>{n.current=t}),n}const lm=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?em({element:n.current,padding:r}).fn(t):{}:n?em({element:n,padding:r}).fn(t):{};var o}}),cm=(e,t)=>({...qh(e),options:[e,t]}),um=(e,t)=>({...Zh(e),options:[e,t]}),dm=(e,t)=>({...tm(e),options:[e,t]}),fm=(e,t)=>({...Gh(e),options:[e,t]}),pm=(e,t)=>({...Qh(e),options:[e,t]}),hm=(e,t)=>({...Jh(e),options:[e,t]}),mm=(e,t)=>({...lm(e),options:[e,t]});var gm=e.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return m(ad.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m("polygon",{points:"0,0 30,0 15,10"})})});gm.displayName="Arrow";var ym=gm;function vm(t){const[n,r]=e.useState(void 0);return qu(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)},[t]),n}var bm="Popper",[wm,xm]=Ku(bm),[Sm,Em]=wm(bm),_m=t=>{const{__scopePopper:n,children:r}=t,[o,a]=e.useState(null);return m(Sm,{scope:n,anchor:o,onAnchorChange:a,children:r})};_m.displayName=bm;var Cm="PopperAnchor",km=e.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,i=Em(Cm,r),s=e.useRef(null),l=Xu(n,s),c=e.useRef(null);return e.useEffect(()=>{const e=c.current;c.current=o?.current||s.current,e!==c.current&&i.onAnchorChange(c.current)}),o?null:m(ad.div,{...a,ref:l})});km.displayName=Cm;var Nm="PopperContent",[Mm,Pm]=wm(Nm),Om=e.forwardRef((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=t,b=Em(Nm,r),[w,x]=e.useState(null),S=Xu(n,e=>x(e)),[E,_]=e.useState(null),C=vm(E),k=C?.width??0,N=C?.height??0,M=o+("center"!==i?"-"+i:""),P="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],A=O.length>0,R={padding:P,boundary:O.filter(Dm),altBoundary:A},{refs:T,floatingStyles:D,placement:$,isPositioned:I,middlewareData:z}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(o);om(h,o)||m(o);const[g,y]=e.useState(null),[v,b]=e.useState(null),w=e.useCallback(e=>{e!==_.current&&(_.current=e,y(e))},[]),x=e.useCallback(e=>{e!==C.current&&(C.current=e,b(e))},[]),S=i||g,E=s||v,_=e.useRef(null),C=e.useRef(null),k=e.useRef(d),N=null!=c,M=sm(c),P=sm(a),O=sm(u),A=e.useCallback(()=>{if(!_.current||!C.current)return;const e={placement:n,strategy:r,middleware:h};P.current&&(e.platform=P.current),nm(_.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!om(k.current,t)&&(k.current=t,p.flushSync(()=>{f(t)}))})},[h,n,r,P,O]);rm(()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const R=e.useRef(!1);rm(()=>(R.current=!0,()=>{R.current=!1}),[]),rm(()=>{if(S&&(_.current=S),E&&(C.current=E),S&&E){if(M.current)return M.current(S,E,A);A()}},[S,E,A,M,N]);const T=e.useMemo(()=>({reference:_,floating:C,setReference:w,setFloating:x}),[w,x]),D=e.useMemo(()=>({reference:S,floating:E}),[S,E]),$=e.useMemo(()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=im(D.floating,d.x),n=im(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...am(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,d.x,d.y]);return e.useMemo(()=>({...d,update:A,refs:T,elements:D,floatingStyles:$}),[d,A,T,D,$])}({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>Uh(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[cm({mainAxis:a+N,alignmentAxis:s}),c&&um({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?dm():void 0,...R}),c&&fm({...R}),pm({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),E&&mm({element:E,padding:l}),$m({arrowWidth:k,arrowHeight:N}),h&&hm({strategy:"referenceHidden",...R})]}),[L,B]=Im($),F=id(y);qu(()=>{I&&F?.()},[I,F]);const H=z.arrow?.x,W=z.arrow?.y,V=0!==z.arrow?.centerOffset,[j,Y]=e.useState();return qu(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),m("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:I?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:m(Mm,{scope:r,placedSide:L,onArrowChange:_,arrowX:H,arrowY:W,shouldHideArrow:V,children:m(ad.div,{"data-side":L,"data-align":B,...v,ref:S,style:{...v.style,animation:I?void 0:"none"}})})})});Om.displayName=Nm;var Am="PopperArrow",Rm={top:"bottom",right:"left",bottom:"top",left:"right"},Tm=e.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=Pm(Am,n),a=Rm[o.placedSide];return m("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:m(ym,{...r,ref:t,style:{...r.style,display:"block"}})})});function Dm(e){return null!==e}Tm.displayName=Am;var $m=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=Im(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===l?(p=a?u:`${d}px`,h=-s+"px"):"top"===l?(p=a?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",h=a?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,h=a?u:`${f}px`),{data:{x:p,y:h}}}});function Im(e){const[t,n="center"]=e.split("-");return[t,n]}var zm=_m,Lm=km,Bm=Om,Fm=Tm;function Hm(t){const n=e.useRef({value:t,previous:t});return e.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var Wm=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});e.forwardRef((e,t)=>m(ad.span,{...e,ref:t,style:{...Wm,...e.style}})).displayName="VisuallyHidden";var Vm=[" ","Enter","ArrowUp","ArrowDown"],jm=[" ","Enter"],Ym="Select",[Xm,Km,Um]=function(e){const n=e+"CollectionProvider",[r,o]=Ku(n),[a,i]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),i=t.useRef(new Map).current;return m(a,{scope:n,itemMap:i,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=td(l),u=t.forwardRef((e,t)=>{const{scope:n,children:r}=e,o=Xu(t,i(l,n).collectionRef);return m(c,{ref:o,children:r})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=td(d),h=t.forwardRef((e,n)=>{const{scope:r,children:o,...a}=e,s=t.useRef(null),l=Xu(n,s),c=i(d,r);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>{c.itemMap.delete(s)})),m(p,{[f]:"",ref:l,children:o})});return h.displayName=d,[{Provider:s,Slot:u,ItemSlot:h},function(n){const r=i(e+"CollectionConsumer",n);return t.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},o]}(Ym),[qm,Zm]=Ku(Ym,[Um,xm]),Gm=xm(),[Qm,Jm]=qm(Ym),[eg,tg]=qm(Ym),ng=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:p,required:h,form:y}=t,v=Gm(n),[b,w]=e.useState(null),[x,S]=e.useState(null),[E,_]=e.useState(!1),C=function(t){const n=e.useContext(kp);return t||n||"ltr"}(u),[k,N]=ed({prop:o,defaultProp:a??!1,onChange:i,caller:Ym}),[M,P]=ed({prop:s,defaultProp:l,onChange:c,caller:Ym}),O=e.useRef(null),A=!b||(y||!!b.closest("form")),[R,T]=e.useState(new Set),D=Array.from(R).map(e=>e.props.value).join(";");return m(zm,{...v,children:g(Qm,{required:h,scope:n,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:Qu(),value:M,onValueChange:P,open:k,onOpenChange:N,dir:C,triggerPointerDownPosRef:O,disabled:p,children:[m(Xm.Provider,{scope:n,children:m(eg,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback(e=>{T(t=>new Set(t).add(e))},[]),onNativeOptionRemove:e.useCallback(e=>{T(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),A?g(Wg,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:M,onChange:e=>P(e.target.value),disabled:p,form:y,children:[void 0===M?m("option",{value:""}):null,Array.from(R)]},D):null]})})};ng.displayName=Ym;var rg="SelectTrigger",og=e.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,i=Gm(r),s=Jm(rg,r),l=s.disabled||o,c=Xu(n,s.onTriggerChange),u=Km(r),d=e.useRef("touch"),[f,p,h]=jg(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=Yg(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{l||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return m(Lm,{asChild:!0,...i,children:m(ad.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Vg(s.value)?"":void 0,...a,ref:c,onClick:Vu(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==d.current&&g(e)}),onPointerDown:Vu(a.onPointerDown,e=>{d.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:Vu(a.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||Vm.includes(e.key)&&(g(),e.preventDefault())})})})});og.displayName=rg;var ag="SelectValue",ig=e.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=Jm(ag,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==a,d=Xu(t,l.onValueNodeChange);return qu(()=>{c(u)},[c,u]),m(ad.span,{...s,ref:d,style:{pointerEvents:"none"},children:Vg(l.value)?m(y,{children:i}):a})});ig.displayName=ag;var sg=e.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m(ad.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});sg.displayName="SelectIcon";var lg=e=>m(kd,{asChild:!0,...e});lg.displayName="SelectPortal";var cg="SelectContent",ug=e.forwardRef((t,n)=>{const r=Jm(cg,t.__scopeSelect),[o,a]=e.useState();if(qu(()=>{a(new DocumentFragment)},[]),!r.open){const e=o;return e?p.createPortal(m(fg,{scope:t.__scopeSelect,children:m(Xm.Slot,{scope:t.__scopeSelect,children:m("div",{children:t.children})})}),e):null}return m(mg,{...t,ref:n})});ug.displayName=cg;var dg=10,[fg,pg]=qm(cg),hg=td("SelectContent.RemoveScroll"),mg=e.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:y,avoidCollisions:v,...b}=t,w=Jm(cg,r),[x,S]=e.useState(null),[E,_]=e.useState(null),C=Xu(n,e=>S(e)),[k,N]=e.useState(null),[M,P]=e.useState(null),O=Km(r),[A,R]=e.useState(!1),T=e.useRef(!1);e.useEffect(()=>{if(x)return Nf(x)},[x]),Od();const D=e.useCallback(e=>{const[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&E&&(E.scrollTop=0),n===r&&E&&(E.scrollTop=E.scrollHeight),n?.focus(),document.activeElement!==o)return}},[O,E]),$=e.useCallback(()=>D([k,x]),[D,k,x]);e.useEffect(()=>{A&&$()},[A,$]);const{onOpenChange:I,triggerPointerDownPosRef:z}=w;e.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),z.current=null};return null!==z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[x,I,z]),e.useEffect(()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[I]);const[L,B]=jg(e=>{const t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Yg(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),F=e.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==w.value&&w.value===t||r)&&(N(e),r&&(T.current=!0))},[w.value]),H=e.useCallback(()=>x?.focus(),[x]),W=e.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==w.value&&w.value===t||r)&&P(e)},[w.value]),V="popper"===o?yg:gg,j=V===yg?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:y,avoidCollisions:v}:{};return m(fg,{scope:r,content:x,viewport:E,onViewportChange:_,itemRefCallback:F,selectedItem:k,onItemLeave:H,itemTextRefCallback:W,focusSelectedItem:$,selectedItemText:M,position:o,isPositioned:A,searchRef:L,children:m(wf,{as:hg,allowPinchZoom:!0,children:m(bd,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Vu(a,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:m(fd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:m(V,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...j,onPlaced:()=>R(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Vu(b.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>D(t)),e.preventDefault()}})})})})})})});mg.displayName="SelectContentImpl";var gg=e.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,i=Jm(cg,r),s=pg(cg,r),[l,c]=e.useState(null),[u,d]=e.useState(null),f=Xu(n,e=>d(e)),p=Km(r),h=e.useRef(!1),g=e.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=s,x=e.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&y&&v&&b){const e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==i.dir){const o=r.left-t.left,a=n.left-o,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-dg,d=Cp(a,[dg,Math.max(dg,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const o=t.right-r.right,a=window.innerWidth-n.right-o,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-dg,d=Cp(a,[dg,Math.max(dg,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const a=p(),s=window.innerHeight-2*dg,c=y.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),w=f+m+c+parseInt(d.paddingBottom,10)+g,x=Math.min(5*v.offsetHeight,w),S=window.getComputedStyle(y),E=parseInt(S.paddingTop,10),_=parseInt(S.paddingBottom,10),C=e.top+e.height/2-dg,k=s-C,N=v.offsetHeight/2,M=f+m+(v.offsetTop+N),P=w-M;if(M<=C){const e=a.length>0&&v===a[a.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-y.offsetTop-y.offsetHeight,n=M+Math.max(k,N+(e?_:0)+t+g);l.style.height=n+"px"}else{const e=a.length>0&&v===a[0].ref.current;l.style.top="0px";const t=Math.max(C,f+y.offsetTop+(e?E:0)+N)+P;l.style.height=t+"px",y.scrollTop=M-C+y.offsetTop}l.style.margin=`${dg}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",o?.(),requestAnimationFrame(()=>h.current=!0)}},[p,i.trigger,i.valueNode,l,u,y,v,b,i.dir,o]);qu(()=>x(),[x]);const[S,E]=e.useState();qu(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const _=e.useCallback(e=>{e&&!0===g.current&&(x(),w?.(),g.current=!1)},[x,w]);return m(vg,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:_,children:m("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:m(ad.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});gg.displayName="SelectItemAlignedPosition";var yg=e.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=dg,...a}=e,i=Gm(n);return m(Bm,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yg.displayName="SelectPopperPosition";var[vg,bg]=qm(cg,{}),wg="SelectViewport",xg=e.forwardRef((t,n)=>{const{__scopeSelect:r,nonce:o,...a}=t,i=pg(wg,r),s=bg(wg,r),l=Xu(n,i.onViewportChange),c=e.useRef(0);return g(y,{children:[m("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m(Xm.Slot,{scope:r,children:m(ad.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Vu(a.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*dg,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});xg.displayName=wg;var Sg="SelectGroup",[Eg,_g]=qm(Sg);e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qu();return m(Eg,{scope:n,id:o,children:m(ad.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=Sg;var Cg="SelectLabel",kg=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=_g(Cg,n);return m(ad.div,{id:o.id,...r,ref:t})});kg.displayName=Cg;var Ng="SelectItem",[Mg,Pg]=qm(Ng),Og=e.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:i,...s}=t,l=Jm(Ng,r),c=pg(Ng,r),u=l.value===o,[d,f]=e.useState(i??""),[p,h]=e.useState(!1),g=Xu(n,e=>c.itemRefCallback?.(e,o,a)),y=Qu(),v=e.useRef("touch"),b=()=>{a||(l.onValueChange(o),l.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m(Mg,{scope:r,value:o,disabled:a,textId:y,isSelected:u,onItemTextChange:e.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:m(Xm.ItemSlot,{scope:r,value:o,disabled:a,textValue:d,children:m(ad.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:g,onFocus:Vu(s.onFocus,()=>h(!0)),onBlur:Vu(s.onBlur,()=>h(!1)),onClick:Vu(s.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:Vu(s.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:Vu(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:Vu(s.onPointerMove,e=>{v.current=e.pointerType,a?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Vu(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Vu(s.onKeyDown,e=>{""!==c.searchRef?.current&&" "===e.key||(jm.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});Og.displayName=Ng;var Ag="SelectItemText",Rg=e.forwardRef((t,n)=>{const{__scopeSelect:r,className:o,style:a,...i}=t,s=Jm(Ag,r),l=pg(Ag,r),c=Pg(Ag,r),u=tg(Ag,r),[d,f]=e.useState(null),h=Xu(n,e=>f(e),c.onItemTextChange,e=>l.itemTextRefCallback?.(e,c.value,c.disabled)),v=d?.textContent,b=e.useMemo(()=>m("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:x}=u;return qu(()=>(w(b),()=>x(b)),[w,x,b]),g(y,{children:[m(ad.span,{id:c.textId,...i,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?p.createPortal(i.children,s.valueNode):null]})});Rg.displayName=Ag;var Tg="SelectItemIndicator",Dg=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Pg(Tg,n).isSelected?m(ad.span,{"aria-hidden":!0,...r,ref:t}):null});Dg.displayName=Tg;var $g="SelectScrollUpButton",Ig=e.forwardRef((t,n)=>{const r=pg($g,t.__scopeSelect),o=bg($g,t.__scopeSelect),[a,i]=e.useState(!1),s=Xu(n,o.onScrollButtonChange);return qu(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?m(Bg,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Ig.displayName=$g;var zg="SelectScrollDownButton",Lg=e.forwardRef((t,n)=>{const r=pg(zg,t.__scopeSelect),o=bg(zg,t.__scopeSelect),[a,i]=e.useState(!1),s=Xu(n,o.onScrollButtonChange);return qu(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?m(Bg,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Lg.displayName=zg;var Bg=e.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,i=pg("SelectScrollButton",r),s=e.useRef(null),l=Km(r),c=e.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return e.useEffect(()=>()=>c(),[c]),qu(()=>{const e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),m(ad.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:Vu(a.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:Vu(a.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:Vu(a.onPointerLeave,()=>{c()})})}),Fg=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m(ad.div,{"aria-hidden":!0,...r,ref:t})});Fg.displayName="SelectSeparator";var Hg="SelectArrow";e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Gm(n),a=Jm(Hg,n),i=pg(Hg,n);return a.open&&"popper"===i.position?m(Fm,{...o,...r,ref:t}):null}).displayName=Hg;var Wg=e.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const a=e.useRef(null),i=Xu(o,a),s=Hm(n);return e.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[s,n]),m(ad.select,{...r,style:{...Wm,...r.style},ref:i,defaultValue:n})});function Vg(e){return""===e||void 0===e}function jg(t){const n=id(t),r=e.useRef(""),o=e.useRef(0),a=e.useCallback(e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),i=e.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return e.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,a,i]}function Yg(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(e,Math.max(a,0));1===o.length&&(i=i.filter(e=>e!==n));const s=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}Wg.displayName="SelectBubbleInput";var Xg=og,Kg=sg,Ug=lg,qg=ug,Zg=xg,Gg=kg,Qg=Og,Jg=Rg,ey=Dg,ty=Ig,ny=Lg,ry=Fg;const oy=ng,ay=ig,iy=Lc(Xg)`
|
|
290
290
|
display: flex;
|
|
291
291
|
height: 2.5rem;
|
|
292
292
|
width: 100%;
|
|
@@ -314,29 +314,29 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
314
314
|
&[data-placeholder] {
|
|
315
315
|
color: #6b7280;
|
|
316
316
|
}
|
|
317
|
-
`,
|
|
317
|
+
`,sy=Lc(Ms)`
|
|
318
318
|
height: 1rem;
|
|
319
319
|
width: 1rem;
|
|
320
320
|
opacity: 0.5;
|
|
321
|
-
`,
|
|
321
|
+
`,ly=Lc(ty)`
|
|
322
322
|
display: flex;
|
|
323
323
|
cursor: default;
|
|
324
324
|
align-items: center;
|
|
325
325
|
justify-content: center;
|
|
326
326
|
padding: 0.25rem;
|
|
327
|
-
`,
|
|
327
|
+
`,cy=Lc(Os)`
|
|
328
328
|
height: 1rem;
|
|
329
329
|
width: 1rem;
|
|
330
|
-
`,
|
|
330
|
+
`,uy=Lc(ny)`
|
|
331
331
|
display: flex;
|
|
332
332
|
cursor: default;
|
|
333
333
|
align-items: center;
|
|
334
334
|
justify-content: center;
|
|
335
335
|
padding: 0.25rem;
|
|
336
|
-
`,
|
|
336
|
+
`,dy=Lc(Ms)`
|
|
337
337
|
height: 1rem;
|
|
338
338
|
width: 1rem;
|
|
339
|
-
`,
|
|
339
|
+
`,fy=Lc(qg)`
|
|
340
340
|
position: relative;
|
|
341
341
|
z-index: 50;
|
|
342
342
|
min-width: 8rem;
|
|
@@ -359,13 +359,13 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
359
359
|
transform: translateY(0);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
`,
|
|
362
|
+
`,py=Lc(Gg)`
|
|
363
363
|
padding: 0.375rem 0.75rem;
|
|
364
364
|
padding-left: 2rem;
|
|
365
365
|
font-size: 0.875rem;
|
|
366
366
|
font-weight: 600;
|
|
367
367
|
color: #374151;
|
|
368
|
-
`,
|
|
368
|
+
`,hy=Lc(Qg)`
|
|
369
369
|
position: relative;
|
|
370
370
|
display: flex;
|
|
371
371
|
cursor: default;
|
|
@@ -391,7 +391,7 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
391
391
|
background-color: #f3f4f6;
|
|
392
392
|
color: #1f2937;
|
|
393
393
|
}
|
|
394
|
-
`,
|
|
394
|
+
`,my=Lc.span`
|
|
395
395
|
position: absolute;
|
|
396
396
|
left: 0.5rem;
|
|
397
397
|
display: flex;
|
|
@@ -399,39 +399,39 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
399
399
|
width: 0.875rem;
|
|
400
400
|
align-items: center;
|
|
401
401
|
justify-content: center;
|
|
402
|
-
`,
|
|
402
|
+
`,gy=Lc(Ns)`
|
|
403
403
|
height: 1rem;
|
|
404
404
|
width: 1rem;
|
|
405
|
-
`,
|
|
405
|
+
`,yy=Lc(ry)`
|
|
406
406
|
margin: 0.25rem -0.25rem;
|
|
407
407
|
height: 1px;
|
|
408
408
|
background-color: #e5e7eb;
|
|
409
|
-
`,
|
|
409
|
+
`,vy=e.forwardRef(({children:t,...n},r)=>e.createElement(iy,{ref:r,...n},t,e.createElement(Kg,{asChild:!0},e.createElement(sy,null))));vy.displayName=Xg.displayName;const by=e.forwardRef(({...t},n)=>e.createElement(ly,{ref:n,...t},e.createElement(cy,null)));by.displayName=ty.displayName;const wy=e.forwardRef(({...t},n)=>e.createElement(uy,{ref:n,...t},e.createElement(dy,null)));wy.displayName=ny.displayName;const xy=e.forwardRef(({children:t,position:n="popper",...r},o)=>e.createElement(Ug,null,e.createElement(fy,{ref:o,position:n,...r},e.createElement(by,null),e.createElement(Zg,{style:{padding:"4px"}},t),e.createElement(wy,null))));xy.displayName=qg.displayName;e.forwardRef(({...t},n)=>e.createElement(py,{ref:n,...t})).displayName=Gg.displayName;const Sy=e.forwardRef(({children:t,...n},r)=>e.createElement(hy,{ref:r,...n},e.createElement(my,null,e.createElement(ey,null,e.createElement(gy,null))),e.createElement(Jg,null,t)));Sy.displayName=Qg.displayName;e.forwardRef(({...t},n)=>e.createElement(yy,{ref:n,...t})).displayName=ry.displayName;const Ey=Lc.div`
|
|
410
410
|
display: flex;
|
|
411
411
|
align-items: center;
|
|
412
412
|
gap: 0.5rem;
|
|
413
413
|
min-width: 300px;
|
|
414
|
-
`,
|
|
414
|
+
`,_y=Lc.div`
|
|
415
415
|
padding: 0.5rem 1rem;
|
|
416
416
|
color: ${e=>e.theme.colors.mutedForeground};
|
|
417
417
|
font-size: 0.875rem;
|
|
418
418
|
background-color: ${e=>e.theme.colors.muted};
|
|
419
419
|
border-radius: 0.375rem;
|
|
420
420
|
border: 1px solid ${e=>e.theme.colors.border};
|
|
421
|
-
`,
|
|
421
|
+
`,Cy=Lc.div`
|
|
422
422
|
flex: 1;
|
|
423
423
|
min-width: 0;
|
|
424
|
-
`,
|
|
424
|
+
`,ky=Lc.div`
|
|
425
425
|
display: flex;
|
|
426
426
|
align-items: center;
|
|
427
427
|
justify-content: space-between;
|
|
428
428
|
width: 100%;
|
|
429
|
-
`,
|
|
429
|
+
`,Ny=Lc.div`
|
|
430
430
|
padding: 0.5rem 1rem;
|
|
431
431
|
color: ${e=>e.theme.colors.mutedForeground};
|
|
432
432
|
font-size: 0.875rem;
|
|
433
433
|
text-align: center;
|
|
434
|
-
`,
|
|
434
|
+
`,My=Lc.button`
|
|
435
435
|
display: flex;
|
|
436
436
|
align-items: center;
|
|
437
437
|
justify-content: center;
|
|
@@ -449,7 +449,7 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
449
449
|
background-color: ${e=>e.theme.colors.muted};
|
|
450
450
|
color: ${e=>e.theme.colors.cardForeground};
|
|
451
451
|
}
|
|
452
|
-
`,
|
|
452
|
+
`,Py=Lc(As)`
|
|
453
453
|
height: 1rem;
|
|
454
454
|
width: 1rem;
|
|
455
455
|
animation: spin 1s linear infinite;
|
|
@@ -463,10 +463,10 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
463
463
|
transform: rotate(360deg);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
`,
|
|
466
|
+
`,Oy=Lc(Ts)`
|
|
467
467
|
height: 1rem;
|
|
468
468
|
width: 1rem;
|
|
469
|
-
`,
|
|
469
|
+
`,Ay=({files:e,currentFile:n,onFileSelect:r,onRefresh:o,loading:a=!1,disabled:i=!1})=>t.createElement(Ey,null,0!==e.length||a?t.createElement(oy,{value:n||"",onValueChange:r,disabled:i||a},t.createElement(Cy,{disabled:i,loading:a},t.createElement(vy,null,t.createElement(ky,null,t.createElement(ay,{placeholder:a?"Loading sessions...":0===e.length?"No sessions found":"Select an Agent Session..."})))),t.createElement(xy,null,0!==e.length||a?e.map(e=>t.createElement(Sy,{key:e.name,value:e.name},e.name)):t.createElement(Ny,null,"No agent sessions available"))):t.createElement(_y,null,"No agent sessions available"),e.length>0&&t.createElement(My,{onClick:e=>{e.stopPropagation(),o()},disabled:a||i,loading:a,title:a?"Loading...":"Refresh files"},a?t.createElement(Py,null):t.createElement(Oy,null)));var Ry="Checkbox",[Ty,Dy]=Ku(Ry),[$y,Iy]=Ty(Ry);function zy(t){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:a,disabled:i,form:s,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=t,[p,h]=ed({prop:r,defaultProp:a??!1,onChange:c,caller:Ry}),[g,y]=e.useState(null),[v,b]=e.useState(null),w=e.useRef(!1),x=!g||(!!s||!!g.closest("form")),S={checked:p,disabled:i,setChecked:h,control:g,setControl:y,name:l,form:s,value:d,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:!Xy(a)&&a,isFormControl:x,bubbleInput:v,setBubbleInput:b};return m($y,{scope:n,...S,children:Yy(f)?f(S):o})}var Ly="CheckboxTrigger",By=e.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},a)=>{const{control:i,value:s,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:g}=Iy(Ly,t),y=Xu(a,d),v=e.useRef(c);return e.useEffect(()=>{const e=i?.form;if(e){const t=()=>f(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[i,f]),m(ad.button,{type:"button",role:"checkbox","aria-checked":Xy(c)?"mixed":c,"aria-required":u,"data-state":Ky(c),"data-disabled":l?"":void 0,disabled:l,value:s,...o,ref:y,onKeyDown:Vu(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:Vu(r,e=>{f(e=>!!Xy(e)||!e),g&&h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})})});By.displayName=Ly;var Fy=e.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return m(zy,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:e})=>g(y,{children:[m(By,{...d,ref:t,__scopeCheckbox:n}),e&&m(jy,{__scopeCheckbox:n})]})})});Fy.displayName=Ry;var Hy="CheckboxIndicator",Wy=e.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Iy(Hy,n);return m(Nd,{present:r||Xy(a.checked)||!0===a.checked,children:m(ad.span,{"data-state":Ky(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Wy.displayName=Hy;var Vy="CheckboxBubbleInput",jy=e.forwardRef(({__scopeCheckbox:t,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:s,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:h}=Iy(Vy,t),g=Xu(r,h),y=Hm(i),v=vm(o);e.useEffect(()=>{const e=p;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!a.current;if(y!==i&&n){const t=new Event("click",{bubbles:r});e.indeterminate=Xy(i),n.call(e,!Xy(i)&&i),e.dispatchEvent(t)}},[p,y,i,a]);const b=e.useRef(!Xy(i)&&i);return m(ad.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:l,disabled:c,name:u,value:d,form:f,...n,tabIndex:-1,ref:g,style:{...n.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function Yy(e){return"function"==typeof e}function Xy(e){return"indeterminate"===e}function Ky(e){return Xy(e)?"indeterminate":e?"checked":"unchecked"}jy.displayName=Vy;const Uy=Lc(Fy)`
|
|
470
470
|
display: flex;
|
|
471
471
|
align-items: center;
|
|
472
472
|
justify-content: center;
|
|
@@ -493,15 +493,15 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
493
493
|
background-color: #6366f1;
|
|
494
494
|
color: white;
|
|
495
495
|
}
|
|
496
|
-
`,
|
|
496
|
+
`,qy=Lc(Wy)`
|
|
497
497
|
display: flex;
|
|
498
498
|
align-items: center;
|
|
499
499
|
justify-content: center;
|
|
500
500
|
color: currentColor;
|
|
501
|
-
`,
|
|
501
|
+
`,Zy=Lc(Ns)`
|
|
502
502
|
height: 1rem;
|
|
503
503
|
width: 1rem;
|
|
504
|
-
`,Uy=e.forwardRef(({className:t,...n},r)=>e.createElement(Yy,{ref:r,...n},e.createElement(Xy,null,e.createElement(Ky,null))));Uy.displayName=zy.displayName;const qy=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Zy=()=>{const e=t.useContext(qy);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function Gy(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Qy(){return ev(/^iPad/)||ev(/^Mac/)&&navigator.maxTouchPoints>1}function Jy(){return ev(/^iPhone/)||Qy()}function ev(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const tv="undefined"!=typeof window?f:i;function nv(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const rv="undefined"!=typeof document&&window.visualViewport;function ov(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function av(e){for(ov(e)&&(e=e.parentElement);e&&!ov(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const iv=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let sv,lv=0;function cv(e={}){let{isDisabled:t}=e;tv(()=>{if(!t)return lv++,1===lv&&Jy()&&(sv=function(){let e,t=0,n=n=>{e=av(n.target),e===document.documentElement&&e===document.body||(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)},o=e=>{let t=e.target;fv(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},a=e=>{let t=e.target;fv(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",rv&&(rv.height<window.innerHeight?requestAnimationFrame(()=>{dv(t)}):rv.addEventListener("resize",()=>dv(t),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=nv(function(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=nv(uv(document,"touchstart",n,{passive:!1,capture:!0}),uv(document,"touchmove",r,{passive:!1,capture:!0}),uv(document,"touchend",o,{passive:!1,capture:!0}),uv(document,"focus",a,!0),uv(window,"scroll",i));return()=>{c(),u(),window.scrollTo(s,l)}}()),()=>{lv--,0===lv&&(null==sv||sv())}},[t])}function uv(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function dv(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=av(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function fv(e){return e instanceof HTMLInputElement&&!iv.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function pv(...t){return e.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...t),t)}const hv=new WeakMap;function mv(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)}),n||hv.set(e,r)}const gv=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function yv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[gv(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[gv(t)?5:4]):null)}function vv(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}const bv={DURATION:.5,EASE:[.32,.72,0,1]},wv=16,xv="vaul-dragging";function Sv(e){const n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>null==n.current?void 0:n.current.call(n,...e),[])}function Ev({prop:e,defaultProp:n,onChange:r=()=>{}}){const[o,a]=function({defaultProp:e,onChange:n}){const r=t.useState(e),[o]=r,a=t.useRef(o),i=Sv(n);return t.useEffect(()=>{a.current!==o&&(i(o),a.current=o)},[o,a,i]),r}({defaultProp:n,onChange:r}),i=void 0!==e,s=i?e:o,l=Sv(r),c=t.useCallback(t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else a(t)},[i,e,a,l]);return[s,c]}let _v=null;function Cv({open:e,onOpenChange:n,children:r,onDrag:o,onRelease:a,snapPoints:i,shouldScaleBackground:s=!1,setBackgroundColorOnScale:l=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=i&&i.length-1,activeSnapPoint:h,setActiveSnapPoint:m,fixed:g,modal:y=!0,onClose:v,nested:b,noBodyStyles:w=!1,direction:x="bottom",defaultOpen:S=!1,disablePreventScroll:E=!0,snapToSequentialPoint:_=!1,preventScrollRestoration:C=!1,repositionInputs:k=!0,onAnimationEnd:N,container:M,autoFocus:P=!1}){var O,A;const[R=!1,T]=Ev({defaultProp:S,prop:e,onChange:e=>{null==n||n(e),e||b||ue(),setTimeout(()=>{null==N||N(e)},1e3*bv.DURATION),e&&!y&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[D,$]=t.useState(!1),[I,z]=t.useState(!1),[L,B]=t.useState(!1),F=t.useRef(null),H=t.useRef(null),W=t.useRef(null),V=t.useRef(null),j=t.useRef(null),Y=t.useRef(!1),X=t.useRef(null),K=t.useRef(0),U=t.useRef(!1),q=t.useRef(!S),Z=t.useRef(0),G=t.useRef(null),Q=t.useRef((null==(O=G.current)?void 0:O.getBoundingClientRect().height)||0),J=t.useRef((null==(A=G.current)?void 0:A.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback(e=>{i&&e===ie.length-1&&(H.current=new Date)},[]),{activeSnapPoint:ne,activeSnapPointIndex:re,setActiveSnapPoint:oe,onRelease:ae,snapPointsOffset:ie,onDrag:se,shouldFade:le,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:r,drawerRef:o,overlayRef:a,fadeFromIndex:i,onSnapPointChange:s,direction:l="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=Ev({prop:e,defaultProp:null==r?void 0:r[0],onChange:n}),[p,h]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const m=t.useMemo(()=>d===(null==r?void 0:r[r.length-1])||null,[r,d]),g=t.useMemo(()=>{var e;return null!=(e=null==r?void 0:r.findIndex(e=>e===d))?e:null},[r,d]),y=r&&r.length>0&&(i||0===i)&&!Number.isNaN(i)&&r[i]===d||!r,v=t.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==r?void 0:r.map(t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),gv(l)){const o=n?r:p?t*e.height:0;return p?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:p?t*e.width:0;return p?"right"===l?e.width-o:-e.width+o:o}))?t:[]},[r,p,c]),b=t.useMemo(()=>null!==g?null==v?void 0:v[g]:null,[v,g]),w=t.useCallback(e=>{var t;const n=null!=(t=null==v?void 0:v.findIndex(t=>t===e))?t:null;s(n),mv(o.current,{transition:`transform ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`,transform:gv(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),v&&n!==v.length-1&&void 0!==i&&n!==i&&n<i?mv(a.current,{transition:`opacity ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`,opacity:"0"}):mv(a.current,{transition:`opacity ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`,opacity:"1"}),f(null==r?void 0:r[Math.max(n,0)])},[o.current,r,v,i,a,f]);return t.useEffect(()=>{if(d||e){var t;const n=null!=(t=null==r?void 0:r.findIndex(t=>t===e||t===d))?t:-1;v&&-1!==n&&"number"==typeof v[n]&&w(v[n])}},[d,e,r,v,w]),{isLastSnapPoint:m,activeSnapPoint:d,shouldFade:y,getPercentageDragged:function(e,t){if(!r||"number"!=typeof g||!v||void 0===i)return null;const n=g===i-1;if(g>=i&&t)return 0;if(n&&!t)return 1;if(!y&&!n)return null;const o=n?g+1:g-1,a=n?v[o]-v[o-1]:v[o+1]-v[o],s=e/Math.abs(a);return n?1-s:s},setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:o}){if(void 0===i)return;const s="bottom"===l||"right"===l?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===g,d=e>0;if(g===i-1&&mv(a.current,{transition:`opacity ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`}),!u&&n>2&&!d)return void(o?t():w(v[0]));if(!u&&n>2&&d&&v&&r)return void w(v[r.length-1]);const f=null==v?void 0:v.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),p=gv(l)?window.innerHeight:window.innerWidth;if(n>.4&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m&&r)return void w(v[r.length-1]);if(c&&e<0&&o&&t(),null===g)return;return void w(v[g+e])}w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===l||"right"===l?b-e:b+e;("bottom"===l||"right"===l)&&t<v[v.length-1]||("top"===l||"left"===l)&&t>v[v.length-1]||mv(o.current,{transform:gv(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:v}}({snapPoints:i,activeSnapPointProp:h,setActiveSnapPointProp:m,drawerRef:G,fadeFromIndex:p,overlayRef:F,onSnapPointChange:te,direction:x,container:M,snapToSequentialPoint:_});cv({isDisabled:!R||I||!y||L||!D||!k||!E});const{restorePositionSetting:ue}=function({isOpen:e,modal:n,nested:r,hasBeenOpened:o,preventScrollRestoration:a,noBodyStyles:i}){const[s,l]=t.useState(()=>"undefined"!=typeof window?window.location.href:""),c=t.useRef(0),u=t.useCallback(()=>{if(Gy()&&null===_v&&e&&!i){_v={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}),300)}},[e]),d=t.useCallback(()=>{if(Gy()&&null!==_v&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,_v),window.requestAnimationFrame(()=>{a&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)}),_v=null}},[s]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(n)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||d())}},[n,d]),t.useEffect(()=>{!r&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),n||window.setTimeout(()=>{d()},500)):d())},[e,o,s,n,r,u,d]),{restorePositionSetting:d}}({isOpen:R,modal:y,nested:null!=b&&b,hasBeenOpened:D,preventScrollRestoration:C,noBodyStyles:w});function de(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var n;let r=e;const o=null==(n=window.getSelection())?void 0:n.toString(),a=G.current?yv(G.current,x):null,i=new Date;if("SELECT"===r.tagName)return!1;if(r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===x||"left"===x)return!0;if(H.current&&i.getTime()-H.current.getTime()<500)return!1;if(null!==a&&("bottom"===x?a>0:a<0))return!0;if(o&&o.length>0)return!1;if(j.current&&i.getTime()-j.current.getTime()<u&&0===a)return j.current=i,!1;if(t)return j.current=i,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return j.current=new Date,!1;if("dialog"===r.getAttribute("role"))return!0}r=r.parentNode}return!0}function pe(e){!function(){if(!I||!G.current)return;G.current.classList.remove(xv),Y.current=!1,z(!1),V.current=new Date}(),null==v||v(),e||T(!1),setTimeout(()=>{i&&oe(i[0])},1e3*bv.DURATION)}function he(){if(!G.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=yv(G.current,x);mv(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`}),mv(F.current,{transition:`opacity ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`,opacity:"1"}),s&&t&&t>0&&R&&mv(e,{borderRadius:"8px",overflow:"hidden",...gv(x)?{transform:`scale(${de()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${de()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${bv.DURATION}s`,transitionTimingFunction:`cubic-bezier(${bv.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{q.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!G.current||!k)return;if(fv(document.activeElement)||U.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=G.current.getBoundingClientRect().height||0,a=o>.8*n;ee.current||(ee.current=o);const s=G.current.getBoundingClientRect().top;if(Math.abs(Z.current-r)>60&&(U.current=!U.current),i&&i.length>0&&ie&&re){r+=ie[re]||0}if(Z.current=r,o>t||U.current){const e=G.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?s:26)),G.current.style.height=g?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(G.current.style.height=`${ee.current}px`);i&&i.length>0&&!U.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[re,i,ie]),t.useEffect(()=>(R&&(mv(document.documentElement,{scrollBehavior:"auto"}),H.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let n=hv.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[R]),t.useEffect(()=>{y||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[y]),t.createElement(op,{defaultOpen:S,onOpenChange:e=>{(d||e)&&(e?$(!0):pe(!0),T(e))},open:R},t.createElement(qy.Provider,{value:{activeSnapPoint:ne,snapPoints:i,setActiveSnapPoint:oe,drawerRef:G,overlayRef:F,onOpenChange:n,onPress:function(e){var t,n;(d||i)&&(G.current&&!G.current.contains(e.target)||(Q.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=G.current)?void 0:n.getBoundingClientRect().width)||0,z(!0),W.current=new Date,Jy()&&window.addEventListener("touchend",()=>Y.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=gv(x)?e.pageY:e.pageX))},onRelease:function(e){if(!I||!G.current)return;G.current.classList.remove(xv),Y.current=!1,z(!1),V.current=new Date;const t=yv(G.current,x);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===W.current)return;const n=V.current.getTime()-W.current.getTime(),r=K.current-(gv(x)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(B(!0),setTimeout(()=>{B(!1)},200)),i){return ae({draggedDistance:r*("bottom"===x||"right"===x?1:-1),closeDrawer:pe,velocity:o,dismissible:d}),void(null==a||a(e,!0))}if("bottom"===x||"right"===x?r>0:r<0)return he(),void(null==a||a(e,!0));if(o>.4)return pe(),void(null==a||a(e,!1));var s;const l=Math.min(null!=(s=G.current.getBoundingClientRect().height)?s:0,window.innerHeight);var u;const f=Math.min(null!=(u=G.current.getBoundingClientRect().width)?u:0,window.innerWidth),p="left"===x||"right"===x;if(Math.abs(t)>=(p?f:l)*c)return pe(),void(null==a||a(e,!1));null==a||a(e,!0),he()},onDrag:function(e){var t;if(G.current&&I){const n="bottom"===x||"right"===x?1:-1,r=(K.current-(gv(x)?e.pageY:e.pageX))*n,a=r>0,l=i&&!d&&!a;if(l&&0===re)return;const c=Math.abs(r),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===x||"top"===x?Q.current:J.current);const h=ce(c,a);if(null!==h&&(f=h),l&&f>=1)return;if(!Y.current&&!fe(e.target,a))return;if(G.current.classList.add(xv),Y.current=!0,mv(G.current,{transition:"none"}),mv(F.current,{transition:"none"}),i&&se({draggedDistance:r}),a&&!i){const e=(t=r,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*n;return void mv(G.current,{transform:gv(x)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const m=1-f;if((le||p&&re===p-1)&&(null==o||o(e,f),mv(F.current,{opacity:`${m}`,transition:"none"},!0)),u&&F.current&&s){const e=Math.min(de()+f*(1-de()),1),t=8-8*f,n=Math.max(0,14-14*f);mv(u,{borderRadius:`${t}px`,transform:gv(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=c*n;mv(G.current,{transform:gv(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:d,shouldAnimate:q,handleOnly:f,isOpen:R,isDragging:I,shouldFade:le,closeDrawer:pe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-wv)/window.innerWidth,r=n+t*(1-n),o=t*wv-16;mv(G.current,{transform:gv(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-wv)/window.innerWidth:1,n=e?-16:0;X.current&&window.clearTimeout(X.current),mv(G.current,{transition:`transform ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`,transform:gv(x)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&G.current&&(X.current=setTimeout(()=>{const e=yv(G.current,x);mv(G.current,{transition:"none",transform:gv(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const n=gv(x)?window.innerHeight:window.innerWidth,r=t?(n-wv)/n:1,o=t?-16:0;t&&mv(G.current,{transition:`transform ${bv.DURATION}s cubic-bezier(${bv.EASE.join(",")})`,transform:gv(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:U,modal:y,snapPointsOffset:ie,activeSnapPointIndex:re,direction:x,shouldScaleBackground:s,setBackgroundColorOnScale:l,noBodyStyles:w,container:M,autoFocus:P}},r))}const kv=t.forwardRef(function({...e},n){const{overlayRef:r,snapPoints:o,onRelease:a,shouldFade:i,isOpen:s,modal:l,shouldAnimate:c}=Zy(),u=pv(n,r),d=o&&o.length>0;if(!l)return null;const f=t.useCallback(e=>a(e),[a]);return t.createElement(sp,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&d?"true":"false","data-vaul-snap-points-overlay":s&&i?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});kv.displayName="Drawer.Overlay";const Nv=t.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:r,...a},i){const{drawerRef:s,onPress:l,onRelease:c,onDrag:u,keyboardIsOpen:d,snapPointsOffset:f,activeSnapPointIndex:p,modal:h,isOpen:m,direction:g,snapPoints:y,container:v,handleOnly:b,shouldAnimate:w,autoFocus:x}=Zy(),[S,E]=t.useState(!1),_=pv(i,s),C=t.useRef(null),k=t.useRef(null),N=t.useRef(!1),M=y&&y.length>0;!function(){const{direction:e,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:a,noBodyStyles:i}=Zy(),s=t.useRef(null),l=o(()=>document.body.style.backgroundColor,[]);function c(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(n&&r){s.current&&clearTimeout(s.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;a&&!i&&vv(document.body,{background:"black"}),vv(t,{transformOrigin:gv(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${bv.DURATION}s`,transitionTimingFunction:`cubic-bezier(${bv.EASE.join(",")})`});const n=vv(t,{borderRadius:"8px",overflow:"hidden",...gv(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),s.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},1e3*bv.DURATION)}}},[n,r,l])}();function P(e){C.current=null,N.current=!1,c(e)}return t.useEffect(()=>{M&&window.requestAnimationFrame(()=>{E(!0)})},[]),t.createElement(lp,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":m&&M?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...a,ref:_,style:f&&f.length>0?{"--snap-point-height":`${f[null!=p?p:0]}px`,...n}:n,onPointerDown:e=>{b||(null==a.onPointerDown||a.onPointerDown.call(a,e),C.current={x:e.pageX,y:e.pageY},l(e))},onOpenAutoFocus:e=>{null==r||r(e),x||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),h&&!t.defaultPrevented?d.current&&(d.current=!1):t.preventDefault()},onFocusOutside:e=>{h||e.preventDefault()},onPointerMove:e=>{if(k.current=e,b)return;if(null==a.onPointerMove||a.onPointerMove.call(a,e),!C.current)return;const t=e.pageY-C.current.y,n=e.pageX-C.current.x,r="touch"===e.pointerType?10:2,o=((e,t,n=0)=>{if(N.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return N.current=!0,!0})({x:n,y:t},g,r);o?u(e):(Math.abs(n)>r||Math.abs(t)>r)&&(C.current=null)},onPointerUp:e=>{null==a.onPointerUp||a.onPointerUp.call(a,e),C.current=null,N.current=!1,c(e)},onPointerOut:e=>{null==a.onPointerOut||a.onPointerOut.call(a,e),P(k.current)},onContextMenu:e=>{null==a.onContextMenu||a.onContextMenu.call(a,e),k.current&&P(k.current)}})});Nv.displayName="Drawer.Content";const Mv=t.forwardRef(function({preventCycle:e=!1,children:n,...r},o){const{closeDrawer:a,isDragging:i,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:h}=Zy(),m=t.useRef(null),g=t.useRef(!1);function y(){m.current&&window.clearTimeout(m.current),g.current=!1}return t.createElement("div",{onClick:function(){g.current?y():window.setTimeout(()=>{!function(){if(i||e||g.current)return void y();if(y(),!s||0===s.length)return void(u||a());if(l===s[s.length-1]&&u)return void a();const t=s.findIndex(e=>e===l);if(-1===t)return;const n=s[t+1];c(n)}()},120)},onPointerCancel:y,onPointerDown:e=>{d&&p(e),m.current=window.setTimeout(()=>{g.current=!0},250)},onPointerMove:e=>{d&&h(e)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});Mv.displayName="Drawer.Handle";const Pv={Root:Cv,NestedRoot:function({onDrag:e,onOpenChange:n,open:r,...o}){const{onNestedDrag:a,onNestedOpenChange:i,onNestedRelease:s}=Zy();if(!a)throw new Error("Drawer.NestedRoot must be placed in another drawer");return t.createElement(Cv,{nested:!0,open:r,onClose:()=>{i(!1)},onDrag:(t,n)=>{a(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&i(e),null==n||n(e)},onRelease:s,...o})},Content:Nv,Overlay:kv,Trigger:ap,Portal:function(e){const n=Zy(),{container:r=n.container,...o}=e;return t.createElement(ip,{container:r,...o})},Handle:Mv,Close:dp,Title:cp,Description:up},Ov=({shouldScaleBackground:t=!0,...n})=>e.createElement(Pv.Root,{shouldScaleBackground:t,...n});Ov.displayName="Drawer";const Av=Pv.Portal,Rv=e.forwardRef(({className:t,...n},r)=>e.createElement(Pv.Overlay,{ref:r,style:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:50,backgroundColor:"rgba(0, 0, 0, 0.8)"},className:t,...n}));Rv.displayName=Pv.Overlay.displayName;const Tv=e.forwardRef(({className:t,children:n,...r},o)=>e.createElement(Av,null,e.createElement(Rv,null),e.createElement(Pv.Content,{ref:o,style:{position:"fixed",left:0,right:0,top:0,zIndex:50,marginTop:"96px",display:"flex",height:"auto",flexDirection:"column",borderTopLeftRadius:"10px",borderTopRightRadius:"10px",border:"1px solid hsl(var(--border))",backgroundColor:"hsl(var(--background))"},className:t,...r},e.createElement("div",{style:{margin:"16px auto 0",height:"8px",width:"100px",borderRadius:"9999px",backgroundColor:"hsl(var(--muted))"}}),n)));Tv.displayName="DrawerContent";e.forwardRef(({className:t,...n},r)=>e.createElement(Pv.Title,{ref:r,style:{fontSize:"18px",fontWeight:600,lineHeight:1,letterSpacing:"-0.025em"},className:t,...n})).displayName=Pv.Title.displayName;e.forwardRef(({className:t,...n},r)=>e.createElement(Pv.Description,{ref:r,style:{fontSize:"14px",color:"hsl(var(--muted-foreground))"},className:t,...n})).displayName=Pv.Description.displayName;const Dv=n(void 0),$v=({children:e,theme:n=Is})=>{const[r,o]=t.useState(n),a=t.useMemo(()=>({theme:r,setTheme:o}),[r]);return t.createElement(Dv.Provider,{value:a},t.createElement(wc,{theme:r},e))},Iv=()=>{const e=c(Dv);if(void 0===e)throw new Error("useTheme must be used within a ThemeProvider");return e},zv=()=>{const{theme:e}=Iv();return e},Lv=()=>t.createElement(Nc,{styles:Mc`
|
|
504
|
+
`,Gy=e.forwardRef(({className:t,...n},r)=>e.createElement(Uy,{ref:r,...n},e.createElement(qy,null,e.createElement(Zy,null))));Gy.displayName=Fy.displayName;const Qy=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Jy=()=>{const e=t.useContext(Qy);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function ev(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function tv(){return rv(/^iPad/)||rv(/^Mac/)&&navigator.maxTouchPoints>1}function nv(){return rv(/^iPhone/)||tv()}function rv(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const ov="undefined"!=typeof window?f:i;function av(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const iv="undefined"!=typeof document&&window.visualViewport;function sv(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function lv(e){for(sv(e)&&(e=e.parentElement);e&&!sv(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const cv=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let uv,dv=0;function fv(e={}){let{isDisabled:t}=e;ov(()=>{if(!t)return dv++,1===dv&&nv()&&(uv=function(){let e,t=0,n=n=>{e=lv(n.target),e===document.documentElement&&e===document.body||(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)},o=e=>{let t=e.target;mv(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},a=e=>{let t=e.target;mv(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",iv&&(iv.height<window.innerHeight?requestAnimationFrame(()=>{hv(t)}):iv.addEventListener("resize",()=>hv(t),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=av(function(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=av(pv(document,"touchstart",n,{passive:!1,capture:!0}),pv(document,"touchmove",r,{passive:!1,capture:!0}),pv(document,"touchend",o,{passive:!1,capture:!0}),pv(document,"focus",a,!0),pv(window,"scroll",i));return()=>{c(),u(),window.scrollTo(s,l)}}()),()=>{dv--,0===dv&&(null==uv||uv())}},[t])}function pv(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function hv(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=lv(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function mv(e){return e instanceof HTMLInputElement&&!cv.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function gv(...t){return e.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...t),t)}const yv=new WeakMap;function vv(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)}),n||yv.set(e,r)}const bv=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function wv(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[bv(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[bv(t)?5:4]):null)}function xv(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}const Sv={DURATION:.5,EASE:[.32,.72,0,1]},Ev=16,_v="vaul-dragging";function Cv(e){const n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>null==n.current?void 0:n.current.call(n,...e),[])}function kv({prop:e,defaultProp:n,onChange:r=()=>{}}){const[o,a]=function({defaultProp:e,onChange:n}){const r=t.useState(e),[o]=r,a=t.useRef(o),i=Cv(n);return t.useEffect(()=>{a.current!==o&&(i(o),a.current=o)},[o,a,i]),r}({defaultProp:n,onChange:r}),i=void 0!==e,s=i?e:o,l=Cv(r),c=t.useCallback(t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else a(t)},[i,e,a,l]);return[s,c]}let Nv=null;function Mv({open:e,onOpenChange:n,children:r,onDrag:o,onRelease:a,snapPoints:i,shouldScaleBackground:s=!1,setBackgroundColorOnScale:l=!0,closeThreshold:c=.25,scrollLockTimeout:u=100,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=i&&i.length-1,activeSnapPoint:h,setActiveSnapPoint:m,fixed:g,modal:y=!0,onClose:v,nested:b,noBodyStyles:w=!1,direction:x="bottom",defaultOpen:S=!1,disablePreventScroll:E=!0,snapToSequentialPoint:_=!1,preventScrollRestoration:C=!1,repositionInputs:k=!0,onAnimationEnd:N,container:M,autoFocus:P=!1}){var O,A;const[R=!1,T]=kv({defaultProp:S,prop:e,onChange:e=>{null==n||n(e),e||b||ue(),setTimeout(()=>{null==N||N(e)},1e3*Sv.DURATION),e&&!y&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[D,$]=t.useState(!1),[I,z]=t.useState(!1),[L,B]=t.useState(!1),F=t.useRef(null),H=t.useRef(null),W=t.useRef(null),V=t.useRef(null),j=t.useRef(null),Y=t.useRef(!1),X=t.useRef(null),K=t.useRef(0),U=t.useRef(!1),q=t.useRef(!S),Z=t.useRef(0),G=t.useRef(null),Q=t.useRef((null==(O=G.current)?void 0:O.getBoundingClientRect().height)||0),J=t.useRef((null==(A=G.current)?void 0:A.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback(e=>{i&&e===ie.length-1&&(H.current=new Date)},[]),{activeSnapPoint:ne,activeSnapPointIndex:re,setActiveSnapPoint:oe,onRelease:ae,snapPointsOffset:ie,onDrag:se,shouldFade:le,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:r,drawerRef:o,overlayRef:a,fadeFromIndex:i,onSnapPointChange:s,direction:l="bottom",container:c,snapToSequentialPoint:u}){const[d,f]=kv({prop:e,defaultProp:null==r?void 0:r[0],onChange:n}),[p,h]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const m=t.useMemo(()=>d===(null==r?void 0:r[r.length-1])||null,[r,d]),g=t.useMemo(()=>{var e;return null!=(e=null==r?void 0:r.findIndex(e=>e===d))?e:null},[r,d]),y=r&&r.length>0&&(i||0===i)&&!Number.isNaN(i)&&r[i]===d||!r,v=t.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==r?void 0:r.map(t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),bv(l)){const o=n?r:p?t*e.height:0;return p?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:p?t*e.width:0;return p?"right"===l?e.width-o:-e.width+o:o}))?t:[]},[r,p,c]),b=t.useMemo(()=>null!==g?null==v?void 0:v[g]:null,[v,g]),w=t.useCallback(e=>{var t;const n=null!=(t=null==v?void 0:v.findIndex(t=>t===e))?t:null;s(n),vv(o.current,{transition:`transform ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`,transform:bv(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),v&&n!==v.length-1&&void 0!==i&&n!==i&&n<i?vv(a.current,{transition:`opacity ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`,opacity:"0"}):vv(a.current,{transition:`opacity ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`,opacity:"1"}),f(null==r?void 0:r[Math.max(n,0)])},[o.current,r,v,i,a,f]);return t.useEffect(()=>{if(d||e){var t;const n=null!=(t=null==r?void 0:r.findIndex(t=>t===e||t===d))?t:-1;v&&-1!==n&&"number"==typeof v[n]&&w(v[n])}},[d,e,r,v,w]),{isLastSnapPoint:m,activeSnapPoint:d,shouldFade:y,getPercentageDragged:function(e,t){if(!r||"number"!=typeof g||!v||void 0===i)return null;const n=g===i-1;if(g>=i&&t)return 0;if(n&&!t)return 1;if(!y&&!n)return null;const o=n?g+1:g-1,a=n?v[o]-v[o-1]:v[o+1]-v[o],s=e/Math.abs(a);return n?1-s:s},setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:o}){if(void 0===i)return;const s="bottom"===l||"right"===l?(null!=b?b:0)-e:(null!=b?b:0)+e,c=0===g,d=e>0;if(g===i-1&&vv(a.current,{transition:`opacity ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`}),!u&&n>2&&!d)return void(o?t():w(v[0]));if(!u&&n>2&&d&&v&&r)return void w(v[r.length-1]);const f=null==v?void 0:v.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),p=bv(l)?window.innerHeight:window.innerWidth;if(n>.4&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m&&r)return void w(v[r.length-1]);if(c&&e<0&&o&&t(),null===g)return;return void w(v[g+e])}w(f)},onDrag:function({draggedDistance:e}){if(null===b)return;const t="bottom"===l||"right"===l?b-e:b+e;("bottom"===l||"right"===l)&&t<v[v.length-1]||("top"===l||"left"===l)&&t>v[v.length-1]||vv(o.current,{transform:bv(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:v}}({snapPoints:i,activeSnapPointProp:h,setActiveSnapPointProp:m,drawerRef:G,fadeFromIndex:p,overlayRef:F,onSnapPointChange:te,direction:x,container:M,snapToSequentialPoint:_});fv({isDisabled:!R||I||!y||L||!D||!k||!E});const{restorePositionSetting:ue}=function({isOpen:e,modal:n,nested:r,hasBeenOpened:o,preventScrollRestoration:a,noBodyStyles:i}){const[s,l]=t.useState(()=>"undefined"!=typeof window?window.location.href:""),c=t.useRef(0),u=t.useCallback(()=>{if(ev()&&null===Nv&&e&&!i){Nv={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}),300)}},[e]),d=t.useCallback(()=>{if(ev()&&null!==Nv&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Nv),window.requestAnimationFrame(()=>{a&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)}),Nv=null}},[s]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(n)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||d())}},[n,d]),t.useEffect(()=>{!r&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),n||window.setTimeout(()=>{d()},500)):d())},[e,o,s,n,r,u,d]),{restorePositionSetting:d}}({isOpen:R,modal:y,nested:null!=b&&b,hasBeenOpened:D,preventScrollRestoration:C,noBodyStyles:w});function de(){return(window.innerWidth-26)/window.innerWidth}function fe(e,t){var n;let r=e;const o=null==(n=window.getSelection())?void 0:n.toString(),a=G.current?wv(G.current,x):null,i=new Date;if("SELECT"===r.tagName)return!1;if(r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===x||"left"===x)return!0;if(H.current&&i.getTime()-H.current.getTime()<500)return!1;if(null!==a&&("bottom"===x?a>0:a<0))return!0;if(o&&o.length>0)return!1;if(j.current&&i.getTime()-j.current.getTime()<u&&0===a)return j.current=i,!1;if(t)return j.current=i,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return j.current=new Date,!1;if("dialog"===r.getAttribute("role"))return!0}r=r.parentNode}return!0}function pe(e){!function(){if(!I||!G.current)return;G.current.classList.remove(_v),Y.current=!1,z(!1),V.current=new Date}(),null==v||v(),e||T(!1),setTimeout(()=>{i&&oe(i[0])},1e3*Sv.DURATION)}function he(){if(!G.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=wv(G.current,x);vv(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`}),vv(F.current,{transition:`opacity ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`,opacity:"1"}),s&&t&&t>0&&R&&vv(e,{borderRadius:"8px",overflow:"hidden",...bv(x)?{transform:`scale(${de()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${de()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Sv.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Sv.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{q.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!G.current||!k)return;if(mv(document.activeElement)||U.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=G.current.getBoundingClientRect().height||0,a=o>.8*n;ee.current||(ee.current=o);const s=G.current.getBoundingClientRect().top;if(Math.abs(Z.current-r)>60&&(U.current=!U.current),i&&i.length>0&&ie&&re){r+=ie[re]||0}if(Z.current=r,o>t||U.current){const e=G.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?s:26)),G.current.style.height=g?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(G.current.style.height=`${ee.current}px`);i&&i.length>0&&!U.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[re,i,ie]),t.useEffect(()=>(R&&(vv(document.documentElement,{scrollBehavior:"auto"}),H.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let n=yv.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[R]),t.useEffect(()=>{y||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[y]),t.createElement(sp,{defaultOpen:S,onOpenChange:e=>{(d||e)&&(e?$(!0):pe(!0),T(e))},open:R},t.createElement(Qy.Provider,{value:{activeSnapPoint:ne,snapPoints:i,setActiveSnapPoint:oe,drawerRef:G,overlayRef:F,onOpenChange:n,onPress:function(e){var t,n;(d||i)&&(G.current&&!G.current.contains(e.target)||(Q.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=G.current)?void 0:n.getBoundingClientRect().width)||0,z(!0),W.current=new Date,nv()&&window.addEventListener("touchend",()=>Y.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=bv(x)?e.pageY:e.pageX))},onRelease:function(e){if(!I||!G.current)return;G.current.classList.remove(_v),Y.current=!1,z(!1),V.current=new Date;const t=wv(G.current,x);if(!e||!fe(e.target,!1)||!t||Number.isNaN(t))return;if(null===W.current)return;const n=V.current.getTime()-W.current.getTime(),r=K.current-(bv(x)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(B(!0),setTimeout(()=>{B(!1)},200)),i){return ae({draggedDistance:r*("bottom"===x||"right"===x?1:-1),closeDrawer:pe,velocity:o,dismissible:d}),void(null==a||a(e,!0))}if("bottom"===x||"right"===x?r>0:r<0)return he(),void(null==a||a(e,!0));if(o>.4)return pe(),void(null==a||a(e,!1));var s;const l=Math.min(null!=(s=G.current.getBoundingClientRect().height)?s:0,window.innerHeight);var u;const f=Math.min(null!=(u=G.current.getBoundingClientRect().width)?u:0,window.innerWidth),p="left"===x||"right"===x;if(Math.abs(t)>=(p?f:l)*c)return pe(),void(null==a||a(e,!1));null==a||a(e,!0),he()},onDrag:function(e){var t;if(G.current&&I){const n="bottom"===x||"right"===x?1:-1,r=(K.current-(bv(x)?e.pageY:e.pageX))*n,a=r>0,l=i&&!d&&!a;if(l&&0===re)return;const c=Math.abs(r),u=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===x||"top"===x?Q.current:J.current);const h=ce(c,a);if(null!==h&&(f=h),l&&f>=1)return;if(!Y.current&&!fe(e.target,a))return;if(G.current.classList.add(_v),Y.current=!0,vv(G.current,{transition:"none"}),vv(F.current,{transition:"none"}),i&&se({draggedDistance:r}),a&&!i){const e=(t=r,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*n;return void vv(G.current,{transform:bv(x)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const m=1-f;if((le||p&&re===p-1)&&(null==o||o(e,f),vv(F.current,{opacity:`${m}`,transition:"none"},!0)),u&&F.current&&s){const e=Math.min(de()+f*(1-de()),1),t=8-8*f,n=Math.max(0,14-14*f);vv(u,{borderRadius:`${t}px`,transform:bv(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=c*n;vv(G.current,{transform:bv(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:d,shouldAnimate:q,handleOnly:f,isOpen:R,isDragging:I,shouldFade:le,closeDrawer:pe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-Ev)/window.innerWidth,r=n+t*(1-n),o=t*Ev-16;vv(G.current,{transform:bv(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-Ev)/window.innerWidth:1,n=e?-16:0;X.current&&window.clearTimeout(X.current),vv(G.current,{transition:`transform ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`,transform:bv(x)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&G.current&&(X.current=setTimeout(()=>{const e=wv(G.current,x);vv(G.current,{transition:"none",transform:bv(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const n=bv(x)?window.innerHeight:window.innerWidth,r=t?(n-Ev)/n:1,o=t?-16:0;t&&vv(G.current,{transition:`transform ${Sv.DURATION}s cubic-bezier(${Sv.EASE.join(",")})`,transform:bv(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:U,modal:y,snapPointsOffset:ie,activeSnapPointIndex:re,direction:x,shouldScaleBackground:s,setBackgroundColorOnScale:l,noBodyStyles:w,container:M,autoFocus:P}},r))}const Pv=t.forwardRef(function({...e},n){const{overlayRef:r,snapPoints:o,onRelease:a,shouldFade:i,isOpen:s,modal:l,shouldAnimate:c}=Jy(),u=gv(n,r),d=o&&o.length>0;if(!l)return null;const f=t.useCallback(e=>a(e),[a]);return t.createElement(up,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&d?"true":"false","data-vaul-snap-points-overlay":s&&i?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});Pv.displayName="Drawer.Overlay";const Ov=t.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:r,...a},i){const{drawerRef:s,onPress:l,onRelease:c,onDrag:u,keyboardIsOpen:d,snapPointsOffset:f,activeSnapPointIndex:p,modal:h,isOpen:m,direction:g,snapPoints:y,container:v,handleOnly:b,shouldAnimate:w,autoFocus:x}=Jy(),[S,E]=t.useState(!1),_=gv(i,s),C=t.useRef(null),k=t.useRef(null),N=t.useRef(!1),M=y&&y.length>0;!function(){const{direction:e,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:a,noBodyStyles:i}=Jy(),s=t.useRef(null),l=o(()=>document.body.style.backgroundColor,[]);function c(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(n&&r){s.current&&clearTimeout(s.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;a&&!i&&xv(document.body,{background:"black"}),xv(t,{transformOrigin:bv(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Sv.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Sv.EASE.join(",")})`});const n=xv(t,{borderRadius:"8px",overflow:"hidden",...bv(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),s.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},1e3*Sv.DURATION)}}},[n,r,l])}();function P(e){C.current=null,N.current=!1,c(e)}return t.useEffect(()=>{M&&window.requestAnimationFrame(()=>{E(!0)})},[]),t.createElement(dp,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":m&&M?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":(null==w?void 0:w.current)?"true":"false",...a,ref:_,style:f&&f.length>0?{"--snap-point-height":`${f[null!=p?p:0]}px`,...n}:n,onPointerDown:e=>{b||(null==a.onPointerDown||a.onPointerDown.call(a,e),C.current={x:e.pageX,y:e.pageY},l(e))},onOpenAutoFocus:e=>{null==r||r(e),x||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),h&&!t.defaultPrevented?d.current&&(d.current=!1):t.preventDefault()},onFocusOutside:e=>{h||e.preventDefault()},onPointerMove:e=>{if(k.current=e,b)return;if(null==a.onPointerMove||a.onPointerMove.call(a,e),!C.current)return;const t=e.pageY-C.current.y,n=e.pageX-C.current.x,r="touch"===e.pointerType?10:2,o=((e,t,n=0)=>{if(N.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return N.current=!0,!0})({x:n,y:t},g,r);o?u(e):(Math.abs(n)>r||Math.abs(t)>r)&&(C.current=null)},onPointerUp:e=>{null==a.onPointerUp||a.onPointerUp.call(a,e),C.current=null,N.current=!1,c(e)},onPointerOut:e=>{null==a.onPointerOut||a.onPointerOut.call(a,e),P(k.current)},onContextMenu:e=>{null==a.onContextMenu||a.onContextMenu.call(a,e),k.current&&P(k.current)}})});Ov.displayName="Drawer.Content";const Av=t.forwardRef(function({preventCycle:e=!1,children:n,...r},o){const{closeDrawer:a,isDragging:i,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:f,onPress:p,onDrag:h}=Jy(),m=t.useRef(null),g=t.useRef(!1);function y(){m.current&&window.clearTimeout(m.current),g.current=!1}return t.createElement("div",{onClick:function(){g.current?y():window.setTimeout(()=>{!function(){if(i||e||g.current)return void y();if(y(),!s||0===s.length)return void(u||a());if(l===s[s.length-1]&&u)return void a();const t=s.findIndex(e=>e===l);if(-1===t)return;const n=s[t+1];c(n)}()},120)},onPointerCancel:y,onPointerDown:e=>{d&&p(e),m.current=window.setTimeout(()=>{g.current=!0},250)},onPointerMove:e=>{d&&h(e)},ref:o,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});Av.displayName="Drawer.Handle";const Rv={Root:Mv,NestedRoot:function({onDrag:e,onOpenChange:n,open:r,...o}){const{onNestedDrag:a,onNestedOpenChange:i,onNestedRelease:s}=Jy();if(!a)throw new Error("Drawer.NestedRoot must be placed in another drawer");return t.createElement(Mv,{nested:!0,open:r,onClose:()=>{i(!1)},onDrag:(t,n)=>{a(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&i(e),null==n||n(e)},onRelease:s,...o})},Content:Ov,Overlay:Pv,Trigger:lp,Portal:function(e){const n=Jy(),{container:r=n.container,...o}=e;return t.createElement(cp,{container:r,...o})},Handle:Av,Close:hp,Title:fp,Description:pp},Tv=({shouldScaleBackground:t=!0,...n})=>e.createElement(Rv.Root,{shouldScaleBackground:t,...n});Tv.displayName="Drawer";const Dv=Rv.Portal,$v=e.forwardRef(({className:t,...n},r)=>e.createElement(Rv.Overlay,{ref:r,style:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:50,backgroundColor:"rgba(0, 0, 0, 0.8)"},className:t,...n}));$v.displayName=Rv.Overlay.displayName;const Iv=e.forwardRef(({className:t,children:n,...r},o)=>e.createElement(Dv,null,e.createElement($v,null),e.createElement(Rv.Content,{ref:o,style:{position:"fixed",left:0,right:0,top:0,zIndex:50,marginTop:"96px",display:"flex",height:"auto",flexDirection:"column",borderTopLeftRadius:"10px",borderTopRightRadius:"10px",border:"1px solid hsl(var(--border))",backgroundColor:"hsl(var(--background))"},className:t,...r},e.createElement("div",{style:{margin:"16px auto 0",height:"8px",width:"100px",borderRadius:"9999px",backgroundColor:"hsl(var(--muted))"}}),n)));Iv.displayName="DrawerContent";e.forwardRef(({className:t,...n},r)=>e.createElement(Rv.Title,{ref:r,style:{fontSize:"18px",fontWeight:600,lineHeight:1,letterSpacing:"-0.025em"},className:t,...n})).displayName=Rv.Title.displayName;e.forwardRef(({className:t,...n},r)=>e.createElement(Rv.Description,{ref:r,style:{fontSize:"14px",color:"hsl(var(--muted-foreground))"},className:t,...n})).displayName=Rv.Description.displayName;const zv=()=>t.createElement(Sc,{styles:Ec`
|
|
505
505
|
* {
|
|
506
506
|
box-sizing: border-box;
|
|
507
507
|
border-color: #e5e7eb;
|
|
@@ -683,4 +683,4 @@ var _s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
683
683
|
--ring: #6366f1;
|
|
684
684
|
--radius: 0.5rem;
|
|
685
685
|
}
|
|
686
|
-
`});export{
|
|
686
|
+
`});export{Ep as AgenticFlowVisualizer,gu as AnthropicIcon,qc as Badge,Gy as Checkbox,Tv as Drawer,Ac as Edge,Ay as FileSelector,zv as GlobalStyles,mu as GoogleIcon,pu as JsonTreeViewer,vu as Node,hu as OpenAIIcon,oy as Select,mp as Sheet,Mc as ThemeProvider,Wu as Timeline,_p as Visualizer,xp as calculateAutoLayout,Fc as cn,Yc as conditionalStyle,Cc as darkTheme,kc as defaultTheme,Wc as formatCurrency,Vc as formatLatency,Kc as getColor,Xc as getSpacing,_c as lightTheme,Hc as toTitleCase,jc as truncateText,Pc as useTheme,Oc as useThemeValue};
|