sparkdesign 0.4.7 → 0.4.8
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/cli/registry/basic/alert-dialog.tsx +3 -6
- package/cli/registry/basic/button.tsx +19 -6
- package/cli/registry/basic/card.tsx +20 -8
- package/cli/registry/basic/collapsible-card.tsx +2 -4
- package/cli/registry/basic/combobox.tsx +104 -46
- package/cli/registry/basic/context-menu.tsx +2 -3
- package/cli/registry/basic/date-picker.tsx +78 -7
- package/cli/registry/basic/dialog.tsx +3 -8
- package/cli/registry/basic/drawer.tsx +3 -5
- package/cli/registry/basic/dropdown-menu.tsx +2 -3
- package/cli/registry/basic/hover-card.tsx +2 -3
- package/cli/registry/basic/icon-button.tsx +18 -11
- package/cli/registry/basic/input-group.tsx +4 -4
- package/cli/registry/basic/input.tsx +29 -13
- package/cli/registry/basic/popover.tsx +2 -3
- package/cli/registry/basic/select.tsx +24 -4
- package/cli/registry/basic/spinner.tsx +20 -5
- package/cli/registry/basic/textarea.tsx +30 -12
- package/cli/registry/basic/tooltip.tsx +2 -1
- package/cli/registry/meta.json +97 -30
- package/dist/registry/basic/alert-dialog.d.ts +1 -1
- package/dist/registry/basic/avatar.d.ts +1 -1
- package/dist/registry/basic/button.d.ts +3 -1
- package/dist/registry/basic/card.d.ts +9 -4
- package/dist/registry/basic/combobox.d.ts +20 -9
- package/dist/registry/basic/date-picker.d.ts +18 -9
- package/dist/registry/basic/dialog.d.ts +1 -1
- package/dist/registry/basic/icon-button.d.ts +2 -1
- package/dist/registry/basic/input-group.d.ts +5 -3
- package/dist/registry/basic/input.d.ts +8 -3
- package/dist/registry/basic/item.d.ts +2 -2
- package/dist/registry/basic/resizable.d.ts +48 -48
- package/dist/registry/basic/select.d.ts +7 -2
- package/dist/registry/basic/spinner.d.ts +6 -2
- package/dist/registry/basic/tag.d.ts +1 -1
- package/dist/registry/basic/textarea.d.ts +9 -3
- package/dist/registry/basic/toggle.d.ts +1 -1
- package/dist/scale/computed.css +11 -0
- package/dist/scale/config.css +11 -0
- package/dist/scale/presets/compact.css +7 -0
- package/dist/scale/presets/dense.css +7 -0
- package/dist/scale/presets/sharp.css +7 -0
- package/dist/scale/presets/soft.css +7 -0
- package/dist/spark-design.cjs.js +35 -35
- package/dist/spark-design.es.js +5151 -3767
- package/dist/sparkdesign.css +1 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/lib/index.d.ts +1 -1
- package/dist/src/lib/motion.d.ts +79 -0
- package/dist/theme-base.css +22 -0
- package/dist/themes/dark-mint.css +6 -0
- package/dist/themes/dark-parchment.css +6 -0
- package/dist/themes/light-parchment.css +6 -0
- package/dist/tokens/scale/computed.css +11 -0
- package/dist/tokens/scale/config.css +11 -0
- package/dist/tokens/scale/presets/compact.css +7 -0
- package/dist/tokens/scale/presets/dense.css +7 -0
- package/dist/tokens/scale/presets/sharp.css +7 -0
- package/dist/tokens/scale/presets/soft.css +7 -0
- package/dist/tokens/theme-base.css +22 -0
- package/dist/tokens/themes/dark-mint.css +6 -0
- package/dist/tokens/themes/dark-parchment.css +6 -0
- package/dist/tokens/themes/light-parchment.css +6 -0
- package/package.json +1 -1
package/dist/spark-design.cjs.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";var lc=Object.create;var Hs=Object.defineProperty;var cc=Object.getOwnPropertyDescriptor;var dc=Object.getOwnPropertyNames;var uc=Object.getPrototypeOf,mc=Object.prototype.hasOwnProperty;var pc=(e,a,s,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of dc(a))!mc.call(e,r)&&r!==s&&Hs(e,r,{get:()=>a[r],enumerable:!(n=cc(a,r))||n.enumerable});return e};var xc=(e,a,s)=>(s=e!=null?lc(uc(e)):{},pc(a||!e||!e.__esModule?Hs(s,"default",{value:e,enumerable:!0}):s,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),V=require("framer-motion"),fc=require("@radix-ui/react-tooltip"),Le=require("clsx"),hc=require("@radix-ui/react-dropdown-menu"),F=require("class-variance-authority"),gc=require("@radix-ui/react-alert-dialog"),yc=require("@radix-ui/react-switch"),Cn=require("react-dom"),Sn=require("sonner"),bc=require("@radix-ui/react-select"),vc=require("@radix-ui/react-dialog"),wc=require("@radix-ui/react-popover"),kc=require("@radix-ui/react-hover-card"),jc=require("@radix-ui/react-context-menu"),Nc=require("react-markdown"),Cc=require("remark-gfm"),Sc=require("remark-math"),Ic=require("rehype-katex"),Gs=require("lottie-react"),In=require("react-i18next"),Rc=require("prism-react-renderer"),zc=require("@radix-ui/react-aspect-ratio"),Tc=require("@radix-ui/react-avatar"),he=require("lucide-react"),wa=require("react-day-picker"),Lc=require("embla-carousel-react"),Mc=require("recharts"),Pc=require("@radix-ui/react-checkbox"),Ac=require("@radix-ui/react-accordion"),Dc=require("@radix-ui/react-collapsible"),Be=require("cmdk"),_c=require("@radix-ui/react-label"),Ec=require("@radix-ui/react-separator"),Rn=require("input-otp"),H=require("radix-ui"),Fc=require("@radix-ui/react-progress"),$c=require("@radix-ui/react-radio-group"),La=require("react-resizable-panels"),Oc=require("@radix-ui/react-slider"),Bc=require("@radix-ui/react-tabs"),Vc=require("@radix-ui/react-toggle"),Hc=require("@radix-ui/react-toggle-group");function se(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const y=se(u),Ze=se(fc),Z=se(hc),pe=se(gc),qs=se(yc),oe=se(bc),K=se(vc),Ke=se(wc),ct=se(kc),Y=se(jc),Gc=se(zc),tt=se(Tc),Ma=se(Mc),ka=se(Pc),dt=se(Ac),Ut=se(Dc),zn=se(_c),Tn=se(Ec),Us=se(Fc),ja=se($c),Rt=se(Oc),Ve=se(Bc),qc=se(Vc),Na=se(Hc),ut=F.cva("inline-flex items-center justify-center gap-1.5 font-medium transition-colors duration-200 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",{variants:{variant:{primary:"bg-primary text-text-on-primary hover:bg-primary-hover",secondary:"bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover",tertiary:"bg-fill-secondary text-text hover:bg-fill",outline:"border border-border-tertiary bg-bg-container text-text hover:bg-fill-secondary",ghost:"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text",text:"bg-transparent text-text-secondary hover:text-text"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-11 px-4 text-base"},rounded:{square:"rounded",pill:"rounded-full"},textOnly:{true:"h-auto px-0 py-0.5",false:""}},compoundVariants:[{textOnly:!0,size:"sm",className:"text-xs"},{textOnly:!0,size:"md",className:"text-sm"},{textOnly:!0,size:"lg",className:"text-base"}],defaultVariants:{variant:"ghost",size:"md",rounded:"square",textOnly:!1}}),W=u.forwardRef(({variant:e="ghost",children:a,size:s="md",textButton:n=!1,prefixIcon:r,suffixIcon:o,rounded:l="square",disabled:c=!1,className:d,...m},p)=>t.jsxs("button",{ref:p,className:ut({variant:n?"text":e,size:s,rounded:l,textOnly:n,className:d}),disabled:c,...m,children:[r&&t.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:r}),a,o&&t.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:o})]}));W.displayName="Button";const Uc=(e,a)=>{const s=new Array(e.length+a.length);for(let n=0;n<e.length;n++)s[n]=e[n];for(let n=0;n<a.length;n++)s[e.length+n]=a[n];return s},Qc=(e,a)=>({classGroupId:e,validator:a}),Ln=(e=new Map,a=null,s)=>({nextPart:e,validators:a,classGroupId:s}),Ft="-",Qs=[],Wc="arbitrary..",Zc=e=>{const a=Yc(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Kc(l);const c=l.split(Ft),d=c[0]===""&&c.length>1?1:0;return Mn(c,d,a)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=n[l],m=s[l];return d?m?Uc(m,d):d:m||Qs}return s[l]||Qs}}},Mn=(e,a,s)=>{if(e.length-a===0)return s.classGroupId;const r=e[a],o=s.nextPart.get(r);if(o){const m=Mn(e,a+1,o);if(m)return m}const l=s.validators;if(l===null)return;const c=a===0?e.join(Ft):e.slice(a).join(Ft),d=l.length;for(let m=0;m<d;m++){const p=l[m];if(p.validator(c))return p.classGroupId}},Kc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=e.slice(1,-1),s=a.indexOf(":"),n=a.slice(0,s);return n?Wc+n:void 0})(),Yc=e=>{const{theme:a,classGroups:s}=e;return Xc(s,a)},Xc=(e,a)=>{const s=Ln();for(const n in e){const r=e[n];Pa(r,s,n,a)}return s},Pa=(e,a,s,n)=>{const r=e.length;for(let o=0;o<r;o++){const l=e[o];Jc(l,a,s,n)}},Jc=(e,a,s,n)=>{if(typeof e=="string"){ed(e,a,s);return}if(typeof e=="function"){td(e,a,s,n);return}ad(e,a,s,n)},ed=(e,a,s)=>{const n=e===""?a:Pn(a,e);n.classGroupId=s},td=(e,a,s,n)=>{if(sd(e)){Pa(e(n),a,s,n);return}a.validators===null&&(a.validators=[]),a.validators.push(Qc(s,e))},ad=(e,a,s,n)=>{const r=Object.entries(e),o=r.length;for(let l=0;l<o;l++){const[c,d]=r[l];Pa(d,Pn(a,c),s,n)}},Pn=(e,a)=>{let s=e;const n=a.split(Ft),r=n.length;for(let o=0;o<r;o++){const l=n[o];let c=s.nextPart.get(l);c||(c=Ln(),s.nextPart.set(l,c)),s=c}return s},sd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,s=Object.create(null),n=Object.create(null);const r=(o,l)=>{s[o]=l,a++,a>e&&(a=0,n=s,s=Object.create(null))};return{get(o){let l=s[o];if(l!==void 0)return l;if((l=n[o])!==void 0)return r(o,l),l},set(o,l){o in s?s[o]=l:r(o,l)}}},Ca="!",Ws=":",rd=[],Zs=(e,a,s,n,r)=>({modifiers:e,hasImportantModifier:a,baseClassName:s,maybePostfixModifierPosition:n,isExternal:r}),od=e=>{const{prefix:a,experimentalParseClassName:s}=e;let n=r=>{const o=[];let l=0,c=0,d=0,m;const p=r.length;for(let b=0;b<p;b++){const h=r[b];if(l===0&&c===0){if(h===Ws){o.push(r.slice(d,b)),d=b+1;continue}if(h==="/"){m=b;continue}}h==="["?l++:h==="]"?l--:h==="("?c++:h===")"&&c--}const x=o.length===0?r:r.slice(d);let g=x,v=!1;x.endsWith(Ca)?(g=x.slice(0,-1),v=!0):x.startsWith(Ca)&&(g=x.slice(1),v=!0);const f=m&&m>d?m-d:void 0;return Zs(o,v,g,f)};if(a){const r=a+Ws,o=n;n=l=>l.startsWith(r)?o(l.slice(r.length)):Zs(rd,!1,l,void 0,!0)}if(s){const r=n;n=o=>s({className:o,parseClassName:r})}return n},id=e=>{const a=new Map;return e.orderSensitiveModifiers.forEach((s,n)=>{a.set(s,1e6+n)}),s=>{const n=[];let r=[];for(let o=0;o<s.length;o++){const l=s[o],c=l[0]==="[",d=a.has(l);c||d?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(l)):r.push(l)}return r.length>0&&(r.sort(),n.push(...r)),n}},ld=e=>({cache:nd(e.cacheSize),parseClassName:od(e),sortModifiers:id(e),...Zc(e)}),cd=/\s+/,dd=(e,a)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:o}=a,l=[],c=e.trim().split(cd);let d="";for(let m=c.length-1;m>=0;m-=1){const p=c[m],{isExternal:x,modifiers:g,hasImportantModifier:v,baseClassName:f,maybePostfixModifierPosition:b}=s(p);if(x){d=p+(d.length>0?" "+d:d);continue}let h=!!b,w=n(h?f.substring(0,b):f);if(!w){if(!h){d=p+(d.length>0?" "+d:d);continue}if(w=n(f),!w){d=p+(d.length>0?" "+d:d);continue}h=!1}const j=g.length===0?"":g.length===1?g[0]:o(g).join(":"),k=v?j+Ca:j,T=k+w;if(l.indexOf(T)>-1)continue;l.push(T);const S=r(w,h);for(let P=0;P<S.length;++P){const A=S[P];l.push(k+A)}d=p+(d.length>0?" "+d:d)}return d},ud=(...e)=>{let a=0,s,n,r="";for(;a<e.length;)(s=e[a++])&&(n=An(s))&&(r&&(r+=" "),r+=n);return r},An=e=>{if(typeof e=="string")return e;let a,s="";for(let n=0;n<e.length;n++)e[n]&&(a=An(e[n]))&&(s&&(s+=" "),s+=a);return s},md=(e,...a)=>{let s,n,r,o;const l=d=>{const m=a.reduce((p,x)=>x(p),e());return s=ld(m),n=s.cache.get,r=s.cache.set,o=c,c(d)},c=d=>{const m=n(d);if(m)return m;const p=dd(d,s);return r(d,p),p};return o=l,(...d)=>o(ud(...d))},pd=[],ce=e=>{const a=s=>s[e]||pd;return a.isThemeGetter=!0,a},Dn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_n=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xd=/^\d+\/\d+$/,fd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,We=e=>xd.test(e),E=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),ga=e=>e.endsWith("%")&&E(e.slice(0,-1)),Ie=e=>fd.test(e),En=()=>!0,vd=e=>hd.test(e)&&!gd.test(e),Aa=()=>!1,wd=e=>yd.test(e),kd=e=>bd.test(e),jd=e=>!R(e)&&!z(e),Nd=e=>Pe(e,On,Aa),R=e=>Dn.test(e),Ee=e=>Pe(e,Bn,vd),Ks=e=>Pe(e,Md,E),Cd=e=>Pe(e,Hn,En),Sd=e=>Pe(e,Vn,Aa),Ys=e=>Pe(e,Fn,Aa),Id=e=>Pe(e,$n,kd),zt=e=>Pe(e,Gn,wd),z=e=>_n.test(e),st=e=>He(e,Bn),Rd=e=>He(e,Vn),Xs=e=>He(e,Fn),zd=e=>He(e,On),Td=e=>He(e,$n),Tt=e=>He(e,Gn,!0),Ld=e=>He(e,Hn,!0),Pe=(e,a,s)=>{const n=Dn.exec(e);return n?n[1]?a(n[1]):s(n[2]):!1},He=(e,a,s=!1)=>{const n=_n.exec(e);return n?n[1]?a(n[1]):s:!1},Fn=e=>e==="position"||e==="percentage",$n=e=>e==="image"||e==="url",On=e=>e==="length"||e==="size"||e==="bg-size",Bn=e=>e==="length",Md=e=>e==="number",Vn=e=>e==="family-name",Hn=e=>e==="number"||e==="weight",Gn=e=>e==="shadow",Pd=()=>{const e=ce("color"),a=ce("font"),s=ce("text"),n=ce("font-weight"),r=ce("tracking"),o=ce("leading"),l=ce("breakpoint"),c=ce("container"),d=ce("spacing"),m=ce("radius"),p=ce("shadow"),x=ce("inset-shadow"),g=ce("text-shadow"),v=ce("drop-shadow"),f=ce("blur"),b=ce("perspective"),h=ce("aspect"),w=ce("ease"),j=ce("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...T(),z,R],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],I=()=>[z,R,d],_=()=>[We,"full","auto",...I()],ne=()=>[Te,"none","subgrid",z,R],D=()=>["auto",{span:["full",Te,z,R]},Te,z,R],q=()=>[Te,"auto",z,R],ie=()=>["auto","min","max","fr",z,R],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],ae=()=>["auto",...I()],le=()=>[We,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],C=()=>[e,z,R],O=()=>[...T(),Xs,Ys,{position:[z,R]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",zd,Nd,{size:[z,R]}],U=()=>[ga,st,Ee],Q=()=>["","none","full",m,z,R],me=()=>["",E,st,Ee],we=()=>["solid","dashed","dotted","double"],Ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[E,ga,Xs,Ys],Qe=()=>["","none",f,z,R],Re=()=>["none",E,z,R],ze=()=>["none",E,z,R],L=()=>[E,z,R],M=()=>[We,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[En],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[jd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",E],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",We,R,z,h]}],container:["container"],columns:[{columns:[E,R,z,c]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",z,R]}],basis:[{basis:[We,"full","auto",c,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[E,We,"auto","initial","none",R]}],grow:[{grow:["",E,z,R]}],shrink:[{shrink:["",E,z,R]}],order:[{order:[Te,"first","last","none",z,R]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:ae()}],mx:[{mx:ae()}],my:[{my:ae()}],ms:[{ms:ae()}],me:[{me:ae()}],mt:[{mt:ae()}],mr:[{mr:ae()}],mb:[{mb:ae()}],ml:[{ml:ae()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh",...le()]}],"font-size":[{text:["base",s,st,Ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ld,Cd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ga,R]}],"font-family":[{font:[Rd,Sd,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,z,R]}],"line-clamp":[{"line-clamp":[E,"none",z,Ks]}],leading:[{leading:[o,...I()]}],"list-image":[{"list-image":["none",z,R]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",z,R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[E,"from-font","auto",z,Ee]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[E,"auto",z,R]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z,R]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z,R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,z,R],radial:["",z,R],conic:[Te,z,R]},Td,Id]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[E,z,R]}],"outline-w":[{outline:["",E,st,Ee]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",p,Tt,zt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",x,Tt,zt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[E,Ee]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",g,Tt,zt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[E,z,R]}],"mix-blend":[{"mix-blend":[...Ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[E]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[E]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",z,R]}],filter:[{filter:["","none",z,R]}],blur:[{blur:Qe()}],brightness:[{brightness:[E,z,R]}],contrast:[{contrast:[E,z,R]}],"drop-shadow":[{"drop-shadow":["","none",v,Tt,zt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",E,z,R]}],"hue-rotate":[{"hue-rotate":[E,z,R]}],invert:[{invert:["",E,z,R]}],saturate:[{saturate:[E,z,R]}],sepia:[{sepia:["",E,z,R]}],"backdrop-filter":[{"backdrop-filter":["","none",z,R]}],"backdrop-blur":[{"backdrop-blur":Qe()}],"backdrop-brightness":[{"backdrop-brightness":[E,z,R]}],"backdrop-contrast":[{"backdrop-contrast":[E,z,R]}],"backdrop-grayscale":[{"backdrop-grayscale":["",E,z,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E,z,R]}],"backdrop-invert":[{"backdrop-invert":["",E,z,R]}],"backdrop-opacity":[{"backdrop-opacity":[E,z,R]}],"backdrop-saturate":[{"backdrop-saturate":[E,z,R]}],"backdrop-sepia":[{"backdrop-sepia":["",E,z,R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",z,R]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[E,"initial",z,R]}],ease:[{ease:["linear","initial",w,z,R]}],delay:[{delay:[E,z,R]}],animate:[{animate:["none",j,z,R]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,z,R]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:ze()}],"scale-x":[{"scale-x":ze()}],"scale-y":[{"scale-y":ze()}],"scale-z":[{"scale-z":ze()}],"scale-3d":["scale-3d"],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[z,R,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:M()}],"translate-x":[{"translate-x":M()}],"translate-y":[{"translate-y":M()}],"translate-z":[{"translate-z":M()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z,R]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z,R]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[E,st,Ee,Ks]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ad=md(Pd);function i(...e){return Ad(Le.clsx(e))}const qn=F.cva("inline-flex isolate [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",{variants:{orientation:{horizontal:"flex-row items-stretch [&>*:not(:first-child)]:-ml-px [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}}),Un=y.forwardRef(({className:e,orientation:a="horizontal",...s},n)=>t.jsx("div",{ref:n,role:"group","data-orientation":a??"horizontal",className:i(qn({orientation:a}),e),...s}));Un.displayName="ButtonGroup";const Qn=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("inline-flex h-9 shrink-0 items-center gap-1.5 rounded bg-fill-secondary px-3 text-sm font-medium text-text select-none","[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a}));Qn.displayName="ButtonGroupText";const Wn=y.forwardRef(({className:e,orientation:a="vertical",...s},n)=>t.jsx("div",{ref:n,role:"separator","aria-orientation":a,"data-orientation":a,className:i("shrink-0 self-stretch bg-border-tertiary",a==="vertical"?"w-px":"h-px w-full",e),...s}));Wn.displayName="ButtonGroupSeparator";const Dd=F.cva("flex-none shrink-0 inline-flex items-center justify-center box-border transition-colors duration-200 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer [&>*]:flex [&>*]:items-center [&>*]:justify-center [&>*]:size-full [&>*]:[&>svg]:block [&>*]:[&>svg]:leading-none",{variants:{variant:{primary:"bg-primary text-text-on-primary hover:bg-primary-hover",secondary:"bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover",tertiary:"bg-fill-secondary text-text hover:bg-fill",ghost:"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text",iconOnly:"bg-transparent text-text-secondary hover:text-text"},rounded:{square:"rounded",pill:"rounded-full"},size:{sm:"h-7 w-7 min-h-7 min-w-7 p-1.5",md:"h-9 w-9 min-h-9 min-w-9 p-1.5",lg:"h-11 w-11 min-h-11 min-w-11 p-2"}},defaultVariants:{variant:"secondary",size:"md",rounded:"square"}}),Ne=u.forwardRef(({variant:e="secondary",size:a="md",rounded:s="square",icon:n,disabled:r=!1,className:o,...l},c)=>t.jsx("button",{ref:c,className:i(Dd({variant:e,size:a,rounded:s}),o),disabled:r,...l,children:t.jsx("span",{className:"inline-flex shrink-0 size-full items-center justify-center",children:n})}));Ne.displayName="IconButton";function ge(){if(typeof document>"u")return{};const e=document.documentElement,a={},s=e.getAttribute("data-theme"),n=e.getAttribute("data-style");return s&&(a["data-theme"]=s),n&&(a["data-style"]=n),a}const _d=Ze.Provider,Ed=Ze.Root,Fd=Ze.Trigger,Zn=y.forwardRef(({className:e,sideOffset:a=8,children:s,dataStyle:n,dataTheme:r,...o},l)=>{const c=ge(),d=n!==void 0?{"data-style":n,"data-theme":r??c["data-theme"]??""}:c;return t.jsx(Ze.Portal,{children:t.jsx("div",{style:{display:"contents"},...d,children:t.jsx(Ze.Content,{ref:l,sideOffset:a,className:i("z-50 max-w-60 overflow-hidden rounded px-2 py-1 text-xs leading-5","bg-bg-highlight text-text-on-primary shadow-sm",e),...o,children:t.jsx(V.motion.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},children:s})})})})});Zn.displayName=Ze.Content.displayName;function Ye({content:e,children:a,side:s="top",contentClassName:n,dataStyle:r,dataTheme:o}){return t.jsx(_d,{delayDuration:300,children:t.jsxs(Ed,{children:[t.jsx(Fd,{asChild:!0,children:a}),t.jsx(Zn,{side:s,className:n,dataStyle:r,dataTheme:o,children:e})]})})}Ye.displayName="Tooltip";const Kn=u.createContext(null);function Yn(e){return typeof e=="object"&&"name"in e}function Xn(e){return typeof e=="object"&&"name"in e}function $d(e,a){return Yn(a)?`${e}-${a.name}`:a==="mint"?e:`${e}-${a}`}function Od(e){return Xn(e)?e.name:e}function Bd(e,a){const s={};if(Yn(e)){const{tokens:n}=e;for(const[r,o]of Object.entries(n))if(o!==void 0){const l=r.startsWith("--")?r:`--${r}`;s[l]=o}}if(Xn(a)){const{radius:n,spacing:r,fontSize:o}=a;n&&(n.sm&&(s["--radius-sm"]=n.sm),n.default&&(s["--radius-DEFAULT"]=n.default),n.md&&(s["--radius-md"]=n.md),n.lg&&(s["--radius-lg"]=n.lg),n.xl&&(s["--radius-xl"]=n.xl),n["2xl"]&&(s["--radius-2xl"]=n["2xl"]),n["3xl"]&&(s["--radius-3xl"]=n["3xl"])),r&&(r[3]&&(s["--spacing-3"]=r[3]),r[4]&&(s["--spacing-4"]=r[4]),r[9]&&(s["--spacing-9"]=r[9]),r[11]&&(s["--spacing-11"]=r[11])),o&&(o.sm&&(s["--font-size-sm"]=o.sm),o.lg&&(s["--font-size-lg"]=o.lg),o.xl&&(s["--font-size-xl"]=o.xl),o["2xl"]&&(s["--font-size-2xl"]=o["2xl"]),o["3xl"]&&(s["--font-size-3xl"]=o["3xl"]))}return s}function Vd({children:e,appearance:a="light",theme:s="mint",style:n="neutral"}){const r=u.useMemo(()=>$d(a,s),[a,s]),o=u.useMemo(()=>Od(n),[n]),l=u.useMemo(()=>Bd(s,n),[s,n]),c=u.useMemo(()=>({appearance:a,themeConfig:s,styleConfig:n,dataTheme:r,dataStyle:o,theme:r,style:o}),[a,s,n,r,o]),d=Object.keys(l).length>0;return t.jsx(Kn.Provider,{value:c,children:t.jsx("div",{"data-theme":r,"data-style":o,style:d?l:void 0,children:e})})}function de(){const e=u.useContext(Kn);return e||{appearance:"light",themeConfig:"mint",styleConfig:"neutral",dataTheme:"light",dataStyle:"neutral",theme:"light",style:"neutral"}}function Da({placement:e,side:a=e??"top",...s}){const{style:n,theme:r}=de();return t.jsx(Ye,{side:a,dataStyle:n,dataTheme:r,...s})}Da.displayName="Tooltip";function Js(e,a){e&&(typeof e=="function"?e(a):e.current=a)}const Jn=u.forwardRef(({children:e,lines:a=1,className:s="",placement:n="top",tooltipClassName:r="",tooltipContent:o,disabled:l=!1,style:c,as:d="span"},m)=>{const p=u.useRef(null),[x,g]=u.useState(!1),v=u.useCallback(()=>{const j=p.current;if(!j)return;const k=a===1?j.scrollWidth>j.clientWidth:j.scrollHeight>j.clientHeight;g(k)},[a]);u.useEffect(()=>{const j=requestAnimationFrame(()=>v()),k=p.current;if(!k)return()=>cancelAnimationFrame(j);const T=new ResizeObserver(()=>v());return T.observe(k),window.addEventListener("resize",v),()=>{cancelAnimationFrame(j),T.disconnect(),window.removeEventListener("resize",v)}},[v,e]);const f=a===1?{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...c}:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:a,WebkitBoxOrient:"vertical",...c},b=u.useCallback(j=>{Js(p,j),Js(m,j)},[m]),h=t.jsx(d,{ref:b,className:s,style:f,children:e});return x&&!l?t.jsx(Da,{content:o??e,placement:n,contentClassName:Le.clsx(r),children:t.jsx("span",{ref:b,className:s,style:f,children:e})}):h});Jn.displayName="EllipsisText";const Hd="flex flex-col gap-1",Gd=F.cva("w-full flex flex-col gap-0.5 items-start p-2 text-sm rounded text-left transition-colors outline-none focus-visible:bg-fill-tertiary focus-visible:ring-0",{variants:{selected:{true:"",false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:"cursor-pointer hover:bg-fill-tertiary"},dimmed:{true:"opacity-40",false:""}},defaultVariants:{selected:!1,disabled:!1,dimmed:!1}}),qd=F.cva("flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-xs font-mono font-medium transition-colors",{variants:{selected:{true:"bg-primary-active text-text-on-primary",false:"bg-fill-secondary text-text-tertiary"}},defaultVariants:{selected:!1}}),_a=u.forwardRef(({items:e,selectedIds:a=[],focusedId:s,onItemClick:n,showPrefix:r=!0,disabled:o=!1,className:l,...c},d)=>{const m=p=>String(p+1);return t.jsx("div",{ref:d,role:"listbox","aria-multiselectable":a.length>1,className:i(Hd,l),...c,children:e.map((p,x)=>{const g=a.includes(p.id),v=s===p.id,f=o||p.disabled,h=a.length>0&&!g&&!f;return t.jsxs("button",{type:"button",role:"option","aria-selected":g,"aria-disabled":f,onClick:()=>{f||n?.(p,x)},disabled:f,className:i(Gd({selected:g,disabled:f,dimmed:h}),v&&"bg-fill-tertiary"),children:[t.jsxs("div",{className:"flex items-center gap-3",children:[r&&t.jsx("div",{className:qd({selected:g}),children:m(x)}),t.jsx("span",{className:"font-medium text-text",children:p.label})]}),p.description&&t.jsx("div",{className:"ml-8 text-xs text-text-tertiary",children:p.description})]},p.id)})})});_a.displayName="OptionList";const Ud="0 0 24 24",Qd="1em";function $(e,a){const s=y.forwardRef(({className:n,size:r=Qd,...o},l)=>t.jsx("svg",{ref:l,viewBox:Ud,width:r,height:r,fill:"currentColor",className:n,xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,...o,children:t.jsx("path",{d:e})}));return s.displayName=a,s}$("M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z","ArrowDownLine");const Ea=$("M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z","ArrowUpLine"),at=$("M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z","ArrowRightLine"),Wd=$("M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z","ArrowLeftLine"),ye=$("M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z","CheckLine"),Ce=$("M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z","CloseLine"),er=$("M10.5859 12L2.79297 4.20706L4.20718 2.79285L12.0001 10.5857L19.793 2.79285L21.2072 4.20706L13.4143 12L21.2072 19.7928L19.793 21.2071L12.0001 13.4142L4.20718 21.2071L2.79297 19.7928L10.5859 12Z","CloseLargeLine"),Zd=$("M24 12L18.3431 17.6569L16.9289 16.2426L21.1716 12L16.9289 7.75736L18.3431 6.34315L24 12ZM2.82843 12L7.07107 16.2426L5.65685 17.6569L0 12L5.65685 6.34315L7.07107 7.75736L2.82843 12ZM9.78845 21H7.66009L14.2116 3H16.3399L9.78845 21Z","CodeSSlashLine"),tr=$("M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z","EyeLine"),ar=$("M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z","LoaderLine"),Kd=$("M1.946 9.315c-.946-.35-.946-1.09 0-1.436l18.108-6.732c.946-.35 1.704.21 1.573 1.236L20.1 21.894c-.117.932-.93 1.636 1.897 1.636.967 0 1.754-.704 1.636-1.636l-.527-4.18L10 12 20.073 7.264l-.527-4.18c-.117-.932.67-1.636 1.637-1.636.967 0 2.014.704 1.897 1.636L21.627 18.57c-.131 1.026-.627 1.586-1.573 1.236L1.946 9.315Z","SendPlaneLine"),Yd=$("M6 6h12v12H6V6Zm2 2v8h8V8H8Z","StopLine"),Xd=$("M12 3a3 3 0 0 1 3 3v6a3 3 0 0 1-6 0V6a3 3 0 0 1 3-3Zm0 14a5 5 0 0 0 5-5v-1a1 1 0 1 1 2 0v1a7 7 0 0 1-14 0v-1a1 1 0 1 1 2 0v1a5 5 0 0 0 5 5Z","MicLine"),sr=$("M3 3h8.828l2 2H21a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm2 2v12h14V7h-8.414l-2-2H5Z","FolderLine"),nr=$("M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2Z","FolderFillLine"),Fa=$("M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z","FileLine"),rr=$("M12 2C6.477 2 2 6.477 2 12c0 1.5.328 2.932.917 4.215L1.5 21l4.785-1.417A9.966 9.966 0 0 0 12 22c5.523 0 10-4.477 10-10S17.523 2 12 2zm0 2a8 8 0 1 1 0 16 7.99 7.99 0 0 1-3.918-1.018l-.26-.15-2.683.795.795-2.683-.15-.26A7.99 7.99 0 0 1 4 12a8 8 0 0 1 8-8z","Chat3Line"),mt=$("M12 7a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1zm0 10a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5z","WarningLine"),be=$("M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z","ArrowDownSLine"),$a=$("M14 2l.5 2.5L17 5l-2.5.5L14 8l-.5-2.5L11 5l2.5-.5L14 2zM6 12l1 4 4 1 1-4-4-1-1-4zm8-2l.5 2.5 2.5.5-2.5.5-.5 2.5-.5-2.5-2.5-.5 2.5-.5.5-2.5z","SparklingLine"),or=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 2v5.586l3.707 3.707-1.414 1.414L11 11.414V6h2z","TimeLine"),Qt=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 5.536l-4.95 4.95-2.121-2.122-1.414 1.414 3.535 3.536 6.364-6.364-1.414-1.414z","CheckboxCircleLine"),ir=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 2.464l-1.414 1.414L12 10.586 9.878 8.464 8.464 9.878 10.586 12l-2.122 2.121 1.414 1.415L12 13.414l2.121 2.122 1.415-1.414L13.414 12l2.122-2.121z","CloseCircleLine"),Oa=$("M6 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z","MoreLine"),Jd=$("M5.763 17H20V5H4v13.385L5.763 17zm.692 2L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455z","QuestionAnswerLine"),lr=$("M7 14h10v2H7v-2zm0-4h10v2H7v-2zm0-4h10v2H7V6zm-4 12h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3V6z","RequestChangesLine"),cr=$("M3 5h2v2H3V5zm4 0h14v2H7V5zm-4 6h2v2H3v-2zm4 0h14v2H7v-2zm-4 6h2v2H3v-2zm4 0h14v2H7v-2z","CatalogLine"),dr=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z","CircleLine"),ur=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm4 5v2H8V9h8z","IndeterminateCircleLine"),mr=$("M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 10l-4-4v3H6v2h6v3l4-4z","ArrowRightCircleFillLine"),Wt=$("M3 4h14v2H3V4zm0 4h14v2H3V8zm0 4h10v2H3v-2zm0 4h8v2H3v-2z","FileList2Line"),pr=$("M13 10h5l-6 6-6-6h5V3h2v7zM4 19h16v2H4v-2z","DownloadLine"),xr=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 5v6h-2V9h2zm0-4v2h-2V6h2z","QuestionnaireLine"),fr=$("M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm2 2v12h14V5H5zm2 2h2v2H7V7zm4 0h6v2h-6V7zm-4 4h2v2H7v-2zm4 0h6v2h-6v-2z","TerminalBoxLine"),hr=$("M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8z","ExternalLinkLine"),gr=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 2.05v1.9c.93.13 1.8.44 2.57.9L14.5 7.2c-.55-.36-1.15-.65-1.78-.9L13 6.05zM6.05 11H4.1c.13.93.44 1.8.9 2.57L7.2 9.5c-.36-.55-.65-1.15-.9-1.78L6.05 11zm1.25 4.5L4.6 16.33c.77.57 1.64.88 2.57 1.01v1.9c.63-.25 1.23-.54 1.78-.9L7.3 15.5zm7.4 0c.55.36 1.15.65 1.78.9v1.9a8.1 8.1 0 0 1-2.57-.9L16.8 15.5l-1.25-1.25zM17.9 13h-1.95c-.25-.63-.54-1.23-.9-1.78L16.8 14.5c.57.77.88 1.64 1.01 2.57zm-5.4-5.4c-.36.55-.65 1.15-.9 1.78H6.05c.13-.93.44-1.8.9-2.57L9.5 7.2l1.25 1.25zm-.9 6.8l1.25 1.25c.77-.57 1.64-.88 2.57-1.01v1.95c-.63.25-1.23.54-1.78.9L9.5 16.8zm4.5-4.5l1.25 1.25L16.8 9.5c-.36-.55-.65-1.15-.9-1.78h1.95c.13.93.44 1.8.9 2.57z","GlobalLine"),yr=$("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 2.464l-9.072 9.072a8 8 0 0 1 9.072-9.072zM8.464 17.536a8 8 0 0 1 9.072-9.072l-9.072 9.072z","Forbid2Line"),$e=Z.Root,Oe=Z.Trigger,eu=Z.Group,tu=Z.Portal,br=Z.Sub,au=Z.RadioGroup,vr="min-w-32 overflow-hidden rounded-lg border border-border-tertiary bg-bg-container p-1 text-text shadow-lg z-50 outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none focus-visible:!ring-0",Me=y.forwardRef(({className:e,sideOffset:a=4,children:s,dataStyle:n,dataTheme:r,...o},l)=>{const c=ge(),d=n!==void 0?{"data-style":n,"data-theme":r??c["data-theme"]??""}:c;return t.jsx(Z.Portal,{children:t.jsx("div",{style:{display:"contents"},...d,children:t.jsx(Z.Content,{ref:l,sideOffset:a,className:i(vr,e),...o,children:t.jsx(V.motion.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15,ease:[.4,0,.2,1]},children:s})})})})});Me.displayName=Z.Content.displayName;const su=F.cva("flex h-9 w-full cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none hover:bg-fill-secondary focus:bg-fill-secondary data-[highlighted]:bg-fill-secondary data-[state=open]:bg-fill-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),Ba=y.forwardRef(({className:e,inset:a=!1,children:s,subTriggerIcon:n,...r},o)=>t.jsxs(Z.SubTrigger,{ref:o,className:su({inset:a,className:e}),...r,children:[s,t.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center",children:n??t.jsx(at,{className:"h-4 w-4"})})]}));Ba.displayName=Z.SubTrigger.displayName;const Va=y.forwardRef(({className:e,sideOffset:a=-1,dataStyle:s,dataTheme:n,...r},o)=>{const l=ge(),c=s!==void 0?{"data-style":s,"data-theme":n??l["data-theme"]??""}:l;return t.jsx(Z.Portal,{children:t.jsx("div",{style:{display:"contents"},...c,children:t.jsx(Z.SubContent,{ref:o,sideOffset:a,className:i(vr,e),...r})})})});Va.displayName=Z.SubContent.displayName;const nu=F.cva("relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{variant:{default:"hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text",destructive:"text-error hover:bg-error-bg focus:bg-error-bg focus:text-error data-[highlighted]:bg-error-bg data-[highlighted]:text-error"},inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{variant:"default",inset:!1}}),je=y.forwardRef(({className:e,inset:a=!1,variant:s="default",...n},r)=>t.jsx(Z.Item,{ref:r,className:nu({variant:s,inset:a,className:e}),...n}));je.displayName=Z.Item.displayName;const wr="relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm pl-8 pr-3 text-sm outline-none transition-colors hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",kr=y.forwardRef(({className:e,children:a,checked:s,checkIcon:n,...r},o)=>t.jsxs(Z.CheckboxItem,{ref:o,className:i(wr,e),checked:s,...r,children:[t.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:t.jsx(Z.ItemIndicator,{children:n??t.jsx(ye,{className:"h-4 w-4"})})}),a]}));kr.displayName=Z.CheckboxItem.displayName;const jr=y.forwardRef(({className:e,children:a,...s},n)=>t.jsxs(Z.RadioItem,{ref:n,className:i(wr,e),...s,children:[t.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:t.jsx(Z.ItemIndicator,{children:t.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"})})}),a]}));jr.displayName=Z.RadioItem.displayName;const ru=F.cva("flex h-9 items-center px-3 text-sm font-semibold text-text-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),Nr=y.forwardRef(({className:e,inset:a=!1,...s},n)=>t.jsx(Z.Label,{ref:n,className:ru({inset:a,className:e}),...s}));Nr.displayName=Z.Label.displayName;const Cr=y.forwardRef(({className:e,...a},s)=>t.jsx(Z.Separator,{ref:s,className:i("my-1 mx-1 h-px bg-border-tertiary",e),...a}));Cr.displayName=Z.Separator.displayName;const Sr=({className:e,...a})=>t.jsx("span",{className:i("ml-auto text-xs tracking-widest text-text-tertiary",e),...a});Sr.displayName="DropdownMenuShortcut";const Ir=u.createContext(null);function ou({value:e,children:a}){return t.jsx(Ir.Provider,{value:e,children:a})}function pt(){return u.useContext(Ir)??{icons:{}}}function N(e,a){const{icons:s}=pt(),n=s[e];if(n)return t.jsx(n,{className:a,"aria-hidden":!0})}const Rr=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(Me,{ref:a,dataStyle:s,dataTheme:n,...e})});Rr.displayName="DropdownMenuContent";function iu(e){const a=N("arrowRight","h-4 w-4 shrink-0"),s=e.subTriggerIcon??a;return t.jsx(Ba,{...e,subTriggerIcon:s})}const zr=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(Va,{ref:a,dataStyle:s,dataTheme:n,...e})});zr.displayName="DropdownMenuSubContent";const Tr=pe.Root,lu=pe.Trigger,Lr=pe.Portal,Ha=y.forwardRef(({className:e,...a},s)=>t.jsx(pe.Overlay,{ref:s,asChild:!0,...a,children:t.jsx(V.motion.div,{className:i("fixed inset-0 z-50 bg-bg-mask/60",e),initial:{opacity:0},animate:{opacity:1},transition:{duration:.15}})}));Ha.displayName=pe.Overlay.displayName;const cu=F.cva("font-sans fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-bg-base text-text shadow-lg p-6",{variants:{size:{default:"max-w-lg",sm:"max-w-sm"}},defaultVariants:{size:"default"}}),Ga=y.forwardRef(({className:e,children:a,size:s="default",dataStyle:n,dataTheme:r,...o},l)=>{const c=ge(),d=n!==void 0?{"data-style":n,"data-theme":r??c["data-theme"]??""}:c;return t.jsx(Lr,{children:t.jsxs("div",{style:{display:"contents"},...d,children:[t.jsx(Ha,{}),t.jsx(pe.Content,{ref:l,asChild:!0,...o,children:t.jsx(V.motion.div,{className:i(cu({size:s}),e),initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.4,0,.2,1]},children:a})})]})})});Ga.displayName=pe.Content.displayName;const qa=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("flex flex-col gap-2",e),...a}));qa.displayName="AlertDialogHeader";const Ua=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...a}));Ua.displayName="AlertDialogFooter";const Qa=y.forwardRef(({className:e,...a},s)=>t.jsx(pe.Title,{ref:s,className:i("font-sans text-base font-medium leading-6 text-text",e),...a}));Qa.displayName=pe.Title.displayName;const Wa=y.forwardRef(({className:e,...a},s)=>t.jsx(pe.Description,{ref:s,className:i("text-sm leading-6 text-text-tertiary",e),...a}));Wa.displayName=pe.Description.displayName;const du=F.cva("inline-flex h-9 items-center justify-center rounded px-4 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{destructive:{true:"bg-error text-text-on-primary hover:bg-error-hover active:bg-error",false:"bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover"}},defaultVariants:{destructive:!1}}),Mr=y.forwardRef(({className:e,destructive:a=!1,...s},n)=>t.jsx(pe.Action,{ref:n,className:i(du({destructive:a}),e),...s}));Mr.displayName=pe.Action.displayName;const Za=y.forwardRef(({className:e,...a},s)=>t.jsx(pe.Cancel,{ref:s,className:i("inline-flex h-9 items-center justify-center rounded px-4 text-sm font-medium cursor-pointer","bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text","transition-colors focus:outline-none",e),...a}));Za.displayName=pe.Cancel.displayName;const Pr=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(Ga,{ref:a,dataStyle:s,dataTheme:n,...e})});Pr.displayName="AlertDialogContent";const Ar=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("mb-4 inline-flex h-10 w-10 items-center justify-center rounded-lg bg-fill-tertiary text-text",e),...a}));Ar.displayName="AlertDialogMedia";function Dr({className:e,...a}){return t.jsx("kbd",{className:i("pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 !font-sans text-xs font-medium","bg-fill-secondary text-text-secondary","[.tooltip-content_&]:bg-bg-highlight-hover [.tooltip-content_&]:text-text-on-primary","dark:[.tooltip-content_&]:bg-[color:var(--color-bg-base)]/10 dark:[.tooltip-content_&]:text-[var(--color-bg-base)]",e),...a})}Dr.displayName="Kbd";function _r({className:e,children:a,separator:s="+",...n}){const r=y.Children.toArray(a);return t.jsx("span",{className:i("inline-flex items-center gap-1",e),...n,children:r.map((o,l)=>t.jsxs(y.Fragment,{children:[o,l<r.length-1&&t.jsx("span",{className:"select-none !font-sans text-xs font-medium text-text-secondary",children:s})]},l))})}_r.displayName="KbdGroup";const rt={fast:.15,base:.2,slow:.3},ot={standard:[.16,1,.3,1],emphasized:[.2,.8,.2,1],out:[0,0,.2,1]},Er={snappy:{type:"spring",stiffness:520,damping:34,mass:.7}},uu=F.cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full overflow-hidden border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-fill-secondary",{variants:{size:{md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),mu=F.cva("pointer-events-none block rounded-full bg-text-on-primary ring-0 transition-transform data-[state=unchecked]:translate-x-0",{variants:{size:{md:"h-4 w-4 data-[state=checked]:translate-x-4",lg:"h-5 w-5 data-[state=checked]:translate-x-4.5"}},defaultVariants:{size:"md"}}),Fr=y.forwardRef(({className:e,size:a="md",disabled:s=!1,...n},r)=>t.jsx(qs.Root,{ref:r,className:i(uu({size:a}),e),disabled:s,...n,children:t.jsx(qs.Thumb,{className:mu({size:a})})}));Fr.displayName="Switch";const en={sm:{buttonClass:"w-5 h-5",iconClass:"w-3.5 h-3.5",trackClass:"p-0.5 rounded-md gap-0.5",thumbClass:"w-5 h-5 rounded-sm top-0.5 bottom-0.5",buttonRounded:"rounded-sm"},md:{buttonClass:"w-6 h-6",iconClass:"w-4 h-4",trackClass:"p-0.5 rounded-lg gap-0.5",thumbClass:"w-6 h-6 rounded-md top-0.5 bottom-0.5",buttonRounded:"rounded-md"}};function pu(e){if(e==="normal"||!e)return 0;const a=parseFloat(e);return e.endsWith("px")?a:e.endsWith("rem")?a*16:a}const Ka=y.forwardRef(({variant:e="toggle",className:a,size:s="md",options:n,value:r,defaultValue:o="preview",onValueChange:l,segmentSize:c="md",disabled:d=!1,...m},p)=>{const{style:x,theme:g}=de(),v={};x&&(v["data-style"]=x),g&&(v["data-theme"]=g);const f=en[c].iconClass,b=t.jsx(Zd,{className:f}),h=t.jsx(tr,{className:f}),[w,j]=y.useState(o),k=y.useRef(null),[T,S]=y.useState({buttonWidth:24,gapPx:2});y.useLayoutEffect(()=>{if(!k.current)return;const O=k.current,J=O.querySelector("button"),ue=J?pu(getComputedStyle(O).gap):0,U=J?.offsetWidth??24;S(Q=>Q.buttonWidth===U&&Q.gapPx===ue?Q:{buttonWidth:U,gapPx:ue})},[x,c,n?.length]);const P=[{value:"code",label:"Code",icon:b},{value:"preview",label:"Preview",icon:h}],A=n?.length?n:P;if(e==="toggle")return t.jsx("div",{ref:p,...v,className:"inline-flex",children:t.jsx(Fr,{size:s,className:a,disabled:d,...m})});const I=r!==void 0,_=(I?r:w)??o,ne=O=>{d||(I||j(O),l?.(O))},D=A.findIndex(O=>O.value===_),q=D>=0?D:0,ie=en[c],{buttonClass:X,trackClass:G,thumbClass:ae,buttonRounded:le}=ie,C=q*(T.buttonWidth+T.gapPx);return t.jsx("div",{ref:p,...v,className:"inline-flex",children:t.jsxs("div",{ref:k,role:"radiogroup","aria-disabled":d||void 0,className:Le.clsx("relative inline-flex items-center",G,"bg-fill-secondary",d?"opacity-50 cursor-not-allowed":"cursor-pointer",a),...m,children:[t.jsx(V.motion.span,{className:Le.clsx("absolute left-0.5 bg-bg-base shadow-sm",ae),initial:!1,animate:{x:C},transition:{type:"tween",duration:rt.base,ease:ot.out}}),A.map(O=>{const J=O.value===_;return t.jsx("button",{type:"button",role:"radio","aria-checked":J,"aria-label":O.label,disabled:d,onClick:()=>ne(O.value),className:Le.clsx("relative z-10 inline-flex items-center justify-center",le,X,"transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-border",J?"text-primary-active":"text-text-secondary"),children:t.jsx("span",{className:"inline-flex items-center justify-center",children:O.icon})},O.value)})]})})});Ka.displayName="Switch";function xu({size:e="md",value:a,defaultValue:s="preview",onValueChange:n,disabled:r=!1,className:o,...l}){return t.jsx(Ka,{variant:"segment",segmentSize:e,value:a,defaultValue:s,onValueChange:n,disabled:r,className:o,...l})}const $r=F.cva("inline-flex items-center justify-center gap-1.5 font-medium transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base disabled:pointer-events-none disabled:opacity-50 cursor-pointer data-[state=on]:bg-fill data-[state=on]:text-text",{variants:{variant:{default:"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text data-[state=on]:bg-fill data-[state=on]:text-text",outline:"border border-border-tertiary bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text data-[state=on]:border-border-secondary data-[state=on]:bg-fill data-[state=on]:text-text"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-11 px-4 text-base"},rounded:{square:"rounded",pill:"rounded-full"}},defaultVariants:{variant:"default",size:"md",rounded:"square"}}),Or=u.forwardRef(({variant:e="default",size:a="md",rounded:s="square",className:n,prefixIcon:r,suffixIcon:o,children:l,...c},d)=>t.jsxs(qc.Root,{ref:d,className:$r({variant:e,size:a,rounded:s,className:n}),...c,children:[r&&t.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:r}),l,o&&t.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:o})]}));Or.displayName="Toggle";const Br=u.createContext(null),fu={none:"gap-0",sm:"gap-1",md:"gap-2"},hu=["shrink-0","group-data-[spacing=0]/toggle-group:rounded-none","group-data-[spacing=0]/toggle-group:group-data-[orientation=horizontal]/toggle-group:first:rounded-l","group-data-[spacing=0]/toggle-group:group-data-[orientation=horizontal]/toggle-group:last:rounded-r","group-data-[spacing=0]/toggle-group:group-data-[orientation=vertical]/toggle-group:first:rounded-t","group-data-[spacing=0]/toggle-group:group-data-[orientation=vertical]/toggle-group:last:rounded-b","group-data-[spacing=0]/toggle-group:data-[variant=outline]:group-data-[orientation=horizontal]/toggle-group:[&:not(:first-child)]:border-l-0","group-data-[spacing=0]/toggle-group:data-[variant=outline]:group-data-[orientation=vertical]/toggle-group:[&:not(:first-child)]:border-t-0"].join(" "),Vr=u.forwardRef(({type:e="single",variant:a="default",size:s="md",rounded:n="square",spacing:r="none",className:o,orientation:l="horizontal",children:c,...d},m)=>{const p=i("group/toggle-group inline-flex w-fit",l==="horizontal"?"flex-row":"flex-col",l==="vertical"&&"items-stretch",fu[r],o),x={ref:m,orientation:l,"data-spacing":r==="none"?"0":r,"data-orientation":l,"data-variant":a,"data-size":s,className:p};return t.jsx(Br.Provider,{value:{variant:a,size:s,rounded:n,spacing:r},children:e==="multiple"?t.jsx(Na.Root,{...x,...d,type:"multiple",children:c}):t.jsx(Na.Root,{...x,...d,type:"single",children:c})})});Vr.displayName="ToggleGroup";const Hr=u.forwardRef(({variant:e,size:a,rounded:s,className:n,prefixIcon:r,suffixIcon:o,children:l,...c},d)=>{const m=u.useContext(Br),p=e??m?.variant??"default",x=a??m?.size??"md",g=s??m?.rounded??"square";return t.jsxs(Na.Item,{ref:d,"data-variant":p,"data-size":x,className:i($r({variant:p,size:x,rounded:g}),m&&hu,"focus-visible:z-10",n),...c,children:[r&&t.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:r}),l,o&&t.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:o})]})});Hr.displayName="ToggleGroupItem";const gu=F.cva("grid gap-2",{variants:{orientation:{vertical:"grid-flow-row",horizontal:"grid-flow-col auto-cols-max"}},defaultVariants:{orientation:"vertical"}}),yu=F.cva("shrink-0 rounded-full border border-border-tertiary outline-offset-2 cursor-pointer transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary-border disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-text data-[state=checked]:bg-text data-[state=checked]:text-bg-base",{variants:{size:{sm:"size-3.5",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),bu={sm:"size-1.5",md:"size-2",lg:"size-2.5"},Gr=y.forwardRef(({className:e,orientation:a="vertical",...s},n)=>t.jsx(ja.Root,{ref:n,className:i(gu({orientation:a,className:e})),orientation:a??"vertical",...s}));Gr.displayName="RadioGroup";const qr=y.forwardRef(({className:e,size:a="md",...s},n)=>t.jsx(ja.Item,{ref:n,className:i(yu({size:a,className:e})),...s,children:t.jsx(ja.Indicator,{className:"flex items-center justify-center",children:t.jsx("span",{className:i("rounded-full bg-current",bu[a??"md"])})})}));qr.displayName="RadioGroupItem";const tn=`
|
|
1
|
+
"use strict";var Hc=Object.create;var cs=Object.defineProperty;var Vc=Object.getOwnPropertyDescriptor;var Gc=Object.getOwnPropertyNames;var qc=Object.getPrototypeOf,Wc=Object.prototype.hasOwnProperty;var Uc=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Gc(t))!Wc.call(e,r)&&r!==a&&cs(e,r,{get:()=>t[r],enumerable:!(s=Vc(t,r))||s.enumerable});return e};var Qc=(e,t,a)=>(a=e!=null?Hc(qc(e)):{},Uc(t||!e||!e.__esModule?cs(a,"default",{value:e,enumerable:!0}):a,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),m=require("react"),H=require("framer-motion"),Yc=require("@radix-ui/react-tooltip"),_e=require("clsx"),Xc=require("@radix-ui/react-dropdown-menu"),A=require("class-variance-authority"),Zc=require("@radix-ui/react-alert-dialog"),Kc=require("@radix-ui/react-switch"),Zs=require("react-dom"),Ks=require("sonner"),V=require("radix-ui"),Jc=require("@radix-ui/react-select"),ed=require("@radix-ui/react-dialog"),td=require("@radix-ui/react-popover"),nd=require("@radix-ui/react-hover-card"),ad=require("@radix-ui/react-context-menu"),sd=require("react-markdown"),rd=require("remark-gfm"),od=require("remark-math"),id=require("rehype-katex"),ds=require("lottie-react"),Js=require("react-i18next"),ld=require("prism-react-renderer"),cd=require("@radix-ui/react-aspect-ratio"),dd=require("@radix-ui/react-avatar"),xe=require("lucide-react"),On=require("react-day-picker"),ud=require("embla-carousel-react"),md=require("recharts"),pd=require("@radix-ui/react-checkbox"),xd=require("@radix-ui/react-accordion"),fd=require("@radix-ui/react-collapsible"),Qe=require("cmdk"),hd=require("@radix-ui/react-label"),gd=require("@radix-ui/react-separator"),er=require("input-otp"),yd=require("@radix-ui/react-progress"),bd=require("@radix-ui/react-radio-group"),Un=require("react-resizable-panels"),vd=require("@radix-ui/react-slider"),wd=require("@radix-ui/react-tabs"),kd=require("@radix-ui/react-toggle"),jd=require("@radix-ui/react-toggle-group");function se(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const y=se(m),at=se(Yc),X=se(Xc),fe=se(Zc),us=se(Kc),ie=se(Jc),Z=se(ed),st=se(td),yt=se(nd),K=se(ad),Nd=se(cd),ct=se(dd),Qn=se(md),En=se(pd),bt=se(xd),nn=se(fd),tr=se(hd),nr=se(gd),ms=se(yd),Fn=se(bd),Ot=se(vd),Ye=se(wd),Cd=se(kd),$n=se(jd),Sd=(e,t)=>{const a=new Array(e.length+t.length);for(let s=0;s<e.length;s++)a[s]=e[s];for(let s=0;s<t.length;s++)a[e.length+s]=t[s];return a},Id=(e,t)=>({classGroupId:e,validator:t}),ar=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),Ut="-",ps=[],Rd="arbitrary..",Td=e=>{const t=Pd(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Md(i);const c=i.split(Ut),d=c[0]===""&&c.length>1?1:0;return sr(c,d,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const d=s[i],u=a[i];return d?u?Sd(u,d):d:u||ps}return a[i]||ps}}},sr=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const r=e[t],o=a.nextPart.get(r);if(o){const u=sr(e,t+1,o);if(u)return u}const i=a.validators;if(i===null)return;const c=t===0?e.join(Ut):e.slice(t).join(Ut),d=i.length;for(let u=0;u<d;u++){const p=i[u];if(p.validator(c))return p.classGroupId}},Md=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),s=t.slice(0,a);return s?Rd+s:void 0})(),Pd=e=>{const{theme:t,classGroups:a}=e;return zd(a,t)},zd=(e,t)=>{const a=ar();for(const s in e){const r=e[s];Yn(r,a,s,t)}return a},Yn=(e,t,a,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Ld(i,t,a,s)}},Ld=(e,t,a,s)=>{if(typeof e=="string"){Dd(e,t,a);return}if(typeof e=="function"){Ad(e,t,a,s);return}_d(e,t,a,s)},Dd=(e,t,a)=>{const s=e===""?t:rr(t,e);s.classGroupId=a},Ad=(e,t,a,s)=>{if(Od(e)){Yn(e(s),t,a,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Id(a,e))},_d=(e,t,a,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[c,d]=r[i];Yn(d,rr(t,c),a,s)}},rr=(e,t)=>{let a=e;const s=t.split(Ut),r=s.length;for(let o=0;o<r;o++){const i=s[o];let c=a.nextPart.get(i);c||(c=ar(),a.nextPart.set(i,c)),a=c}return a},Od=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ed=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),s=Object.create(null);const r=(o,i)=>{a[o]=i,t++,t>e&&(t=0,s=a,a=Object.create(null))};return{get(o){let i=a[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in a?a[o]=i:r(o,i)}}},Bn="!",xs=":",Fd=[],fs=(e,t,a,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:s,isExternal:r}),$d=e=>{const{prefix:t,experimentalParseClassName:a}=e;let s=r=>{const o=[];let i=0,c=0,d=0,u;const p=r.length;for(let b=0;b<p;b++){const h=r[b];if(i===0&&c===0){if(h===xs){o.push(r.slice(d,b)),d=b+1;continue}if(h==="/"){u=b;continue}}h==="["?i++:h==="]"?i--:h==="("?c++:h===")"&&c--}const x=o.length===0?r:r.slice(d);let g=x,v=!1;x.endsWith(Bn)?(g=x.slice(0,-1),v=!0):x.startsWith(Bn)&&(g=x.slice(1),v=!0);const f=u&&u>d?u-d:void 0;return fs(o,v,g,f)};if(t){const r=t+xs,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):fs(Fd,!1,i,void 0,!0)}if(a){const r=s;s=o=>a({className:o,parseClassName:r})}return s},Bd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,s)=>{t.set(a,1e6+s)}),a=>{const s=[];let r=[];for(let o=0;o<a.length;o++){const i=a[o],c=i[0]==="[",d=t.has(i);c||d?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},Hd=e=>({cache:Ed(e.cacheSize),parseClassName:$d(e),sortModifiers:Bd(e),...Td(e)}),Vd=/\s+/,Gd=(e,t)=>{const{parseClassName:a,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o}=t,i=[],c=e.trim().split(Vd);let d="";for(let u=c.length-1;u>=0;u-=1){const p=c[u],{isExternal:x,modifiers:g,hasImportantModifier:v,baseClassName:f,maybePostfixModifierPosition:b}=a(p);if(x){d=p+(d.length>0?" "+d:d);continue}let h=!!b,w=s(h?f.substring(0,b):f);if(!w){if(!h){d=p+(d.length>0?" "+d:d);continue}if(w=s(f),!w){d=p+(d.length>0?" "+d:d);continue}h=!1}const k=g.length===0?"":g.length===1?g[0]:o(g).join(":"),j=v?k+Bn:k,I=j+w;if(i.indexOf(I)>-1)continue;i.push(I);const C=r(w,h);for(let L=0;L<C.length;++L){const z=C[L];i.push(j+z)}d=p+(d.length>0?" "+d:d)}return d},qd=(...e)=>{let t=0,a,s,r="";for(;t<e.length;)(a=e[t++])&&(s=or(a))&&(r&&(r+=" "),r+=s);return r},or=e=>{if(typeof e=="string")return e;let t,a="";for(let s=0;s<e.length;s++)e[s]&&(t=or(e[s]))&&(a&&(a+=" "),a+=t);return a},Wd=(e,...t)=>{let a,s,r,o;const i=d=>{const u=t.reduce((p,x)=>x(p),e());return a=Hd(u),s=a.cache.get,r=a.cache.set,o=c,c(d)},c=d=>{const u=s(d);if(u)return u;const p=Gd(d,a);return r(d,p),p};return o=i,(...d)=>o(qd(...d))},Ud=[],de=e=>{const t=a=>a[e]||Ud;return t.isThemeGetter=!0,t},ir=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qd=/^\d+\/\d+$/,Yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tt=e=>Qd.test(e),E=e=>!!e&&!Number.isNaN(Number(e)),De=e=>!!e&&Number.isInteger(Number(e)),zn=e=>e.endsWith("%")&&E(e.slice(0,-1)),Me=e=>Yd.test(e),cr=()=>!0,eu=e=>Xd.test(e)&&!Zd.test(e),Xn=()=>!1,tu=e=>Kd.test(e),nu=e=>Jd.test(e),au=e=>!T(e)&&!M(e),su=e=>Fe(e,mr,Xn),T=e=>ir.test(e),Ve=e=>Fe(e,pr,eu),hs=e=>Fe(e,mu,E),ru=e=>Fe(e,fr,cr),ou=e=>Fe(e,xr,Xn),gs=e=>Fe(e,dr,Xn),iu=e=>Fe(e,ur,nu),Et=e=>Fe(e,hr,tu),M=e=>lr.test(e),mt=e=>Xe(e,pr),lu=e=>Xe(e,xr),ys=e=>Xe(e,dr),cu=e=>Xe(e,mr),du=e=>Xe(e,ur),Ft=e=>Xe(e,hr,!0),uu=e=>Xe(e,fr,!0),Fe=(e,t,a)=>{const s=ir.exec(e);return s?s[1]?t(s[1]):a(s[2]):!1},Xe=(e,t,a=!1)=>{const s=lr.exec(e);return s?s[1]?t(s[1]):a:!1},dr=e=>e==="position"||e==="percentage",ur=e=>e==="image"||e==="url",mr=e=>e==="length"||e==="size"||e==="bg-size",pr=e=>e==="length",mu=e=>e==="number",xr=e=>e==="family-name",fr=e=>e==="number"||e==="weight",hr=e=>e==="shadow",pu=()=>{const e=de("color"),t=de("font"),a=de("text"),s=de("font-weight"),r=de("tracking"),o=de("leading"),i=de("breakpoint"),c=de("container"),d=de("spacing"),u=de("radius"),p=de("shadow"),x=de("inset-shadow"),g=de("text-shadow"),v=de("drop-shadow"),f=de("blur"),b=de("perspective"),h=de("aspect"),w=de("ease"),k=de("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...I(),M,T],L=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],S=()=>[M,T,d],O=()=>[tt,"full","auto",...S()],re=()=>[De,"none","subgrid",M,T],_=()=>["auto",{span:["full",De,M,T]},De,M,T],U=()=>[De,"auto",M,T],le=()=>["auto","min","max","fr",M,T],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],ae=()=>["auto",...S()],ce=()=>[tt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],R=()=>[e,M,T],$=()=>[...I(),ys,gs,{position:[M,T]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],me=()=>["auto","cover","contain",cu,su,{size:[M,T]}],Q=()=>[zn,mt,Ve],Y=()=>["","none","full",u,M,T],pe=()=>["",E,mt,Ve],je=()=>["solid","dashed","dotted","double"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[E,zn,ys,gs],et=()=>["","none",f,M,T],ze=()=>["none",E,M,T],Le=()=>["none",E,M,T],P=()=>[E,M,T],D=()=>[tt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[cr],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[au],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",E],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tt,T,M,h]}],container:["container"],columns:[{columns:[E,T,M,c]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[De,"auto",M,T]}],basis:[{basis:[tt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[E,tt,"auto","initial","none",T]}],grow:[{grow:["",E,M,T]}],shrink:[{shrink:["",E,M,T]}],order:[{order:[De,"first","last","none",M,T]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:ae()}],mx:[{mx:ae()}],my:[{my:ae()}],ms:[{ms:ae()}],me:[{me:ae()}],mt:[{mt:ae()}],mr:[{mr:ae()}],mb:[{mb:ae()}],ml:[{ml:ae()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],w:[{w:[c,"screen",...ce()]}],"min-w":[{"min-w":[c,"screen","none",...ce()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...ce()]}],h:[{h:["screen","lh",...ce()]}],"min-h":[{"min-h":["screen","lh","none",...ce()]}],"max-h":[{"max-h":["screen","lh",...ce()]}],"font-size":[{text:["base",a,mt,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,uu,ru]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zn,T]}],"font-family":[{font:[lu,ou,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,M,T]}],"line-clamp":[{"line-clamp":[E,"none",M,hs]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",M,T]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[E,"from-font","auto",M,Ve]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[E,"auto",M,T]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,T]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M,T]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},De,M,T],radial:["",M,T],conic:[De,M,T]},du,iu]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[E,M,T]}],"outline-w":[{outline:["",E,mt,Ve]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",p,Ft,Et]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",x,Ft,Et]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[E,Ve]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,Ft,Et]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[E,M,T]}],"mix-blend":[{"mix-blend":[...Je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[E]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[M,T]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[E]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",M,T]}],filter:[{filter:["","none",M,T]}],blur:[{blur:et()}],brightness:[{brightness:[E,M,T]}],contrast:[{contrast:[E,M,T]}],"drop-shadow":[{"drop-shadow":["","none",v,Ft,Et]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",E,M,T]}],"hue-rotate":[{"hue-rotate":[E,M,T]}],invert:[{invert:["",E,M,T]}],saturate:[{saturate:[E,M,T]}],sepia:[{sepia:["",E,M,T]}],"backdrop-filter":[{"backdrop-filter":["","none",M,T]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[E,M,T]}],"backdrop-contrast":[{"backdrop-contrast":[E,M,T]}],"backdrop-grayscale":[{"backdrop-grayscale":["",E,M,T]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E,M,T]}],"backdrop-invert":[{"backdrop-invert":["",E,M,T]}],"backdrop-opacity":[{"backdrop-opacity":[E,M,T]}],"backdrop-saturate":[{"backdrop-saturate":[E,M,T]}],"backdrop-sepia":[{"backdrop-sepia":["",E,M,T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,T]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[E,"initial",M,T]}],ease:[{ease:["linear","initial",w,M,T]}],delay:[{delay:[E,M,T]}],animate:[{animate:["none",k,M,T]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,M,T]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"scale-3d":["scale-3d"],skew:[{skew:P()}],"skew-x":[{"skew-x":P()}],"skew-y":[{"skew-y":P()}],transform:[{transform:[M,T,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:D()}],"translate-x":[{"translate-x":D()}],"translate-y":[{"translate-y":D()}],"translate-z":[{"translate-z":D()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M,T]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M,T]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[E,mt,Ve,hs]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xu=Wd(pu);function l(...e){return xu(_e.clsx(e))}const fu="0 0 24 24",hu="1em";function F(e,t){const a=y.forwardRef(({className:s,size:r=hu,...o},i)=>n.jsx("svg",{ref:i,viewBox:fu,width:r,height:r,fill:"currentColor",className:s,xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,...o,children:n.jsx("path",{d:e})}));return a.displayName=t,a}F("M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z","ArrowDownLine");const Zn=F("M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z","ArrowUpLine"),dt=F("M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z","ArrowRightLine"),gu=F("M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z","ArrowLeftLine"),be=F("M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z","CheckLine"),Re=F("M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z","CloseLine"),gr=F("M10.5859 12L2.79297 4.20706L4.20718 2.79285L12.0001 10.5857L19.793 2.79285L21.2072 4.20706L13.4143 12L21.2072 19.7928L19.793 21.2071L12.0001 13.4142L4.20718 21.2071L2.79297 19.7928L10.5859 12Z","CloseLargeLine"),yu=F("M24 12L18.3431 17.6569L16.9289 16.2426L21.1716 12L16.9289 7.75736L18.3431 6.34315L24 12ZM2.82843 12L7.07107 16.2426L5.65685 17.6569L0 12L5.65685 6.34315L7.07107 7.75736L2.82843 12ZM9.78845 21H7.66009L14.2116 3H16.3399L9.78845 21Z","CodeSSlashLine"),yr=F("M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z","EyeLine"),br=F("M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z","LoaderLine"),bu=F("M1.946 9.315c-.946-.35-.946-1.09 0-1.436l18.108-6.732c.946-.35 1.704.21 1.573 1.236L20.1 21.894c-.117.932-.93 1.636 1.897 1.636.967 0 1.754-.704 1.636-1.636l-.527-4.18L10 12 20.073 7.264l-.527-4.18c-.117-.932.67-1.636 1.637-1.636.967 0 2.014.704 1.897 1.636L21.627 18.57c-.131 1.026-.627 1.586-1.573 1.236L1.946 9.315Z","SendPlaneLine"),vu=F("M6 6h12v12H6V6Zm2 2v8h8V8H8Z","StopLine"),wu=F("M12 3a3 3 0 0 1 3 3v6a3 3 0 0 1-6 0V6a3 3 0 0 1 3-3Zm0 14a5 5 0 0 0 5-5v-1a1 1 0 1 1 2 0v1a7 7 0 0 1-14 0v-1a1 1 0 1 1 2 0v1a5 5 0 0 0 5 5Z","MicLine"),vr=F("M3 3h8.828l2 2H21a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm2 2v12h14V7h-8.414l-2-2H5Z","FolderLine"),wr=F("M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2Z","FolderFillLine"),Kn=F("M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z","FileLine"),kr=F("M12 2C6.477 2 2 6.477 2 12c0 1.5.328 2.932.917 4.215L1.5 21l4.785-1.417A9.966 9.966 0 0 0 12 22c5.523 0 10-4.477 10-10S17.523 2 12 2zm0 2a8 8 0 1 1 0 16 7.99 7.99 0 0 1-3.918-1.018l-.26-.15-2.683.795.795-2.683-.15-.26A7.99 7.99 0 0 1 4 12a8 8 0 0 1 8-8z","Chat3Line"),kt=F("M12 7a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1zm0 10a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5z","WarningLine"),ve=F("M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z","ArrowDownSLine"),Jn=F("M14 2l.5 2.5L17 5l-2.5.5L14 8l-.5-2.5L11 5l2.5-.5L14 2zM6 12l1 4 4 1 1-4-4-1-1-4zm8-2l.5 2.5 2.5.5-2.5.5-.5 2.5-.5-2.5-2.5-.5 2.5-.5.5-2.5z","SparklingLine"),jr=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 2v5.586l3.707 3.707-1.414 1.414L11 11.414V6h2z","TimeLine"),an=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 5.536l-4.95 4.95-2.121-2.122-1.414 1.414 3.535 3.536 6.364-6.364-1.414-1.414z","CheckboxCircleLine"),Nr=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 2.464l-1.414 1.414L12 10.586 9.878 8.464 8.464 9.878 10.586 12l-2.122 2.121 1.414 1.415L12 13.414l2.121 2.122 1.415-1.414L13.414 12l2.122-2.121z","CloseCircleLine"),ea=F("M6 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z","MoreLine"),ku=F("M5.763 17H20V5H4v13.385L5.763 17zm.692 2L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455z","QuestionAnswerLine"),Cr=F("M7 14h10v2H7v-2zm0-4h10v2H7v-2zm0-4h10v2H7V6zm-4 12h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3V6z","RequestChangesLine"),Sr=F("M3 5h2v2H3V5zm4 0h14v2H7V5zm-4 6h2v2H3v-2zm4 0h14v2H7v-2zm-4 6h2v2H3v-2zm4 0h14v2H7v-2z","CatalogLine"),Ir=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z","CircleLine"),Rr=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm4 5v2H8V9h8z","IndeterminateCircleLine"),Tr=F("M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 10l-4-4v3H6v2h6v3l4-4z","ArrowRightCircleFillLine"),sn=F("M3 4h14v2H3V4zm0 4h14v2H3V8zm0 4h10v2H3v-2zm0 4h8v2H3v-2z","FileList2Line"),Mr=F("M13 10h5l-6 6-6-6h5V3h2v7zM4 19h16v2H4v-2z","DownloadLine"),Pr=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 5v6h-2V9h2zm0-4v2h-2V6h2z","QuestionnaireLine"),zr=F("M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm2 2v12h14V5H5zm2 2h2v2H7V7zm4 0h6v2h-6V7zm-4 4h2v2H7v-2zm4 0h6v2h-6v-2z","TerminalBoxLine"),Lr=F("M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8z","ExternalLinkLine"),Dr=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 2.05v1.9c.93.13 1.8.44 2.57.9L14.5 7.2c-.55-.36-1.15-.65-1.78-.9L13 6.05zM6.05 11H4.1c.13.93.44 1.8.9 2.57L7.2 9.5c-.36-.55-.65-1.15-.9-1.78L6.05 11zm1.25 4.5L4.6 16.33c.77.57 1.64.88 2.57 1.01v1.9c.63-.25 1.23-.54 1.78-.9L7.3 15.5zm7.4 0c.55.36 1.15.65 1.78.9v1.9a8.1 8.1 0 0 1-2.57-.9L16.8 15.5l-1.25-1.25zM17.9 13h-1.95c-.25-.63-.54-1.23-.9-1.78L16.8 14.5c.57.77.88 1.64 1.01 2.57zm-5.4-5.4c-.36.55-.65 1.15-.9 1.78H6.05c.13-.93.44-1.8.9-2.57L9.5 7.2l1.25 1.25zm-.9 6.8l1.25 1.25c.77-.57 1.64-.88 2.57-1.01v1.95c-.63.25-1.23.54-1.78.9L9.5 16.8zm4.5-4.5l1.25 1.25L16.8 9.5c-.36-.55-.65-1.15-.9-1.78h1.95c.13.93.44 1.8.9 2.57z","GlobalLine"),Ar=F("M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 2.464l-9.072 9.072a8 8 0 0 1 9.072-9.072zM8.464 17.536a8 8 0 0 1 9.072-9.072l-9.072 9.072z","Forbid2Line"),ju=A.cva("animate-spin",{variants:{size:{xs:"size-3",sm:"size-3.5",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),rn=m.forwardRef(({className:e,size:t="md",...a},s)=>n.jsx("span",{ref:s,role:"status","aria-label":"Loading",...a,children:n.jsx(br,{className:l(ju({size:t}),e)})}));rn.displayName="Spinner";const vt=A.cva("inline-flex items-center justify-center gap-1.5 font-medium transition-[colors,transform] duration-200 active:scale-[0.98] focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",{variants:{variant:{primary:"bg-primary text-text-on-primary hover:bg-primary-hover",secondary:"bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover",tertiary:"bg-fill-secondary text-text hover:bg-fill",outline:"border border-border-tertiary bg-bg-container text-text hover:bg-fill-secondary",ghost:"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text",text:"bg-transparent text-text-secondary hover:text-text",destructive:"bg-error text-text-on-primary hover:bg-error-hover"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-11 px-4 text-base"},rounded:{square:"rounded",pill:"rounded-full"},textOnly:{true:"h-auto px-0 py-0.5",false:""}},compoundVariants:[{textOnly:!0,size:"sm",className:"text-xs"},{textOnly:!0,size:"md",className:"text-sm"},{textOnly:!0,size:"lg",className:"text-base"}],defaultVariants:{variant:"ghost",size:"md",rounded:"square",textOnly:!1}}),W=m.forwardRef(({variant:e="ghost",children:t,size:a="md",textButton:s=!1,prefixIcon:r,suffixIcon:o,rounded:i="square",disabled:c=!1,loading:d=!1,asChild:u=!1,className:p,...x},g)=>{const v=u?V.Slot.Root:"button",f=c||d;return n.jsxs(v,{ref:g,className:vt({variant:s?"text":e,size:a,rounded:i,textOnly:s,className:p}),disabled:f,"aria-busy":d||void 0,...x,children:[d?n.jsx(rn,{className:"shrink-0"}):r?n.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:r}):null,t,o&&n.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:o})]})});W.displayName="Button";const _r=A.cva("inline-flex isolate [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",{variants:{orientation:{horizontal:"flex-row items-stretch [&>*:not(:first-child)]:-ml-px [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}}),Or=y.forwardRef(({className:e,orientation:t="horizontal",...a},s)=>n.jsx("div",{ref:s,role:"group","data-orientation":t??"horizontal",className:l(_r({orientation:t}),e),...a}));Or.displayName="ButtonGroup";const Er=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("inline-flex h-9 shrink-0 items-center gap-1.5 rounded bg-fill-secondary px-3 text-sm font-medium text-text select-none","[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...t}));Er.displayName="ButtonGroupText";const Fr=y.forwardRef(({className:e,orientation:t="vertical",...a},s)=>n.jsx("div",{ref:s,role:"separator","aria-orientation":t,"data-orientation":t,className:l("shrink-0 self-stretch bg-border-tertiary",t==="vertical"?"w-px":"h-px w-full",e),...a}));Fr.displayName="ButtonGroupSeparator";const Nu=A.cva("flex-none shrink-0 inline-flex items-center justify-center box-border transition-[colors,transform] duration-200 active:scale-[0.98] focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer [&>*]:flex [&>*]:items-center [&>*]:justify-center [&>*]:size-full [&>*]:[&>svg]:block [&>*]:[&>svg]:leading-none",{variants:{variant:{primary:"bg-primary text-text-on-primary hover:bg-primary-hover",secondary:"bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover",tertiary:"bg-fill-secondary text-text hover:bg-fill",ghost:"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text",iconOnly:"bg-transparent text-text-secondary hover:text-text",destructive:"bg-error text-text-on-primary hover:bg-error-hover"},rounded:{square:"rounded",pill:"rounded-full"},size:{sm:"h-7 w-7 min-h-7 min-w-7 p-1.5",md:"h-9 w-9 min-h-9 min-w-9 p-1.5",lg:"h-11 w-11 min-h-11 min-w-11 p-2"}},defaultVariants:{variant:"secondary",size:"md",rounded:"square"}}),Ie=m.forwardRef(({variant:e="secondary",size:t="md",rounded:a="square",icon:s,disabled:r=!1,asChild:o=!1,className:i,...c},d)=>{const u=o?V.Slot.Root:"button";return n.jsx(u,{ref:d,className:l(Nu({variant:e,size:t,rounded:a}),i),disabled:r,...c,children:n.jsx("span",{className:"inline-flex shrink-0 size-full items-center justify-center",children:s})})});Ie.displayName="IconButton";const Ce={fast:.15,base:.2,slow:.3},Pe={standard:[.16,1,.3,1],emphasized:[.2,.8,.2,1],out:[0,0,.2,1]},$r={snappy:{type:"spring",stiffness:520,damping:34,mass:.7}},on={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:Ce.fast}},ta={initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:Ce.base,ease:Pe.standard}},ut={initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:Ce.fast,ease:Pe.standard}},Br={initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:Ce.base,ease:Pe.emphasized}};function Cu(){return typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Su(){if(typeof document>"u")return 1;const e=getComputedStyle(document.documentElement).getPropertyValue("--motion-multiplier").trim();return e?parseFloat(e):1}function ye(){if(typeof document>"u")return{};const e=document.documentElement,t={},a=e.getAttribute("data-theme"),s=e.getAttribute("data-style");return a&&(t["data-theme"]=a),s&&(t["data-style"]=s),t}const Iu=at.Provider,Ru=at.Root,Tu=at.Trigger,Hr=y.forwardRef(({className:e,sideOffset:t=8,children:a,dataStyle:s,dataTheme:r,...o},i)=>{const c=ye(),d=s!==void 0?{"data-style":s,"data-theme":r??c["data-theme"]??""}:c;return n.jsx(at.Portal,{children:n.jsx("div",{style:{display:"contents"},...d,children:n.jsx(at.Content,{ref:i,sideOffset:t,className:l("z-50 max-w-60 overflow-hidden rounded px-2 py-1 text-xs leading-5","bg-bg-highlight text-text-on-primary shadow-sm",e),...o,children:n.jsx(H.motion.div,{...ut,children:a})})})})});Hr.displayName=at.Content.displayName;function rt({content:e,children:t,side:a="top",contentClassName:s,dataStyle:r,dataTheme:o}){return n.jsx(Iu,{delayDuration:300,children:n.jsxs(Ru,{children:[n.jsx(Tu,{asChild:!0,children:t}),n.jsx(Hr,{side:a,className:s,dataStyle:r,dataTheme:o,children:e})]})})}rt.displayName="Tooltip";const Vr=m.createContext(null);function Gr(e){return typeof e=="object"&&"name"in e}function qr(e){return typeof e=="object"&&"name"in e}function Mu(e,t){return Gr(t)?`${e}-${t.name}`:t==="mint"?e:`${e}-${t}`}function Pu(e){return qr(e)?e.name:e}function zu(e,t){const a={};if(Gr(e)){const{tokens:s}=e;for(const[r,o]of Object.entries(s))if(o!==void 0){const i=r.startsWith("--")?r:`--${r}`;a[i]=o}}if(qr(t)){const{radius:s,spacing:r,fontSize:o}=t;s&&(s.sm&&(a["--radius-sm"]=s.sm),s.default&&(a["--radius-DEFAULT"]=s.default),s.md&&(a["--radius-md"]=s.md),s.lg&&(a["--radius-lg"]=s.lg),s.xl&&(a["--radius-xl"]=s.xl),s["2xl"]&&(a["--radius-2xl"]=s["2xl"]),s["3xl"]&&(a["--radius-3xl"]=s["3xl"])),r&&(r[3]&&(a["--spacing-3"]=r[3]),r[4]&&(a["--spacing-4"]=r[4]),r[9]&&(a["--spacing-9"]=r[9]),r[11]&&(a["--spacing-11"]=r[11])),o&&(o.sm&&(a["--font-size-sm"]=o.sm),o.lg&&(a["--font-size-lg"]=o.lg),o.xl&&(a["--font-size-xl"]=o.xl),o["2xl"]&&(a["--font-size-2xl"]=o["2xl"]),o["3xl"]&&(a["--font-size-3xl"]=o["3xl"]))}return a}function Lu({children:e,appearance:t="light",theme:a="mint",style:s="neutral"}){const r=m.useMemo(()=>Mu(t,a),[t,a]),o=m.useMemo(()=>Pu(s),[s]),i=m.useMemo(()=>zu(a,s),[a,s]),c=m.useMemo(()=>({appearance:t,themeConfig:a,styleConfig:s,dataTheme:r,dataStyle:o,theme:r,style:o}),[t,a,s,r,o]),d=Object.keys(i).length>0;return n.jsx(Vr.Provider,{value:c,children:n.jsx("div",{"data-theme":r,"data-style":o,style:d?i:void 0,children:e})})}function ue(){const e=m.useContext(Vr);return e||{appearance:"light",themeConfig:"mint",styleConfig:"neutral",dataTheme:"light",dataStyle:"neutral",theme:"light",style:"neutral"}}function na({placement:e,side:t=e??"top",...a}){const{style:s,theme:r}=ue();return n.jsx(rt,{side:t,dataStyle:s,dataTheme:r,...a})}na.displayName="Tooltip";function bs(e,t){e&&(typeof e=="function"?e(t):e.current=t)}const Wr=m.forwardRef(({children:e,lines:t=1,className:a="",placement:s="top",tooltipClassName:r="",tooltipContent:o,disabled:i=!1,style:c,as:d="span"},u)=>{const p=m.useRef(null),[x,g]=m.useState(!1),v=m.useCallback(()=>{const k=p.current;if(!k)return;const j=t===1?k.scrollWidth>k.clientWidth:k.scrollHeight>k.clientHeight;g(j)},[t]);m.useEffect(()=>{const k=requestAnimationFrame(()=>v()),j=p.current;if(!j)return()=>cancelAnimationFrame(k);const I=new ResizeObserver(()=>v());return I.observe(j),window.addEventListener("resize",v),()=>{cancelAnimationFrame(k),I.disconnect(),window.removeEventListener("resize",v)}},[v,e]);const f=t===1?{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...c}:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",...c},b=m.useCallback(k=>{bs(p,k),bs(u,k)},[u]),h=n.jsx(d,{ref:b,className:a,style:f,children:e});return x&&!i?n.jsx(na,{content:o??e,placement:s,contentClassName:_e.clsx(r),children:n.jsx("span",{ref:b,className:a,style:f,children:e})}):h});Wr.displayName="EllipsisText";const Du="flex flex-col gap-1",Au=A.cva("w-full flex flex-col gap-0.5 items-start p-2 text-sm rounded text-left transition-colors outline-none focus-visible:bg-fill-tertiary focus-visible:ring-0",{variants:{selected:{true:"",false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:"cursor-pointer hover:bg-fill-tertiary"},dimmed:{true:"opacity-40",false:""}},defaultVariants:{selected:!1,disabled:!1,dimmed:!1}}),_u=A.cva("flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-xs font-mono font-medium transition-colors",{variants:{selected:{true:"bg-primary-active text-text-on-primary",false:"bg-fill-secondary text-text-tertiary"}},defaultVariants:{selected:!1}}),aa=m.forwardRef(({items:e,selectedIds:t=[],focusedId:a,onItemClick:s,showPrefix:r=!0,disabled:o=!1,className:i,...c},d)=>{const u=p=>String(p+1);return n.jsx("div",{ref:d,role:"listbox","aria-multiselectable":t.length>1,className:l(Du,i),...c,children:e.map((p,x)=>{const g=t.includes(p.id),v=a===p.id,f=o||p.disabled,h=t.length>0&&!g&&!f;return n.jsxs("button",{type:"button",role:"option","aria-selected":g,"aria-disabled":f,onClick:()=>{f||s?.(p,x)},disabled:f,className:l(Au({selected:g,disabled:f,dimmed:h}),v&&"bg-fill-tertiary"),children:[n.jsxs("div",{className:"flex items-center gap-3",children:[r&&n.jsx("div",{className:_u({selected:g}),children:u(x)}),n.jsx("span",{className:"font-medium text-text",children:p.label})]}),p.description&&n.jsx("div",{className:"ml-8 text-xs text-text-tertiary",children:p.description})]},p.id)})})});aa.displayName="OptionList";const We=X.Root,Ue=X.Trigger,Ou=X.Group,Eu=X.Portal,Ur=X.Sub,Fu=X.RadioGroup,Qr="min-w-32 overflow-hidden rounded-lg border border-border-tertiary bg-bg-container p-1 text-text shadow-lg z-50 outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none focus-visible:!ring-0",Oe=y.forwardRef(({className:e,sideOffset:t=4,children:a,dataStyle:s,dataTheme:r,...o},i)=>{const c=ye(),d=s!==void 0?{"data-style":s,"data-theme":r??c["data-theme"]??""}:c;return n.jsx(X.Portal,{children:n.jsx("div",{style:{display:"contents"},...d,children:n.jsx(X.Content,{ref:i,sideOffset:t,className:l(Qr,e),...o,children:n.jsx(H.motion.div,{...ut,children:a})})})})});Oe.displayName=X.Content.displayName;const $u=A.cva("flex h-9 w-full cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none hover:bg-fill-secondary focus:bg-fill-secondary data-[highlighted]:bg-fill-secondary data-[state=open]:bg-fill-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),sa=y.forwardRef(({className:e,inset:t=!1,children:a,subTriggerIcon:s,...r},o)=>n.jsxs(X.SubTrigger,{ref:o,className:$u({inset:t,className:e}),...r,children:[a,n.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center",children:s??n.jsx(dt,{className:"h-4 w-4"})})]}));sa.displayName=X.SubTrigger.displayName;const ra=y.forwardRef(({className:e,sideOffset:t=-1,dataStyle:a,dataTheme:s,...r},o)=>{const i=ye(),c=a!==void 0?{"data-style":a,"data-theme":s??i["data-theme"]??""}:i;return n.jsx(X.Portal,{children:n.jsx("div",{style:{display:"contents"},...c,children:n.jsx(X.SubContent,{ref:o,sideOffset:t,className:l(Qr,e),...r})})})});ra.displayName=X.SubContent.displayName;const Bu=A.cva("relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{variant:{default:"hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text",destructive:"text-error hover:bg-error-bg focus:bg-error-bg focus:text-error data-[highlighted]:bg-error-bg data-[highlighted]:text-error"},inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{variant:"default",inset:!1}}),Se=y.forwardRef(({className:e,inset:t=!1,variant:a="default",...s},r)=>n.jsx(X.Item,{ref:r,className:Bu({variant:a,inset:t,className:e}),...s}));Se.displayName=X.Item.displayName;const Yr="relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm pl-8 pr-3 text-sm outline-none transition-colors hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Xr=y.forwardRef(({className:e,children:t,checked:a,checkIcon:s,...r},o)=>n.jsxs(X.CheckboxItem,{ref:o,className:l(Yr,e),checked:a,...r,children:[n.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:n.jsx(X.ItemIndicator,{children:s??n.jsx(be,{className:"h-4 w-4"})})}),t]}));Xr.displayName=X.CheckboxItem.displayName;const Zr=y.forwardRef(({className:e,children:t,...a},s)=>n.jsxs(X.RadioItem,{ref:s,className:l(Yr,e),...a,children:[n.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:n.jsx(X.ItemIndicator,{children:n.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"})})}),t]}));Zr.displayName=X.RadioItem.displayName;const Hu=A.cva("flex h-9 items-center px-3 text-sm font-semibold text-text-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),Kr=y.forwardRef(({className:e,inset:t=!1,...a},s)=>n.jsx(X.Label,{ref:s,className:Hu({inset:t,className:e}),...a}));Kr.displayName=X.Label.displayName;const Jr=y.forwardRef(({className:e,...t},a)=>n.jsx(X.Separator,{ref:a,className:l("my-1 mx-1 h-px bg-border-tertiary",e),...t}));Jr.displayName=X.Separator.displayName;const eo=({className:e,...t})=>n.jsx("span",{className:l("ml-auto text-xs tracking-widest text-text-tertiary",e),...t});eo.displayName="DropdownMenuShortcut";const to=m.createContext(null);function Vu({value:e,children:t}){return n.jsx(to.Provider,{value:e,children:t})}function jt(){return m.useContext(to)??{icons:{}}}function N(e,t){const{icons:a}=jt(),s=a[e];if(s)return n.jsx(s,{className:t,"aria-hidden":!0})}const no=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(Oe,{ref:t,dataStyle:a,dataTheme:s,...e})});no.displayName="DropdownMenuContent";function Gu(e){const t=N("arrowRight","h-4 w-4 shrink-0"),a=e.subTriggerIcon??t;return n.jsx(sa,{...e,subTriggerIcon:a})}const ao=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(ra,{ref:t,dataStyle:a,dataTheme:s,...e})});ao.displayName="DropdownMenuSubContent";const so=fe.Root,qu=fe.Trigger,ro=fe.Portal,oa=y.forwardRef(({className:e,...t},a)=>n.jsx(fe.Overlay,{ref:a,asChild:!0,...t,children:n.jsx(H.motion.div,{className:l("fixed inset-0 z-50 bg-bg-mask/60",e),...on})}));oa.displayName=fe.Overlay.displayName;const Wu=A.cva("font-sans fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-bg-base text-text shadow-lg p-6",{variants:{size:{default:"max-w-lg",sm:"max-w-sm"}},defaultVariants:{size:"default"}}),ia=y.forwardRef(({className:e,children:t,size:a="default",dataStyle:s,dataTheme:r,...o},i)=>{const c=ye(),d=s!==void 0?{"data-style":s,"data-theme":r??c["data-theme"]??""}:c;return n.jsx(ro,{children:n.jsxs("div",{style:{display:"contents"},...d,children:[n.jsx(oa,{}),n.jsx(fe.Content,{ref:i,asChild:!0,...o,children:n.jsx(H.motion.div,{className:l(Wu({size:a}),e),...ta,children:t})})]})})});ia.displayName=fe.Content.displayName;const la=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("flex flex-col gap-2",e),...t}));la.displayName="AlertDialogHeader";const ca=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t}));ca.displayName="AlertDialogFooter";const da=y.forwardRef(({className:e,...t},a)=>n.jsx(fe.Title,{ref:a,className:l("font-sans text-base font-medium leading-6 text-text",e),...t}));da.displayName=fe.Title.displayName;const ua=y.forwardRef(({className:e,...t},a)=>n.jsx(fe.Description,{ref:a,className:l("text-sm leading-6 text-text-tertiary",e),...t}));ua.displayName=fe.Description.displayName;const Uu=A.cva("inline-flex h-9 items-center justify-center rounded px-4 text-sm font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{destructive:{true:"bg-error text-text-on-primary hover:bg-error-hover active:bg-error",false:"bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover"}},defaultVariants:{destructive:!1}}),oo=y.forwardRef(({className:e,destructive:t=!1,...a},s)=>n.jsx(fe.Action,{ref:s,className:l(Uu({destructive:t}),e),...a}));oo.displayName=fe.Action.displayName;const ma=y.forwardRef(({className:e,...t},a)=>n.jsx(fe.Cancel,{ref:a,className:l("inline-flex h-9 items-center justify-center rounded px-4 text-sm font-medium cursor-pointer","bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text","transition-colors focus:outline-none",e),...t}));ma.displayName=fe.Cancel.displayName;const io=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(ia,{ref:t,dataStyle:a,dataTheme:s,...e})});io.displayName="AlertDialogContent";const lo=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("mb-4 inline-flex h-10 w-10 items-center justify-center rounded-lg bg-fill-tertiary text-text",e),...t}));lo.displayName="AlertDialogMedia";function co({className:e,...t}){return n.jsx("kbd",{className:l("pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 !font-sans text-xs font-medium","bg-fill-secondary text-text-secondary","[.tooltip-content_&]:bg-bg-highlight-hover [.tooltip-content_&]:text-text-on-primary","dark:[.tooltip-content_&]:bg-[color:var(--color-bg-base)]/10 dark:[.tooltip-content_&]:text-[var(--color-bg-base)]",e),...t})}co.displayName="Kbd";function uo({className:e,children:t,separator:a="+",...s}){const r=y.Children.toArray(t);return n.jsx("span",{className:l("inline-flex items-center gap-1",e),...s,children:r.map((o,i)=>n.jsxs(y.Fragment,{children:[o,i<r.length-1&&n.jsx("span",{className:"select-none !font-sans text-xs font-medium text-text-secondary",children:a})]},i))})}uo.displayName="KbdGroup";const Qu=A.cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full overflow-hidden border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-fill-secondary",{variants:{size:{md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),Yu=A.cva("pointer-events-none block rounded-full bg-text-on-primary ring-0 transition-transform data-[state=unchecked]:translate-x-0",{variants:{size:{md:"h-4 w-4 data-[state=checked]:translate-x-4",lg:"h-5 w-5 data-[state=checked]:translate-x-4.5"}},defaultVariants:{size:"md"}}),mo=y.forwardRef(({className:e,size:t="md",disabled:a=!1,...s},r)=>n.jsx(us.Root,{ref:r,className:l(Qu({size:t}),e),disabled:a,...s,children:n.jsx(us.Thumb,{className:Yu({size:t})})}));mo.displayName="Switch";const vs={sm:{buttonClass:"w-5 h-5",iconClass:"w-3.5 h-3.5",trackClass:"p-0.5 rounded-md gap-0.5",thumbClass:"w-5 h-5 rounded-sm top-0.5 bottom-0.5",buttonRounded:"rounded-sm"},md:{buttonClass:"w-6 h-6",iconClass:"w-4 h-4",trackClass:"p-0.5 rounded-lg gap-0.5",thumbClass:"w-6 h-6 rounded-md top-0.5 bottom-0.5",buttonRounded:"rounded-md"}};function Xu(e){if(e==="normal"||!e)return 0;const t=parseFloat(e);return e.endsWith("px")?t:e.endsWith("rem")?t*16:t}const pa=y.forwardRef(({variant:e="toggle",className:t,size:a="md",options:s,value:r,defaultValue:o="preview",onValueChange:i,segmentSize:c="md",disabled:d=!1,...u},p)=>{const{style:x,theme:g}=ue(),v={};x&&(v["data-style"]=x),g&&(v["data-theme"]=g);const f=vs[c].iconClass,b=n.jsx(yu,{className:f}),h=n.jsx(yr,{className:f}),[w,k]=y.useState(o),j=y.useRef(null),[I,C]=y.useState({buttonWidth:24,gapPx:2});y.useLayoutEffect(()=>{if(!j.current)return;const $=j.current,ee=$.querySelector("button"),me=ee?Xu(getComputedStyle($).gap):0,Q=ee?.offsetWidth??24;C(Y=>Y.buttonWidth===Q&&Y.gapPx===me?Y:{buttonWidth:Q,gapPx:me})},[x,c,s?.length]);const L=[{value:"code",label:"Code",icon:b},{value:"preview",label:"Preview",icon:h}],z=s?.length?s:L;if(e==="toggle")return n.jsx("div",{ref:p,...v,className:"inline-flex",children:n.jsx(mo,{size:a,className:t,disabled:d,...u})});const S=r!==void 0,O=(S?r:w)??o,re=$=>{d||(S||k($),i?.($))},_=z.findIndex($=>$.value===O),U=_>=0?_:0,le=vs[c],{buttonClass:J,trackClass:G,thumbClass:ae,buttonRounded:ce}=le,R=U*(I.buttonWidth+I.gapPx);return n.jsx("div",{ref:p,...v,className:"inline-flex",children:n.jsxs("div",{ref:j,role:"radiogroup","aria-disabled":d||void 0,className:_e.clsx("relative inline-flex items-center",G,"bg-fill-secondary",d?"opacity-50 cursor-not-allowed":"cursor-pointer",t),...u,children:[n.jsx(H.motion.span,{className:_e.clsx("absolute left-0.5 bg-bg-base shadow-sm",ae),initial:!1,animate:{x:R},transition:{type:"tween",duration:Ce.base,ease:Pe.out}}),z.map($=>{const ee=$.value===O;return n.jsx("button",{type:"button",role:"radio","aria-checked":ee,"aria-label":$.label,disabled:d,onClick:()=>re($.value),className:_e.clsx("relative z-10 inline-flex items-center justify-center",ce,J,"transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-border",ee?"text-primary-active":"text-text-secondary"),children:n.jsx("span",{className:"inline-flex items-center justify-center",children:$.icon})},$.value)})]})})});pa.displayName="Switch";function Zu({size:e="md",value:t,defaultValue:a="preview",onValueChange:s,disabled:r=!1,className:o,...i}){return n.jsx(pa,{variant:"segment",segmentSize:e,value:t,defaultValue:a,onValueChange:s,disabled:r,className:o,...i})}const po=A.cva("inline-flex items-center justify-center gap-1.5 font-medium transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base disabled:pointer-events-none disabled:opacity-50 cursor-pointer data-[state=on]:bg-fill data-[state=on]:text-text",{variants:{variant:{default:"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text data-[state=on]:bg-fill data-[state=on]:text-text",outline:"border border-border-tertiary bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text data-[state=on]:border-border-secondary data-[state=on]:bg-fill data-[state=on]:text-text"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-11 px-4 text-base"},rounded:{square:"rounded",pill:"rounded-full"}},defaultVariants:{variant:"default",size:"md",rounded:"square"}}),xo=m.forwardRef(({variant:e="default",size:t="md",rounded:a="square",className:s,prefixIcon:r,suffixIcon:o,children:i,...c},d)=>n.jsxs(Cd.Root,{ref:d,className:po({variant:e,size:t,rounded:a,className:s}),...c,children:[r&&n.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:r}),i,o&&n.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:o})]}));xo.displayName="Toggle";const fo=m.createContext(null),Ku={none:"gap-0",sm:"gap-1",md:"gap-2"},Ju=["shrink-0","group-data-[spacing=0]/toggle-group:rounded-none","group-data-[spacing=0]/toggle-group:group-data-[orientation=horizontal]/toggle-group:first:rounded-l","group-data-[spacing=0]/toggle-group:group-data-[orientation=horizontal]/toggle-group:last:rounded-r","group-data-[spacing=0]/toggle-group:group-data-[orientation=vertical]/toggle-group:first:rounded-t","group-data-[spacing=0]/toggle-group:group-data-[orientation=vertical]/toggle-group:last:rounded-b","group-data-[spacing=0]/toggle-group:data-[variant=outline]:group-data-[orientation=horizontal]/toggle-group:[&:not(:first-child)]:border-l-0","group-data-[spacing=0]/toggle-group:data-[variant=outline]:group-data-[orientation=vertical]/toggle-group:[&:not(:first-child)]:border-t-0"].join(" "),ho=m.forwardRef(({type:e="single",variant:t="default",size:a="md",rounded:s="square",spacing:r="none",className:o,orientation:i="horizontal",children:c,...d},u)=>{const p=l("group/toggle-group inline-flex w-fit",i==="horizontal"?"flex-row":"flex-col",i==="vertical"&&"items-stretch",Ku[r],o),x={ref:u,orientation:i,"data-spacing":r==="none"?"0":r,"data-orientation":i,"data-variant":t,"data-size":a,className:p};return n.jsx(fo.Provider,{value:{variant:t,size:a,rounded:s,spacing:r},children:e==="multiple"?n.jsx($n.Root,{...x,...d,type:"multiple",children:c}):n.jsx($n.Root,{...x,...d,type:"single",children:c})})});ho.displayName="ToggleGroup";const go=m.forwardRef(({variant:e,size:t,rounded:a,className:s,prefixIcon:r,suffixIcon:o,children:i,...c},d)=>{const u=m.useContext(fo),p=e??u?.variant??"default",x=t??u?.size??"md",g=a??u?.rounded??"square";return n.jsxs($n.Item,{ref:d,"data-variant":p,"data-size":x,className:l(po({variant:p,size:x,rounded:g}),u&&Ju,"focus-visible:z-10",s),...c,children:[r&&n.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:r}),i,o&&n.jsx("span",{className:"inline-flex shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",children:o})]})});go.displayName="ToggleGroupItem";const em=A.cva("grid gap-2",{variants:{orientation:{vertical:"grid-flow-row",horizontal:"grid-flow-col auto-cols-max"}},defaultVariants:{orientation:"vertical"}}),tm=A.cva("shrink-0 rounded-full border border-border-tertiary outline-offset-2 cursor-pointer transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary-border disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-text data-[state=checked]:bg-text data-[state=checked]:text-bg-base",{variants:{size:{sm:"size-3.5",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),nm={sm:"size-1.5",md:"size-2",lg:"size-2.5"},yo=y.forwardRef(({className:e,orientation:t="vertical",...a},s)=>n.jsx(Fn.Root,{ref:s,className:l(em({orientation:t,className:e})),orientation:t??"vertical",...a}));yo.displayName="RadioGroup";const bo=y.forwardRef(({className:e,size:t="md",...a},s)=>n.jsx(Fn.Item,{ref:s,className:l(tm({size:t,className:e})),...a,children:n.jsx(Fn.Indicator,{className:"flex items-center justify-center",children:n.jsx("span",{className:l("rounded-full bg-current",nm[t??"md"])})})}));bo.displayName="RadioGroupItem";const ws=`
|
|
2
2
|
.CollapsibleSection-scroll-list::-webkit-scrollbar { display: none; }
|
|
3
3
|
.CollapsibleSection-scroll-list { scrollbar-width: none; -ms-overflow-style: none; }
|
|
4
|
-
`;function
|
|
5
|
-
.${
|
|
6
|
-
.${
|
|
7
|
-
`;const h=o==="auto",w=o==="always"?"var(--color-fill-secondary)":"transparent",
|
|
8
|
-
.${
|
|
9
|
-
.${
|
|
10
|
-
background-color: ${
|
|
4
|
+
`;function am({maxHeight:e,children:t}){const a=m.useRef(null),[s,r]=m.useState(!1),[o,i]=m.useState(!1),c=m.useCallback(()=>{const d=a.current;if(!d)return;const{scrollTop:u,scrollHeight:p,clientHeight:x}=d;r(u>0),i(u+x<p-1)},[]);return m.useEffect(()=>{const d=a.current;if(!d)return;c();const u=new ResizeObserver(c);return u.observe(d),d.addEventListener("scroll",c,{passive:!0}),()=>{u.disconnect(),d.removeEventListener("scroll",c)}},[e,c]),n.jsxs("div",{className:"relative flex flex-1 min-h-0 flex-col overflow-hidden",children:[n.jsx("div",{ref:a,className:"CollapsibleSection-scroll-list flex flex-1 min-h-0 flex-col overflow-y-auto overflow-x-hidden",style:{maxHeight:e,scrollbarWidth:"none",msOverflowStyle:"none"},children:t}),s&&n.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 pointer-events-none",style:{background:"linear-gradient(to bottom, var(--color-bg-base) 0%, transparent 100%)"},"aria-hidden":!0}),o&&n.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 z-10 pointer-events-none",style:{background:"linear-gradient(to top, var(--color-bg-base) 0%, transparent 100%)"},"aria-hidden":!0})]})}function sm({children:e}){const t=m.useRef(null),[a,s]=m.useState(!1),[r,o]=m.useState(!1),i=m.useCallback(()=>{const c=t.current;if(!c)return;const{scrollTop:d,scrollHeight:u,clientHeight:p}=c;s(d>0),o(d+p<u-1)},[]);return m.useEffect(()=>{const c=t.current;if(!c)return;i();const d=new ResizeObserver(i);return d.observe(c),c.addEventListener("scroll",i,{passive:!0}),()=>{d.disconnect(),c.removeEventListener("scroll",i)}},[i]),n.jsxs("div",{className:"relative flex flex-1 min-h-0 flex-col overflow-hidden",children:[n.jsx("div",{ref:t,className:"CollapsibleSection-scroll-list flex flex-1 min-h-0 flex-col overflow-y-auto overflow-x-hidden",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e}),a&&n.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 pointer-events-none",style:{background:"linear-gradient(to bottom, var(--color-bg-base) 0%, transparent 100%)"},"aria-hidden":!0}),r&&n.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 z-10 pointer-events-none",style:{background:"linear-gradient(to top, var(--color-bg-base) 0%, transparent 100%)"},"aria-hidden":!0})]})}function vo({title:e,description:t,children:a,open:s,onToggle:r,isLast:o=!1,className:i,id:c,contentMaxHeight:d,footer:u}){const p=m.useId(),x=c??`collapsible-section-${p.replace(/:/g,"")}`,g=N("arrowRight","w-4 h-4 text-text-secondary")??n.jsx(dt,{className:"w-4 h-4 text-text-secondary"}),v=a!=null?d!=null?u!=null?n.jsxs(n.Fragment,{children:[n.jsx("style",{dangerouslySetInnerHTML:{__html:ws}}),n.jsxs("div",{className:"flex flex-col flex-1 min-h-0",style:{maxHeight:d},children:[n.jsx(sm,{children:a}),n.jsx("div",{className:"shrink-0",children:u})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("style",{dangerouslySetInnerHTML:{__html:ws}}),n.jsx(am,{maxHeight:d,children:a})]}):n.jsx("div",{className:"flex flex-1 min-h-0 flex-col",children:a}):void 0;return n.jsxs("div",{className:_e.clsx("flex flex-col justify-center self-stretch border-border-tertiary",!o&&"border-b border-dashed",s?"gap-1.5 py-4":"py-4",i),children:[n.jsxs("button",{type:"button",onClick:r,className:_e.clsx("flex flex-row items-center justify-between self-stretch w-full","bg-transparent border-0 cursor-pointer p-0","hover:opacity-90 transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 rounded"),"aria-expanded":s,"aria-controls":x,"aria-label":`${s?"收起":"展开"} ${e}`,children:[n.jsx("span",{className:"font-medium text-sm leading-[var(--font-size-sm--line-height)] text-text-secondary",children:e}),n.jsx("span",{className:_e.clsx("inline-flex items-center justify-center p-1.5 rounded-full","hover:bg-fill-tertiary active:bg-fill-secondary"),"aria-hidden":!0,children:n.jsx(H.motion.span,{className:"inline-flex items-center justify-center",animate:{rotate:s?90:0},transition:$r.snappy,children:g})})]}),n.jsx(H.AnimatePresence,{initial:!1,children:s&&n.jsx(H.motion.div,{id:x,className:"overflow-hidden",initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:Ce.base,ease:Pe.emphasized},children:n.jsxs(H.motion.div,{className:"flex flex-col gap-1.5",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:Ce.fast,ease:Pe.emphasized},children:[t!=null&&n.jsx(H.motion.p,{className:"text-xs leading-[var(--font-size-xs--line-height)] text-text-quaternary w-full max-w-54",initial:{opacity:0},animate:{opacity:1},transition:{duration:Ce.fast,ease:Pe.emphasized},children:t}),v]})},"content")})]})}vo.displayName="CollapsibleSection";const rm=nn.Root,om=nn.CollapsibleTrigger,wo=y.forwardRef(({className:e,...t},a)=>n.jsx(nn.CollapsibleContent,{ref:a,className:l("overflow-hidden",e),...t}));wo.displayName=nn.CollapsibleContent.displayName;const ko=y.forwardRef(function({direction:t="horizontal",className:a,...s},r){return n.jsx(Un.Group,{elementRef:r,orientation:t,className:l("flex h-full w-full",t==="vertical"&&"flex-col",a),...s})});ko.displayName="ResizablePanelGroup";const jo=y.forwardRef(function({className:t,...a},s){return n.jsx(Un.Panel,{elementRef:s,className:l(t),...a})});jo.displayName="ResizablePanel";const No=y.forwardRef(function({withHandle:t=!1,className:a,...s},r){return n.jsx(Un.Separator,{elementRef:r,className:l("relative flex shrink-0 items-center justify-center bg-border-tertiary","after:absolute after:inset-0 after:transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1","data-[resize-handle-active]:bg-border-secondary","aria-[orientation=vertical]:h-full aria-[orientation=vertical]:w-px aria-[orientation=vertical]:cursor-col-resize","aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:cursor-row-resize","[&[aria-orientation=vertical]>div]:h-6 [&[aria-orientation=vertical]>div]:w-1","[&[aria-orientation=horizontal]>div]:h-1 [&[aria-orientation=horizontal]>div]:w-6",a),...s,children:t&&n.jsx("div",{className:"z-10 shrink-0 rounded-lg bg-border-secondary","data-resize-handle":!0})})});No.displayName="ResizableHandle";const we=m.forwardRef(function({children:t,className:a,style:s,maxHeight:r,scrollbarVisibility:o="auto",scrollbarWidth:i=6},c){const u=`Scrollbar-${m.useId().replace(/:/g,"")}`,p=m.useRef(null),[x,g]=m.useState(!1),v=m.useCallback(()=>{o==="auto"&&(g(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null,g(!1)},800))},[o]);m.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const f=()=>{if(o==="hidden")return`
|
|
5
|
+
.${u}::-webkit-scrollbar { display: none; }
|
|
6
|
+
.${u} { scrollbar-width: none; }
|
|
7
|
+
`;const h=o==="auto",w=o==="always"?"var(--color-fill-secondary)":"transparent",k="var(--color-fill-secondary)",j=h?`
|
|
8
|
+
.${u}:hover::-webkit-scrollbar-thumb,
|
|
9
|
+
.${u}.Scrollbar-isScrolling::-webkit-scrollbar-thumb {
|
|
10
|
+
background-color: ${k};
|
|
11
11
|
}
|
|
12
12
|
`:`
|
|
13
|
-
.${
|
|
14
|
-
background-color: ${
|
|
13
|
+
.${u}:hover::-webkit-scrollbar-thumb {
|
|
14
|
+
background-color: ${k};
|
|
15
15
|
}
|
|
16
16
|
`;return`
|
|
17
|
-
.${
|
|
18
|
-
width: ${
|
|
19
|
-
height: ${
|
|
17
|
+
.${u}::-webkit-scrollbar {
|
|
18
|
+
width: ${i}px !important;
|
|
19
|
+
height: ${i}px !important;
|
|
20
20
|
}
|
|
21
|
-
.${
|
|
22
|
-
.${
|
|
21
|
+
.${u}::-webkit-scrollbar-track { background: transparent; }
|
|
22
|
+
.${u}::-webkit-scrollbar-thumb {
|
|
23
23
|
background-color: ${w};
|
|
24
|
-
border-radius: ${Math.max(
|
|
24
|
+
border-radius: ${Math.max(i/2,2)}px;
|
|
25
25
|
min-height: var(--spacing-8);
|
|
26
26
|
transition: background-color 0.2s ease;
|
|
27
27
|
}
|
|
28
|
-
${
|
|
29
|
-
.${
|
|
30
|
-
`},b={...
|
|
28
|
+
${j}
|
|
29
|
+
.${u}::-webkit-scrollbar-corner { background: transparent; }
|
|
30
|
+
`},b={...s,maxHeight:r};return n.jsxs(n.Fragment,{children:[n.jsx("style",{children:f()}),n.jsx("div",{ref:c,className:l(u,"overflow-y-auto",x&&"Scrollbar-isScrolling",a),style:b,onScroll:o==="auto"?v:void 0,children:t})]})});we.displayName="Scrollbar";const im=A.cva("animate-pulse bg-fill-tertiary",{variants:{rounded:{default:"rounded-md",circle:"rounded-full"}},defaultVariants:{rounded:"default"}}),Co=m.forwardRef(({className:e,rounded:t="default",...a},s)=>n.jsx("div",{ref:s,className:l(im({rounded:t}),e),...a}));Co.displayName="Skeleton";const So=m.forwardRef(({text:e,duration:t=2,delay:a=0,repeat:s=!0,repeatDelay:r=.5,startOnView:o=!0,once:i=!1,inViewMargin:c,spread:d=2,color:u,shimmerColor:p,className:x,style:g,...v},f)=>{const b=m.useRef(null),h=H.useInView(b,{once:i,margin:c}),w=o?h:!0,k=m.useMemo(()=>e.length*d,[e,d]),j=u||"var(--color-text-secondary)",I=p||"var(--color-text)",C=m.useMemo(()=>({backgroundImage:`linear-gradient(90deg, transparent calc(50% - ${k}px), ${I}, transparent calc(50% + ${k}px)), linear-gradient(${j}, ${j})`}),[k,I,j]),L=z=>{b.current=z,typeof f=="function"?f(z):f&&(f.current=z)};return n.jsx(H.motion.span,{ref:L,className:l("relative inline-block bg-clip-text text-transparent","bg-[length:250%_100%,auto] bg-no-repeat",x),style:{...C,...g},initial:{backgroundPosition:"100% center"},animate:w?{backgroundPosition:"0% center"}:{backgroundPosition:"100% center"},transition:{repeat:s&&!i?1/0:0,repeatDelay:r,duration:t,delay:a,ease:"linear"},...v,children:e})});So.displayName="ShimmeringText";const xa=m.forwardRef(({className:e,...t},a)=>n.jsx("div",{className:"relative w-full overflow-auto scrollbar-auto",children:n.jsx("table",{ref:a,className:l("w-full caption-bottom text-sm",e),...t})}));xa.displayName="Table";const fa=m.forwardRef(({className:e,...t},a)=>n.jsx("thead",{ref:a,className:l("[&_tr]:border-b border-border-tertiary",e),...t}));fa.displayName="TableHeader";const ha=m.forwardRef(({className:e,...t},a)=>n.jsx("tbody",{ref:a,className:l("[&_tr:last-child]:border-0",e),...t}));ha.displayName="TableBody";const Io=m.forwardRef(({className:e,...t},a)=>n.jsx("tfoot",{ref:a,className:l("border-t border-border-tertiary bg-fill-tertiary font-medium [&>tr]:last:border-b-0",e),...t}));Io.displayName="TableFooter";const ht=m.forwardRef(({className:e,...t},a)=>n.jsx("tr",{ref:a,className:l("border-b border-border-tertiary transition-colors hover:bg-fill-tertiary data-[state=selected]:bg-fill-tertiary",e),...t}));ht.displayName="TableRow";const ga=m.forwardRef(({className:e,...t},a)=>n.jsx("th",{ref:a,className:l("h-10 px-4 text-left align-middle font-medium text-text-secondary [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-0.5",e),...t}));ga.displayName="TableHead";const Qt=m.forwardRef(({className:e,...t},a)=>n.jsx("td",{ref:a,className:l("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-0.5",e),...t}));Qt.displayName="TableCell";const Ro=m.forwardRef(({className:e,...t},a)=>n.jsx("caption",{ref:a,className:l("mt-4 text-sm text-text-secondary",e),...t}));Ro.displayName="TableCaption";const lm=A.cva("relative flex shrink-0 rounded-full",{variants:{size:{sm:"h-8 w-8",default:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"default"}}),To=y.forwardRef(({className:e,size:t="default",...a},s)=>n.jsx(ct.Root,{ref:s,className:l(lm({size:t}),e),...a}));To.displayName=ct.Root.displayName;const Mo=y.forwardRef(({className:e,...t},a)=>n.jsx(ct.Image,{ref:a,className:l("aspect-square h-full w-full overflow-hidden rounded-full object-cover",e),...t}));Mo.displayName=ct.Image.displayName;const Po=y.forwardRef(({className:e,...t},a)=>n.jsx(ct.Fallback,{ref:a,className:l("flex h-full w-full items-center justify-center overflow-hidden rounded-full bg-fill-tertiary text-sm font-medium text-text",e),...t}));Po.displayName=ct.Fallback.displayName;const zo=y.forwardRef(({className:e,...t},a)=>n.jsx("span",{ref:a,className:l("absolute bottom-0 right-0 z-10 block h-3 w-3 rounded-full border-2 border-bg-base bg-success",e),...t}));zo.displayName="AvatarBadge";const Lo=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("flex -space-x-2 [&>*]:ring-2 [&>*]:ring-bg-base",e),...t}));Lo.displayName="AvatarGroup";const Do=y.forwardRef(({className:e,...t},a)=>n.jsx("span",{ref:a,className:l("inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full border-2 border-bg-base bg-fill-tertiary text-sm font-medium text-text",e),...t}));Do.displayName="AvatarGroupCount";const Ao="2px",Hn="8px",cm="8px",ks="12px",dm=`[data-sonner-toaster] [data-sonner-toast][data-styled="true"] { padding-left: ${Hn} !important; padding-right: ${Hn} !important; padding-top: ${ks} !important; padding-bottom: ${ks} !important; font-size: var(--font-size-sm) !important; line-height: var(--font-size-sm--line-height) !important; }
|
|
31
31
|
[data-sonner-toaster] [data-sonner-toast] [data-content] { flex: 1 !important; min-width: 0 !important; }
|
|
32
|
-
[data-sonner-toaster] [data-sonner-toast] [data-button]:not(:first-of-type) { margin-left: ${Su} !important; }`,sn={className:"text-sm",style:{padding:`var(--spacing-3) ${Sa}`,gap:io,background:"var(--color-bg-container)",borderColor:"var(--color-border-tertiary)",color:"var(--color-text)"},descriptionClassName:"text-xs text-text-secondary",actionButtonStyle:{borderRadius:"var(--radius)",paddingLeft:"var(--spacing-2)",paddingRight:"var(--spacing-2)",height:"var(--spacing-7)",fontSize:"var(--font-size-xs)"},cancelButtonStyle:{borderRadius:"var(--radius)",paddingLeft:"var(--spacing-2)",paddingRight:"var(--spacing-2)",height:"var(--spacing-7)",fontSize:"var(--font-size-xs)"}},Ru=14,zu=3,Tu={right:8,left:8,top:24,bottom:24};function lo({theme:e,toastOptions:a,dataStyle:s,dataTheme:n,icons:r,gap:o=Ru,visibleToasts:l=zu,offset:c=Tu,...d}){const m=ge(),p=s!==void 0||n!==void 0?{"data-style":s,"data-theme":n}:m,x=e??(typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light"),g=t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:Iu}}),t.jsx("div",{style:{display:"contents"},...p,children:t.jsx(Sn.Toaster,{theme:x,closeButton:!0,icons:r,gap:o,visibleToasts:l,offset:c,toastOptions:{...sn,...a,style:{...sn.style,...a?.style}},style:{"--border-radius":"var(--radius-lg)",fontFamily:"inherit","--gap":`${o}px`,"--toast-icon-margin-start":"0","--toast-icon-margin-end":io,"--toast-button-margin-start":"auto","--toast-button-margin-end":"0"},...d})})]});return typeof document<"u"?Cn.createPortal(g,document.body):null}lo.displayName="Toaster";const Fe="w-[var(--font-size-xl)] h-[var(--font-size-xl)] shrink-0",nn="w-3.5 h-3.5 shrink-0 text-text-tertiary";function co({theme:e,toastOptions:a,dataStyle:s,dataTheme:n,...r}){const o=de(),l=s??o.style,c=n??o.theme,d=N("checkboxCircle",Fe),m=N("closeCircle",Fe),p=N("warning",Fe),x=N("close",nn),g=u.useMemo(()=>({success:d??t.jsx(Qt,{className:Fe}),error:m??t.jsx(ir,{className:Fe}),warning:p??t.jsx(mt,{className:Fe}),loading:t.jsx(Ya,{className:Fe}),close:x??t.jsx(Ce,{className:nn})}),[d,m,p,x]),v=u.useMemo(()=>({...a,style:{gap:"2px",...a?.style},classNames:{actionButton:ut({variant:"primary",size:"sm",rounded:"square"}),cancelButton:ut({variant:"tertiary",size:"sm",rounded:"square"}),...a?.classNames}}),[a]);return t.jsx(lo,{theme:e,dataStyle:l,dataTheme:c,icons:g,toastOptions:v,...r})}co.displayName="Toaster";const Xe="outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none focus-visible:!ring-0 focus-visible:outline-offset-0 focus-visible:!outline-offset-0 focus-visible:ring-offset-0 focus-visible:!ring-offset-0",uo=oe.Root,Lu=oe.Group,mo=oe.Value,as=y.forwardRef(({className:e,children:a,disabled:s,triggerIcon:n,...r},o)=>t.jsxs(oe.Trigger,{ref:o,disabled:s,className:i("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-lg border border-border-tertiary bg-bg-container px-3 py-2 text-sm text-text placeholder:text-muted-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus:border-border-secondary focus-visible:border-border-secondary data-[state=open]:border-border-secondary",Xe,e),...r,children:[a,t.jsx(oe.Icon,{asChild:!0,children:t.jsx("span",{className:"pointer-events-none flex shrink-0 text-current [&>svg]:text-current",children:n??t.jsx(be,{className:"h-[1em] w-[1em] shrink-0"})})})]}));as.displayName=oe.Trigger.displayName;const ss=y.forwardRef(({className:e,scrollUpIcon:a,...s},n)=>t.jsx(oe.ScrollUpButton,{ref:n,className:i("flex cursor-default items-center justify-center py-1",Xe,e),...s,children:a??t.jsx(Ea,{className:"h-[1em] w-[1em]"})}));ss.displayName=oe.ScrollUpButton.displayName;const ns=y.forwardRef(({className:e,scrollDownIcon:a,...s},n)=>t.jsx(oe.ScrollDownButton,{ref:n,className:i("flex cursor-default items-center justify-center py-1",Xe,e),...s,children:a??t.jsx(be,{className:"h-[1em] w-[1em]"})}));ns.displayName=oe.ScrollDownButton.displayName;const rs=y.forwardRef(({className:e,children:a,position:s="popper",sideOffset:n=4,dataStyle:r,dataTheme:o,...l},c)=>{const d=ge(),m=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return t.jsx(oe.Portal,{children:t.jsxs(oe.Content,{ref:c,className:i("relative z-[60] max-h-96 min-w-32 overflow-hidden rounded-lg border border-border-tertiary bg-bg-container p-1 text-text shadow-lg",Xe,"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),position:s,sideOffset:n,...m,...l,children:[t.jsx(ss,{}),t.jsx(oe.Viewport,{className:i(Xe,s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),t.jsx(ns,{})]})})});rs.displayName=oe.Content.displayName;const po=y.forwardRef(({className:e,...a},s)=>t.jsx(oe.Label,{ref:s,className:i("flex h-9 items-center px-3 text-sm font-semibold text-text-secondary",e),...a}));po.displayName=oe.Label.displayName;const lt=y.forwardRef(({className:e,children:a,itemIndicatorIcon:s,...n},r)=>t.jsxs(oe.Item,{ref:r,className:i("relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm pl-3 pr-8 text-sm transition-colors",Xe,"hover:bg-fill-secondary data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text data-[state=checked]:bg-fill-secondary data-[state=checked]:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[t.jsx("span",{className:"absolute right-3 flex h-[1em] w-[1em] items-center justify-center",children:t.jsx(oe.ItemIndicator,{children:s??t.jsx(ye,{className:"h-[1em] w-[1em]"})})}),t.jsx(oe.ItemText,{children:a})]}));lt.displayName=oe.Item.displayName;const xo=y.forwardRef(({className:e,...a},s)=>t.jsx(oe.Separator,{ref:s,className:i("my-1 mx-1 h-px bg-border-tertiary",e),...a}));xo.displayName=oe.Separator.displayName;const fo=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(rs,{ref:a,dataStyle:s,dataTheme:n,...e})});fo.displayName="SelectContent";const Mu=Ve.Root,Pu=F.cva("inline-flex items-center justify-center text-text-secondary data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",{variants:{variant:{default:"rounded-lg bg-fill-secondary p-0.5 gap-0.5",line:"gap-6 border-b border-border-tertiary bg-transparent p-0"}},defaultVariants:{variant:"default"}}),Au=F.cva("inline-flex items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-text cursor-pointer data-[orientation=vertical]:justify-start data-[orientation=vertical]:rounded-md data-[orientation=vertical]:px-3 data-[orientation=vertical]:py-2",{variants:{variant:{default:"rounded-md px-3 py-1.5 data-[state=active]:bg-bg-container data-[state=active]:shadow-sm",line:"rounded-none border-b-2 border-transparent px-1 pb-2 pt-0 data-[state=active]:border-primary data-[state=active]:shadow-none"}},defaultVariants:{variant:"default"}}),ho=y.forwardRef(({className:e,variant:a="default",...s},n)=>t.jsx(Ve.List,{ref:n,className:i(Pu({variant:a}),e),...s}));ho.displayName=Ve.List.displayName;const go=y.forwardRef(({className:e,variant:a="default",...s},n)=>t.jsx(Ve.Trigger,{ref:n,className:i(Au({variant:a}),e),...s}));go.displayName=Ve.Trigger.displayName;const yo=y.forwardRef(({className:e,...a},s)=>t.jsx(Ve.Content,{ref:s,className:i("mt-2 outline-none ring-0 data-[state=inactive]:hidden","data-[orientation=vertical]:mt-0 data-[orientation=vertical]:ml-2",e),...a}));yo.displayName=Ve.Content.displayName;const bo=y.forwardRef(({className:e,...a},s)=>t.jsx(dt.Root,{ref:s,className:i("w-full font-sans",e),"data-slot":"collapse",...a}));bo.displayName="Collapse";const vo=y.forwardRef(({className:e,...a},s)=>t.jsx(dt.Item,{ref:s,className:i("border-b border-border-tertiary last:border-b-0 data-[orientation=horizontal]:border-b-0 data-[orientation=horizontal]:border-r data-[orientation=horizontal]:border-border-tertiary data-[orientation=horizontal]:last:border-r-0",e),"data-slot":"collapse-item",...a}));vo.displayName="CollapseItem";const wo=y.forwardRef(({className:e,children:a,chevronIcon:s,...n},r)=>t.jsx(dt.Header,{className:"flex font-sans",children:t.jsxs(dt.Trigger,{ref:r,className:i("group flex flex-1 items-center justify-between gap-2 py-3 text-left text-sm font-medium text-text font-sans transition-colors outline-none","hover:text-text-secondary focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50","data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:justify-between data-[orientation=horizontal]:py-4 data-[orientation=horizontal]:text-left",e),"data-slot":"collapse-trigger",...n,children:[a,t.jsx("span",{className:"shrink-0 inline-flex transition-transform duration-200 group-data-[state=open]:rotate-180","aria-hidden":!0,children:s??t.jsx(be,{className:"size-4 text-text-secondary"})})]})}));wo.displayName="CollapseTrigger";const ko=y.forwardRef(({className:e,children:a,...s},n)=>t.jsx(dt.Content,{ref:n,className:i("overflow-hidden text-sm text-text-secondary font-sans data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down","data-[orientation=horizontal]:data-[state=closed]:animate-accordion-left data-[orientation=horizontal]:data-[state=open]:animate-accordion-right",e),"data-slot":"collapse-content",...s,children:t.jsx("div",{className:"pb-3 pt-0 data-[orientation=horizontal]:pb-0 data-[orientation=horizontal]:pl-0 data-[orientation=horizontal]:pr-3",children:a})}));ko.displayName="CollapseContent";function jo({className:e,...a}){return t.jsx("h1",{className:i("font-sans scroll-m-20 text-4xl font-extrabold tracking-tight text-balance text-text",e),...a})}jo.displayName="TypographyH1";function No({className:e,...a}){return t.jsx("h2",{className:i("font-sans scroll-m-20 border-b border-border-tertiary pb-2 text-3xl font-semibold tracking-tight first:mt-0 text-text",e),...a})}No.displayName="TypographyH2";function Co({className:e,...a}){return t.jsx("h3",{className:i("font-sans scroll-m-20 text-2xl font-semibold tracking-tight text-text",e),...a})}Co.displayName="TypographyH3";function So({className:e,...a}){return t.jsx("h4",{className:i("font-sans scroll-m-20 text-xl font-semibold tracking-tight text-text",e),...a})}So.displayName="TypographyH4";function Io({className:e,...a}){return t.jsx("p",{className:i("font-sans leading-7 text-text [&:not(:first-child)]:mt-6",e),...a})}Io.displayName="TypographyP";function Ro({className:e,...a}){return t.jsx("blockquote",{className:i("font-sans mt-6 border-l-2 border-border-tertiary pl-6 italic text-text-secondary",e),...a})}Ro.displayName="TypographyBlockquote";function zo({className:e,children:a,...s}){return t.jsx(ve,{scrollbarVisibility:"auto",className:i("font-sans my-6 w-full",e),children:a})}zo.displayName="TypographyTable";function To({className:e,...a}){return t.jsx("ul",{className:i("font-sans my-6 ml-6 list-disc text-text [&>li]:mt-2",e),...a})}To.displayName="TypographyList";function Lo({className:e,...a}){return t.jsx("code",{className:i("relative rounded bg-fill-secondary px-1 py-0.5 font-mono text-sm font-semibold text-text",e),...a})}Lo.displayName="TypographyInlineCode";function Mo({className:e,...a}){return t.jsx("p",{className:i("font-sans text-xl text-muted-foreground",e),...a})}Mo.displayName="TypographyLead";function Po({className:e,...a}){return t.jsx("div",{className:i("font-sans text-lg font-semibold text-text",e),...a})}Po.displayName="TypographyLarge";function Ao({className:e,...a}){return t.jsx("small",{className:i("font-sans text-sm font-medium leading-none text-text",e),...a})}Ao.displayName="TypographySmall";function Do({className:e,...a}){return t.jsx("p",{className:i("font-sans text-sm text-muted-foreground",e),...a})}Do.displayName="TypographyMuted";const _o=y.forwardRef(({className:e,...a},s)=>{const n=a.value??a.defaultValue??[50];return t.jsxs(Rt.Root,{ref:s,className:i("relative flex w-full touch-none select-none cursor-pointer items-center","data-[orientation=vertical]:flex-col data-[orientation=vertical]:w-auto data-[orientation=vertical]:h-full",e),...a,children:[t.jsx(Rt.Track,{className:i("relative grow overflow-hidden rounded-full bg-fill-secondary","data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full","data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full"),children:t.jsx(Rt.Range,{className:i("absolute rounded-full bg-primary","data-[orientation=horizontal]:h-full","data-[orientation=vertical]:w-full")})}),n.map((r,o)=>t.jsx(Rt.Thumb,{className:i("block size-5 rounded-full border-2 border-primary bg-bg-base shadow-sm","transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50")},o))]})});_o.displayName="Slider";const Eo=({className:e,...a})=>t.jsx("nav",{role:"navigation","aria-label":"pagination",className:i("flex w-full justify-center",e),...a});Eo.displayName="Pagination";const Fo=y.forwardRef(({className:e,...a},s)=>t.jsx("ul",{ref:s,className:i("flex flex-row flex-wrap items-center gap-2",e),...a}));Fo.displayName="PaginationContent";const $o=y.forwardRef(({className:e,...a},s)=>t.jsx("li",{ref:s,className:i("list-none",e),...a}));$o.displayName="PaginationItem";const Oo=y.forwardRef(({className:e,isActive:a,...s},n)=>t.jsx("a",{ref:n,"aria-current":a?"page":void 0,className:i("inline-flex min-w-9 h-9 items-center justify-center rounded-md border text-sm font-medium transition-colors","border-border-tertiary bg-bg-container text-text","hover:bg-fill-secondary hover:text-text hover:border-border-tertiary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50",a&&"bg-fill-secondary border-border-tertiary text-text",e),...s}));Oo.displayName="PaginationLink";const Bo=y.forwardRef(({className:e,text:a="Previous",...s},n)=>t.jsxs("a",{ref:n,"aria-label":"Go to previous page",className:i("inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors","border-border-tertiary bg-bg-container text-text","hover:bg-fill-secondary hover:text-text hover:border-border-tertiary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50",e),...s,children:[t.jsx(Wd,{className:"h-4 w-4 shrink-0"}),t.jsx("span",{className:"hidden sm:inline",children:a})]}));Bo.displayName="PaginationPrevious";const Vo=y.forwardRef(({className:e,text:a="Next",...s},n)=>t.jsxs("a",{ref:n,"aria-label":"Go to next page",className:i("inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors","border-border-tertiary bg-bg-container text-text","hover:bg-fill-secondary hover:text-text hover:border-border-tertiary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50",e),...s,children:[t.jsx("span",{className:"hidden sm:inline",children:a}),t.jsx(at,{className:"h-4 w-4 shrink-0"})]}));Vo.displayName="PaginationNext";const Ho=({className:e,...a})=>t.jsx("span",{role:"presentation","aria-hidden":!0,className:i("flex h-9 w-9 shrink-0 items-center justify-center text-text-secondary",e),...a,children:"…"});Ho.displayName="PaginationEllipsis";const Go=F.cva("inline-flex items-center justify-center gap-1.5 rounded-md border px-2.5 py-0.5 text-xs font-medium transition-colors whitespace-nowrap cursor-pointer group",{variants:{appearance:{filled:"",outline:"bg-transparent"},color:{primary:"",success:"",error:"",warning:"",info:"",link:"",pink:"",purple:"",yellow:"",orange:"",teal:"",blue:"",mauve:"",slate:"",lavender:"",sage:""}},compoundVariants:[{appearance:"filled",color:"primary",className:"border-transparent bg-primary text-text-on-primary hover:bg-primary-hover"},{appearance:"filled",color:"success",className:"border-transparent bg-success-bg text-success border-success-border hover:bg-success-bg-hover"},{appearance:"filled",color:"error",className:"border-transparent bg-error-bg text-error border-error-border hover:bg-error-bg-hover"},{appearance:"filled",color:"warning",className:"border-transparent bg-warning-bg text-warning border-warning-border hover:bg-warning-bg-hover"},{appearance:"filled",color:"info",className:"border-transparent bg-info-bg text-info border-info-border hover:bg-info-bg-hover"},{appearance:"filled",color:"link",className:"border-transparent bg-transparent text-link underline-offset-4 hover:underline hover:text-link"},{appearance:"filled",color:"pink",className:"border-transparent bg-pink-bg text-pink hover:bg-pink-bg-hover"},{appearance:"filled",color:"purple",className:"border-transparent bg-purple-bg text-purple hover:bg-purple-bg-hover"},{appearance:"filled",color:"yellow",className:"border-transparent bg-yellow-bg text-yellow hover:bg-yellow-bg-hover"},{appearance:"filled",color:"orange",className:"border-transparent bg-orange-bg text-orange hover:bg-orange-bg-hover"},{appearance:"filled",color:"teal",className:"border-transparent bg-teal-bg text-teal hover:bg-teal-bg-hover"},{appearance:"filled",color:"blue",className:"border-transparent bg-blue-bg text-blue hover:bg-blue-bg-hover"},{appearance:"filled",color:"mauve",className:"border-transparent bg-mauve-bg text-mauve hover:bg-mauve-bg-hover"},{appearance:"filled",color:"slate",className:"border-transparent bg-slate-bg text-slate hover:bg-slate-bg-hover"},{appearance:"filled",color:"lavender",className:"border-transparent bg-lavender-bg text-lavender hover:bg-lavender-bg-hover"},{appearance:"filled",color:"sage",className:"border-transparent bg-sage-bg text-sage hover:bg-sage-bg-hover"},{appearance:"outline",color:"primary",className:"border-primary-border text-primary hover:bg-primary-bg"},{appearance:"outline",color:"success",className:"border-success-border text-success hover:bg-success-bg"},{appearance:"outline",color:"error",className:"border-error-border text-error hover:bg-error-bg"},{appearance:"outline",color:"warning",className:"border-warning-border text-warning hover:bg-warning-bg"},{appearance:"outline",color:"info",className:"border-info-border text-info hover:bg-info-bg"},{appearance:"outline",color:"link",className:"border-transparent text-link underline-offset-4 hover:underline hover:text-link"},{appearance:"outline",color:"pink",className:"border-pink text-pink hover:bg-pink-bg"},{appearance:"outline",color:"purple",className:"border-purple text-purple hover:bg-purple-bg"},{appearance:"outline",color:"yellow",className:"border-yellow text-yellow hover:bg-yellow-bg"},{appearance:"outline",color:"orange",className:"border-orange text-orange hover:bg-orange-bg"},{appearance:"outline",color:"teal",className:"border-teal text-teal hover:bg-teal-bg"},{appearance:"outline",color:"blue",className:"border-blue text-blue hover:bg-blue-bg"},{appearance:"outline",color:"mauve",className:"border-mauve text-mauve hover:bg-mauve-bg"},{appearance:"outline",color:"slate",className:"border-slate text-slate hover:bg-slate-bg"},{appearance:"outline",color:"lavender",className:"border-lavender text-lavender hover:bg-lavender-bg"},{appearance:"outline",color:"sage",className:"border-sage text-sage hover:bg-sage-bg"}],defaultVariants:{appearance:"filled",color:"primary"}}),os=y.forwardRef(({className:e,appearance:a="filled",color:s="primary",closable:n=!1,onClose:r,closeAriaLabel:o="Close tag",closeIcon:l,children:c,onMouseEnter:d,onMouseLeave:m,...p},x)=>{const[g,v]=y.useState(!1),f=n&&typeof r=="function",b=k=>{f&&v(!0),d?.(k)},h=k=>{f&&v(!1),m?.(k)},w=k=>{k.preventDefault(),k.stopPropagation(),r?.(k)},j=k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),k.stopPropagation(),r?.(k))};return t.jsxs("span",{ref:x,className:i(Go({appearance:a,color:s}),f&&"gap-0 pr-1.5",e),onMouseEnter:b,onMouseLeave:h,...p,children:[c,f&&t.jsx(V.motion.div,{"aria-hidden":!0,initial:!1,animate:{width:g?16:0,marginLeft:g?2:0,opacity:g?1:0},transition:{duration:.2,ease:[.4,0,.2,1]},className:"flex min-w-0 shrink-0 overflow-hidden",style:{pointerEvents:g?"auto":"none"},children:t.jsx("button",{type:"button","aria-label":o,className:"inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm text-current/80 hover:text-current focus:outline-none",onClick:w,onKeyDown:j,children:l??t.jsx(er,{className:"h-3 w-3"})})})]})});os.displayName="Tag";const qo=y.forwardRef(({className:e,value:a,max:s=100,...n},r)=>{const o=a!=null?Math.min(s,Math.max(0,a)):void 0;return t.jsx(Us.Root,{ref:r,value:o??null,max:s,className:i("relative h-1 w-full overflow-hidden rounded-full bg-fill-secondary",e),style:{height:4},...n,children:t.jsx(Us.Indicator,{className:"h-full rounded-full bg-success transition-[width] duration-200 ease-out",style:{width:o!=null?`${o/s*100}%`:"0%"}})})});qo.displayName="Progress";const Du=124;function Se({headerIcon:e,headerTitle:a,headerRight:s,children:n,defaultExpanded:r=!0,contentPadding:o="var(--spacing-1.5) var(--spacing-2)",onToggle:l,collapsible:c=!0,footer:d,contentMaxHeight:m,showExpandAllBar:p=!1,maxHeight:x=Du,titleShimmer:g=!1,className:v}){const[f,b]=u.useState(r),[h,w]=u.useState(!1),[j,k]=u.useState(!1),[T,S]=u.useState(!1),[P,A]=u.useState(0),[I,_]=u.useState(p&&r),[ne,D]=u.useState(!1),q=u.useRef(null);u.useLayoutEffect(()=>{if(!p||!f){S(!1),A(0),_(!1);return}_(!0);const O=()=>{const U=q.current;if(!U)return;const Q=U.scrollHeight;A(Q),S(Q>x),_(!1)},J=requestAnimationFrame(O);let ue=null;return q.current&&(ue=new ResizeObserver(O),ue.observe(q.current)),()=>{cancelAnimationFrame(J),ue?.disconnect()}},[p,f,n,x]);const ie=()=>{if(!c)return;const O=!f;D(!0),O&&p&&_(!0),b(O),l?.(O),setTimeout(()=>D(!1),300)},G=c&&(h||e==null)?t.jsx(be,{className:i("w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 transition-transform duration-200 text-text-secondary",f?"rotate-0":"-rotate-90")}):e,ae=p&&f&&!m,le=ae&&(I||T&&!j||ne||!T&&P===0),C=m!=null?`${m}px`:le?`${x}px`:ae&&T&&j&&P>0?`${Math.max(P+50,2e3)}px`:void 0;return t.jsxs("div",{className:i("rounded-md overflow-hidden border border-border-tertiary bg-fill-tertiary relative",v),children:[t.jsxs("div",{className:i("flex flex-row items-center gap-2 px-2 py-1.5 select-none",f&&"border-b border-border-tertiary"),onMouseEnter:()=>c&&w(!0),onMouseLeave:()=>c&&w(!1),children:[t.jsxs("div",{className:i("flex flex-row items-center gap-2 flex-1 min-w-0",c&&"cursor-pointer"),onClick:ie,role:c?"button":void 0,"aria-expanded":c?f:void 0,children:[t.jsx("div",{className:"w-[var(--font-size-sm)] h-[var(--font-size-sm)] flex items-center justify-center shrink-0 text-text-secondary [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",children:G}),t.jsx("div",{className:"min-w-0 flex-1 flex items-center text-xs leading-xs text-text-secondary",children:g?t.jsx("span",{className:"animate-pulse",children:a}):a})]}),s!=null&&t.jsx("div",{className:"flex items-center gap-1.5 shrink-0 relative z-10",onClick:O=>O.stopPropagation(),onMouseDown:O=>O.stopPropagation(),children:s})]}),t.jsx(V.AnimatePresence,{initial:!1,children:f&&t.jsxs(V.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.2,.8,.2,1]},className:i("overflow-hidden",ne&&"select-none"),children:[ae&&t.jsx("div",{ref:q,className:"absolute invisible h-auto w-full pointer-events-none",style:{padding:o},"aria-hidden":!0,children:n}),t.jsxs("div",{className:i("relative overflow-x-hidden bg-bg-base scrollbar-auto",m!=null?"overflow-y-auto":le?"overflow-y-hidden":"overflow-y-visible",T&&"transition-[max-height] duration-300 ease-in-out"),style:{padding:o,maxHeight:C},children:[n,ae&&T&&P>x&&t.jsx("div",{className:i("absolute bottom-0 left-0 right-0 pointer-events-none h-6 bg-gradient-to-b from-transparent to-[var(--color-bg-base)] transition-opacity duration-300",j?"opacity-0":"opacity-100")})]}),ae&&T&&t.jsx("button",{type:"button",className:"w-full h-4 flex items-center justify-center bg-bg-base border-0 cursor-pointer text-text-secondary hover:text-text transition-colors",onClick:O=>{O.stopPropagation(),D(!0),k(J=>!J),setTimeout(()=>D(!1),300)},"aria-label":j?"收起":"展开全部",children:t.jsx(be,{className:i("w-[var(--font-size-sm)] h-[var(--font-size-sm)] transition-transform duration-200",j?"rotate-180":"rotate-0")})})]})}),d!=null&&t.jsx("div",{className:"flex flex-row items-center gap-2 px-2 py-1.5 border-t border-border-tertiary",children:d})]})}Se.displayName="CollapsibleCard";const _u="w-4 h-4",Uo=u.forwardRef(({items:e,selectedId:a,onItemClick:s,width:n="w-52",className:r,moreIcon:o,...l},c)=>{const[d,m]=u.useState(null),p="flex flex-col gap-1.5 rounded-md bg-transparent",x=o??t.jsx(Oa,{className:_u});return t.jsx("div",{ref:c,className:i(p,n,r),...l,children:e.map(g=>{const v=a===g.id,f=g.disabled,b=d===g.id;return t.jsxs("div",{className:i("group flex items-center gap-2 py-1 px-2 rounded-md text-sm leading-sm transition-colors","focus-within:outline-none min-w-0",f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer",v?"bg-fill-secondary text-text":"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text"),children:[t.jsx("button",{onClick:()=>{f||s?.(g),m(null)},disabled:f,className:"flex-1 text-left truncate min-w-0 outline-none bg-transparent border-none p-0 cursor-pointer",children:g.label}),g.actions&&g.actions.length>0?t.jsx("div",{onClick:h=>h.stopPropagation(),children:t.jsxs($e,{open:b,onOpenChange:h=>{m(h?g.id:null)},children:[t.jsx(Oe,{asChild:!0,children:t.jsx("button",{className:i("flex items-center justify-center p-1 rounded outline-none transition-all duration-200 relative z-10 cursor-pointer hover:bg-fill-primary"),style:{pointerEvents:"auto"},onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),children:t.jsx("span",{className:i("transition-opacity pointer-events-none flex items-center justify-center",v?"opacity-100":"opacity-0 group-hover:opacity-100"),children:g.icon??t.jsx("span",{className:i("w-4 h-4 inline-flex items-center justify-center",v?"text-text":"text-text-secondary"),children:x})})})}),t.jsx(Me,{align:"end",children:g.actions.map(h=>t.jsxs(je,{variant:h.destructive?"destructive":"default",onClick:w=>{w.stopPropagation(),m(null),h.onClick?.()},children:[h.icon&&t.jsx("span",{className:"mr-2 w-4 h-4 flex items-center justify-center",children:h.icon}),h.label]},h.id))})]})}):t.jsx("span",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:h=>h.stopPropagation(),children:g.icon?t.jsx("span",{className:i("transition-opacity pointer-events-none",v?"opacity-100":"opacity-0 group-hover:opacity-100"),children:g.icon}):t.jsx("span",{className:i("w-4 h-4 inline-flex items-center justify-center transition-opacity pointer-events-none",v?"opacity-100 text-text":"opacity-0 group-hover:opacity-100 text-text-secondary"),children:x})})]},g.id)})})});Uo.displayName="SidebarMenu";const Eu="w-4 h-4",Qo=u.forwardRef((e,a)=>{const s=N("more",Eu);return t.jsx(Uo,{ref:a,moreIcon:s,...e})});Qo.displayName="SidebarMenu";const xt=y.forwardRef(({className:e,type:a,...s},n)=>t.jsx("input",{type:a,ref:n,className:i("flex h-9 w-full min-w-0 rounded-lg border border-border-tertiary bg-bg-container px-3 py-1 text-sm text-text transition-colors","placeholder:text-text-tertiary","file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-text","outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0","focus:border-border-secondary focus-visible:border-border-secondary","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:ring-0",e),...s}));xt.displayName="Input";const is=y.forwardRef(({className:e,...a},s)=>t.jsx("textarea",{ref:s,className:i("flex min-h-16 w-full rounded-lg border border-border-tertiary bg-bg-container px-3 py-2 text-sm text-text transition-colors","placeholder:text-text-tertiary","outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0","focus:border-border-secondary focus-visible:border-border-secondary","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:ring-0",e),...a}));is.displayName="Textarea";function Fu({className:e,...a}){return t.jsx("div",{"data-slot":"input-group",role:"group",className:i("group/input-group relative flex w-full items-center rounded-md border border-border-tertiary shadow-sm transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-primary-border has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-primary-border/50","has-[[data-slot][aria-invalid=true]]:border-error has-[[data-slot][aria-invalid=true]]:ring-error/20 dark:has-[[data-slot][aria-invalid=true]]:ring-error/40",e),...a})}const $u=F.cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-text-tertiary select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function Ou({className:e,align:a="inline-start",...s}){return t.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:i($u({align:a}),e),onClick:n=>{n.target.closest("button")||n.currentTarget.parentElement?.querySelector("input")?.focus()},...s})}const Bu=F.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Vu({className:e,type:a="button",variant:s="ghost",size:n="xs",...r}){return t.jsx(W,{type:a,"data-size":n,variant:s,className:i(Bu({size:n}),e),...r})}function Hu({className:e,...a}){return t.jsx("span",{className:i("flex items-center gap-2 text-sm text-text-tertiary [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}function Gu({className:e,...a}){return t.jsx(xt,{"data-slot":"input-group-control",className:i("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...a})}function qu({className:e,...a}){return t.jsx(is,{"data-slot":"input-group-control",className:i("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...a})}function Uu({className:e,containerClassName:a,...s}){return t.jsx(Rn.OTPInput,{"data-slot":"input-otp",containerClassName:i("flex items-center gap-2 has-disabled:opacity-50",a),className:i("disabled:cursor-not-allowed",e),...s})}function Qu({className:e,...a}){return t.jsx("div",{"data-slot":"input-otp-group",className:i("flex items-center",e),...a})}function Wu({index:e,className:a,...s}){const n=y.useContext(Rn.OTPInputContext),{char:r,hasFakeCaret:o,isActive:l}=n?.slots[e]??{};return t.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:i("relative flex h-9 w-9 items-center justify-center border-y border-r border-border-tertiary text-sm shadow-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-error data-[active=true]:z-10 data-[active=true]:border-primary-border data-[active=true]:ring-[3px] data-[active=true]:ring-primary-border/50 data-[active=true]:aria-invalid:border-error data-[active=true]:aria-invalid:ring-error/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-error/40",a),...s,children:[r,o&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})}function Zu({...e}){return t.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:t.jsx(he.MinusIcon,{})})}const ls=y.forwardRef(({className:e,...a},s)=>t.jsx(zn.Root,{ref:s,className:i("flex items-center gap-2 text-sm font-medium leading-none text-text","peer-disabled:cursor-not-allowed peer-disabled:opacity-50","has-[[disabled]]:cursor-not-allowed has-[[disabled]]:opacity-50",e),...a}));ls.displayName=zn.Root.displayName;const Zt=y.forwardRef(({className:e,orientation:a="horizontal",decorative:s=!0,...n},r)=>t.jsx(Tn.Root,{ref:r,decorative:s,orientation:a,className:i("shrink-0 bg-border-tertiary","data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n}));Zt.displayName=Tn.Root.displayName;function Ku({className:e,...a}){return t.jsx("fieldset",{"data-slot":"field-set",className:i("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...a})}function Yu({className:e,variant:a="legend",...s}){return t.jsx("legend",{"data-slot":"field-legend","data-variant":a,className:i("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",e),...s})}function Xu({className:e,...a}){return t.jsx("div",{"data-slot":"field-group",className:i("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),...a})}const Ju=F.cva("group/field flex w-full gap-3 data-[invalid=true]:text-error",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function e0({className:e,orientation:a="vertical",...s}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":a,className:i(Ju({orientation:a}),e),...s})}function t0({className:e,...a}){return t.jsx("div",{"data-slot":"field-content",className:i("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",e),...a})}function a0({className:e,...a}){return t.jsx(ls,{"data-slot":"field-label",className:i("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",e),...a})}function s0({className:e,...a}){return t.jsx("div",{"data-slot":"field-label",className:i("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...a})}function n0({className:e,...a}){return t.jsx("p",{"data-slot":"field-description",className:i("text-sm leading-normal font-normal text-text-tertiary group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function r0({children:e,className:a,...s}){return t.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:i("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",a),...s,children:[t.jsx(Zt,{className:"absolute inset-0 top-1/2"}),e&&t.jsx("span",{className:"relative mx-auto block w-fit bg-bg-base px-2 text-text-tertiary","data-slot":"field-separator-content",children:e})]})}function o0({className:e,children:a,errors:s,...n}){const r=u.useMemo(()=>{if(a)return a;if(!s?.length)return null;const o=[...new Map(s.map(l=>[l?.message,l])).values()];return o?.length==1?o[0]?.message:t.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:o.map((l,c)=>l?.message&&t.jsx("li",{children:l.message},c))})},[a,s]);return r?t.jsx("div",{role:"alert","data-slot":"field-error",className:i("text-sm font-normal text-error",e),...n,children:r}):null}const Wo=F.cva("group peer shrink-0 rounded-sm border border-border-tertiary bg-bg-container outline-offset-2 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary-border disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-text-on-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-text-on-primary",{variants:{size:{sm:"size-3.5",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),Zo=y.forwardRef(({className:e,size:a="md",...s},n)=>t.jsx(ka.Root,{ref:n,className:i(Wo({size:a}),e),...s,children:t.jsxs(ka.Indicator,{className:"flex items-center justify-center text-current",children:[t.jsx(ye,{className:"size-[0.875em] group-data-[state=indeterminate]:hidden"}),t.jsx("span",{className:"hidden h-[0.125em] w-[0.625em] rounded-sm bg-current group-data-[state=indeterminate]:block"})]})}));Zo.displayName=ka.Root.displayName;const i0=Gc.Root;function l0({className:e,...a}){return t.jsx("div",{"data-slot":"empty",className:i("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",e),...a})}function c0({className:e,...a}){return t.jsx("div",{"data-slot":"empty-header",className:i("flex max-w-sm flex-col items-center gap-2 text-center",e),...a})}const d0=F.cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-fill-tertiary text-text [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function u0({className:e,variant:a="default",...s}){return t.jsx("div",{"data-slot":"empty-icon","data-variant":a,className:i(d0({variant:a,className:e})),...s})}function m0({className:e,...a}){return t.jsx("div",{"data-slot":"empty-title",className:i("text-lg font-medium tracking-tight",e),...a})}function p0({className:e,...a}){return t.jsx("div",{"data-slot":"empty-description",className:i("text-sm/relaxed text-text-tertiary [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function x0({className:e,...a}){return t.jsx("div",{"data-slot":"empty-content",className:i("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...a})}function f0({className:e,...a}){return t.jsx("div",{role:"list","data-slot":"item-group",className:i("group/item-group flex flex-col",e),...a})}function h0({className:e,...a}){return t.jsx(Zt,{"data-slot":"item-separator",orientation:"horizontal",className:i("my-0",e),...a})}const g0=F.cva("group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-primary-border focus-visible:ring-[3px] focus-visible:ring-primary-border/50 [a]:transition-colors [a]:hover:bg-fill-secondary/50",{variants:{variant:{default:"bg-transparent",outline:"border-border",muted:"bg-fill-tertiary/50"},size:{default:"gap-4 p-4",sm:"gap-2.5 px-4 py-3"}},defaultVariants:{variant:"default",size:"default"}});function y0({className:e,variant:a="default",size:s="default",asChild:n=!1,...r}){const o=n?H.Slot.Root:"div";return t.jsx(o,{"data-slot":"item","data-variant":a,"data-size":s,className:i(g0({variant:a,size:s,className:e})),...r})}const b0=F.cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"size-8 rounded-sm border bg-fill-tertiary [&_svg:not([class*='size-'])]:size-4",image:"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function v0({className:e,variant:a="default",...s}){return t.jsx("div",{"data-slot":"item-media","data-variant":a,className:i(b0({variant:a,className:e})),...s})}function w0({className:e,...a}){return t.jsx("div",{"data-slot":"item-content",className:i("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",e),...a})}function k0({className:e,...a}){return t.jsx("div",{"data-slot":"item-title",className:i("flex w-fit items-center gap-2 text-sm leading-snug font-medium",e),...a})}function j0({className:e,...a}){return t.jsx("p",{"data-slot":"item-description",className:i("line-clamp-2 text-sm leading-normal font-normal text-balance text-text-tertiary","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function N0({className:e,...a}){return t.jsx("div",{"data-slot":"item-actions",className:i("flex items-center gap-2",e),...a})}function C0({className:e,...a}){return t.jsx("div",{"data-slot":"item-header",className:i("flex basis-full items-center justify-between gap-2",e),...a})}function S0({className:e,...a}){return t.jsx("div",{"data-slot":"item-footer",className:i("flex basis-full items-center justify-between gap-2",e),...a})}const Ko=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("flex flex-col gap-4 rounded-xl border border-border-tertiary bg-bg-container text-text shadow-sm","py-6",e),...a}));Ko.displayName="Card";const Yo=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6","has-data-[slot=card-action]:grid-cols-[1fr_auto]","[.border-b]:pb-4",e),...a}));Yo.displayName="CardHeader";const Xo=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("text-base font-semibold leading-none text-text",e),...a}));Xo.displayName="CardTitle";const Jo=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("text-sm leading-6 text-text-tertiary",e),...a}));Jo.displayName="CardDescription";const ei=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,"data-slot":"card-action",className:i("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));ei.displayName="CardAction";const ti=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("px-6",e),...a}));ti.displayName="CardContent";const ai=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("flex items-center px-6 [.border-t]:pt-4",e),...a}));ai.displayName="CardFooter";const si=F.cva("relative grid w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm",{variants:{variant:{default:"border-border-tertiary bg-bg-container text-text [&>svg]:text-text-secondary",info:"border-primary-border bg-primary-bg text-text [&>svg]:text-primary",success:"border-success-border bg-success-bg text-text [&>svg]:text-success",warning:"border-warning-border bg-warning-bg text-text [&>svg]:text-warning",destructive:"border-error-border bg-error-bg text-text [&>svg]:text-error"}},defaultVariants:{variant:"default"}}),ni=y.forwardRef(({className:e,variant:a,...s},n)=>t.jsx("div",{ref:n,role:"alert",className:i(si({variant:a}),"has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-3","[&>svg]:size-4 [&>svg]:translate-y-0.5",e),...s}));ni.displayName="Alert";const ri=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("col-start-2 min-h-4 font-medium leading-5 tracking-tight text-text","line-clamp-1",e),...a}));ri.displayName="AlertTitle";const oi=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("col-start-2 grid justify-items-start gap-1 text-sm leading-6 text-text-secondary","[&_p]:leading-6",e),...a}));oi.displayName="AlertDescription";const ii=y.forwardRef(({...e},a)=>t.jsx("nav",{ref:a,"aria-label":"breadcrumb",...e}));ii.displayName="Breadcrumb";const li=y.forwardRef(({className:e,...a},s)=>t.jsx("ol",{ref:s,className:i("flex flex-wrap items-center gap-1.5 text-sm text-text-tertiary break-words sm:gap-2.5",e),...a}));li.displayName="BreadcrumbList";const ci=y.forwardRef(({className:e,...a},s)=>t.jsx("li",{ref:s,className:i("inline-flex items-center gap-1.5",e),...a}));ci.displayName="BreadcrumbItem";const di=y.forwardRef(({className:e,asChild:a,...s},n)=>a?t.jsx("span",{className:i("transition-colors hover:text-text",e),...s}):t.jsx("a",{ref:n,className:i("transition-colors hover:text-text",e),...s}));di.displayName="BreadcrumbLink";const ui=y.forwardRef(({className:e,...a},s)=>t.jsx("span",{ref:s,role:"link","aria-disabled":"true","aria-current":"page",className:i("font-normal text-text",e),...a}));ui.displayName="BreadcrumbPage";const mi=({children:e,className:a,...s})=>t.jsx("li",{role:"presentation","aria-hidden":"true",className:i("[&>svg]:size-3.5 text-text-tertiary",a),...s,children:e??t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:t.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"})})});mi.displayName="BreadcrumbSeparator";const pi=({className:e,...a})=>t.jsxs("span",{role:"presentation","aria-hidden":"true",className:i("flex size-9 items-center justify-center",e),...a,children:[t.jsx(Oa,{className:"size-4"}),t.jsx("span",{className:"sr-only",children:"More"})]});pi.displayName="BreadcrumbEllipsis";const xi=K.Root,I0=K.Trigger,fi=K.Portal,R0=K.Close,cs=y.forwardRef(({className:e,...a},s)=>t.jsx(K.Overlay,{ref:s,asChild:!0,...a,children:t.jsx(V.motion.div,{className:i("fixed inset-0 z-50 bg-bg-mask/60",e),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15}})}));cs.displayName=K.Overlay.displayName;const z0=F.cva("font-sans fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-bg-base text-text shadow-lg p-6 outline-none",{variants:{size:{sm:"max-w-sm",default:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"}},defaultVariants:{size:"default"}}),ds=y.forwardRef(({className:e,children:a,size:s="default",hideCloseButton:n=!1,dataStyle:r,dataTheme:o,...l},c)=>{const d=ge(),m=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return t.jsx(fi,{children:t.jsxs("div",{style:{display:"contents"},...m,children:[t.jsx(cs,{}),t.jsx(K.Content,{ref:c,asChild:!0,...l,children:t.jsxs(V.motion.div,{className:i(z0({size:s}),e),initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.2,ease:[.4,0,.2,1]},children:[a,!n&&t.jsxs(K.Close,{className:i("absolute right-4 top-4 inline-flex size-7 items-center justify-center rounded-md text-text-tertiary opacity-70 transition-colors","hover:bg-fill-secondary hover:text-text hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border","disabled:pointer-events-none"),children:[t.jsx(Ce,{className:"size-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})});ds.displayName=K.Content.displayName;const us=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("flex flex-col gap-2 text-left",e),...a}));us.displayName="DialogHeader";const hi=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...a}));hi.displayName="DialogFooter";const ms=y.forwardRef(({className:e,...a},s)=>t.jsx(K.Title,{ref:s,className:i("font-sans text-base font-medium leading-6 text-text",e),...a}));ms.displayName=K.Title.displayName;const ps=y.forwardRef(({className:e,...a},s)=>t.jsx(K.Description,{ref:s,className:i("text-sm leading-6 text-text-tertiary",e),...a}));ps.displayName=K.Description.displayName;const gi=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(ds,{ref:a,dataStyle:s,dataTheme:n,...e})});gi.displayName="DialogContent";const yi=K.Root,bi=K.Trigger,vi=K.Close,xs=K.Portal,Kt=y.forwardRef(({className:e,...a},s)=>t.jsx(K.Overlay,{ref:s,asChild:!0,...a,children:t.jsx(V.motion.div,{className:i("fixed inset-0 z-50 bg-bg-mask/60",e),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15}})}));Kt.displayName=K.Overlay.displayName;const wi=F.cva("fixed z-50 gap-4 bg-bg-base text-text shadow-lg border-border p-6 outline-none flex flex-col",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),T0={top:{initial:{y:"-100%"},animate:{y:0},exit:{y:"-100%"}},bottom:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}},left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}}},fs=y.forwardRef(({side:e="right",className:a,children:s,showCloseButton:n=!0,dataStyle:r,dataTheme:o,...l},c)=>{const d=ge(),m=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d,p=T0[e];return t.jsx(xs,{children:t.jsxs("div",{style:{display:"contents"},...m,children:[t.jsx(Kt,{}),t.jsx(K.Content,{ref:c,asChild:!0,...l,children:t.jsxs(V.motion.div,{className:i(wi({side:e}),a),initial:p.initial,animate:p.animate,exit:p.exit,transition:{duration:.25,ease:[.4,0,.2,1]},children:[s,n&&t.jsxs(K.Close,{className:i("absolute right-4 top-4 inline-flex size-7 items-center justify-center rounded-md text-text-tertiary opacity-70 transition-colors","hover:bg-fill-secondary hover:text-text hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border","disabled:pointer-events-none"),children:[t.jsx(Ce,{className:"size-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})});fs.displayName=K.Content.displayName;const hs=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("flex flex-col gap-1.5",e),...a}));hs.displayName="DrawerHeader";const gs=y.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:i("mt-auto flex flex-col gap-2",e),...a}));gs.displayName="DrawerFooter";const ys=y.forwardRef(({className:e,...a},s)=>t.jsx(K.Title,{ref:s,className:i("text-base font-medium leading-6 text-text",e),...a}));ys.displayName=K.Title.displayName;const bs=y.forwardRef(({className:e,...a},s)=>t.jsx(K.Description,{ref:s,className:i("text-sm leading-6 text-text-tertiary",e),...a}));bs.displayName=K.Description.displayName;const ki=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(fs,{ref:a,dataStyle:s,dataTheme:n,...e})});ki.displayName="DrawerContent";const L0=Ke.Root,M0=Ke.Trigger,P0=Ke.Anchor,ji=y.forwardRef(({className:e,align:a="center",sideOffset:s=4,children:n,dataStyle:r,dataTheme:o,...l},c)=>{const d=ge(),m=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return t.jsx(Ke.Portal,{children:t.jsx("div",{style:{display:"contents"},...m,children:t.jsx(Ke.Content,{ref:c,align:a,sideOffset:s,className:i("z-50 w-72 rounded-lg border border-border-tertiary bg-bg-container p-4 text-sm text-text shadow-md outline-none",e),...l,children:t.jsx(V.motion.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.15,ease:[.4,0,.2,1]},children:n})})})})});ji.displayName=Ke.Content.displayName;const Ni=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(ji,{ref:a,dataStyle:s,dataTheme:n,...e})});Ni.displayName="PopoverContent";const A0=ct.Root,D0=ct.Trigger,Ci=y.forwardRef(({className:e,align:a="center",sideOffset:s=4,children:n,dataStyle:r,dataTheme:o,...l},c)=>{const d=ge(),m=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return t.jsx(ct.Portal,{children:t.jsx("div",{style:{display:"contents"},...m,children:t.jsx(ct.Content,{ref:c,align:a,sideOffset:s,className:i("z-50 w-64 rounded-lg border border-border-tertiary bg-bg-container p-4 text-sm text-text shadow-md outline-none",e),...l,children:t.jsx(V.motion.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.15,ease:[.4,0,.2,1]},children:n})})})})});Ci.displayName=ct.Content.displayName;const Si=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(Ci,{ref:a,dataStyle:s,dataTheme:n,...e})});Si.displayName="HoverCardContent";const _0=Y.Root,E0=Y.Trigger,F0=Y.Group,$0=Y.Portal,O0=Y.Sub,B0=Y.RadioGroup,Ii="z-50 min-w-32 overflow-hidden rounded-lg border border-border-tertiary bg-bg-container p-1 text-text shadow-lg outline-none",Ri=y.forwardRef(({className:e,children:a,dataStyle:s,dataTheme:n,...r},o)=>{const l=ge(),c=s!==void 0?{"data-style":s,"data-theme":n??l["data-theme"]??""}:l;return t.jsx(Y.Portal,{children:t.jsx("div",{style:{display:"contents"},...c,children:t.jsx(Y.Content,{ref:o,className:i(Ii,e),...r,children:t.jsx(V.motion.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.12,ease:[.4,0,.2,1]},children:a})})})})});Ri.displayName=Y.Content.displayName;const V0=F.cva("flex h-9 w-full cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none hover:bg-fill-secondary focus:bg-fill-secondary data-[highlighted]:bg-fill-secondary data-[state=open]:bg-fill-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),zi=y.forwardRef(({className:e,inset:a=!1,children:s,...n},r)=>t.jsxs(Y.SubTrigger,{ref:r,className:i(V0({inset:a}),e),...n,children:[s,t.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center",children:t.jsx(at,{className:"h-4 w-4"})})]}));zi.displayName=Y.SubTrigger.displayName;const Ti=y.forwardRef(({className:e,dataStyle:a,dataTheme:s,...n},r)=>{const o=ge(),l=a!==void 0?{"data-style":a,"data-theme":s??o["data-theme"]??""}:o;return t.jsx(Y.Portal,{children:t.jsx("div",{style:{display:"contents"},...l,children:t.jsx(Y.SubContent,{ref:r,className:i(Ii,e),...n})})})});Ti.displayName=Y.SubContent.displayName;const H0=F.cva("relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{variant:{default:"hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text",destructive:"text-error hover:bg-error-bg focus:bg-error-bg focus:text-error data-[highlighted]:bg-error-bg data-[highlighted]:text-error"},inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{variant:"default",inset:!1}}),Li=y.forwardRef(({className:e,inset:a=!1,variant:s="default",...n},r)=>t.jsx(Y.Item,{ref:r,className:i(H0({variant:s,inset:a}),e),...n}));Li.displayName=Y.Item.displayName;const Mi="relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm pl-8 pr-3 text-sm outline-none hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Pi=y.forwardRef(({className:e,children:a,checked:s,...n},r)=>t.jsxs(Y.CheckboxItem,{ref:r,checked:s,className:i(Mi,e),...n,children:[t.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:t.jsx(Y.ItemIndicator,{children:t.jsx(ye,{className:"h-4 w-4"})})}),a]}));Pi.displayName=Y.CheckboxItem.displayName;const Ai=y.forwardRef(({className:e,children:a,...s},n)=>t.jsxs(Y.RadioItem,{ref:n,className:i(Mi,e),...s,children:[t.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:t.jsx(Y.ItemIndicator,{children:t.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"})})}),a]}));Ai.displayName=Y.RadioItem.displayName;const G0=F.cva("flex h-9 items-center px-3 text-sm font-semibold text-text-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),Di=y.forwardRef(({className:e,inset:a=!1,...s},n)=>t.jsx(Y.Label,{ref:n,className:i(G0({inset:a}),e),...s}));Di.displayName=Y.Label.displayName;const _i=y.forwardRef(({className:e,...a},s)=>t.jsx(Y.Separator,{ref:s,className:i("my-1 mx-1 h-px bg-border-tertiary",e),...a}));_i.displayName=Y.Separator.displayName;const Ei=({className:e,...a})=>t.jsx("span",{className:i("ml-auto text-xs tracking-widest text-text-tertiary",e),...a});Ei.displayName="ContextMenuShortcut";const Fi=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(Ri,{ref:a,dataStyle:s,dataTheme:n,...e})});Fi.displayName="ContextMenuContent";const $i=y.forwardRef((e,a)=>{const{style:s,theme:n}=de();return t.jsx(Ti,{ref:a,dataStyle:s,dataTheme:n,...e})});$i.displayName="ContextMenuSubContent";function q0({className:e,...a}){return t.jsx(H.Menubar.Root,{"data-slot":"menubar",className:i("flex h-9 items-center gap-1 rounded-md border bg-bg-base p-1 shadow-sm",e),...a})}function U0({...e}){return t.jsx(H.Menubar.Menu,{"data-slot":"menubar-menu",...e})}function Q0({...e}){return t.jsx(H.Menubar.Group,{"data-slot":"menubar-group",...e})}function Oi({...e}){return t.jsx(H.Menubar.Portal,{"data-slot":"menubar-portal",...e})}function W0({...e}){return t.jsx(H.Menubar.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function Z0({className:e,...a}){return t.jsx(H.Menubar.Trigger,{"data-slot":"menubar-trigger",className:i("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-none select-none focus:bg-fill-secondary focus:text-text data-[state=open]:bg-fill-secondary data-[state=open]:text-text",e),...a})}function K0({className:e,align:a="start",alignOffset:s=-4,sideOffset:n=8,...r}){return t.jsx(Oi,{children:t.jsx(H.Menubar.Content,{"data-slot":"menubar-content",align:a,alignOffset:s,sideOffset:n,className:i("z-50 min-w-48 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-bg-container p-1 text-text shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...r})})}function Y0({className:e,inset:a,variant:s="default",...n}){return t.jsx(H.Menubar.Item,{"data-slot":"menubar-item","data-inset":a,"data-variant":s,className:i("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-error data-[variant=destructive]:focus:bg-error/10 data-[variant=destructive]:focus:text-error dark:data-[variant=destructive]:focus:bg-error/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-text-tertiary data-[variant=destructive]:*:[svg]:text-error!",e),...n})}function X0({className:e,children:a,checked:s,...n}){return t.jsxs(H.Menubar.CheckboxItem,{"data-slot":"menubar-checkbox-item",className:i("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:s,...n,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(H.Menubar.ItemIndicator,{children:t.jsx(he.CheckIcon,{className:"size-4"})})}),a]})}function J0({className:e,children:a,...s}){return t.jsxs(H.Menubar.RadioItem,{"data-slot":"menubar-radio-item",className:i("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,children:[t.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t.jsx(H.Menubar.ItemIndicator,{children:t.jsx(he.CircleIcon,{className:"size-2 fill-current"})})}),a]})}function em({className:e,inset:a,...s}){return t.jsx(H.Menubar.Label,{"data-slot":"menubar-label","data-inset":a,className:i("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...s})}function tm({className:e,...a}){return t.jsx(H.Menubar.Separator,{"data-slot":"menubar-separator",className:i("-mx-1 my-1 h-px bg-border",e),...a})}function am({className:e,...a}){return t.jsx("span",{"data-slot":"menubar-shortcut",className:i("ml-auto text-xs tracking-widest text-text-tertiary",e),...a})}function sm({...e}){return t.jsx(H.Menubar.Sub,{"data-slot":"menubar-sub",...e})}function nm({className:e,inset:a,children:s,...n}){return t.jsxs(H.Menubar.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":a,className:i("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[inset]:pl-8 data-[state=open]:bg-fill-secondary data-[state=open]:text-text",e),...n,children:[s,t.jsx(he.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function rm({className:e,...a}){return t.jsx(H.Menubar.SubContent,{"data-slot":"menubar-sub-content",className:i("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-bg-container p-1 text-text shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...a})}function om({className:e,children:a,viewport:s=!0,...n}){return t.jsxs(H.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":s,className:i("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...n,children:[a,s&&t.jsx(Vi,{})]})}function im({className:e,...a}){return t.jsx(H.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:i("group flex flex-1 list-none items-center justify-center gap-1",e),...a})}function lm({className:e,...a}){return t.jsx(H.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:i("relative",e),...a})}const Bi=F.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-bg-base px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none hover:bg-fill-secondary hover:text-text focus:bg-fill-secondary focus:text-text focus-visible:ring-[3px] focus-visible:ring-primary-border/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-fill-secondary/50 data-[state=open]:text-text data-[state=open]:hover:bg-fill-secondary data-[state=open]:focus:bg-fill-secondary");function cm({className:e,children:a,...s}){return t.jsxs(H.NavigationMenu.Trigger,{"data-slot":"navigation-menu-trigger",className:i(Bi(),"group",e),...s,children:[a," ",t.jsx(he.ChevronDownIcon,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function dm({className:e,...a}){return t.jsx(H.NavigationMenu.Content,{"data-slot":"navigation-menu-content",className:i("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-bg-container group-data-[viewport=false]/navigation-menu:text-text group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",e),...a})}function Vi({className:e,...a}){return t.jsx("div",{className:i("absolute top-full left-0 isolate z-50 flex justify-center"),children:t.jsx(H.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:i("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-bg-container text-text shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),...a})})}function um({className:e,...a}){return t.jsx(H.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:i("flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-fill-secondary hover:text-text focus:bg-fill-secondary focus:text-text focus-visible:ring-[3px] focus-visible:ring-primary-border/50 focus-visible:outline-1 data-[active=true]:bg-fill-secondary/50 data-[active=true]:text-text data-[active=true]:hover:bg-fill-secondary data-[active=true]:focus:bg-fill-secondary [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-text-tertiary",e),...a})}function mm({className:e,...a}){return t.jsx(H.NavigationMenu.Indicator,{"data-slot":"navigation-menu-indicator",className:i("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",e),...a,children:t.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})})}function Hi({className:e,...a}){return t.jsx(Be.Command,{"data-slot":"command",className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-bg-container text-text",e),...a})}function pm({title:e="Command Palette",description:a="Search for a command to run...",children:s,className:n,showCloseButton:r=!0,...o}){return t.jsxs(xi,{...o,children:[t.jsxs(us,{className:"sr-only",children:[t.jsx(ms,{children:e}),t.jsx(ps,{children:a})]}),t.jsx(ds,{className:i("overflow-hidden p-0",n),hideCloseButton:!r,children:t.jsx(Hi,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})]})}function xm({className:e,...a}){return t.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[t.jsx(he.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),t.jsx(Be.Command.Input,{"data-slot":"command-input",className:i("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-text-tertiary disabled:cursor-not-allowed disabled:opacity-50",e),...a})]})}function fm({className:e,...a}){return t.jsx(Be.Command.List,{"data-slot":"command-list",className:i("max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto",e),...a})}function hm({...e}){return t.jsx(Be.Command.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function gm({className:e,...a}){return t.jsx(Be.Command.Group,{"data-slot":"command-group",className:i("overflow-hidden p-1 text-text [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary",e),...a})}function ym({className:e,...a}){return t.jsx(Be.Command.Separator,{"data-slot":"command-separator",className:i("-mx-1 h-px bg-border",e),...a})}function bm({className:e,...a}){return t.jsx(Be.Command.Item,{"data-slot":"command-item",className:i("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-fill-secondary data-[selected=true]:text-text [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-text-tertiary",e),...a})}function vm({className:e,...a}){return t.jsx("span",{"data-slot":"command-shortcut",className:i("ml-auto text-xs tracking-widest text-text-tertiary",e),...a})}function wm({options:e,value:a,onValueChange:s,placeholder:n="Search...",emptyText:r="No option found.",className:o,...l}){const[c,d]=y.useState(""),m=e.find(x=>x.value===a),p=e.filter(x=>x.label.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:i("w-full rounded-lg border border-border-tertiary bg-bg-container p-1",o),...l,children:[t.jsx(xt,{role:"combobox","aria-expanded":"true",value:c||m?.label||"",onChange:x=>d(x.target.value),placeholder:n,className:"border-0 bg-transparent shadow-none"}),t.jsx("div",{role:"listbox",className:"mt-1 max-h-60 overflow-auto rounded-md",children:p.length>0?p.map(x=>t.jsx("button",{type:"button",role:"option","aria-selected":x.value===a,disabled:x.disabled,className:i("flex w-full items-center rounded-md px-3 py-2 text-left text-sm text-text transition-colors","hover:bg-fill-secondary focus:bg-fill-secondary focus:outline-none","disabled:pointer-events-none disabled:opacity-50",x.value===a&&"bg-fill-secondary"),onClick:()=>{s?.(x.value),d("")},children:x.label},x.value)):t.jsx("div",{className:"px-3 py-2 text-sm text-text-tertiary",children:r})})]})}function km({className:e,size:a="default",...s}){return t.jsxs("div",{className:"group/native-select relative w-fit has-[select:disabled]:opacity-50","data-slot":"native-select-wrapper",children:[t.jsx("select",{"data-slot":"native-select","data-size":a,className:i("h-9 w-full min-w-0 appearance-none rounded-md border border-border-tertiary bg-transparent px-3 py-2 pr-9 text-sm shadow-sm transition-[color,box-shadow] outline-none selection:bg-primary selection:text-text-on-primary placeholder:text-text-tertiary disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50","focus-visible:border-primary-border focus-visible:ring-[3px] focus-visible:ring-primary-border/50","aria-invalid:border-error aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40",e),...s}),t.jsx(he.ChevronDownIcon,{className:"pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-text-tertiary opacity-50 select-none","aria-hidden":"true","data-slot":"native-select-icon"})]})}function jm({className:e,...a}){return t.jsx("option",{"data-slot":"native-select-option",className:i("bg-[Canvas] text-[CanvasText]",e),...a})}function Nm({className:e,...a}){return t.jsx("optgroup",{"data-slot":"native-select-optgroup",className:i("bg-[Canvas] text-[CanvasText]",e),...a})}function Cm({className:e,classNames:a,showOutsideDays:s=!0,captionLayout:n="label",buttonVariant:r="ghost",formatters:o,components:l,...c}){const d=wa.getDefaultClassNames();return t.jsx(wa.DayPicker,{showOutsideDays:s,className:i("group/calendar bg-bg-base p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:n,formatters:{formatMonthDropdown:m=>m.toLocaleString("default",{month:"short"}),...o},classNames:{root:i("w-fit",d.root),months:i("relative flex flex-col gap-4 md:flex-row",d.months),month:i("flex w-full flex-col gap-4",d.month),nav:i("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",d.nav),button_previous:i(ut({variant:r}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",d.button_previous),button_next:i(ut({variant:r}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",d.button_next),month_caption:i("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",d.month_caption),dropdowns:i("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",d.dropdowns),dropdown_root:i("relative rounded-md border border-border-tertiary shadow-sm has-focus:border-primary-border has-focus:ring-[3px] has-focus:ring-primary-border/50",d.dropdown_root),dropdown:i("absolute inset-0 bg-bg-container opacity-0",d.dropdown),caption_label:i("font-medium select-none",n==="label"?"text-sm":"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-text-tertiary",d.caption_label),table:"w-full border-collapse",weekdays:i("flex",d.weekdays),weekday:i("flex-1 rounded-md text-[0.8rem] font-normal text-text-tertiary select-none",d.weekday),week:i("mt-2 flex w-full",d.week),week_number_header:i("w-(--cell-size) select-none",d.week_number_header),week_number:i("text-[0.8rem] text-text-tertiary select-none",d.week_number),day:i("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",c.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",d.day),range_start:i("rounded-l-md bg-fill-secondary",d.range_start),range_middle:i("rounded-none",d.range_middle),range_end:i("rounded-r-md bg-fill-secondary",d.range_end),today:i("rounded-md bg-fill-secondary text-text data-[selected=true]:rounded-none",d.today),outside:i("text-text-tertiary aria-selected:text-text-tertiary",d.outside),disabled:i("text-text-tertiary opacity-50",d.disabled),hidden:i("invisible",d.hidden),...a},components:{Root:({className:m,rootRef:p,...x})=>t.jsx("div",{"data-slot":"calendar",ref:p,className:i(m),...x}),Chevron:({className:m,orientation:p,...x})=>p==="left"?t.jsx(he.ChevronLeftIcon,{className:i("size-4",m),...x}):p==="right"?t.jsx(he.ChevronRightIcon,{className:i("size-4",m),...x}):t.jsx(he.ChevronDownIcon,{className:i("size-4",m),...x}),DayButton:Gi,WeekNumber:({children:m,...p})=>t.jsx("td",{...p,children:t.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:m})}),...l},...c})}function Gi({className:e,day:a,modifiers:s,...n}){const r=wa.getDefaultClassNames(),o=y.useRef(null);return y.useEffect(()=>{s.focused&&o.current?.focus()},[s.focused]),t.jsx("button",{ref:o,"data-day":a.date.toLocaleDateString(),"data-selected-single":s.selected&&!s.range_start&&!s.range_end&&!s.range_middle,"data-range-start":s.range_start,"data-range-end":s.range_end,"data-range-middle":s.range_middle,className:i("inline-flex items-center justify-center transition-colors hover:bg-fill-secondary hover:text-text","flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 px-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-primary-border group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-primary-border/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-text-on-primary data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-fill-secondary data-[range-middle=true]:text-text data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-text-on-primary data-[selected-single=true]:bg-primary data-[selected-single=true]:text-text-on-primary dark:hover:text-text [&>span]:text-xs [&>span]:opacity-70",r.day,e),...n})}const qi=y.forwardRef(({type:e="date",...a},s)=>t.jsx(xt,{ref:s,type:e,...a}));qi.displayName="DatePicker";const Ui=y.createContext(null);function Yt(){const e=y.useContext(Ui);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Sm({orientation:e="horizontal",opts:a,setApi:s,plugins:n,className:r,children:o,...l}){const[c,d]=Lc({...a,axis:e==="horizontal"?"x":"y"},n),[m,p]=y.useState(!1),[x,g]=y.useState(!1),v=y.useCallback(w=>{w&&(p(w.canScrollPrev()),g(w.canScrollNext()))},[]),f=y.useCallback(()=>{d?.scrollPrev()},[d]),b=y.useCallback(()=>{d?.scrollNext()},[d]),h=y.useCallback(w=>{w.key==="ArrowLeft"?(w.preventDefault(),f()):w.key==="ArrowRight"&&(w.preventDefault(),b())},[f,b]);return y.useEffect(()=>{!d||!s||s(d)},[d,s]),y.useEffect(()=>{if(d)return v(d),d.on("reInit",v),d.on("select",v),()=>{d?.off("select",v)}},[d,v]),t.jsx(Ui.Provider,{value:{carouselRef:c,api:d,opts:a,orientation:e||(a?.axis==="y"?"vertical":"horizontal"),scrollPrev:f,scrollNext:b,canScrollPrev:m,canScrollNext:x},children:t.jsx("div",{onKeyDownCapture:h,className:i("relative",r),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...l,children:o})})}function Im({className:e,...a}){const{carouselRef:s,orientation:n}=Yt();return t.jsx("div",{ref:s,className:"overflow-hidden","data-slot":"carousel-content",children:t.jsx("div",{className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...a})})}function Rm({className:e,...a}){const{orientation:s}=Yt();return t.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:i("min-w-0 shrink-0 grow-0 basis-full",s==="horizontal"?"pl-4":"pt-4",e),...a})}function zm({className:e,variant:a="outline",size:s="sm",...n}){const{orientation:r,scrollPrev:o,canScrollPrev:l}=Yt();return t.jsxs(W,{"data-slot":"carousel-previous",variant:a,size:s,className:i("absolute size-8 rounded-full",r==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:o,...n,children:[t.jsx(he.ArrowLeft,{}),t.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function Tm({className:e,variant:a="outline",size:s="sm",...n}){const{orientation:r,scrollNext:o,canScrollNext:l}=Yt();return t.jsxs(W,{"data-slot":"carousel-next",variant:a,size:s,className:i("absolute size-8 rounded-full",r==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:o,...n,children:[t.jsx(he.ArrowRight,{}),t.jsx("span",{className:"sr-only",children:"Next slide"})]})}function Lm({columns:e,data:a,emptyText:s="No results.",className:n,...r}){return t.jsx("div",{className:i("w-full overflow-auto rounded-lg border border-border-tertiary",n),...r,children:t.jsxs(Xa,{children:[t.jsx(Ja,{children:t.jsx(it,{children:e.map(o=>t.jsx(ts,{className:o.className,children:o.header},o.key))})}),t.jsx(es,{children:a.length>0?a.map((o,l)=>t.jsx(it,{children:e.map(c=>t.jsx($t,{className:c.className,children:c.cell?c.cell(o,l):c.accessor?String(o[c.accessor]??""):null},c.key))},l)):t.jsx(it,{children:t.jsx($t,{colSpan:e.length,className:"h-24 text-center text-text-tertiary",children:s})})})]})})}const Mm={light:"",dark:".dark"},Pm={width:320,height:200},Qi=y.createContext(null);function Wi(){const e=y.useContext(Qi);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function Am({id:e,className:a,children:s,config:n,initialDimension:r=Pm,...o}){const l=y.useId(),c=`chart-${e??l.replace(/:/g,"")}`;return t.jsx(Qi.Provider,{value:{config:n},children:t.jsxs("div",{"data-slot":"chart","data-chart":c,className:i("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-text-tertiary [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-layer]:outline-none [&_.recharts-radial-bar-background-sector]:fill-fill-tertiary [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-fill-tertiary [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",a),...o,children:[t.jsx(Zi,{id:c,config:n}),t.jsx(Ma.ResponsiveContainer,{initialDimension:r,children:s})]})})}const Zi=({id:e,config:a})=>{const s=Object.entries(a).filter(([,n])=>n.theme??n.color);return s.length?t.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Mm).map(([n,r])=>`
|
|
32
|
+
[data-sonner-toaster] [data-sonner-toast] [data-button]:not(:first-of-type) { margin-left: ${cm} !important; }`,js={className:"text-sm",style:{padding:`var(--spacing-3) ${Hn}`,gap:Ao,background:"var(--color-bg-container)",borderColor:"var(--color-border-tertiary)",color:"var(--color-text)"},descriptionClassName:"text-xs text-text-secondary",actionButtonStyle:{borderRadius:"var(--radius)",paddingLeft:"var(--spacing-2)",paddingRight:"var(--spacing-2)",height:"var(--spacing-7)",fontSize:"var(--font-size-xs)"},cancelButtonStyle:{borderRadius:"var(--radius)",paddingLeft:"var(--spacing-2)",paddingRight:"var(--spacing-2)",height:"var(--spacing-7)",fontSize:"var(--font-size-xs)"}},um=14,mm=3,pm={right:8,left:8,top:24,bottom:24};function _o({theme:e,toastOptions:t,dataStyle:a,dataTheme:s,icons:r,gap:o=um,visibleToasts:i=mm,offset:c=pm,...d}){const u=ye(),p=a!==void 0||s!==void 0?{"data-style":a,"data-theme":s}:u,x=e??(typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light"),g=n.jsxs(n.Fragment,{children:[n.jsx("style",{dangerouslySetInnerHTML:{__html:dm}}),n.jsx("div",{style:{display:"contents"},...p,children:n.jsx(Ks.Toaster,{theme:x,closeButton:!0,icons:r,gap:o,visibleToasts:i,offset:c,toastOptions:{...js,...t,style:{...js.style,...t?.style}},style:{"--border-radius":"var(--radius-lg)",fontFamily:"inherit","--gap":`${o}px`,"--toast-icon-margin-start":"0","--toast-icon-margin-end":Ao,"--toast-button-margin-start":"auto","--toast-button-margin-end":"0"},...d})})]});return typeof document<"u"?Zs.createPortal(g,document.body):null}_o.displayName="Toaster";const Ge="w-[var(--font-size-xl)] h-[var(--font-size-xl)] shrink-0",Ns="w-3.5 h-3.5 shrink-0 text-text-tertiary";function Oo({theme:e,toastOptions:t,dataStyle:a,dataTheme:s,...r}){const o=ue(),i=a??o.style,c=s??o.theme,d=N("checkboxCircle",Ge),u=N("closeCircle",Ge),p=N("warning",Ge),x=N("close",Ns),g=m.useMemo(()=>({success:d??n.jsx(an,{className:Ge}),error:u??n.jsx(Nr,{className:Ge}),warning:p??n.jsx(kt,{className:Ge}),loading:n.jsx(rn,{className:Ge}),close:x??n.jsx(Re,{className:Ns})}),[d,u,p,x]),v=m.useMemo(()=>({...t,style:{gap:"2px",...t?.style},classNames:{actionButton:vt({variant:"primary",size:"sm",rounded:"square"}),cancelButton:vt({variant:"tertiary",size:"sm",rounded:"square"}),...t?.classNames}}),[t]);return n.jsx(_o,{theme:e,dataStyle:i,dataTheme:c,icons:g,toastOptions:v,...r})}Oo.displayName="Toaster";const ot="outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:!outline-none focus-visible:!ring-0 focus-visible:outline-offset-0 focus-visible:!outline-offset-0 focus-visible:ring-offset-0 focus-visible:!ring-offset-0",Eo=ie.Root,xm=ie.Group,Fo=ie.Value,fm=A.cva(["flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-lg border border-border-tertiary bg-bg-container text-text placeholder:text-muted-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus:border-border-secondary focus-visible:border-border-secondary data-[state=open]:border-border-secondary"].join(" "),{variants:{size:{sm:"h-7 px-2 py-0.5 text-xs",md:"h-9 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"}},defaultVariants:{size:"md"}}),ya=y.forwardRef(({className:e,children:t,disabled:a,triggerIcon:s,size:r="md",...o},i)=>n.jsxs(ie.Trigger,{ref:i,disabled:a,className:l(fm({size:r}),ot,e),...o,children:[t,n.jsx(ie.Icon,{asChild:!0,children:n.jsx("span",{className:"pointer-events-none flex shrink-0 text-current [&>svg]:text-current",children:s??n.jsx(ve,{className:"h-[1em] w-[1em] shrink-0"})})})]}));ya.displayName=ie.Trigger.displayName;const ba=y.forwardRef(({className:e,scrollUpIcon:t,...a},s)=>n.jsx(ie.ScrollUpButton,{ref:s,className:l("flex cursor-default items-center justify-center py-1",ot,e),...a,children:t??n.jsx(Zn,{className:"h-[1em] w-[1em]"})}));ba.displayName=ie.ScrollUpButton.displayName;const va=y.forwardRef(({className:e,scrollDownIcon:t,...a},s)=>n.jsx(ie.ScrollDownButton,{ref:s,className:l("flex cursor-default items-center justify-center py-1",ot,e),...a,children:t??n.jsx(ve,{className:"h-[1em] w-[1em]"})}));va.displayName=ie.ScrollDownButton.displayName;const wa=y.forwardRef(({className:e,children:t,position:a="popper",sideOffset:s=4,dataStyle:r,dataTheme:o,...i},c)=>{const d=ye(),u=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return n.jsx(ie.Portal,{children:n.jsxs(ie.Content,{ref:c,className:l("relative z-[60] max-h-96 min-w-32 overflow-hidden rounded-lg border border-border-tertiary bg-bg-container p-1 text-text shadow-lg",ot,"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),position:a,sideOffset:s,...u,...i,children:[n.jsx(ba,{}),n.jsx(ie.Viewport,{className:l(ot,a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n.jsx(va,{})]})})});wa.displayName=ie.Content.displayName;const $o=y.forwardRef(({className:e,...t},a)=>n.jsx(ie.Label,{ref:a,className:l("flex h-9 items-center px-3 text-sm font-semibold text-text-secondary",e),...t}));$o.displayName=ie.Label.displayName;const gt=y.forwardRef(({className:e,children:t,itemIndicatorIcon:a,...s},r)=>n.jsxs(ie.Item,{ref:r,className:l("relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm pl-3 pr-8 text-sm transition-colors",ot,"hover:bg-fill-secondary data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text data-[state=checked]:bg-fill-secondary data-[state=checked]:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsx("span",{className:"absolute right-3 flex h-[1em] w-[1em] items-center justify-center",children:n.jsx(ie.ItemIndicator,{children:a??n.jsx(be,{className:"h-[1em] w-[1em]"})})}),n.jsx(ie.ItemText,{children:t})]}));gt.displayName=ie.Item.displayName;const Bo=y.forwardRef(({className:e,...t},a)=>n.jsx(ie.Separator,{ref:a,className:l("my-1 mx-1 h-px bg-border-tertiary",e),...t}));Bo.displayName=ie.Separator.displayName;const Ho=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(wa,{ref:t,dataStyle:a,dataTheme:s,...e})});Ho.displayName="SelectContent";const hm=Ye.Root,gm=A.cva("inline-flex items-center justify-center text-text-secondary data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",{variants:{variant:{default:"rounded-lg bg-fill-secondary p-0.5 gap-0.5",line:"gap-6 border-b border-border-tertiary bg-transparent p-0"}},defaultVariants:{variant:"default"}}),ym=A.cva("inline-flex items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-text cursor-pointer data-[orientation=vertical]:justify-start data-[orientation=vertical]:rounded-md data-[orientation=vertical]:px-3 data-[orientation=vertical]:py-2",{variants:{variant:{default:"rounded-md px-3 py-1.5 data-[state=active]:bg-bg-container data-[state=active]:shadow-sm",line:"rounded-none border-b-2 border-transparent px-1 pb-2 pt-0 data-[state=active]:border-primary data-[state=active]:shadow-none"}},defaultVariants:{variant:"default"}}),Vo=y.forwardRef(({className:e,variant:t="default",...a},s)=>n.jsx(Ye.List,{ref:s,className:l(gm({variant:t}),e),...a}));Vo.displayName=Ye.List.displayName;const Go=y.forwardRef(({className:e,variant:t="default",...a},s)=>n.jsx(Ye.Trigger,{ref:s,className:l(ym({variant:t}),e),...a}));Go.displayName=Ye.Trigger.displayName;const qo=y.forwardRef(({className:e,...t},a)=>n.jsx(Ye.Content,{ref:a,className:l("mt-2 outline-none ring-0 data-[state=inactive]:hidden","data-[orientation=vertical]:mt-0 data-[orientation=vertical]:ml-2",e),...t}));qo.displayName=Ye.Content.displayName;const Wo=y.forwardRef(({className:e,...t},a)=>n.jsx(bt.Root,{ref:a,className:l("w-full font-sans",e),"data-slot":"collapse",...t}));Wo.displayName="Collapse";const Uo=y.forwardRef(({className:e,...t},a)=>n.jsx(bt.Item,{ref:a,className:l("border-b border-border-tertiary last:border-b-0 data-[orientation=horizontal]:border-b-0 data-[orientation=horizontal]:border-r data-[orientation=horizontal]:border-border-tertiary data-[orientation=horizontal]:last:border-r-0",e),"data-slot":"collapse-item",...t}));Uo.displayName="CollapseItem";const Qo=y.forwardRef(({className:e,children:t,chevronIcon:a,...s},r)=>n.jsx(bt.Header,{className:"flex font-sans",children:n.jsxs(bt.Trigger,{ref:r,className:l("group flex flex-1 items-center justify-between gap-2 py-3 text-left text-sm font-medium text-text font-sans transition-colors outline-none","hover:text-text-secondary focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50","data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:justify-between data-[orientation=horizontal]:py-4 data-[orientation=horizontal]:text-left",e),"data-slot":"collapse-trigger",...s,children:[t,n.jsx("span",{className:"shrink-0 inline-flex transition-transform duration-200 group-data-[state=open]:rotate-180","aria-hidden":!0,children:a??n.jsx(ve,{className:"size-4 text-text-secondary"})})]})}));Qo.displayName="CollapseTrigger";const Yo=y.forwardRef(({className:e,children:t,...a},s)=>n.jsx(bt.Content,{ref:s,className:l("overflow-hidden text-sm text-text-secondary font-sans data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down","data-[orientation=horizontal]:data-[state=closed]:animate-accordion-left data-[orientation=horizontal]:data-[state=open]:animate-accordion-right",e),"data-slot":"collapse-content",...a,children:n.jsx("div",{className:"pb-3 pt-0 data-[orientation=horizontal]:pb-0 data-[orientation=horizontal]:pl-0 data-[orientation=horizontal]:pr-3",children:t})}));Yo.displayName="CollapseContent";function Xo({className:e,...t}){return n.jsx("h1",{className:l("font-sans scroll-m-20 text-4xl font-extrabold tracking-tight text-balance text-text",e),...t})}Xo.displayName="TypographyH1";function Zo({className:e,...t}){return n.jsx("h2",{className:l("font-sans scroll-m-20 border-b border-border-tertiary pb-2 text-3xl font-semibold tracking-tight first:mt-0 text-text",e),...t})}Zo.displayName="TypographyH2";function Ko({className:e,...t}){return n.jsx("h3",{className:l("font-sans scroll-m-20 text-2xl font-semibold tracking-tight text-text",e),...t})}Ko.displayName="TypographyH3";function Jo({className:e,...t}){return n.jsx("h4",{className:l("font-sans scroll-m-20 text-xl font-semibold tracking-tight text-text",e),...t})}Jo.displayName="TypographyH4";function ei({className:e,...t}){return n.jsx("p",{className:l("font-sans leading-7 text-text [&:not(:first-child)]:mt-6",e),...t})}ei.displayName="TypographyP";function ti({className:e,...t}){return n.jsx("blockquote",{className:l("font-sans mt-6 border-l-2 border-border-tertiary pl-6 italic text-text-secondary",e),...t})}ti.displayName="TypographyBlockquote";function ni({className:e,children:t,...a}){return n.jsx(we,{scrollbarVisibility:"auto",className:l("font-sans my-6 w-full",e),children:t})}ni.displayName="TypographyTable";function ai({className:e,...t}){return n.jsx("ul",{className:l("font-sans my-6 ml-6 list-disc text-text [&>li]:mt-2",e),...t})}ai.displayName="TypographyList";function si({className:e,...t}){return n.jsx("code",{className:l("relative rounded bg-fill-secondary px-1 py-0.5 font-mono text-sm font-semibold text-text",e),...t})}si.displayName="TypographyInlineCode";function ri({className:e,...t}){return n.jsx("p",{className:l("font-sans text-xl text-muted-foreground",e),...t})}ri.displayName="TypographyLead";function oi({className:e,...t}){return n.jsx("div",{className:l("font-sans text-lg font-semibold text-text",e),...t})}oi.displayName="TypographyLarge";function ii({className:e,...t}){return n.jsx("small",{className:l("font-sans text-sm font-medium leading-none text-text",e),...t})}ii.displayName="TypographySmall";function li({className:e,...t}){return n.jsx("p",{className:l("font-sans text-sm text-muted-foreground",e),...t})}li.displayName="TypographyMuted";const ci=y.forwardRef(({className:e,...t},a)=>{const s=t.value??t.defaultValue??[50];return n.jsxs(Ot.Root,{ref:a,className:l("relative flex w-full touch-none select-none cursor-pointer items-center","data-[orientation=vertical]:flex-col data-[orientation=vertical]:w-auto data-[orientation=vertical]:h-full",e),...t,children:[n.jsx(Ot.Track,{className:l("relative grow overflow-hidden rounded-full bg-fill-secondary","data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full","data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full"),children:n.jsx(Ot.Range,{className:l("absolute rounded-full bg-primary","data-[orientation=horizontal]:h-full","data-[orientation=vertical]:w-full")})}),s.map((r,o)=>n.jsx(Ot.Thumb,{className:l("block size-5 rounded-full border-2 border-primary bg-bg-base shadow-sm","transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50")},o))]})});ci.displayName="Slider";const di=({className:e,...t})=>n.jsx("nav",{role:"navigation","aria-label":"pagination",className:l("flex w-full justify-center",e),...t});di.displayName="Pagination";const ui=y.forwardRef(({className:e,...t},a)=>n.jsx("ul",{ref:a,className:l("flex flex-row flex-wrap items-center gap-2",e),...t}));ui.displayName="PaginationContent";const mi=y.forwardRef(({className:e,...t},a)=>n.jsx("li",{ref:a,className:l("list-none",e),...t}));mi.displayName="PaginationItem";const pi=y.forwardRef(({className:e,isActive:t,...a},s)=>n.jsx("a",{ref:s,"aria-current":t?"page":void 0,className:l("inline-flex min-w-9 h-9 items-center justify-center rounded-md border text-sm font-medium transition-colors","border-border-tertiary bg-bg-container text-text","hover:bg-fill-secondary hover:text-text hover:border-border-tertiary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50",t&&"bg-fill-secondary border-border-tertiary text-text",e),...a}));pi.displayName="PaginationLink";const xi=y.forwardRef(({className:e,text:t="Previous",...a},s)=>n.jsxs("a",{ref:s,"aria-label":"Go to previous page",className:l("inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors","border-border-tertiary bg-bg-container text-text","hover:bg-fill-secondary hover:text-text hover:border-border-tertiary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50",e),...a,children:[n.jsx(gu,{className:"h-4 w-4 shrink-0"}),n.jsx("span",{className:"hidden sm:inline",children:t})]}));xi.displayName="PaginationPrevious";const fi=y.forwardRef(({className:e,text:t="Next",...a},s)=>n.jsxs("a",{ref:s,"aria-label":"Go to next page",className:l("inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors","border-border-tertiary bg-bg-container text-text","hover:bg-fill-secondary hover:text-text hover:border-border-tertiary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:pointer-events-none disabled:opacity-50",e),...a,children:[n.jsx("span",{className:"hidden sm:inline",children:t}),n.jsx(dt,{className:"h-4 w-4 shrink-0"})]}));fi.displayName="PaginationNext";const hi=({className:e,...t})=>n.jsx("span",{role:"presentation","aria-hidden":!0,className:l("flex h-9 w-9 shrink-0 items-center justify-center text-text-secondary",e),...t,children:"…"});hi.displayName="PaginationEllipsis";const gi=A.cva("inline-flex items-center justify-center gap-1.5 rounded-md border px-2.5 py-0.5 text-xs font-medium transition-colors whitespace-nowrap cursor-pointer group",{variants:{appearance:{filled:"",outline:"bg-transparent"},color:{primary:"",success:"",error:"",warning:"",info:"",link:"",pink:"",purple:"",yellow:"",orange:"",teal:"",blue:"",mauve:"",slate:"",lavender:"",sage:""}},compoundVariants:[{appearance:"filled",color:"primary",className:"border-transparent bg-primary text-text-on-primary hover:bg-primary-hover"},{appearance:"filled",color:"success",className:"border-transparent bg-success-bg text-success border-success-border hover:bg-success-bg-hover"},{appearance:"filled",color:"error",className:"border-transparent bg-error-bg text-error border-error-border hover:bg-error-bg-hover"},{appearance:"filled",color:"warning",className:"border-transparent bg-warning-bg text-warning border-warning-border hover:bg-warning-bg-hover"},{appearance:"filled",color:"info",className:"border-transparent bg-info-bg text-info border-info-border hover:bg-info-bg-hover"},{appearance:"filled",color:"link",className:"border-transparent bg-transparent text-link underline-offset-4 hover:underline hover:text-link"},{appearance:"filled",color:"pink",className:"border-transparent bg-pink-bg text-pink hover:bg-pink-bg-hover"},{appearance:"filled",color:"purple",className:"border-transparent bg-purple-bg text-purple hover:bg-purple-bg-hover"},{appearance:"filled",color:"yellow",className:"border-transparent bg-yellow-bg text-yellow hover:bg-yellow-bg-hover"},{appearance:"filled",color:"orange",className:"border-transparent bg-orange-bg text-orange hover:bg-orange-bg-hover"},{appearance:"filled",color:"teal",className:"border-transparent bg-teal-bg text-teal hover:bg-teal-bg-hover"},{appearance:"filled",color:"blue",className:"border-transparent bg-blue-bg text-blue hover:bg-blue-bg-hover"},{appearance:"filled",color:"mauve",className:"border-transparent bg-mauve-bg text-mauve hover:bg-mauve-bg-hover"},{appearance:"filled",color:"slate",className:"border-transparent bg-slate-bg text-slate hover:bg-slate-bg-hover"},{appearance:"filled",color:"lavender",className:"border-transparent bg-lavender-bg text-lavender hover:bg-lavender-bg-hover"},{appearance:"filled",color:"sage",className:"border-transparent bg-sage-bg text-sage hover:bg-sage-bg-hover"},{appearance:"outline",color:"primary",className:"border-primary-border text-primary hover:bg-primary-bg"},{appearance:"outline",color:"success",className:"border-success-border text-success hover:bg-success-bg"},{appearance:"outline",color:"error",className:"border-error-border text-error hover:bg-error-bg"},{appearance:"outline",color:"warning",className:"border-warning-border text-warning hover:bg-warning-bg"},{appearance:"outline",color:"info",className:"border-info-border text-info hover:bg-info-bg"},{appearance:"outline",color:"link",className:"border-transparent text-link underline-offset-4 hover:underline hover:text-link"},{appearance:"outline",color:"pink",className:"border-pink text-pink hover:bg-pink-bg"},{appearance:"outline",color:"purple",className:"border-purple text-purple hover:bg-purple-bg"},{appearance:"outline",color:"yellow",className:"border-yellow text-yellow hover:bg-yellow-bg"},{appearance:"outline",color:"orange",className:"border-orange text-orange hover:bg-orange-bg"},{appearance:"outline",color:"teal",className:"border-teal text-teal hover:bg-teal-bg"},{appearance:"outline",color:"blue",className:"border-blue text-blue hover:bg-blue-bg"},{appearance:"outline",color:"mauve",className:"border-mauve text-mauve hover:bg-mauve-bg"},{appearance:"outline",color:"slate",className:"border-slate text-slate hover:bg-slate-bg"},{appearance:"outline",color:"lavender",className:"border-lavender text-lavender hover:bg-lavender-bg"},{appearance:"outline",color:"sage",className:"border-sage text-sage hover:bg-sage-bg"}],defaultVariants:{appearance:"filled",color:"primary"}}),ka=y.forwardRef(({className:e,appearance:t="filled",color:a="primary",closable:s=!1,onClose:r,closeAriaLabel:o="Close tag",closeIcon:i,children:c,onMouseEnter:d,onMouseLeave:u,...p},x)=>{const[g,v]=y.useState(!1),f=s&&typeof r=="function",b=j=>{f&&v(!0),d?.(j)},h=j=>{f&&v(!1),u?.(j)},w=j=>{j.preventDefault(),j.stopPropagation(),r?.(j)},k=j=>{j.key!=="Enter"&&j.key!==" "||(j.preventDefault(),j.stopPropagation(),r?.(j))};return n.jsxs("span",{ref:x,className:l(gi({appearance:t,color:a}),f&&"gap-0 pr-1.5",e),onMouseEnter:b,onMouseLeave:h,...p,children:[c,f&&n.jsx(H.motion.div,{"aria-hidden":!0,initial:!1,animate:{width:g?16:0,marginLeft:g?2:0,opacity:g?1:0},transition:{duration:.2,ease:[.4,0,.2,1]},className:"flex min-w-0 shrink-0 overflow-hidden",style:{pointerEvents:g?"auto":"none"},children:n.jsx("button",{type:"button","aria-label":o,className:"inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm text-current/80 hover:text-current focus:outline-none",onClick:w,onKeyDown:k,children:i??n.jsx(gr,{className:"h-3 w-3"})})})]})});ka.displayName="Tag";const yi=y.forwardRef(({className:e,value:t,max:a=100,...s},r)=>{const o=t!=null?Math.min(a,Math.max(0,t)):void 0;return n.jsx(ms.Root,{ref:r,value:o??null,max:a,className:l("relative h-1 w-full overflow-hidden rounded-full bg-fill-secondary",e),style:{height:4},...s,children:n.jsx(ms.Indicator,{className:"h-full rounded-full bg-success transition-[width] duration-200 ease-out",style:{width:o!=null?`${o/a*100}%`:"0%"}})})});yi.displayName="Progress";const bm=124;function Te({headerIcon:e,headerTitle:t,headerRight:a,children:s,defaultExpanded:r=!0,contentPadding:o="var(--spacing-1.5) var(--spacing-2)",onToggle:i,collapsible:c=!0,footer:d,contentMaxHeight:u,showExpandAllBar:p=!1,maxHeight:x=bm,titleShimmer:g=!1,className:v}){const[f,b]=m.useState(r),[h,w]=m.useState(!1),[k,j]=m.useState(!1),[I,C]=m.useState(!1),[L,z]=m.useState(0),[S,O]=m.useState(p&&r),[re,_]=m.useState(!1),U=m.useRef(null);m.useLayoutEffect(()=>{if(!p||!f){C(!1),z(0),O(!1);return}O(!0);const $=()=>{const Q=U.current;if(!Q)return;const Y=Q.scrollHeight;z(Y),C(Y>x),O(!1)},ee=requestAnimationFrame($);let me=null;return U.current&&(me=new ResizeObserver($),me.observe(U.current)),()=>{cancelAnimationFrame(ee),me?.disconnect()}},[p,f,s,x]);const le=()=>{if(!c)return;const $=!f;_(!0),$&&p&&O(!0),b($),i?.($),setTimeout(()=>_(!1),300)},G=c&&(h||e==null)?n.jsx(ve,{className:l("w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 transition-transform duration-200 text-text-secondary",f?"rotate-0":"-rotate-90")}):e,ae=p&&f&&!u,ce=ae&&(S||I&&!k||re||!I&&L===0),R=u!=null?`${u}px`:ce?`${x}px`:ae&&I&&k&&L>0?`${Math.max(L+50,2e3)}px`:void 0;return n.jsxs("div",{className:l("rounded-md overflow-hidden border border-border-tertiary bg-fill-tertiary relative",v),children:[n.jsxs("div",{className:l("flex flex-row items-center gap-2 px-2 py-1.5 select-none",f&&"border-b border-border-tertiary"),onMouseEnter:()=>c&&w(!0),onMouseLeave:()=>c&&w(!1),children:[n.jsxs("div",{className:l("flex flex-row items-center gap-2 flex-1 min-w-0",c&&"cursor-pointer"),onClick:le,role:c?"button":void 0,"aria-expanded":c?f:void 0,children:[n.jsx("div",{className:"w-[var(--font-size-sm)] h-[var(--font-size-sm)] flex items-center justify-center shrink-0 text-text-secondary [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",children:G}),n.jsx("div",{className:"min-w-0 flex-1 flex items-center text-xs leading-xs text-text-secondary",children:g?n.jsx("span",{className:"animate-pulse",children:t}):t})]}),a!=null&&n.jsx("div",{className:"flex items-center gap-1.5 shrink-0 relative z-10",onClick:$=>$.stopPropagation(),onMouseDown:$=>$.stopPropagation(),children:a})]}),n.jsx(H.AnimatePresence,{initial:!1,children:f&&n.jsxs(H.motion.div,{...Br,className:l("overflow-hidden",re&&"select-none"),children:[ae&&n.jsx("div",{ref:U,className:"absolute invisible h-auto w-full pointer-events-none",style:{padding:o},"aria-hidden":!0,children:s}),n.jsxs("div",{className:l("relative overflow-x-hidden bg-bg-base scrollbar-auto",u!=null?"overflow-y-auto":ce?"overflow-y-hidden":"overflow-y-visible",I&&"transition-[max-height] duration-300 ease-in-out"),style:{padding:o,maxHeight:R},children:[s,ae&&I&&L>x&&n.jsx("div",{className:l("absolute bottom-0 left-0 right-0 pointer-events-none h-6 bg-gradient-to-b from-transparent to-[var(--color-bg-base)] transition-opacity duration-300",k?"opacity-0":"opacity-100")})]}),ae&&I&&n.jsx("button",{type:"button",className:"w-full h-4 flex items-center justify-center bg-bg-base border-0 cursor-pointer text-text-secondary hover:text-text transition-colors",onClick:$=>{$.stopPropagation(),_(!0),j(ee=>!ee),setTimeout(()=>_(!1),300)},"aria-label":k?"收起":"展开全部",children:n.jsx(ve,{className:l("w-[var(--font-size-sm)] h-[var(--font-size-sm)] transition-transform duration-200",k?"rotate-180":"rotate-0")})})]})}),d!=null&&n.jsx("div",{className:"flex flex-row items-center gap-2 px-2 py-1.5 border-t border-border-tertiary",children:d})]})}Te.displayName="CollapsibleCard";const vm="w-4 h-4",bi=m.forwardRef(({items:e,selectedId:t,onItemClick:a,width:s="w-52",className:r,moreIcon:o,...i},c)=>{const[d,u]=m.useState(null),p="flex flex-col gap-1.5 rounded-md bg-transparent",x=o??n.jsx(ea,{className:vm});return n.jsx("div",{ref:c,className:l(p,s,r),...i,children:e.map(g=>{const v=t===g.id,f=g.disabled,b=d===g.id;return n.jsxs("div",{className:l("group flex items-center gap-2 py-1 px-2 rounded-md text-sm leading-sm transition-colors","focus-within:outline-none min-w-0",f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer",v?"bg-fill-secondary text-text":"bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text"),children:[n.jsx("button",{onClick:()=>{f||a?.(g),u(null)},disabled:f,className:"flex-1 text-left truncate min-w-0 outline-none bg-transparent border-none p-0 cursor-pointer",children:g.label}),g.actions&&g.actions.length>0?n.jsx("div",{onClick:h=>h.stopPropagation(),children:n.jsxs(We,{open:b,onOpenChange:h=>{u(h?g.id:null)},children:[n.jsx(Ue,{asChild:!0,children:n.jsx("button",{className:l("flex items-center justify-center p-1 rounded outline-none transition-all duration-200 relative z-10 cursor-pointer hover:bg-fill-primary"),style:{pointerEvents:"auto"},onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),children:n.jsx("span",{className:l("transition-opacity pointer-events-none flex items-center justify-center",v?"opacity-100":"opacity-0 group-hover:opacity-100"),children:g.icon??n.jsx("span",{className:l("w-4 h-4 inline-flex items-center justify-center",v?"text-text":"text-text-secondary"),children:x})})})}),n.jsx(Oe,{align:"end",children:g.actions.map(h=>n.jsxs(Se,{variant:h.destructive?"destructive":"default",onClick:w=>{w.stopPropagation(),u(null),h.onClick?.()},children:[h.icon&&n.jsx("span",{className:"mr-2 w-4 h-4 flex items-center justify-center",children:h.icon}),h.label]},h.id))})]})}):n.jsx("span",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:h=>h.stopPropagation(),children:g.icon?n.jsx("span",{className:l("transition-opacity pointer-events-none",v?"opacity-100":"opacity-0 group-hover:opacity-100"),children:g.icon}):n.jsx("span",{className:l("w-4 h-4 inline-flex items-center justify-center transition-opacity pointer-events-none",v?"opacity-100 text-text":"opacity-0 group-hover:opacity-100 text-text-secondary"),children:x})})]},g.id)})})});bi.displayName="SidebarMenu";const wm="w-4 h-4",vi=m.forwardRef((e,t)=>{const a=N("more",wm);return n.jsx(bi,{ref:t,moreIcon:a,...e})});vi.displayName="SidebarMenu";const km=A.cva(["flex w-full min-w-0 rounded-lg border border-border-tertiary bg-bg-container text-text transition-colors","placeholder:text-text-tertiary","file:border-0 file:bg-transparent file:font-medium file:text-text","outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0","focus:border-border-secondary focus-visible:border-border-secondary","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:ring-0"].join(" "),{variants:{size:{sm:"h-7 px-2 py-0.5 text-xs file:text-xs",md:"h-9 px-3 py-1 text-sm file:text-sm",lg:"h-11 px-4 py-1.5 text-base file:text-base"}},defaultVariants:{size:"md"}}),ja=y.forwardRef(({className:e,type:t,size:a="md",...s},r)=>n.jsx("input",{type:t,ref:r,className:l(km({size:a}),e),...s}));ja.displayName="Input";const jm=A.cva(["flex w-full rounded-lg border border-border-tertiary bg-bg-container text-text transition-colors","placeholder:text-text-tertiary","outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0","focus:border-border-secondary focus-visible:border-border-secondary","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:ring-0"].join(" "),{variants:{size:{sm:"min-h-12 px-2 py-1 text-xs",md:"min-h-16 px-3 py-2 text-sm",lg:"min-h-20 px-4 py-2.5 text-base"}},defaultVariants:{size:"md"}}),Na=y.forwardRef(({className:e,size:t="md",...a},s)=>n.jsx("textarea",{ref:s,className:l(jm({size:t}),e),...a}));Na.displayName="Textarea";function Nm({className:e,...t}){return n.jsx("div",{"data-slot":"input-group",role:"group",className:l("group/input-group relative flex w-full items-center rounded-md border border-border-tertiary shadow-sm transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-primary-border has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-primary-border/50","has-[[data-slot][aria-invalid=true]]:border-error has-[[data-slot][aria-invalid=true]]:ring-error/20 dark:has-[[data-slot][aria-invalid=true]]:ring-error/40",e),...t})}const Cm=A.cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-text-tertiary select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function Sm({className:e,align:t="inline-start",...a}){return n.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:l(Cm({align:t}),e),onClick:s=>{s.target.closest("button")||s.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const Im=A.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Rm({className:e,type:t="button",variant:a="ghost",size:s="xs",...r}){return n.jsx(W,{type:t,"data-size":s,variant:a,className:l(Im({size:s}),e),...r})}function Tm({className:e,...t}){return n.jsx("span",{className:l("flex items-center gap-2 text-sm text-text-tertiary [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function Mm({className:e,...t}){return n.jsx(ja,{"data-slot":"input-group-control",className:l("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function Pm({className:e,...t}){return n.jsx(Na,{"data-slot":"input-group-control",className:l("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function zm({className:e,containerClassName:t,...a}){return n.jsx(er.OTPInput,{"data-slot":"input-otp",containerClassName:l("flex items-center gap-2 has-disabled:opacity-50",t),className:l("disabled:cursor-not-allowed",e),...a})}function Lm({className:e,...t}){return n.jsx("div",{"data-slot":"input-otp-group",className:l("flex items-center",e),...t})}function Dm({index:e,className:t,...a}){const s=y.useContext(er.OTPInputContext),{char:r,hasFakeCaret:o,isActive:i}=s?.slots[e]??{};return n.jsxs("div",{"data-slot":"input-otp-slot","data-active":i,className:l("relative flex h-9 w-9 items-center justify-center border-y border-r border-border-tertiary text-sm shadow-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-error data-[active=true]:z-10 data-[active=true]:border-primary-border data-[active=true]:ring-[3px] data-[active=true]:ring-primary-border/50 data-[active=true]:aria-invalid:border-error data-[active=true]:aria-invalid:ring-error/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-error/40",t),...a,children:[r,o&&n.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:n.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})}function Am({...e}){return n.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:n.jsx(xe.MinusIcon,{})})}const Ca=y.forwardRef(({className:e,...t},a)=>n.jsx(tr.Root,{ref:a,className:l("flex items-center gap-2 text-sm font-medium leading-none text-text","peer-disabled:cursor-not-allowed peer-disabled:opacity-50","has-[[disabled]]:cursor-not-allowed has-[[disabled]]:opacity-50",e),...t}));Ca.displayName=tr.Root.displayName;const ln=y.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...s},r)=>n.jsx(nr.Root,{ref:r,decorative:a,orientation:t,className:l("shrink-0 bg-border-tertiary","data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...s}));ln.displayName=nr.Root.displayName;function _m({className:e,...t}){return n.jsx("fieldset",{"data-slot":"field-set",className:l("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...t})}function Om({className:e,variant:t="legend",...a}){return n.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:l("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",e),...a})}function Em({className:e,...t}){return n.jsx("div",{"data-slot":"field-group",className:l("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),...t})}const Fm=A.cva("group/field flex w-full gap-3 data-[invalid=true]:text-error",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function $m({className:e,orientation:t="vertical",...a}){return n.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:l(Fm({orientation:t}),e),...a})}function Bm({className:e,...t}){return n.jsx("div",{"data-slot":"field-content",className:l("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",e),...t})}function Hm({className:e,...t}){return n.jsx(Ca,{"data-slot":"field-label",className:l("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",e),...t})}function Vm({className:e,...t}){return n.jsx("div",{"data-slot":"field-label",className:l("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...t})}function Gm({className:e,...t}){return n.jsx("p",{"data-slot":"field-description",className:l("text-sm leading-normal font-normal text-text-tertiary group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function qm({children:e,className:t,...a}){return n.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:l("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",t),...a,children:[n.jsx(ln,{className:"absolute inset-0 top-1/2"}),e&&n.jsx("span",{className:"relative mx-auto block w-fit bg-bg-base px-2 text-text-tertiary","data-slot":"field-separator-content",children:e})]})}function Wm({className:e,children:t,errors:a,...s}){const r=m.useMemo(()=>{if(t)return t;if(!a?.length)return null;const o=[...new Map(a.map(i=>[i?.message,i])).values()];return o?.length==1?o[0]?.message:n.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:o.map((i,c)=>i?.message&&n.jsx("li",{children:i.message},c))})},[t,a]);return r?n.jsx("div",{role:"alert","data-slot":"field-error",className:l("text-sm font-normal text-error",e),...s,children:r}):null}const wi=A.cva("group peer shrink-0 rounded-sm border border-border-tertiary bg-bg-container outline-offset-2 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary-border disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-text-on-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-text-on-primary",{variants:{size:{sm:"size-3.5",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),ki=y.forwardRef(({className:e,size:t="md",...a},s)=>n.jsx(En.Root,{ref:s,className:l(wi({size:t}),e),...a,children:n.jsxs(En.Indicator,{className:"flex items-center justify-center text-current",children:[n.jsx(be,{className:"size-[0.875em] group-data-[state=indeterminate]:hidden"}),n.jsx("span",{className:"hidden h-[0.125em] w-[0.625em] rounded-sm bg-current group-data-[state=indeterminate]:block"})]})}));ki.displayName=En.Root.displayName;const Um=Nd.Root;function Qm({className:e,...t}){return n.jsx("div",{"data-slot":"empty",className:l("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",e),...t})}function Ym({className:e,...t}){return n.jsx("div",{"data-slot":"empty-header",className:l("flex max-w-sm flex-col items-center gap-2 text-center",e),...t})}const Xm=A.cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-fill-tertiary text-text [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function Zm({className:e,variant:t="default",...a}){return n.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:l(Xm({variant:t,className:e})),...a})}function Km({className:e,...t}){return n.jsx("div",{"data-slot":"empty-title",className:l("text-lg font-medium tracking-tight",e),...t})}function Jm({className:e,...t}){return n.jsx("div",{"data-slot":"empty-description",className:l("text-sm/relaxed text-text-tertiary [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function e0({className:e,...t}){return n.jsx("div",{"data-slot":"empty-content",className:l("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...t})}function t0({className:e,...t}){return n.jsx("div",{role:"list","data-slot":"item-group",className:l("group/item-group flex flex-col",e),...t})}function n0({className:e,...t}){return n.jsx(ln,{"data-slot":"item-separator",orientation:"horizontal",className:l("my-0",e),...t})}const a0=A.cva("group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-primary-border focus-visible:ring-[3px] focus-visible:ring-primary-border/50 [a]:transition-colors [a]:hover:bg-fill-secondary/50",{variants:{variant:{default:"bg-transparent",outline:"border-border",muted:"bg-fill-tertiary/50"},size:{default:"gap-4 p-4",sm:"gap-2.5 px-4 py-3"}},defaultVariants:{variant:"default",size:"default"}});function s0({className:e,variant:t="default",size:a="default",asChild:s=!1,...r}){const o=s?V.Slot.Root:"div";return n.jsx(o,{"data-slot":"item","data-variant":t,"data-size":a,className:l(a0({variant:t,size:a,className:e})),...r})}const r0=A.cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"size-8 rounded-sm border bg-fill-tertiary [&_svg:not([class*='size-'])]:size-4",image:"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function o0({className:e,variant:t="default",...a}){return n.jsx("div",{"data-slot":"item-media","data-variant":t,className:l(r0({variant:t,className:e})),...a})}function i0({className:e,...t}){return n.jsx("div",{"data-slot":"item-content",className:l("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",e),...t})}function l0({className:e,...t}){return n.jsx("div",{"data-slot":"item-title",className:l("flex w-fit items-center gap-2 text-sm leading-snug font-medium",e),...t})}function c0({className:e,...t}){return n.jsx("p",{"data-slot":"item-description",className:l("line-clamp-2 text-sm leading-normal font-normal text-balance text-text-tertiary","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function d0({className:e,...t}){return n.jsx("div",{"data-slot":"item-actions",className:l("flex items-center gap-2",e),...t})}function u0({className:e,...t}){return n.jsx("div",{"data-slot":"item-header",className:l("flex basis-full items-center justify-between gap-2",e),...t})}function m0({className:e,...t}){return n.jsx("div",{"data-slot":"item-footer",className:l("flex basis-full items-center justify-between gap-2",e),...t})}const p0=A.cva("flex flex-col gap-4 rounded-xl text-text py-6",{variants:{variant:{outline:"border border-border-tertiary bg-bg-container shadow-sm transition-shadow hover:shadow-md",filled:"bg-fill-tertiary",ghost:"bg-transparent"}},defaultVariants:{variant:"outline"}}),ji=y.forwardRef(({className:e,variant:t="outline",...a},s)=>n.jsx("div",{ref:s,className:l(p0({variant:t}),e),...a}));ji.displayName="Card";const Ni=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6","has-data-[slot=card-action]:grid-cols-[1fr_auto]","[.border-b]:pb-4",e),...t}));Ni.displayName="CardHeader";const Ci=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("text-base font-semibold leading-none text-text",e),...t}));Ci.displayName="CardTitle";const Si=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("text-sm leading-6 text-text-tertiary",e),...t}));Si.displayName="CardDescription";const Ii=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,"data-slot":"card-action",className:l("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t}));Ii.displayName="CardAction";const Ri=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("px-6",e),...t}));Ri.displayName="CardContent";const Ti=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("flex items-center px-6 [.border-t]:pt-4",e),...t}));Ti.displayName="CardFooter";const Mi=A.cva("relative grid w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm",{variants:{variant:{default:"border-border-tertiary bg-bg-container text-text [&>svg]:text-text-secondary",info:"border-primary-border bg-primary-bg text-text [&>svg]:text-primary",success:"border-success-border bg-success-bg text-text [&>svg]:text-success",warning:"border-warning-border bg-warning-bg text-text [&>svg]:text-warning",destructive:"border-error-border bg-error-bg text-text [&>svg]:text-error"}},defaultVariants:{variant:"default"}}),Pi=y.forwardRef(({className:e,variant:t,...a},s)=>n.jsx("div",{ref:s,role:"alert",className:l(Mi({variant:t}),"has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-3","[&>svg]:size-4 [&>svg]:translate-y-0.5",e),...a}));Pi.displayName="Alert";const zi=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("col-start-2 min-h-4 font-medium leading-5 tracking-tight text-text","line-clamp-1",e),...t}));zi.displayName="AlertTitle";const Li=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("col-start-2 grid justify-items-start gap-1 text-sm leading-6 text-text-secondary","[&_p]:leading-6",e),...t}));Li.displayName="AlertDescription";const Di=y.forwardRef(({...e},t)=>n.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Di.displayName="Breadcrumb";const Ai=y.forwardRef(({className:e,...t},a)=>n.jsx("ol",{ref:a,className:l("flex flex-wrap items-center gap-1.5 text-sm text-text-tertiary break-words sm:gap-2.5",e),...t}));Ai.displayName="BreadcrumbList";const _i=y.forwardRef(({className:e,...t},a)=>n.jsx("li",{ref:a,className:l("inline-flex items-center gap-1.5",e),...t}));_i.displayName="BreadcrumbItem";const Oi=y.forwardRef(({className:e,asChild:t,...a},s)=>t?n.jsx("span",{className:l("transition-colors hover:text-text",e),...a}):n.jsx("a",{ref:s,className:l("transition-colors hover:text-text",e),...a}));Oi.displayName="BreadcrumbLink";const Ei=y.forwardRef(({className:e,...t},a)=>n.jsx("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-text",e),...t}));Ei.displayName="BreadcrumbPage";const Fi=({children:e,className:t,...a})=>n.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5 text-text-tertiary",t),...a,children:e??n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:n.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"})})});Fi.displayName="BreadcrumbSeparator";const $i=({className:e,...t})=>n.jsxs("span",{role:"presentation","aria-hidden":"true",className:l("flex size-9 items-center justify-center",e),...t,children:[n.jsx(ea,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"More"})]});$i.displayName="BreadcrumbEllipsis";const Bi=Z.Root,x0=Z.Trigger,Hi=Z.Portal,f0=Z.Close,Sa=y.forwardRef(({className:e,...t},a)=>n.jsx(Z.Overlay,{ref:a,asChild:!0,...t,children:n.jsx(H.motion.div,{className:l("fixed inset-0 z-50 bg-bg-mask/60",e),...on})}));Sa.displayName=Z.Overlay.displayName;const h0=A.cva("font-sans fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-bg-base text-text shadow-lg p-6 outline-none",{variants:{size:{sm:"max-w-sm",default:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"}},defaultVariants:{size:"default"}}),Ia=y.forwardRef(({className:e,children:t,size:a="default",hideCloseButton:s=!1,dataStyle:r,dataTheme:o,...i},c)=>{const d=ye(),u=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return n.jsx(Hi,{children:n.jsxs("div",{style:{display:"contents"},...u,children:[n.jsx(Sa,{}),n.jsx(Z.Content,{ref:c,asChild:!0,...i,children:n.jsxs(H.motion.div,{className:l(h0({size:a}),e),...ta,children:[t,!s&&n.jsxs(Z.Close,{className:l("absolute right-4 top-4 inline-flex size-7 items-center justify-center rounded-md text-text-tertiary opacity-70 transition-colors","hover:bg-fill-secondary hover:text-text hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border","disabled:pointer-events-none"),children:[n.jsx(Re,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})});Ia.displayName=Z.Content.displayName;const Ra=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("flex flex-col gap-2 text-left",e),...t}));Ra.displayName="DialogHeader";const Vi=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t}));Vi.displayName="DialogFooter";const Ta=y.forwardRef(({className:e,...t},a)=>n.jsx(Z.Title,{ref:a,className:l("font-sans text-base font-medium leading-6 text-text",e),...t}));Ta.displayName=Z.Title.displayName;const Ma=y.forwardRef(({className:e,...t},a)=>n.jsx(Z.Description,{ref:a,className:l("text-sm leading-6 text-text-tertiary",e),...t}));Ma.displayName=Z.Description.displayName;const Gi=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(Ia,{ref:t,dataStyle:a,dataTheme:s,...e})});Gi.displayName="DialogContent";const qi=Z.Root,Wi=Z.Trigger,Ui=Z.Close,Pa=Z.Portal,cn=y.forwardRef(({className:e,...t},a)=>n.jsx(Z.Overlay,{ref:a,asChild:!0,...t,children:n.jsx(H.motion.div,{className:l("fixed inset-0 z-50 bg-bg-mask/60",e),...on})}));cn.displayName=Z.Overlay.displayName;const Qi=A.cva("fixed z-50 gap-4 bg-bg-base text-text shadow-lg border-border p-6 outline-none flex flex-col",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),g0={top:{initial:{y:"-100%"},animate:{y:0},exit:{y:"-100%"}},bottom:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}},left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}}},za=y.forwardRef(({side:e="right",className:t,children:a,showCloseButton:s=!0,dataStyle:r,dataTheme:o,...i},c)=>{const d=ye(),u=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d,p=g0[e];return n.jsx(Pa,{children:n.jsxs("div",{style:{display:"contents"},...u,children:[n.jsx(cn,{}),n.jsx(Z.Content,{ref:c,asChild:!0,...i,children:n.jsxs(H.motion.div,{className:l(Qi({side:e}),t),initial:p.initial,animate:p.animate,exit:p.exit,transition:{duration:Ce.slow,ease:Pe.standard},children:[a,s&&n.jsxs(Z.Close,{className:l("absolute right-4 top-4 inline-flex size-7 items-center justify-center rounded-md text-text-tertiary opacity-70 transition-colors","hover:bg-fill-secondary hover:text-text hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border","disabled:pointer-events-none"),children:[n.jsx(Re,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})});za.displayName=Z.Content.displayName;const La=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("flex flex-col gap-1.5",e),...t}));La.displayName="DrawerHeader";const Da=y.forwardRef(({className:e,...t},a)=>n.jsx("div",{ref:a,className:l("mt-auto flex flex-col gap-2",e),...t}));Da.displayName="DrawerFooter";const Aa=y.forwardRef(({className:e,...t},a)=>n.jsx(Z.Title,{ref:a,className:l("text-base font-medium leading-6 text-text",e),...t}));Aa.displayName=Z.Title.displayName;const _a=y.forwardRef(({className:e,...t},a)=>n.jsx(Z.Description,{ref:a,className:l("text-sm leading-6 text-text-tertiary",e),...t}));_a.displayName=Z.Description.displayName;const Yi=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(za,{ref:t,dataStyle:a,dataTheme:s,...e})});Yi.displayName="DrawerContent";const Oa=st.Root,Ea=st.Trigger,y0=st.Anchor,dn=y.forwardRef(({className:e,align:t="center",sideOffset:a=4,children:s,dataStyle:r,dataTheme:o,...i},c)=>{const d=ye(),u=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return n.jsx(st.Portal,{children:n.jsx("div",{style:{display:"contents"},...u,children:n.jsx(st.Content,{ref:c,align:t,sideOffset:a,className:l("z-50 w-72 rounded-lg border border-border-tertiary bg-bg-container p-4 text-sm text-text shadow-md outline-none",e),...i,children:n.jsx(H.motion.div,{...ut,children:s})})})})});dn.displayName=st.Content.displayName;const Xi=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(dn,{ref:t,dataStyle:a,dataTheme:s,...e})});Xi.displayName="PopoverContent";const b0=yt.Root,v0=yt.Trigger,Zi=y.forwardRef(({className:e,align:t="center",sideOffset:a=4,children:s,dataStyle:r,dataTheme:o,...i},c)=>{const d=ye(),u=r!==void 0?{"data-style":r,"data-theme":o??d["data-theme"]??""}:d;return n.jsx(yt.Portal,{children:n.jsx("div",{style:{display:"contents"},...u,children:n.jsx(yt.Content,{ref:c,align:t,sideOffset:a,className:l("z-50 w-64 rounded-lg border border-border-tertiary bg-bg-container p-4 text-sm text-text shadow-md outline-none",e),...i,children:n.jsx(H.motion.div,{...ut,children:s})})})})});Zi.displayName=yt.Content.displayName;const Ki=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(Zi,{ref:t,dataStyle:a,dataTheme:s,...e})});Ki.displayName="HoverCardContent";const w0=K.Root,k0=K.Trigger,j0=K.Group,N0=K.Portal,C0=K.Sub,S0=K.RadioGroup,Ji="z-50 min-w-32 overflow-hidden rounded-lg border border-border-tertiary bg-bg-container p-1 text-text shadow-lg outline-none",el=y.forwardRef(({className:e,children:t,dataStyle:a,dataTheme:s,...r},o)=>{const i=ye(),c=a!==void 0?{"data-style":a,"data-theme":s??i["data-theme"]??""}:i;return n.jsx(K.Portal,{children:n.jsx("div",{style:{display:"contents"},...c,children:n.jsx(K.Content,{ref:o,className:l(Ji,e),...r,children:n.jsx(H.motion.div,{...ut,children:t})})})})});el.displayName=K.Content.displayName;const I0=A.cva("flex h-9 w-full cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none hover:bg-fill-secondary focus:bg-fill-secondary data-[highlighted]:bg-fill-secondary data-[state=open]:bg-fill-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),tl=y.forwardRef(({className:e,inset:t=!1,children:a,...s},r)=>n.jsxs(K.SubTrigger,{ref:r,className:l(I0({inset:t}),e),...s,children:[a,n.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center",children:n.jsx(dt,{className:"h-4 w-4"})})]}));tl.displayName=K.SubTrigger.displayName;const nl=y.forwardRef(({className:e,dataStyle:t,dataTheme:a,...s},r)=>{const o=ye(),i=t!==void 0?{"data-style":t,"data-theme":a??o["data-theme"]??""}:o;return n.jsx(K.Portal,{children:n.jsx("div",{style:{display:"contents"},...i,children:n.jsx(K.SubContent,{ref:r,className:l(Ji,e),...s})})})});nl.displayName=K.SubContent.displayName;const R0=A.cva("relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-3 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{variant:{default:"hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text",destructive:"text-error hover:bg-error-bg focus:bg-error-bg focus:text-error data-[highlighted]:bg-error-bg data-[highlighted]:text-error"},inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{variant:"default",inset:!1}}),al=y.forwardRef(({className:e,inset:t=!1,variant:a="default",...s},r)=>n.jsx(K.Item,{ref:r,className:l(R0({variant:a,inset:t}),e),...s}));al.displayName=K.Item.displayName;const sl="relative flex h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm pl-8 pr-3 text-sm outline-none hover:bg-fill-secondary focus:bg-fill-secondary focus:text-text data-[highlighted]:bg-fill-secondary data-[highlighted]:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",rl=y.forwardRef(({className:e,children:t,checked:a,...s},r)=>n.jsxs(K.CheckboxItem,{ref:r,checked:a,className:l(sl,e),...s,children:[n.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:n.jsx(K.ItemIndicator,{children:n.jsx(be,{className:"h-4 w-4"})})}),t]}));rl.displayName=K.CheckboxItem.displayName;const ol=y.forwardRef(({className:e,children:t,...a},s)=>n.jsxs(K.RadioItem,{ref:s,className:l(sl,e),...a,children:[n.jsx("span",{className:"absolute left-2 top-1/2 flex h-3.5 w-3.5 -translate-y-1/2 items-center justify-center",children:n.jsx(K.ItemIndicator,{children:n.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"})})}),t]}));ol.displayName=K.RadioItem.displayName;const T0=A.cva("flex h-9 items-center px-3 text-sm font-semibold text-text-secondary",{variants:{inset:{true:"pl-8 pr-3",false:""}},defaultVariants:{inset:!1}}),il=y.forwardRef(({className:e,inset:t=!1,...a},s)=>n.jsx(K.Label,{ref:s,className:l(T0({inset:t}),e),...a}));il.displayName=K.Label.displayName;const ll=y.forwardRef(({className:e,...t},a)=>n.jsx(K.Separator,{ref:a,className:l("my-1 mx-1 h-px bg-border-tertiary",e),...t}));ll.displayName=K.Separator.displayName;const cl=({className:e,...t})=>n.jsx("span",{className:l("ml-auto text-xs tracking-widest text-text-tertiary",e),...t});cl.displayName="ContextMenuShortcut";const dl=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(el,{ref:t,dataStyle:a,dataTheme:s,...e})});dl.displayName="ContextMenuContent";const ul=y.forwardRef((e,t)=>{const{style:a,theme:s}=ue();return n.jsx(nl,{ref:t,dataStyle:a,dataTheme:s,...e})});ul.displayName="ContextMenuSubContent";function M0({className:e,...t}){return n.jsx(V.Menubar.Root,{"data-slot":"menubar",className:l("flex h-9 items-center gap-1 rounded-md border bg-bg-base p-1 shadow-sm",e),...t})}function P0({...e}){return n.jsx(V.Menubar.Menu,{"data-slot":"menubar-menu",...e})}function z0({...e}){return n.jsx(V.Menubar.Group,{"data-slot":"menubar-group",...e})}function ml({...e}){return n.jsx(V.Menubar.Portal,{"data-slot":"menubar-portal",...e})}function L0({...e}){return n.jsx(V.Menubar.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function D0({className:e,...t}){return n.jsx(V.Menubar.Trigger,{"data-slot":"menubar-trigger",className:l("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-none select-none focus:bg-fill-secondary focus:text-text data-[state=open]:bg-fill-secondary data-[state=open]:text-text",e),...t})}function A0({className:e,align:t="start",alignOffset:a=-4,sideOffset:s=8,...r}){return n.jsx(ml,{children:n.jsx(V.Menubar.Content,{"data-slot":"menubar-content",align:t,alignOffset:a,sideOffset:s,className:l("z-50 min-w-48 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-bg-container p-1 text-text shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...r})})}function _0({className:e,inset:t,variant:a="default",...s}){return n.jsx(V.Menubar.Item,{"data-slot":"menubar-item","data-inset":t,"data-variant":a,className:l("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-error data-[variant=destructive]:focus:bg-error/10 data-[variant=destructive]:focus:text-error dark:data-[variant=destructive]:focus:bg-error/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-text-tertiary data-[variant=destructive]:*:[svg]:text-error!",e),...s})}function O0({className:e,children:t,checked:a,...s}){return n.jsxs(V.Menubar.CheckboxItem,{"data-slot":"menubar-checkbox-item",className:l("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...s,children:[n.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n.jsx(V.Menubar.ItemIndicator,{children:n.jsx(xe.CheckIcon,{className:"size-4"})})}),t]})}function E0({className:e,children:t,...a}){return n.jsxs(V.Menubar.RadioItem,{"data-slot":"menubar-radio-item",className:l("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[n.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n.jsx(V.Menubar.ItemIndicator,{children:n.jsx(xe.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function F0({className:e,inset:t,...a}){return n.jsx(V.Menubar.Label,{"data-slot":"menubar-label","data-inset":t,className:l("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function $0({className:e,...t}){return n.jsx(V.Menubar.Separator,{"data-slot":"menubar-separator",className:l("-mx-1 my-1 h-px bg-border",e),...t})}function B0({className:e,...t}){return n.jsx("span",{"data-slot":"menubar-shortcut",className:l("ml-auto text-xs tracking-widest text-text-tertiary",e),...t})}function H0({...e}){return n.jsx(V.Menubar.Sub,{"data-slot":"menubar-sub",...e})}function V0({className:e,inset:t,children:a,...s}){return n.jsxs(V.Menubar.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":t,className:l("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-fill-secondary focus:text-text data-[inset]:pl-8 data-[state=open]:bg-fill-secondary data-[state=open]:text-text",e),...s,children:[a,n.jsx(xe.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function G0({className:e,...t}){return n.jsx(V.Menubar.SubContent,{"data-slot":"menubar-sub-content",className:l("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-bg-container p-1 text-text shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...t})}function q0({className:e,children:t,viewport:a=!0,...s}){return n.jsxs(V.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":a,className:l("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...s,children:[t,a&&n.jsx(xl,{})]})}function W0({className:e,...t}){return n.jsx(V.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:l("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function U0({className:e,...t}){return n.jsx(V.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:l("relative",e),...t})}const pl=A.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-bg-base px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none hover:bg-fill-secondary hover:text-text focus:bg-fill-secondary focus:text-text focus-visible:ring-[3px] focus-visible:ring-primary-border/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-fill-secondary/50 data-[state=open]:text-text data-[state=open]:hover:bg-fill-secondary data-[state=open]:focus:bg-fill-secondary");function Q0({className:e,children:t,...a}){return n.jsxs(V.NavigationMenu.Trigger,{"data-slot":"navigation-menu-trigger",className:l(pl(),"group",e),...a,children:[t," ",n.jsx(xe.ChevronDownIcon,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function Y0({className:e,...t}){return n.jsx(V.NavigationMenu.Content,{"data-slot":"navigation-menu-content",className:l("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-bg-container group-data-[viewport=false]/navigation-menu:text-text group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",e),...t})}function xl({className:e,...t}){return n.jsx("div",{className:l("absolute top-full left-0 isolate z-50 flex justify-center"),children:n.jsx(V.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:l("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-bg-container text-text shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function X0({className:e,...t}){return n.jsx(V.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:l("flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-fill-secondary hover:text-text focus:bg-fill-secondary focus:text-text focus-visible:ring-[3px] focus-visible:ring-primary-border/50 focus-visible:outline-1 data-[active=true]:bg-fill-secondary/50 data-[active=true]:text-text data-[active=true]:hover:bg-fill-secondary data-[active=true]:focus:bg-fill-secondary [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-text-tertiary",e),...t})}function Z0({className:e,...t}){return n.jsx(V.NavigationMenu.Indicator,{"data-slot":"navigation-menu-indicator",className:l("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",e),...t,children:n.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})})}function Fa({className:e,...t}){return n.jsx(Qe.Command,{"data-slot":"command",className:l("flex h-full w-full flex-col overflow-hidden rounded-md bg-bg-container text-text",e),...t})}function K0({title:e="Command Palette",description:t="Search for a command to run...",children:a,className:s,showCloseButton:r=!0,...o}){return n.jsxs(Bi,{...o,children:[n.jsxs(Ra,{className:"sr-only",children:[n.jsx(Ta,{children:e}),n.jsx(Ma,{children:t})]}),n.jsx(Ia,{className:l("overflow-hidden p-0",s),hideCloseButton:!r,children:n.jsx(Fa,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:a})})]})}function fl({className:e,...t}){return n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[n.jsx(xe.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),n.jsx(Qe.Command.Input,{"data-slot":"command-input",className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-text-tertiary disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function hl({className:e,...t}){return n.jsx(Qe.Command.List,{"data-slot":"command-list",className:l("max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function gl({...e}){return n.jsx(Qe.Command.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function yl({className:e,...t}){return n.jsx(Qe.Command.Group,{"data-slot":"command-group",className:l("overflow-hidden p-1 text-text [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary",e),...t})}function J0({className:e,...t}){return n.jsx(Qe.Command.Separator,{"data-slot":"command-separator",className:l("-mx-1 h-px bg-border",e),...t})}function bl({className:e,...t}){return n.jsx(Qe.Command.Item,{"data-slot":"command-item",className:l("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-fill-secondary data-[selected=true]:text-text [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-text-tertiary",e),...t})}function ep({className:e,...t}){return n.jsx("span",{"data-slot":"command-shortcut",className:l("ml-auto text-xs tracking-widest text-text-tertiary",e),...t})}function tp({options:e,value:t,defaultValue:a,onValueChange:s,placeholder:r="Select an option…",searchPlaceholder:o="Search…",emptyText:i="No option found.",disabled:c,className:d,contentClassName:u,triggerClassName:p,align:x="start",id:g,name:v,"aria-label":f}){const b=t!==void 0,[h,w]=y.useState(a),[k,j]=y.useState(!1),I=b?t:h,C=e.find(z=>z.value===I),L=y.useCallback(z=>{const S=z===I?"":z;b||w(S),s?.(S),j(!1)},[I,b,s]);return n.jsxs("div",{className:l("w-60",d),children:[n.jsxs(Oa,{open:k,onOpenChange:j,children:[n.jsx(Ea,{asChild:!0,children:n.jsx(W,{id:g,variant:"outline",role:"combobox","aria-expanded":k,"aria-label":f,disabled:c,className:l("w-full justify-between font-normal",!C&&"text-text-tertiary",p),suffixIcon:n.jsx(xe.ChevronsUpDownIcon,{className:"size-4 shrink-0 opacity-60"}),children:n.jsx("span",{className:"truncate text-left",children:C?C.label:r})})}),n.jsx(dn,{align:x,className:l("w-[var(--radix-popover-trigger-width)] min-w-56 p-0",u),children:n.jsxs(Fa,{children:[n.jsx(fl,{placeholder:o}),n.jsxs(hl,{children:[n.jsx(gl,{children:i}),n.jsx(yl,{children:e.map(z=>n.jsxs(bl,{value:z.value,keywords:[z.label,...z.keywords??[]],disabled:z.disabled,onSelect:L,children:[n.jsx(xe.CheckIcon,{className:l("mr-2 size-4",z.value===I?"opacity-100":"opacity-0")}),n.jsx("span",{className:"truncate",children:z.label})]},z.value))})]})]})})]}),v?n.jsx("input",{type:"hidden",name:v,value:I??""}):null]})}function np({className:e,size:t="default",...a}){return n.jsxs("div",{className:"group/native-select relative w-fit has-[select:disabled]:opacity-50","data-slot":"native-select-wrapper",children:[n.jsx("select",{"data-slot":"native-select","data-size":t,className:l("h-9 w-full min-w-0 appearance-none rounded-md border border-border-tertiary bg-transparent px-3 py-2 pr-9 text-sm shadow-sm transition-[color,box-shadow] outline-none selection:bg-primary selection:text-text-on-primary placeholder:text-text-tertiary disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50","focus-visible:border-primary-border focus-visible:ring-[3px] focus-visible:ring-primary-border/50","aria-invalid:border-error aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40",e),...a}),n.jsx(xe.ChevronDownIcon,{className:"pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-text-tertiary opacity-50 select-none","aria-hidden":"true","data-slot":"native-select-icon"})]})}function ap({className:e,...t}){return n.jsx("option",{"data-slot":"native-select-option",className:l("bg-[Canvas] text-[CanvasText]",e),...t})}function sp({className:e,...t}){return n.jsx("optgroup",{"data-slot":"native-select-optgroup",className:l("bg-[Canvas] text-[CanvasText]",e),...t})}function vl({className:e,classNames:t,showOutsideDays:a=!0,captionLayout:s="label",buttonVariant:r="ghost",formatters:o,components:i,...c}){const d=On.getDefaultClassNames();return n.jsx(On.DayPicker,{showOutsideDays:a,className:l("group/calendar bg-bg-base p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:s,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...o},classNames:{root:l("w-fit",d.root),months:l("relative flex flex-col gap-4 md:flex-row",d.months),month:l("flex w-full flex-col gap-4",d.month),nav:l("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",d.nav),button_previous:l(vt({variant:r}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",d.button_previous),button_next:l(vt({variant:r}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",d.button_next),month_caption:l("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",d.month_caption),dropdowns:l("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",d.dropdowns),dropdown_root:l("relative rounded-md border border-border-tertiary shadow-sm has-focus:border-primary-border has-focus:ring-[3px] has-focus:ring-primary-border/50",d.dropdown_root),dropdown:l("absolute inset-0 bg-bg-container opacity-0",d.dropdown),caption_label:l("font-medium select-none",s==="label"?"text-sm":"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-text-tertiary",d.caption_label),table:"w-full border-collapse",weekdays:l("flex",d.weekdays),weekday:l("flex-1 rounded-md text-[0.8rem] font-normal text-text-tertiary select-none",d.weekday),week:l("mt-2 flex w-full",d.week),week_number_header:l("w-(--cell-size) select-none",d.week_number_header),week_number:l("text-[0.8rem] text-text-tertiary select-none",d.week_number),day:l("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",c.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",d.day),range_start:l("rounded-l-md bg-fill-secondary",d.range_start),range_middle:l("rounded-none",d.range_middle),range_end:l("rounded-r-md bg-fill-secondary",d.range_end),today:l("rounded-md bg-fill-secondary text-text data-[selected=true]:rounded-none",d.today),outside:l("text-text-tertiary aria-selected:text-text-tertiary",d.outside),disabled:l("text-text-tertiary opacity-50",d.disabled),hidden:l("invisible",d.hidden),...t},components:{Root:({className:u,rootRef:p,...x})=>n.jsx("div",{"data-slot":"calendar",ref:p,className:l(u),...x}),Chevron:({className:u,orientation:p,...x})=>p==="left"?n.jsx(xe.ChevronLeftIcon,{className:l("size-4",u),...x}):p==="right"?n.jsx(xe.ChevronRightIcon,{className:l("size-4",u),...x}):n.jsx(xe.ChevronDownIcon,{className:l("size-4",u),...x}),DayButton:wl,WeekNumber:({children:u,...p})=>n.jsx("td",{...p,children:n.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:u})}),...i},...c})}function wl({className:e,day:t,modifiers:a,...s}){const r=On.getDefaultClassNames(),o=y.useRef(null);return y.useEffect(()=>{a.focused&&o.current?.focus()},[a.focused]),n.jsx("button",{ref:o,"data-day":t.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:l("inline-flex items-center justify-center transition-colors hover:bg-fill-secondary hover:text-text","flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 px-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-primary-border group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-primary-border/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-text-on-primary data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-fill-secondary data-[range-middle=true]:text-text data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-text-on-primary data-[selected-single=true]:bg-primary data-[selected-single=true]:text-text-on-primary dark:hover:text-text [&>span]:text-xs [&>span]:opacity-70",r.day,e),...s})}const kl=6048e5,rp=864e5,Cs=Symbol.for("constructDateFrom");function Ee(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Cs in e?e[Cs](t):e instanceof Date?new e.constructor(t):new Date(t)}function ke(e,t){return Ee(t||e,e)}let op={};function un(){return op}function wt(e,t){const a=un(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,r=ke(e,t?.in),o=r.getDay(),i=(o<s?7:0)+o-s;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function Yt(e,t){return wt(e,{...t,weekStartsOn:1})}function jl(e,t){const a=ke(e,t?.in),s=a.getFullYear(),r=Ee(a,0);r.setFullYear(s+1,0,4),r.setHours(0,0,0,0);const o=Yt(r),i=Ee(a,0);i.setFullYear(s,0,4),i.setHours(0,0,0,0);const c=Yt(i);return a.getTime()>=o.getTime()?s+1:a.getTime()>=c.getTime()?s:s-1}function Ss(e){const t=ke(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function ip(e,...t){const a=Ee.bind(null,t.find(s=>typeof s=="object"));return t.map(a)}function Is(e,t){const a=ke(e,t?.in);return a.setHours(0,0,0,0),a}function lp(e,t,a){const[s,r]=ip(a?.in,e,t),o=Is(s),i=Is(r),c=+o-Ss(o),d=+i-Ss(i);return Math.round((c-d)/rp)}function cp(e,t){const a=jl(e,t),s=Ee(e,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),Yt(s)}function dp(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function up(e){return!(!dp(e)&&typeof e!="number"||isNaN(+ke(e)))}function mp(e,t){const a=ke(e,t?.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const pp={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xp=(e,t,a)=>{let s;const r=pp[e];return typeof r=="string"?s=r:t===1?s=r.one:s=r.other.replace("{{count}}",t.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+s:s+" ago":s};function Ln(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const fp={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hp={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gp={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yp={date:Ln({formats:fp,defaultWidth:"full"}),time:Ln({formats:hp,defaultWidth:"full"}),dateTime:Ln({formats:gp,defaultWidth:"full"})},bp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vp=(e,t,a,s)=>bp[e];function pt(e){return(t,a)=>{const s=a?.context?String(a.context):"standalone";let r;if(s==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=a?.width?String(a.width):i;r=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=a?.width?String(a.width):e.defaultWidth;r=e.values[c]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return r[o]}}const wp={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kp={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Np={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Cp={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Sp={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ip=(e,t)=>{const a=Number(e),s=a%100;if(s>20||s<10)switch(s%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Rp={ordinalNumber:Ip,era:pt({values:wp,defaultWidth:"wide"}),quarter:pt({values:kp,defaultWidth:"wide",argumentCallback:e=>e-1}),month:pt({values:jp,defaultWidth:"wide"}),day:pt({values:Np,defaultWidth:"wide"}),dayPeriod:pt({values:Cp,defaultWidth:"wide",formattingValues:Sp,defaultFormattingWidth:"wide"})};function xt(e){return(t,a={})=>{const s=a.width,r=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;const i=o[0],c=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?Mp(c,x=>x.test(i)):Tp(c,x=>x.test(i));let u;u=e.valueCallback?e.valueCallback(d):d,u=a.valueCallback?a.valueCallback(u):u;const p=t.slice(i.length);return{value:u,rest:p}}}function Tp(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function Mp(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function Pp(e){return(t,a={})=>{const s=t.match(e.matchPattern);if(!s)return null;const r=s[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=a.valueCallback?a.valueCallback(i):i;const c=t.slice(r.length);return{value:i,rest:c}}}const zp=/^(\d+)(th|st|nd|rd)?/i,Lp=/\d+/i,Dp={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ap={any:[/^b/i,/^(a|c)/i]},_p={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Op={any:[/1/i,/2/i,/3/i,/4/i]},Ep={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Fp={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Bp={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Hp={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Vp={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gp={ordinalNumber:Pp({matchPattern:zp,parsePattern:Lp,valueCallback:e=>parseInt(e,10)}),era:xt({matchPatterns:Dp,defaultMatchWidth:"wide",parsePatterns:Ap,defaultParseWidth:"any"}),quarter:xt({matchPatterns:_p,defaultMatchWidth:"wide",parsePatterns:Op,defaultParseWidth:"any",valueCallback:e=>e+1}),month:xt({matchPatterns:Ep,defaultMatchWidth:"wide",parsePatterns:Fp,defaultParseWidth:"any"}),day:xt({matchPatterns:$p,defaultMatchWidth:"wide",parsePatterns:Bp,defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:Hp,defaultMatchWidth:"any",parsePatterns:Vp,defaultParseWidth:"any"})},qp={code:"en-US",formatDistance:xp,formatLong:yp,formatRelative:vp,localize:Rp,match:Gp,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Wp(e,t){const a=ke(e,t?.in);return lp(a,mp(a))+1}function Up(e,t){const a=ke(e,t?.in),s=+Yt(a)-+cp(a);return Math.round(s/kl)+1}function Nl(e,t){const a=ke(e,t?.in),s=a.getFullYear(),r=un(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=Ee(t?.in||e,0);i.setFullYear(s+1,0,o),i.setHours(0,0,0,0);const c=wt(i,t),d=Ee(t?.in||e,0);d.setFullYear(s,0,o),d.setHours(0,0,0,0);const u=wt(d,t);return+a>=+c?s+1:+a>=+u?s:s-1}function Qp(e,t){const a=un(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=Nl(e,t),o=Ee(t?.in||e,0);return o.setFullYear(r,0,s),o.setHours(0,0,0,0),wt(o,t)}function Yp(e,t){const a=ke(e,t?.in),s=+wt(a,t)-+Qp(a,t);return Math.round(s/kl)+1}function q(e,t){const a=e<0?"-":"",s=Math.abs(e).toString().padStart(t,"0");return a+s}const Ae={y(e,t){const a=e.getFullYear(),s=a>0?a:1-a;return q(t==="yy"?s%100:s,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):q(a+1,2)},d(e,t){return q(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];default:return a==="am"?"a.m.":"p.m."}},h(e,t){return q(e.getHours()%12||12,t.length)},H(e,t){return q(e.getHours(),t.length)},m(e,t){return q(e.getMinutes(),t.length)},s(e,t){return q(e.getSeconds(),t.length)},S(e,t){const a=t.length,s=e.getMilliseconds(),r=Math.trunc(s*Math.pow(10,a-3));return q(r,t.length)}},nt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rs={G:function(e,t,a){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(s,{width:"abbreviated"});case"GGGGG":return a.era(s,{width:"narrow"});default:return a.era(s,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const s=e.getFullYear(),r=s>0?s:1-s;return a.ordinalNumber(r,{unit:"year"})}return Ae.y(e,t)},Y:function(e,t,a,s){const r=Nl(e,s),o=r>0?r:1-r;if(t==="YY"){const i=o%100;return q(i,2)}return t==="Yo"?a.ordinalNumber(o,{unit:"year"}):q(o,t.length)},R:function(e,t){const a=jl(e);return q(a,t.length)},u:function(e,t){const a=e.getFullYear();return q(a,t.length)},Q:function(e,t,a){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return q(s,2);case"Qo":return a.ordinalNumber(s,{unit:"quarter"});case"QQQ":return a.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(s,{width:"narrow",context:"formatting"});default:return a.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,a){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return q(s,2);case"qo":return a.ordinalNumber(s,{unit:"quarter"});case"qqq":return a.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(s,{width:"narrow",context:"standalone"});default:return a.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,a){const s=e.getMonth();switch(t){case"M":case"MM":return Ae.M(e,t);case"Mo":return a.ordinalNumber(s+1,{unit:"month"});case"MMM":return a.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(s,{width:"narrow",context:"formatting"});default:return a.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,a){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return q(s+1,2);case"Lo":return a.ordinalNumber(s+1,{unit:"month"});case"LLL":return a.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(s,{width:"narrow",context:"standalone"});default:return a.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,a,s){const r=Yp(e,s);return t==="wo"?a.ordinalNumber(r,{unit:"week"}):q(r,t.length)},I:function(e,t,a){const s=Up(e);return t==="Io"?a.ordinalNumber(s,{unit:"week"}):q(s,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Ae.d(e,t)},D:function(e,t,a){const s=Wp(e);return t==="Do"?a.ordinalNumber(s,{unit:"dayOfYear"}):q(s,t.length)},E:function(e,t,a){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(s,{width:"short",context:"formatting"});default:return a.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,a,s){const r=e.getDay(),o=(r-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return q(o,2);case"eo":return a.ordinalNumber(o,{unit:"day"});case"eee":return a.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(r,{width:"short",context:"formatting"});default:return a.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,a,s){const r=e.getDay(),o=(r-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return q(o,t.length);case"co":return a.ordinalNumber(o,{unit:"day"});case"ccc":return a.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(r,{width:"narrow",context:"standalone"});case"cccccc":return a.day(r,{width:"short",context:"standalone"});default:return a.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,a){const s=e.getDay(),r=s===0?7:s;switch(t){case"i":return String(r);case"ii":return q(r,t.length);case"io":return a.ordinalNumber(r,{unit:"day"});case"iii":return a.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(s,{width:"short",context:"formatting"});default:return a.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,a){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(r,{width:"narrow",context:"formatting"});default:return a.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,a){const s=e.getHours();let r;switch(s===12?r=nt.noon:s===0?r=nt.midnight:r=s/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(r,{width:"narrow",context:"formatting"});default:return a.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,a){const s=e.getHours();let r;switch(s>=17?r=nt.evening:s>=12?r=nt.afternoon:s>=4?r=nt.morning:r=nt.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(r,{width:"narrow",context:"formatting"});default:return a.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let s=e.getHours()%12;return s===0&&(s=12),a.ordinalNumber(s,{unit:"hour"})}return Ae.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Ae.H(e,t)},K:function(e,t,a){const s=e.getHours()%12;return t==="Ko"?a.ordinalNumber(s,{unit:"hour"}):q(s,t.length)},k:function(e,t,a){let s=e.getHours();return s===0&&(s=24),t==="ko"?a.ordinalNumber(s,{unit:"hour"}):q(s,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ae.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Ae.s(e,t)},S:function(e,t){return Ae.S(e,t)},X:function(e,t,a){const s=e.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Ms(s);case"XXXX":case"XX":return qe(s);default:return qe(s,":")}},x:function(e,t,a){const s=e.getTimezoneOffset();switch(t){case"x":return Ms(s);case"xxxx":case"xx":return qe(s);default:return qe(s,":")}},O:function(e,t,a){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ts(s,":");default:return"GMT"+qe(s,":")}},z:function(e,t,a){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ts(s,":");default:return"GMT"+qe(s,":")}},t:function(e,t,a){const s=Math.trunc(+e/1e3);return q(s,t.length)},T:function(e,t,a){return q(+e,t.length)}};function Ts(e,t=""){const a=e>0?"-":"+",s=Math.abs(e),r=Math.trunc(s/60),o=s%60;return o===0?a+String(r):a+String(r)+t+q(o,2)}function Ms(e,t){return e%60===0?(e>0?"-":"+")+q(Math.abs(e)/60,2):qe(e,t)}function qe(e,t=""){const a=e>0?"-":"+",s=Math.abs(e),r=q(Math.trunc(s/60),2),o=q(s%60,2);return a+r+t+o}const Ps=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Cl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Xp=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],s=a[1],r=a[2];if(!r)return Ps(e,t);let o;switch(s){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Ps(s,t)).replace("{{time}}",Cl(r,t))},Zp={p:Cl,P:Xp},Kp=/^D+$/,Jp=/^Y+$/,ex=["D","DD","YY","YYYY"];function tx(e){return Kp.test(e)}function nx(e){return Jp.test(e)}function ax(e,t,a){const s=sx(e,t,a);if(console.warn(s),ex.includes(e))throw new RangeError(s)}function sx(e,t,a){const s=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const rx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ox=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ix=/^'([^]*?)'?$/,lx=/''/g,cx=/[a-zA-Z]/;function dx(e,t,a){const s=un(),r=s.locale??qp,o=s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=ke(e,a?.in);if(!up(c))throw new RangeError("Invalid time value");let d=t.match(ox).map(p=>{const x=p[0];if(x==="p"||x==="P"){const g=Zp[x];return g(p,r.formatLong)}return p}).join("").match(rx).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const x=p[0];if(x==="'")return{isToken:!1,value:ux(p)};if(Rs[x])return{isToken:!0,value:p};if(x.match(cx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:p}});r.localize.preprocessor&&(d=r.localize.preprocessor(c,d));const u={firstWeekContainsDate:o,weekStartsOn:i,locale:r};return d.map(p=>{if(!p.isToken)return p.value;const x=p.value;(nx(x)||tx(x))&&ax(x,t,String(e));const g=Rs[x[0]];return g(c,x,r.localize,u)}).join("")}function ux(e){const t=e.match(ix);return t?t[1].replace(lx,"'"):e}function mx({value:e,defaultValue:t,onChange:a,placeholder:s="Pick a date",disabled:r,className:o,align:i="start",formatString:c="PPP",id:d,name:u,"aria-label":p}){const x=e!==void 0,[g,v]=y.useState(t),[f,b]=y.useState(!1),h=x?e:g,w=y.useCallback(k=>{x||v(k),a?.(k),k&&b(!1)},[x,a]);return n.jsxs(Oa,{open:f,onOpenChange:b,children:[n.jsx(Ea,{asChild:!0,children:n.jsx(W,{id:d,variant:"outline",disabled:r,"aria-label":p??(typeof s=="string"?s:"Pick a date"),className:l("w-60 justify-start text-left font-normal",!h&&"text-text-tertiary",o),suffixIcon:n.jsx(xe.CalendarIcon,{className:"ml-auto size-4 opacity-60"}),children:h?dx(h,c):n.jsx("span",{children:s})})}),n.jsxs(dn,{className:"w-auto p-0",align:i,children:[n.jsx(vl,{mode:"single",selected:h,onSelect:w,autoFocus:!0}),u?n.jsx("input",{type:"hidden",name:u,value:h?h.toISOString():""}):null]})]})}const Sl=y.createContext(null);function mn(){const e=y.useContext(Sl);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function px({orientation:e="horizontal",opts:t,setApi:a,plugins:s,className:r,children:o,...i}){const[c,d]=ud({...t,axis:e==="horizontal"?"x":"y"},s),[u,p]=y.useState(!1),[x,g]=y.useState(!1),v=y.useCallback(w=>{w&&(p(w.canScrollPrev()),g(w.canScrollNext()))},[]),f=y.useCallback(()=>{d?.scrollPrev()},[d]),b=y.useCallback(()=>{d?.scrollNext()},[d]),h=y.useCallback(w=>{w.key==="ArrowLeft"?(w.preventDefault(),f()):w.key==="ArrowRight"&&(w.preventDefault(),b())},[f,b]);return y.useEffect(()=>{!d||!a||a(d)},[d,a]),y.useEffect(()=>{if(d)return v(d),d.on("reInit",v),d.on("select",v),()=>{d?.off("select",v)}},[d,v]),n.jsx(Sl.Provider,{value:{carouselRef:c,api:d,opts:t,orientation:e||(t?.axis==="y"?"vertical":"horizontal"),scrollPrev:f,scrollNext:b,canScrollPrev:u,canScrollNext:x},children:n.jsx("div",{onKeyDownCapture:h,className:l("relative",r),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...i,children:o})})}function xx({className:e,...t}){const{carouselRef:a,orientation:s}=mn();return n.jsx("div",{ref:a,className:"overflow-hidden","data-slot":"carousel-content",children:n.jsx("div",{className:l("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function fx({className:e,...t}){const{orientation:a}=mn();return n.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:l("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...t})}function hx({className:e,variant:t="outline",size:a="sm",...s}){const{orientation:r,scrollPrev:o,canScrollPrev:i}=mn();return n.jsxs(W,{"data-slot":"carousel-previous",variant:t,size:a,className:l("absolute size-8 rounded-full",r==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!i,onClick:o,...s,children:[n.jsx(xe.ArrowLeft,{}),n.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function gx({className:e,variant:t="outline",size:a="sm",...s}){const{orientation:r,scrollNext:o,canScrollNext:i}=mn();return n.jsxs(W,{"data-slot":"carousel-next",variant:t,size:a,className:l("absolute size-8 rounded-full",r==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!i,onClick:o,...s,children:[n.jsx(xe.ArrowRight,{}),n.jsx("span",{className:"sr-only",children:"Next slide"})]})}function yx({columns:e,data:t,emptyText:a="No results.",className:s,...r}){return n.jsx("div",{className:l("w-full overflow-auto rounded-lg border border-border-tertiary",s),...r,children:n.jsxs(xa,{children:[n.jsx(fa,{children:n.jsx(ht,{children:e.map(o=>n.jsx(ga,{className:o.className,children:o.header},o.key))})}),n.jsx(ha,{children:t.length>0?t.map((o,i)=>n.jsx(ht,{children:e.map(c=>n.jsx(Qt,{className:c.className,children:c.cell?c.cell(o,i):c.accessor?String(o[c.accessor]??""):null},c.key))},i)):n.jsx(ht,{children:n.jsx(Qt,{colSpan:e.length,className:"h-24 text-center text-text-tertiary",children:a})})})]})})}const bx={light:"",dark:".dark"},vx={width:320,height:200},Il=y.createContext(null);function Rl(){const e=y.useContext(Il);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function wx({id:e,className:t,children:a,config:s,initialDimension:r=vx,...o}){const i=y.useId(),c=`chart-${e??i.replace(/:/g,"")}`;return n.jsx(Il.Provider,{value:{config:s},children:n.jsxs("div",{"data-slot":"chart","data-chart":c,className:l("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-text-tertiary [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-layer]:outline-none [&_.recharts-radial-bar-background-sector]:fill-fill-tertiary [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-fill-tertiary [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[n.jsx(Tl,{id:c,config:s}),n.jsx(Qn.ResponsiveContainer,{initialDimension:r,children:a})]})})}const Tl=({id:e,config:t})=>{const a=Object.entries(t).filter(([,s])=>s.theme??s.color);return a.length?n.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(bx).map(([s,r])=>`
|
|
33
33
|
${r} [data-chart=${e}] {
|
|
34
|
-
${
|
|
34
|
+
${a.map(([o,i])=>{const c=i.theme?.[s]??i.color;return c?` --color-${o}: ${c};`:null}).join(`
|
|
35
35
|
`)}
|
|
36
36
|
}
|
|
37
37
|
`).join(`
|
|
38
|
-
`)}}):null},Dm=Ma.Tooltip;function _m({active:e,payload:a,className:s,indicator:n="dot",hideLabel:r=!1,hideIndicator:o=!1,label:l,labelFormatter:c,labelClassName:d,formatter:m,color:p,nameKey:x,labelKey:g}){const{config:v}=Wi(),f=y.useMemo(()=>{if(r||!a?.length)return null;const[h]=a,w=`${g??h?.dataKey??h?.name??"value"}`,j=Ia(v,h,w),k=!g&&typeof l=="string"?v[l]?.label??l:j?.label;return c?t.jsx("div",{className:i("font-medium",d),children:c(k,a)}):k?t.jsx("div",{className:i("font-medium",d),children:k}):null},[l,c,a,r,d,v,g]);if(!e||!a?.length)return null;const b=a.length===1&&n!=="dot";return t.jsxs("div",{className:i("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-bg-base px-2.5 py-1.5 text-xs shadow-xl",s),children:[b?null:f,t.jsx("div",{className:"grid gap-1.5",children:a.filter(h=>h.type!=="none").map((h,w)=>{const j=`${x??h.name??h.dataKey??"value"}`,k=Ia(v,h,j),T=p??h.payload?.fill??h.color;return t.jsx("div",{className:i("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-text-tertiary",n==="dot"&&"items-center"),children:m&&h?.value!==void 0&&h.name?m(h.value,h.name,h,w,h.payload):t.jsxs(t.Fragment,{children:[k?.icon?t.jsx(k.icon,{}):!o&&t.jsx("div",{className:i("shrink-0 rounded-sm border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":b&&n==="dashed"}),style:{"--color-bg":T,"--color-border":T}}),t.jsxs("div",{className:i("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[t.jsxs("div",{className:"grid gap-1.5",children:[b?f:null,t.jsx("span",{className:"text-text-tertiary",children:k?.label??h.name})]}),h.value!=null&&t.jsx("span",{className:"font-mono font-medium text-text tabular-nums",children:typeof h.value=="number"?h.value.toLocaleString():String(h.value)})]})]})},w)})})]})}const Em=Ma.Legend;function Fm({className:e,hideIcon:a=!1,payload:s,verticalAlign:n="bottom",nameKey:r}){const{config:o}=Wi();return s?.length?t.jsx("div",{className:i("flex items-center justify-center gap-4",n==="top"?"pb-3":"pt-3",e),children:s.filter(l=>l.type!=="none").map((l,c)=>{const d=`${r??l.dataKey??"value"}`,m=Ia(o,l,d);return t.jsxs("div",{className:i("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-text-tertiary"),children:[m?.icon&&!a?t.jsx(m.icon,{}):t.jsx("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:l.color}}),m?.label]},c)})}):null}function Ia(e,a,s){if(typeof a!="object"||a===null)return;const n="payload"in a&&typeof a.payload=="object"&&a.payload!==null?a.payload:void 0;let r=s;return s in a&&typeof a[s]=="string"?r=a[s]:n&&s in n&&typeof n[s]=="string"&&(r=n[s]),r in e?e[r]:e[s]}function $m({className:e,children:a,...s}){return t.jsxs(H.ScrollArea.Root,{"data-slot":"scroll-area",className:i("relative",e),...s,children:[t.jsx(H.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-primary-border/50 focus-visible:outline-1",children:a}),t.jsx(Ki,{}),t.jsx(H.ScrollArea.Corner,{})]})}function Ki({className:e,orientation:a="vertical",...s}){return t.jsx(H.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:a,className:i("flex touch-none p-px transition-colors select-none",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...s,children:t.jsx(H.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const Yi=y.createContext("ltr");function Om({dir:e="ltr",children:a,...s}){return t.jsx(Yi.Provider,{value:e,children:t.jsx("div",{dir:e,...s,children:a})})}function Bm(){return y.useContext(Yi)}const Vm=F.cva("inline-flex items-center justify-center gap-2 font-medium transition-colors duration-200 focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 group text-sm leading-sm",{variants:{size:{sm:"h-7 px-2 text-xs leading-xs",md:"h-9 px-3 text-sm leading-sm",lg:"h-11 px-4 text-base leading-base"},rounded:{square:"rounded",pill:"rounded-full"},selected:{true:"bg-info-bg text-info",false:"bg-fill-tertiary text-text hover:bg-fill-secondary"}},defaultVariants:{size:"md",rounded:"square",selected:!1}}),Lt="w-4 h-4",Ot=u.forwardRef(({label:e,selected:a=!1,disabled:s=!1,multipleFolders:n=!1,onClear:r,size:o="md",rounded:l="square",className:c,onMouseEnter:d,onMouseLeave:m,folderIcon:p,folderFillIcon:x,arrowRightIcon:g,closeIcon:v,...f},b)=>{const[h,w]=u.useState(!1),j=a&&!s&&!n&&typeof r=="function",k=i(Vm({size:o,rounded:l,selected:a,className:c}),s&&"opacity-50 cursor-not-allowed",!s&&"cursor-pointer"),T=D=>{j&&w(!0),d?.(D)},S=D=>{j&&w(!1),m?.(D)},P=p??t.jsx(sr,{className:Lt}),A=x??t.jsx(nr,{className:Lt}),I=g??t.jsx(at,{className:Lt}),_=v??t.jsx(Ce,{className:Lt}),ne=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0 relative text-current",children:a?A:P}),t.jsx("span",{children:e}),n&&t.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:I}),j?t.jsx(V.motion.span,{role:"button",tabIndex:0,"aria-label":"清空文件夹选择",className:"flex items-center justify-center flex-shrink-0 text-info hover:text-info-hover cursor-pointer overflow-hidden",initial:!1,animate:{width:h?20:0,opacity:h?1:0,marginLeft:h?2:0},transition:{duration:.2,ease:"easeOut"},style:{pointerEvents:h?"auto":"none",minWidth:0},onPointerDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:D=>{D.preventDefault(),D.stopPropagation(),r()},onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),D.stopPropagation(),r())},children:t.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:_})}):null]});return t.jsx("button",{ref:b,className:k,disabled:s,onMouseEnter:T,onMouseLeave:S,...f,children:ne})});Ot.displayName="FolderButton";const Mt="w-4 h-4",Xi=u.forwardRef((e,a)=>{const s=N("folder",Mt),n=N("folderFill",Mt),r=N("arrowRight",Mt),o=N("close",Mt);return t.jsx(Ot,{ref:a,folderIcon:s,folderFillIcon:n,arrowRightIcon:r,closeIcon:o,...e})});Xi.displayName="FolderButton";const Ji=u.createContext(null);function Ae(){const e=u.useContext(Ji);if(!e)throw new Error("ChatInput compound components must be used within ChatInput.Root");return e}function Xt({value:e,onChange:a,onSend:s,placeholder:n="What can I help you with today?",disabled:r=!1,maxRows:o=6,form:l,sendButtonStatus:c="normal",showFooter:d=!0,showFolderButton:m=!0,folderButtonLabel:p="Work in a Folder",onFolderButtonClick:x,onFolderClear:g,folderPermission:v,showMoreButton:f=!0,onMoreButtonClick:b,footerLeftConfig:h,showGenerationStatus:w=!1,generationStatus:j,attachments:k,addLargeIcon:T,folderIcon:S,folderOpenIcon:P,historyIcon:A,arrowDownIcon:I,subMenuArrowIcon:_,folderFillIcon:ne,closeIcon:D,dataStyle:q,dataTheme:ie,children:X,...G}){const[ae,le]=u.useState(""),C=u.useRef(null),[O,J]=u.useState(!1),ue=e!==void 0,U=ue?e:ae,Q=u.useCallback(L=>{C.current=L},[]),me=u.useCallback(L=>{ue||le(L),a?.(L)},[ue,a]),we=u.useCallback(()=>{const M=(C.current?.value??U??"").trim();!M||r||!s||(s(M),ue||le(""),C.current&&(C.current.style.height="auto"))},[U,r,s,ue]),Ue=u.useCallback(L=>{L.key==="Enter"&&!L.shiftKey&&!L.nativeEvent.isComposing&&(L.preventDefault(),we()),G.onKeyDown?.(L)},[we,G]),re=u.useCallback(()=>J(!0),[]),Qe=u.useCallback(()=>{J(!1),g?.()},[g]),Re=U.trim().length>0&&!r,ze={dataStyle:q,dataTheme:ie,value:U,onChange:me,onSend:s,disabled:r,placeholder:n,maxRows:o,form:l,textareaRef:C,setTextareaRef:Q,handleSend:we,handleKeyDown:Ue,sendButtonStatus:c,canSend:Re,hasFolderSelected:O,setHasFolderSelected:J,handleFolderSelect:re,handleFolderClear:Qe,folderPermission:v,footerLeftConfig:h,showFolderButton:m,showMoreButton:f,folderButtonLabel:p,onFolderButtonClick:x,onFolderClear:g,onMoreButtonClick:b,addLargeIcon:T,folderIcon:S,folderOpenIcon:P,historyIcon:A,arrowDownIcon:I,subMenuArrowIcon:_,folderFillIcon:ne,closeIcon:D,showGenerationStatus:w,generationStatus:j,attachments:k,showFooter:d};return t.jsx(Ji.Provider,{value:ze,children:X})}Xt.displayName="ChatInputRootProvider";const Hm=F.cva("inline-flex items-center justify-center rounded-full p-1.5 transition-colors duration-200 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-transform active:scale-95 active:translate-y-px",{variants:{status:{normal:"SendButton-send bg-bg-highlight hover:bg-bg-highlight-hover active:opacity-80",generating:"bg-primary hover:bg-primary-hover active:opacity-80",recording:"SendButton-send bg-bg-highlight hover:bg-bg-highlight-hover active:opacity-80",stopRecording:"bg-error-bg hover:bg-error-bg-hover active:opacity-80"}},defaultVariants:{status:"normal"}}),Gm=F.cva("inline-flex h-4 w-4 shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",{variants:{status:{normal:"text-text-on-primary",generating:"text-text-on-primary",recording:"text-text-on-primary",stopRecording:"text-error"}},defaultVariants:{status:"normal"}}),ya="w-4 h-4",vs=u.forwardRef(({status:e="normal",disabled:a=!1,className:s,sendIcon:n,stopIcon:r,micIcon:o,...l},c)=>{const x=e==="normal"?n??t.jsx(Kd,{className:ya}):e==="generating"||e==="stopRecording"?r??t.jsx(Yd,{className:ya}):o??t.jsx(Xd,{className:ya});return t.jsx("button",{ref:c,type:"button",className:Hm({status:e,className:s}),disabled:a,...l,children:t.jsx("span",{className:Gm({status:e}),children:x})})});vs.displayName="SendButton";function qm({content:e}){const a=e.replace(/\.+$/,"");return t.jsxs("span",{className:"text-sm leading-sm font-medium text-primary-active",children:[a,t.jsx("span",{className:"status-dots-anim",style:{fontFamily:"inherit"},children:"..."})]})}const ws=({children:e,status:a,icon:s,time:n,className:r=""})=>{const o=a??(typeof e=="string"?e:null);if(!(o!=null||e!=null)&&!s&&!n)return null;const c=i("flex w-full h-9 items-center gap-2 rounded-t-xl bg-primary-bg px-3 text-sm leading-sm",r);return t.jsxs("div",{className:c,children:[t.jsx("style",{children:`
|
|
38
|
+
`)}}):null},kx=Qn.Tooltip;function jx({active:e,payload:t,className:a,indicator:s="dot",hideLabel:r=!1,hideIndicator:o=!1,label:i,labelFormatter:c,labelClassName:d,formatter:u,color:p,nameKey:x,labelKey:g}){const{config:v}=Rl(),f=y.useMemo(()=>{if(r||!t?.length)return null;const[h]=t,w=`${g??h?.dataKey??h?.name??"value"}`,k=Vn(v,h,w),j=!g&&typeof i=="string"?v[i]?.label??i:k?.label;return c?n.jsx("div",{className:l("font-medium",d),children:c(j,t)}):j?n.jsx("div",{className:l("font-medium",d),children:j}):null},[i,c,t,r,d,v,g]);if(!e||!t?.length)return null;const b=t.length===1&&s!=="dot";return n.jsxs("div",{className:l("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-bg-base px-2.5 py-1.5 text-xs shadow-xl",a),children:[b?null:f,n.jsx("div",{className:"grid gap-1.5",children:t.filter(h=>h.type!=="none").map((h,w)=>{const k=`${x??h.name??h.dataKey??"value"}`,j=Vn(v,h,k),I=p??h.payload?.fill??h.color;return n.jsx("div",{className:l("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-text-tertiary",s==="dot"&&"items-center"),children:u&&h?.value!==void 0&&h.name?u(h.value,h.name,h,w,h.payload):n.jsxs(n.Fragment,{children:[j?.icon?n.jsx(j.icon,{}):!o&&n.jsx("div",{className:l("shrink-0 rounded-sm border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":s==="dot","w-1":s==="line","w-0 border-[1.5px] border-dashed bg-transparent":s==="dashed","my-0.5":b&&s==="dashed"}),style:{"--color-bg":I,"--color-border":I}}),n.jsxs("div",{className:l("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[n.jsxs("div",{className:"grid gap-1.5",children:[b?f:null,n.jsx("span",{className:"text-text-tertiary",children:j?.label??h.name})]}),h.value!=null&&n.jsx("span",{className:"font-mono font-medium text-text tabular-nums",children:typeof h.value=="number"?h.value.toLocaleString():String(h.value)})]})]})},w)})})]})}const Nx=Qn.Legend;function Cx({className:e,hideIcon:t=!1,payload:a,verticalAlign:s="bottom",nameKey:r}){const{config:o}=Rl();return a?.length?n.jsx("div",{className:l("flex items-center justify-center gap-4",s==="top"?"pb-3":"pt-3",e),children:a.filter(i=>i.type!=="none").map((i,c)=>{const d=`${r??i.dataKey??"value"}`,u=Vn(o,i,d);return n.jsxs("div",{className:l("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-text-tertiary"),children:[u?.icon&&!t?n.jsx(u.icon,{}):n.jsx("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:i.color}}),u?.label]},c)})}):null}function Vn(e,t,a){if(typeof t!="object"||t===null)return;const s="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let r=a;return a in t&&typeof t[a]=="string"?r=t[a]:s&&a in s&&typeof s[a]=="string"&&(r=s[a]),r in e?e[r]:e[a]}function Sx({className:e,children:t,...a}){return n.jsxs(V.ScrollArea.Root,{"data-slot":"scroll-area",className:l("relative",e),...a,children:[n.jsx(V.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-primary-border/50 focus-visible:outline-1",children:t}),n.jsx(Ml,{}),n.jsx(V.ScrollArea.Corner,{})]})}function Ml({className:e,orientation:t="vertical",...a}){return n.jsx(V.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:t,className:l("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...a,children:n.jsx(V.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const Pl=y.createContext("ltr");function Ix({dir:e="ltr",children:t,...a}){return n.jsx(Pl.Provider,{value:e,children:n.jsx("div",{dir:e,...a,children:t})})}function Rx(){return y.useContext(Pl)}const Tx=A.cva("inline-flex items-center justify-center gap-2 font-medium transition-colors duration-200 focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 group text-sm leading-sm",{variants:{size:{sm:"h-7 px-2 text-xs leading-xs",md:"h-9 px-3 text-sm leading-sm",lg:"h-11 px-4 text-base leading-base"},rounded:{square:"rounded",pill:"rounded-full"},selected:{true:"bg-info-bg text-info",false:"bg-fill-tertiary text-text hover:bg-fill-secondary"}},defaultVariants:{size:"md",rounded:"square",selected:!1}}),$t="w-4 h-4",Xt=m.forwardRef(({label:e,selected:t=!1,disabled:a=!1,multipleFolders:s=!1,onClear:r,size:o="md",rounded:i="square",className:c,onMouseEnter:d,onMouseLeave:u,folderIcon:p,folderFillIcon:x,arrowRightIcon:g,closeIcon:v,...f},b)=>{const[h,w]=m.useState(!1),k=t&&!a&&!s&&typeof r=="function",j=l(Tx({size:o,rounded:i,selected:t,className:c}),a&&"opacity-50 cursor-not-allowed",!a&&"cursor-pointer"),I=_=>{k&&w(!0),d?.(_)},C=_=>{k&&w(!1),u?.(_)},L=p??n.jsx(vr,{className:$t}),z=x??n.jsx(wr,{className:$t}),S=g??n.jsx(dt,{className:$t}),O=v??n.jsx(Re,{className:$t}),re=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0 relative text-current",children:t?z:L}),n.jsx("span",{children:e}),s&&n.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:S}),k?n.jsx(H.motion.span,{role:"button",tabIndex:0,"aria-label":"清空文件夹选择",className:"flex items-center justify-center flex-shrink-0 text-info hover:text-info-hover cursor-pointer overflow-hidden",initial:!1,animate:{width:h?20:0,opacity:h?1:0,marginLeft:h?2:0},transition:{duration:.2,ease:"easeOut"},style:{pointerEvents:h?"auto":"none",minWidth:0},onPointerDown:_=>{_.preventDefault(),_.stopPropagation()},onClick:_=>{_.preventDefault(),_.stopPropagation(),r()},onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),_.stopPropagation(),r())},children:n.jsx("span",{className:"w-4 h-4 flex items-center justify-center flex-shrink-0",children:O})}):null]});return n.jsx("button",{ref:b,className:j,disabled:a,onMouseEnter:I,onMouseLeave:C,...f,children:re})});Xt.displayName="FolderButton";const Bt="w-4 h-4",zl=m.forwardRef((e,t)=>{const a=N("folder",Bt),s=N("folderFill",Bt),r=N("arrowRight",Bt),o=N("close",Bt);return n.jsx(Xt,{ref:t,folderIcon:a,folderFillIcon:s,arrowRightIcon:r,closeIcon:o,...e})});zl.displayName="FolderButton";const Ll=m.createContext(null);function $e(){const e=m.useContext(Ll);if(!e)throw new Error("ChatInput compound components must be used within ChatInput.Root");return e}function pn({value:e,onChange:t,onSend:a,placeholder:s="What can I help you with today?",disabled:r=!1,maxRows:o=6,form:i,sendButtonStatus:c="normal",showFooter:d=!0,showFolderButton:u=!0,folderButtonLabel:p="Work in a Folder",onFolderButtonClick:x,onFolderClear:g,folderPermission:v,showMoreButton:f=!0,onMoreButtonClick:b,footerLeftConfig:h,showGenerationStatus:w=!1,generationStatus:k,attachments:j,addLargeIcon:I,folderIcon:C,folderOpenIcon:L,historyIcon:z,arrowDownIcon:S,subMenuArrowIcon:O,folderFillIcon:re,closeIcon:_,dataStyle:U,dataTheme:le,children:J,...G}){const[ae,ce]=m.useState(""),R=m.useRef(null),[$,ee]=m.useState(!1),me=e!==void 0,Q=me?e:ae,Y=m.useCallback(P=>{R.current=P},[]),pe=m.useCallback(P=>{me||ce(P),t?.(P)},[me,t]),je=m.useCallback(()=>{const D=(R.current?.value??Q??"").trim();!D||r||!a||(a(D),me||ce(""),R.current&&(R.current.style.height="auto"))},[Q,r,a,me]),Je=m.useCallback(P=>{P.key==="Enter"&&!P.shiftKey&&!P.nativeEvent.isComposing&&(P.preventDefault(),je()),G.onKeyDown?.(P)},[je,G]),oe=m.useCallback(()=>ee(!0),[]),et=m.useCallback(()=>{ee(!1),g?.()},[g]),ze=Q.trim().length>0&&!r,Le={dataStyle:U,dataTheme:le,value:Q,onChange:pe,onSend:a,disabled:r,placeholder:s,maxRows:o,form:i,textareaRef:R,setTextareaRef:Y,handleSend:je,handleKeyDown:Je,sendButtonStatus:c,canSend:ze,hasFolderSelected:$,setHasFolderSelected:ee,handleFolderSelect:oe,handleFolderClear:et,folderPermission:v,footerLeftConfig:h,showFolderButton:u,showMoreButton:f,folderButtonLabel:p,onFolderButtonClick:x,onFolderClear:g,onMoreButtonClick:b,addLargeIcon:I,folderIcon:C,folderOpenIcon:L,historyIcon:z,arrowDownIcon:S,subMenuArrowIcon:O,folderFillIcon:re,closeIcon:_,showGenerationStatus:w,generationStatus:k,attachments:j,showFooter:d};return n.jsx(Ll.Provider,{value:Le,children:J})}pn.displayName="ChatInputRootProvider";const Mx=A.cva("inline-flex items-center justify-center rounded-full p-1.5 transition-colors duration-200 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-transform active:scale-95 active:translate-y-px",{variants:{status:{normal:"SendButton-send bg-bg-highlight hover:bg-bg-highlight-hover active:opacity-80",generating:"bg-primary hover:bg-primary-hover active:opacity-80",recording:"SendButton-send bg-bg-highlight hover:bg-bg-highlight-hover active:opacity-80",stopRecording:"bg-error-bg hover:bg-error-bg-hover active:opacity-80"}},defaultVariants:{status:"normal"}}),Px=A.cva("inline-flex h-4 w-4 shrink-0 items-center justify-center [&>*]:block [&>*]:leading-none",{variants:{status:{normal:"text-text-on-primary",generating:"text-text-on-primary",recording:"text-text-on-primary",stopRecording:"text-error"}},defaultVariants:{status:"normal"}}),Dn="w-4 h-4",$a=m.forwardRef(({status:e="normal",disabled:t=!1,className:a,sendIcon:s,stopIcon:r,micIcon:o,...i},c)=>{const x=e==="normal"?s??n.jsx(bu,{className:Dn}):e==="generating"||e==="stopRecording"?r??n.jsx(vu,{className:Dn}):o??n.jsx(wu,{className:Dn});return n.jsx("button",{ref:c,type:"button",className:Mx({status:e,className:a}),disabled:t,...i,children:n.jsx("span",{className:Px({status:e}),children:x})})});$a.displayName="SendButton";function zx({content:e}){const t=e.replace(/\.+$/,"");return n.jsxs("span",{className:"text-sm leading-sm font-medium text-primary-active",children:[t,n.jsx("span",{className:"status-dots-anim",style:{fontFamily:"inherit"},children:"..."})]})}const Ba=({children:e,status:t,icon:a,time:s,className:r=""})=>{const o=t??(typeof e=="string"?e:null);if(!(o!=null||e!=null)&&!a&&!s)return null;const c=l("flex w-full h-9 items-center gap-2 rounded-t-xl bg-primary-bg px-3 text-sm leading-sm",r);return n.jsxs("div",{className:c,children:[n.jsx("style",{children:`
|
|
39
39
|
@keyframes status-dots {
|
|
40
40
|
0%, 100% { opacity: 0.4; }
|
|
41
41
|
50% { opacity: 1; }
|
|
@@ -43,7 +43,7 @@ ${s.map(([o,l])=>{const c=l.theme?.[n]??l.color;return c?` --color-${o}: ${c};`
|
|
|
43
43
|
.status-dots-anim {
|
|
44
44
|
animation: status-dots 1.2s ease-in-out infinite;
|
|
45
45
|
}
|
|
46
|
-
`}),s&&t.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-primary-active",children:s}),o!=null&&t.jsx(qm,{content:String(o)}),o==null&&e!=null&&t.jsx("span",{className:"font-medium text-primary-active",children:e}),n&&t.jsx("span",{className:"ml-auto font-medium font-mono text-primary-active",children:n})]})};ws.displayName="GenerationStatusBar";function Um(e,a,s){u.useEffect(()=>{const n=e.current;if(!n)return;n.style.height="auto";const o=(parseFloat(getComputedStyle(n).lineHeight)||24)*s;n.scrollHeight<=o?n.style.height=`${n.scrollHeight}px`:n.style.height=`${o}px`},[e,a,s])}const el=u.forwardRef(({value:e,onChange:a,placeholder:s="What can I help you with today?",disabled:n=!1,maxRows:r=6,onKeyDown:o,className:l,style:c,...d},m)=>{const p=u.useRef(null);Um(p,e,r);const x=u.useCallback(b=>{p.current=b,typeof m=="function"?m(b):m&&(m.current=b)},[m]),g=u.useCallback(b=>a?.(b.target.value),[a]),v={outline:"none",border:"none",boxShadow:"none"},f="w-full resize-none border-none bg-transparent text-sm leading-sm font-normal placeholder:text-text-tertiary overflow-y-auto scrollbar-auto outline-none shadow-none focus:outline-none focus:ring-0 focus:shadow-none focus-visible:outline-none focus-visible:ring-0 focus-visible:shadow-none [&:focus-visible]:outline-none [&:focus-visible]:ring-0 [&:focus-visible]:ring-offset-0 [&:focus-visible]:shadow-none "+(e?.trim()?"text-text":"text-text-quaternary");return t.jsx("textarea",{ref:x,value:e,onChange:g,onKeyDown:o,placeholder:s,disabled:n,rows:1,className:[f,l].filter(Boolean).join(" "),...d,style:{...c??{},...v}})});el.displayName="ChatInputTextarea";function tl({open:e,onOpenChange:a,projectName:s,onAllowOnce:n,onAllowAlways:r}){return t.jsx(Tr,{open:e,onOpenChange:a,children:t.jsxs(Ga,{className:"p-6",children:[t.jsxs(qa,{children:[t.jsxs(Qa,{className:"text-xl leading-xl font-semibold text-text",children:['Allow Spark Design to access and modify files in "',s,'"?']}),t.jsx(Wa,{className:"mt-2 text-sm leading-sm text-text-tertiary",children:"This permission applies to all files and subfolders in this directory. Spark Design may read, update, and permanently delete files here, and may share relevant file contents with connected tools when needed. Only allow access to folders you trust."})]}),t.jsxs(Ua,{className:"mt-6 flex flex-row justify-end gap-2",children:[t.jsx(Za,{className:"h-9 rounded-full px-4",children:"Cancel"}),t.jsx("button",{type:"button",className:"inline-flex h-9 items-center justify-center rounded-full px-4 text-sm leading-sm font-medium border border-border bg-bg-base text-text transition-colors hover:bg-fill-tertiary active:bg-fill-secondary",onClick:r,children:"Always Allow"}),t.jsx("button",{type:"button",className:"inline-flex h-9 items-center justify-center rounded-full px-4 text-sm leading-sm font-medium bg-text text-text-on-primary transition-opacity hover:opacity-90 active:opacity-95",onClick:n,children:"Allow"})]})]})})}tl.displayName="FolderPermissionDialog";const Qm=["~/Projects/spark-design-app","~/Documents/workspace","~/Desktop/demo","~/code/my-app"],ba="mr-2 w-4 h-4 shrink-0";function al({disabled:e,folderButtonLabel:a,folderPermission:s,onFolderButtonClick:n,onFolderClear:r,onFolderSelect:o,hasFolderSelected:l,dataStyle:c,dataTheme:d,folderIcon:m=t.jsx(sr,{className:ba}),folderOpenIcon:p=t.jsx(nr,{className:ba}),historyIcon:x=t.jsx(or,{className:ba}),subMenuArrowIcon:g,folderFillIcon:v,closeIcon:f}){const b=s?.enable??!1,h=s?.projectName??"04_代码",[w,j]=u.useState(!1),[k,T]=u.useState(!1),[S,P]=u.useState(!1),A=u.useRef(null),I=n??(()=>{}),_=()=>{A.current?.click()},ne=()=>{A.current&&(A.current.value=""),r?.()},D=u.useCallback(X=>{X==="always"&&T(!0),j(!1),P(!0)},[]),q=X=>{if(!b){P(X);return}if(!X){P(!1);return}if(k){P(!0);return}j(!0),P(!1)},ie=X=>{const G=X.target.files;G&&G.length>0&&o(G)};return n?t.jsx(Ot,{label:a,onClick:I,disabled:e,folderIcon:m,folderFillIcon:v}):t.jsxs(t.Fragment,{children:[t.jsxs($e,{open:S,onOpenChange:q,children:[t.jsx(Oe,{asChild:!0,children:t.jsx(Ot,{label:a,disabled:e,selected:l,onClear:ne,folderIcon:m,folderFillIcon:v,closeIcon:f,className:"focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0"})}),t.jsxs(Me,{align:"start",side:"top",className:"min-w-50",dataStyle:c,dataTheme:d,children:[t.jsxs(je,{onClick:_,children:[m,"Add folder"]}),l&&t.jsxs(je,{onClick:_,children:[p,"Replace folder"]}),t.jsxs(br,{children:[t.jsxs(Ba,{subTriggerIcon:g,children:[x,"Recent folders"]}),t.jsx(Va,{collisionPadding:{bottom:24,left:8},dataStyle:c,dataTheme:d,children:Qm.map(X=>t.jsx(je,{onClick:()=>{},children:X},X))})]})]})]}),t.jsx("input",{ref:A,type:"file",webkitdirectory:"",multiple:!0,style:{display:"none"},onChange:ie}),b&&t.jsx(tl,{open:w,onOpenChange:j,projectName:h,onAllowOnce:()=>D("once"),onAllowAlways:()=>D("always")})]})}al.displayName="ChatInputFolderSelector";function sl({config:e,disabled:a,dataStyle:s,dataTheme:n,arrowDownIcon:r=t.jsx(be,{className:"h-3.5 w-3.5 shrink-0 text-text-secondary"})}){const l=e.modeSwitch.options.find(c=>c.value===e.modeSwitch.value)?.icon??e.modeSwitch.icon;return t.jsxs("div",{className:"flex items-center gap-3 text-sm leading-sm text-text-secondary",children:[t.jsxs($e,{children:[t.jsx(Oe,{asChild:!0,children:t.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-md bg-fill-secondary px-2.5 py-1.5 text-sm leading-sm text-text hover:bg-fill focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",disabled:a,children:[l!=null&&t.jsx("span",{className:"flex shrink-0 items-center [&>*]:block [&>*]:leading-none",children:l}),t.jsx("span",{children:e.modeSwitch.label}),r]})}),t.jsx(Me,{align:"start",side:"top",className:"min-w-30",dataStyle:s,dataTheme:n,children:e.modeSwitch.options.map(c=>t.jsxs(je,{onClick:()=>e.modeSwitch.onChange(c.value),className:"flex items-center justify-between gap-2",children:[t.jsxs("span",{className:"flex items-center gap-2",children:[c.icon!=null&&t.jsx("span",{className:"flex shrink-0 [&>*]:block [&>*]:leading-none [&>*]:size-4",children:c.icon}),c.label]}),e.modeSwitch.value===c.value&&t.jsx(ye,{className:"h-4 w-4 shrink-0 text-primary"})]},c.value))})]}),t.jsxs($e,{children:[t.jsx(Oe,{asChild:!0,children:t.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 text-text-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1 py-0.5 disabled:opacity-50",disabled:a,children:[t.jsx("span",{children:e.modelSwitch.label}),r]})}),t.jsx(Me,{align:"start",side:"top",className:"min-w-25",dataStyle:s,dataTheme:n,children:e.modelSwitch.options.map(c=>t.jsxs(je,{onClick:()=>e.modelSwitch.onChange(c.value),className:"flex items-center justify-between gap-2",children:[c.label,e.modelSwitch.value===c.value&&t.jsx(ye,{className:"h-4 w-4 shrink-0 text-primary"})]},c.value))})]}),e.consumptionMultiplier.options!=null&&e.consumptionMultiplier.options.length>0&&e.consumptionMultiplier.onChange!=null?t.jsxs($e,{children:[t.jsx(Oe,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center text-text-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1 py-0.5 disabled:opacity-50",disabled:a,children:e.consumptionMultiplier.value})}),t.jsx(Me,{align:"start",side:"top",className:"min-w-20",dataStyle:s,dataTheme:n,children:e.consumptionMultiplier.options.map(c=>t.jsxs(je,{onClick:()=>e.consumptionMultiplier.onChange?.(c.value),className:"flex items-center justify-between gap-2",children:[c.label,e.consumptionMultiplier.value===c.value&&t.jsx(ye,{className:"h-4 w-4 shrink-0 text-primary"})]},c.value))})]}):t.jsx("span",{className:"text-text-secondary",children:e.consumptionMultiplier.value})]})}sl.displayName="ChatInputModelSwitcher";const Wm=F.cva(["flex flex-col w-full bg-bg-base border border-primary-border rounded-xl transition-all duration-200","shadow-[0_0.25rem_1.25rem_var(--color-shadow-secondary)]","hover:shadow-[0_0.25rem_1.25rem_var(--color-shadow-secondary)]","focus-within:shadow-[0_0.25rem_1.25rem_var(--color-shadow-quaternary)]","hover:focus-within:shadow-[0_0.25rem_1.25rem_var(--color-shadow-quaternary)]"].join(" "),{variants:{disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{disabled:!1}}),Et="flex flex-wrap items-center gap-2 px-3 pt-3 pb-2",Zm="flex flex-1 items-center min-h-6 p-3",Km="flex shrink-0 items-center justify-between w-full self-stretch gap-2 p-3";function ft({className:e,style:a,children:s}){return t.jsx("div",{className:i("flex min-h-9 h-9 w-[calc(100%-2*var(--radius-xl))] mx-auto items-center overflow-hidden rounded-t-xl text-sm leading-sm",e),style:a,children:s})}ft.displayName="ChatInputAbove";function ht({className:e,children:a}){const s=Ae();return t.jsx("div",{className:Wm({disabled:s.disabled,className:i("relative",e)}),children:a})}ht.displayName="ChatInputBox";function Jt({className:e,children:a}){return a?t.jsx("div",{className:i(Et,e),children:a}):null}Jt.displayName="ChatInputAttachments";const gt=u.forwardRef(({placeholder:e,maxRows:a,...s},n)=>{const r=Ae(),o=u.useCallback(l=>{r.setTextareaRef(l),typeof n=="function"?n(l):n&&(n.current=l)},[r,n]);return t.jsx("div",{className:Zm,children:t.jsx(el,{ref:o,value:r.value,onChange:r.onChange,onKeyDown:r.handleKeyDown,placeholder:e??r.placeholder,disabled:r.disabled,maxRows:a??r.maxRows,...s})})});gt.displayName="ChatInputInput";function yt({className:e,children:a}){return t.jsx("div",{className:i(Km,e),children:a})}yt.displayName="ChatInputActions";function bt({className:e,children:a}){return t.jsx("div",{className:i("flex items-center gap-2",e),children:a})}bt.displayName="ChatInputActionsLeft";function Je({className:e,children:a}){return t.jsx("div",{className:i("flex items-center gap-2",e),children:a})}Je.displayName="ChatInputActionsRight";function ea({className:e,style:a,...s}){return t.jsx("button",{type:"button",className:i("absolute top-2 right-2 z-10 flex h-8 w-8 items-center justify-center rounded-lg text-text-secondary hover:bg-fill-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",e),style:{...a},...s})}ea.displayName="ChatInputExpandButton";function vt(){const e=Ae();return e.showFolderButton?t.jsx(al,{disabled:e.disabled,folderButtonLabel:e.folderButtonLabel,folderPermission:e.folderPermission,onFolderButtonClick:e.onFolderButtonClick,onFolderClear:e.handleFolderClear,onFolderSelect:e.handleFolderSelect,hasFolderSelected:e.hasFolderSelected,dataStyle:e.dataStyle,dataTheme:e.dataTheme,folderIcon:e.folderIcon,folderOpenIcon:e.folderOpenIcon,historyIcon:e.historyIcon,subMenuArrowIcon:e.subMenuArrowIcon,folderFillIcon:e.folderFillIcon,closeIcon:e.closeIcon}):null}vt.displayName="ChatInputFolderButton";function wt(){const e=Ae();return e.showMoreButton?t.jsx(Ne,{variant:"ghost",icon:e.addLargeIcon??t.jsx(Oa,{className:"h-5 w-5"}),onClick:e.onMoreButtonClick,disabled:e.disabled}):null}wt.displayName="ChatInputMoreButton";function Bt(){const e=Ae();return t.jsx(vs,{disabled:!e.canSend||e.disabled,status:e.sendButtonStatus,...e.form?{type:"submit",form:e.form}:{onClick:e.handleSend}})}Bt.displayName="ChatInputSendButton";function kt(){const e=Ae();return e.footerLeftConfig?t.jsx(sl,{config:e.footerLeftConfig,disabled:e.disabled,arrowDownIcon:e.arrowDownIcon,dataStyle:e.dataStyle,dataTheme:e.dataTheme}):t.jsxs(t.Fragment,{children:[t.jsx(vt,{}),t.jsx(wt,{})]})}kt.displayName="ChatInputFooterLeft";const nl=u.forwardRef(function({className:a,hasAbove:s=!1,hasAttachments:n=!1,hasFooter:r=!0,aboveOverlap:o=!0},l){const c=Ae(),d=()=>{if(!n||c.attachments==null||c.attachments===!1)return null;const x=c.attachments;return typeof x=="object"&&!u.isValidElement(x)&&("files"in x||"images"in x)?t.jsxs(t.Fragment,{children:[x.files&&t.jsx("div",{className:Et,children:x.files}),x.images&&t.jsx("div",{className:Et,children:x.images})]}):t.jsx("div",{className:Et,children:x})},m=()=>t.jsx(kt,{}),p=t.jsxs(ht,{className:i(!r&&!n&&"min-h-14"),children:[d(),t.jsx(gt,{ref:l}),t.jsx(yt,{children:r?t.jsxs(t.Fragment,{children:[t.jsx(bt,{children:m()}),t.jsx("div",{className:"flex-1 h-5"}),t.jsx(Je,{children:t.jsx(Bt,{})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex-1 h-5"}),t.jsx(Je,{children:t.jsx(Bt,{})})]})})]});return s&&c.showGenerationStatus&&c.generationStatus?t.jsxs("div",{className:i("flex flex-col w-full",a),children:[t.jsx(ft,{children:t.jsx(ws,{status:typeof c.generationStatus?.content=="string"?c.generationStatus.content:void 0,icon:c.generationStatus?.icon,time:c.generationStatus?.time,children:c.generationStatus?.content})}),p]}):t.jsx("div",{className:a,children:p})});nl.displayName="ChatInputDefaultLayout";function Ym(e){return e==null||e===!1?!1:typeof e=="object"&&!u.isValidElement(e)?!!e.files||!!e.images:!0}const Xm=u.forwardRef(function(a,s){const n=Ym(a.attachments);return t.jsx(Xt,{...a,children:t.jsx(nl,{ref:s,className:a.className,hasAbove:a.showGenerationStatus,hasAttachments:n,hasFooter:a.showFooter,aboveOverlap:!0})})}),xe=Xm;xe.displayName="ChatInput";xe.Root=Xt;xe.Above=ft;xe.Box=ht;xe.Attachments=Jt;xe.Input=gt;xe.Actions=yt;xe.ActionsLeft=bt;xe.ActionsRight=Je;xe.ExpandButton=ea;xe.FolderButton=vt;xe.MoreButton=wt;xe.SendButton=Bt;xe.FooterLeft=kt;const Jm=xe,va="w-4 h-4",ks=u.forwardRef((e,a)=>{const s=N("send",va),n=N("stop",va),r=N("mic",va);return t.jsx(vs,{ref:a,sendIcon:s,stopIcon:n,micIcon:r,...e})});ks.displayName="SendButton";function js(e){const{style:a,theme:s}=de(),n=N("more","h-5 w-5 shrink-0"),r=N("folder","mr-2 w-4 h-4 shrink-0"),o=N("folderOpen","mr-2 w-4 h-4 shrink-0"),l=N("history","mr-2 w-4 h-4 shrink-0"),c=N("arrowDownS","h-3.5 w-3.5 shrink-0 text-text-secondary"),d=N("arrowRight","h-4 w-4 shrink-0"),m=N("folderFill","w-4 h-4 shrink-0"),p=N("close","w-4 h-4 shrink-0");return t.jsx(Xt,{...e,dataStyle:a,dataTheme:s,addLargeIcon:n,folderIcon:r,folderOpenIcon:o,historyIcon:l,arrowDownIcon:c,subMenuArrowIcon:d,folderFillIcon:m,closeIcon:p})}js.displayName="ChatInputRoot";const rl=u.forwardRef(function(a,s){const{style:n,theme:r}=de(),o=N("more","h-5 w-5 shrink-0"),l=N("folder","mr-2 w-4 h-4 shrink-0"),c=N("folderOpen","mr-2 w-4 h-4 shrink-0"),d=N("history","mr-2 w-4 h-4 shrink-0"),m=N("arrowDownS","h-3.5 w-3.5 shrink-0 text-text-secondary"),p=N("arrowRight","h-4 w-4 shrink-0"),x=N("folderFill","w-4 h-4 shrink-0"),g=N("close","w-4 h-4 shrink-0");return t.jsx(Jm,{ref:s,dataStyle:n,dataTheme:r,addLargeIcon:o,folderIcon:l,folderOpenIcon:c,historyIcon:d,arrowDownIcon:m,subMenuArrowIcon:p,folderFillIcon:x,closeIcon:g,...a})});rl.displayName="ChatInput";function Ns(){const e=Ae();return t.jsx(ks,{disabled:!e.canSend||e.disabled,status:e.sendButtonStatus,...e.form?{type:"submit",form:e.form}:{onClick:e.handleSend}})}Ns.displayName="ChatInputSendButton";const ep=Object.assign(rl,{Root:js,Above:ft,Box:ht,Attachments:Jt,Input:gt,Actions:yt,ActionsLeft:bt,ActionsRight:Je,ExpandButton:ea,FolderButton:vt,MoreButton:wt,SendButton:Ns,FooterLeft:kt}),tp="w-3.5 h-3.5 shrink-0 text-text-tertiary";function ol({items:e,onSelect:a,singleLineText:s=!1,className:n,defaultIcon:r}){const o=e.slice(0,3),l=r??t.jsx(rr,{className:tp});return o.length===0?null:t.jsx("div",{className:i("flex flex-col gap-3 w-full min-w-0",!s&&"max-w-lg",n),role:"list","aria-label":"Related prompt suggestions",children:o.map((c,d)=>{const m=c.icon??l,p=t.jsxs("button",{type:"button",onClick:()=>a?.(c),className:i("flex items-center gap-2 w-full min-w-0 text-left","rounded-md px-0 py-0 min-h-0","text-xs leading-xs font-normal text-text-tertiary","transition-colors",a&&"cursor-pointer hover:text-text",!a&&"cursor-default"),role:"listitem",children:[t.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0 flex items-center justify-center",children:m}),t.jsx("span",{className:i("min-w-0 flex-1",s?"truncate":"line-clamp-2"),children:c.text})]});return s?t.jsx(Ye,{content:c.text,side:"top",children:p},`${c.prompt}-${d}`):t.jsx(u.Fragment,{children:p},`${c.prompt}-${d}`)})})}ol.displayName="RelatedPrompts";const ap="w-3.5 h-3.5 shrink-0 text-text-tertiary";function il(e){const a=N("chat3",ap);return t.jsx(ol,{defaultIcon:a,...e})}il.displayName="RelatedPrompts";const sp="Repo Wiki",np=["English","中文","日本語","한국어"],rp="h-3.5 w-3.5",op="h-3 w-3",rn="h-4 w-4";function ll({type:e="wiki",title:a,description:s,highlightText:n=sp,language:r="English",rechargeText:o,onClose:l,onGenerate:c,onRecharge:d,onLanguageChange:m,closeIcon:p,arrowDownSIcon:x,suggestionIcon:g,dataStyle:v,dataTheme:f}){const b=e==="credits",h=p??t.jsx(Ce,{className:rp}),w=x??t.jsx(be,{className:op}),j=g??(b?t.jsx(mt,{className:rn}):t.jsx($a,{className:rn})),k=a??(b?"Credits Exhausted":"Free Wiki Generation Available"),T=b?"Your credits have been exhausted. Please recharge to continue using.":`Generate ${n} for this repository to boost AI agent with structured context.`,S=s??T,P=()=>{if(!S.includes(n))return t.jsx("span",{children:S});const A=S.split(n),I=[];for(let _=0;_<A.length;_++)A[_]&&I.push(t.jsx("span",{children:A[_]},`text-${_}`)),_<A.length-1&&I.push(t.jsx("span",{className:"text-[var(--color-link)]",children:n},`highlight-${_}`));return t.jsx(t.Fragment,{children:I})};return t.jsxs("div",{className:"relative rounded-lg border border-border-tertiary bg-bg-base p-3",children:[l&&t.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 flex h-4 w-4 cursor-pointer items-center justify-center text-text-secondary transition-colors duration-200 hover:text-text","aria-label":"Close",children:h}),t.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[t.jsx("div",{className:i("flex h-4 w-4 shrink-0 items-center justify-center",b?"text-warning":"text-primary"),children:j}),t.jsx("h3",{className:"min-w-0 flex-1 text-base leading-base font-semibold text-text",children:k})]}),t.jsx(t.Fragment,{children:t.jsx(ve,{scrollbarVisibility:"auto",maxHeight:96,className:"mb-2 ml-6 text-xs leading-xs text-text-tertiary",children:P()})}),t.jsx("div",{className:"flex items-center justify-end gap-2",children:b?o&&t.jsx(W,{variant:"secondary",onClick:d,children:o??"前往充值"}):t.jsxs(t.Fragment,{children:[t.jsxs($e,{children:[t.jsx(Oe,{asChild:!0,children:t.jsxs(W,{variant:"ghost",className:"flex items-center gap-1",children:[t.jsx("span",{children:r}),w]})}),t.jsx(Me,{dataStyle:v,dataTheme:f,children:np.map(A=>t.jsx(je,{onSelect:()=>m?.(A),children:A},A))})]}),t.jsx(W,{variant:"secondary",onClick:c,children:"Generate"})]})})]})}ll.displayName="HintBanner";const ip="h-3.5 w-3.5",lp="h-3 w-3",cp="h-4 w-4";function cl(e){const{style:a,theme:s}=de(),n=N("close",ip),r=N("arrowDownS",lp),o=e.type==="credits",l=N(o?"warning":"sparkling",cp);return t.jsx(ll,{closeIcon:n,arrowDownSIcon:r,suggestionIcon:l,dataStyle:a,dataTheme:s,...e})}cl.displayName="HintBanner";function dp(){return t.jsxs("span",{className:"relative block w-5 h-5 shrink-0 flex items-center justify-center","aria-hidden":!0,children:[t.jsx("style",{children:`
|
|
46
|
+
`}),a&&n.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-primary-active",children:a}),o!=null&&n.jsx(zx,{content:String(o)}),o==null&&e!=null&&n.jsx("span",{className:"font-medium text-primary-active",children:e}),s&&n.jsx("span",{className:"ml-auto font-medium font-mono text-primary-active",children:s})]})};Ba.displayName="GenerationStatusBar";function Lx(e,t,a){m.useEffect(()=>{const s=e.current;if(!s)return;s.style.height="auto";const o=(parseFloat(getComputedStyle(s).lineHeight)||24)*a;s.scrollHeight<=o?s.style.height=`${s.scrollHeight}px`:s.style.height=`${o}px`},[e,t,a])}const Dl=m.forwardRef(({value:e,onChange:t,placeholder:a="What can I help you with today?",disabled:s=!1,maxRows:r=6,onKeyDown:o,className:i,style:c,...d},u)=>{const p=m.useRef(null);Lx(p,e,r);const x=m.useCallback(b=>{p.current=b,typeof u=="function"?u(b):u&&(u.current=b)},[u]),g=m.useCallback(b=>t?.(b.target.value),[t]),v={outline:"none",border:"none",boxShadow:"none"},f="w-full resize-none border-none bg-transparent text-sm leading-sm font-normal placeholder:text-text-tertiary overflow-y-auto scrollbar-auto outline-none shadow-none focus:outline-none focus:ring-0 focus:shadow-none focus-visible:outline-none focus-visible:ring-0 focus-visible:shadow-none [&:focus-visible]:outline-none [&:focus-visible]:ring-0 [&:focus-visible]:ring-offset-0 [&:focus-visible]:shadow-none "+(e?.trim()?"text-text":"text-text-quaternary");return n.jsx("textarea",{ref:x,value:e,onChange:g,onKeyDown:o,placeholder:a,disabled:s,rows:1,className:[f,i].filter(Boolean).join(" "),...d,style:{...c??{},...v}})});Dl.displayName="ChatInputTextarea";function Al({open:e,onOpenChange:t,projectName:a,onAllowOnce:s,onAllowAlways:r}){return n.jsx(so,{open:e,onOpenChange:t,children:n.jsxs(ia,{className:"p-6",children:[n.jsxs(la,{children:[n.jsxs(da,{className:"text-xl leading-xl font-semibold text-text",children:['Allow Spark Design to access and modify files in "',a,'"?']}),n.jsx(ua,{className:"mt-2 text-sm leading-sm text-text-tertiary",children:"This permission applies to all files and subfolders in this directory. Spark Design may read, update, and permanently delete files here, and may share relevant file contents with connected tools when needed. Only allow access to folders you trust."})]}),n.jsxs(ca,{className:"mt-6 flex flex-row justify-end gap-2",children:[n.jsx(ma,{className:"h-9 rounded-full px-4",children:"Cancel"}),n.jsx("button",{type:"button",className:"inline-flex h-9 items-center justify-center rounded-full px-4 text-sm leading-sm font-medium border border-border bg-bg-base text-text transition-colors hover:bg-fill-tertiary active:bg-fill-secondary",onClick:r,children:"Always Allow"}),n.jsx("button",{type:"button",className:"inline-flex h-9 items-center justify-center rounded-full px-4 text-sm leading-sm font-medium bg-text text-text-on-primary transition-opacity hover:opacity-90 active:opacity-95",onClick:s,children:"Allow"})]})]})})}Al.displayName="FolderPermissionDialog";const Dx=["~/Projects/spark-design-app","~/Documents/workspace","~/Desktop/demo","~/code/my-app"],An="mr-2 w-4 h-4 shrink-0";function _l({disabled:e,folderButtonLabel:t,folderPermission:a,onFolderButtonClick:s,onFolderClear:r,onFolderSelect:o,hasFolderSelected:i,dataStyle:c,dataTheme:d,folderIcon:u=n.jsx(vr,{className:An}),folderOpenIcon:p=n.jsx(wr,{className:An}),historyIcon:x=n.jsx(jr,{className:An}),subMenuArrowIcon:g,folderFillIcon:v,closeIcon:f}){const b=a?.enable??!1,h=a?.projectName??"04_代码",[w,k]=m.useState(!1),[j,I]=m.useState(!1),[C,L]=m.useState(!1),z=m.useRef(null),S=s??(()=>{}),O=()=>{z.current?.click()},re=()=>{z.current&&(z.current.value=""),r?.()},_=m.useCallback(J=>{J==="always"&&I(!0),k(!1),L(!0)},[]),U=J=>{if(!b){L(J);return}if(!J){L(!1);return}if(j){L(!0);return}k(!0),L(!1)},le=J=>{const G=J.target.files;G&&G.length>0&&o(G)};return s?n.jsx(Xt,{label:t,onClick:S,disabled:e,folderIcon:u,folderFillIcon:v}):n.jsxs(n.Fragment,{children:[n.jsxs(We,{open:C,onOpenChange:U,children:[n.jsx(Ue,{asChild:!0,children:n.jsx(Xt,{label:t,disabled:e,selected:i,onClear:re,folderIcon:u,folderFillIcon:v,closeIcon:f,className:"focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0"})}),n.jsxs(Oe,{align:"start",side:"top",className:"min-w-50",dataStyle:c,dataTheme:d,children:[n.jsxs(Se,{onClick:O,children:[u,"Add folder"]}),i&&n.jsxs(Se,{onClick:O,children:[p,"Replace folder"]}),n.jsxs(Ur,{children:[n.jsxs(sa,{subTriggerIcon:g,children:[x,"Recent folders"]}),n.jsx(ra,{collisionPadding:{bottom:24,left:8},dataStyle:c,dataTheme:d,children:Dx.map(J=>n.jsx(Se,{onClick:()=>{},children:J},J))})]})]})]}),n.jsx("input",{ref:z,type:"file",webkitdirectory:"",multiple:!0,style:{display:"none"},onChange:le}),b&&n.jsx(Al,{open:w,onOpenChange:k,projectName:h,onAllowOnce:()=>_("once"),onAllowAlways:()=>_("always")})]})}_l.displayName="ChatInputFolderSelector";function Ol({config:e,disabled:t,dataStyle:a,dataTheme:s,arrowDownIcon:r=n.jsx(ve,{className:"h-3.5 w-3.5 shrink-0 text-text-secondary"})}){const i=e.modeSwitch.options.find(c=>c.value===e.modeSwitch.value)?.icon??e.modeSwitch.icon;return n.jsxs("div",{className:"flex items-center gap-3 text-sm leading-sm text-text-secondary",children:[n.jsxs(We,{children:[n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-md bg-fill-secondary px-2.5 py-1.5 text-sm leading-sm text-text hover:bg-fill focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",disabled:t,children:[i!=null&&n.jsx("span",{className:"flex shrink-0 items-center [&>*]:block [&>*]:leading-none",children:i}),n.jsx("span",{children:e.modeSwitch.label}),r]})}),n.jsx(Oe,{align:"start",side:"top",className:"min-w-30",dataStyle:a,dataTheme:s,children:e.modeSwitch.options.map(c=>n.jsxs(Se,{onClick:()=>e.modeSwitch.onChange(c.value),className:"flex items-center justify-between gap-2",children:[n.jsxs("span",{className:"flex items-center gap-2",children:[c.icon!=null&&n.jsx("span",{className:"flex shrink-0 [&>*]:block [&>*]:leading-none [&>*]:size-4",children:c.icon}),c.label]}),e.modeSwitch.value===c.value&&n.jsx(be,{className:"h-4 w-4 shrink-0 text-primary"})]},c.value))})]}),n.jsxs(We,{children:[n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 text-text-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1 py-0.5 disabled:opacity-50",disabled:t,children:[n.jsx("span",{children:e.modelSwitch.label}),r]})}),n.jsx(Oe,{align:"start",side:"top",className:"min-w-25",dataStyle:a,dataTheme:s,children:e.modelSwitch.options.map(c=>n.jsxs(Se,{onClick:()=>e.modelSwitch.onChange(c.value),className:"flex items-center justify-between gap-2",children:[c.label,e.modelSwitch.value===c.value&&n.jsx(be,{className:"h-4 w-4 shrink-0 text-primary"})]},c.value))})]}),e.consumptionMultiplier.options!=null&&e.consumptionMultiplier.options.length>0&&e.consumptionMultiplier.onChange!=null?n.jsxs(We,{children:[n.jsx(Ue,{asChild:!0,children:n.jsx("button",{type:"button",className:"inline-flex items-center text-text-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded px-1 py-0.5 disabled:opacity-50",disabled:t,children:e.consumptionMultiplier.value})}),n.jsx(Oe,{align:"start",side:"top",className:"min-w-20",dataStyle:a,dataTheme:s,children:e.consumptionMultiplier.options.map(c=>n.jsxs(Se,{onClick:()=>e.consumptionMultiplier.onChange?.(c.value),className:"flex items-center justify-between gap-2",children:[c.label,e.consumptionMultiplier.value===c.value&&n.jsx(be,{className:"h-4 w-4 shrink-0 text-primary"})]},c.value))})]}):n.jsx("span",{className:"text-text-secondary",children:e.consumptionMultiplier.value})]})}Ol.displayName="ChatInputModelSwitcher";const Ax=A.cva(["flex flex-col w-full bg-bg-base border border-primary-border rounded-xl transition-all duration-200","shadow-[0_0.25rem_1.25rem_var(--color-shadow-secondary)]","hover:shadow-[0_0.25rem_1.25rem_var(--color-shadow-secondary)]","focus-within:shadow-[0_0.25rem_1.25rem_var(--color-shadow-quaternary)]","hover:focus-within:shadow-[0_0.25rem_1.25rem_var(--color-shadow-quaternary)]"].join(" "),{variants:{disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{disabled:!1}}),Wt="flex flex-wrap items-center gap-2 px-3 pt-3 pb-2",_x="flex flex-1 items-center min-h-6 p-3",Ox="flex shrink-0 items-center justify-between w-full self-stretch gap-2 p-3";function Nt({className:e,style:t,children:a}){return n.jsx("div",{className:l("flex min-h-9 h-9 w-[calc(100%-2*var(--radius-xl))] mx-auto items-center overflow-hidden rounded-t-xl text-sm leading-sm",e),style:t,children:a})}Nt.displayName="ChatInputAbove";function Ct({className:e,children:t}){const a=$e();return n.jsx("div",{className:Ax({disabled:a.disabled,className:l("relative",e)}),children:t})}Ct.displayName="ChatInputBox";function xn({className:e,children:t}){return t?n.jsx("div",{className:l(Wt,e),children:t}):null}xn.displayName="ChatInputAttachments";const St=m.forwardRef(({placeholder:e,maxRows:t,...a},s)=>{const r=$e(),o=m.useCallback(i=>{r.setTextareaRef(i),typeof s=="function"?s(i):s&&(s.current=i)},[r,s]);return n.jsx("div",{className:_x,children:n.jsx(Dl,{ref:o,value:r.value,onChange:r.onChange,onKeyDown:r.handleKeyDown,placeholder:e??r.placeholder,disabled:r.disabled,maxRows:t??r.maxRows,...a})})});St.displayName="ChatInputInput";function It({className:e,children:t}){return n.jsx("div",{className:l(Ox,e),children:t})}It.displayName="ChatInputActions";function Rt({className:e,children:t}){return n.jsx("div",{className:l("flex items-center gap-2",e),children:t})}Rt.displayName="ChatInputActionsLeft";function it({className:e,children:t}){return n.jsx("div",{className:l("flex items-center gap-2",e),children:t})}it.displayName="ChatInputActionsRight";function fn({className:e,style:t,...a}){return n.jsx("button",{type:"button",className:l("absolute top-2 right-2 z-10 flex h-8 w-8 items-center justify-center rounded-lg text-text-secondary hover:bg-fill-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",e),style:{...t},...a})}fn.displayName="ChatInputExpandButton";function Tt(){const e=$e();return e.showFolderButton?n.jsx(_l,{disabled:e.disabled,folderButtonLabel:e.folderButtonLabel,folderPermission:e.folderPermission,onFolderButtonClick:e.onFolderButtonClick,onFolderClear:e.handleFolderClear,onFolderSelect:e.handleFolderSelect,hasFolderSelected:e.hasFolderSelected,dataStyle:e.dataStyle,dataTheme:e.dataTheme,folderIcon:e.folderIcon,folderOpenIcon:e.folderOpenIcon,historyIcon:e.historyIcon,subMenuArrowIcon:e.subMenuArrowIcon,folderFillIcon:e.folderFillIcon,closeIcon:e.closeIcon}):null}Tt.displayName="ChatInputFolderButton";function Mt(){const e=$e();return e.showMoreButton?n.jsx(Ie,{variant:"ghost",icon:e.addLargeIcon??n.jsx(ea,{className:"h-5 w-5"}),onClick:e.onMoreButtonClick,disabled:e.disabled}):null}Mt.displayName="ChatInputMoreButton";function Zt(){const e=$e();return n.jsx($a,{disabled:!e.canSend||e.disabled,status:e.sendButtonStatus,...e.form?{type:"submit",form:e.form}:{onClick:e.handleSend}})}Zt.displayName="ChatInputSendButton";function Pt(){const e=$e();return e.footerLeftConfig?n.jsx(Ol,{config:e.footerLeftConfig,disabled:e.disabled,arrowDownIcon:e.arrowDownIcon,dataStyle:e.dataStyle,dataTheme:e.dataTheme}):n.jsxs(n.Fragment,{children:[n.jsx(Tt,{}),n.jsx(Mt,{})]})}Pt.displayName="ChatInputFooterLeft";const El=m.forwardRef(function({className:t,hasAbove:a=!1,hasAttachments:s=!1,hasFooter:r=!0,aboveOverlap:o=!0},i){const c=$e(),d=()=>{if(!s||c.attachments==null||c.attachments===!1)return null;const x=c.attachments;return typeof x=="object"&&!m.isValidElement(x)&&("files"in x||"images"in x)?n.jsxs(n.Fragment,{children:[x.files&&n.jsx("div",{className:Wt,children:x.files}),x.images&&n.jsx("div",{className:Wt,children:x.images})]}):n.jsx("div",{className:Wt,children:x})},u=()=>n.jsx(Pt,{}),p=n.jsxs(Ct,{className:l(!r&&!s&&"min-h-14"),children:[d(),n.jsx(St,{ref:i}),n.jsx(It,{children:r?n.jsxs(n.Fragment,{children:[n.jsx(Rt,{children:u()}),n.jsx("div",{className:"flex-1 h-5"}),n.jsx(it,{children:n.jsx(Zt,{})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex-1 h-5"}),n.jsx(it,{children:n.jsx(Zt,{})})]})})]});return a&&c.showGenerationStatus&&c.generationStatus?n.jsxs("div",{className:l("flex flex-col w-full",t),children:[n.jsx(Nt,{children:n.jsx(Ba,{status:typeof c.generationStatus?.content=="string"?c.generationStatus.content:void 0,icon:c.generationStatus?.icon,time:c.generationStatus?.time,children:c.generationStatus?.content})}),p]}):n.jsx("div",{className:t,children:p})});El.displayName="ChatInputDefaultLayout";function Ex(e){return e==null||e===!1?!1:typeof e=="object"&&!m.isValidElement(e)?!!e.files||!!e.images:!0}const Fx=m.forwardRef(function(t,a){const s=Ex(t.attachments);return n.jsx(pn,{...t,children:n.jsx(El,{ref:a,className:t.className,hasAbove:t.showGenerationStatus,hasAttachments:s,hasFooter:t.showFooter,aboveOverlap:!0})})}),he=Fx;he.displayName="ChatInput";he.Root=pn;he.Above=Nt;he.Box=Ct;he.Attachments=xn;he.Input=St;he.Actions=It;he.ActionsLeft=Rt;he.ActionsRight=it;he.ExpandButton=fn;he.FolderButton=Tt;he.MoreButton=Mt;he.SendButton=Zt;he.FooterLeft=Pt;const $x=he,_n="w-4 h-4",Ha=m.forwardRef((e,t)=>{const a=N("send",_n),s=N("stop",_n),r=N("mic",_n);return n.jsx($a,{ref:t,sendIcon:a,stopIcon:s,micIcon:r,...e})});Ha.displayName="SendButton";function Va(e){const{style:t,theme:a}=ue(),s=N("more","h-5 w-5 shrink-0"),r=N("folder","mr-2 w-4 h-4 shrink-0"),o=N("folderOpen","mr-2 w-4 h-4 shrink-0"),i=N("history","mr-2 w-4 h-4 shrink-0"),c=N("arrowDownS","h-3.5 w-3.5 shrink-0 text-text-secondary"),d=N("arrowRight","h-4 w-4 shrink-0"),u=N("folderFill","w-4 h-4 shrink-0"),p=N("close","w-4 h-4 shrink-0");return n.jsx(pn,{...e,dataStyle:t,dataTheme:a,addLargeIcon:s,folderIcon:r,folderOpenIcon:o,historyIcon:i,arrowDownIcon:c,subMenuArrowIcon:d,folderFillIcon:u,closeIcon:p})}Va.displayName="ChatInputRoot";const Fl=m.forwardRef(function(t,a){const{style:s,theme:r}=ue(),o=N("more","h-5 w-5 shrink-0"),i=N("folder","mr-2 w-4 h-4 shrink-0"),c=N("folderOpen","mr-2 w-4 h-4 shrink-0"),d=N("history","mr-2 w-4 h-4 shrink-0"),u=N("arrowDownS","h-3.5 w-3.5 shrink-0 text-text-secondary"),p=N("arrowRight","h-4 w-4 shrink-0"),x=N("folderFill","w-4 h-4 shrink-0"),g=N("close","w-4 h-4 shrink-0");return n.jsx($x,{ref:a,dataStyle:s,dataTheme:r,addLargeIcon:o,folderIcon:i,folderOpenIcon:c,historyIcon:d,arrowDownIcon:u,subMenuArrowIcon:p,folderFillIcon:x,closeIcon:g,...t})});Fl.displayName="ChatInput";function Ga(){const e=$e();return n.jsx(Ha,{disabled:!e.canSend||e.disabled,status:e.sendButtonStatus,...e.form?{type:"submit",form:e.form}:{onClick:e.handleSend}})}Ga.displayName="ChatInputSendButton";const Bx=Object.assign(Fl,{Root:Va,Above:Nt,Box:Ct,Attachments:xn,Input:St,Actions:It,ActionsLeft:Rt,ActionsRight:it,ExpandButton:fn,FolderButton:Tt,MoreButton:Mt,SendButton:Ga,FooterLeft:Pt}),Hx="w-3.5 h-3.5 shrink-0 text-text-tertiary";function $l({items:e,onSelect:t,singleLineText:a=!1,className:s,defaultIcon:r}){const o=e.slice(0,3),i=r??n.jsx(kr,{className:Hx});return o.length===0?null:n.jsx("div",{className:l("flex flex-col gap-3 w-full min-w-0",!a&&"max-w-lg",s),role:"list","aria-label":"Related prompt suggestions",children:o.map((c,d)=>{const u=c.icon??i,p=n.jsxs("button",{type:"button",onClick:()=>t?.(c),className:l("flex items-center gap-2 w-full min-w-0 text-left","rounded-md px-0 py-0 min-h-0","text-xs leading-xs font-normal text-text-tertiary","transition-colors",t&&"cursor-pointer hover:text-text",!t&&"cursor-default"),role:"listitem",children:[n.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0 flex items-center justify-center",children:u}),n.jsx("span",{className:l("min-w-0 flex-1",a?"truncate":"line-clamp-2"),children:c.text})]});return a?n.jsx(rt,{content:c.text,side:"top",children:p},`${c.prompt}-${d}`):n.jsx(m.Fragment,{children:p},`${c.prompt}-${d}`)})})}$l.displayName="RelatedPrompts";const Vx="w-3.5 h-3.5 shrink-0 text-text-tertiary";function Bl(e){const t=N("chat3",Vx);return n.jsx($l,{defaultIcon:t,...e})}Bl.displayName="RelatedPrompts";const Gx="Repo Wiki",qx=["English","中文","日本語","한국어"],Wx="h-3.5 w-3.5",Ux="h-3 w-3",zs="h-4 w-4";function Hl({type:e="wiki",title:t,description:a,highlightText:s=Gx,language:r="English",rechargeText:o,onClose:i,onGenerate:c,onRecharge:d,onLanguageChange:u,closeIcon:p,arrowDownSIcon:x,suggestionIcon:g,dataStyle:v,dataTheme:f}){const b=e==="credits",h=p??n.jsx(Re,{className:Wx}),w=x??n.jsx(ve,{className:Ux}),k=g??(b?n.jsx(kt,{className:zs}):n.jsx(Jn,{className:zs})),j=t??(b?"Credits Exhausted":"Free Wiki Generation Available"),I=b?"Your credits have been exhausted. Please recharge to continue using.":`Generate ${s} for this repository to boost AI agent with structured context.`,C=a??I,L=()=>{if(!C.includes(s))return n.jsx("span",{children:C});const z=C.split(s),S=[];for(let O=0;O<z.length;O++)z[O]&&S.push(n.jsx("span",{children:z[O]},`text-${O}`)),O<z.length-1&&S.push(n.jsx("span",{className:"text-[var(--color-link)]",children:s},`highlight-${O}`));return n.jsx(n.Fragment,{children:S})};return n.jsxs("div",{className:"relative rounded-lg border border-border-tertiary bg-bg-base p-3",children:[i&&n.jsx("button",{type:"button",onClick:i,className:"absolute top-3 right-3 flex h-4 w-4 cursor-pointer items-center justify-center text-text-secondary transition-colors duration-200 hover:text-text","aria-label":"Close",children:h}),n.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[n.jsx("div",{className:l("flex h-4 w-4 shrink-0 items-center justify-center",b?"text-warning":"text-primary"),children:k}),n.jsx("h3",{className:"min-w-0 flex-1 text-base leading-base font-semibold text-text",children:j})]}),n.jsx(n.Fragment,{children:n.jsx(we,{scrollbarVisibility:"auto",maxHeight:96,className:"mb-2 ml-6 text-xs leading-xs text-text-tertiary",children:L()})}),n.jsx("div",{className:"flex items-center justify-end gap-2",children:b?o&&n.jsx(W,{variant:"secondary",onClick:d,children:o??"前往充值"}):n.jsxs(n.Fragment,{children:[n.jsxs(We,{children:[n.jsx(Ue,{asChild:!0,children:n.jsxs(W,{variant:"ghost",className:"flex items-center gap-1",children:[n.jsx("span",{children:r}),w]})}),n.jsx(Oe,{dataStyle:v,dataTheme:f,children:qx.map(z=>n.jsx(Se,{onSelect:()=>u?.(z),children:z},z))})]}),n.jsx(W,{variant:"secondary",onClick:c,children:"Generate"})]})})]})}Hl.displayName="HintBanner";const Qx="h-3.5 w-3.5",Yx="h-3 w-3",Xx="h-4 w-4";function Vl(e){const{style:t,theme:a}=ue(),s=N("close",Qx),r=N("arrowDownS",Yx),o=e.type==="credits",i=N(o?"warning":"sparkling",Xx);return n.jsx(Hl,{closeIcon:s,arrowDownSIcon:r,suggestionIcon:i,dataStyle:t,dataTheme:a,...e})}Vl.displayName="HintBanner";function Zx(){return n.jsxs("span",{className:"relative block w-5 h-5 shrink-0 flex items-center justify-center","aria-hidden":!0,children:[n.jsx("style",{children:`
|
|
47
47
|
.thinking-dots span { animation: thinking-dot 1.4s ease-in-out infinite both; }
|
|
48
48
|
.thinking-dots span:nth-child(1) { animation-delay: 0s; }
|
|
49
49
|
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
|
|
@@ -52,11 +52,11 @@ ${s.map(([o,l])=>{const c=l.theme?.[n]??l.color;return c?` --color-${o}: ${c};`
|
|
|
52
52
|
0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
|
|
53
53
|
40% { transform: scale(1); opacity: 1; }
|
|
54
54
|
}
|
|
55
|
-
`}),
|
|
55
|
+
`}),n.jsxs("span",{className:"thinking-dots inline-flex gap-0.5",children:[n.jsx("span",{className:"w-1 h-1 rounded-full bg-current opacity-70"}),n.jsx("span",{className:"w-1 h-1 rounded-full bg-current opacity-70"}),n.jsx("span",{className:"w-1 h-1 rounded-full bg-current opacity-70"})]})]})}function qa({text:e="Spark is Thinking...",textClassName:t,shimmer:a=!0,shimmerDuration:s=2,shimmerSpread:r=2,className:o,loader:i,...c}){const d=m.useMemo(()=>(e||"").length*r,[e,r]),u=i??n.jsx(Zx,{});return n.jsxs("div",{className:l("inline-flex items-center gap-1.5 max-w-full",o),...c,children:[n.jsx("span",{className:"shrink-0 -translate-x-0.5","aria-hidden":!0,children:u}),n.jsx("div",{className:"flex-1 min-w-0 flex items-center",children:a?n.jsx(H.motion.span,{className:l("text-sm leading-sm relative inline-block bg-clip-text text-transparent","bg-[length:250%_100%,auto] bg-no-repeat truncate",t),style:{backgroundImage:`linear-gradient(90deg, transparent calc(50% - ${d}px), var(--color-text), transparent calc(50% + ${d}px)), linear-gradient(var(--color-text-secondary), var(--color-text-secondary))`},initial:{backgroundPosition:"100% center"},animate:{backgroundPosition:"0% center"},transition:{repeat:1/0,duration:s,ease:"linear"},children:e}):n.jsx("span",{className:l("text-sm leading-sm text-text-secondary truncate",t),children:e})})]})}qa.displayName="ThinkingIndicator";const Kx={text:"Scanning local photo library",description:"Indexing metadata and building a rename plan",details:[{type:"action",action:"Discover photos",desc:"Found 1,000 images in /Pictures/Unsorted"},{type:"action",action:"Extract metadata",desc:"Read EXIF timestamps, GPS, and camera model"},{type:"action",action:"Detect duplicates",desc:"Hash-based matching + perceptual similarity"}]},Jx={text:"Classifying photos into albums",description:"Clustering by time, location, and scene",details:[{type:"action",action:"Time buckets",desc:"Group into events using temporal gaps"},{type:"action",action:"Location clusters",desc:"Reverse geocode GPS into city/area labels"},{type:"action",action:"Scene tags",desc:"Detect indoor/outdoor, portraits, food, and documents"}]},ef={text:"Renaming files safely",description:"Dry-run, collision check, then atomic move",details:[{type:"action",action:"Dry run",desc:"Preview 1,000 rename operations"},{type:"action",action:"Collision handling",desc:"Append counter suffix to avoid overwrites"},{type:"action",action:"Write changes",desc:"Move files into album folders"}]},tf=[{step:Kx,simpleMd:"I'm **scanning** your library and building the index. Found 1,000 photos in `Pictures/Unsorted`; EXIF and duplicates are being analyzed.\n\n"},{step:Jx,simpleMd:`**Classifying** into albums by time, location, and scene. Time buckets and GPS labels are done; next I'll tag indoor/outdoor and document vs. portrait.
|
|
56
56
|
|
|
57
|
-
`},{step:
|
|
57
|
+
`},{step:ef,simpleMd:`**Dry-run** is done and collision handling is in place. No overwrites; an audit log (CSV) is ready. Pending your confirmation to run the renames.
|
|
58
58
|
|
|
59
|
-
`}],
|
|
59
|
+
`}],nf=`## Plan
|
|
60
60
|
|
|
61
61
|
I will organize your **1,000 local photos** by building an index, clustering them into albums, and then performing a safe rename + move operation.
|
|
62
62
|
|
|
@@ -92,9 +92,9 @@ Example:
|
|
|
92
92
|
## Next step
|
|
93
93
|
|
|
94
94
|
If you want, I can generate a **preview report** first (top 50 renames + album summary) before applying changes.
|
|
95
|
-
`;function hp(e,a){const s=[];for(const n of e)s.push({type:"think"}),s.push({type:"composer",step:n.step}),s.push({type:"md",md:n.simpleMd});return s.push({type:"think"}),s.push({type:"md",md:a}),s}const Ss=u.createContext(null);Ss.displayName="ResponseContext";function Is(){const e=u.useContext(Ss);if(!e)throw new Error("Response compound components must be used within Response.Root");return e}const gp=t.jsx(Cs,{text:"Spark is thinking..."});function ta({simulate:e=!0,phase:a="thinking",rounds:s,finalMarkdown:n,onSimulateComplete:r,onStepChange:o,thinkingIndicator:l,children:c}){const d=s??xp,m=n??fp,p=l??gp,x=u.useMemo(()=>hp(d,m),[d,m]),[g,v]=u.useState(0),f=u.useRef(x.length),b=e?g>=x.length-1:a==="done",h=x[g]??null,w=h?.type==="think";u.useEffect(()=>{if(!e||x.length===0)return;const k=x[g]??null;k?.type==="composer"&&k.step?o?.(k.step.text,k.step.toolType):k?.type==="think"&&o?.("Thinking..."),g>=x.length&&r?.()},[e,x,g,o,r]),u.useEffect(()=>{!e||x.length===0||f.current!==x.length&&(f.current=x.length,requestAnimationFrame(()=>v(0)))},[e,x.length]),u.useEffect(()=>{if(!e||x.length===0)return;const k=x[g]??null;if(k?.type==="think"||k?.type==="composer"){const T=window.setTimeout(()=>v(S=>Math.min(S+1,x.length)),580);return()=>window.clearTimeout(T)}},[e,x,g]);const j={phase:a,simulate:e,rounds:d,finalMarkdown:m,blocks:x,visibleIndex:g,setVisibleIndex:v,isSimDone:b,currentBlock:h,showThink:w,onSimulateComplete:r,onStepChange:o,thinkingIndicator:p};return t.jsx(Ss.Provider,{value:j,children:c})}ta.displayName="ResponseRoot";const yp={p:({children:e})=>t.jsx("p",{className:"text-sm leading-sm text-text [&:not(:first-child)]:mt-6 last:mb-0",children:e}),h1:({children:e})=>t.jsx("h1",{className:"scroll-m-20 text-4xl font-medium tracking-tight text-text",children:e}),h2:({children:e})=>t.jsx("h2",{className:"scroll-m-20 border-b border-border-secondary pb-2 text-3xl font-semibold tracking-tight text-text first:mt-0 [&:not(:first-child)]:mt-10",children:e}),h3:({children:e})=>t.jsx("h3",{className:"scroll-m-20 text-2xl font-semibold tracking-tight text-text [&:not(:first-child)]:mt-8",children:e}),h4:({children:e})=>t.jsx("h4",{className:"scroll-m-20 text-xl font-semibold tracking-tight text-text [&:not(:first-child)]:mt-6",children:e}),h5:({children:e})=>t.jsx("h5",{className:"scroll-m-20 text-lg font-semibold tracking-tight text-text-secondary [&:not(:first-child)]:mt-4",children:e}),h6:({children:e})=>t.jsx("h6",{className:"scroll-m-20 text-base font-semibold tracking-tight text-text-tertiary uppercase [&:not(:first-child)]:mt-4",children:e}),blockquote:({children:e})=>t.jsx("blockquote",{className:"mt-6 border-l-2 border-border-secondary pl-6 italic text-text-secondary",children:e}),ul:({className:e,children:a})=>t.jsx("ul",{className:i("my-6 ml-6 text-text [&>li]:mt-2",String(e??"").includes("contains-task-list")?"list-none":"list-disc"),children:a}),ol:({children:e})=>t.jsx("ol",{className:"my-6 ml-6 list-decimal text-text [&>li]:mt-2",children:e}),li:({className:e,children:a})=>t.jsx("li",{className:i("leading-sm",String(e??"").includes("task-list-item")&&"list-none flex items-start gap-2 [&>input]:mt-0.5 [&>input]:shrink-0"),children:a}),pre:({children:e})=>t.jsx(ve,{scrollbarVisibility:"auto",className:"my-6 rounded-lg border border-border-tertiary bg-bg-base p-4 font-mono text-sm leading-sm text-text",children:t.jsx("pre",{className:"m-0 font-mono text-sm leading-sm text-text border-0 bg-transparent p-0",children:e})}),code:({className:e,children:a,...s})=>typeof e=="string"&&e.startsWith("language-")?t.jsx("code",{className:i(e,"font-mono text-sm leading-sm"),...s,children:a}):t.jsx("code",{className:"relative rounded bg-fill-tertiary px-1 py-0.5 font-mono text-sm leading-sm font-semibold text-text",...s,children:a}),table:({children:e})=>t.jsx(ve,{scrollbarVisibility:"auto",className:"my-6 w-full rounded-md border border-border-secondary",children:t.jsx("table",{className:"w-full border-collapse text-sm leading-sm text-text",children:e})}),thead:({children:e})=>t.jsx("thead",{className:"border-b border-border-secondary bg-fill-tertiary",children:e}),tbody:({children:e})=>t.jsx("tbody",{className:"[&>tr]:border-b [&>tr]:border-border-tertiary",children:e}),tr:({children:e})=>t.jsx("tr",{children:e}),th:({children:e})=>t.jsx("th",{className:"px-4 py-2 text-left font-semibold text-text",children:e}),td:({children:e})=>t.jsx("td",{className:"px-4 py-2 text-text",children:e}),a:({href:e,children:a})=>t.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:a}),hr:()=>t.jsx("hr",{className:"my-6 border-0 border-t border-border-secondary"}),strong:({children:e})=>t.jsx("strong",{className:"font-semibold text-text",children:e}),em:({children:e})=>t.jsx("em",{className:"italic text-text",children:e})};function et({children:e,className:a}){return t.jsx("div",{className:i("markdown-body text-sm leading-sm text-text",a),children:t.jsx(Nc,{remarkPlugins:[Cc,Sc],rehypePlugins:[Ic],components:yp,children:e})})}et.displayName="MarkdownBody";const bp="w-full h-full text-text-tertiary transition-transform duration-200 ease-in-out",vp="w-full h-full transition-transform duration-200 ease-in-out",Rs=u.createContext(null);Rs.displayName="ReasoningStepContext";function aa(){const e=u.useContext(Rs);if(!e)throw new Error("ReasoningStep compound components must be used within ReasoningStep.Root");return e}function sa({text:e,description:a,status:s="completed",icon:n,showIcon:r=!0,details:o,children:l,detailsChildren:c,duration:d=2,spread:m=2,disableExpandAnimation:p=!1,defaultExpanded:x,expanded:g,onExpandedChange:v,eyeIcon:f,arrowRightIcon:b}){const h=g!==void 0,[w,j]=u.useState(x??!1),k=h?g:w,[T,S]=u.useState(!1),P=p&&x!==void 0?x:k,A=r&&typeof e=="string",I=A?"var(--spacing-1.5)":"var(--spacing-2.5)",ne=o!=null&&o.length>0||c!=null,D=u.useCallback(()=>{ne&&(h?v?.(!g):j(C=>!C))},[ne,h,g,v]),[q,ie]=u.useState(new Set),X=u.useCallback(C=>{ie(O=>{const J=new Set(O);return J.has(C)?J.delete(C):J.add(C),J})},[]),G=u.useMemo(()=>f??t.jsx(tr,{className:bp}),[f]),ae=u.useMemo(()=>b??t.jsx(at,{className:vp}),[b]),le={status:s,isExpanded:k,isHovered:T,setIsHovered:S,toggleExpanded:D,effectiveExpanded:P,effectiveShowIcon:A,hasExpandableContent:ne,text:e,description:a,details:o,detailsChildren:c,duration:d,spread:m,disableExpandAnimation:p,detailIndent:I,expandedNestedKeys:q,toggleNested:X,icon:n,eyeIcon:G,arrowRightIcon:ae};return t.jsx(Rs.Provider,{value:le,children:l})}sa.displayName="ReasoningStepRoot";const Vt={width:"var(--font-size-xs)",height:"var(--font-size-xs)"},wp={ts:"text-info",tsx:"text-info",js:"text-info",jsx:"text-info",py:"text-teal",md:"text-text-secondary",mdx:"text-text-secondary"};function kp(e,a){const s=(e??a?.split(".").pop()??"").toLowerCase();return wp[s]??"text-text-tertiary"}const jp=u.memo(function({className:a}){return t.jsx("span",{className:i("inline-flex items-center justify-center text-xs leading-xs font-mono",a),style:Vt,"aria-hidden":!0,children:"⎔"})}),Np=u.memo(function({prefix:a,primary:s,secondary:n}){return t.jsxs("div",{className:"flex flex-row items-center gap-1.5 min-w-0 flex-1",children:[a?t.jsx("div",{className:"flex items-center justify-center shrink-0",children:a}):null,t.jsxs("div",{className:"flex flex-row items-center gap-1 min-w-0 overflow-hidden flex-1",children:[t.jsx("span",{className:"text-xs leading-xs font-normal text-text-tertiary truncate",title:s,children:s}),n?t.jsx("span",{className:"text-xs leading-xs font-normal text-text-quaternary truncate",title:n,children:n}):null]})]})});function na({className:e}){const a=aa(),s=u.useMemo(()=>typeof a.text=="string"?a.text.length*a.spread:10*a.spread,[a.text,a.spread]),n=()=>a.icon?a.icon:a.eyeIcon,r=()=>typeof a.text!="string"?a.text:a.status==="in-progress"?t.jsx(V.motion.span,{className:"text-xs leading-xs font-normal relative inline-block bg-clip-text text-transparent bg-[length:250%_100%,auto] bg-no-repeat truncate",style:{backgroundImage:`linear-gradient(90deg, transparent calc(50% - ${s}px), var(--color-text), transparent calc(50% + ${s}px)), linear-gradient(var(--color-text-tertiary), var(--color-text-tertiary))`},initial:{backgroundPosition:"100% center"},animate:{backgroundPosition:"0% center"},transition:{repeat:1/0,duration:a.duration,ease:"linear"},children:a.text}):t.jsx("span",{className:"text-xs leading-xs font-normal text-text-tertiary truncate",children:a.text}),o=()=>a.description?t.jsx("span",{className:"text-xs leading-xs font-normal text-text-quaternary truncate",children:a.description}):null;return t.jsxs("div",{className:i("flex flex-row items-center gap-1.5",a.hasExpandableContent&&"cursor-pointer",e),onClick:a.toggleExpanded,children:[a.effectiveShowIcon&&t.jsx("div",{className:"flex items-center justify-center shrink-0",style:Vt,children:n()}),t.jsxs("div",{className:"flex flex-row items-center gap-1 flex-1 min-w-0",children:[r(),a.description?o():null,a.hasExpandableContent&&t.jsx("div",{className:i("flex items-center justify-center shrink-0 text-text-tertiary transition-opacity duration-200 ease-in-out",a.effectiveExpanded||a.isHovered?"opacity-100":"opacity-0",a.effectiveExpanded?"rotate-90":"rotate-0"),style:Vt,children:a.arrowRightIcon})]})]})}na.displayName="ReasoningStepHeader";const dl=u.memo(function e({detail:a,depth:s,pathKey:n,detailIndent:r,expandedNestedKeys:o,onToggleNested:l,arrowRightIcon:c}){const d=a.details!=null&&a.details.length>0,m=o.has(n),p=!d,x=a.type==="action"?a.action:a.filename,g=a.type==="action"?a.desc:[a.lines,a.path].filter(Boolean).join(" "),v=p&&a.type==="file"?t.jsx(jp,{className:kp(a.fileType,a.filename)}):void 0,f=u.useCallback(()=>{d&&l(n)},[d,l,n]),b=t.jsxs("div",{className:i("flex flex-row items-center gap-1.5 self-stretch min-h-5 min-w-0",d&&"cursor-pointer"),onClick:d?f:void 0,children:[t.jsx(Np,{prefix:v,primary:x,secondary:g}),d&&t.jsx("div",{className:i("flex items-center justify-center shrink-0 text-text-tertiary",m?"rotate-90":"rotate-0"),style:Vt,children:c})]}),h=t.jsxs("div",{className:"flex flex-row items-center gap-0 self-stretch",style:{marginLeft:r},children:[t.jsx("div",{className:"shrink-0 w-[var(--font-size-xs)] h-5 border-l border-border-tertiary"}),b]});if(!d)return t.jsx(u.Fragment,{children:h},n);const j=s===1?"rounded-lg border border-border-tertiary bg-bg-base p-2 flex flex-col gap-0":"flex flex-col";return t.jsxs("div",{className:"flex flex-col self-stretch",children:[h,t.jsx("div",{className:i("grid transition-[grid-template-rows,opacity] duration-150 ease-out",m?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:t.jsx("div",{className:"overflow-hidden",children:t.jsx("div",{className:i(j),children:a.details?.map((k,T)=>t.jsx(e,{detail:k,depth:s+1,pathKey:`${n}-${T}`,detailIndent:r,disableExpandAnimation:!1,expandedNestedKeys:o,onToggleNested:l,arrowRightIcon:c},`${n}-${T}`))})})})]},n)});function zs({detail:e,depth:a=0,pathKey:s="0"}){const n=aa();return t.jsx(dl,{detail:e,depth:a,pathKey:s,detailIndent:n.detailIndent,disableExpandAnimation:n.disableExpandAnimation,expandedNestedKeys:n.expandedNestedKeys,onToggleNested:n.toggleNested,arrowRightIcon:n.arrowRightIcon})}zs.displayName="ReasoningStepDetailRow";function ra({className:e,children:a}){const s=aa(),n=s.details!=null&&s.details.length>0;return t.jsx("div",{className:i("grid transition-[grid-template-rows,opacity] duration-200 ease-out",s.effectiveExpanded?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0",e),children:t.jsx("div",{className:"overflow-hidden",children:n?t.jsx("div",{className:"flex flex-col",children:s.details?.map((r,o)=>t.jsx(dl,{detail:r,depth:0,pathKey:String(o),detailIndent:s.detailIndent,disableExpandAnimation:s.disableExpandAnimation,expandedNestedKeys:s.expandedNestedKeys,onToggleNested:s.toggleNested,arrowRightIcon:s.arrowRightIcon},String(o)))}):a??s.detailsChildren})})}ra.displayName="ReasoningStepDetails";function ul(){const e=aa();return t.jsxs("div",{"data-reasoning-step":!0,className:"flex flex-col gap-1 py-0.5",onMouseEnter:()=>e.setIsHovered(!0),onMouseLeave:()=>e.setIsHovered(!1),children:[t.jsx(na,{}),e.hasExpandableContent&&t.jsx(ra,{})]})}ul.displayName="ReasoningStepDefaultLayout";function ml(e){return t.jsx(sa,{...e,children:t.jsx(ul,{})})}ml.displayName="ReasoningStep";const jt=ml;jt.Root=sa;jt.Header=na;jt.Details=ra;jt.DetailRow=zs;const Ht=jt;function Cp(e){const a=[];let s=0;const n=o=>/[\u4e00-\u9fff\u3040-\u30ff]/.test(o),r=o=>/[a-zA-Z0-9']/.test(o);for(;s<e.length;){const o=e[s];if(n(o))a.push(o),s+=1;else if(r(o)){let l=s;for(;l<e.length&&r(e[l]);)l+=1;a.push(e.slice(s,l)),s=l}else{let l=s;for(;l<e.length&&!n(e[l])&&!r(e[l]);)l+=1;a.push(e.slice(s,l)),s=l}}return a}function Sp(e){const a=e.split(/\n\n+/);if(a.length<=1)return{completed:"",partial:e};const s=a.pop()??"";return{completed:a.join(`
|
|
95
|
+
`;function af(e,t){const a=[];for(const s of e)a.push({type:"think"}),a.push({type:"composer",step:s.step}),a.push({type:"md",md:s.simpleMd});return a.push({type:"think"}),a.push({type:"md",md:t}),a}const Wa=m.createContext(null);Wa.displayName="ResponseContext";function Ua(){const e=m.useContext(Wa);if(!e)throw new Error("Response compound components must be used within Response.Root");return e}const sf=n.jsx(qa,{text:"Spark is thinking..."});function hn({simulate:e=!0,phase:t="thinking",rounds:a,finalMarkdown:s,onSimulateComplete:r,onStepChange:o,thinkingIndicator:i,children:c}){const d=a??tf,u=s??nf,p=i??sf,x=m.useMemo(()=>af(d,u),[d,u]),[g,v]=m.useState(0),f=m.useRef(x.length),b=e?g>=x.length-1:t==="done",h=x[g]??null,w=h?.type==="think";m.useEffect(()=>{if(!e||x.length===0)return;const j=x[g]??null;j?.type==="composer"&&j.step?o?.(j.step.text,j.step.toolType):j?.type==="think"&&o?.("Thinking..."),g>=x.length&&r?.()},[e,x,g,o,r]),m.useEffect(()=>{!e||x.length===0||f.current!==x.length&&(f.current=x.length,requestAnimationFrame(()=>v(0)))},[e,x.length]),m.useEffect(()=>{if(!e||x.length===0)return;const j=x[g]??null;if(j?.type==="think"||j?.type==="composer"){const I=window.setTimeout(()=>v(C=>Math.min(C+1,x.length)),580);return()=>window.clearTimeout(I)}},[e,x,g]);const k={phase:t,simulate:e,rounds:d,finalMarkdown:u,blocks:x,visibleIndex:g,setVisibleIndex:v,isSimDone:b,currentBlock:h,showThink:w,onSimulateComplete:r,onStepChange:o,thinkingIndicator:p};return n.jsx(Wa.Provider,{value:k,children:c})}hn.displayName="ResponseRoot";const rf={p:({children:e})=>n.jsx("p",{className:"text-sm leading-sm text-text [&:not(:first-child)]:mt-6 last:mb-0",children:e}),h1:({children:e})=>n.jsx("h1",{className:"scroll-m-20 text-4xl font-medium tracking-tight text-text",children:e}),h2:({children:e})=>n.jsx("h2",{className:"scroll-m-20 border-b border-border-secondary pb-2 text-3xl font-semibold tracking-tight text-text first:mt-0 [&:not(:first-child)]:mt-10",children:e}),h3:({children:e})=>n.jsx("h3",{className:"scroll-m-20 text-2xl font-semibold tracking-tight text-text [&:not(:first-child)]:mt-8",children:e}),h4:({children:e})=>n.jsx("h4",{className:"scroll-m-20 text-xl font-semibold tracking-tight text-text [&:not(:first-child)]:mt-6",children:e}),h5:({children:e})=>n.jsx("h5",{className:"scroll-m-20 text-lg font-semibold tracking-tight text-text-secondary [&:not(:first-child)]:mt-4",children:e}),h6:({children:e})=>n.jsx("h6",{className:"scroll-m-20 text-base font-semibold tracking-tight text-text-tertiary uppercase [&:not(:first-child)]:mt-4",children:e}),blockquote:({children:e})=>n.jsx("blockquote",{className:"mt-6 border-l-2 border-border-secondary pl-6 italic text-text-secondary",children:e}),ul:({className:e,children:t})=>n.jsx("ul",{className:l("my-6 ml-6 text-text [&>li]:mt-2",String(e??"").includes("contains-task-list")?"list-none":"list-disc"),children:t}),ol:({children:e})=>n.jsx("ol",{className:"my-6 ml-6 list-decimal text-text [&>li]:mt-2",children:e}),li:({className:e,children:t})=>n.jsx("li",{className:l("leading-sm",String(e??"").includes("task-list-item")&&"list-none flex items-start gap-2 [&>input]:mt-0.5 [&>input]:shrink-0"),children:t}),pre:({children:e})=>n.jsx(we,{scrollbarVisibility:"auto",className:"my-6 rounded-lg border border-border-tertiary bg-bg-base p-4 font-mono text-sm leading-sm text-text",children:n.jsx("pre",{className:"m-0 font-mono text-sm leading-sm text-text border-0 bg-transparent p-0",children:e})}),code:({className:e,children:t,...a})=>typeof e=="string"&&e.startsWith("language-")?n.jsx("code",{className:l(e,"font-mono text-sm leading-sm"),...a,children:t}):n.jsx("code",{className:"relative rounded bg-fill-tertiary px-1 py-0.5 font-mono text-sm leading-sm font-semibold text-text",...a,children:t}),table:({children:e})=>n.jsx(we,{scrollbarVisibility:"auto",className:"my-6 w-full rounded-md border border-border-secondary",children:n.jsx("table",{className:"w-full border-collapse text-sm leading-sm text-text",children:e})}),thead:({children:e})=>n.jsx("thead",{className:"border-b border-border-secondary bg-fill-tertiary",children:e}),tbody:({children:e})=>n.jsx("tbody",{className:"[&>tr]:border-b [&>tr]:border-border-tertiary",children:e}),tr:({children:e})=>n.jsx("tr",{children:e}),th:({children:e})=>n.jsx("th",{className:"px-4 py-2 text-left font-semibold text-text",children:e}),td:({children:e})=>n.jsx("td",{className:"px-4 py-2 text-text",children:e}),a:({href:e,children:t})=>n.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:t}),hr:()=>n.jsx("hr",{className:"my-6 border-0 border-t border-border-secondary"}),strong:({children:e})=>n.jsx("strong",{className:"font-semibold text-text",children:e}),em:({children:e})=>n.jsx("em",{className:"italic text-text",children:e})};function lt({children:e,className:t}){return n.jsx("div",{className:l("markdown-body text-sm leading-sm text-text",t),children:n.jsx(sd,{remarkPlugins:[rd,od],rehypePlugins:[id],components:rf,children:e})})}lt.displayName="MarkdownBody";const of="w-full h-full text-text-tertiary transition-transform duration-200 ease-in-out",lf="w-full h-full transition-transform duration-200 ease-in-out",Qa=m.createContext(null);Qa.displayName="ReasoningStepContext";function gn(){const e=m.useContext(Qa);if(!e)throw new Error("ReasoningStep compound components must be used within ReasoningStep.Root");return e}function yn({text:e,description:t,status:a="completed",icon:s,showIcon:r=!0,details:o,children:i,detailsChildren:c,duration:d=2,spread:u=2,disableExpandAnimation:p=!1,defaultExpanded:x,expanded:g,onExpandedChange:v,eyeIcon:f,arrowRightIcon:b}){const h=g!==void 0,[w,k]=m.useState(x??!1),j=h?g:w,[I,C]=m.useState(!1),L=p&&x!==void 0?x:j,z=r&&typeof e=="string",S=z?"var(--spacing-1.5)":"var(--spacing-2.5)",re=o!=null&&o.length>0||c!=null,_=m.useCallback(()=>{re&&(h?v?.(!g):k(R=>!R))},[re,h,g,v]),[U,le]=m.useState(new Set),J=m.useCallback(R=>{le($=>{const ee=new Set($);return ee.has(R)?ee.delete(R):ee.add(R),ee})},[]),G=m.useMemo(()=>f??n.jsx(yr,{className:of}),[f]),ae=m.useMemo(()=>b??n.jsx(dt,{className:lf}),[b]),ce={status:a,isExpanded:j,isHovered:I,setIsHovered:C,toggleExpanded:_,effectiveExpanded:L,effectiveShowIcon:z,hasExpandableContent:re,text:e,description:t,details:o,detailsChildren:c,duration:d,spread:u,disableExpandAnimation:p,detailIndent:S,expandedNestedKeys:U,toggleNested:J,icon:s,eyeIcon:G,arrowRightIcon:ae};return n.jsx(Qa.Provider,{value:ce,children:i})}yn.displayName="ReasoningStepRoot";const Kt={width:"var(--font-size-xs)",height:"var(--font-size-xs)"},cf={ts:"text-info",tsx:"text-info",js:"text-info",jsx:"text-info",py:"text-teal",md:"text-text-secondary",mdx:"text-text-secondary"};function df(e,t){const a=(e??t?.split(".").pop()??"").toLowerCase();return cf[a]??"text-text-tertiary"}const uf=m.memo(function({className:t}){return n.jsx("span",{className:l("inline-flex items-center justify-center text-xs leading-xs font-mono",t),style:Kt,"aria-hidden":!0,children:"⎔"})}),mf=m.memo(function({prefix:t,primary:a,secondary:s}){return n.jsxs("div",{className:"flex flex-row items-center gap-1.5 min-w-0 flex-1",children:[t?n.jsx("div",{className:"flex items-center justify-center shrink-0",children:t}):null,n.jsxs("div",{className:"flex flex-row items-center gap-1 min-w-0 overflow-hidden flex-1",children:[n.jsx("span",{className:"text-xs leading-xs font-normal text-text-tertiary truncate",title:a,children:a}),s?n.jsx("span",{className:"text-xs leading-xs font-normal text-text-quaternary truncate",title:s,children:s}):null]})]})});function bn({className:e}){const t=gn(),a=m.useMemo(()=>typeof t.text=="string"?t.text.length*t.spread:10*t.spread,[t.text,t.spread]),s=()=>t.icon?t.icon:t.eyeIcon,r=()=>typeof t.text!="string"?t.text:t.status==="in-progress"?n.jsx(H.motion.span,{className:"text-xs leading-xs font-normal relative inline-block bg-clip-text text-transparent bg-[length:250%_100%,auto] bg-no-repeat truncate",style:{backgroundImage:`linear-gradient(90deg, transparent calc(50% - ${a}px), var(--color-text), transparent calc(50% + ${a}px)), linear-gradient(var(--color-text-tertiary), var(--color-text-tertiary))`},initial:{backgroundPosition:"100% center"},animate:{backgroundPosition:"0% center"},transition:{repeat:1/0,duration:t.duration,ease:"linear"},children:t.text}):n.jsx("span",{className:"text-xs leading-xs font-normal text-text-tertiary truncate",children:t.text}),o=()=>t.description?n.jsx("span",{className:"text-xs leading-xs font-normal text-text-quaternary truncate",children:t.description}):null;return n.jsxs("div",{className:l("flex flex-row items-center gap-1.5",t.hasExpandableContent&&"cursor-pointer",e),onClick:t.toggleExpanded,children:[t.effectiveShowIcon&&n.jsx("div",{className:"flex items-center justify-center shrink-0",style:Kt,children:s()}),n.jsxs("div",{className:"flex flex-row items-center gap-1 flex-1 min-w-0",children:[r(),t.description?o():null,t.hasExpandableContent&&n.jsx("div",{className:l("flex items-center justify-center shrink-0 text-text-tertiary transition-opacity duration-200 ease-in-out",t.effectiveExpanded||t.isHovered?"opacity-100":"opacity-0",t.effectiveExpanded?"rotate-90":"rotate-0"),style:Kt,children:t.arrowRightIcon})]})]})}bn.displayName="ReasoningStepHeader";const Gl=m.memo(function e({detail:t,depth:a,pathKey:s,detailIndent:r,expandedNestedKeys:o,onToggleNested:i,arrowRightIcon:c}){const d=t.details!=null&&t.details.length>0,u=o.has(s),p=!d,x=t.type==="action"?t.action:t.filename,g=t.type==="action"?t.desc:[t.lines,t.path].filter(Boolean).join(" "),v=p&&t.type==="file"?n.jsx(uf,{className:df(t.fileType,t.filename)}):void 0,f=m.useCallback(()=>{d&&i(s)},[d,i,s]),b=n.jsxs("div",{className:l("flex flex-row items-center gap-1.5 self-stretch min-h-5 min-w-0",d&&"cursor-pointer"),onClick:d?f:void 0,children:[n.jsx(mf,{prefix:v,primary:x,secondary:g}),d&&n.jsx("div",{className:l("flex items-center justify-center shrink-0 text-text-tertiary",u?"rotate-90":"rotate-0"),style:Kt,children:c})]}),h=n.jsxs("div",{className:"flex flex-row items-center gap-0 self-stretch",style:{marginLeft:r},children:[n.jsx("div",{className:"shrink-0 w-[var(--font-size-xs)] h-5 border-l border-border-tertiary"}),b]});if(!d)return n.jsx(m.Fragment,{children:h},s);const k=a===1?"rounded-lg border border-border-tertiary bg-bg-base p-2 flex flex-col gap-0":"flex flex-col";return n.jsxs("div",{className:"flex flex-col self-stretch",children:[h,n.jsx("div",{className:l("grid transition-[grid-template-rows,opacity] duration-150 ease-out",u?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:n.jsx("div",{className:"overflow-hidden",children:n.jsx("div",{className:l(k),children:t.details?.map((j,I)=>n.jsx(e,{detail:j,depth:a+1,pathKey:`${s}-${I}`,detailIndent:r,disableExpandAnimation:!1,expandedNestedKeys:o,onToggleNested:i,arrowRightIcon:c},`${s}-${I}`))})})})]},s)});function Ya({detail:e,depth:t=0,pathKey:a="0"}){const s=gn();return n.jsx(Gl,{detail:e,depth:t,pathKey:a,detailIndent:s.detailIndent,disableExpandAnimation:s.disableExpandAnimation,expandedNestedKeys:s.expandedNestedKeys,onToggleNested:s.toggleNested,arrowRightIcon:s.arrowRightIcon})}Ya.displayName="ReasoningStepDetailRow";function vn({className:e,children:t}){const a=gn(),s=a.details!=null&&a.details.length>0;return n.jsx("div",{className:l("grid transition-[grid-template-rows,opacity] duration-200 ease-out",a.effectiveExpanded?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0",e),children:n.jsx("div",{className:"overflow-hidden",children:s?n.jsx("div",{className:"flex flex-col",children:a.details?.map((r,o)=>n.jsx(Gl,{detail:r,depth:0,pathKey:String(o),detailIndent:a.detailIndent,disableExpandAnimation:a.disableExpandAnimation,expandedNestedKeys:a.expandedNestedKeys,onToggleNested:a.toggleNested,arrowRightIcon:a.arrowRightIcon},String(o)))}):t??a.detailsChildren})})}vn.displayName="ReasoningStepDetails";function ql(){const e=gn();return n.jsxs("div",{"data-reasoning-step":!0,className:"flex flex-col gap-1 py-0.5",onMouseEnter:()=>e.setIsHovered(!0),onMouseLeave:()=>e.setIsHovered(!1),children:[n.jsx(bn,{}),e.hasExpandableContent&&n.jsx(vn,{})]})}ql.displayName="ReasoningStepDefaultLayout";function Wl(e){return n.jsx(yn,{...e,children:n.jsx(ql,{})})}Wl.displayName="ReasoningStep";const zt=Wl;zt.Root=yn;zt.Header=bn;zt.Details=vn;zt.DetailRow=Ya;const Jt=zt;function pf(e){const t=[];let a=0;const s=o=>/[\u4e00-\u9fff\u3040-\u30ff]/.test(o),r=o=>/[a-zA-Z0-9']/.test(o);for(;a<e.length;){const o=e[a];if(s(o))t.push(o),a+=1;else if(r(o)){let i=a;for(;i<e.length&&r(e[i]);)i+=1;t.push(e.slice(a,i)),a=i}else{let i=a;for(;i<e.length&&!s(e[i])&&!r(e[i]);)i+=1;t.push(e.slice(a,i)),a=i}}return t}function xf(e){const t=e.split(/\n\n+/);if(t.length<=1)return{completed:"",partial:e};const a=t.pop()??"";return{completed:t.join(`
|
|
96
96
|
|
|
97
|
-
`),partial:
|
|
97
|
+
`),partial:a}}const ff=3;function Xa({content:e,isActive:t,onStreamComplete:a,tokenDelayMs:s=14,className:r}){const o=m.useMemo(()=>pf(e),[e]),[i,c]=m.useState({content:e,visibleCount:t?0:o.length}),d=m.useRef(a);m.useEffect(()=>{d.current=a},[a]);const u=i.content===e?i.visibleCount:t?0:o.length,p=m.useMemo(()=>o.slice(0,u).join(""),[o,u]),{completed:x,partial:g}=m.useMemo(()=>xf(p),[p]);m.useEffect(()=>{if(!t)return;const f=o.length;if(f===0){d.current?.();return}let b=0;const h=setInterval(()=>{b=Math.min(b+ff,f),c({content:e,visibleCount:b}),b>=f&&(clearInterval(h),d.current?.())},s);return()=>clearInterval(h)},[t,e,o.length,s]);const v=t&&u<o.length;return o.length===0?null:v?n.jsxs("div",{className:r,children:[x?n.jsx("div",{className:"streaming-completed",children:n.jsx(lt,{children:x})}):null,g?n.jsx("span",{className:"streaming-partial text-sm leading-sm text-text streaming-token-fade-in",children:g}):null]}):n.jsx("div",{className:r,children:n.jsx(lt,{children:e})})}function Ls(...e){return e.filter(Boolean).join(" ")}const hf=n.jsx(Jn,{className:"h-5 w-5 text-text-on-primary"});function Za({width:e="var(--spacing-80)",height:t="var(--spacing-60)",speed:a=1,caption:s="Spark is drawing...",captionClassName:r,className:o,style:i,showOverlay:c=!1,overlayText:d,sparklingIcon:u=hf,...p}){const x=m.useRef(null);return m.useEffect(()=>{if(typeof CSS<"u"&&CSS.registerProperty)try{CSS.registerProperty({name:"--a",syntax:"<angle>",inherits:!0,initialValue:"0deg"}),CSS.registerProperty({name:"--l",syntax:"<number>",inherits:!0,initialValue:"0"}),CSS.registerProperty({name:"--x",syntax:"<length>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:"--y",syntax:"<length>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:"--o",syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:"--value",syntax:"<angle>",inherits:!0,initialValue:"0deg"}),CSS.registerProperty({name:"--width-ratio",syntax:"<number>",inherits:!0,initialValue:"0"}),CSS.registerProperty({name:"--scale",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}},[]),m.useEffect(()=>{const g=x.current;if(!g)return;const v=()=>{const w=g.getBoundingClientRect();if(w.width>0&&w.height>0){const k=Math.max(w.width,w.height);g.style.setProperty("--actual-size",`${k}px`)}},f=typeof e=="string"&&e.includes("%")||typeof t=="string"&&t.includes("%");let b=null;const h=()=>{v(),b=new ResizeObserver(v),b.observe(g)};if(f){const w=requestAnimationFrame(()=>h());return()=>{cancelAnimationFrame(w),b?.disconnect()}}return h(),()=>b?.disconnect()},[e,t]),n.jsxs(n.Fragment,{children:[n.jsx("style",{children:`
|
|
98
98
|
@keyframes ai {
|
|
99
99
|
from { --a: 360deg; --l: 0.35; --o: 1; }
|
|
100
100
|
30% { --l: 1.5; }
|
|
@@ -249,14 +249,14 @@ If you want, I can generate a **preview report** first (top 50 renames + album s
|
|
|
249
249
|
font-weight: 600;
|
|
250
250
|
color: var(--color-text-on-primary);
|
|
251
251
|
}
|
|
252
|
-
`}),t.jsxs("div",{ref:x,className:on("image-generating-container",o),style:{"--container-width":e,"--container-height":a,"--image-generating-speed":String(s),...l&&typeof l=="object"?l:{}},...p,children:[t.jsxs("div",{className:"fluid-inner",children:[t.jsx("div",{className:"c c4",style:{"--i":0}}),t.jsx("div",{className:"c c1",style:{"--i":1}}),t.jsx("div",{className:"c c2",style:{"--i":2}}),t.jsx("div",{className:"c c3",style:{"--i":3}}),t.jsx("div",{className:"rings"})]}),t.jsx("div",{className:"glass"}),c?t.jsx("div",{className:"content-overlay remaining-overlay",children:t.jsx("span",{className:"remaining-text",children:d})}):t.jsxs("div",{className:"content-overlay",children:[t.jsx(V.motion.span,{className:"inline-flex items-center justify-center",animate:{scale:[1,1.08,1],opacity:[.9,1,.9]},transition:{duration:1.2,repeat:1/0,ease:[.16,1,.3,1]},children:m}),t.jsx("span",{className:on("caption",r),children:n})]})]})]})}Ls.displayName="ImageGenerating";function Ms({className:e}){const a=Is();return(a.simulate?a.showThink:a.phase==="thinking"||a.phase==="streaming")?t.jsx("span",{className:e,children:a.thinkingIndicator}):null}Ms.displayName="ResponseThinking";function Ps({className:e,children:a}){return t.jsx("div",{className:i("flex flex-col gap-1",e),children:a})}Ps.displayName="ResponseSteps";function As({step:e,status:a="completed"}){return t.jsx(Ht,{text:e.text,description:e.description,details:e.details,status:a})}As.displayName="ResponseStep";function Ds({markdown:e,streaming:a=!1,onStreamComplete:s,className:n}){const r=Is(),o=e??r.finalMarkdown;return a?t.jsx("div",{className:i("mt-1",n),children:t.jsx(Ts,{content:o,isActive:a,onStreamComplete:s})}):t.jsx("div",{className:i("mt-1",n),children:t.jsx(et,{children:o})})}Ds.displayName="ResponseContent";function oa({width:e="320px",height:a="240px",className:s}){return t.jsx(Ls,{width:e,height:a,className:s})}oa.displayName="ResponseImageGenerating";function ia({className:e}){const a=Is(),s=u.useMemo(()=>{if(!a.simulate)return[];const r=[],o=Math.min(a.visibleIndex,a.blocks.length-1);let l=-1;for(let c=0;c<=o;c++)a.blocks[c]?.type==="composer"&&(l=c);for(let c=0;c<=o;c++){const d=a.blocks[c];if(d){if(d.type==="think"){c===a.visibleIndex&&r.push(t.jsx("span",{children:a.thinkingIndicator},`think-${c}`));continue}if(d.type==="composer"&&d.step){const m=c===l&&!a.isSimDone;r.push(t.jsx(Ht,{text:d.step.text,description:d.step.description,details:d.step.details,status:m?"in-progress":"completed"},c))}d.type==="md"&&d.md&&r.push(t.jsx("div",{className:"mt-1",children:t.jsx(Ts,{content:d.md,isActive:c===o,onStreamComplete:()=>{a.setVisibleIndex(m=>Math.min(m+1,a.blocks.length)),c+1>=a.blocks.length&&a.onSimulateComplete?.()}})},`md-${c}`))}}return r},[a]),n=u.useMemo(()=>{if(a.simulate)return[];const r=[];for(let o=0;o<a.blocks.length;o++){const l=a.blocks[o];l&&(l.type==="composer"&&l.step&&r.push(t.jsx(Ht,{text:l.step.text,description:l.step.description,details:l.step.details,status:"completed",disableExpandAnimation:!0},o)),l.type==="md"&&l.md&&r.push(t.jsx("div",{className:"mt-1",children:t.jsx(et,{children:l.md})},`md-${o}`)))}return r},[a]);return a.phase==="imageGenerating"?t.jsx("div",{className:i("flex flex-col gap-3 font-body",e),children:t.jsx(oa,{})}):a.simulate?t.jsx("div",{className:i("flex flex-col gap-3 font-body",e),children:t.jsx("div",{className:"flex flex-col gap-1",children:s})}):t.jsxs("div",{className:i("flex flex-col gap-3 font-body",e),children:[t.jsx("div",{className:"flex flex-col gap-1",children:n}),(a.phase==="thinking"||a.phase==="streaming")&&a.thinkingIndicator]})}ia.displayName="ResponseDefaultLayout";function pl({simulate:e,phase:a,rounds:s,finalMarkdown:n,onSimulateComplete:r,onStepChange:o,thinkingIndicator:l,className:c,...d}){return t.jsx(ta,{simulate:e,phase:a,rounds:s,finalMarkdown:n,onSimulateComplete:r,onStepChange:o,thinkingIndicator:l,children:t.jsx("div",{...d,children:t.jsx(ia,{className:c})})})}pl.displayName="Response";const De=pl;De.Root=ta;De.Thinking=Ms;De.Steps=Ps;De.Step=As;De.Content=Ds;De.ImageGenerating=oa;De.DefaultLayout=ia;const zp=De,Tp=[{id:"6",layers:[{ind:5,ty:4,parent:4,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:4,ty:3,parent:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:48,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0},{ind:3,ty:3,ks:{p:{a:0,k:[1,1]}},ip:0,op:241,st:0}]},{id:"11",layers:[{ind:10,ty:4,parent:9,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:9,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:4.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:52.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"16",layers:[{ind:15,ty:4,parent:14,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:14,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:9,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:57,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"21",layers:[{ind:20,ty:4,parent:19,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:19,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:12.6,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:60.6,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"26",layers:[{ind:25,ty:4,parent:24,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:24,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:15,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:63,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"31",layers:[{ind:30,ty:4,parent:29,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:29,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:16.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:64.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"36",layers:[{ind:35,ty:4,parent:34,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:34,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:17.4,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:65.4,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"41",layers:[{ind:40,ty:4,parent:39,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:39,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:18,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:66,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]}],Lp=60,Mp=360,Pp=0,Ap=JSON.parse('[{"ind":8,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[11,61]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":80.16,"s":[100],"h":1},{"t":80.16,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":38.16,"s":[0],"i":{"x":1,"y":1},"o":{"x":0.82,"y":0}},{"t":80.16,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":22,"h":22,"ip":0,"op":241,"st":0,"refId":"6"},{"ind":13,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":92.22,"s":[100],"h":1},{"t":92.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":80.16,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":92.22,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":21,"ip":0,"op":241,"st":0,"refId":"11"},{"ind":18,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":101.22,"s":[100],"h":1},{"t":101.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":92.22,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":101.22,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":20,"ip":0,"op":241,"st":0,"refId":"16"},{"ind":23,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":107.22,"s":[100],"h":1},{"t":107.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":101.22,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":107.22,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":21,"ip":0,"op":241,"st":0,"refId":"21"},{"ind":28,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":112.02,"s":[100],"h":1},{"t":112.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":107.22,"s":[0],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":112.02,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"26"},{"ind":33,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":115.62,"s":[100],"h":1},{"t":115.62,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":112.02,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":115.62,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"31"},{"ind":38,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":118.02,"s":[100],"h":1},{"t":118.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":115.62,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":118.02,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":121,"ip":0,"op":241,"st":0,"refId":"36"},{"ind":43,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":119.76,"s":[100],"h":1},{"t":119.76,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":118.02,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.76,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":120,"ip":0,"op":241,"st":0,"refId":"41"},{"ind":2,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":0,"y":0.726},"o":{"x":0.077,"y":0.396}},{"t":0.947943,"s":[143.05],"i":{"x":0.584,"y":0.684},"o":{"x":0.258,"y":0.351}},{"t":1.872292,"s":[170.15],"i":{"x":0.585,"y":0.69},"o":{"x":0.258,"y":0.357}},{"t":3.748465,"s":[200.34],"i":{"x":0.586,"y":0.699},"o":{"x":0.259,"y":0.366}},{"t":7.503875,"s":[232.22],"i":{"x":0.586,"y":0.713},"o":{"x":0.259,"y":0.381}},{"t":15.005773,"s":[263.7],"i":{"x":0.587,"y":0.741},"o":{"x":0.259,"y":0.411}},{"t":30,"s":[291.3],"i":{"x":0.628,"y":0.768},"o":{"x":0.286,"y":0.488}},{"t":60,"s":[311.6],"i":{"x":0.699,"y":0.605},"o":{"x":0.346,"y":0.344}},{"t":90,"s":[324.38],"i":{"x":0.715,"y":0.561},"o":{"x":0.37,"y":0.251}},{"t":105,"s":[336.74],"i":{"x":0.741,"y":0.618},"o":{"x":0.413,"y":0.285}},{"t":112.493217,"s":[350.5],"i":{"x":0.741,"y":0.636},"o":{"x":0.414,"y":0.303}},{"t":116.236934,"s":[364.32],"i":{"x":0.741,"y":0.645},"o":{"x":0.414,"y":0.312}},{"t":118.107494,"s":[377.2],"i":{"x":0.744,"y":0.651},"o":{"x":0.418,"y":0.318}},{"t":119.063474,"s":[389.07],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.532358,"s":[399.45],"i":{"x":0.878,"y":0.625},"o":{"x":1,"y":0.292}},{"t":120,"s":[450],"h":1},{"t":240,"s":[450],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[70,70],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":120,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[100,100],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":47,"ty":4,"parent":46,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":46,"ty":3,"parent":45,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":120,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":183,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":216.06,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":45,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":50,"ty":4,"parent":49,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":49,"ty":3,"parent":48,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":126,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.72,0.72]}},{"t":187.44,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":189,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":219,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":48,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":53,"ty":4,"parent":52,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":52,"ty":3,"parent":51,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":132.12,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.54,0.54]}},{"t":191.52,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":195.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":221.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":51,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":56,"ty":4,"parent":55,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":55,"ty":3,"parent":54,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":137.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.36,0.36]}},{"t":195.72,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":200.94,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":225,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":54,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":59,"ty":4,"parent":58,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":58,"ty":3,"parent":57,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":143.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.18,0.18]}},{"t":199.68,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":207.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":228,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":57,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":62,"ty":4,"parent":61,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":61,"ty":3,"parent":60,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":149.88,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":204.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":213.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":230.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":60,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":65,"ty":4,"parent":64,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":64,"ty":3,"parent":63,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":155.88,"s":[0,0],"i":{"x":[0.06,0.06],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":208.08,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":219.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":234.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":63,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":68,"ty":4,"parent":67,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":67,"ty":3,"parent":66,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":162,"s":[0,0],"i":{"x":[0.12,0.12],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":212.4,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":225.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":237.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":66,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":44,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":120,"s":[0],"i":{"x":0,"y":0.691},"o":{"x":0,"y":0.358}},{"t":120.06,"s":[17.95],"i":{"x":0.113,"y":0.857},"o":{"x":0.017,"y":0.588}},{"t":150.045,"s":[83.52],"i":{"x":0.649,"y":0.696},"o":{"x":0.298,"y":0.432}},{"t":180.03,"s":[90.83],"i":{"x":0.975,"y":0.245},"o":{"x":0.804,"y":0.109}},{"t":240,"s":[184.05],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":119.76,"s":[100,100],"i":{"x":[1,1],"y":[0.1,0.1]},"o":{"x":[1,1],"y":[0,0]}},{"t":240,"s":[50,50],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":1,"ty":3,"parent":0,"ks":{},"ip":0,"op":241,"st":0},{"ind":0,"ty":3,"ks":{},"ip":0,"op":241,"st":0}]'),Dp={g:"https://jitter.video"},_p=240,Ep="5.7.4",Fp=360,$p={assets:Tp,fr:Lp,h:Mp,ip:Pp,layers:Ap,meta:Dp,op:_p,v:Ep,w:Fp},Op=[{id:"6",layers:[{ind:5,ty:4,parent:4,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:4,ty:3,parent:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:48,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0},{ind:3,ty:3,ks:{p:{a:0,k:[1,1]}},ip:0,op:241,st:0}]},{id:"11",layers:[{ind:10,ty:4,parent:9,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:9,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:4.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:52.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"16",layers:[{ind:15,ty:4,parent:14,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:14,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:9,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:57,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"21",layers:[{ind:20,ty:4,parent:19,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:19,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:12.6,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:60.6,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"26",layers:[{ind:25,ty:4,parent:24,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:24,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:15,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:63,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"31",layers:[{ind:30,ty:4,parent:29,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:29,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:16.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:64.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"36",layers:[{ind:35,ty:4,parent:34,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:34,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:17.4,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:65.4,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"41",layers:[{ind:40,ty:4,parent:39,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:39,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:18,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:66,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]}],Bp=60,Vp=360,Hp=0,Gp=JSON.parse('[{"ind":8,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[11,61]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":80.16,"s":[100],"h":1},{"t":80.16,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":38.16,"s":[0],"i":{"x":1,"y":1},"o":{"x":0.82,"y":0}},{"t":80.16,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":22,"h":22,"ip":0,"op":241,"st":0,"refId":"6"},{"ind":13,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":92.22,"s":[100],"h":1},{"t":92.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":80.16,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":92.22,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":21,"ip":0,"op":241,"st":0,"refId":"11"},{"ind":18,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":101.22,"s":[100],"h":1},{"t":101.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":92.22,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":101.22,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":20,"ip":0,"op":241,"st":0,"refId":"16"},{"ind":23,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":107.22,"s":[100],"h":1},{"t":107.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":101.22,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":107.22,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":21,"ip":0,"op":241,"st":0,"refId":"21"},{"ind":28,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":112.02,"s":[100],"h":1},{"t":112.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":107.22,"s":[0],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":112.02,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"26"},{"ind":33,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":115.62,"s":[100],"h":1},{"t":115.62,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":112.02,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":115.62,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"31"},{"ind":38,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":118.02,"s":[100],"h":1},{"t":118.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":115.62,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":118.02,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":121,"ip":0,"op":241,"st":0,"refId":"36"},{"ind":43,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":119.76,"s":[100],"h":1},{"t":119.76,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":118.02,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.76,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":120,"ip":0,"op":241,"st":0,"refId":"41"},{"ind":2,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":0,"y":0.726},"o":{"x":0.077,"y":0.396}},{"t":0.947943,"s":[143.05],"i":{"x":0.584,"y":0.684},"o":{"x":0.258,"y":0.351}},{"t":1.872292,"s":[170.15],"i":{"x":0.585,"y":0.69},"o":{"x":0.258,"y":0.357}},{"t":3.748465,"s":[200.34],"i":{"x":0.586,"y":0.699},"o":{"x":0.259,"y":0.366}},{"t":7.503875,"s":[232.22],"i":{"x":0.586,"y":0.713},"o":{"x":0.259,"y":0.381}},{"t":15.005773,"s":[263.7],"i":{"x":0.587,"y":0.741},"o":{"x":0.259,"y":0.411}},{"t":30,"s":[291.3],"i":{"x":0.628,"y":0.768},"o":{"x":0.286,"y":0.488}},{"t":60,"s":[311.6],"i":{"x":0.699,"y":0.605},"o":{"x":0.346,"y":0.344}},{"t":90,"s":[324.38],"i":{"x":0.715,"y":0.561},"o":{"x":0.37,"y":0.251}},{"t":105,"s":[336.74],"i":{"x":0.741,"y":0.618},"o":{"x":0.413,"y":0.285}},{"t":112.493217,"s":[350.5],"i":{"x":0.741,"y":0.636},"o":{"x":0.414,"y":0.303}},{"t":116.236934,"s":[364.32],"i":{"x":0.741,"y":0.645},"o":{"x":0.414,"y":0.312}},{"t":118.107494,"s":[377.2],"i":{"x":0.744,"y":0.651},"o":{"x":0.418,"y":0.318}},{"t":119.063474,"s":[389.07],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.532358,"s":[399.45],"i":{"x":0.878,"y":0.625},"o":{"x":1,"y":0.292}},{"t":120,"s":[450],"h":1},{"t":240,"s":[450],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[70,70],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":120,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[100,100],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":47,"ty":4,"parent":46,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":46,"ty":3,"parent":45,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":120,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":183,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":216.06,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":45,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":50,"ty":4,"parent":49,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":49,"ty":3,"parent":48,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":126,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.72,0.72]}},{"t":187.44,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":189,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":219,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":48,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":53,"ty":4,"parent":52,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":52,"ty":3,"parent":51,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":132.12,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.54,0.54]}},{"t":191.52,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":195.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":221.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":51,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":56,"ty":4,"parent":55,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":55,"ty":3,"parent":54,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":137.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.36,0.36]}},{"t":195.72,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":200.94,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":225,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":54,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":59,"ty":4,"parent":58,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":58,"ty":3,"parent":57,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":143.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.18,0.18]}},{"t":199.68,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":207.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":228,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":57,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":62,"ty":4,"parent":61,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":61,"ty":3,"parent":60,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":149.88,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":204.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":213.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":230.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":60,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":65,"ty":4,"parent":64,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":64,"ty":3,"parent":63,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":155.88,"s":[0,0],"i":{"x":[0.06,0.06],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":208.08,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":219.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":234.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":63,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":68,"ty":4,"parent":67,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":67,"ty":3,"parent":66,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":162,"s":[0,0],"i":{"x":[0.12,0.12],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":212.4,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":225.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":237.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":66,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":44,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":120,"s":[0],"i":{"x":0,"y":0.691},"o":{"x":0,"y":0.358}},{"t":120.06,"s":[17.95],"i":{"x":0.113,"y":0.857},"o":{"x":0.017,"y":0.588}},{"t":150.045,"s":[83.52],"i":{"x":0.649,"y":0.696},"o":{"x":0.298,"y":0.432}},{"t":180.03,"s":[90.83],"i":{"x":0.975,"y":0.245},"o":{"x":0.804,"y":0.109}},{"t":240,"s":[184.05],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":119.76,"s":[100,100],"i":{"x":[1,1],"y":[0.1,0.1]},"o":{"x":[1,1],"y":[0,0]}},{"t":240,"s":[50,50],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":1,"ty":3,"parent":0,"ks":{},"ip":0,"op":241,"st":0},{"ind":0,"ty":3,"ks":{},"ip":0,"op":241,"st":0}]'),qp={g:"https://jitter.video"},Up=240,Qp="5.7.4",Wp=360,Zp={assets:Op,fr:Bp,h:Vp,ip:Hp,layers:Gp,meta:qp,op:Up,v:Qp,w:Wp};function Kp(){return t.jsxs("span",{className:"relative block w-5 h-5 shrink-0 overflow-hidden -translate-x-0.5","aria-hidden":!0,children:[t.jsx("span",{className:"absolute inset-0 w-5 h-5 thinking-light",children:t.jsx("span",{className:"absolute left-1/2 top-1/2",style:{transform:"translate(-50%, -50%) scale(1.8)"},children:t.jsx(Gs,{animationData:$p,loop:!0,autoplay:!0,style:{width:20,height:20}})})}),t.jsx("span",{className:"absolute inset-0 w-5 h-5 thinking-dark",children:t.jsx("span",{className:"absolute left-1/2 top-1/2",style:{transform:"translate(-50%, -50%) scale(1.8)"},children:t.jsx(Gs,{animationData:Zp,loop:!0,autoplay:!0,style:{width:20,height:20}})})}),t.jsx("style",{children:`
|
|
252
|
+
`}),n.jsxs("div",{ref:x,className:Ls("image-generating-container",o),style:{"--container-width":e,"--container-height":t,"--image-generating-speed":String(a),...i&&typeof i=="object"?i:{}},...p,children:[n.jsxs("div",{className:"fluid-inner",children:[n.jsx("div",{className:"c c4",style:{"--i":0}}),n.jsx("div",{className:"c c1",style:{"--i":1}}),n.jsx("div",{className:"c c2",style:{"--i":2}}),n.jsx("div",{className:"c c3",style:{"--i":3}}),n.jsx("div",{className:"rings"})]}),n.jsx("div",{className:"glass"}),c?n.jsx("div",{className:"content-overlay remaining-overlay",children:n.jsx("span",{className:"remaining-text",children:d})}):n.jsxs("div",{className:"content-overlay",children:[n.jsx(H.motion.span,{className:"inline-flex items-center justify-center",animate:{scale:[1,1.08,1],opacity:[.9,1,.9]},transition:{duration:1.2,repeat:1/0,ease:[.16,1,.3,1]},children:u}),n.jsx("span",{className:Ls("caption",r),children:s})]})]})]})}Za.displayName="ImageGenerating";function Ka({className:e}){const t=Ua();return(t.simulate?t.showThink:t.phase==="thinking"||t.phase==="streaming")?n.jsx("span",{className:e,children:t.thinkingIndicator}):null}Ka.displayName="ResponseThinking";function Ja({className:e,children:t}){return n.jsx("div",{className:l("flex flex-col gap-1",e),children:t})}Ja.displayName="ResponseSteps";function es({step:e,status:t="completed"}){return n.jsx(Jt,{text:e.text,description:e.description,details:e.details,status:t})}es.displayName="ResponseStep";function ts({markdown:e,streaming:t=!1,onStreamComplete:a,className:s}){const r=Ua(),o=e??r.finalMarkdown;return t?n.jsx("div",{className:l("mt-1",s),children:n.jsx(Xa,{content:o,isActive:t,onStreamComplete:a})}):n.jsx("div",{className:l("mt-1",s),children:n.jsx(lt,{children:o})})}ts.displayName="ResponseContent";function wn({width:e="320px",height:t="240px",className:a}){return n.jsx(Za,{width:e,height:t,className:a})}wn.displayName="ResponseImageGenerating";function kn({className:e}){const t=Ua(),a=m.useMemo(()=>{if(!t.simulate)return[];const r=[],o=Math.min(t.visibleIndex,t.blocks.length-1);let i=-1;for(let c=0;c<=o;c++)t.blocks[c]?.type==="composer"&&(i=c);for(let c=0;c<=o;c++){const d=t.blocks[c];if(d){if(d.type==="think"){c===t.visibleIndex&&r.push(n.jsx("span",{children:t.thinkingIndicator},`think-${c}`));continue}if(d.type==="composer"&&d.step){const u=c===i&&!t.isSimDone;r.push(n.jsx(Jt,{text:d.step.text,description:d.step.description,details:d.step.details,status:u?"in-progress":"completed"},c))}d.type==="md"&&d.md&&r.push(n.jsx("div",{className:"mt-1",children:n.jsx(Xa,{content:d.md,isActive:c===o,onStreamComplete:()=>{t.setVisibleIndex(u=>Math.min(u+1,t.blocks.length)),c+1>=t.blocks.length&&t.onSimulateComplete?.()}})},`md-${c}`))}}return r},[t]),s=m.useMemo(()=>{if(t.simulate)return[];const r=[];for(let o=0;o<t.blocks.length;o++){const i=t.blocks[o];i&&(i.type==="composer"&&i.step&&r.push(n.jsx(Jt,{text:i.step.text,description:i.step.description,details:i.step.details,status:"completed",disableExpandAnimation:!0},o)),i.type==="md"&&i.md&&r.push(n.jsx("div",{className:"mt-1",children:n.jsx(lt,{children:i.md})},`md-${o}`)))}return r},[t]);return t.phase==="imageGenerating"?n.jsx("div",{className:l("flex flex-col gap-3 font-body",e),children:n.jsx(wn,{})}):t.simulate?n.jsx("div",{className:l("flex flex-col gap-3 font-body",e),children:n.jsx("div",{className:"flex flex-col gap-1",children:a})}):n.jsxs("div",{className:l("flex flex-col gap-3 font-body",e),children:[n.jsx("div",{className:"flex flex-col gap-1",children:s}),(t.phase==="thinking"||t.phase==="streaming")&&t.thinkingIndicator]})}kn.displayName="ResponseDefaultLayout";function Ul({simulate:e,phase:t,rounds:a,finalMarkdown:s,onSimulateComplete:r,onStepChange:o,thinkingIndicator:i,className:c,...d}){return n.jsx(hn,{simulate:e,phase:t,rounds:a,finalMarkdown:s,onSimulateComplete:r,onStepChange:o,thinkingIndicator:i,children:n.jsx("div",{...d,children:n.jsx(kn,{className:c})})})}Ul.displayName="Response";const Be=Ul;Be.Root=hn;Be.Thinking=Ka;Be.Steps=Ja;Be.Step=es;Be.Content=ts;Be.ImageGenerating=wn;Be.DefaultLayout=kn;const gf=Be,yf=[{id:"6",layers:[{ind:5,ty:4,parent:4,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:4,ty:3,parent:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:48,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0},{ind:3,ty:3,ks:{p:{a:0,k:[1,1]}},ip:0,op:241,st:0}]},{id:"11",layers:[{ind:10,ty:4,parent:9,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:9,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:4.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:52.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"16",layers:[{ind:15,ty:4,parent:14,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:14,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:9,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:57,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"21",layers:[{ind:20,ty:4,parent:19,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:19,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:12.6,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:60.6,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"26",layers:[{ind:25,ty:4,parent:24,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:24,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:15,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:63,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"31",layers:[{ind:30,ty:4,parent:29,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:29,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:16.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:64.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"36",layers:[{ind:35,ty:4,parent:34,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:34,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:17.4,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:65.4,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"41",layers:[{ind:40,ty:4,parent:39,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[.031,.031,.027]},o:{a:0,k:100}}]},{ind:39,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:18,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:66,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]}],bf=60,vf=360,wf=0,kf=JSON.parse('[{"ind":8,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[11,61]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":80.16,"s":[100],"h":1},{"t":80.16,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":38.16,"s":[0],"i":{"x":1,"y":1},"o":{"x":0.82,"y":0}},{"t":80.16,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":22,"h":22,"ip":0,"op":241,"st":0,"refId":"6"},{"ind":13,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":92.22,"s":[100],"h":1},{"t":92.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":80.16,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":92.22,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":21,"ip":0,"op":241,"st":0,"refId":"11"},{"ind":18,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":101.22,"s":[100],"h":1},{"t":101.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":92.22,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":101.22,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":20,"ip":0,"op":241,"st":0,"refId":"16"},{"ind":23,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":107.22,"s":[100],"h":1},{"t":107.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":101.22,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":107.22,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":21,"ip":0,"op":241,"st":0,"refId":"21"},{"ind":28,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":112.02,"s":[100],"h":1},{"t":112.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":107.22,"s":[0],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":112.02,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"26"},{"ind":33,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":115.62,"s":[100],"h":1},{"t":115.62,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":112.02,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":115.62,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"31"},{"ind":38,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":118.02,"s":[100],"h":1},{"t":118.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":115.62,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":118.02,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":121,"ip":0,"op":241,"st":0,"refId":"36"},{"ind":43,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":119.76,"s":[100],"h":1},{"t":119.76,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":118.02,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.76,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":120,"ip":0,"op":241,"st":0,"refId":"41"},{"ind":2,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":0,"y":0.726},"o":{"x":0.077,"y":0.396}},{"t":0.947943,"s":[143.05],"i":{"x":0.584,"y":0.684},"o":{"x":0.258,"y":0.351}},{"t":1.872292,"s":[170.15],"i":{"x":0.585,"y":0.69},"o":{"x":0.258,"y":0.357}},{"t":3.748465,"s":[200.34],"i":{"x":0.586,"y":0.699},"o":{"x":0.259,"y":0.366}},{"t":7.503875,"s":[232.22],"i":{"x":0.586,"y":0.713},"o":{"x":0.259,"y":0.381}},{"t":15.005773,"s":[263.7],"i":{"x":0.587,"y":0.741},"o":{"x":0.259,"y":0.411}},{"t":30,"s":[291.3],"i":{"x":0.628,"y":0.768},"o":{"x":0.286,"y":0.488}},{"t":60,"s":[311.6],"i":{"x":0.699,"y":0.605},"o":{"x":0.346,"y":0.344}},{"t":90,"s":[324.38],"i":{"x":0.715,"y":0.561},"o":{"x":0.37,"y":0.251}},{"t":105,"s":[336.74],"i":{"x":0.741,"y":0.618},"o":{"x":0.413,"y":0.285}},{"t":112.493217,"s":[350.5],"i":{"x":0.741,"y":0.636},"o":{"x":0.414,"y":0.303}},{"t":116.236934,"s":[364.32],"i":{"x":0.741,"y":0.645},"o":{"x":0.414,"y":0.312}},{"t":118.107494,"s":[377.2],"i":{"x":0.744,"y":0.651},"o":{"x":0.418,"y":0.318}},{"t":119.063474,"s":[389.07],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.532358,"s":[399.45],"i":{"x":0.878,"y":0.625},"o":{"x":1,"y":0.292}},{"t":120,"s":[450],"h":1},{"t":240,"s":[450],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[70,70],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":120,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[100,100],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":47,"ty":4,"parent":46,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":46,"ty":3,"parent":45,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":120,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":183,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":216.06,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":45,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":50,"ty":4,"parent":49,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":49,"ty":3,"parent":48,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":126,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.72,0.72]}},{"t":187.44,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":189,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":219,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":48,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":53,"ty":4,"parent":52,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":52,"ty":3,"parent":51,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":132.12,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.54,0.54]}},{"t":191.52,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":195.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":221.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":51,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":56,"ty":4,"parent":55,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":55,"ty":3,"parent":54,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":137.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.36,0.36]}},{"t":195.72,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":200.94,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":225,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":54,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":59,"ty":4,"parent":58,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":58,"ty":3,"parent":57,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":143.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.18,0.18]}},{"t":199.68,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":207.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":228,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":57,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":62,"ty":4,"parent":61,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":61,"ty":3,"parent":60,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":149.88,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":204.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":213.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":230.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":60,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":65,"ty":4,"parent":64,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":64,"ty":3,"parent":63,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":155.88,"s":[0,0],"i":{"x":[0.06,0.06],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":208.08,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":219.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":234.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":63,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":68,"ty":4,"parent":67,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[0.031,0.031,0.027]},"o":{"a":0,"k":100}}]},{"ind":67,"ty":3,"parent":66,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":162,"s":[0,0],"i":{"x":[0.12,0.12],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":212.4,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":225.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":237.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":66,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":44,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":120,"s":[0],"i":{"x":0,"y":0.691},"o":{"x":0,"y":0.358}},{"t":120.06,"s":[17.95],"i":{"x":0.113,"y":0.857},"o":{"x":0.017,"y":0.588}},{"t":150.045,"s":[83.52],"i":{"x":0.649,"y":0.696},"o":{"x":0.298,"y":0.432}},{"t":180.03,"s":[90.83],"i":{"x":0.975,"y":0.245},"o":{"x":0.804,"y":0.109}},{"t":240,"s":[184.05],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":119.76,"s":[100,100],"i":{"x":[1,1],"y":[0.1,0.1]},"o":{"x":[1,1],"y":[0,0]}},{"t":240,"s":[50,50],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":1,"ty":3,"parent":0,"ks":{},"ip":0,"op":241,"st":0},{"ind":0,"ty":3,"ks":{},"ip":0,"op":241,"st":0}]'),jf={g:"https://jitter.video"},Nf=240,Cf="5.7.4",Sf=360,If={assets:yf,fr:bf,h:vf,ip:wf,layers:kf,meta:jf,op:Nf,v:Cf,w:Sf},Rf=[{id:"6",layers:[{ind:5,ty:4,parent:4,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:4,ty:3,parent:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:48,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0},{ind:3,ty:3,ks:{p:{a:0,k:[1,1]}},ip:0,op:241,st:0}]},{id:"11",layers:[{ind:10,ty:4,parent:9,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:9,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:4.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:52.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"16",layers:[{ind:15,ty:4,parent:14,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:14,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:9,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:57,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"21",layers:[{ind:20,ty:4,parent:19,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:19,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,10]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:12.6,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:60.6,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"26",layers:[{ind:25,ty:4,parent:24,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:24,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:15,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:63,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"31",layers:[{ind:30,ty:4,parent:29,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:29,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:16.8,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:64.8,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"36",layers:[{ind:35,ty:4,parent:34,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:34,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:17.4,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:65.4,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]},{id:"41",layers:[{ind:40,ty:4,parent:39,ks:{},ip:0,op:241,st:0,shapes:[{ty:"el",p:{a:0,k:[10,10]},s:{a:0,k:[20,20]}},{ty:"fl",c:{a:0,k:[1,1,1]},o:{a:0,k:100}}]},{ind:39,ty:3,ks:{a:{a:0,k:[10,10]},p:{a:0,k:[10,110]},s:{a:1,k:[{t:0,s:[0,0],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:18,s:[0,0],i:{x:[0,0],y:[1,1]},o:{x:[0,0],y:[.9,.9]}},{t:66,s:[100,100],i:{x:[1,1],y:[1,1]},o:{x:[0,0],y:[0,0]}},{t:240,s:[100,100],h:1}]}},ip:0,op:241,st:0}]}],Tf=60,Mf=360,Pf=0,zf=JSON.parse('[{"ind":8,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[11,61]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":80.16,"s":[100],"h":1},{"t":80.16,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":38.16,"s":[0],"i":{"x":1,"y":1},"o":{"x":0.82,"y":0}},{"t":80.16,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":22,"h":22,"ip":0,"op":241,"st":0,"refId":"6"},{"ind":13,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":92.22,"s":[100],"h":1},{"t":92.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":80.16,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":92.22,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":21,"ip":0,"op":241,"st":0,"refId":"11"},{"ind":18,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":101.22,"s":[100],"h":1},{"t":101.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":92.22,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":101.22,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":20,"ip":0,"op":241,"st":0,"refId":"16"},{"ind":23,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":107.22,"s":[100],"h":1},{"t":107.22,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":101.22,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":107.22,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":21,"ip":0,"op":241,"st":0,"refId":"21"},{"ind":28,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":112.02,"s":[100],"h":1},{"t":112.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":107.22,"s":[0],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":112.02,"s":[45],"h":1},{"t":240,"s":[45],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"26"},{"ind":33,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":115.62,"s":[100],"h":1},{"t":115.62,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[45],"h":1},{"t":112.02,"s":[45],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":115.62,"s":[90],"h":1},{"t":240,"s":[90],"h":1}]}},"w":20,"h":120,"ip":0,"op":241,"st":0,"refId":"31"},{"ind":38,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":118.02,"s":[100],"h":1},{"t":118.02,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[90],"h":1},{"t":115.62,"s":[90],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":118.02,"s":[135],"h":1},{"t":240,"s":[135],"h":1}]}},"w":20,"h":121,"ip":0,"op":241,"st":0,"refId":"36"},{"ind":43,"ty":0,"parent":2,"ks":{"a":{"a":0,"k":[10,60]},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":119.76,"s":[100],"h":1},{"t":119.76,"s":[0],"h":1},{"t":240,"s":[0],"h":1}]},"p":{"a":0,"k":[60,60]},"r":{"a":1,"k":[{"t":0,"s":[135],"h":1},{"t":118.02,"s":[135],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.76,"s":[180],"h":1},{"t":240,"s":[180],"h":1}]}},"w":21,"h":120,"ip":0,"op":241,"st":0,"refId":"41"},{"ind":2,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":0,"y":0.726},"o":{"x":0.077,"y":0.396}},{"t":0.947943,"s":[143.05],"i":{"x":0.584,"y":0.684},"o":{"x":0.258,"y":0.351}},{"t":1.872292,"s":[170.15],"i":{"x":0.585,"y":0.69},"o":{"x":0.258,"y":0.357}},{"t":3.748465,"s":[200.34],"i":{"x":0.586,"y":0.699},"o":{"x":0.259,"y":0.366}},{"t":7.503875,"s":[232.22],"i":{"x":0.586,"y":0.713},"o":{"x":0.259,"y":0.381}},{"t":15.005773,"s":[263.7],"i":{"x":0.587,"y":0.741},"o":{"x":0.259,"y":0.411}},{"t":30,"s":[291.3],"i":{"x":0.628,"y":0.768},"o":{"x":0.286,"y":0.488}},{"t":60,"s":[311.6],"i":{"x":0.699,"y":0.605},"o":{"x":0.346,"y":0.344}},{"t":90,"s":[324.38],"i":{"x":0.715,"y":0.561},"o":{"x":0.37,"y":0.251}},{"t":105,"s":[336.74],"i":{"x":0.741,"y":0.618},"o":{"x":0.413,"y":0.285}},{"t":112.493217,"s":[350.5],"i":{"x":0.741,"y":0.636},"o":{"x":0.414,"y":0.303}},{"t":116.236934,"s":[364.32],"i":{"x":0.741,"y":0.645},"o":{"x":0.414,"y":0.312}},{"t":118.107494,"s":[377.2],"i":{"x":0.744,"y":0.651},"o":{"x":0.418,"y":0.318}},{"t":119.063474,"s":[389.07],"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"t":119.532358,"s":[399.45],"i":{"x":0.878,"y":0.625},"o":{"x":1,"y":0.292}},{"t":120,"s":[450],"h":1},{"t":240,"s":[450],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[70,70],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":120,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[100,100],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":47,"ty":4,"parent":46,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":46,"ty":3,"parent":45,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":120,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.9,0.9]}},{"t":183,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":216.06,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":45,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":50,"ty":4,"parent":49,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":49,"ty":3,"parent":48,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":126,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.72,0.72]}},{"t":187.44,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":189,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":219,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":48,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":53,"ty":4,"parent":52,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":52,"ty":3,"parent":51,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":132.12,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.54,0.54]}},{"t":191.52,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":195.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":221.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":51,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":56,"ty":4,"parent":55,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":55,"ty":3,"parent":54,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,10]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":137.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.36,0.36]}},{"t":195.72,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":200.94,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":225,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":54,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":59,"ty":4,"parent":58,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":58,"ty":3,"parent":57,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":143.82,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0.18,0.18]}},{"t":199.68,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":207.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":228,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":57,"ty":3,"parent":44,"ks":{"p":{"a":0,"k":[50,0]}},"ip":0,"op":241,"st":0},{"ind":62,"ty":4,"parent":61,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":61,"ty":3,"parent":60,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":149.88,"s":[0,0],"i":{"x":[0,0],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":204.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":213.12,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":230.94,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":60,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":45}},"ip":0,"op":241,"st":0},{"ind":65,"ty":4,"parent":64,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":64,"ty":3,"parent":63,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":155.88,"s":[0,0],"i":{"x":[0.06,0.06],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":208.08,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":219.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":234.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":63,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":90}},"ip":0,"op":241,"st":0},{"ind":68,"ty":4,"parent":67,"ks":{},"ip":0,"op":241,"st":0,"shapes":[{"ty":"el","p":{"a":0,"k":[10,10]},"s":{"a":0,"k":[20,20]}},{"ty":"fl","c":{"a":0,"k":[1,1,1]},"o":{"a":0,"k":100}}]},{"ind":67,"ty":3,"parent":66,"ks":{"a":{"a":0,"k":[10,10]},"p":{"a":0,"k":[10,110]},"s":{"a":1,"k":[{"t":0,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":162,"s":[0,0],"i":{"x":[0.12,0.12],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":212.4,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":225.24,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[1,1],"y":[0,0]}},{"t":237.12,"s":[0,0],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":240,"s":[0,0],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":66,"ty":3,"parent":44,"ks":{"a":{"a":0,"k":[10,60]},"p":{"a":0,"k":[60,60]},"r":{"a":0,"k":135}},"ip":0,"op":241,"st":0},{"ind":44,"ty":3,"parent":1,"ks":{"a":{"a":0,"k":[60,60]},"p":{"a":0,"k":[180,180]},"r":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":120,"s":[0],"i":{"x":0,"y":0.691},"o":{"x":0,"y":0.358}},{"t":120.06,"s":[17.95],"i":{"x":0.113,"y":0.857},"o":{"x":0.017,"y":0.588}},{"t":150.045,"s":[83.52],"i":{"x":0.649,"y":0.696},"o":{"x":0.298,"y":0.432}},{"t":180.03,"s":[90.83],"i":{"x":0.975,"y":0.245},"o":{"x":0.804,"y":0.109}},{"t":240,"s":[184.05],"h":1}]},"s":{"a":1,"k":[{"t":0,"s":[100,100],"i":{"x":[1,1],"y":[1,1]},"o":{"x":[0,0],"y":[0,0]}},{"t":119.76,"s":[100,100],"i":{"x":[1,1],"y":[0.1,0.1]},"o":{"x":[1,1],"y":[0,0]}},{"t":240,"s":[50,50],"h":1}]}},"ip":0,"op":241,"st":0},{"ind":1,"ty":3,"parent":0,"ks":{},"ip":0,"op":241,"st":0},{"ind":0,"ty":3,"ks":{},"ip":0,"op":241,"st":0}]'),Lf={g:"https://jitter.video"},Df=240,Af="5.7.4",_f=360,Of={assets:Rf,fr:Tf,h:Mf,ip:Pf,layers:zf,meta:Lf,op:Df,v:Af,w:_f};function Ef(){return n.jsxs("span",{className:"relative block w-5 h-5 shrink-0 overflow-hidden -translate-x-0.5","aria-hidden":!0,children:[n.jsx("span",{className:"absolute inset-0 w-5 h-5 thinking-light",children:n.jsx("span",{className:"absolute left-1/2 top-1/2",style:{transform:"translate(-50%, -50%) scale(1.8)"},children:n.jsx(ds,{animationData:If,loop:!0,autoplay:!0,style:{width:20,height:20}})})}),n.jsx("span",{className:"absolute inset-0 w-5 h-5 thinking-dark",children:n.jsx("span",{className:"absolute left-1/2 top-1/2",style:{transform:"translate(-50%, -50%) scale(1.8)"},children:n.jsx(ds,{animationData:Of,loop:!0,autoplay:!0,style:{width:20,height:20}})})}),n.jsx("style",{children:`
|
|
253
253
|
.thinking-light { display: block; }
|
|
254
254
|
.thinking-dark { display: none; }
|
|
255
255
|
html[data-theme="dark"] .thinking-light, html[data-theme="classic-dark"] .thinking-light { display: none; }
|
|
256
256
|
html[data-theme="dark"] .thinking-dark, html[data-theme="classic-dark"] .thinking-dark { display: block; }
|
|
257
|
-
`})]})}function _s(e){return t.jsx(Cs,{loader:t.jsx(Kp,{}),...e})}_s.displayName="ThinkingIndicator";function xl(e){return t.jsx(zp,{...e,thinkingIndicator:e.thinkingIndicator??t.jsx(_s,{text:"Spark is thinking..."})})}xl.displayName="Response";const _e=xl;_e.Root=ta;_e.Thinking=Ms;_e.Steps=Ps;_e.Step=As;_e.Content=Ds;_e.ImageGenerating=oa;_e.DefaultLayout=ia;const Yp=_e,fl=u.forwardRef(({children:e,className:a,maxWidth:s="752px",...n},r)=>{const o=i("w-full","bg-sage-bg","rounded-lg","p-3","text-sm leading-sm","font-normal","text-text",a);return t.jsx("div",{ref:r,className:o,style:{maxWidth:typeof s=="number"?`${s}px`:s},...n,children:e})});fl.displayName="UserMessage";const ln="w-5 h-5 text-text-secondary",hl=u.forwardRef(({filename:e,iconFilename:a,size:s,icon:n,getFileIcon:r,onClick:o,className:l,...c},d)=>{const p=n??(r?r(a??e,ln):t.jsx(Fa,{className:ln}));return t.jsxs("div",{ref:d,role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o,onKeyDown:o?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),o())}:void 0,className:i("flex flex-row items-center gap-4 w-full max-w-96","py-5 px-5 rounded-lg","bg-bg-base border border-border-tertiary","text-sm leading-sm","transition-colors cursor-pointer hover:border-border-secondary",l),...c,children:[t.jsx("div",{className:i("flex items-center justify-center w-10 h-10 shrink-0 rounded-md","bg-fill-tertiary"),children:p}),t.jsxs("div",{className:"flex flex-row items-center gap-3 min-w-0",children:[t.jsx("span",{className:"font-medium text-text truncate",children:e}),s!=null&&s!==""&&t.jsxs("span",{className:"shrink-0 text-text-tertiary",children:["(",s,")"]})]})]})});hl.displayName="FileCard";function Xp({className:e}){return t.jsxs("svg",{className:e,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[t.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),t.jsx("polyline",{points:"14 2 14 8 20 8"}),t.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),t.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),t.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function gl(e,a){return t.jsx(Xp,{className:a})}const yl=u.forwardRef((e,a)=>{const{getFileIcon:s}=pt(),n=s??((r,o)=>gl(r,o));return t.jsx(hl,{ref:a,getFileIcon:n,...e})});yl.displayName="FileCard";const cn="h-3.5 w-3.5 shrink-0 text-current",bl=u.forwardRef(({filename:e,iconFilename:a,onRemove:s,icon:n,getFileIcon:r,className:o,...l},c)=>{const m=n??(r?r(a??e,cn):t.jsx(Fa,{className:cn})),{color:p,...x}=l;return t.jsx(os,{ref:c,appearance:"filled",color:"mauve",closable:typeof s=="function",onClose:s,closeAriaLabel:"移除",className:o,...x,children:t.jsxs("span",{className:"inline-flex items-center gap-1.5 shrink-0",children:[m,e]})})});bl.displayName="FileAttachment";const vl=u.forwardRef((e,a)=>{const{getFileIcon:s}=pt(),n=s??((r,o)=>gl(r,o));return t.jsx(bl,{ref:a,getFileIcon:n,...e})});vl.displayName="FileAttachment";const Jp={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20"},ex="max-w-[90vw] max-h-[90vh] object-contain",tx="h-2.5 w-2.5 text-text-secondary",ax="h-4 w-4 text-text-secondary",wl=u.forwardRef(({src:e,alt:a="",onRemove:s,previewable:n=!0,onClick:r,size:o="sm",className:l,closeIcon:c,closeLargeIcon:d,...m},p)=>{const[x,g]=u.useState(!1),v=c??t.jsx(Ce,{className:tx}),f=d??t.jsx(er,{className:ax}),b=typeof s=="function",h=u.useCallback(()=>{n&&g(!0)},[n]),w=u.useCallback(()=>g(!1),[]),j=u.useCallback(S=>{r?.(S),!S.defaultPrevented&&n&&h()},[r,n,h]),k=u.useCallback(S=>{S.stopPropagation(),s?.(S)},[s]);u.useEffect(()=>{if(!x)return;const S=P=>{P.key==="Escape"&&w()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[x,w]);const T=x&&typeof document<"u"?Cn.createPortal(t.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-bg-mask",role:"dialog","aria-modal":"true","aria-label":"图片预览",onClick:S=>{S.target===S.currentTarget&&w()},onKeyDown:S=>S.key==="Escape"&&w(),children:[t.jsx("img",{src:e,alt:a,className:i("rounded-lg shadow-xl",ex),onClick:S=>S.stopPropagation(),draggable:!1}),t.jsx(Ne,{variant:"tertiary",size:"md",rounded:"pill",icon:f,onClick:w,"aria-label":"关闭预览",className:"absolute top-4 right-4 bg-bg-base border border-border-tertiary shadow-sm"})]}),document.body):null;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:p,role:n?"button":void 0,tabIndex:n?0:void 0,className:i("relative group shrink-0",n&&"cursor-pointer",l),onClick:j,onKeyDown:n?S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())}:void 0,...m,children:[t.jsx("img",{src:e,alt:a,className:i("rounded-lg object-cover border border-border-tertiary",Jp[o]),draggable:!1}),b&&t.jsx("button",{type:"button",onClick:k,"aria-label":"移除",className:"absolute -top-0.5 -right-0.5 flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-bg-base border border-border-tertiary shadow-sm opacity-0 group-hover:opacity-100 transition-opacity hover:bg-fill-secondary",children:v})]}),T]})});wl.displayName="ImageAttachment";const sx="h-2.5 w-2.5 text-text-secondary",nx="h-4 w-4 text-text-secondary",kl=u.forwardRef((e,a)=>{const s=N("close",sx),n=N("closeLarge",nx);return t.jsx(wl,{ref:a,closeIcon:s,closeLargeIcon:n,...e})});kl.displayName="ImageAttachment";const jl="w-3.5 h-3.5 text-text-tertiary",Nl="w-3.5 h-3.5 transition-transform duration-200 ease-in-out";function Cl(e){const a=N("eye",jl),s=N("arrowRight",Nl);return t.jsx(sa,{eyeIcon:a,arrowRightIcon:s,...e})}Cl.displayName="ReasoningStepRoot";function Sl(e){const a=N("eye",jl),s=N("arrowRight",Nl);return t.jsx(Ht,{eyeIcon:a,arrowRightIcon:s,...e})}Sl.displayName="ReasoningStep";const Nt=Sl;Nt.Root=Cl;Nt.Header=na;Nt.Details=ra;Nt.DetailRow=zs;const rx=Nt,Es="size-[1em] shrink-0",ox=`${Es} text-text-tertiary`,ix=`${Es} text-success`,lx=`${Es} text-text-tertiary`,cx="w-3.5 h-3.5 text-text-tertiary transition-all duration-200",Il=u.memo(function({toolName:a,params:s,status:n,response:r,defaultExpanded:o=!1,statusText:l,className:c,timeIcon:d,checkboxCircleIcon:m,closeCircleIcon:p,arrowDownIcon:x,arrowRightIcon:g,runningText:v="Running",ranText:f="Ran",failedText:b="Failed",responseLabel:h="Response"}){const[w,j]=u.useState(o),k=r!=null&&r.length>0,T=n==="running",S=n==="success",P=n==="error",I=l!==void 0?l:T?v:S?f:b,_=I!=="",ne=d??t.jsx(or,{className:ox}),D=m??t.jsx(Qt,{className:ix}),q=p??t.jsx(ir,{className:lx}),ie=x??g??t.jsx(be,{className:cx});return t.jsxs("div",{className:i("flex flex-col",c),children:[t.jsxs("div",{onClick:()=>k&&!T&&j(!w),className:i("group flex items-center gap-1.5 min-h-5",k&&!T&&"cursor-pointer hover:opacity-80 transition-opacity"),children:[t.jsxs("div",{className:"shrink-0 flex items-center justify-center text-xs",children:[T&&ne,S&&D,P&&q]}),_&&t.jsx("span",{className:"text-xs leading-xs text-text-tertiary shrink-0",children:I}),t.jsx("span",{className:"text-xs leading-xs text-text-secondary shrink-0",children:a}),s!=null&&s!==""&&t.jsx("span",{className:"text-xs leading-xs text-text-tertiary min-w-0 shrink truncate",title:s,children:s}),k&&!T&&t.jsx("div",{className:i("shrink-0 inline-flex items-center justify-center","opacity-0 group-hover:opacity-100",w&&"!opacity-100",w?"rotate-180":"rotate-0"),children:ie})]}),k&&w&&t.jsxs("div",{className:"mt-1 ml-4.5 rounded-md border border-border-tertiary bg-bg-base overflow-hidden font-mono text-xs leading-xs",children:[t.jsx("div",{className:"text-text-tertiary px-2 pt-1 pb-0 leading-xs",children:h}),t.jsx(ve,{scrollbarVisibility:"auto",maxHeight:208,className:"px-2 pb-1 leading-xs",children:t.jsx("pre",{className:i("whitespace-pre-wrap break-words leading-xs",P?"text-error":"text-text-tertiary"),children:r})})]})]})});Il.displayName="ToolInvocationCard";const dx="size-[1em] text-text-tertiary",ux="size-[1em] text-success",mx="size-[1em] text-text-tertiary",px="w-3.5 h-3.5 text-text-tertiary transition-all duration-200",Rl=u.memo(function(a){const{t:s}=In.useTranslation(),n=N("time",dx),r=N("checkboxCircle",ux),o=N("closeCircle",mx),l=N("arrowDownS",px);return t.jsx(Il,{timeIcon:n,checkboxCircleIcon:r,closeCircleIcon:o,arrowDownIcon:l,runningText:s("tools.status.running","Running"),ranText:s("tools.status.ran","Ran"),failedText:s("tools.status.failed","Failed"),...a})});Rl.displayName="ToolInvocationCard";const xx=80;function dn(e){if(!e)return{};const{label:a,...s}=e;return s}const fx="Permission required",hx="This action requires your permission.",gx="Expand",yx="Collapse",bx=", ",zl=u.forwardRef(({title:e,description:a,command:s,commandIntent:n,isLoadingIntent:r=!1,onClose:o,actions:l,className:c,closeIcon:d,warningIcon:m,expandLabel:p=gx,collapseLabel:x=yx,commaLabel:g=bx,...v},f)=>{const b=e??fx,h=a??hx,w=s.length>xx,[j,k]=u.useState(!w),T=d??t.jsx(Ce,{className:"h-3.5 w-3.5"}),S=m??t.jsx(mt,{className:"h-4 w-4"});return t.jsxs("div",{ref:f,className:i("relative rounded-lg border border-border-tertiary bg-bg-base p-3",c),...v,children:[o&&t.jsx("button",{type:"button",onClick:o,className:"absolute top-3 right-3 flex h-4 w-4 cursor-pointer items-center justify-center text-text-secondary transition-colors duration-200 hover:text-text","aria-label":"Close",children:T}),t.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[t.jsx("div",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-warning",children:S}),t.jsx("h3",{className:"min-w-0 flex-1 text-base leading-base font-semibold text-text",children:b})]}),t.jsx("p",{className:"mb-2 ml-6 text-xs leading-xs text-text-tertiary",children:r?t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[t.jsx("div",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-text-tertiary border-t-transparent"}),t.jsx("span",{children:h})]}):t.jsxs(t.Fragment,{children:[h,n&&t.jsxs("span",{children:[g,n]})]})}),t.jsx("div",{className:"mb-4 ml-6",children:t.jsxs("div",{className:"rounded p-2 bg-fill-tertiary",children:[j||!w?t.jsx("div",{title:s,children:t.jsx(ve,{scrollbarVisibility:"auto",maxHeight:240,className:"text-xs leading-xs font-medium text-text break-all",style:{fontFamily:"Fira Code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},children:s})}):t.jsx("div",{className:"text-xs leading-xs font-medium text-text break-all line-clamp-2 overflow-hidden",style:{fontFamily:"Fira Code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},title:s,children:s}),w&&t.jsx("button",{type:"button",onClick:()=>k(!j),className:"mt-1 flex items-center gap-1 text-xs leading-xs text-text-tertiary hover:text-text transition-colors",children:j?x:p})]})}),t.jsxs("div",{className:"flex items-center justify-end gap-2",children:[l?.deny&&t.jsx(W,{variant:"ghost",...dn(l.deny),children:l.deny.label}),l?.allowOnce&&t.jsx("button",{type:"button",className:i("rounded-full inline-flex items-center justify-center","px-3 py-1 text-sm leading-sm font-medium","text-text-on-primary bg-error","cursor-pointer hover:opacity-90 active:opacity-95 transition-opacity","disabled:opacity-50 disabled:cursor-not-allowed"),...dn(l.allowOnce),children:l.allowOnce.label})]})]})});zl.displayName="PermissionCard";const Tl=u.forwardRef((e,a)=>{const{t:s}=In.useTranslation(),n=N("close","h-3.5 w-3.5"),r=N("warning","h-4 w-4");return t.jsx(zl,{ref:a,...e,closeIcon:n,warningIcon:r,title:e.title??s("permission.title"),description:e.description??s("permission.description.default",{toolName:"Tool"}),expandLabel:s("permission.expand"),collapseLabel:s("permission.collapse"),commaLabel:s("common.comma")})});Tl.displayName="PermissionCard";const vx="h-5 w-5 text-text-on-primary";function Ll(e){const a=N("sparkling",vx);return t.jsx(Ls,{sparklingIcon:a,...e})}Ll.displayName="ImageGenerating";const Ml=u.memo(function({children:a,className:s="",gridClassName:n="",isGenerating:r=!1,maxVisibleWhenGenerating:o=6,formatRemaining:l=c=>`+${c}`}){const c=u.Children.toArray(a),d=c.length,m=r&&d>o,p=m?o:d,x=d-o+1,v=c.slice(0,p).map((f,b)=>m&&b===p-1&&u.isValidElement(f)?u.cloneElement(f,{showOverlay:!0,overlayText:l(x)}):f);return t.jsx("div",{className:i("mt-5 mb-2",s),children:t.jsx("div",{className:i("flex flex-wrap gap-3",n),children:v})})});Ml.displayName="GeneratedImagesGrid";const wx={multiSelect:"Multi-select",singleSelect:"Single-select",questionHeader:"Question",skipAll:"Skip All",continue:"Continue",submit:"Submit",sending:"Sending...",customInputPlaceholder:"Other (please specify)",recommend:"Recommend"},kx="[No preference]",Fs=u.createContext(null);Fs.displayName="UserQuestionContext";function Ct(){const e=u.useContext(Fs);if(!e)throw new Error("UserQuestion compound components must be used within UserQuestion.Root");return e}const jx=t.jsx(rr,{className:"w-4 h-4 shrink-0 text-text-tertiary"}),Nx=t.jsx(Ea,{}),Cx=t.jsx(be,{}),Sx=t.jsx($a,{className:"w-4 h-4 mr-1"}),la=u.forwardRef(function({questions:a,resetKey:s,onAnswer:n,onSkip:r,hasCustomText:o=!1,labels:l,chat4Icon:c=jx,arrowUpSIcon:d=Nx,arrowDownSIcon:m=Cx,sparklingIcon:p=Sx,children:x},g){const v={...wx,...l},[f,b]=u.useState(0),[h,w]=u.useState({}),[j,k]=u.useState({}),[T,S]=u.useState(0),[P,A]=u.useState(!1),[I,_]=u.useState(void 0),ne=u.useRef(s),D=u.useRef(null),q=u.useRef(new Map),ie=u.useRef(f),X=u.useRef(!1),G=u.useRef(!1),ae=u.useRef(new Map),le=u.useRef(f),C=a[f],O=C?.options||[],J=a.every(L=>(h[L.question]||[]).length>0||(j[L.question]?.trim()||"").length>0),ue=(h[C?.question]||[]).length>0||(j[C?.question]?.trim()||"").length>0,U=u.useCallback(L=>{const M=a[L];if(!M)return 0;const B=h[M.question]||[];if(B.length===0)return 0;const te=(M.options||[]).findIndex(fe=>B.includes(fe.label));return te>=0?te:0},[a,h]);u.useImperativeHandle(g,()=>({getAnswers:()=>{const L={};for(const M of a){const B=h[M.question]||[],ee=j[M.question]?.trim(),te=[];B.length>0&&te.push(...B),ee&&te.push(ee),te.length>0&&(L[M.question]=te.join(", "))}return L}}),[h,j,a]),u.useEffect(()=>{ne.current!==s&&(ne.current=s,q.current.clear(),ae.current.clear(),ie.current=0,requestAnimationFrame(()=>{A(!1),b(0),w({}),k({}),S(0)}))},[s]),u.useEffect(()=>{if(le.current!==f){if(ie.current=f,G.current){X.current=!0;const L=q.current.get(f),M=D.current;if(L&&M){const B=()=>{X.current=!1,G.current=!1,M.removeEventListener("scrollend",B)};M.addEventListener("scrollend",B,{once:!0}),L.scrollIntoView({behavior:"smooth",block:"nearest"})}else X.current=!1,G.current=!1}le.current=f}},[f]),u.useEffect(()=>{const L=setTimeout(()=>{let M=0;q.current.forEach(B=>{const ee=B.getBoundingClientRect().height;ee>M&&(M=ee)}),M>0&&_(M)},50);return()=>clearTimeout(L)},[a,s]),u.useEffect(()=>{const L=D.current;if(!L)return;const M=new IntersectionObserver(B=>{if(X.current)return;let ee=0,te=ie.current;B.forEach(fe=>{fe.isIntersecting&&fe.intersectionRatio>ee&&(ee=fe.intersectionRatio,q.current.forEach((Vs,ha)=>{Vs===fe.target&&(te=ha)}))}),te!==ie.current&&ee>.5&&(ie.current=te,b(te),S(U(te)))},{root:L,threshold:[0,.25,.5,.75,1]});return q.current.forEach(B=>{B?.isConnected&&M.observe(B)}),()=>M.disconnect()},[a,U]);const Q=u.useCallback((L,M,B)=>{const te=a[B]?.multiSelect??!1,fe=B===a.length-1,ha=(h[L]||[]).includes(M);w(ke=>{const It=ke[L]||[];return te?It.includes(M)?{...ke,[L]:It.filter(ic=>ic!==M)}:{...ke,[L]:[...It,M]}:It.includes(M)?{...ke,[L]:[]}:{...ke,[L]:[M]}}),te||k(ke=>({...ke,[L]:""})),!te&&!fe&&!ha&&setTimeout(()=>{const ke=B+1;G.current=!0,b(ke),S(U(ke))},150)},[a,h,U]),me=u.useCallback(()=>{if(f>0){const L=f-1;G.current=!0,b(L),S(U(L))}},[f,U]),we=u.useCallback(()=>{if(f<a.length-1){const L=f+1;G.current=!0,b(L),S(U(L))}},[f,a.length,U]),Ue=u.useCallback(()=>{if(!P)if(J){A(!0);const L={};for(const M of a){const B=h[M.question]||[],ee=j[M.question]?.trim(),te=[];B.length>0&&te.push(...B),ee&&te.push(ee),L[M.question]=te.join(", ")}n(L)}else{const L=ee=>(h[ee.question]||[]).length===0&&(j[ee.question]?.trim()||"").length===0,M=a.length;let B=-1;for(let ee=1;ee<M;ee++){const te=(f+ee)%M;if(L(a[te])){B=te;break}}B>=0&&(G.current=!0,b(B),S(U(B)))}},[P,J,a,h,j,f,n,U]),re=u.useCallback(()=>{if(P)return;A(!0);const L={};for(const M of a){const B=h[M.question]||[],ee=j[M.question]?.trim();if(B.length>0||!!ee){const fe=[];B.length>0&&fe.push(...B),ee&&fe.push(ee),L[M.question]=fe.join(", ")}else L[M.question]=kx}n(L),r()},[P,a,h,j,n,r]),Qe=u.useCallback(()=>{if(P)return;const L={};for(const M of a){const B=M.options?.[0];B&&(L[M.question]=[B.label])}w(L),k({}),G.current=!0,b(a.length-1),S(0),setTimeout(()=>{D.current&&D.current.scrollTo({top:D.current.scrollHeight,behavior:"smooth"})},50)},[P,a]),Re=u.useCallback(L=>{G.current=L},[]),ze={questions:a,labels:v,currentQuestionIndex:f,setCurrentQuestionIndex:b,answers:h,setAnswers:w,customInputs:j,setCustomInputs:k,focusedOptionIndex:T,setFocusedOptionIndex:S,isSubmitting:P,setIsSubmitting:A,maxQuestionHeight:I,scrollContainerRef:D,questionRefs:q,setShouldScrollToQuestion:Re,customInputRefs:ae,currentQuestion:C,currentOptions:O,allQuestionsAnswered:J,currentQuestionHasAnswer:ue,getSelectedOptionIndex:U,handleOptionClick:Q,handlePrevious:me,handleNext:we,handleContinue:Ue,handleSkip:re,handleRecommend:Qe,chat4Icon:c,arrowUpSIcon:d,arrowDownSIcon:m,sparklingIcon:p,hasCustomText:o};return a.length===0?null:t.jsx(Fs.Provider,{value:ze,children:x})});la.displayName="UserQuestionRoot";function ca({className:e}){const a=Ct();return t.jsxs("div",{className:i("flex items-center justify-between mb-2 -mt-2 px-3 pt-2 pb-2 rounded-t-xl bg-fill-tertiary",e),children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[a.chat4Icon,t.jsx("span",{className:"text-xs leading-xs text-text-tertiary",children:a.currentQuestion?.header||a.labels.questionHeader}),t.jsx("span",{className:"text-text-tertiary/50",children:"•"}),t.jsx("span",{className:"text-xs leading-xs text-text-tertiary",children:a.currentQuestion?.multiSelect?a.labels.multiSelect:a.labels.singleSelect})]}),a.questions.length>1&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(Ne,{size:"sm",variant:"ghost",onClick:a.handlePrevious,disabled:a.currentQuestionIndex===0,icon:a.arrowUpSIcon}),t.jsxs("span",{className:"text-xs leading-xs text-text-tertiary px-1",children:[a.currentQuestionIndex+1," / ",a.questions.length]}),t.jsx(Ne,{size:"sm",variant:"ghost",onClick:a.handleNext,disabled:a.currentQuestionIndex===a.questions.length-1,icon:a.arrowDownSIcon})]})]})}ca.displayName="UserQuestionHeader";function da({question:e,qIndex:a,className:s}){const n=Ct(),r=e.options||[],[o,l]=u.useState(!1),c=!!n.customInputs[e.question]?.trim(),d=o||c,m=a===n.currentQuestionIndex;return t.jsxs("div",{ref:p=>{p?n.questionRefs.current.set(a,p):n.questionRefs.current.delete(a)},className:i("transition-opacity duration-200",m?"opacity-100":"opacity-40",s),children:[t.jsxs("div",{className:"flex items-start gap-3 pl-2 mb-3",children:[t.jsxs("div",{className:"flex-shrink-0 w-5 flex items-center justify-center text-sm leading-sm font-medium text-text-tertiary",children:[a+1,"."]}),t.jsx("div",{className:"text-sm leading-sm font-medium text-text min-w-0 flex-1",children:e.question})]}),t.jsx(_a,{items:r.map(p=>({id:p.label,label:p.label,description:p.description})),selectedIds:n.answers[e.question]?.map(p=>p)||[],focusedId:m?r[n.focusedOptionIndex]?.label:void 0,disabled:n.isSubmitting||!m,onItemClick:(p,x)=>{if(!m){n.setCurrentQuestionIndex(a),n.setFocusedOptionIndex(n.getSelectedOptionIndex(a));return}n.handleOptionClick(e.question,p.label,a),n.setFocusedOptionIndex(x)}}),e.allowCustomInput!==!1&&t.jsxs("div",{className:i("w-full flex gap-3 pl-2 mt-3 transition-colors",!m&&"opacity-40",n.isSubmitting&&"opacity-50"),children:[t.jsx("div",{className:i("flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-xs leading-xs font-medium transition-colors",m&&n.focusedOptionIndex===r.length||n.customInputs[e.question]?.trim()?"bg-primary-active text-text-on-primary":"bg-fill-secondary text-text-tertiary"),children:r.length+1}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[t.jsx("div",{className:"h-5 flex items-center",children:t.jsx("input",{ref:p=>{p?n.customInputRefs.current.set(e.question,p):n.customInputRefs.current.delete(e.question)},type:"text",value:n.customInputs[e.question]||"",style:{outline:"none",outlineOffset:0,boxShadow:"none",border:"none"},onChange:p=>{const x=p.target.value;n.setCustomInputs(g=>({...g,[e.question]:x})),!e.multiSelect&&x.trim()&&n.setAnswers(g=>({...g,[e.question]:[]}))},onFocus:()=>{l(!0),m&&(n.setFocusedOptionIndex(r.length),e.multiSelect||n.setAnswers(p=>({...p,[e.question]:[]})))},onBlur:()=>l(!1),onKeyDown:p=>{if(p.key==="Enter"&&!p.shiftKey){p.preventDefault(),p.stopPropagation();const x=n.customInputs[e.question]?.trim();if((n.answers[e.question]||[]).length>0||!!x)if(n.allQuestionsAnswered)n.handleContinue();else if(a<n.questions.length-1){const f=a+1;n.setShouldScrollToQuestion(!0),n.setCurrentQuestionIndex(f),n.setFocusedOptionIndex(0)}else n.handleContinue()}},placeholder:n.labels.customInputPlaceholder,disabled:n.isSubmitting||!m,className:i("w-full h-full py-0 bg-transparent text-sm leading-sm font-medium text-text","placeholder:text-text-tertiary placeholder:font-normal","border-0 rounded-none outline-none outline-offset-0","focus:outline-none focus:outline-offset-0","focus-visible:outline-none focus-visible:outline-offset-0","ring-0 focus:ring-0 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none","disabled:cursor-not-allowed")})}),t.jsx("div",{className:"mt-1.5 overflow-hidden origin-left transition-[width] duration-200 ease-out",style:{width:d?"100%":"0%"},"aria-hidden":!0,children:t.jsx("div",{className:"h-px bg-[var(--color-border-tertiary)]"})})]})]})]},e.question)}da.displayName="UserQuestionCard";function ua({className:e,children:a}){const s=Ct(),{scrollContainerRef:n,maxQuestionHeight:r,questions:o}=s;return t.jsx(ve,{ref:n,scrollbarVisibility:"auto",maxHeight:r||void 0,className:i("scroll-smooth",e),children:t.jsx("div",{className:"space-y-4 px-3",children:a??o.map((l,c)=>t.jsx(da,{question:l,qIndex:c},l.question))})})}ua.displayName="UserQuestionCards";function ma({className:e}){const a=Ct();return t.jsxs("div",{className:i("flex items-center justify-between px-3 py-2",e),children:[t.jsxs(W,{variant:"ghost",size:"sm",onClick:a.handleRecommend,disabled:a.isSubmitting,children:[a.sparklingIcon,a.labels.recommend]}),t.jsxs("div",{className:"flex items-center gap-2",children:[!a.allQuestionsAnswered&&t.jsx(W,{variant:"ghost",size:"sm",onClick:a.handleSkip,disabled:a.isSubmitting,children:a.labels.skipAll}),t.jsx(W,{size:"sm",variant:"secondary",onClick:a.handleContinue,disabled:a.isSubmitting||a.hasCustomText||!a.allQuestionsAnswered,children:a.isSubmitting?a.labels.sending:t.jsxs(t.Fragment,{children:[a.allQuestionsAnswered?a.labels.submit:a.labels.continue,t.jsx("span",{className:"opacity-70",children:" ↵"})]})})]})]})}ma.displayName="UserQuestionFooter";function pa(){return t.jsxs(V.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.16,1,.3,1]},className:i("border rounded-t-xl border-b-0 border-border border-border-tertiary bg-bg-base overflow-hidden pt-2 pb-2"),children:[t.jsx(ca,{}),t.jsx(ua,{}),t.jsx(ma,{})]})}pa.displayName="UserQuestionDefaultLayout";function Ix(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e?.getAttribute("contenteditable")==="true"}function Rx({isSubmitting:e,currentQuestion:a,currentOptions:s,currentQuestionIndex:n,questions:r,focusedOptionIndex:o,setFocusedOptionIndex:l,currentQuestionHasAnswer:c,getSelectedOptionIndex:d,setShouldScrollToQuestion:m,setCurrentQuestionIndex:p,handleOptionClick:x,handleContinue:g}){u.useEffect(()=>{const v={ArrowDown(b){if(b.preventDefault(),o<s.length-1)l(o+1);else if(n<r.length-1){const h=n+1;m(!0),p(h),l(d(h))}},ArrowUp(b){if(b.preventDefault(),o>0)l(o-1);else if(n>0){const h=n-1;m(!0),p(h),l(d(h))}},Enter(b){b.preventDefault(),c?g():a&&s[o]&&x(a.question,s[o].label,n)}},f=b=>{if(e||Ix(document.activeElement))return;const h=v[b.key];if(h){h(b);return}if(b.key>="1"&&b.key<="9"){const w=parseInt(b.key,10)-1;w>=0&&w<s.length&&a&&(b.preventDefault(),x(a.question,s[w].label,n),l(w))}};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,a,s,n,r.length,o,l,c,d,p,x,g,m])}function zx(){const e=Ct();return Rx({isSubmitting:e.isSubmitting,currentQuestion:e.currentQuestion,currentOptions:e.currentOptions,currentQuestionIndex:e.currentQuestionIndex,questions:e.questions,focusedOptionIndex:e.focusedOptionIndex,setFocusedOptionIndex:e.setFocusedOptionIndex,currentQuestionHasAnswer:e.currentQuestionHasAnswer,getSelectedOptionIndex:e.getSelectedOptionIndex,setShouldScrollToQuestion:e.setShouldScrollToQuestion,setCurrentQuestionIndex:e.setCurrentQuestionIndex,handleOptionClick:e.handleOptionClick,handleContinue:e.handleContinue}),null}const Pl=u.forwardRef(function(a,s){return t.jsxs(la,{ref:s,...a,children:[t.jsx(zx,{}),t.jsx(pa,{})]})});Pl.displayName="UserQuestion";const Ge=Pl;Ge.Root=la;Ge.Header=ca;Ge.Card=da;Ge.Cards=ua;Ge.Footer=ma;Ge.DefaultLayout=pa;const Tx=Ge;function Lx(e,a){const s=N("chat4","w-4 h-4 shrink-0 text-text-tertiary"),n=N("arrowUpS"),r=N("arrowDownS"),o=N("sparkling","w-4 h-4 mr-1");return t.jsx(la,{ref:a,chat4Icon:s,arrowUpSIcon:n,arrowDownSIcon:r,sparklingIcon:o,...e})}const Al=u.forwardRef(Lx);Al.displayName="UserQuestionRoot";const Dl=u.forwardRef(function(a,s){const n=N("chat4","w-4 h-4 shrink-0 text-text-tertiary"),r=N("arrowUpS"),o=N("arrowDownS"),l=N("sparkling","w-4 h-4 mr-1");return t.jsx(Tx,{ref:s,chat4Icon:n,arrowUpSIcon:r,arrowDownSIcon:o,sparklingIcon:l,...a})});Dl.displayName="UserQuestion";const qe=Dl;qe.Root=Al;qe.Header=ca;qe.Card=da;qe.Cards=ua;qe.Footer=ma;qe.DefaultLayout=pa;const Mx=qe,Px={answer:"Answer",answers:"Answers"},Ax="w-4 h-4 shrink-0 text-text-tertiary",_l=u.memo(function({answers:a,showHeader:s=!0,labels:n,className:r="",questionAnswerIcon:o}){const l={...Px,...n},c=Object.entries(a),d=o??t.jsx(Jd,{className:Ax});return c.length===0?null:t.jsxs("div",{className:`rounded-lg border border-border-tertiary bg-bg-container overflow-hidden mx-2 ${r}`.trim(),children:[s&&t.jsxs("div",{className:"flex items-center gap-2 pl-3 pr-3 h-8 border-b border-border-tertiary",children:[d,t.jsx("span",{className:"text-xs leading-xs text-text-tertiary",children:c.length===1?l.answer:l.answers})]}),t.jsx("div",{className:"flex flex-col gap-3 p-3 text-xs leading-xs",children:c.map(([m,p],x)=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"font-medium text-text",children:m}),t.jsx("span",{className:"text-text-tertiary",children:p})]},x))})]})});_l.displayName="UserQuestionAnswer";const Dx="w-4 h-4 shrink-0 text-text-tertiary",El=u.memo(function(a){const s=N("questionAnswer",Dx);return t.jsx(_l,{questionAnswerIcon:s,...a})});El.displayName="UserQuestionAnswer";const _x={title:"In queue",sendNowTip:"Send now",removeTip:"Remove",fileLabel:"file",filesLabel:"files"},Ex="w-3.5 h-3.5",Fx="w-3.5 h-3.5",$x="w-4 h-4 text-text-tertiary transition-transform duration-200",Ox=u.memo(function({item:a,onRemove:s,onSendNow:n,labels:r,arrowUpIcon:o,closeIcon:l}){const c=u.useCallback(x=>{x.stopPropagation(),s?.(a.id)},[a.id,s]),d=u.useCallback(x=>{x.stopPropagation(),n?.(a.id)},[a.id,n]),m=a.attachmentCount??0,p=m===1?r.fileLabel:r.filesLabel;return t.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs leading-xs hover:bg-fill-tertiary transition-colors cursor-default",children:[t.jsx("span",{className:"truncate flex-1 text-text",children:a.label}),m>0&&t.jsxs("span",{className:"shrink-0 text-xs leading-xs text-text-tertiary",children:["+",m," ",p]}),t.jsxs("div",{className:"flex items-center gap-0.5",children:[n&&t.jsx(Ye,{content:r.sendNowTip,side:"top",children:t.jsx(Ne,{size:"sm",variant:"ghost",icon:o,"aria-label":r.sendNowTip,className:"shrink-0",onClick:d})}),s&&t.jsx(Ye,{content:r.removeTip,side:"top",children:t.jsx(Ne,{size:"sm",variant:"ghost",icon:l,"aria-label":r.removeTip,className:"shrink-0",onClick:c})})]})]})}),Fl=u.memo(function({items:a,onRemoveItem:s,onSendNow:n,isStreaming:r=!1,hasStatusCardBelow:o=!1,labels:l,defaultExpanded:c=!0,storageKey:d,arrowUpIcon:m,closeIcon:p,arrowDownSIcon:x}){const g={..._x,...l},v=m??t.jsx(Ea,{className:Ex}),f=p??t.jsx(Ce,{className:Fx}),b=x??t.jsx(be,{className:$x}),[h,w]=u.useState(()=>{if(typeof window>"u")return c;if(d){const k=localStorage.getItem(d);return k!==null?k==="true":c}return c});if(u.useEffect(()=>{d&&localStorage.setItem(d,String(h))},[d,h]),a.length===0)return null;const j=i("w-full overflow-hidden flex flex-col","border border-b-0 border-border border-border-tertiary bg-bg-base",!o&&"rounded-t-xl");return t.jsxs(V.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.16,1,.3,1]},className:j,children:[t.jsx("div",{role:"button",tabIndex:0,onClick:()=>w(!h),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),w(!h))},"aria-expanded":h,"aria-label":`${h?"Collapse":"Expand"} queue`,className:"flex items-center justify-between px-3 py-1 h-7 cursor-pointer bg-fill-tertiary hover:bg-fill-secondary transition-colors duration-150 focus:outline-none",children:t.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[t.jsx("span",{className:i("inline-flex items-center justify-center",!h&&"-rotate-90"),children:b}),t.jsx("span",{className:"text-xs leading-xs font-medium text-text-secondary",children:g.title})]})}),t.jsx(V.AnimatePresence,{initial:!1,children:h&&t.jsx(V.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.23,1,.32,1]},className:"overflow-hidden",children:t.jsx(ve,{scrollbarVisibility:"auto",maxHeight:208,className:"border-t border-border-tertiary scroll-smooth",children:a.map(k=>t.jsx(Ox,{item:k,onRemove:s,onSendNow:n,labels:g,arrowUpIcon:v,closeIcon:f},k.id))})})})]})});Fl.displayName="QueueIndicator";const Bx="w-3.5 h-3.5",Vx="w-3.5 h-3.5",Hx="w-4 h-4 text-text-tertiary transition-transform duration-200",$l=u.memo(function(a){const s=N("arrowUp",Bx),n=N("close",Vx),r=N("arrowDownS",Hx);return t.jsx(Fl,{arrowUpIcon:s,closeIcon:n,arrowDownSIcon:r,...a})});$l.displayName="QueueIndicator";const Gx={ariaLabel:"Conversation anchors",scrollTo:"Scroll to message"},Ol=u.memo(function({scrollContainerRef:a,items:s,onSelect:n,activeIndex:r,variant:o="bar",minItems:l=3,hidden:c=!1,labels:d,className:m,getAnchorElement:p,renderAnchor:x}){const g={...Gx,...d},v=Bl({scrollContainerRef:a,items:s,getAnchorElement:p,enabled:r===void 0&&!c}),f=r!==void 0?r:v,b=u.useCallback(w=>{const j=s[w];j&&n(w,j)},[s,n]),h=!c&&s.length>=l;return t.jsx(V.AnimatePresence,{mode:"wait",children:h&&t.jsx(V.motion.nav,{initial:{opacity:0,x:8},animate:{opacity:1,x:0,transition:{type:"spring",stiffness:500,damping:30,mass:.6}},exit:{opacity:0,x:8,transition:{duration:.15,ease:[.32,.72,0,1]}},className:i("absolute right-3 top-1/2 -translate-y-1/2 z-[40]","flex flex-col items-end gap-1.5 max-h-[80%] overflow-y-auto","scrollbar-hide",m),"aria-label":g.ariaLabel,children:s.map((w,j)=>t.jsx(qx,{item:w,index:j,isActive:j===f,variant:o,tooltipFallback:g.scrollTo,onClick:b,renderAnchor:x},w.id))},"spark-conversation-anchor-nav")})});Ol.displayName="ConversationAnchorNav";const qx=u.memo(function({item:a,index:s,isActive:n,variant:r,tooltipFallback:o,onClick:l,renderAnchor:c}){const d=u.useCallback(()=>l(s),[l,s]),m=c?c({item:a,index:s,isActive:n,variant:r}):null;return t.jsx(Ye,{content:a.summary||o,side:"left",contentClassName:"max-w-xs",children:t.jsx("button",{type:"button",onClick:d,className:i("group/spark-anchor flex cursor-pointer border-0 bg-transparent outline-none","focus-visible:ring-2 focus-visible:ring-[var(--color-link)] focus-visible:rounded-full",r==="punch"?"h-7 w-7 shrink-0 items-center justify-center p-0":"items-center justify-end p-1"),"aria-label":`${o} ${s+1}`,"aria-current":n?"true":void 0,"data-spark-anchor-nav-item":a.id,children:m??t.jsx("span",{className:i("block shrink-0 origin-center",r==="punch"?i("rounded-full transition-transform duration-300 ease-out",n?"h-2 w-2 bg-[var(--color-link)] group-hover/spark-anchor:scale-125":i("h-1.5 w-1.5 border border-solid border-border-tertiary bg-transparent","group-hover/spark-anchor:scale-150 group-hover/spark-anchor:border-[var(--color-link)]")):i("rounded-full transition-all duration-300 ease-out h-0.5",n?"w-4 bg-text-quaternary":"w-2.5 bg-border-tertiary","group-hover/spark-anchor:w-6 group-hover/spark-anchor:bg-text-quaternary"))})})})},(e,a)=>e.isActive===a.isActive&&e.variant===a.variant&&e.index===a.index&&e.item.id===a.item.id&&e.item.summary===a.item.summary&&e.tooltipFallback===a.tooltipFallback&&e.onClick===a.onClick&&e.renderAnchor===a.renderAnchor);function Bl({scrollContainerRef:e,items:a,getAnchorElement:s,enabled:n=!0}){const[r,o]=u.useState(0),l=u.useMemo(()=>a.map(d=>d.id).join("|"),[a]),c=u.useRef(s);return u.useEffect(()=>{c.current=s},[s]),u.useEffect(()=>{if(!n)return;const d=e.current;if(!d||a.length===0||typeof IntersectionObserver>"u")return;const m=(f,b)=>{const h=c.current;return h?h(f,b,d):d.querySelector(`[data-spark-anchor="${Ux(f.id)}"]`)},p=[];if(a.forEach((f,b)=>{const h=m(f,b);h&&p.push({index:b,el:h})}),p.length===0)return;const x=new WeakMap,g=()=>{let f=p[0]?.index??0,b=-1;for(const{index:h,el:w}of p){const j=x.get(w)??0;j>b&&(b=j,f=h)}o(h=>h===f?h:f)},v=new IntersectionObserver(f=>{for(const b of f)x.set(b.target,b.intersectionRatio);g()},{root:d,threshold:[0,.25,.5,.75,1]});return p.forEach(f=>v.observe(f.el)),()=>v.disconnect()},[n,e,a,l]),r}function Ux(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}const un="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Qx="font-['Seti'] shrink-0 inline-flex items-center justify-center w-4 h-4 text-[16px] leading-[16px]",Ra={javascript:"",typescript:"",react:"",json:"",html:"",css:"",python:"",java:"",go:"",rust:"",php:"",ruby:"",vue:"",svelte:"",markdown:"",yaml:"",xml:"",shell:"",sass:"",settings:"",default:""},mn={javascript:"var(--color-yellow)",typescript:"var(--color-blue)",react:"var(--color-blue)",json:"var(--color-yellow)",html:"var(--color-blue)",css:"var(--color-blue)",python:"var(--color-blue)",java:"var(--color-error)",go:"var(--color-blue)",rust:"var(--color-lavender)",php:"var(--color-purple)",ruby:"var(--color-error)",vue:"var(--color-success)",svelte:"var(--color-error)",markdown:"var(--color-blue)",yaml:"var(--color-purple)",xml:"var(--color-orange)",shell:"var(--color-success)",sass:"var(--color-error)",settings:"var(--color-lavender)",default:"var(--color-lavender)"},Pt={js:"javascript",jsx:"react",ts:"typescript",tsx:"typescript",json:"json",html:"html",css:"css",scss:"sass",sass:"sass",less:"css",py:"python",java:"java",go:"go",rs:"rust",php:"php",rb:"ruby",vue:"vue",svelte:"svelte",md:"markdown",yml:"yaml",yaml:"yaml",xml:"xml",sh:"shell",bash:"shell",zsh:"shell",config:"settings",conf:"settings"};function Vl(e,a){let s=null;if(a&&typeof a=="string"&&a.trim()){const n=a.lastIndexOf(".");if(n>0&&n<a.length-1){const r=a.substring(n+1).toLowerCase().trim();r&&Pt[r]&&(s=Pt[r])}}if(!s&&e&&typeof e=="string"&&e.trim()){const n=e.toLowerCase().trim();Pt[n]?s=Pt[n]:Ra[n]&&(s=n)}return s||"default"}function Wx(e,a){const s=Vl(e,a);return Ra[s]??Ra.default}function Zx(e,a){const s=Vl(e,a);return mn[s]??mn.default}function Hl({files:e=[],defaultExpanded:a=!0,className:s,headerIcon:n,acceptIcon:r,rejectIcon:o,getFileIcon:l}){const[c,d]=u.useState(null),m=t.jsx(lr,{className:i(un,"text-text-secondary")}),p="w-[var(--font-size-sm)] h-[var(--font-size-sm)]",x=t.jsx(ye,{className:p}),g=t.jsx(Ce,{className:p}),v="flex items-center justify-center shrink-0 rounded cursor-pointer transition-colors duration-200 text-text-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-primary";return t.jsx(Se,{headerIcon:n??m,headerTitle:t.jsxs("span",{className:"font-normal",children:[e.length," ",e.length===1?"File":"Files"]}),headerRight:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(W,{variant:"ghost",size:"sm",onClick:f=>f.stopPropagation(),children:"Undo All"}),t.jsx(W,{variant:"ghost",size:"sm",onClick:f=>f.stopPropagation(),children:"Keep All"}),t.jsx(W,{variant:"secondary",size:"sm",onClick:f=>f.stopPropagation(),children:"Review"})]}),defaultExpanded:a,contentPadding:"var(--spacing-1\\.5) var(--spacing-1) var(--spacing-1\\.5)",className:s,children:t.jsx("div",{className:"flex flex-col gap-0.5",children:e.map((f,b)=>{const h=c===b,w=f.additions!=null&&Number.isFinite(f.additions)?f.additions:null,j=f.deletions!=null&&Number.isFinite(f.deletions)?f.deletions:null;return t.jsxs("div",{className:i("flex items-center gap-1 px-1 py-1 rounded-sm cursor-pointer transition-colors duration-200 relative h-6",h?"bg-fill-secondary":"bg-transparent"),onMouseEnter:()=>d(b),onMouseLeave:()=>d(null),children:[l?t.jsx("span",{className:i("shrink-0",un),children:l(f.fileType,f.filename)}):t.jsx("span",{className:i("shrink-0",Qx),style:{color:Zx(f.fileType,f.filename)},"aria-hidden":!0,children:Wx(f.fileType,f.filename)}),t.jsx("span",{className:i("flex-1 text-xs font-medium truncate pr-12",h?"text-text":"text-text-tertiary"),children:f.filename}),t.jsxs("div",{className:i("absolute right-1 flex items-center gap-0.5 text-xs font-medium shrink-0 transition-opacity duration-200",h?"opacity-0 pointer-events-none":"opacity-100"),children:[w!=null&&t.jsxs("span",{className:"text-success",children:["+",w]}),j!=null&&t.jsxs("span",{className:"text-error",children:["-",j]})]}),t.jsxs("div",{className:i("flex items-center gap-0.5 shrink-0 absolute right-1 transition-opacity duration-200",h?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:k=>k.stopPropagation(),children:[t.jsx("button",{type:"button",className:i(v,"h-6 min-w-6 [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"),title:"Reject","aria-label":"Reject",onClick:k=>k.stopPropagation(),children:o??g}),t.jsx("button",{type:"button",className:i(v,"h-6 min-w-6 [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"),title:"Accept","aria-label":"Accept",onClick:k=>k.stopPropagation(),children:r??x})]})]},b)})})})}Hl.displayName="FileReviewPart";const pn="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",At="w-[var(--font-size-sm)] h-[var(--font-size-sm)]";function Gl(e){const a=N("requestChanges",pn)??t.jsx(lr,{className:pn}),s=N("checkLine",At)??t.jsx(ye,{className:At}),n=N("close",At)??t.jsx(Ce,{className:At}),r=e.getFileIcon;return t.jsx(Hl,{headerIcon:a,acceptIcon:s,rejectIcon:n,getFileIcon:r,...e})}Gl.displayName="FileReviewPart";const St="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Kx=t.jsx(cr,{className:i(St,"text-text-secondary")}),Yx=t.jsx(dr,{className:i(St,"text-text-tertiary")}),Xx=t.jsx(Qt,{className:i(St,"text-text-quaternary")}),Jx=t.jsx(ur,{className:i(St,"text-text-tertiary")}),ef=t.jsx(mr,{className:i(St,"text-text")});function tf(e,a,s){return a?s.loaderIcon??ef:e.status==="completed"?s.completedIcon??Xx:e.status==="skipped"||e.status==="cancelled"?s.skippedIcon??Jx:s.uncompletedIcon??Yx}function ql({tasks:e=[],title:a="To-dos",currentTaskId:s,defaultExpanded:n=!0,className:r,headerIcon:o,uncompletedIcon:l,completedIcon:c,skippedIcon:d,loaderIcon:m}){return t.jsx(Se,{headerIcon:o??Kx,headerTitle:t.jsx("span",{className:"text-left",children:a}),defaultExpanded:n,contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",showExpandAllBar:!0,maxHeight:124,className:r,children:t.jsx("div",{className:"flex flex-col gap-2",children:e.map((p,x)=>{const g=p.id??x,v=s!=null&&s===String(g),f=tf(p,v,{loaderIcon:m,completedIcon:c,skippedIcon:d,uncompletedIcon:l});return t.jsxs("div",{className:"flex flex-row gap-2 items-start",children:[t.jsx("div",{className:"flex items-center justify-center shrink-0 pt-0.5 [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",children:f}),t.jsx("span",{className:i("text-xs leading-xs flex-1 text-left",v?"text-text":p.status==="completed"?"text-text-quaternary line-through":"text-text-tertiary"),children:p.text})]},g)})})})}ql.displayName="TaskPart";const xa="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",xn=`${xa} text-text-secondary`,Dt=`${xa} text-text-tertiary`,fn=`${xa} text-text-quaternary`,hn=`${xa} text-text`;function Ul(e){const a=N("catalog",xn)??t.jsx(cr,{className:xn}),s=N("circle",Dt)??t.jsx(dr,{className:Dt}),n=N("checkboxCircle",fn)??t.jsx(Qt,{className:fn}),r=N("indeterminateCircle",Dt)??t.jsx(ur,{className:Dt}),o=N("arrowRightCircleFill",hn)??t.jsx(mr,{className:hn});return t.jsx(ql,{headerIcon:a,uncompletedIcon:s,completedIcon:n,skippedIcon:r,loaderIcon:o,...e})}Ul.displayName="TaskPart";const $s="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",af=t.jsx(Wt,{className:`${$s} text-text-secondary`}),sf=t.jsx(pr,{className:$s}),nf=t.jsx(ye,{className:i($s,"text-success")});function Ql({title:e="Plan",description:a,content:s,viewText:n="View",buildText:r="Build ⌘⏎",builtText:o="Built",isBuilt:l=!1,isGenerating:c=!1,onView:d,onBuild:m,onDownload:p,defaultExpanded:x=!0,contentMaxHeight:g,collapsible:v=!1,className:f,headerIcon:b,downloadIcon:h,builtIcon:w}){const j=s.split(`
|
|
258
|
-
`),k
|
|
259
|
-
`):
|
|
257
|
+
`})]})}function ns(e){return n.jsx(qa,{loader:n.jsx(Ef,{}),...e})}ns.displayName="ThinkingIndicator";function Ql(e){return n.jsx(gf,{...e,thinkingIndicator:e.thinkingIndicator??n.jsx(ns,{text:"Spark is thinking..."})})}Ql.displayName="Response";const He=Ql;He.Root=hn;He.Thinking=Ka;He.Steps=Ja;He.Step=es;He.Content=ts;He.ImageGenerating=wn;He.DefaultLayout=kn;const Ff=He,Yl=m.forwardRef(({children:e,className:t,maxWidth:a="752px",...s},r)=>{const o=l("w-full","bg-sage-bg","rounded-lg","p-3","text-sm leading-sm","font-normal","text-text",t);return n.jsx("div",{ref:r,className:o,style:{maxWidth:typeof a=="number"?`${a}px`:a},...s,children:e})});Yl.displayName="UserMessage";const Ds="w-5 h-5 text-text-secondary",Xl=m.forwardRef(({filename:e,iconFilename:t,size:a,icon:s,getFileIcon:r,onClick:o,className:i,...c},d)=>{const p=s??(r?r(t??e,Ds):n.jsx(Kn,{className:Ds}));return n.jsxs("div",{ref:d,role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o,onKeyDown:o?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),o())}:void 0,className:l("flex flex-row items-center gap-4 w-full max-w-96","py-5 px-5 rounded-lg","bg-bg-base border border-border-tertiary","text-sm leading-sm","transition-colors cursor-pointer hover:border-border-secondary",i),...c,children:[n.jsx("div",{className:l("flex items-center justify-center w-10 h-10 shrink-0 rounded-md","bg-fill-tertiary"),children:p}),n.jsxs("div",{className:"flex flex-row items-center gap-3 min-w-0",children:[n.jsx("span",{className:"font-medium text-text truncate",children:e}),a!=null&&a!==""&&n.jsxs("span",{className:"shrink-0 text-text-tertiary",children:["(",a,")"]})]})]})});Xl.displayName="FileCard";function $f({className:e}){return n.jsxs("svg",{className:e,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[n.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"}),n.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),n.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),n.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function Zl(e,t){return n.jsx($f,{className:t})}const Kl=m.forwardRef((e,t)=>{const{getFileIcon:a}=jt(),s=a??((r,o)=>Zl(r,o));return n.jsx(Xl,{ref:t,getFileIcon:s,...e})});Kl.displayName="FileCard";const As="h-3.5 w-3.5 shrink-0 text-current",Jl=m.forwardRef(({filename:e,iconFilename:t,onRemove:a,icon:s,getFileIcon:r,className:o,...i},c)=>{const u=s??(r?r(t??e,As):n.jsx(Kn,{className:As})),{color:p,...x}=i;return n.jsx(ka,{ref:c,appearance:"filled",color:"mauve",closable:typeof a=="function",onClose:a,closeAriaLabel:"移除",className:o,...x,children:n.jsxs("span",{className:"inline-flex items-center gap-1.5 shrink-0",children:[u,e]})})});Jl.displayName="FileAttachment";const ec=m.forwardRef((e,t)=>{const{getFileIcon:a}=jt(),s=a??((r,o)=>Zl(r,o));return n.jsx(Jl,{ref:t,getFileIcon:s,...e})});ec.displayName="FileAttachment";const Bf={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20"},Hf="max-w-[90vw] max-h-[90vh] object-contain",Vf="h-2.5 w-2.5 text-text-secondary",Gf="h-4 w-4 text-text-secondary",tc=m.forwardRef(({src:e,alt:t="",onRemove:a,previewable:s=!0,onClick:r,size:o="sm",className:i,closeIcon:c,closeLargeIcon:d,...u},p)=>{const[x,g]=m.useState(!1),v=c??n.jsx(Re,{className:Vf}),f=d??n.jsx(gr,{className:Gf}),b=typeof a=="function",h=m.useCallback(()=>{s&&g(!0)},[s]),w=m.useCallback(()=>g(!1),[]),k=m.useCallback(C=>{r?.(C),!C.defaultPrevented&&s&&h()},[r,s,h]),j=m.useCallback(C=>{C.stopPropagation(),a?.(C)},[a]);m.useEffect(()=>{if(!x)return;const C=L=>{L.key==="Escape"&&w()};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[x,w]);const I=x&&typeof document<"u"?Zs.createPortal(n.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-bg-mask",role:"dialog","aria-modal":"true","aria-label":"图片预览",onClick:C=>{C.target===C.currentTarget&&w()},onKeyDown:C=>C.key==="Escape"&&w(),children:[n.jsx("img",{src:e,alt:t,className:l("rounded-lg shadow-xl",Hf),onClick:C=>C.stopPropagation(),draggable:!1}),n.jsx(Ie,{variant:"tertiary",size:"md",rounded:"pill",icon:f,onClick:w,"aria-label":"关闭预览",className:"absolute top-4 right-4 bg-bg-base border border-border-tertiary shadow-sm"})]}),document.body):null;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:p,role:s?"button":void 0,tabIndex:s?0:void 0,className:l("relative group shrink-0",s&&"cursor-pointer",i),onClick:k,onKeyDown:s?C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),h())}:void 0,...u,children:[n.jsx("img",{src:e,alt:t,className:l("rounded-lg object-cover border border-border-tertiary",Bf[o]),draggable:!1}),b&&n.jsx("button",{type:"button",onClick:j,"aria-label":"移除",className:"absolute -top-0.5 -right-0.5 flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-bg-base border border-border-tertiary shadow-sm opacity-0 group-hover:opacity-100 transition-opacity hover:bg-fill-secondary",children:v})]}),I]})});tc.displayName="ImageAttachment";const qf="h-2.5 w-2.5 text-text-secondary",Wf="h-4 w-4 text-text-secondary",nc=m.forwardRef((e,t)=>{const a=N("close",qf),s=N("closeLarge",Wf);return n.jsx(tc,{ref:t,closeIcon:a,closeLargeIcon:s,...e})});nc.displayName="ImageAttachment";const ac="w-3.5 h-3.5 text-text-tertiary",sc="w-3.5 h-3.5 transition-transform duration-200 ease-in-out";function rc(e){const t=N("eye",ac),a=N("arrowRight",sc);return n.jsx(yn,{eyeIcon:t,arrowRightIcon:a,...e})}rc.displayName="ReasoningStepRoot";function oc(e){const t=N("eye",ac),a=N("arrowRight",sc);return n.jsx(Jt,{eyeIcon:t,arrowRightIcon:a,...e})}oc.displayName="ReasoningStep";const Lt=oc;Lt.Root=rc;Lt.Header=bn;Lt.Details=vn;Lt.DetailRow=Ya;const Uf=Lt,as="size-[1em] shrink-0",Qf=`${as} text-text-tertiary`,Yf=`${as} text-success`,Xf=`${as} text-text-tertiary`,Zf="w-3.5 h-3.5 text-text-tertiary transition-all duration-200",ic=m.memo(function({toolName:t,params:a,status:s,response:r,defaultExpanded:o=!1,statusText:i,className:c,timeIcon:d,checkboxCircleIcon:u,closeCircleIcon:p,arrowDownIcon:x,arrowRightIcon:g,runningText:v="Running",ranText:f="Ran",failedText:b="Failed",responseLabel:h="Response"}){const[w,k]=m.useState(o),j=r!=null&&r.length>0,I=s==="running",C=s==="success",L=s==="error",S=i!==void 0?i:I?v:C?f:b,O=S!=="",re=d??n.jsx(jr,{className:Qf}),_=u??n.jsx(an,{className:Yf}),U=p??n.jsx(Nr,{className:Xf}),le=x??g??n.jsx(ve,{className:Zf});return n.jsxs("div",{className:l("flex flex-col",c),children:[n.jsxs("div",{onClick:()=>j&&!I&&k(!w),className:l("group flex items-center gap-1.5 min-h-5",j&&!I&&"cursor-pointer hover:opacity-80 transition-opacity"),children:[n.jsxs("div",{className:"shrink-0 flex items-center justify-center text-xs",children:[I&&re,C&&_,L&&U]}),O&&n.jsx("span",{className:"text-xs leading-xs text-text-tertiary shrink-0",children:S}),n.jsx("span",{className:"text-xs leading-xs text-text-secondary shrink-0",children:t}),a!=null&&a!==""&&n.jsx("span",{className:"text-xs leading-xs text-text-tertiary min-w-0 shrink truncate",title:a,children:a}),j&&!I&&n.jsx("div",{className:l("shrink-0 inline-flex items-center justify-center","opacity-0 group-hover:opacity-100",w&&"!opacity-100",w?"rotate-180":"rotate-0"),children:le})]}),j&&w&&n.jsxs("div",{className:"mt-1 ml-4.5 rounded-md border border-border-tertiary bg-bg-base overflow-hidden font-mono text-xs leading-xs",children:[n.jsx("div",{className:"text-text-tertiary px-2 pt-1 pb-0 leading-xs",children:h}),n.jsx(we,{scrollbarVisibility:"auto",maxHeight:208,className:"px-2 pb-1 leading-xs",children:n.jsx("pre",{className:l("whitespace-pre-wrap break-words leading-xs",L?"text-error":"text-text-tertiary"),children:r})})]})]})});ic.displayName="ToolInvocationCard";const Kf="size-[1em] text-text-tertiary",Jf="size-[1em] text-success",eh="size-[1em] text-text-tertiary",th="w-3.5 h-3.5 text-text-tertiary transition-all duration-200",lc=m.memo(function(t){const{t:a}=Js.useTranslation(),s=N("time",Kf),r=N("checkboxCircle",Jf),o=N("closeCircle",eh),i=N("arrowDownS",th);return n.jsx(ic,{timeIcon:s,checkboxCircleIcon:r,closeCircleIcon:o,arrowDownIcon:i,runningText:a("tools.status.running","Running"),ranText:a("tools.status.ran","Ran"),failedText:a("tools.status.failed","Failed"),...t})});lc.displayName="ToolInvocationCard";const nh=80;function _s(e){if(!e)return{};const{label:t,...a}=e;return a}const ah="Permission required",sh="This action requires your permission.",rh="Expand",oh="Collapse",ih=", ",cc=m.forwardRef(({title:e,description:t,command:a,commandIntent:s,isLoadingIntent:r=!1,onClose:o,actions:i,className:c,closeIcon:d,warningIcon:u,expandLabel:p=rh,collapseLabel:x=oh,commaLabel:g=ih,...v},f)=>{const b=e??ah,h=t??sh,w=a.length>nh,[k,j]=m.useState(!w),I=d??n.jsx(Re,{className:"h-3.5 w-3.5"}),C=u??n.jsx(kt,{className:"h-4 w-4"});return n.jsxs("div",{ref:f,className:l("relative rounded-lg border border-border-tertiary bg-bg-base p-3",c),...v,children:[o&&n.jsx("button",{type:"button",onClick:o,className:"absolute top-3 right-3 flex h-4 w-4 cursor-pointer items-center justify-center text-text-secondary transition-colors duration-200 hover:text-text","aria-label":"Close",children:I}),n.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[n.jsx("div",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-warning",children:C}),n.jsx("h3",{className:"min-w-0 flex-1 text-base leading-base font-semibold text-text",children:b})]}),n.jsx("p",{className:"mb-2 ml-6 text-xs leading-xs text-text-tertiary",children:r?n.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.jsx("div",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-text-tertiary border-t-transparent"}),n.jsx("span",{children:h})]}):n.jsxs(n.Fragment,{children:[h,s&&n.jsxs("span",{children:[g,s]})]})}),n.jsx("div",{className:"mb-4 ml-6",children:n.jsxs("div",{className:"rounded p-2 bg-fill-tertiary",children:[k||!w?n.jsx("div",{title:a,children:n.jsx(we,{scrollbarVisibility:"auto",maxHeight:240,className:"text-xs leading-xs font-medium text-text break-all",style:{fontFamily:"Fira Code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},children:a})}):n.jsx("div",{className:"text-xs leading-xs font-medium text-text break-all line-clamp-2 overflow-hidden",style:{fontFamily:"Fira Code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},title:a,children:a}),w&&n.jsx("button",{type:"button",onClick:()=>j(!k),className:"mt-1 flex items-center gap-1 text-xs leading-xs text-text-tertiary hover:text-text transition-colors",children:k?x:p})]})}),n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[i?.deny&&n.jsx(W,{variant:"ghost",..._s(i.deny),children:i.deny.label}),i?.allowOnce&&n.jsx("button",{type:"button",className:l("rounded-full inline-flex items-center justify-center","px-3 py-1 text-sm leading-sm font-medium","text-text-on-primary bg-error","cursor-pointer hover:opacity-90 active:opacity-95 transition-opacity","disabled:opacity-50 disabled:cursor-not-allowed"),..._s(i.allowOnce),children:i.allowOnce.label})]})]})});cc.displayName="PermissionCard";const dc=m.forwardRef((e,t)=>{const{t:a}=Js.useTranslation(),s=N("close","h-3.5 w-3.5"),r=N("warning","h-4 w-4");return n.jsx(cc,{ref:t,...e,closeIcon:s,warningIcon:r,title:e.title??a("permission.title"),description:e.description??a("permission.description.default",{toolName:"Tool"}),expandLabel:a("permission.expand"),collapseLabel:a("permission.collapse"),commaLabel:a("common.comma")})});dc.displayName="PermissionCard";const lh="h-5 w-5 text-text-on-primary";function uc(e){const t=N("sparkling",lh);return n.jsx(Za,{sparklingIcon:t,...e})}uc.displayName="ImageGenerating";const mc=m.memo(function({children:t,className:a="",gridClassName:s="",isGenerating:r=!1,maxVisibleWhenGenerating:o=6,formatRemaining:i=c=>`+${c}`}){const c=m.Children.toArray(t),d=c.length,u=r&&d>o,p=u?o:d,x=d-o+1,v=c.slice(0,p).map((f,b)=>u&&b===p-1&&m.isValidElement(f)?m.cloneElement(f,{showOverlay:!0,overlayText:i(x)}):f);return n.jsx("div",{className:l("mt-5 mb-2",a),children:n.jsx("div",{className:l("flex flex-wrap gap-3",s),children:v})})});mc.displayName="GeneratedImagesGrid";const ch={multiSelect:"Multi-select",singleSelect:"Single-select",questionHeader:"Question",skipAll:"Skip All",continue:"Continue",submit:"Submit",sending:"Sending...",customInputPlaceholder:"Other (please specify)",recommend:"Recommend"},dh="[No preference]",ss=m.createContext(null);ss.displayName="UserQuestionContext";function Dt(){const e=m.useContext(ss);if(!e)throw new Error("UserQuestion compound components must be used within UserQuestion.Root");return e}const uh=n.jsx(kr,{className:"w-4 h-4 shrink-0 text-text-tertiary"}),mh=n.jsx(Zn,{}),ph=n.jsx(ve,{}),xh=n.jsx(Jn,{className:"w-4 h-4 mr-1"}),jn=m.forwardRef(function({questions:t,resetKey:a,onAnswer:s,onSkip:r,hasCustomText:o=!1,labels:i,chat4Icon:c=uh,arrowUpSIcon:d=mh,arrowDownSIcon:u=ph,sparklingIcon:p=xh,children:x},g){const v={...ch,...i},[f,b]=m.useState(0),[h,w]=m.useState({}),[k,j]=m.useState({}),[I,C]=m.useState(0),[L,z]=m.useState(!1),[S,O]=m.useState(void 0),re=m.useRef(a),_=m.useRef(null),U=m.useRef(new Map),le=m.useRef(f),J=m.useRef(!1),G=m.useRef(!1),ae=m.useRef(new Map),ce=m.useRef(f),R=t[f],$=R?.options||[],ee=t.every(P=>(h[P.question]||[]).length>0||(k[P.question]?.trim()||"").length>0),me=(h[R?.question]||[]).length>0||(k[R?.question]?.trim()||"").length>0,Q=m.useCallback(P=>{const D=t[P];if(!D)return 0;const B=h[D.question]||[];if(B.length===0)return 0;const ne=(D.options||[]).findIndex(ge=>B.includes(ge.label));return ne>=0?ne:0},[t,h]);m.useImperativeHandle(g,()=>({getAnswers:()=>{const P={};for(const D of t){const B=h[D.question]||[],te=k[D.question]?.trim(),ne=[];B.length>0&&ne.push(...B),te&&ne.push(te),ne.length>0&&(P[D.question]=ne.join(", "))}return P}}),[h,k,t]),m.useEffect(()=>{re.current!==a&&(re.current=a,U.current.clear(),ae.current.clear(),le.current=0,requestAnimationFrame(()=>{z(!1),b(0),w({}),j({}),C(0)}))},[a]),m.useEffect(()=>{if(ce.current!==f){if(le.current=f,G.current){J.current=!0;const P=U.current.get(f),D=_.current;if(P&&D){const B=()=>{J.current=!1,G.current=!1,D.removeEventListener("scrollend",B)};D.addEventListener("scrollend",B,{once:!0}),P.scrollIntoView({behavior:"smooth",block:"nearest"})}else J.current=!1,G.current=!1}ce.current=f}},[f]),m.useEffect(()=>{const P=setTimeout(()=>{let D=0;U.current.forEach(B=>{const te=B.getBoundingClientRect().height;te>D&&(D=te)}),D>0&&O(D)},50);return()=>clearTimeout(P)},[t,a]),m.useEffect(()=>{const P=_.current;if(!P)return;const D=new IntersectionObserver(B=>{if(J.current)return;let te=0,ne=le.current;B.forEach(ge=>{ge.isIntersecting&&ge.intersectionRatio>te&&(te=ge.intersectionRatio,U.current.forEach((ls,Pn)=>{ls===ge.target&&(ne=Pn)}))}),ne!==le.current&&te>.5&&(le.current=ne,b(ne),C(Q(ne)))},{root:P,threshold:[0,.25,.5,.75,1]});return U.current.forEach(B=>{B?.isConnected&&D.observe(B)}),()=>D.disconnect()},[t,Q]);const Y=m.useCallback((P,D,B)=>{const ne=t[B]?.multiSelect??!1,ge=B===t.length-1,Pn=(h[P]||[]).includes(D);w(Ne=>{const _t=Ne[P]||[];return ne?_t.includes(D)?{...Ne,[P]:_t.filter(Bc=>Bc!==D)}:{...Ne,[P]:[..._t,D]}:_t.includes(D)?{...Ne,[P]:[]}:{...Ne,[P]:[D]}}),ne||j(Ne=>({...Ne,[P]:""})),!ne&&!ge&&!Pn&&setTimeout(()=>{const Ne=B+1;G.current=!0,b(Ne),C(Q(Ne))},150)},[t,h,Q]),pe=m.useCallback(()=>{if(f>0){const P=f-1;G.current=!0,b(P),C(Q(P))}},[f,Q]),je=m.useCallback(()=>{if(f<t.length-1){const P=f+1;G.current=!0,b(P),C(Q(P))}},[f,t.length,Q]),Je=m.useCallback(()=>{if(!L)if(ee){z(!0);const P={};for(const D of t){const B=h[D.question]||[],te=k[D.question]?.trim(),ne=[];B.length>0&&ne.push(...B),te&&ne.push(te),P[D.question]=ne.join(", ")}s(P)}else{const P=te=>(h[te.question]||[]).length===0&&(k[te.question]?.trim()||"").length===0,D=t.length;let B=-1;for(let te=1;te<D;te++){const ne=(f+te)%D;if(P(t[ne])){B=ne;break}}B>=0&&(G.current=!0,b(B),C(Q(B)))}},[L,ee,t,h,k,f,s,Q]),oe=m.useCallback(()=>{if(L)return;z(!0);const P={};for(const D of t){const B=h[D.question]||[],te=k[D.question]?.trim();if(B.length>0||!!te){const ge=[];B.length>0&&ge.push(...B),te&&ge.push(te),P[D.question]=ge.join(", ")}else P[D.question]=dh}s(P),r()},[L,t,h,k,s,r]),et=m.useCallback(()=>{if(L)return;const P={};for(const D of t){const B=D.options?.[0];B&&(P[D.question]=[B.label])}w(P),j({}),G.current=!0,b(t.length-1),C(0),setTimeout(()=>{_.current&&_.current.scrollTo({top:_.current.scrollHeight,behavior:"smooth"})},50)},[L,t]),ze=m.useCallback(P=>{G.current=P},[]),Le={questions:t,labels:v,currentQuestionIndex:f,setCurrentQuestionIndex:b,answers:h,setAnswers:w,customInputs:k,setCustomInputs:j,focusedOptionIndex:I,setFocusedOptionIndex:C,isSubmitting:L,setIsSubmitting:z,maxQuestionHeight:S,scrollContainerRef:_,questionRefs:U,setShouldScrollToQuestion:ze,customInputRefs:ae,currentQuestion:R,currentOptions:$,allQuestionsAnswered:ee,currentQuestionHasAnswer:me,getSelectedOptionIndex:Q,handleOptionClick:Y,handlePrevious:pe,handleNext:je,handleContinue:Je,handleSkip:oe,handleRecommend:et,chat4Icon:c,arrowUpSIcon:d,arrowDownSIcon:u,sparklingIcon:p,hasCustomText:o};return t.length===0?null:n.jsx(ss.Provider,{value:Le,children:x})});jn.displayName="UserQuestionRoot";function Nn({className:e}){const t=Dt();return n.jsxs("div",{className:l("flex items-center justify-between mb-2 -mt-2 px-3 pt-2 pb-2 rounded-t-xl bg-fill-tertiary",e),children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[t.chat4Icon,n.jsx("span",{className:"text-xs leading-xs text-text-tertiary",children:t.currentQuestion?.header||t.labels.questionHeader}),n.jsx("span",{className:"text-text-tertiary/50",children:"•"}),n.jsx("span",{className:"text-xs leading-xs text-text-tertiary",children:t.currentQuestion?.multiSelect?t.labels.multiSelect:t.labels.singleSelect})]}),t.questions.length>1&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Ie,{size:"sm",variant:"ghost",onClick:t.handlePrevious,disabled:t.currentQuestionIndex===0,icon:t.arrowUpSIcon}),n.jsxs("span",{className:"text-xs leading-xs text-text-tertiary px-1",children:[t.currentQuestionIndex+1," / ",t.questions.length]}),n.jsx(Ie,{size:"sm",variant:"ghost",onClick:t.handleNext,disabled:t.currentQuestionIndex===t.questions.length-1,icon:t.arrowDownSIcon})]})]})}Nn.displayName="UserQuestionHeader";function Cn({question:e,qIndex:t,className:a}){const s=Dt(),r=e.options||[],[o,i]=m.useState(!1),c=!!s.customInputs[e.question]?.trim(),d=o||c,u=t===s.currentQuestionIndex;return n.jsxs("div",{ref:p=>{p?s.questionRefs.current.set(t,p):s.questionRefs.current.delete(t)},className:l("transition-opacity duration-200",u?"opacity-100":"opacity-40",a),children:[n.jsxs("div",{className:"flex items-start gap-3 pl-2 mb-3",children:[n.jsxs("div",{className:"flex-shrink-0 w-5 flex items-center justify-center text-sm leading-sm font-medium text-text-tertiary",children:[t+1,"."]}),n.jsx("div",{className:"text-sm leading-sm font-medium text-text min-w-0 flex-1",children:e.question})]}),n.jsx(aa,{items:r.map(p=>({id:p.label,label:p.label,description:p.description})),selectedIds:s.answers[e.question]?.map(p=>p)||[],focusedId:u?r[s.focusedOptionIndex]?.label:void 0,disabled:s.isSubmitting||!u,onItemClick:(p,x)=>{if(!u){s.setCurrentQuestionIndex(t),s.setFocusedOptionIndex(s.getSelectedOptionIndex(t));return}s.handleOptionClick(e.question,p.label,t),s.setFocusedOptionIndex(x)}}),e.allowCustomInput!==!1&&n.jsxs("div",{className:l("w-full flex gap-3 pl-2 mt-3 transition-colors",!u&&"opacity-40",s.isSubmitting&&"opacity-50"),children:[n.jsx("div",{className:l("flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-xs leading-xs font-medium transition-colors",u&&s.focusedOptionIndex===r.length||s.customInputs[e.question]?.trim()?"bg-primary-active text-text-on-primary":"bg-fill-secondary text-text-tertiary"),children:r.length+1}),n.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[n.jsx("div",{className:"h-5 flex items-center",children:n.jsx("input",{ref:p=>{p?s.customInputRefs.current.set(e.question,p):s.customInputRefs.current.delete(e.question)},type:"text",value:s.customInputs[e.question]||"",style:{outline:"none",outlineOffset:0,boxShadow:"none",border:"none"},onChange:p=>{const x=p.target.value;s.setCustomInputs(g=>({...g,[e.question]:x})),!e.multiSelect&&x.trim()&&s.setAnswers(g=>({...g,[e.question]:[]}))},onFocus:()=>{i(!0),u&&(s.setFocusedOptionIndex(r.length),e.multiSelect||s.setAnswers(p=>({...p,[e.question]:[]})))},onBlur:()=>i(!1),onKeyDown:p=>{if(p.key==="Enter"&&!p.shiftKey){p.preventDefault(),p.stopPropagation();const x=s.customInputs[e.question]?.trim();if((s.answers[e.question]||[]).length>0||!!x)if(s.allQuestionsAnswered)s.handleContinue();else if(t<s.questions.length-1){const f=t+1;s.setShouldScrollToQuestion(!0),s.setCurrentQuestionIndex(f),s.setFocusedOptionIndex(0)}else s.handleContinue()}},placeholder:s.labels.customInputPlaceholder,disabled:s.isSubmitting||!u,className:l("w-full h-full py-0 bg-transparent text-sm leading-sm font-medium text-text","placeholder:text-text-tertiary placeholder:font-normal","border-0 rounded-none outline-none outline-offset-0","focus:outline-none focus:outline-offset-0","focus-visible:outline-none focus-visible:outline-offset-0","ring-0 focus:ring-0 focus:ring-offset-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none","disabled:cursor-not-allowed")})}),n.jsx("div",{className:"mt-1.5 overflow-hidden origin-left transition-[width] duration-200 ease-out",style:{width:d?"100%":"0%"},"aria-hidden":!0,children:n.jsx("div",{className:"h-px bg-[var(--color-border-tertiary)]"})})]})]})]},e.question)}Cn.displayName="UserQuestionCard";function Sn({className:e,children:t}){const a=Dt(),{scrollContainerRef:s,maxQuestionHeight:r,questions:o}=a;return n.jsx(we,{ref:s,scrollbarVisibility:"auto",maxHeight:r||void 0,className:l("scroll-smooth",e),children:n.jsx("div",{className:"space-y-4 px-3",children:t??o.map((i,c)=>n.jsx(Cn,{question:i,qIndex:c},i.question))})})}Sn.displayName="UserQuestionCards";function In({className:e}){const t=Dt();return n.jsxs("div",{className:l("flex items-center justify-between px-3 py-2",e),children:[n.jsxs(W,{variant:"ghost",size:"sm",onClick:t.handleRecommend,disabled:t.isSubmitting,children:[t.sparklingIcon,t.labels.recommend]}),n.jsxs("div",{className:"flex items-center gap-2",children:[!t.allQuestionsAnswered&&n.jsx(W,{variant:"ghost",size:"sm",onClick:t.handleSkip,disabled:t.isSubmitting,children:t.labels.skipAll}),n.jsx(W,{size:"sm",variant:"secondary",onClick:t.handleContinue,disabled:t.isSubmitting||t.hasCustomText||!t.allQuestionsAnswered,children:t.isSubmitting?t.labels.sending:n.jsxs(n.Fragment,{children:[t.allQuestionsAnswered?t.labels.submit:t.labels.continue,n.jsx("span",{className:"opacity-70",children:" ↵"})]})})]})]})}In.displayName="UserQuestionFooter";function Rn(){return n.jsxs(H.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.16,1,.3,1]},className:l("border rounded-t-xl border-b-0 border-border border-border-tertiary bg-bg-base overflow-hidden pt-2 pb-2"),children:[n.jsx(Nn,{}),n.jsx(Sn,{}),n.jsx(In,{})]})}Rn.displayName="UserQuestionDefaultLayout";function fh(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e?.getAttribute("contenteditable")==="true"}function hh({isSubmitting:e,currentQuestion:t,currentOptions:a,currentQuestionIndex:s,questions:r,focusedOptionIndex:o,setFocusedOptionIndex:i,currentQuestionHasAnswer:c,getSelectedOptionIndex:d,setShouldScrollToQuestion:u,setCurrentQuestionIndex:p,handleOptionClick:x,handleContinue:g}){m.useEffect(()=>{const v={ArrowDown(b){if(b.preventDefault(),o<a.length-1)i(o+1);else if(s<r.length-1){const h=s+1;u(!0),p(h),i(d(h))}},ArrowUp(b){if(b.preventDefault(),o>0)i(o-1);else if(s>0){const h=s-1;u(!0),p(h),i(d(h))}},Enter(b){b.preventDefault(),c?g():t&&a[o]&&x(t.question,a[o].label,s)}},f=b=>{if(e||fh(document.activeElement))return;const h=v[b.key];if(h){h(b);return}if(b.key>="1"&&b.key<="9"){const w=parseInt(b.key,10)-1;w>=0&&w<a.length&&t&&(b.preventDefault(),x(t.question,a[w].label,s),i(w))}};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,t,a,s,r.length,o,i,c,d,p,x,g,u])}function gh(){const e=Dt();return hh({isSubmitting:e.isSubmitting,currentQuestion:e.currentQuestion,currentOptions:e.currentOptions,currentQuestionIndex:e.currentQuestionIndex,questions:e.questions,focusedOptionIndex:e.focusedOptionIndex,setFocusedOptionIndex:e.setFocusedOptionIndex,currentQuestionHasAnswer:e.currentQuestionHasAnswer,getSelectedOptionIndex:e.getSelectedOptionIndex,setShouldScrollToQuestion:e.setShouldScrollToQuestion,setCurrentQuestionIndex:e.setCurrentQuestionIndex,handleOptionClick:e.handleOptionClick,handleContinue:e.handleContinue}),null}const pc=m.forwardRef(function(t,a){return n.jsxs(jn,{ref:a,...t,children:[n.jsx(gh,{}),n.jsx(Rn,{})]})});pc.displayName="UserQuestion";const Ze=pc;Ze.Root=jn;Ze.Header=Nn;Ze.Card=Cn;Ze.Cards=Sn;Ze.Footer=In;Ze.DefaultLayout=Rn;const yh=Ze;function bh(e,t){const a=N("chat4","w-4 h-4 shrink-0 text-text-tertiary"),s=N("arrowUpS"),r=N("arrowDownS"),o=N("sparkling","w-4 h-4 mr-1");return n.jsx(jn,{ref:t,chat4Icon:a,arrowUpSIcon:s,arrowDownSIcon:r,sparklingIcon:o,...e})}const xc=m.forwardRef(bh);xc.displayName="UserQuestionRoot";const fc=m.forwardRef(function(t,a){const s=N("chat4","w-4 h-4 shrink-0 text-text-tertiary"),r=N("arrowUpS"),o=N("arrowDownS"),i=N("sparkling","w-4 h-4 mr-1");return n.jsx(yh,{ref:a,chat4Icon:s,arrowUpSIcon:r,arrowDownSIcon:o,sparklingIcon:i,...t})});fc.displayName="UserQuestion";const Ke=fc;Ke.Root=xc;Ke.Header=Nn;Ke.Card=Cn;Ke.Cards=Sn;Ke.Footer=In;Ke.DefaultLayout=Rn;const vh=Ke,wh={answer:"Answer",answers:"Answers"},kh="w-4 h-4 shrink-0 text-text-tertiary",hc=m.memo(function({answers:t,showHeader:a=!0,labels:s,className:r="",questionAnswerIcon:o}){const i={...wh,...s},c=Object.entries(t),d=o??n.jsx(ku,{className:kh});return c.length===0?null:n.jsxs("div",{className:`rounded-lg border border-border-tertiary bg-bg-container overflow-hidden mx-2 ${r}`.trim(),children:[a&&n.jsxs("div",{className:"flex items-center gap-2 pl-3 pr-3 h-8 border-b border-border-tertiary",children:[d,n.jsx("span",{className:"text-xs leading-xs text-text-tertiary",children:c.length===1?i.answer:i.answers})]}),n.jsx("div",{className:"flex flex-col gap-3 p-3 text-xs leading-xs",children:c.map(([u,p],x)=>n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("span",{className:"font-medium text-text",children:u}),n.jsx("span",{className:"text-text-tertiary",children:p})]},x))})]})});hc.displayName="UserQuestionAnswer";const jh="w-4 h-4 shrink-0 text-text-tertiary",gc=m.memo(function(t){const a=N("questionAnswer",jh);return n.jsx(hc,{questionAnswerIcon:a,...t})});gc.displayName="UserQuestionAnswer";const Nh={title:"In queue",sendNowTip:"Send now",removeTip:"Remove",fileLabel:"file",filesLabel:"files"},Ch="w-3.5 h-3.5",Sh="w-3.5 h-3.5",Ih="w-4 h-4 text-text-tertiary transition-transform duration-200",Rh=m.memo(function({item:t,onRemove:a,onSendNow:s,labels:r,arrowUpIcon:o,closeIcon:i}){const c=m.useCallback(x=>{x.stopPropagation(),a?.(t.id)},[t.id,a]),d=m.useCallback(x=>{x.stopPropagation(),s?.(t.id)},[t.id,s]),u=t.attachmentCount??0,p=u===1?r.fileLabel:r.filesLabel;return n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs leading-xs hover:bg-fill-tertiary transition-colors cursor-default",children:[n.jsx("span",{className:"truncate flex-1 text-text",children:t.label}),u>0&&n.jsxs("span",{className:"shrink-0 text-xs leading-xs text-text-tertiary",children:["+",u," ",p]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[s&&n.jsx(rt,{content:r.sendNowTip,side:"top",children:n.jsx(Ie,{size:"sm",variant:"ghost",icon:o,"aria-label":r.sendNowTip,className:"shrink-0",onClick:d})}),a&&n.jsx(rt,{content:r.removeTip,side:"top",children:n.jsx(Ie,{size:"sm",variant:"ghost",icon:i,"aria-label":r.removeTip,className:"shrink-0",onClick:c})})]})]})}),yc=m.memo(function({items:t,onRemoveItem:a,onSendNow:s,isStreaming:r=!1,hasStatusCardBelow:o=!1,labels:i,defaultExpanded:c=!0,storageKey:d,arrowUpIcon:u,closeIcon:p,arrowDownSIcon:x}){const g={...Nh,...i},v=u??n.jsx(Zn,{className:Ch}),f=p??n.jsx(Re,{className:Sh}),b=x??n.jsx(ve,{className:Ih}),[h,w]=m.useState(()=>{if(typeof window>"u")return c;if(d){const j=localStorage.getItem(d);return j!==null?j==="true":c}return c});if(m.useEffect(()=>{d&&localStorage.setItem(d,String(h))},[d,h]),t.length===0)return null;const k=l("w-full overflow-hidden flex flex-col","border border-b-0 border-border border-border-tertiary bg-bg-base",!o&&"rounded-t-xl");return n.jsxs(H.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.16,1,.3,1]},className:k,children:[n.jsx("div",{role:"button",tabIndex:0,onClick:()=>w(!h),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),w(!h))},"aria-expanded":h,"aria-label":`${h?"Collapse":"Expand"} queue`,className:"flex items-center justify-between px-3 py-1 h-7 cursor-pointer bg-fill-tertiary hover:bg-fill-secondary transition-colors duration-150 focus:outline-none",children:n.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[n.jsx("span",{className:l("inline-flex items-center justify-center",!h&&"-rotate-90"),children:b}),n.jsx("span",{className:"text-xs leading-xs font-medium text-text-secondary",children:g.title})]})}),n.jsx(H.AnimatePresence,{initial:!1,children:h&&n.jsx(H.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.23,1,.32,1]},className:"overflow-hidden",children:n.jsx(we,{scrollbarVisibility:"auto",maxHeight:208,className:"border-t border-border-tertiary scroll-smooth",children:t.map(j=>n.jsx(Rh,{item:j,onRemove:a,onSendNow:s,labels:g,arrowUpIcon:v,closeIcon:f},j.id))})})})]})});yc.displayName="QueueIndicator";const Th="w-3.5 h-3.5",Mh="w-3.5 h-3.5",Ph="w-4 h-4 text-text-tertiary transition-transform duration-200",bc=m.memo(function(t){const a=N("arrowUp",Th),s=N("close",Mh),r=N("arrowDownS",Ph);return n.jsx(yc,{arrowUpIcon:a,closeIcon:s,arrowDownSIcon:r,...t})});bc.displayName="QueueIndicator";const zh={ariaLabel:"Conversation anchors",scrollTo:"Scroll to message"},vc=m.memo(function({scrollContainerRef:t,items:a,onSelect:s,activeIndex:r,variant:o="bar",minItems:i=3,hidden:c=!1,labels:d,className:u,getAnchorElement:p,renderAnchor:x}){const g={...zh,...d},v=wc({scrollContainerRef:t,items:a,getAnchorElement:p,enabled:r===void 0&&!c}),f=r!==void 0?r:v,b=m.useCallback(w=>{const k=a[w];k&&s(w,k)},[a,s]),h=!c&&a.length>=i;return n.jsx(H.AnimatePresence,{mode:"wait",children:h&&n.jsx(H.motion.nav,{initial:{opacity:0,x:8},animate:{opacity:1,x:0,transition:{type:"spring",stiffness:500,damping:30,mass:.6}},exit:{opacity:0,x:8,transition:{duration:.15,ease:[.32,.72,0,1]}},className:l("absolute right-3 top-1/2 -translate-y-1/2 z-[40]","flex flex-col items-end gap-1.5 max-h-[80%] overflow-y-auto","scrollbar-hide",u),"aria-label":g.ariaLabel,children:a.map((w,k)=>n.jsx(Lh,{item:w,index:k,isActive:k===f,variant:o,tooltipFallback:g.scrollTo,onClick:b,renderAnchor:x},w.id))},"spark-conversation-anchor-nav")})});vc.displayName="ConversationAnchorNav";const Lh=m.memo(function({item:t,index:a,isActive:s,variant:r,tooltipFallback:o,onClick:i,renderAnchor:c}){const d=m.useCallback(()=>i(a),[i,a]),u=c?c({item:t,index:a,isActive:s,variant:r}):null;return n.jsx(rt,{content:t.summary||o,side:"left",contentClassName:"max-w-xs",children:n.jsx("button",{type:"button",onClick:d,className:l("group/spark-anchor flex cursor-pointer border-0 bg-transparent outline-none","focus-visible:ring-2 focus-visible:ring-[var(--color-link)] focus-visible:rounded-full",r==="punch"?"h-7 w-7 shrink-0 items-center justify-center p-0":"items-center justify-end p-1"),"aria-label":`${o} ${a+1}`,"aria-current":s?"true":void 0,"data-spark-anchor-nav-item":t.id,children:u??n.jsx("span",{className:l("block shrink-0 origin-center",r==="punch"?l("rounded-full transition-transform duration-300 ease-out",s?"h-2 w-2 bg-[var(--color-link)] group-hover/spark-anchor:scale-125":l("h-1.5 w-1.5 border border-solid border-border-tertiary bg-transparent","group-hover/spark-anchor:scale-150 group-hover/spark-anchor:border-[var(--color-link)]")):l("rounded-full transition-all duration-300 ease-out h-0.5",s?"w-4 bg-text-quaternary":"w-2.5 bg-border-tertiary","group-hover/spark-anchor:w-6 group-hover/spark-anchor:bg-text-quaternary"))})})})},(e,t)=>e.isActive===t.isActive&&e.variant===t.variant&&e.index===t.index&&e.item.id===t.item.id&&e.item.summary===t.item.summary&&e.tooltipFallback===t.tooltipFallback&&e.onClick===t.onClick&&e.renderAnchor===t.renderAnchor);function wc({scrollContainerRef:e,items:t,getAnchorElement:a,enabled:s=!0}){const[r,o]=m.useState(0),i=m.useMemo(()=>t.map(d=>d.id).join("|"),[t]),c=m.useRef(a);return m.useEffect(()=>{c.current=a},[a]),m.useEffect(()=>{if(!s)return;const d=e.current;if(!d||t.length===0||typeof IntersectionObserver>"u")return;const u=(f,b)=>{const h=c.current;return h?h(f,b,d):d.querySelector(`[data-spark-anchor="${Dh(f.id)}"]`)},p=[];if(t.forEach((f,b)=>{const h=u(f,b);h&&p.push({index:b,el:h})}),p.length===0)return;const x=new WeakMap,g=()=>{let f=p[0]?.index??0,b=-1;for(const{index:h,el:w}of p){const k=x.get(w)??0;k>b&&(b=k,f=h)}o(h=>h===f?h:f)},v=new IntersectionObserver(f=>{for(const b of f)x.set(b.target,b.intersectionRatio);g()},{root:d,threshold:[0,.25,.5,.75,1]});return p.forEach(f=>v.observe(f.el)),()=>v.disconnect()},[s,e,t,i]),r}function Dh(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}const Os="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Ah="font-['Seti'] shrink-0 inline-flex items-center justify-center w-4 h-4 text-[16px] leading-[16px]",Gn={javascript:"",typescript:"",react:"",json:"",html:"",css:"",python:"",java:"",go:"",rust:"",php:"",ruby:"",vue:"",svelte:"",markdown:"",yaml:"",xml:"",shell:"",sass:"",settings:"",default:""},Es={javascript:"var(--color-yellow)",typescript:"var(--color-blue)",react:"var(--color-blue)",json:"var(--color-yellow)",html:"var(--color-blue)",css:"var(--color-blue)",python:"var(--color-blue)",java:"var(--color-error)",go:"var(--color-blue)",rust:"var(--color-lavender)",php:"var(--color-purple)",ruby:"var(--color-error)",vue:"var(--color-success)",svelte:"var(--color-error)",markdown:"var(--color-blue)",yaml:"var(--color-purple)",xml:"var(--color-orange)",shell:"var(--color-success)",sass:"var(--color-error)",settings:"var(--color-lavender)",default:"var(--color-lavender)"},Ht={js:"javascript",jsx:"react",ts:"typescript",tsx:"typescript",json:"json",html:"html",css:"css",scss:"sass",sass:"sass",less:"css",py:"python",java:"java",go:"go",rs:"rust",php:"php",rb:"ruby",vue:"vue",svelte:"svelte",md:"markdown",yml:"yaml",yaml:"yaml",xml:"xml",sh:"shell",bash:"shell",zsh:"shell",config:"settings",conf:"settings"};function kc(e,t){let a=null;if(t&&typeof t=="string"&&t.trim()){const s=t.lastIndexOf(".");if(s>0&&s<t.length-1){const r=t.substring(s+1).toLowerCase().trim();r&&Ht[r]&&(a=Ht[r])}}if(!a&&e&&typeof e=="string"&&e.trim()){const s=e.toLowerCase().trim();Ht[s]?a=Ht[s]:Gn[s]&&(a=s)}return a||"default"}function _h(e,t){const a=kc(e,t);return Gn[a]??Gn.default}function Oh(e,t){const a=kc(e,t);return Es[a]??Es.default}function jc({files:e=[],defaultExpanded:t=!0,className:a,headerIcon:s,acceptIcon:r,rejectIcon:o,getFileIcon:i}){const[c,d]=m.useState(null),u=n.jsx(Cr,{className:l(Os,"text-text-secondary")}),p="w-[var(--font-size-sm)] h-[var(--font-size-sm)]",x=n.jsx(be,{className:p}),g=n.jsx(Re,{className:p}),v="flex items-center justify-center shrink-0 rounded cursor-pointer transition-colors duration-200 text-text-secondary hover:text-text focus:outline-none focus-visible:ring-2 focus-visible:ring-primary";return n.jsx(Te,{headerIcon:s??u,headerTitle:n.jsxs("span",{className:"font-normal",children:[e.length," ",e.length===1?"File":"Files"]}),headerRight:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(W,{variant:"ghost",size:"sm",onClick:f=>f.stopPropagation(),children:"Undo All"}),n.jsx(W,{variant:"ghost",size:"sm",onClick:f=>f.stopPropagation(),children:"Keep All"}),n.jsx(W,{variant:"secondary",size:"sm",onClick:f=>f.stopPropagation(),children:"Review"})]}),defaultExpanded:t,contentPadding:"var(--spacing-1\\.5) var(--spacing-1) var(--spacing-1\\.5)",className:a,children:n.jsx("div",{className:"flex flex-col gap-0.5",children:e.map((f,b)=>{const h=c===b,w=f.additions!=null&&Number.isFinite(f.additions)?f.additions:null,k=f.deletions!=null&&Number.isFinite(f.deletions)?f.deletions:null;return n.jsxs("div",{className:l("flex items-center gap-1 px-1 py-1 rounded-sm cursor-pointer transition-colors duration-200 relative h-6",h?"bg-fill-secondary":"bg-transparent"),onMouseEnter:()=>d(b),onMouseLeave:()=>d(null),children:[i?n.jsx("span",{className:l("shrink-0",Os),children:i(f.fileType,f.filename)}):n.jsx("span",{className:l("shrink-0",Ah),style:{color:Oh(f.fileType,f.filename)},"aria-hidden":!0,children:_h(f.fileType,f.filename)}),n.jsx("span",{className:l("flex-1 text-xs font-medium truncate pr-12",h?"text-text":"text-text-tertiary"),children:f.filename}),n.jsxs("div",{className:l("absolute right-1 flex items-center gap-0.5 text-xs font-medium shrink-0 transition-opacity duration-200",h?"opacity-0 pointer-events-none":"opacity-100"),children:[w!=null&&n.jsxs("span",{className:"text-success",children:["+",w]}),k!=null&&n.jsxs("span",{className:"text-error",children:["-",k]})]}),n.jsxs("div",{className:l("flex items-center gap-0.5 shrink-0 absolute right-1 transition-opacity duration-200",h?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:j=>j.stopPropagation(),children:[n.jsx("button",{type:"button",className:l(v,"h-6 min-w-6 [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"),title:"Reject","aria-label":"Reject",onClick:j=>j.stopPropagation(),children:o??g}),n.jsx("button",{type:"button",className:l(v,"h-6 min-w-6 [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"),title:"Accept","aria-label":"Accept",onClick:j=>j.stopPropagation(),children:r??x})]})]},b)})})})}jc.displayName="FileReviewPart";const Fs="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",Vt="w-[var(--font-size-sm)] h-[var(--font-size-sm)]";function Nc(e){const t=N("requestChanges",Fs)??n.jsx(Cr,{className:Fs}),a=N("checkLine",Vt)??n.jsx(be,{className:Vt}),s=N("close",Vt)??n.jsx(Re,{className:Vt}),r=e.getFileIcon;return n.jsx(jc,{headerIcon:t,acceptIcon:a,rejectIcon:s,getFileIcon:r,...e})}Nc.displayName="FileReviewPart";const At="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Eh=n.jsx(Sr,{className:l(At,"text-text-secondary")}),Fh=n.jsx(Ir,{className:l(At,"text-text-tertiary")}),$h=n.jsx(an,{className:l(At,"text-text-quaternary")}),Bh=n.jsx(Rr,{className:l(At,"text-text-tertiary")}),Hh=n.jsx(Tr,{className:l(At,"text-text")});function Vh(e,t,a){return t?a.loaderIcon??Hh:e.status==="completed"?a.completedIcon??$h:e.status==="skipped"||e.status==="cancelled"?a.skippedIcon??Bh:a.uncompletedIcon??Fh}function Cc({tasks:e=[],title:t="To-dos",currentTaskId:a,defaultExpanded:s=!0,className:r,headerIcon:o,uncompletedIcon:i,completedIcon:c,skippedIcon:d,loaderIcon:u}){return n.jsx(Te,{headerIcon:o??Eh,headerTitle:n.jsx("span",{className:"text-left",children:t}),defaultExpanded:s,contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",showExpandAllBar:!0,maxHeight:124,className:r,children:n.jsx("div",{className:"flex flex-col gap-2",children:e.map((p,x)=>{const g=p.id??x,v=a!=null&&a===String(g),f=Vh(p,v,{loaderIcon:u,completedIcon:c,skippedIcon:d,uncompletedIcon:i});return n.jsxs("div",{className:"flex flex-row gap-2 items-start",children:[n.jsx("div",{className:"flex items-center justify-center shrink-0 pt-0.5 [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",children:f}),n.jsx("span",{className:l("text-xs leading-xs flex-1 text-left",v?"text-text":p.status==="completed"?"text-text-quaternary line-through":"text-text-tertiary"),children:p.text})]},g)})})})}Cc.displayName="TaskPart";const Tn="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",$s=`${Tn} text-text-secondary`,Gt=`${Tn} text-text-tertiary`,Bs=`${Tn} text-text-quaternary`,Hs=`${Tn} text-text`;function Sc(e){const t=N("catalog",$s)??n.jsx(Sr,{className:$s}),a=N("circle",Gt)??n.jsx(Ir,{className:Gt}),s=N("checkboxCircle",Bs)??n.jsx(an,{className:Bs}),r=N("indeterminateCircle",Gt)??n.jsx(Rr,{className:Gt}),o=N("arrowRightCircleFill",Hs)??n.jsx(Tr,{className:Hs});return n.jsx(Cc,{headerIcon:t,uncompletedIcon:a,completedIcon:s,skippedIcon:r,loaderIcon:o,...e})}Sc.displayName="TaskPart";const rs="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Gh=n.jsx(sn,{className:`${rs} text-text-secondary`}),qh=n.jsx(Mr,{className:rs}),Wh=n.jsx(be,{className:l(rs,"text-success")});function Ic({title:e="Plan",description:t,content:a,viewText:s="View",buildText:r="Build ⌘⏎",builtText:o="Built",isBuilt:i=!1,isGenerating:c=!1,onView:d,onBuild:u,onDownload:p,defaultExpanded:x=!0,contentMaxHeight:g,collapsible:v=!1,className:f,headerIcon:b,downloadIcon:h,builtIcon:w}){const k=a.split(`
|
|
258
|
+
`),j=k.length>1&&k[1].trim()==="",I=j?k[0]:null,C=j?k.slice(2).join(`
|
|
259
|
+
`):a;return n.jsx(Te,{headerIcon:b??Gh,headerTitle:n.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:c?n.jsx("span",{className:"text-left",children:"Planning..."}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-left",children:e}),t!=null&&n.jsx("span",{className:"text-left flex-1 truncate text-text-quaternary",children:t})]})}),titleShimmer:c,headerRight:!c&&p?n.jsx(Ie,{variant:"iconOnly",size:"sm",icon:h??qh,onClick:L=>{L.stopPropagation(),p?.()},title:"Download as Markdown","aria-label":"Download",className:"!min-h-0 !min-w-0 h-[var(--font-size-sm)] w-[var(--font-size-sm)] text-text-secondary hover:text-text [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"}):void 0,contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",defaultExpanded:x,contentMaxHeight:g,collapsible:v,footer:c?void 0:n.jsxs(n.Fragment,{children:[n.jsx(W,{variant:"text",size:"sm",onClick:d,children:s}),n.jsx("div",{className:"flex-1"}),i?n.jsxs("div",{className:"flex items-center gap-1 text-xs text-success [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",children:[n.jsx("span",{children:o}),w??Wh]}):n.jsx(W,{variant:"secondary",size:"sm",onClick:u,children:r})]}),className:f,children:c?n.jsxs("div",{className:"flex flex-col gap-1 relative overflow-hidden min-h-[var(--spacing-14)]",children:[n.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:"radial-gradient(circle, var(--color-text-tertiary) 1px, transparent 1px)",backgroundSize:"16px 16px",backgroundRepeat:"repeat",opacity:.25}}),n.jsx("div",{className:"absolute inset-0 pointer-events-none plan-part-shimmer-layer",style:{backgroundImage:"radial-gradient(circle, var(--color-text-tertiary) 1px, transparent 1px)",backgroundSize:"16px 16px",backgroundRepeat:"repeat",maskImage:"linear-gradient(to bottom, transparent 0%, var(--color-mask-shimmer-weak) 15%, var(--color-mask-shimmer-strong) 30%, var(--color-mask-shimmer-full) 50%, var(--color-mask-shimmer-strong) 70%, var(--color-mask-shimmer-weak) 85%, transparent 100%)",maskSize:"100% 64px",WebkitMaskImage:"linear-gradient(to bottom, transparent 0%, var(--color-mask-shimmer-weak) 15%, var(--color-mask-shimmer-strong) 30%, var(--color-mask-shimmer-full) 50%, var(--color-mask-shimmer-strong) 70%, var(--color-mask-shimmer-weak) 85%, transparent 100%)",WebkitMaskSize:"100% 64px"}}),n.jsx("style",{children:`
|
|
260
260
|
@keyframes plan-part-shimmer {
|
|
261
261
|
0% { mask-position: 0 -64px; -webkit-mask-position: 0 -64px; }
|
|
262
262
|
100% { mask-position: 0 calc(100% + 64px); -webkit-mask-position: 0 calc(100% + 64px); }
|
|
@@ -264,6 +264,6 @@ If you want, I can generate a **preview report** first (top 50 renames + album s
|
|
|
264
264
|
.plan-part-shimmer-layer {
|
|
265
265
|
animation: plan-part-shimmer 3s linear infinite;
|
|
266
266
|
}
|
|
267
|
-
`})]}):
|
|
268
|
-
`);g.initialize({startOnLoad:!1,securityLevel:"strict",theme:"dark",themeCSS:v});const f=`mermaid-${
|
|
269
|
-
`).length:r??null,[a,n,r]),g=e?.toLowerCase(),v=o?t.jsx(V.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:t.jsx(ar,{className:i(vn,"text-text-secondary")})}):m?m(g,p):t.jsx("span",{className:i(Yl(g,p)),children:t.jsx(Fa,{className:vn})}),f=n&&x!=null?t.jsxs("span",{className:i("font-normal text-xs leading-xs",n==="add"?"text-success":"text-error"),children:[n==="add"?"+":"-",x]}):null,b=i("overflow-x-auto text-left scrollbar-auto",n==="add"&&"bg-success-bg border-l-[3px] border-l-[var(--color-success-border)] -ml-5 pl-5",n==="remove"&&"bg-error-bg border-l-[3px] border-l-[var(--color-error-border)] -ml-5 pl-5"),h=(e??"text").toLowerCase();return t.jsx(Se,{headerIcon:d??v,headerTitle:t.jsx("span",{className:"font-normal",children:p}),headerRight:f,defaultExpanded:l,contentPadding:"var(--spacing-2) 0 var(--spacing-2) var(--spacing-5)",titleShimmer:o,className:c,children:t.jsx("div",{className:b,children:t.jsx(Rc.Highlight,{theme:pf,code:a,language:h,children:({className:w,style:j,tokens:k,getLineProps:T,getTokenProps:S})=>t.jsx("pre",{className:i(w,"m-0 text-left bg-transparent font-mono text-xs font-normal leading-xs whitespace-pre"),style:j,children:t.jsx("code",{className:"text-left block",children:k.map((P,A)=>t.jsx("div",{...T({line:P}),children:P.map((I,_)=>t.jsx("span",{...S({token:I})},_))},A))})})})})})}Xl.displayName="CodeBlockPart";const hf="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0";function Jl(e){const{getFileIcon:a}=pt(),s=e.getFileIcon??(a?(n,r)=>a(r??"",hf):void 0);return t.jsx(Xl,{getFileIcon:s,...e})}Jl.displayName="CodeBlockPart";const ec="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",gf=t.jsx(fr,{className:ec}),yf=t.jsx(hr,{className:ec});function tc({command:e,output:a,autoRanCommand:s,className:n,headerIcon:r,externalLinkIcon:o}){const l=s??(e!=null?`Auto-Ran command: ${e}`:"Terminal");return t.jsx(Se,{headerIcon:r??gf,headerTitle:t.jsx("span",{className:"font-normal",children:l}),headerRight:t.jsx(Ne,{variant:"iconOnly",size:"sm",icon:o??yf,"aria-label":"Open in terminal",className:"!min-h-0 !min-w-0 h-[var(--font-size-sm)] w-[var(--font-size-sm)] text-text-secondary hover:text-text [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"}),contentPadding:"0",className:n,children:t.jsxs("div",{className:"flex flex-col gap-0",children:[e!=null&&e!==""&&t.jsx("div",{className:"px-2 py-1.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("span",{className:"font-mono text-xs text-text shrink-0",children:"$"}),t.jsx("pre",{className:"m-0 flex-1 overflow-x-auto text-left font-mono text-xs leading-xs whitespace-pre text-text bg-transparent scrollbar-auto",children:t.jsx("code",{children:e})})]})}),a!=null&&a!==""&&t.jsx("div",{className:"px-2 py-1.5 overflow-x-auto text-left scrollbar-auto",children:t.jsx("pre",{className:"m-0 p-0 font-mono text-xs leading-xs whitespace-pre-wrap break-all text-text-tertiary bg-transparent",children:a})})]})})}tc.displayName="TerminalCodeBlockPart";const _t="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary";function ac(e){const a=N("terminalBox",_t)??t.jsx(fr,{className:_t}),s=N("externalLink",_t)??t.jsx(hr,{className:_t});return t.jsx(tc,{headerIcon:a,externalLinkIcon:s,...e})}ac.displayName="TerminalCodeBlockPart";const Os="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",bf=t.jsx(gr,{className:`${Os} text-text-secondary`}),vf=t.jsx(mt,{className:`${Os} text-warning`}),wf=t.jsx(yr,{className:`${Os} text-text-secondary`});function kf({askValue:e,onAskChange:a,onSkip:s,onRun:n,dataStyle:r,dataTheme:o}){return t.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[t.jsx("div",{className:"shrink-0 w-fit",children:t.jsxs(uo,{value:e,onValueChange:a,children:[t.jsx(as,{className:"h-7 w-auto min-w-0 border-0 bg-transparent px-2 py-0 text-xs text-text-tertiary hover:text-text [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",onClick:l=>l.stopPropagation(),children:t.jsx(mo,{})}),t.jsxs(rs,{dataStyle:r,dataTheme:o,onClick:l=>l.stopPropagation(),children:[t.jsx(lt,{value:"Ask every time",children:"Ask every time"}),t.jsx(lt,{value:"Always allow",children:"Always allow"}),t.jsx(lt,{value:"Always deny",children:"Always deny"})]})]})}),t.jsx("div",{className:"flex-1 h-4 border-l border-border-tertiary opacity-10"}),t.jsx(W,{variant:"ghost",size:"sm",onClick:l=>{l.stopPropagation(),s()},children:"Skip ⌘⌫"}),t.jsx(W,{variant:"secondary",size:"sm",onClick:l=>{l.stopPropagation(),n()},children:"Run ⌘⏎"})]})}function sc({description:e,content:a,status:s="normal",onRun:n,onSkip:r,onViewDetail:o,onAskEveryTimeChange:l,className:c,dataStyle:d,dataTheme:m,normalIcon:p,failedIcon:x,skippedIcon:g}){const[v,f]=u.useState("Ask every time"),b=T=>{f(T),l?.(T)},h=s==="failed"?x??vf:s==="skipped"?g??wf:p??bf,w=s==="failed"?t.jsx("span",{children:"Browser Failed"}):s==="skipped"?t.jsx("span",{children:"Browser Skipped"}):t.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[t.jsx("span",{className:"shrink-0",children:"Browser"}),e!=null&&t.jsx("span",{className:"flex-1 min-w-0 truncate text-text-tertiary",children:e})]}),j=s==="failed"?t.jsx(W,{variant:"text",size:"sm",onClick:T=>{T.stopPropagation(),o?.()},children:"View Detail"}):void 0,k=s==="normal"?t.jsx(kf,{askValue:v,onAskChange:b,onSkip:()=>r?.(),onRun:()=>n?.(),dataStyle:d,dataTheme:m}):void 0;return t.jsx(Se,{headerIcon:h,headerTitle:w,headerRight:j,contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",defaultExpanded:s==="normal",collapsible:s==="normal",footer:k,className:c,children:a!=null&&a!==""&&t.jsx("span",{className:"text-xs leading-xs text-text whitespace-pre-wrap break-words",children:a})})}sc.displayName="BrowserActionPart";const Bs="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",wn=`${Bs} text-text-secondary`,kn=`${Bs} text-warning`,jn=`${Bs} text-text-secondary`;function nc(e){const{style:a,theme:s}=de(),n=N("global",wn)??t.jsx(gr,{className:wn}),r=N("warning",kn)??t.jsx(mt,{className:kn}),o=N("forbid2",jn)??t.jsx(yr,{className:jn});return t.jsx(sc,{normalIcon:n,failedIcon:r,skippedIcon:o,dataStyle:e.dataStyle??a,dataTheme:e.dataTheme??s,...e})}nc.displayName="BrowserActionPart";const jf="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",Nf=t.jsx(xr,{className:jf});function rc({title:e="Initializing agent…",question:a,skipText:s="Skip ⌘⌫",runText:n="Run ⌘⏎",askTimeText:r="Ask any time",onSkip:o,onRun:l,contentMaxHeight:c,collapsible:d=!0,className:m,headerIcon:p}){return t.jsx(Se,{headerIcon:p??Nf,headerTitle:t.jsx("span",{className:"text-left",children:e}),contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",defaultExpanded:!0,contentMaxHeight:c,collapsible:d,footer:t.jsxs(t.Fragment,{children:[t.jsxs(W,{variant:"ghost",size:"sm",className:"gap-1 py-0.5 px-0 text-text-secondary hover:text-text",children:[t.jsx("span",{className:"text-xs",children:r}),t.jsx(be,{className:"w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0"})]}),t.jsx("div",{className:"flex-1"}),t.jsx(W,{variant:"ghost",size:"sm",onClick:o,className:"bg-fill text-text-tertiary hover:bg-fill-secondary hover:text-text-secondary",children:s}),t.jsx(W,{variant:"secondary",size:"sm",onClick:l,children:n})]}),className:m,children:t.jsx("div",{className:"text-sm text-left",children:t.jsx("span",{className:"text-text",children:a})})})}rc.displayName="AskUserPart";const Nn="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary";function oc(e){const a=N("questionnaire",Nn)??t.jsx(xr,{className:Nn});return t.jsx(rc,{headerIcon:a,...e})}oc.displayName="AskUserPart";Object.defineProperty(exports,"toast",{enumerable:!0,get:()=>Sn.toast});exports.Alert=ni;exports.AlertDescription=oi;exports.AlertDialog=Tr;exports.AlertDialogAction=Mr;exports.AlertDialogCancel=Za;exports.AlertDialogContent=Pr;exports.AlertDialogDescription=Wa;exports.AlertDialogFooter=Ua;exports.AlertDialogHeader=qa;exports.AlertDialogMedia=Ar;exports.AlertDialogOverlay=Ha;exports.AlertDialogPortal=Lr;exports.AlertDialogTitle=Qa;exports.AlertDialogTrigger=lu;exports.AlertTitle=ri;exports.AskUserPart=oc;exports.AspectRatio=i0;exports.Avatar=to;exports.AvatarBadge=no;exports.AvatarFallback=so;exports.AvatarGroup=ro;exports.AvatarGroupCount=oo;exports.AvatarImage=ao;exports.Breadcrumb=ii;exports.BreadcrumbEllipsis=pi;exports.BreadcrumbItem=ci;exports.BreadcrumbLink=di;exports.BreadcrumbList=li;exports.BreadcrumbPage=ui;exports.BreadcrumbSeparator=mi;exports.BrowserActionPart=nc;exports.Button=W;exports.ButtonGroup=Un;exports.ButtonGroupSeparator=Wn;exports.ButtonGroupText=Qn;exports.Calendar=Cm;exports.CalendarDayButton=Gi;exports.Card=Ko;exports.CardAction=ei;exports.CardContent=ti;exports.CardDescription=Jo;exports.CardFooter=ai;exports.CardHeader=Yo;exports.CardTitle=Xo;exports.Carousel=Sm;exports.CarouselContent=Im;exports.CarouselItem=Rm;exports.CarouselNext=Tm;exports.CarouselPrevious=zm;exports.ChartContainer=Am;exports.ChartLegend=Em;exports.ChartLegendContent=Fm;exports.ChartStyle=Zi;exports.ChartTooltip=Dm;exports.ChartTooltipContent=_m;exports.ChatInput=ep;exports.ChatInputAbove=ft;exports.ChatInputActions=yt;exports.ChatInputActionsLeft=bt;exports.ChatInputActionsRight=Je;exports.ChatInputAttachments=Jt;exports.ChatInputBox=ht;exports.ChatInputExpandButton=ea;exports.ChatInputFolderButton=vt;exports.ChatInputFooterLeft=kt;exports.ChatInputInput=gt;exports.ChatInputMoreButton=wt;exports.ChatInputRoot=js;exports.ChatInputSendButton=Ns;exports.Checkbox=Zo;exports.CodeBlockPart=Jl;exports.Collapse=bo;exports.CollapseContent=ko;exports.CollapseItem=vo;exports.CollapseTrigger=wo;exports.Collapsible=ku;exports.CollapsibleCard=Se;exports.CollapsibleContent=Qr;exports.CollapsibleSection=Ur;exports.CollapsibleTrigger=ju;exports.Combobox=wm;exports.Command=Hi;exports.CommandDialog=pm;exports.CommandEmpty=hm;exports.CommandGroup=gm;exports.CommandInput=xm;exports.CommandItem=bm;exports.CommandList=fm;exports.CommandSeparator=ym;exports.CommandShortcut=vm;exports.ContextMenu=_0;exports.ContextMenuCheckboxItem=Pi;exports.ContextMenuContent=Fi;exports.ContextMenuGroup=F0;exports.ContextMenuItem=Li;exports.ContextMenuLabel=Di;exports.ContextMenuPortal=$0;exports.ContextMenuRadioGroup=B0;exports.ContextMenuRadioItem=Ai;exports.ContextMenuSeparator=_i;exports.ContextMenuShortcut=Ei;exports.ContextMenuSub=O0;exports.ContextMenuSubContent=$i;exports.ContextMenuSubTrigger=zi;exports.ContextMenuTrigger=E0;exports.ConversationAnchorNav=Ol;exports.DataTable=Lm;exports.DatePicker=qi;exports.Dialog=xi;exports.DialogClose=R0;exports.DialogContent=gi;exports.DialogDescription=ps;exports.DialogFooter=hi;exports.DialogHeader=us;exports.DialogOverlay=cs;exports.DialogPortal=fi;exports.DialogTitle=ms;exports.DialogTrigger=I0;exports.DirectionProvider=Om;exports.Drawer=yi;exports.DrawerClose=vi;exports.DrawerContent=ki;exports.DrawerDescription=bs;exports.DrawerFooter=gs;exports.DrawerHeader=hs;exports.DrawerOverlay=Kt;exports.DrawerPortal=xs;exports.DrawerTitle=ys;exports.DrawerTrigger=bi;exports.DropdownMenu=$e;exports.DropdownMenuCheckboxItem=kr;exports.DropdownMenuContent=Rr;exports.DropdownMenuGroup=eu;exports.DropdownMenuItem=je;exports.DropdownMenuLabel=Nr;exports.DropdownMenuPortal=tu;exports.DropdownMenuRadioGroup=au;exports.DropdownMenuRadioItem=jr;exports.DropdownMenuSeparator=Cr;exports.DropdownMenuShortcut=Sr;exports.DropdownMenuSub=br;exports.DropdownMenuSubContent=zr;exports.DropdownMenuSubTrigger=iu;exports.DropdownMenuTrigger=Oe;exports.EllipsisText=Jn;exports.Empty=l0;exports.EmptyContent=x0;exports.EmptyDescription=p0;exports.EmptyHeader=c0;exports.EmptyMedia=u0;exports.EmptyTitle=m0;exports.FILE_TYPE_MAP=nt;exports.Field=e0;exports.FieldContent=t0;exports.FieldDescription=n0;exports.FieldError=o0;exports.FieldGroup=Xu;exports.FieldLabel=a0;exports.FieldLegend=Yu;exports.FieldSeparator=r0;exports.FieldSet=Ku;exports.FieldTitle=s0;exports.FileAttachment=vl;exports.FileCard=yl;exports.FileReviewPart=Gl;exports.FolderButton=Xi;exports.FunctionSwitch=xu;exports.GeneratedImagesGrid=Ml;exports.GenerationStatusBar=ws;exports.HintBanner=cl;exports.HoverCard=A0;exports.HoverCardContent=Si;exports.HoverCardTrigger=D0;exports.IconButton=Ne;exports.IconsProvider=ou;exports.ImageAttachment=kl;exports.ImageGenerating=Ll;exports.Input=xt;exports.InputGroup=Fu;exports.InputGroupAddon=Ou;exports.InputGroupButton=Vu;exports.InputGroupInput=Gu;exports.InputGroupText=Hu;exports.InputGroupTextarea=qu;exports.InputOTP=Uu;exports.InputOTPGroup=Qu;exports.InputOTPSeparator=Zu;exports.InputOTPSlot=Wu;exports.Item=y0;exports.ItemActions=N0;exports.ItemContent=w0;exports.ItemDescription=j0;exports.ItemFooter=S0;exports.ItemGroup=f0;exports.ItemHeader=C0;exports.ItemMedia=v0;exports.ItemSeparator=h0;exports.ItemTitle=k0;exports.Kbd=Dr;exports.KbdGroup=_r;exports.Label=ls;exports.MOTION_DURATION=rt;exports.MOTION_EASE=ot;exports.MOTION_SPRING=Er;exports.MarkdownBody=et;exports.Menubar=q0;exports.MenubarCheckboxItem=X0;exports.MenubarContent=K0;exports.MenubarGroup=Q0;exports.MenubarItem=Y0;exports.MenubarLabel=em;exports.MenubarMenu=U0;exports.MenubarPortal=Oi;exports.MenubarRadioGroup=W0;exports.MenubarRadioItem=J0;exports.MenubarSeparator=tm;exports.MenubarShortcut=am;exports.MenubarSub=sm;exports.MenubarSubContent=rm;exports.MenubarSubTrigger=nm;exports.MenubarTrigger=Z0;exports.MermaidPart=Kl;exports.NativeSelect=km;exports.NativeSelectOptGroup=Nm;exports.NativeSelectOption=jm;exports.NavigationMenu=om;exports.NavigationMenuContent=dm;exports.NavigationMenuIndicator=mm;exports.NavigationMenuItem=lm;exports.NavigationMenuLink=um;exports.NavigationMenuList=im;exports.NavigationMenuTrigger=cm;exports.NavigationMenuViewport=Vi;exports.OptionList=_a;exports.Pagination=Eo;exports.PaginationContent=Fo;exports.PaginationEllipsis=Ho;exports.PaginationItem=$o;exports.PaginationLink=Oo;exports.PaginationNext=Vo;exports.PaginationPrevious=Bo;exports.PermissionCard=Tl;exports.PlanPart=Wl;exports.Popover=L0;exports.PopoverAnchor=P0;exports.PopoverContent=Ni;exports.PopoverTrigger=M0;exports.Progress=qo;exports.QueueIndicator=$l;exports.RadioGroup=Gr;exports.RadioGroupItem=qr;exports.ReasoningStep=rx;exports.RelatedPrompts=il;exports.ResizableHandle=Kr;exports.ResizablePanel=Zr;exports.ResizablePanelGroup=Wr;exports.Response=Yp;exports.SETI_CHAR_MAP=qt;exports.SETI_COLOR_MAP=za;exports.ScrollArea=$m;exports.ScrollBar=Ki;exports.Scrollbar=ve;exports.Select=uo;exports.SelectContent=fo;exports.SelectGroup=Lu;exports.SelectItem=lt;exports.SelectLabel=po;exports.SelectScrollDownButton=ns;exports.SelectScrollUpButton=ss;exports.SelectSeparator=xo;exports.SelectTrigger=as;exports.SelectValue=mo;exports.SendButton=ks;exports.Separator=Zt;exports.Sheet=yi;exports.SheetClose=vi;exports.SheetContent=fs;exports.SheetDescription=bs;exports.SheetFooter=gs;exports.SheetHeader=hs;exports.SheetOverlay=Kt;exports.SheetPortal=xs;exports.SheetTitle=ys;exports.SheetTrigger=bi;exports.ShimmeringText=Xr;exports.SidebarMenu=Qo;exports.Skeleton=Yr;exports.Slider=_o;exports.Spinner=Ya;exports.StreamingMarkdownBlock=Ts;exports.Switch=Ka;exports.TYPE_TO_TOKEN_CLASS=Ta;exports.Table=Xa;exports.TableBody=es;exports.TableCaption=eo;exports.TableCell=$t;exports.TableFooter=Jr;exports.TableHead=ts;exports.TableHeader=Ja;exports.TableRow=it;exports.Tabs=Mu;exports.TabsContent=yo;exports.TabsList=ho;exports.TabsTrigger=go;exports.Tag=os;exports.TaskPart=Ul;exports.TerminalCodeBlockPart=ac;exports.Textarea=is;exports.ThemeStyleProvider=Vd;exports.ThinkingIndicator=_s;exports.Toaster=co;exports.Toggle=Or;exports.ToggleGroup=Vr;exports.ToggleGroupItem=Hr;exports.ToolInvocationCard=Rl;exports.Tooltip=Da;exports.TypographyBlockquote=Ro;exports.TypographyH1=jo;exports.TypographyH2=No;exports.TypographyH3=Co;exports.TypographyH4=So;exports.TypographyInlineCode=Lo;exports.TypographyLarge=Po;exports.TypographyLead=Mo;exports.TypographyList=To;exports.TypographyMuted=Do;exports.TypographyP=Io;exports.TypographySmall=Ao;exports.TypographyTable=zo;exports.UserMessage=fl;exports.UserQuestion=Mx;exports.UserQuestionAnswer=El;exports.alertVariants=si;exports.buttonGroupVariants=qn;exports.checkboxVariants=Wo;exports.getFileIconColorClass=Yl;exports.getSetiIcon=uf;exports.getSetiIconColor=mf;exports.getSetiIconType=fa;exports.navigationMenuTriggerStyle=Bi;exports.sheetVariants=wi;exports.tagVariants=Go;exports.useDirection=Bm;exports.useIcon=N;exports.useIcons=pt;exports.useThemeStyle=de;exports.useVisibleAnchorIndex=Bl;
|
|
267
|
+
`})]}):n.jsxs("div",{className:"flex flex-col gap-1",children:[I!=null&&n.jsx("div",{className:"text-sm font-medium text-text",children:I}),C!=null&&C!==""&&n.jsx("span",{className:"text-xs leading-xs text-text whitespace-pre-wrap break-words",children:C})]})})}Ic.displayName="PlanPart";const en="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Vs=`${en} text-text-secondary`,Gs=`${en} text-success`;function Rc(e){const t=N("fileList2",Vs)??n.jsx(sn,{className:Vs}),a=N("download",en)??n.jsx(Mr,{className:en}),s=N("checkLine",Gs)??n.jsx(be,{className:Gs});return n.jsx(Ic,{headerIcon:t,downloadIcon:a,builtIcon:s,...e})}Rc.displayName="PlanPart";function Uh(e){const t=(e||"neutral").toLowerCase();return t==="soft"?"12px":t==="sharp"?"0":t==="dense"?"4px":"6px"}function Qh(){return typeof document>"u"?"neutral":document.documentElement.getAttribute("data-style")||document.body?.getAttribute("data-style")||"neutral"}function Yh(e,t,a){const[s,r]=m.useState(""),[o,i]=m.useState(""),c=a??Qh(),d=Uh(c);return m.useEffect(()=>{let u=!1;return(async()=>{if(i(""),r(""),!!e)try{const x=await import("mermaid"),g=x?.default??x,v=[`.node rect { rx: ${d}; ry: ${d}; }`,`.cluster rect { rx: ${d}; ry: ${d}; }`,`.label rect { rx: ${d}; ry: ${d}; }`,`.edgeLabel rect { rx: ${d}; ry: ${d}; }`,".node polygon { stroke-linejoin: round; stroke-linecap: round; }",".node path { stroke-linejoin: round; stroke-linecap: round; }",".cluster polygon { stroke-linejoin: round; stroke-linecap: round; }",".cluster path { stroke-linejoin: round; stroke-linecap: round; }"].join(`
|
|
268
|
+
`);g.initialize({startOnLoad:!1,securityLevel:"strict",theme:"dark",themeCSS:v});const f=`mermaid-${t.replace(/:/g,"")}`,{svg:b}=await g.render(f,e);u||r(b??"")}catch(x){u||i(x?.message??"Failed to render mermaid.")}})(),()=>{u=!0}},[t,e,d]),{svg:s,error:o}}const Xh="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",Zh=n.jsx(sn,{className:Xh});function Tc({content:e="",className:t,headerIcon:a,dataStyle:s}){const r=m.useId(),o=m.useMemo(()=>(e??"").trim(),[e]),{svg:i,error:c}=Yh(o,r,s),[d,u]=m.useState(1),p=m.useRef(null);m.useEffect(()=>{if(!i||c||!p.current)return;const f=p.current,b=h=>{if(h.ctrlKey||h.metaKey){h.preventDefault();const w=h.deltaY>0?-.1:.1;u(k=>Math.max(.5,Math.min(3,Math.round((k+w)*10)/10)))}};return f.addEventListener("wheel",b,{passive:!1}),()=>f.removeEventListener("wheel",b)},[i,c]);const x=()=>u(f=>Math.min(3,Math.round((f+.1)*10)/10)),g=()=>u(f=>Math.max(.5,Math.round((f-.1)*10)/10)),v=()=>u(1);return n.jsx(Te,{headerIcon:a??Zh,headerTitle:n.jsx("span",{className:"text-text-secondary",children:"Mermaid"}),headerRight:i&&!c?n.jsxs("div",{className:"flex items-center gap-1",onClick:f=>f.stopPropagation(),children:[n.jsx(W,{variant:"ghost",size:"sm",onClick:f=>{f.stopPropagation(),g()},className:"shrink-0 px-1.5 py-0.5 text-xs text-text-secondary hover:text-text","aria-label":"Zoom out",children:"−"}),n.jsxs("span",{className:"text-xs text-text-secondary min-w-[var(--spacing-10)] text-center",children:[Math.round(d*100),"%"]}),n.jsx(W,{variant:"ghost",size:"sm",onClick:f=>{f.stopPropagation(),v()},className:"shrink-0 px-1.5 py-0.5 text-xs text-text-secondary hover:text-text","aria-label":"Reset",children:"Reset"}),n.jsx(W,{variant:"ghost",size:"sm",onClick:f=>{f.stopPropagation(),x()},className:"shrink-0 px-1.5 py-0.5 text-xs text-text-secondary hover:text-text","aria-label":"Zoom in",children:"+"})]}):void 0,contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",className:t,children:o?c?n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"text-xs text-text-secondary",children:"Mermaid render unavailable."}),n.jsx("div",{className:"text-xs text-text-tertiary",children:c}),n.jsx("pre",{className:"m-0 whitespace-pre-wrap break-words font-mono text-xs text-text",children:o})]}):n.jsx("div",{className:"relative",ref:p,children:n.jsx(we,{scrollbarVisibility:"auto",maxHeight:600,className:"overflow-x-auto",children:n.jsx("div",{className:"flex justify-center items-center",style:{transform:`scale(${d})`,transformOrigin:"center top",minHeight:d>1?"100%":"auto"},children:n.jsx("div",{dangerouslySetInnerHTML:{__html:i}})})})}):n.jsx("div",{className:"text-xs text-text-tertiary",children:"Mermaid content is empty."})})}Tc.displayName="MermaidPart";const qs="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary";function Mc(e){const t=N("fileList2",qs)??n.jsx(sn,{className:qs}),{style:a}=ue();return n.jsx(Tc,{headerIcon:t,dataStyle:a,...e})}Mc.displayName="MermaidPart";const tn={javascript:"",typescript:"",react:"",json:"",html:"",css:"",python:"",java:"",go:"",rust:"",php:"",ruby:"",vue:"",svelte:"",markdown:"",yaml:"",xml:"",shell:"",sass:"",settings:"",default:""},qn={javascript:"var(--color-yellow)",typescript:"var(--color-blue)",react:"var(--color-blue)",json:"var(--color-yellow)",html:"var(--color-blue)",css:"var(--color-blue)",python:"var(--color-blue)",java:"var(--color-error)",go:"var(--color-blue)",rust:"var(--color-lavender)",php:"var(--color-purple)",ruby:"var(--color-error)",vue:"var(--color-success)",svelte:"var(--color-error)",markdown:"var(--color-blue)",yaml:"var(--color-purple)",xml:"var(--color-orange)",shell:"var(--color-success)",sass:"var(--color-error)",settings:"var(--color-lavender)",default:"var(--color-lavender)"},ft={js:"javascript",jsx:"react",ts:"typescript",tsx:"typescript",json:"json",html:"html",css:"css",scss:"sass",sass:"sass",less:"css",py:"python",java:"java",go:"go",rs:"rust",php:"php",rb:"ruby",vue:"vue",svelte:"svelte",md:"markdown",yml:"yaml",yaml:"yaml",xml:"xml",sh:"shell",bash:"shell",zsh:"shell",config:"settings",conf:"settings"},Wn={javascript:"text-info",typescript:"text-info",react:"text-info",json:"text-info",html:"text-info",css:"text-info",python:"text-teal",java:"text-error",go:"text-info",rust:"text-text-tertiary",php:"text-text-tertiary",ruby:"text-error",vue:"text-success",svelte:"text-error",markdown:"text-text-secondary",yaml:"text-text-tertiary",xml:"text-text-tertiary",shell:"text-success",sass:"text-error",settings:"text-text-tertiary",default:"text-text-tertiary"};function Mn(e,t){let a=null;if(t&&typeof t=="string"&&t.trim()){const s=t.lastIndexOf(".");if(s>0&&s<t.length-1){const r=t.substring(s+1).toLowerCase().trim();r&&ft[r]&&(a=ft[r])}}if(!a&&e&&typeof e=="string"&&e.trim()){const s=e.toLowerCase().trim();ft[s]?a=ft[s]:tn[s]&&(a=s)}return a||"default"}function Kh(e,t){const a=Mn(e,t);return tn[a]??tn.default}function Jh(e,t){const a=Mn(e,t);return qn[a]??qn.default}function Pc(e,t){const a=Mn(e,t);return Wn[a]??Wn.default}const Ws="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",e1={plain:{color:"var(--color-text)"},styles:[{types:["comment","prolog","cdata"],style:{color:"var(--color-text-tertiary)"}},{types:["keyword","atrule"],style:{color:"var(--color-blue)"}},{types:["string","attr-value","inserted"],style:{color:"var(--color-success)"}},{types:["number","constant","boolean"],style:{color:"var(--color-success)"}},{types:["function","function-variable"],style:{color:"var(--color-purple)"}},{types:["punctuation","operator","deleted"],style:{color:"var(--color-text-tertiary)"}},{types:["property","tag","selector"],style:{color:"var(--color-pink)"}},{types:["regex","important","variable"],style:{color:"var(--color-text)"}}]},t1={javascript:"js",typescript:"ts",jsx:"jsx",tsx:"tsx",python:"py",java:"java",go:"go",rust:"rs",html:"html",css:"css",json:"json",yaml:"yml",markdown:"md",shell:"sh",bash:"sh"};function n1(e,t){if(e&&e.trim())return e;const a=(t??"text").toLowerCase(),s=t1[a]??"txt";return`${a}.${s}`}function zc({language:e="javascript",code:t="",filename:a,diffType:s=null,diffLines:r=null,isGenerating:o=!1,defaultExpanded:i=!0,className:c,headerIcon:d,getFileIcon:u}){const p=m.useMemo(()=>n1(a,e),[a,e]),x=m.useMemo(()=>s&&t?t.split(`
|
|
269
|
+
`).length:r??null,[t,s,r]),g=e?.toLowerCase(),v=o?n.jsx(H.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:n.jsx(br,{className:l(Ws,"text-text-secondary")})}):u?u(g,p):n.jsx("span",{className:l(Pc(g,p)),children:n.jsx(Kn,{className:Ws})}),f=s&&x!=null?n.jsxs("span",{className:l("font-normal text-xs leading-xs",s==="add"?"text-success":"text-error"),children:[s==="add"?"+":"-",x]}):null,b=l("overflow-x-auto text-left scrollbar-auto",s==="add"&&"bg-success-bg border-l-[3px] border-l-[var(--color-success-border)] -ml-5 pl-5",s==="remove"&&"bg-error-bg border-l-[3px] border-l-[var(--color-error-border)] -ml-5 pl-5"),h=(e??"text").toLowerCase();return n.jsx(Te,{headerIcon:d??v,headerTitle:n.jsx("span",{className:"font-normal",children:p}),headerRight:f,defaultExpanded:i,contentPadding:"var(--spacing-2) 0 var(--spacing-2) var(--spacing-5)",titleShimmer:o,className:c,children:n.jsx("div",{className:b,children:n.jsx(ld.Highlight,{theme:e1,code:t,language:h,children:({className:w,style:k,tokens:j,getLineProps:I,getTokenProps:C})=>n.jsx("pre",{className:l(w,"m-0 text-left bg-transparent font-mono text-xs font-normal leading-xs whitespace-pre"),style:k,children:n.jsx("code",{className:"text-left block",children:j.map((L,z)=>n.jsx("div",{...I({line:L}),children:L.map((S,O)=>n.jsx("span",{...C({token:S})},O))},z))})})})})})}zc.displayName="CodeBlockPart";const a1="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0";function Lc(e){const{getFileIcon:t}=jt(),a=e.getFileIcon??(t?(s,r)=>t(r??"",a1):void 0);return n.jsx(zc,{getFileIcon:a,...e})}Lc.displayName="CodeBlockPart";const Dc="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",s1=n.jsx(zr,{className:Dc}),r1=n.jsx(Lr,{className:Dc});function Ac({command:e,output:t,autoRanCommand:a,className:s,headerIcon:r,externalLinkIcon:o}){const i=a??(e!=null?`Auto-Ran command: ${e}`:"Terminal");return n.jsx(Te,{headerIcon:r??s1,headerTitle:n.jsx("span",{className:"font-normal",children:i}),headerRight:n.jsx(Ie,{variant:"iconOnly",size:"sm",icon:o??r1,"aria-label":"Open in terminal",className:"!min-h-0 !min-w-0 h-[var(--font-size-sm)] w-[var(--font-size-sm)] text-text-secondary hover:text-text [&_svg]:w-[var(--font-size-sm)] [&_svg]:h-[var(--font-size-sm)]"}),contentPadding:"0",className:s,children:n.jsxs("div",{className:"flex flex-col gap-0",children:[e!=null&&e!==""&&n.jsx("div",{className:"px-2 py-1.5",children:n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"font-mono text-xs text-text shrink-0",children:"$"}),n.jsx("pre",{className:"m-0 flex-1 overflow-x-auto text-left font-mono text-xs leading-xs whitespace-pre text-text bg-transparent scrollbar-auto",children:n.jsx("code",{children:e})})]})}),t!=null&&t!==""&&n.jsx("div",{className:"px-2 py-1.5 overflow-x-auto text-left scrollbar-auto",children:n.jsx("pre",{className:"m-0 p-0 font-mono text-xs leading-xs whitespace-pre-wrap break-all text-text-tertiary bg-transparent",children:t})})]})})}Ac.displayName="TerminalCodeBlockPart";const qt="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary";function _c(e){const t=N("terminalBox",qt)??n.jsx(zr,{className:qt}),a=N("externalLink",qt)??n.jsx(Lr,{className:qt});return n.jsx(Ac,{headerIcon:t,externalLinkIcon:a,...e})}_c.displayName="TerminalCodeBlockPart";const os="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",o1=n.jsx(Dr,{className:`${os} text-text-secondary`}),i1=n.jsx(kt,{className:`${os} text-warning`}),l1=n.jsx(Ar,{className:`${os} text-text-secondary`});function c1({askValue:e,onAskChange:t,onSkip:a,onRun:s,dataStyle:r,dataTheme:o}){return n.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[n.jsx("div",{className:"shrink-0 w-fit",children:n.jsxs(Eo,{value:e,onValueChange:t,children:[n.jsx(ya,{className:"h-7 w-auto min-w-0 border-0 bg-transparent px-2 py-0 text-xs text-text-tertiary hover:text-text [&>svg]:w-[var(--font-size-sm)] [&>svg]:h-[var(--font-size-sm)]",onClick:i=>i.stopPropagation(),children:n.jsx(Fo,{})}),n.jsxs(wa,{dataStyle:r,dataTheme:o,onClick:i=>i.stopPropagation(),children:[n.jsx(gt,{value:"Ask every time",children:"Ask every time"}),n.jsx(gt,{value:"Always allow",children:"Always allow"}),n.jsx(gt,{value:"Always deny",children:"Always deny"})]})]})}),n.jsx("div",{className:"flex-1 h-4 border-l border-border-tertiary opacity-10"}),n.jsx(W,{variant:"ghost",size:"sm",onClick:i=>{i.stopPropagation(),a()},children:"Skip ⌘⌫"}),n.jsx(W,{variant:"secondary",size:"sm",onClick:i=>{i.stopPropagation(),s()},children:"Run ⌘⏎"})]})}function Oc({description:e,content:t,status:a="normal",onRun:s,onSkip:r,onViewDetail:o,onAskEveryTimeChange:i,className:c,dataStyle:d,dataTheme:u,normalIcon:p,failedIcon:x,skippedIcon:g}){const[v,f]=m.useState("Ask every time"),b=I=>{f(I),i?.(I)},h=a==="failed"?x??i1:a==="skipped"?g??l1:p??o1,w=a==="failed"?n.jsx("span",{children:"Browser Failed"}):a==="skipped"?n.jsx("span",{children:"Browser Skipped"}):n.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[n.jsx("span",{className:"shrink-0",children:"Browser"}),e!=null&&n.jsx("span",{className:"flex-1 min-w-0 truncate text-text-tertiary",children:e})]}),k=a==="failed"?n.jsx(W,{variant:"text",size:"sm",onClick:I=>{I.stopPropagation(),o?.()},children:"View Detail"}):void 0,j=a==="normal"?n.jsx(c1,{askValue:v,onAskChange:b,onSkip:()=>r?.(),onRun:()=>s?.(),dataStyle:d,dataTheme:u}):void 0;return n.jsx(Te,{headerIcon:h,headerTitle:w,headerRight:k,contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",defaultExpanded:a==="normal",collapsible:a==="normal",footer:j,className:c,children:t!=null&&t!==""&&n.jsx("span",{className:"text-xs leading-xs text-text whitespace-pre-wrap break-words",children:t})})}Oc.displayName="BrowserActionPart";const is="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0",Us=`${is} text-text-secondary`,Qs=`${is} text-warning`,Ys=`${is} text-text-secondary`;function Ec(e){const{style:t,theme:a}=ue(),s=N("global",Us)??n.jsx(Dr,{className:Us}),r=N("warning",Qs)??n.jsx(kt,{className:Qs}),o=N("forbid2",Ys)??n.jsx(Ar,{className:Ys});return n.jsx(Oc,{normalIcon:s,failedIcon:r,skippedIcon:o,dataStyle:e.dataStyle??t,dataTheme:e.dataTheme??a,...e})}Ec.displayName="BrowserActionPart";const d1="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary",u1=n.jsx(Pr,{className:d1});function Fc({title:e="Initializing agent…",question:t,skipText:a="Skip ⌘⌫",runText:s="Run ⌘⏎",askTimeText:r="Ask any time",onSkip:o,onRun:i,contentMaxHeight:c,collapsible:d=!0,className:u,headerIcon:p}){return n.jsx(Te,{headerIcon:p??u1,headerTitle:n.jsx("span",{className:"text-left",children:e}),contentPadding:"var(--spacing-1\\.5) var(--spacing-2)",defaultExpanded:!0,contentMaxHeight:c,collapsible:d,footer:n.jsxs(n.Fragment,{children:[n.jsxs(W,{variant:"ghost",size:"sm",className:"gap-1 py-0.5 px-0 text-text-secondary hover:text-text",children:[n.jsx("span",{className:"text-xs",children:r}),n.jsx(ve,{className:"w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0"})]}),n.jsx("div",{className:"flex-1"}),n.jsx(W,{variant:"ghost",size:"sm",onClick:o,className:"bg-fill text-text-tertiary hover:bg-fill-secondary hover:text-text-secondary",children:a}),n.jsx(W,{variant:"secondary",size:"sm",onClick:i,children:s})]}),className:u,children:n.jsx("div",{className:"text-sm text-left",children:n.jsx("span",{className:"text-text",children:t})})})}Fc.displayName="AskUserPart";const Xs="w-[var(--font-size-sm)] h-[var(--font-size-sm)] shrink-0 text-text-secondary";function $c(e){const t=N("questionnaire",Xs)??n.jsx(Pr,{className:Xs});return n.jsx(Fc,{headerIcon:t,...e})}$c.displayName="AskUserPart";Object.defineProperty(exports,"toast",{enumerable:!0,get:()=>Ks.toast});exports.Alert=Pi;exports.AlertDescription=Li;exports.AlertDialog=so;exports.AlertDialogAction=oo;exports.AlertDialogCancel=ma;exports.AlertDialogContent=io;exports.AlertDialogDescription=ua;exports.AlertDialogFooter=ca;exports.AlertDialogHeader=la;exports.AlertDialogMedia=lo;exports.AlertDialogOverlay=oa;exports.AlertDialogPortal=ro;exports.AlertDialogTitle=da;exports.AlertDialogTrigger=qu;exports.AlertTitle=zi;exports.AskUserPart=$c;exports.AspectRatio=Um;exports.Avatar=To;exports.AvatarBadge=zo;exports.AvatarFallback=Po;exports.AvatarGroup=Lo;exports.AvatarGroupCount=Do;exports.AvatarImage=Mo;exports.Breadcrumb=Di;exports.BreadcrumbEllipsis=$i;exports.BreadcrumbItem=_i;exports.BreadcrumbLink=Oi;exports.BreadcrumbList=Ai;exports.BreadcrumbPage=Ei;exports.BreadcrumbSeparator=Fi;exports.BrowserActionPart=Ec;exports.Button=W;exports.ButtonGroup=Or;exports.ButtonGroupSeparator=Fr;exports.ButtonGroupText=Er;exports.Calendar=vl;exports.CalendarDayButton=wl;exports.Card=ji;exports.CardAction=Ii;exports.CardContent=Ri;exports.CardDescription=Si;exports.CardFooter=Ti;exports.CardHeader=Ni;exports.CardTitle=Ci;exports.Carousel=px;exports.CarouselContent=xx;exports.CarouselItem=fx;exports.CarouselNext=gx;exports.CarouselPrevious=hx;exports.ChartContainer=wx;exports.ChartLegend=Nx;exports.ChartLegendContent=Cx;exports.ChartStyle=Tl;exports.ChartTooltip=kx;exports.ChartTooltipContent=jx;exports.ChatInput=Bx;exports.ChatInputAbove=Nt;exports.ChatInputActions=It;exports.ChatInputActionsLeft=Rt;exports.ChatInputActionsRight=it;exports.ChatInputAttachments=xn;exports.ChatInputBox=Ct;exports.ChatInputExpandButton=fn;exports.ChatInputFolderButton=Tt;exports.ChatInputFooterLeft=Pt;exports.ChatInputInput=St;exports.ChatInputMoreButton=Mt;exports.ChatInputRoot=Va;exports.ChatInputSendButton=Ga;exports.Checkbox=ki;exports.CodeBlockPart=Lc;exports.Collapse=Wo;exports.CollapseContent=Yo;exports.CollapseItem=Uo;exports.CollapseTrigger=Qo;exports.Collapsible=rm;exports.CollapsibleCard=Te;exports.CollapsibleContent=wo;exports.CollapsibleSection=vo;exports.CollapsibleTrigger=om;exports.Combobox=tp;exports.Command=Fa;exports.CommandDialog=K0;exports.CommandEmpty=gl;exports.CommandGroup=yl;exports.CommandInput=fl;exports.CommandItem=bl;exports.CommandList=hl;exports.CommandSeparator=J0;exports.CommandShortcut=ep;exports.ContextMenu=w0;exports.ContextMenuCheckboxItem=rl;exports.ContextMenuContent=dl;exports.ContextMenuGroup=j0;exports.ContextMenuItem=al;exports.ContextMenuLabel=il;exports.ContextMenuPortal=N0;exports.ContextMenuRadioGroup=S0;exports.ContextMenuRadioItem=ol;exports.ContextMenuSeparator=ll;exports.ContextMenuShortcut=cl;exports.ContextMenuSub=C0;exports.ContextMenuSubContent=ul;exports.ContextMenuSubTrigger=tl;exports.ContextMenuTrigger=k0;exports.ConversationAnchorNav=vc;exports.DataTable=yx;exports.DatePicker=mx;exports.Dialog=Bi;exports.DialogClose=f0;exports.DialogContent=Gi;exports.DialogDescription=Ma;exports.DialogFooter=Vi;exports.DialogHeader=Ra;exports.DialogOverlay=Sa;exports.DialogPortal=Hi;exports.DialogTitle=Ta;exports.DialogTrigger=x0;exports.DirectionProvider=Ix;exports.Drawer=qi;exports.DrawerClose=Ui;exports.DrawerContent=Yi;exports.DrawerDescription=_a;exports.DrawerFooter=Da;exports.DrawerHeader=La;exports.DrawerOverlay=cn;exports.DrawerPortal=Pa;exports.DrawerTitle=Aa;exports.DrawerTrigger=Wi;exports.DropdownMenu=We;exports.DropdownMenuCheckboxItem=Xr;exports.DropdownMenuContent=no;exports.DropdownMenuGroup=Ou;exports.DropdownMenuItem=Se;exports.DropdownMenuLabel=Kr;exports.DropdownMenuPortal=Eu;exports.DropdownMenuRadioGroup=Fu;exports.DropdownMenuRadioItem=Zr;exports.DropdownMenuSeparator=Jr;exports.DropdownMenuShortcut=eo;exports.DropdownMenuSub=Ur;exports.DropdownMenuSubContent=ao;exports.DropdownMenuSubTrigger=Gu;exports.DropdownMenuTrigger=Ue;exports.EllipsisText=Wr;exports.Empty=Qm;exports.EmptyContent=e0;exports.EmptyDescription=Jm;exports.EmptyHeader=Ym;exports.EmptyMedia=Zm;exports.EmptyTitle=Km;exports.FILE_TYPE_MAP=ft;exports.Field=$m;exports.FieldContent=Bm;exports.FieldDescription=Gm;exports.FieldError=Wm;exports.FieldGroup=Em;exports.FieldLabel=Hm;exports.FieldLegend=Om;exports.FieldSeparator=qm;exports.FieldSet=_m;exports.FieldTitle=Vm;exports.FileAttachment=ec;exports.FileCard=Kl;exports.FileReviewPart=Nc;exports.FolderButton=zl;exports.FunctionSwitch=Zu;exports.GeneratedImagesGrid=mc;exports.GenerationStatusBar=Ba;exports.HintBanner=Vl;exports.HoverCard=b0;exports.HoverCardContent=Ki;exports.HoverCardTrigger=v0;exports.IconButton=Ie;exports.IconsProvider=Vu;exports.ImageAttachment=nc;exports.ImageGenerating=uc;exports.Input=ja;exports.InputGroup=Nm;exports.InputGroupAddon=Sm;exports.InputGroupButton=Rm;exports.InputGroupInput=Mm;exports.InputGroupText=Tm;exports.InputGroupTextarea=Pm;exports.InputOTP=zm;exports.InputOTPGroup=Lm;exports.InputOTPSeparator=Am;exports.InputOTPSlot=Dm;exports.Item=s0;exports.ItemActions=d0;exports.ItemContent=i0;exports.ItemDescription=c0;exports.ItemFooter=m0;exports.ItemGroup=t0;exports.ItemHeader=u0;exports.ItemMedia=o0;exports.ItemSeparator=n0;exports.ItemTitle=l0;exports.Kbd=co;exports.KbdGroup=uo;exports.Label=Ca;exports.MOTION_DURATION=Ce;exports.MOTION_EASE=Pe;exports.MOTION_EXPAND=Br;exports.MOTION_FADE=on;exports.MOTION_SCALE_IN=ut;exports.MOTION_SLIDE_UP=ta;exports.MOTION_SPRING=$r;exports.MarkdownBody=lt;exports.Menubar=M0;exports.MenubarCheckboxItem=O0;exports.MenubarContent=A0;exports.MenubarGroup=z0;exports.MenubarItem=_0;exports.MenubarLabel=F0;exports.MenubarMenu=P0;exports.MenubarPortal=ml;exports.MenubarRadioGroup=L0;exports.MenubarRadioItem=E0;exports.MenubarSeparator=$0;exports.MenubarShortcut=B0;exports.MenubarSub=H0;exports.MenubarSubContent=G0;exports.MenubarSubTrigger=V0;exports.MenubarTrigger=D0;exports.MermaidPart=Mc;exports.NativeSelect=np;exports.NativeSelectOptGroup=sp;exports.NativeSelectOption=ap;exports.NavigationMenu=q0;exports.NavigationMenuContent=Y0;exports.NavigationMenuIndicator=Z0;exports.NavigationMenuItem=U0;exports.NavigationMenuLink=X0;exports.NavigationMenuList=W0;exports.NavigationMenuTrigger=Q0;exports.NavigationMenuViewport=xl;exports.OptionList=aa;exports.Pagination=di;exports.PaginationContent=ui;exports.PaginationEllipsis=hi;exports.PaginationItem=mi;exports.PaginationLink=pi;exports.PaginationNext=fi;exports.PaginationPrevious=xi;exports.PermissionCard=dc;exports.PlanPart=Rc;exports.Popover=Oa;exports.PopoverAnchor=y0;exports.PopoverContent=Xi;exports.PopoverTrigger=Ea;exports.Progress=yi;exports.QueueIndicator=bc;exports.RadioGroup=yo;exports.RadioGroupItem=bo;exports.ReasoningStep=Uf;exports.RelatedPrompts=Bl;exports.ResizableHandle=No;exports.ResizablePanel=jo;exports.ResizablePanelGroup=ko;exports.Response=Ff;exports.SETI_CHAR_MAP=tn;exports.SETI_COLOR_MAP=qn;exports.ScrollArea=Sx;exports.ScrollBar=Ml;exports.Scrollbar=we;exports.Select=Eo;exports.SelectContent=Ho;exports.SelectGroup=xm;exports.SelectItem=gt;exports.SelectLabel=$o;exports.SelectScrollDownButton=va;exports.SelectScrollUpButton=ba;exports.SelectSeparator=Bo;exports.SelectTrigger=ya;exports.SelectValue=Fo;exports.SendButton=Ha;exports.Separator=ln;exports.Sheet=qi;exports.SheetClose=Ui;exports.SheetContent=za;exports.SheetDescription=_a;exports.SheetFooter=Da;exports.SheetHeader=La;exports.SheetOverlay=cn;exports.SheetPortal=Pa;exports.SheetTitle=Aa;exports.SheetTrigger=Wi;exports.ShimmeringText=So;exports.SidebarMenu=vi;exports.Skeleton=Co;exports.Slider=ci;exports.Spinner=rn;exports.StreamingMarkdownBlock=Xa;exports.Switch=pa;exports.TYPE_TO_TOKEN_CLASS=Wn;exports.Table=xa;exports.TableBody=ha;exports.TableCaption=Ro;exports.TableCell=Qt;exports.TableFooter=Io;exports.TableHead=ga;exports.TableHeader=fa;exports.TableRow=ht;exports.Tabs=hm;exports.TabsContent=qo;exports.TabsList=Vo;exports.TabsTrigger=Go;exports.Tag=ka;exports.TaskPart=Sc;exports.TerminalCodeBlockPart=_c;exports.Textarea=Na;exports.ThemeStyleProvider=Lu;exports.ThinkingIndicator=ns;exports.Toaster=Oo;exports.Toggle=xo;exports.ToggleGroup=ho;exports.ToggleGroupItem=go;exports.ToolInvocationCard=lc;exports.Tooltip=na;exports.TypographyBlockquote=ti;exports.TypographyH1=Xo;exports.TypographyH2=Zo;exports.TypographyH3=Ko;exports.TypographyH4=Jo;exports.TypographyInlineCode=si;exports.TypographyLarge=oi;exports.TypographyLead=ri;exports.TypographyList=ai;exports.TypographyMuted=li;exports.TypographyP=ei;exports.TypographySmall=ii;exports.TypographyTable=ni;exports.UserMessage=Yl;exports.UserQuestion=vh;exports.UserQuestionAnswer=gc;exports.alertVariants=Mi;exports.buttonGroupVariants=_r;exports.checkboxVariants=wi;exports.getFileIconColorClass=Pc;exports.getMotionMultiplier=Su;exports.getReducedMotion=Cu;exports.getSetiIcon=Kh;exports.getSetiIconColor=Jh;exports.getSetiIconType=Mn;exports.navigationMenuTriggerStyle=pl;exports.sheetVariants=Qi;exports.tagVariants=gi;exports.useDirection=Rx;exports.useIcon=N;exports.useIcons=jt;exports.useThemeStyle=ue;exports.useVisibleAnchorIndex=wc;
|