@memoreco/ui 0.2.12 → 0.2.13

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var hc=Object.create;var Gr=Object.defineProperty;var mc=Object.getOwnPropertyDescriptor;var gc=Object.getOwnPropertyNames;var vc=Object.getPrototypeOf,yc=Object.prototype.hasOwnProperty;var xc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gc(t))!yc.call(e,o)&&o!==n&&Gr(e,o,{get:()=>t[o],enumerable:!(r=mc(t,o))||r.enumerable});return e};var bc=(e,t,n)=>(n=e!=null?hc(vc(e)):{},xc(t||!e||!e.__esModule?Gr(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),w=require("react"),Sn=require("react-dom"),wc=require("react-markdown"),Cc=require("remark-gfm");function us(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=us(w),En=us(Sn);function qr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fs(...e){return t=>{let n=!1;const r=e.map(o=>{const s=qr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():qr(e[o],null)}}}}function oe(...e){return p.useCallback(fs(...e),e)}function Ft(e){const t=Ec(e),n=p.forwardRef((r,o)=>{const{children:s,...i}=r,a=p.Children.toArray(s),c=a.find(Rc);if(c){const l=c.props.children,u=a.map(d=>d===c?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:d);return f.jsx(t,{...i,ref:o,children:p.isValidElement(l)?p.cloneElement(l,void 0,u):null})}return f.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Sc=Ft("Slot");function Ec(e){const t=p.forwardRef((n,r)=>{const{children:o,...s}=n;if(p.isValidElement(o)){const i=Tc(o),a=Ac(s,o.props);return o.type!==p.Fragment&&(a.ref=r?fs(r,i):i),p.cloneElement(o,a)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ps=Symbol("radix.slottable");function Nc(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ps,t}function Rc(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ps}function Ac(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Tc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hs(e))&&(r&&(r+=" "),r+=t);return r}const Yr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xr=fr,en=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xr(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],d=s==null?void 0:s[l];if(u===null)return null;const h=Yr(u)||Yr(d);return o[l][h]}),a=n&&Object.entries(n).reduce((l,u)=>{let[d,h]=u;return h===void 0||(l[d]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:h,...m}=u;return Object.entries(m).every(v=>{let[g,x]=v;return Array.isArray(x)?x.includes({...s,...a}[g]):{...s,...a}[g]===x})?[...l,d,h]:l},[]);return Xr(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},pr="-",Pc=e=>{const t=Dc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(pr);return a[0]===""&&a.length!==1&&a.shift(),ms(a,t)||kc(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},ms=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ms(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(pr);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Kr=/^\[(.+)\]$/,kc=e=>{if(Kr.test(e)){const t=Kr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Dc=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jc(Object.entries(e.classGroups),n).forEach(([s,i])=>{Qn(i,r,s,t)}),r},Qn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Zr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Mc(o)){Qn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Qn(i,Zr(t,s),n,r)})})},Zr=(e,t)=>{let n=e;return t.split(pr).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Mc=e=>e.isThemeGetter,jc=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,_c=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},gs="!",Ic=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const c=[];let l=0,u=0,d;for(let x=0;x<a.length;x++){let y=a[x];if(l===0){if(y===o&&(r||a.slice(x,x+s)===t)){c.push(a.slice(u,x)),u=x+s;continue}if(y==="/"){d=x;continue}}y==="["?l++:y==="]"&&l--}const h=c.length===0?a:a.substring(u),m=h.startsWith(gs),v=m?h.substring(1):h,g=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:i}):i},Oc=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Lc=e=>({cache:_c(e.cacheSize),parseClassName:Ic(e),...Pc(e)}),$c=/\s+/,Fc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split($c);let a="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=n(l);let v=!!m,g=r(v?h.substring(0,m):h);if(!g){if(!v){a=l+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=l+(a.length>0?" "+a:a);continue}v=!1}const x=Oc(u).join(":"),y=d?x+gs:x,b=y+g;if(s.includes(b))continue;s.push(b);const C=o(g,v);for(let S=0;S<C.length;++S){const R=C[S];s.push(y+R)}a=l+(a.length>0?" "+a:a)}return a};function zc(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vs(t))&&(r&&(r+=" "),r+=n);return r}const vs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vs(e[r]))&&(n&&(n+=" "),n+=t);return n};function Bc(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((u,d)=>d(u),e());return n=Lc(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=Fc(c,n);return o(c,u),u}return function(){return s(zc.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ys=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wc=/^\d+\/\d+$/,Vc=new Set(["px","full","screen"]),Hc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uc=/\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$/,Gc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Je=e=>It(e)||Vc.has(e)||Wc.test(e),it=e=>Bt(e,"length",nd),It=e=>!!e&&!Number.isNaN(Number(e)),Wn=e=>Bt(e,"number",It),Yt=e=>!!e&&Number.isInteger(Number(e)),Xc=e=>e.endsWith("%")&&It(e.slice(0,-1)),X=e=>ys.test(e),at=e=>Hc.test(e),Kc=new Set(["length","size","percentage"]),Zc=e=>Bt(e,Kc,xs),Qc=e=>Bt(e,"position",xs),Jc=new Set(["image","url"]),ed=e=>Bt(e,Jc,od),td=e=>Bt(e,"",rd),Xt=()=>!0,Bt=(e,t,n)=>{const r=ys.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},nd=e=>Uc.test(e)&&!Gc.test(e),xs=()=>!1,rd=e=>qc.test(e),od=e=>Yc.test(e),sd=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),o=le("borderColor"),s=le("borderRadius"),i=le("borderSpacing"),a=le("borderWidth"),c=le("contrast"),l=le("grayscale"),u=le("hueRotate"),d=le("invert"),h=le("gap"),m=le("gradientColorStops"),v=le("gradientColorStopPositions"),g=le("inset"),x=le("margin"),y=le("opacity"),b=le("padding"),C=le("saturate"),S=le("scale"),R=le("sepia"),M=le("skew"),A=le("space"),$=le("translate"),B=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",X,t],P=()=>[X,t],I=()=>["",Je,it],D=()=>["auto",It,X],k=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],T=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",X],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[It,X];return{cacheSize:500,separator:":",theme:{colors:[Xt],spacing:[Je,it],blur:["none","",at,X],brightness:H(),borderColor:[e],borderRadius:["none","","full",at,X],borderSpacing:P(),borderWidth:I(),contrast:H(),grayscale:_(),hueRotate:H(),invert:_(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Xc,it],inset:j(),margin:j(),opacity:H(),padding:P(),saturate:H(),scale:H(),sepia:_(),skew:H(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[at]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:[...k(),X]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yt,X]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Yt,X]}],"grid-cols":[{"grid-cols":[Xt]}],"col-start-end":[{col:["auto",{span:["full",Yt,X]},X]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Xt]}],"row-start-end":[{row:["auto",{span:[Yt,X]},X]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",X]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",X]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,t]}],"min-w":[{"min-w":[X,t,"min","max","fit"]}],"max-w":[{"max-w":[X,t,"none","full","min","max","fit","prose",{screen:[at]},at]}],h:[{h:[X,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,t,"auto","min","max","fit"]}],"font-size":[{text:["base",at,it]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wn]}],"font-family":[{font:[Xt]}],"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:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",It,Wn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Je,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Je,it]}],"underline-offset":[{"underline-offset":["auto",Je,X]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...k(),Qc]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zc]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ed]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:N()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[Je,X]}],"outline-w":[{outline:[Je,it]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Je,it]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",at,td]}],"shadow-color":[{shadow:[Xt]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...T(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":T()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",at,X]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[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:["none","all","","colors","opacity","shadow","transform",X]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Yt,X]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",X]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",X]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Je,it,Wn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},bs=Bc(sd);var id=Object.defineProperty,ad=(e,t,n)=>t in e?id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,et=(e,t,n)=>ad(e,typeof t!="symbol"?t+"":t,n);function Nt(...e){return bs(fr(e))}process.env.NEXT_PUBLIC_API_BASE_URL;process.env.NEXT_PUBLIC_SUPABASE_URL;process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY;const ld=class ws{constructor(t){et(this,"el"),et(this,"primed",!1),et(this,"timer",null),et(this,"resetTimer",null),et(this,"opts"),et(this,"inGroup",!1),et(this,"currentTarget",null),et(this,"obstacleSelector",null);var n,r;this.opts={initialDelayMs:(t==null?void 0:t.initialDelayMs)??350,resetDelayMs:(t==null?void 0:t.resetDelayMs)??400};const o=globalThis.document;this.el=o?o.createElement("div"):{};const s=this.getDesiredZIndex();this.el.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),w=require("react"),An=require("react-dom"),Mc=require("react-markdown"),Dc=require("remark-gfm");function Cs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Cs(w),Tn=Cs(An);function so(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Es(...e){return t=>{let n=!1;const r=e.map(o=>{const s=so(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():so(e[o],null)}}}}function fe(...e){return f.useCallback(Es(...e),e)}function _t(e){const t=Ic(e),n=f.forwardRef((r,o)=>{const{children:s,...i}=r,a=f.Children.toArray(s),c=a.find(Oc);if(c){const l=c.props.children,u=a.map(d=>d===c?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return p.jsx(t,{...i,ref:o,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var jc=_t("Slot");function Ic(e){const t=f.forwardRef((n,r)=>{const{children:o,...s}=n;if(f.isValidElement(o)){const i=$c(o),a=Lc(s,o.props);return o.type!==f.Fragment&&(a.ref=r?Es(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rs=Symbol("radix.slottable");function _c(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Rs,t}function Oc(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rs}function Lc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function $c(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ns(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ns(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ns(e))&&(r&&(r+=" "),r+=t);return r}const io=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ao=Sr,Jt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ao(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],d=s==null?void 0:s[l];if(u===null)return null;const h=io(u)||io(d);return o[l][h]}),a=n&&Object.entries(n).reduce((l,u)=>{let[d,h]=u;return h===void 0||(l[d]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:h,...m}=u;return Object.entries(m).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...s,...a}[g]):{...s,...a}[g]===y})?[...l,d,h]:l},[]);return ao(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Cr="-",Fc=e=>{const t=Bc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Cr);return a[0]===""&&a.length!==1&&a.shift(),As(a,t)||zc(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},As=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?As(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Cr);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},lo=/^\[(.+)\]$/,zc=e=>{if(lo.test(e)){const t=lo.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Bc=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Hc(Object.entries(e.classGroups),n).forEach(([s,i])=>{lr(i,r,s,t)}),r},lr=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:co(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Vc(o)){lr(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{lr(i,co(t,s),n,r)})})},co=(e,t)=>{let n=e;return t.split(Cr).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Vc=e=>e.isThemeGetter,Hc=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,Wc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Ts="!",Uc=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const c=[];let l=0,u=0,d;for(let y=0;y<a.length;y++){let x=a[y];if(l===0){if(x===o&&(r||a.slice(y,y+s)===t)){c.push(a.slice(u,y)),u=y+s;continue}if(x==="/"){d=y;continue}}x==="["?l++:x==="]"&&l--}const h=c.length===0?a:a.substring(u),m=h.startsWith(Ts),v=m?h.substring(1):h,g=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:i}):i},Gc=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Zc=e=>({cache:Wc(e.cacheSize),parseClassName:Uc(e),...Fc(e)}),qc=/\s+/,Yc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(qc);let a="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=n(l);let v=!!m,g=r(v?h.substring(0,m):h);if(!g){if(!v){a=l+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=l+(a.length>0?" "+a:a);continue}v=!1}const y=Gc(u).join(":"),x=d?y+Ts:y,b=x+g;if(s.includes(b))continue;s.push(b);const S=o(g,v);for(let C=0;C<S.length;++C){const E=S[C];s.push(x+E)}a=l+(a.length>0?" "+a:a)}return a};function Kc(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ps(t))&&(r&&(r+=" "),r+=n);return r}const Ps=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ps(e[r]))&&(n&&(n+=" "),n+=t);return n};function Xc(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((u,d)=>d(u),e());return n=Zc(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=Yc(c,n);return o(c,u),u}return function(){return s(Kc.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ks=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qc=/^\d+\/\d+$/,Jc=new Set(["px","full","screen"]),ed=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,td=/\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$/,nd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,od=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Je=e=>Mt(e)||Jc.has(e)||Qc.test(e),st=e=>Lt(e,"length",fd),Mt=e=>!!e&&!Number.isNaN(Number(e)),Xn=e=>Lt(e,"number",Mt),Gt=e=>!!e&&Number.isInteger(Number(e)),sd=e=>e.endsWith("%")&&Mt(e.slice(0,-1)),J=e=>ks.test(e),it=e=>ed.test(e),id=new Set(["length","size","percentage"]),ad=e=>Lt(e,id,Ms),ld=e=>Lt(e,"position",Ms),cd=new Set(["image","url"]),dd=e=>Lt(e,cd,hd),ud=e=>Lt(e,"",pd),Zt=()=>!0,Lt=(e,t,n)=>{const r=ks.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},fd=e=>td.test(e)&&!nd.test(e),Ms=()=>!1,pd=e=>rd.test(e),hd=e=>od.test(e),md=()=>{const e=he("colors"),t=he("spacing"),n=he("blur"),r=he("brightness"),o=he("borderColor"),s=he("borderRadius"),i=he("borderSpacing"),a=he("borderWidth"),c=he("contrast"),l=he("grayscale"),u=he("hueRotate"),d=he("invert"),h=he("gap"),m=he("gradientColorStops"),v=he("gradientColorStopPositions"),g=he("inset"),y=he("margin"),x=he("opacity"),b=he("padding"),S=he("saturate"),C=he("scale"),E=he("sepia"),T=he("skew"),R=he("space"),$=he("translate"),V=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",J,t],P=()=>[J,t],O=()=>["",Je,st],D=()=>["auto",Mt,J],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],A=()=>["solid","dashed","dotted","double","none"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",J],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[Mt,J];return{cacheSize:500,separator:":",theme:{colors:[Zt],spacing:[Je,st],blur:["none","",it,J],brightness:H(),borderColor:[e],borderRadius:["none","","full",it,J],borderSpacing:P(),borderWidth:O(),contrast:H(),grayscale:I(),hueRotate:H(),invert:I(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[sd,st],inset:j(),margin:j(),opacity:H(),padding:P(),saturate:H(),scale:H(),sepia:I(),skew:H(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[it]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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"],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:[...M(),J]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gt,J]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Gt,J]}],"grid-cols":[{"grid-cols":[Zt]}],"col-start-end":[{col:["auto",{span:["full",Gt,J]},J]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Zt]}],"row-start-end":[{row:["auto",{span:[Gt,J]},J]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[it]},it]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",it,st]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xn]}],"font-family":[{font:[Zt]}],"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:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",Mt,Xn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Je,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Je,st]}],"underline-offset":[{"underline-offset":["auto",Je,J]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),ld]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ad]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...A(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:A()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...A()]}],"outline-offset":[{"outline-offset":[Je,J]}],"outline-w":[{outline:[Je,st]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Je,st]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",it,ud]}],"shadow-color":[{shadow:[Zt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...k(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":k()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",it,J]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"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:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Gt,J]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Je,st,Xn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},Ds=Xc(md);var gd=Object.defineProperty,vd=(e,t,n)=>t in e?gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,et=(e,t,n)=>vd(e,typeof t!="symbol"?t+"":t,n);function Et(...e){return Ds(Sr(e))}process.env.NEXT_PUBLIC_API_BASE_URL;process.env.NEXT_PUBLIC_SUPABASE_URL;process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY;const yd=class js{constructor(t){et(this,"el"),et(this,"primed",!1),et(this,"timer",null),et(this,"resetTimer",null),et(this,"opts"),et(this,"inGroup",!1),et(this,"currentTarget",null),et(this,"obstacleSelector",null);var n,r;this.opts={initialDelayMs:(t==null?void 0:t.initialDelayMs)??350,resetDelayMs:(t==null?void 0:t.resetDelayMs)??400};const o=globalThis.document;this.el=o?o.createElement("div"):{};const s=this.getDesiredZIndex();this.el.style.cssText=`
2
2
  position: fixed; z-index: ${s}; background: rgba(17,17,17,0.95);
3
3
  color: #fff; padding: 6px 8px; border-radius: 6px; font-size: 12px;
4
4
  line-height: 1; pointer-events: none; opacity: 0; transition: opacity 60ms ease;
@@ -6,22 +6,22 @@
6
6
  border: 1px solid rgba(255, 0, 0, 0);
7
7
  box-sizing: content-box;
8
8
  background-clip: padding-box;
9
- `,o!=null&&o.documentElement&&(this.ensureAttachedToTopLayer(),this.el.parentNode||o.documentElement.appendChild(this.el));const i=()=>{if(this.currentTarget)try{const a=this.currentTarget.getBoundingClientRect();this.el.style.left=`${Math.round(a.left+a.width/2)}px`;let c=a.top-this.getTopGapPx();if(this.obstacleSelector)try{const l=o==null?void 0:o.querySelector(this.obstacleSelector);if(l){const u=l.getBoundingClientRect();if(u.bottom>0&&u.top<a.top){const d=this.el.getBoundingClientRect().height||28;c=u.top+d-1}}}catch{}this.el.style.top=`${Math.round(c)}px`}catch{}};(n=globalThis.addEventListener)==null||n.call(globalThis,"scroll",i,{passive:!0}),(r=globalThis.addEventListener)==null||r.call(globalThis,"resize",i)}getDesiredZIndex(){var t,n,r,o,s,i;try{const a=globalThis.document,c=((r=(n=(t=a==null?void 0:a.documentElement)==null?void 0:t.style)==null?void 0:n.getPropertyValue)==null?void 0:r.call(n,"--memoreco-tooltip-z-index"))||((i=(s=(o=globalThis.getComputedStyle)==null?void 0:o.call(globalThis,a==null?void 0:a.documentElement))==null?void 0:s.getPropertyValue)==null?void 0:i.call(s,"--memoreco-tooltip-z-index"))||"",l=Number(String(c).trim());if(Number.isFinite(l)&&l>0)return l}catch{}return 2147483647}ensureAttachedToTopLayer(){var t,n;try{const r=globalThis.document;if(!r)return;const o=(t=r.querySelector)==null?void 0:t.call(r,".memoreco-overlay-portal"),s=(n=this.el)==null?void 0:n.parentNode;if(o&&s!==o){o.appendChild(this.el);return}!o&&r!=null&&r.documentElement&&s!==r.documentElement&&r.documentElement.appendChild(this.el)}catch{}}getTopGapPx(){var t;try{const n=((t=globalThis.navigator)==null?void 0:t.userAgent)||"";return/firefox/i.test(n)?9:8}catch{return 8}}setObstacleSelector(t){this.obstacleSelector=t}static getInstance(t){return this.instance||(this.instance=new ws(t)),this.instance}show(t,n){this.timer&&clearTimeout(this.timer),this.resetTimer&&clearTimeout(this.resetTimer);const r=this.primed?0:this.opts.initialDelayMs;this.timer=setTimeout(()=>{this.primed=!0,this.currentTarget=t,this.ensureAttachedToTopLayer();try{this.el.style.zIndex=String(this.getDesiredZIndex())}catch{}this.el.textContent=n;const o=t.getBoundingClientRect();this.el.style.left=`${Math.round(o.left+o.width/2)}px`;let s=o.top-this.getTopGapPx();if(this.obstacleSelector)try{const i=globalThis.document,a=i==null?void 0:i.querySelector(this.obstacleSelector);if(a){const c=a.getBoundingClientRect();if(c.bottom>0&&c.top<o.top){const l=this.el.getBoundingClientRect().height||28;s=c.top+l-1}}}catch{}this.el.style.top=`${Math.round(s)}px`,this.el.style.opacity!=="1"&&(this.el.style.opacity="1")},r)}hide(){if(this.timer&&clearTimeout(this.timer),this.inGroup){this.resetTimer&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.el.style.opacity="0",this.inGroup||(this.primed=!1),this.currentTarget=null},Math.max(this.opts.resetDelayMs,500));return}this.el.style.opacity="0",this.resetTimer&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.inGroup||(this.primed=!1),this.currentTarget=null},Math.max(this.opts.resetDelayMs,500))}hideNow(){this.timer&&clearTimeout(this.timer),this.resetTimer&&clearTimeout(this.resetTimer),this.el.style.opacity="0",this.primed=!1,this.currentTarget=null}enterGroup(){this.inGroup=!0,this.resetTimer&&(clearTimeout(this.resetTimer),this.resetTimer=null)}leaveGroup(){this.inGroup=!1,this.resetTimer&&(clearTimeout(this.resetTimer),this.resetTimer=null),this.resetTimer=setTimeout(()=>{this.primed=!1},this.opts.resetDelayMs)}isVisibleFor(t){return this.currentTarget===t&&this.el.style.opacity==="1"}};et(ld,"instance",null);var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cs={exports:{}},Qr={exports:{}};/*!
9
+ `,o!=null&&o.documentElement&&(this.ensureAttachedToTopLayer(),this.el.parentNode||o.documentElement.appendChild(this.el));const i=()=>{if(this.currentTarget)try{const a=this.currentTarget.getBoundingClientRect();this.el.style.left=`${Math.round(a.left+a.width/2)}px`;let c=a.top-this.getTopGapPx();if(this.obstacleSelector)try{const l=o==null?void 0:o.querySelector(this.obstacleSelector);if(l){const u=l.getBoundingClientRect();if(u.bottom>0&&u.top<a.top){const d=this.el.getBoundingClientRect().height||28;c=u.top+d-1}}}catch{}this.el.style.top=`${Math.round(c)}px`}catch{}};(n=globalThis.addEventListener)==null||n.call(globalThis,"scroll",i,{passive:!0}),(r=globalThis.addEventListener)==null||r.call(globalThis,"resize",i)}getDesiredZIndex(){var t,n,r,o,s,i;try{const a=globalThis.document,c=((r=(n=(t=a==null?void 0:a.documentElement)==null?void 0:t.style)==null?void 0:n.getPropertyValue)==null?void 0:r.call(n,"--memoreco-tooltip-z-index"))||((i=(s=(o=globalThis.getComputedStyle)==null?void 0:o.call(globalThis,a==null?void 0:a.documentElement))==null?void 0:s.getPropertyValue)==null?void 0:i.call(s,"--memoreco-tooltip-z-index"))||"",l=Number(String(c).trim());if(Number.isFinite(l)&&l>0)return l}catch{}return 2147483647}ensureAttachedToTopLayer(){var t,n;try{const r=globalThis.document;if(!r)return;const o=(t=r.querySelector)==null?void 0:t.call(r,".memoreco-overlay-portal"),s=(n=this.el)==null?void 0:n.parentNode;if(o&&s!==o){o.appendChild(this.el);return}!o&&r!=null&&r.documentElement&&s!==r.documentElement&&r.documentElement.appendChild(this.el)}catch{}}getTopGapPx(){var t;try{const n=((t=globalThis.navigator)==null?void 0:t.userAgent)||"";return/firefox/i.test(n)?9:8}catch{return 8}}setObstacleSelector(t){this.obstacleSelector=t}static getInstance(t){return this.instance||(this.instance=new js(t)),this.instance}show(t,n){this.timer&&clearTimeout(this.timer),this.resetTimer&&clearTimeout(this.resetTimer);const r=this.primed?0:this.opts.initialDelayMs;this.timer=setTimeout(()=>{this.primed=!0,this.currentTarget=t,this.ensureAttachedToTopLayer();try{this.el.style.zIndex=String(this.getDesiredZIndex())}catch{}this.el.textContent=n;const o=t.getBoundingClientRect();this.el.style.left=`${Math.round(o.left+o.width/2)}px`;let s=o.top-this.getTopGapPx();if(this.obstacleSelector)try{const i=globalThis.document,a=i==null?void 0:i.querySelector(this.obstacleSelector);if(a){const c=a.getBoundingClientRect();if(c.bottom>0&&c.top<o.top){const l=this.el.getBoundingClientRect().height||28;s=c.top+l-1}}}catch{}this.el.style.top=`${Math.round(s)}px`,this.el.style.opacity!=="1"&&(this.el.style.opacity="1")},r)}hide(){if(this.timer&&clearTimeout(this.timer),this.inGroup){this.resetTimer&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.el.style.opacity="0",this.inGroup||(this.primed=!1),this.currentTarget=null},Math.max(this.opts.resetDelayMs,500));return}this.el.style.opacity="0",this.resetTimer&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.inGroup||(this.primed=!1),this.currentTarget=null},Math.max(this.opts.resetDelayMs,500))}hideNow(){this.timer&&clearTimeout(this.timer),this.resetTimer&&clearTimeout(this.resetTimer),this.el.style.opacity="0",this.primed=!1,this.currentTarget=null}enterGroup(){this.inGroup=!0,this.resetTimer&&(clearTimeout(this.resetTimer),this.resetTimer=null)}leaveGroup(){this.inGroup=!1,this.resetTimer&&(clearTimeout(this.resetTimer),this.resetTimer=null),this.resetTimer=setTimeout(()=>{this.primed=!1},this.opts.resetDelayMs)}isVisibleFor(t){return this.currentTarget===t&&this.el.style.opacity==="1"}};et(yd,"instance",null);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Is={exports:{}},uo={exports:{}};/*!
10
10
  * Zdog v1.1.3
11
11
  * Round, flat, designer-friendly pseudo-3D engine
12
12
  * Licensed MIT
13
13
  * https://zzz.dog
14
14
  * Copyright 2020 Metafizzy
15
- */var Jr;function Ye(){return Jr||(Jr=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog=n()})(me,function(){var t={};t.TAU=Math.PI*2,t.extend=function(r,o){for(var s in o)r[s]=o[s];return r},t.lerp=function(r,o,s){return(o-r)*s+r},t.modulo=function(r,o){return(r%o+o)%o};var n={2:function(r){return r*r},3:function(r){return r*r*r},4:function(r){return r*r*r*r},5:function(r){return r*r*r*r*r}};return t.easeInOut=function(r,o){if(o==1)return r;r=Math.max(0,Math.min(1,r));var s=r<.5,i=s?r:1-r;i/=.5;var a=n[o]||n[2],c=a(i);return c/=2,s?c:1-c},t})}(Qr)),Qr.exports}var eo={exports:{}},to;function Ss(){return to||(to=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog.CanvasRenderer=n()})(me,function(){var t={isCanvas:!0};return t.begin=function(n){n.beginPath()},t.move=function(n,r,o){n.moveTo(o.x,o.y)},t.line=function(n,r,o){n.lineTo(o.x,o.y)},t.bezier=function(n,r,o,s,i){n.bezierCurveTo(o.x,o.y,s.x,s.y,i.x,i.y)},t.closePath=function(n){n.closePath()},t.setPath=function(){},t.renderPath=function(n,r,o,s){this.begin(n,r),o.forEach(function(i){i.render(n,r,t)}),s&&this.closePath(n,r)},t.stroke=function(n,r,o,s,i){o&&(n.strokeStyle=s,n.lineWidth=i,n.stroke())},t.fill=function(n,r,o,s){o&&(n.fillStyle=s,n.fill())},t.end=function(){},t})}(eo)),eo.exports}var no={exports:{}},ro;function Es(){return ro||(ro=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog.SvgRenderer=n()})(me,function(){var t={isSvg:!0},n=t.round=function(o){return Math.round(o*1e3)/1e3};function r(o){return n(o.x)+","+n(o.y)+" "}return t.begin=function(){},t.move=function(o,s,i){return"M"+r(i)},t.line=function(o,s,i){return"L"+r(i)},t.bezier=function(o,s,i,a,c){return"C"+r(i)+r(a)+r(c)},t.closePath=function(){return"Z"},t.setPath=function(o,s,i){s.setAttribute("d",i)},t.renderPath=function(o,s,i,a){var c="";i.forEach(function(l){c+=l.render(o,s,t)}),a&&(c+=this.closePath(o,s)),this.setPath(o,s,c)},t.stroke=function(o,s,i,a,c){i&&(s.setAttribute("stroke",a),s.setAttribute("stroke-width",c))},t.fill=function(o,s,i,a){var c=i?a:"none";s.setAttribute("fill",c)},t.end=function(o,s){o.appendChild(s)},t})}(no)),no.exports}var oo={exports:{}},so;function Wt(){return so||(so=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye());else{var r=t.Zdog;r.Vector=n(r)}})(me,function(t){function n(i){this.set(i)}var r=t.TAU;n.prototype.set=function(i){return this.x=i&&i.x||0,this.y=i&&i.y||0,this.z=i&&i.z||0,this},n.prototype.write=function(i){return i?(this.x=i.x!=null?i.x:this.x,this.y=i.y!=null?i.y:this.y,this.z=i.z!=null?i.z:this.z,this):this},n.prototype.rotate=function(i){if(i)return this.rotateZ(i.z),this.rotateY(i.y),this.rotateX(i.x),this},n.prototype.rotateZ=function(i){o(this,i,"x","y")},n.prototype.rotateX=function(i){o(this,i,"y","z")},n.prototype.rotateY=function(i){o(this,i,"x","z")};function o(i,a,c,l){if(!(!a||a%r===0)){var u=Math.cos(a),d=Math.sin(a),h=i[c],m=i[l];i[c]=h*u-m*d,i[l]=m*u+h*d}}n.prototype.isSame=function(i){return i?this.x===i.x&&this.y===i.y&&this.z===i.z:!1},n.prototype.add=function(i){return i?(this.x+=i.x||0,this.y+=i.y||0,this.z+=i.z||0,this):this},n.prototype.subtract=function(i){return i?(this.x-=i.x||0,this.y-=i.y||0,this.z-=i.z||0,this):this},n.prototype.multiply=function(i){return i==null?this:(typeof i=="number"?(this.x*=i,this.y*=i,this.z*=i):(this.x*=i.x!=null?i.x:1,this.y*=i.y!=null?i.y:1,this.z*=i.z!=null?i.z:1),this)},n.prototype.transform=function(i,a,c){return this.multiply(c),this.rotate(a),this.add(i),this},n.prototype.lerp=function(i,a){return this.x=t.lerp(this.x,i.x||0,a),this.y=t.lerp(this.y,i.y||0,a),this.z=t.lerp(this.z,i.z||0,a),this},n.prototype.magnitude=function(){var i=this.x*this.x+this.y*this.y+this.z*this.z;return s(i)};function s(i){return Math.abs(i-1)<1e-8?1:Math.sqrt(i)}return n.prototype.magnitude2d=function(){var i=this.x*this.x+this.y*this.y;return s(i)},n.prototype.copy=function(){return new n(this)},n})}(oo)),oo.exports}var io={exports:{}},ao;function Rt(){return ao||(ao=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Wt(),Ss(),Es());else{var r=t.Zdog;r.Anchor=n(r,r.Vector,r.CanvasRenderer,r.SvgRenderer)}})(me,function(t,n,r,o){var s=t.TAU,i={x:1,y:1,z:1};function a(l){this.create(l||{})}a.prototype.create=function(l){this.children=[],t.extend(this,this.constructor.defaults),this.setOptions(l),this.translate=new n(l.translate),this.rotate=new n(l.rotate),this.scale=new n(i).multiply(this.scale),this.origin=new n,this.renderOrigin=new n,this.addTo&&this.addTo.addChild(this)},a.defaults={},a.optionKeys=Object.keys(a.defaults).concat(["rotate","translate","scale","addTo"]),a.prototype.setOptions=function(l){var u=this.constructor.optionKeys;for(var d in l)u.indexOf(d)!=-1&&(this[d]=l[d])},a.prototype.addChild=function(l){this.children.indexOf(l)==-1&&(l.remove(),l.addTo=this,this.children.push(l))},a.prototype.removeChild=function(l){var u=this.children.indexOf(l);u!=-1&&this.children.splice(u,1)},a.prototype.remove=function(){this.addTo&&this.addTo.removeChild(this)},a.prototype.update=function(){this.reset(),this.children.forEach(function(l){l.update()}),this.transform(this.translate,this.rotate,this.scale)},a.prototype.reset=function(){this.renderOrigin.set(this.origin)},a.prototype.transform=function(l,u,d){this.renderOrigin.transform(l,u,d),this.children.forEach(function(h){h.transform(l,u,d)})},a.prototype.updateGraph=function(){this.update(),this.updateFlatGraph(),this.flatGraph.forEach(function(l){l.updateSortValue()}),this.flatGraph.sort(a.shapeSorter)},a.shapeSorter=function(l,u){return l.sortValue-u.sortValue},Object.defineProperty(a.prototype,"flatGraph",{get:function(){return this._flatGraph||this.updateFlatGraph(),this._flatGraph},set:function(l){this._flatGraph=l}}),a.prototype.updateFlatGraph=function(){this.flatGraph=this.getFlatGraph()},a.prototype.getFlatGraph=function(){var l=[this];return this.addChildFlatGraph(l)},a.prototype.addChildFlatGraph=function(l){return this.children.forEach(function(u){var d=u.getFlatGraph();Array.prototype.push.apply(l,d)}),l},a.prototype.updateSortValue=function(){this.sortValue=this.renderOrigin.z},a.prototype.render=function(){},a.prototype.renderGraphCanvas=function(l){if(!l)throw new Error("ctx is "+l+". Canvas context required for render. Check .renderGraphCanvas( ctx ).");this.flatGraph.forEach(function(u){u.render(l,r)})},a.prototype.renderGraphSvg=function(l){if(!l)throw new Error("svg is "+l+". SVG required for render. Check .renderGraphSvg( svg ).");this.flatGraph.forEach(function(u){u.render(l,o)})},a.prototype.copy=function(l){var u={},d=this.constructor.optionKeys;d.forEach(function(m){u[m]=this[m]},this),t.extend(u,l);var h=this.constructor;return new h(u)},a.prototype.copyGraph=function(l){var u=this.copy(l);return this.children.forEach(function(d){d.copyGraph({addTo:u})}),u},a.prototype.normalizeRotate=function(){this.rotate.x=t.modulo(this.rotate.x,s),this.rotate.y=t.modulo(this.rotate.y,s),this.rotate.z=t.modulo(this.rotate.z,s)};function c(l){return function(u){function d(h){this.create(h||{})}return d.prototype=Object.create(l.prototype),d.prototype.constructor=d,d.defaults=t.extend({},l.defaults),t.extend(d.defaults,u),d.optionKeys=l.optionKeys.slice(0),Object.keys(d.defaults).forEach(function(h){!d.optionKeys.indexOf(h)!=1&&d.optionKeys.push(h)}),d.subclass=c(d),d}}return a.subclass=c(a),a})}(io)),io.exports}var lo={exports:{}},co;function Ns(){return co||(co=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog.Dragger=n()})(me,function(){var t=typeof window<"u",n="mousedown",r="mousemove",o="mouseup";t&&(window.PointerEvent?(n="pointerdown",r="pointermove",o="pointerup"):"ontouchstart"in window&&(n="touchstart",r="touchmove",o="touchend"));function s(){}function i(a){this.create(a||{})}return i.prototype.create=function(a){this.onDragStart=a.onDragStart||s,this.onDragMove=a.onDragMove||s,this.onDragEnd=a.onDragEnd||s,this.bindDrag(a.startElement)},i.prototype.bindDrag=function(a){a=this.getQueryElement(a),a&&(a.style.touchAction="none",a.addEventListener(n,this))},i.prototype.getQueryElement=function(a){return typeof a=="string"&&(a=document.querySelector(a)),a},i.prototype.handleEvent=function(a){var c=this["on"+a.type];c&&c.call(this,a)},i.prototype.onmousedown=i.prototype.onpointerdown=function(a){this.dragStart(a,a)},i.prototype.ontouchstart=function(a){this.dragStart(a,a.changedTouches[0])},i.prototype.dragStart=function(a,c){a.preventDefault(),this.dragStartX=c.pageX,this.dragStartY=c.pageY,t&&(window.addEventListener(r,this),window.addEventListener(o,this)),this.onDragStart(c)},i.prototype.ontouchmove=function(a){this.dragMove(a,a.changedTouches[0])},i.prototype.onmousemove=i.prototype.onpointermove=function(a){this.dragMove(a,a)},i.prototype.dragMove=function(a,c){a.preventDefault();var l=c.pageX-this.dragStartX,u=c.pageY-this.dragStartY;this.onDragMove(c,l,u)},i.prototype.onmouseup=i.prototype.onpointerup=i.prototype.ontouchend=i.prototype.dragEnd=function(){window.removeEventListener(r,this),window.removeEventListener(o,this),this.onDragEnd()},i})}(lo)),lo.exports}var uo={exports:{}},fo;function cd(){return fo||(fo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Rt(),Ns());else{var r=t.Zdog;r.Illustration=n(r,r.Anchor,r.Dragger)}})(me,function(t,n,r){function o(){}var s=t.TAU,i=n.subclass({element:void 0,centered:!0,zoom:1,dragRotate:!1,resize:!1,onPrerender:o,onDragStart:o,onDragMove:o,onDragEnd:o,onResize:o});t.extend(i.prototype,r.prototype),i.prototype.create=function(c){n.prototype.create.call(this,c),r.prototype.create.call(this,c),this.setElement(this.element),this.setDragRotate(this.dragRotate),this.setResize(this.resize)},i.prototype.setElement=function(c){if(c=this.getQueryElement(c),!c)throw new Error("Zdog.Illustration element required. Set to "+c);var l=c.nodeName.toLowerCase();l=="canvas"?this.setCanvas(c):l=="svg"&&this.setSvg(c)},i.prototype.setSize=function(c,l){c=Math.round(c),l=Math.round(l),this.isCanvas?this.setSizeCanvas(c,l):this.isSvg&&this.setSizeSvg(c,l)},i.prototype.setResize=function(c){this.resize=c,this.resizeListener||(this.resizeListener=this.onWindowResize.bind(this)),c?(window.addEventListener("resize",this.resizeListener),this.onWindowResize()):window.removeEventListener("resize",this.resizeListener)},i.prototype.onWindowResize=function(){this.setMeasuredSize(),this.onResize(this.width,this.height)},i.prototype.setMeasuredSize=function(){var c,l,u=this.resize=="fullscreen";if(u)c=window.innerWidth,l=window.innerHeight;else{var d=this.element.getBoundingClientRect();c=d.width,l=d.height}this.setSize(c,l)},i.prototype.renderGraph=function(c){this.isCanvas?this.renderGraphCanvas(c):this.isSvg&&this.renderGraphSvg(c)},i.prototype.updateRenderGraph=function(c){this.updateGraph(),this.renderGraph(c)},i.prototype.setCanvas=function(c){this.element=c,this.isCanvas=!0,this.ctx=this.element.getContext("2d"),this.setSizeCanvas(c.width,c.height)},i.prototype.setSizeCanvas=function(c,l){this.width=c,this.height=l;var u=this.pixelRatio=window.devicePixelRatio||1;this.element.width=this.canvasWidth=c*u,this.element.height=this.canvasHeight=l*u;var d=u>1&&!this.resize;d&&(this.element.style.width=c+"px",this.element.style.height=l+"px")},i.prototype.renderGraphCanvas=function(c){c=c||this,this.prerenderCanvas(),n.prototype.renderGraphCanvas.call(c,this.ctx),this.postrenderCanvas()},i.prototype.prerenderCanvas=function(){var c=this.ctx;if(c.lineCap="round",c.lineJoin="round",c.clearRect(0,0,this.canvasWidth,this.canvasHeight),c.save(),this.centered){var l=this.width/2*this.pixelRatio,u=this.height/2*this.pixelRatio;c.translate(l,u)}var d=this.pixelRatio*this.zoom;c.scale(d,d),this.onPrerender(c)},i.prototype.postrenderCanvas=function(){this.ctx.restore()},i.prototype.setSvg=function(c){this.element=c,this.isSvg=!0,this.pixelRatio=1;var l=c.getAttribute("width"),u=c.getAttribute("height");this.setSizeSvg(l,u)},i.prototype.setSizeSvg=function(c,l){this.width=c,this.height=l;var u=c/this.zoom,d=l/this.zoom,h=this.centered?-u/2:0,m=this.centered?-d/2:0;this.element.setAttribute("viewBox",h+" "+m+" "+u+" "+d),this.resize?(this.element.removeAttribute("width"),this.element.removeAttribute("height")):(this.element.setAttribute("width",c),this.element.setAttribute("height",l))},i.prototype.renderGraphSvg=function(c){c=c||this,a(this.element),this.onPrerender(this.element),n.prototype.renderGraphSvg.call(c,this.element)};function a(c){for(;c.firstChild;)c.removeChild(c.firstChild)}return i.prototype.setDragRotate=function(c){if(c)c===!0&&(c=this);else return;this.dragRotate=c,this.bindDrag(this.element)},i.prototype.dragStart=function(){this.dragStartRX=this.dragRotate.rotate.x,this.dragStartRY=this.dragRotate.rotate.y,r.prototype.dragStart.apply(this,arguments)},i.prototype.dragMove=function(c,l){var u=l.pageX-this.dragStartX,d=l.pageY-this.dragStartY,h=Math.min(this.width,this.height),m=u/h*s,v=d/h*s;this.dragRotate.rotate.x=this.dragStartRX-v,this.dragRotate.rotate.y=this.dragStartRY-m,r.prototype.dragMove.apply(this,arguments)},i})}(uo)),uo.exports}var po={exports:{}},ho;function Nn(){return ho||(ho=1,function(e){(function(t,n){if(e.exports)e.exports=n(Wt());else{var r=t.Zdog;r.PathCommand=n(r.Vector)}})(me,function(t){function n(i,a,c){this.method=i,this.points=a.map(r),this.renderPoints=a.map(o),this.previousPoint=c,this.endRenderPoint=this.renderPoints[this.renderPoints.length-1],i=="arc"&&(this.controlPoints=[new t,new t])}function r(i){return i instanceof t?i:new t(i)}function o(i){return new t(i)}n.prototype.reset=function(){var i=this.points;this.renderPoints.forEach(function(a,c){var l=i[c];a.set(l)})},n.prototype.transform=function(i,a,c){this.renderPoints.forEach(function(l){l.transform(i,a,c)})},n.prototype.render=function(i,a,c){return this[this.method](i,a,c)},n.prototype.move=function(i,a,c){return c.move(i,a,this.renderPoints[0])},n.prototype.line=function(i,a,c){return c.line(i,a,this.renderPoints[0])},n.prototype.bezier=function(i,a,c){var l=this.renderPoints[0],u=this.renderPoints[1],d=this.renderPoints[2];return c.bezier(i,a,l,u,d)};var s=9/16;return n.prototype.arc=function(i,a,c){var l=this.previousPoint,u=this.renderPoints[0],d=this.renderPoints[1],h=this.controlPoints[0],m=this.controlPoints[1];return h.set(l).lerp(u,s),m.set(d).lerp(u,s),c.bezier(i,a,h,m,d)},n})}(po)),po.exports}var mo={exports:{}},go;function At(){return go||(go=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Wt(),Nn(),Rt());else{var r=t.Zdog;r.Shape=n(r,r.Vector,r.PathCommand,r.Anchor)}})(me,function(t,n,r,o){var s=o.subclass({stroke:1,fill:!1,color:"#333",closed:!0,visible:!0,path:[{}],front:{z:1},backface:!0});s.prototype.create=function(l){o.prototype.create.call(this,l),this.updatePath(),this.front=new n(l.front||this.front),this.renderFront=new n(this.front),this.renderNormal=new n};var i=["move","line","bezier","arc"];s.prototype.updatePath=function(){this.setPath(),this.updatePathCommands()},s.prototype.setPath=function(){},s.prototype.updatePathCommands=function(){var l;this.pathCommands=this.path.map(function(u,d){var h=Object.keys(u),m=h[0],v=u[m],g=h.length==1&&i.indexOf(m)!=-1;g||(m="line",v=u);var x=m=="line"||m=="move",y=Array.isArray(v);x&&!y&&(v=[v]),m=d===0?"move":m;var b=new r(m,v,l);return l=b.endRenderPoint,b})},s.prototype.reset=function(){this.renderOrigin.set(this.origin),this.renderFront.set(this.front),this.pathCommands.forEach(function(l){l.reset()})},s.prototype.transform=function(l,u,d){this.renderOrigin.transform(l,u,d),this.renderFront.transform(l,u,d),this.renderNormal.set(this.renderOrigin).subtract(this.renderFront),this.pathCommands.forEach(function(h){h.transform(l,u,d)}),this.children.forEach(function(h){h.transform(l,u,d)})},s.prototype.updateSortValue=function(){var l=this.pathCommands.length,u=this.pathCommands[0].endRenderPoint,d=this.pathCommands[l-1].endRenderPoint,h=l>2&&u.isSame(d);h&&(l-=1);for(var m=0,v=0;v<l;v++)m+=this.pathCommands[v].endRenderPoint.z;this.sortValue=m/l},s.prototype.render=function(l,u){var d=this.pathCommands.length;if(!(!this.visible||!d)&&(this.isFacingBack=this.renderNormal.z>0,!(!this.backface&&this.isFacingBack))){if(!u)throw new Error("Zdog renderer required. Set to "+u);var h=d==1;u.isCanvas&&h?this.renderCanvasDot(l,u):this.renderPath(l,u)}};var a=t.TAU;s.prototype.renderCanvasDot=function(l){var u=this.getLineWidth();if(u){l.fillStyle=this.getRenderColor();var d=this.pathCommands[0].endRenderPoint;l.beginPath();var h=u/2;l.arc(d.x,d.y,h,0,a),l.fill()}},s.prototype.getLineWidth=function(){return this.stroke?this.stroke==!0?1:this.stroke:0},s.prototype.getRenderColor=function(){var l=typeof this.backface=="string"&&this.isFacingBack,u=l?this.backface:this.color;return u},s.prototype.renderPath=function(l,u){var d=this.getRenderElement(l,u),h=this.pathCommands.length==2&&this.pathCommands[1].method=="line",m=!h&&this.closed,v=this.getRenderColor();u.renderPath(l,d,this.pathCommands,m),u.stroke(l,d,this.stroke,v,this.getLineWidth()),u.fill(l,d,this.fill,v),u.end(l,d)};var c="http://www.w3.org/2000/svg";return s.prototype.getRenderElement=function(l,u){if(u.isSvg)return this.svgElement||(this.svgElement=document.createElementNS(c,"path"),this.svgElement.setAttribute("stroke-linecap","round"),this.svgElement.setAttribute("stroke-linejoin","round")),this.svgElement},s})}(mo)),mo.exports}var vo={exports:{}},yo;function Rs(){return yo||(yo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Rt());else{var r=t.Zdog;r.Group=n(r.Anchor)}})(me,function(t){var n=t.subclass({updateSort:!1,visible:!0});return n.prototype.updateSortValue=function(){var r=0;this.flatGraph.forEach(function(o){o.updateSortValue(),r+=o.sortValue}),this.sortValue=r/this.flatGraph.length,this.updateSort&&this.flatGraph.sort(t.shapeSorter)},n.prototype.render=function(r,o){this.visible&&this.flatGraph.forEach(function(s){s.render(r,o)})},n.prototype.updateFlatGraph=function(){var r=[];this.flatGraph=this.addChildFlatGraph(r)},n.prototype.getFlatGraph=function(){return[this]},n})}(vo)),vo.exports}var xo={exports:{}},bo;function As(){return bo||(bo=1,function(e){(function(t,n){if(e.exports)e.exports=n(At());else{var r=t.Zdog;r.Rect=n(r.Shape)}})(me,function(t){var n=t.subclass({width:1,height:1});return n.prototype.setPath=function(){var r=this.width/2,o=this.height/2;this.path=[{x:-r,y:-o},{x:r,y:-o},{x:r,y:o},{x:-r,y:o}]},n})}(xo)),xo.exports}var wo={exports:{}},Co;function dd(){return Co||(Co=1,function(e){(function(t,n){if(e.exports)e.exports=n(At());else{var r=t.Zdog;r.RoundedRect=n(r.Shape)}})(me,function(t){var n=t.subclass({width:1,height:1,cornerRadius:.25,closed:!1});return n.prototype.setPath=function(){var r=this.width/2,o=this.height/2,s=Math.min(r,o),i=Math.min(this.cornerRadius,s),a=r-i,c=o-i,l=[{x:a,y:-o},{arc:[{x:r,y:-o},{x:r,y:-c}]}];c&&l.push({x:r,y:c}),l.push({arc:[{x:r,y:o},{x:a,y:o}]}),a&&l.push({x:-a,y:o}),l.push({arc:[{x:-r,y:o},{x:-r,y:c}]}),c&&l.push({x:-r,y:-c}),l.push({arc:[{x:-r,y:-o},{x:-a,y:-o}]}),a&&l.push({x:a,y:-o}),this.path=l},n})}(wo)),wo.exports}var So={exports:{}},Eo;function Rn(){return Eo||(Eo=1,function(e){(function(t,n){if(e.exports)e.exports=n(At());else{var r=t.Zdog;r.Ellipse=n(r.Shape)}})(me,function(t){var n=t.subclass({diameter:1,width:void 0,height:void 0,quarters:4,closed:!1});return n.prototype.setPath=function(){var r=this.width!=null?this.width:this.diameter,o=this.height!=null?this.height:this.diameter,s=r/2,i=o/2;this.path=[{x:0,y:-i},{arc:[{x:s,y:-i},{x:s,y:0}]}],this.quarters>1&&this.path.push({arc:[{x:s,y:i},{x:0,y:i}]}),this.quarters>2&&this.path.push({arc:[{x:-s,y:i},{x:-s,y:0}]}),this.quarters>3&&this.path.push({arc:[{x:-s,y:-i},{x:0,y:-i}]})},n})}(So)),So.exports}var No={exports:{}},Ro;function ud(){return Ro||(Ro=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),At());else{var r=t.Zdog;r.Polygon=n(r,r.Shape)}})(me,function(t,n){var r=n.subclass({sides:3,radius:.5}),o=t.TAU;return r.prototype.setPath=function(){this.path=[];for(var s=0;s<this.sides;s++){var i=s/this.sides*o-o/4,a=Math.cos(i)*this.radius,c=Math.sin(i)*this.radius;this.path.push({x:a,y:c})}},r})}(No)),No.exports}var Ao={exports:{}},To;function fd(){return To||(To=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Wt(),Rt(),Rn());else{var r=t.Zdog;r.Hemisphere=n(r,r.Vector,r.Anchor,r.Ellipse)}})(me,function(t,n,r,o){var s=o.subclass({fill:!0}),i=t.TAU;s.prototype.create=function(){o.prototype.create.apply(this,arguments),this.apex=new r({addTo:this,translate:{z:this.diameter/2}}),this.renderCentroid=new n},s.prototype.updateSortValue=function(){this.renderCentroid.set(this.renderOrigin).lerp(this.apex.renderOrigin,3/8),this.sortValue=this.renderCentroid.z},s.prototype.render=function(c,l){this.renderDome(c,l),o.prototype.render.apply(this,arguments)},s.prototype.renderDome=function(c,l){if(this.visible){var u=this.getDomeRenderElement(c,l),d=Math.atan2(this.renderNormal.y,this.renderNormal.x),h=this.diameter/2*this.renderNormal.magnitude(),m=this.renderOrigin.x,v=this.renderOrigin.y;if(l.isCanvas){var g=d+i/4,x=d-i/4;c.beginPath(),c.arc(m,v,h,g,x)}else l.isSvg&&(d=(d-i/4)/i*360,this.domeSvgElement.setAttribute("d","M "+-h+",0 A "+h+","+h+" 0 0 1 "+h+",0"),this.domeSvgElement.setAttribute("transform","translate("+m+","+v+" ) rotate("+d+")"));l.stroke(c,u,this.stroke,this.color,this.getLineWidth()),l.fill(c,u,this.fill,this.color),l.end(c,u)}};var a="http://www.w3.org/2000/svg";return s.prototype.getDomeRenderElement=function(c,l){if(l.isSvg)return this.domeSvgElement||(this.domeSvgElement=document.createElementNS(a,"path"),this.domeSvgElement.setAttribute("stroke-linecap","round"),this.domeSvgElement.setAttribute("stroke-linejoin","round")),this.domeSvgElement},s})}(Ao)),Ao.exports}var Po={exports:{}},ko;function pd(){return ko||(ko=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Nn(),At(),Rs(),Rn());else{var r=t.Zdog;r.Cylinder=n(r,r.PathCommand,r.Shape,r.Group,r.Ellipse)}})(me,function(t,n,r,o,s){function i(){}var a=o.subclass({color:"#333",updateSort:!0});a.prototype.create=function(){o.prototype.create.apply(this,arguments),this.pathCommands=[new n("move",[{}]),new n("line",[{}])]},a.prototype.render=function(m,v){this.renderCylinderSurface(m,v),o.prototype.render.apply(this,arguments)},a.prototype.renderCylinderSurface=function(m,v){if(this.visible){var g=this.getRenderElement(m,v),x=this.frontBase,y=this.rearBase,b=x.renderNormal.magnitude(),C=x.diameter*b+x.getLineWidth();this.pathCommands[0].renderPoints[0].set(x.renderOrigin),this.pathCommands[1].renderPoints[0].set(y.renderOrigin),v.isCanvas&&(m.lineCap="butt"),v.renderPath(m,g,this.pathCommands),v.stroke(m,g,!0,this.color,C),v.end(m,g),v.isCanvas&&(m.lineCap="round")}};var c="http://www.w3.org/2000/svg";a.prototype.getRenderElement=function(m,v){if(v.isSvg)return this.svgElement||(this.svgElement=document.createElementNS(c,"path")),this.svgElement},a.prototype.copyGraph=i;var l=s.subclass();l.prototype.copyGraph=i;var u=r.subclass({diameter:1,length:1,frontFace:void 0,fill:!0}),d=t.TAU;u.prototype.create=function(){r.prototype.create.apply(this,arguments),this.group=new a({addTo:this,color:this.color,visible:this.visible});var m=this.length/2,v=this.backface||!0;this.frontBase=this.group.frontBase=new s({addTo:this.group,diameter:this.diameter,translate:{z:m},rotate:{y:d/2},color:this.color,stroke:this.stroke,fill:this.fill,backface:this.frontFace||v,visible:this.visible}),this.rearBase=this.group.rearBase=this.frontBase.copy({translate:{z:-m},rotate:{y:0},backface:v})},u.prototype.render=function(){};var h=["stroke","fill","color","visible"];return h.forEach(function(m){var v="_"+m;Object.defineProperty(u.prototype,m,{get:function(){return this[v]},set:function(g){this[v]=g,this.frontBase&&(this.frontBase[m]=g,this.rearBase[m]=g,this.group[m]=g)}})}),u})}(Po)),Po.exports}var Do={exports:{}},Mo;function hd(){return Mo||(Mo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Wt(),Nn(),Rt(),Rn());else{var r=t.Zdog;r.Cone=n(r,r.Vector,r.PathCommand,r.Anchor,r.Ellipse)}})(me,function(t,n,r,o,s){var i=s.subclass({length:1,fill:!0}),a=t.TAU;i.prototype.create=function(){s.prototype.create.apply(this,arguments),this.apex=new o({addTo:this,translate:{z:this.length}}),this.renderApex=new n,this.renderCentroid=new n,this.tangentA=new n,this.tangentB=new n,this.surfacePathCommands=[new r("move",[{}]),new r("line",[{}]),new r("line",[{}])]},i.prototype.updateSortValue=function(){this.renderCentroid.set(this.renderOrigin).lerp(this.apex.renderOrigin,1/3),this.sortValue=this.renderCentroid.z},i.prototype.render=function(l,u){this.renderConeSurface(l,u),s.prototype.render.apply(this,arguments)},i.prototype.renderConeSurface=function(l,u){if(this.visible){this.renderApex.set(this.apex.renderOrigin).subtract(this.renderOrigin);var d=this.renderNormal.magnitude(),h=this.renderApex.magnitude2d(),m=this.renderNormal.magnitude2d(),v=Math.acos(m/d),g=Math.sin(v),x=this.diameter/2*d,y=x*g<h;if(y){var b=Math.atan2(this.renderNormal.y,this.renderNormal.x)+a/2,C=h/g,S=Math.acos(x/C),R=this.tangentA,M=this.tangentB;R.x=Math.cos(S)*x*g,R.y=Math.sin(S)*x,M.set(this.tangentA),M.y*=-1,R.rotateZ(b),M.rotateZ(b),R.add(this.renderOrigin),M.add(this.renderOrigin),this.setSurfaceRenderPoint(0,R),this.setSurfaceRenderPoint(1,this.apex.renderOrigin),this.setSurfaceRenderPoint(2,M);var A=this.getSurfaceRenderElement(l,u);u.renderPath(l,A,this.surfacePathCommands),u.stroke(l,A,this.stroke,this.color,this.getLineWidth()),u.fill(l,A,this.fill,this.color),u.end(l,A)}}};var c="http://www.w3.org/2000/svg";return i.prototype.getSurfaceRenderElement=function(l,u){if(u.isSvg)return this.surfaceSvgElement||(this.surfaceSvgElement=document.createElementNS(c,"path"),this.surfaceSvgElement.setAttribute("stroke-linecap","round"),this.surfaceSvgElement.setAttribute("stroke-linejoin","round")),this.surfaceSvgElement},i.prototype.setSurfaceRenderPoint=function(l,u){var d=this.surfacePathCommands[l].renderPoints[0];d.set(u)},i})}(Do)),Do.exports}var jo={exports:{}},_o;function md(){return _o||(_o=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Rt(),At(),As());else{var r=t.Zdog;r.Box=n(r,r.Anchor,r.Shape,r.Rect)}})(me,function(t,n,r,o){var s=o.subclass();s.prototype.copyGraph=function(){};var i=t.TAU,a=["frontFace","rearFace","leftFace","rightFace","topFace","bottomFace"],c=t.extend({},r.defaults);delete c.path,a.forEach(function(d){c[d]=!0}),t.extend(c,{width:1,height:1,depth:1,fill:!0});var l=n.subclass(c);l.prototype.create=function(d){n.prototype.create.call(this,d),this.updatePath(),this.fill=this.fill},l.prototype.updatePath=function(){a.forEach(function(d){this[d]=this[d]},this)},a.forEach(function(d){var h="_"+d;Object.defineProperty(l.prototype,d,{get:function(){return this[h]},set:function(m){this[h]=m,this.setFace(d,m)}})}),l.prototype.setFace=function(d,h){var m=d+"Rect",v=this[m];if(!h){this.removeChild(v);return}var g=this.getFaceOptions(d);g.color=typeof h=="string"?h:this.color,v?v.setOptions(g):v=this[m]=new s(g),v.updatePath(),this.addChild(v)},l.prototype.getFaceOptions=function(d){return{frontFace:{width:this.width,height:this.height,translate:{z:this.depth/2}},rearFace:{width:this.width,height:this.height,translate:{z:-this.depth/2},rotate:{y:i/2}},leftFace:{width:this.depth,height:this.height,translate:{x:-this.width/2},rotate:{y:-i/4}},rightFace:{width:this.depth,height:this.height,translate:{x:this.width/2},rotate:{y:i/4}},topFace:{width:this.width,height:this.depth,translate:{y:-this.height/2},rotate:{x:-i/4}},bottomFace:{width:this.width,height:this.depth,translate:{y:this.height/2},rotate:{x:i/4}}}[d]};var u=["color","stroke","fill","backface","front","visible"];return u.forEach(function(d){var h="_"+d;Object.defineProperty(l.prototype,d,{get:function(){return this[h]},set:function(m){this[h]=m,a.forEach(function(v){var g=this[v+"Rect"],x=typeof this[v]=="string",y=d=="color"&&x;g&&!y&&(g[d]=m)},this)}})}),l})}(jo)),jo.exports}(function(e){(function(t,n){e.exports&&(e.exports=n(Ye(),Ss(),Es(),Wt(),Rt(),Ns(),cd(),Nn(),At(),Rs(),As(),dd(),Rn(),ud(),fd(),pd(),hd(),md()))})(me,function(t,n,r,o,s,i,a,c,l,u,d,h,m,v,g,x,y,b){return t.CanvasRenderer=n,t.SvgRenderer=r,t.Vector=o,t.Anchor=s,t.Dragger=i,t.Illustration=a,t.PathCommand=c,t.Shape=l,t.Group=u,t.Rect=d,t.RoundedRect=h,t.Ellipse=m,t.Polygon=v,t.Hemisphere=g,t.Cylinder=x,t.Cone=y,t.Box=b,t})})(Cs);var Io=Cs.exports;function gd(e={}){const{size:t="sm",cycleDuration:n=3e3,className:r=""}=e,o=()=>{switch(t){case"sm":return{width:140,height:105,discSize:42};case"md":return{width:300,height:200,discSize:80};case"lg":return{width:400,height:250,discSize:100};case"xl":return{width:500,height:300,discSize:108};default:return{width:140,height:105,discSize:42}}},{width:s,height:i,discSize:a}=o(),c=Math.floor(s*.23),l=document.createElement("div");l.className=`memoreco-disc-loader ${r}`.trim(),l.style.cssText=`
15
+ */var fo;function Ye(){return fo||(fo=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog=n()})(Se,function(){var t={};t.TAU=Math.PI*2,t.extend=function(r,o){for(var s in o)r[s]=o[s];return r},t.lerp=function(r,o,s){return(o-r)*s+r},t.modulo=function(r,o){return(r%o+o)%o};var n={2:function(r){return r*r},3:function(r){return r*r*r},4:function(r){return r*r*r*r},5:function(r){return r*r*r*r*r}};return t.easeInOut=function(r,o){if(o==1)return r;r=Math.max(0,Math.min(1,r));var s=r<.5,i=s?r:1-r;i/=.5;var a=n[o]||n[2],c=a(i);return c/=2,s?c:1-c},t})}(uo)),uo.exports}var po={exports:{}},ho;function _s(){return ho||(ho=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog.CanvasRenderer=n()})(Se,function(){var t={isCanvas:!0};return t.begin=function(n){n.beginPath()},t.move=function(n,r,o){n.moveTo(o.x,o.y)},t.line=function(n,r,o){n.lineTo(o.x,o.y)},t.bezier=function(n,r,o,s,i){n.bezierCurveTo(o.x,o.y,s.x,s.y,i.x,i.y)},t.closePath=function(n){n.closePath()},t.setPath=function(){},t.renderPath=function(n,r,o,s){this.begin(n,r),o.forEach(function(i){i.render(n,r,t)}),s&&this.closePath(n,r)},t.stroke=function(n,r,o,s,i){o&&(n.strokeStyle=s,n.lineWidth=i,n.stroke())},t.fill=function(n,r,o,s){o&&(n.fillStyle=s,n.fill())},t.end=function(){},t})}(po)),po.exports}var mo={exports:{}},go;function Os(){return go||(go=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog.SvgRenderer=n()})(Se,function(){var t={isSvg:!0},n=t.round=function(o){return Math.round(o*1e3)/1e3};function r(o){return n(o.x)+","+n(o.y)+" "}return t.begin=function(){},t.move=function(o,s,i){return"M"+r(i)},t.line=function(o,s,i){return"L"+r(i)},t.bezier=function(o,s,i,a,c){return"C"+r(i)+r(a)+r(c)},t.closePath=function(){return"Z"},t.setPath=function(o,s,i){s.setAttribute("d",i)},t.renderPath=function(o,s,i,a){var c="";i.forEach(function(l){c+=l.render(o,s,t)}),a&&(c+=this.closePath(o,s)),this.setPath(o,s,c)},t.stroke=function(o,s,i,a,c){i&&(s.setAttribute("stroke",a),s.setAttribute("stroke-width",c))},t.fill=function(o,s,i,a){var c=i?a:"none";s.setAttribute("fill",c)},t.end=function(o,s){o.appendChild(s)},t})}(mo)),mo.exports}var vo={exports:{}},yo;function $t(){return yo||(yo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye());else{var r=t.Zdog;r.Vector=n(r)}})(Se,function(t){function n(i){this.set(i)}var r=t.TAU;n.prototype.set=function(i){return this.x=i&&i.x||0,this.y=i&&i.y||0,this.z=i&&i.z||0,this},n.prototype.write=function(i){return i?(this.x=i.x!=null?i.x:this.x,this.y=i.y!=null?i.y:this.y,this.z=i.z!=null?i.z:this.z,this):this},n.prototype.rotate=function(i){if(i)return this.rotateZ(i.z),this.rotateY(i.y),this.rotateX(i.x),this},n.prototype.rotateZ=function(i){o(this,i,"x","y")},n.prototype.rotateX=function(i){o(this,i,"y","z")},n.prototype.rotateY=function(i){o(this,i,"x","z")};function o(i,a,c,l){if(!(!a||a%r===0)){var u=Math.cos(a),d=Math.sin(a),h=i[c],m=i[l];i[c]=h*u-m*d,i[l]=m*u+h*d}}n.prototype.isSame=function(i){return i?this.x===i.x&&this.y===i.y&&this.z===i.z:!1},n.prototype.add=function(i){return i?(this.x+=i.x||0,this.y+=i.y||0,this.z+=i.z||0,this):this},n.prototype.subtract=function(i){return i?(this.x-=i.x||0,this.y-=i.y||0,this.z-=i.z||0,this):this},n.prototype.multiply=function(i){return i==null?this:(typeof i=="number"?(this.x*=i,this.y*=i,this.z*=i):(this.x*=i.x!=null?i.x:1,this.y*=i.y!=null?i.y:1,this.z*=i.z!=null?i.z:1),this)},n.prototype.transform=function(i,a,c){return this.multiply(c),this.rotate(a),this.add(i),this},n.prototype.lerp=function(i,a){return this.x=t.lerp(this.x,i.x||0,a),this.y=t.lerp(this.y,i.y||0,a),this.z=t.lerp(this.z,i.z||0,a),this},n.prototype.magnitude=function(){var i=this.x*this.x+this.y*this.y+this.z*this.z;return s(i)};function s(i){return Math.abs(i-1)<1e-8?1:Math.sqrt(i)}return n.prototype.magnitude2d=function(){var i=this.x*this.x+this.y*this.y;return s(i)},n.prototype.copy=function(){return new n(this)},n})}(vo)),vo.exports}var xo={exports:{}},bo;function Rt(){return bo||(bo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),$t(),_s(),Os());else{var r=t.Zdog;r.Anchor=n(r,r.Vector,r.CanvasRenderer,r.SvgRenderer)}})(Se,function(t,n,r,o){var s=t.TAU,i={x:1,y:1,z:1};function a(l){this.create(l||{})}a.prototype.create=function(l){this.children=[],t.extend(this,this.constructor.defaults),this.setOptions(l),this.translate=new n(l.translate),this.rotate=new n(l.rotate),this.scale=new n(i).multiply(this.scale),this.origin=new n,this.renderOrigin=new n,this.addTo&&this.addTo.addChild(this)},a.defaults={},a.optionKeys=Object.keys(a.defaults).concat(["rotate","translate","scale","addTo"]),a.prototype.setOptions=function(l){var u=this.constructor.optionKeys;for(var d in l)u.indexOf(d)!=-1&&(this[d]=l[d])},a.prototype.addChild=function(l){this.children.indexOf(l)==-1&&(l.remove(),l.addTo=this,this.children.push(l))},a.prototype.removeChild=function(l){var u=this.children.indexOf(l);u!=-1&&this.children.splice(u,1)},a.prototype.remove=function(){this.addTo&&this.addTo.removeChild(this)},a.prototype.update=function(){this.reset(),this.children.forEach(function(l){l.update()}),this.transform(this.translate,this.rotate,this.scale)},a.prototype.reset=function(){this.renderOrigin.set(this.origin)},a.prototype.transform=function(l,u,d){this.renderOrigin.transform(l,u,d),this.children.forEach(function(h){h.transform(l,u,d)})},a.prototype.updateGraph=function(){this.update(),this.updateFlatGraph(),this.flatGraph.forEach(function(l){l.updateSortValue()}),this.flatGraph.sort(a.shapeSorter)},a.shapeSorter=function(l,u){return l.sortValue-u.sortValue},Object.defineProperty(a.prototype,"flatGraph",{get:function(){return this._flatGraph||this.updateFlatGraph(),this._flatGraph},set:function(l){this._flatGraph=l}}),a.prototype.updateFlatGraph=function(){this.flatGraph=this.getFlatGraph()},a.prototype.getFlatGraph=function(){var l=[this];return this.addChildFlatGraph(l)},a.prototype.addChildFlatGraph=function(l){return this.children.forEach(function(u){var d=u.getFlatGraph();Array.prototype.push.apply(l,d)}),l},a.prototype.updateSortValue=function(){this.sortValue=this.renderOrigin.z},a.prototype.render=function(){},a.prototype.renderGraphCanvas=function(l){if(!l)throw new Error("ctx is "+l+". Canvas context required for render. Check .renderGraphCanvas( ctx ).");this.flatGraph.forEach(function(u){u.render(l,r)})},a.prototype.renderGraphSvg=function(l){if(!l)throw new Error("svg is "+l+". SVG required for render. Check .renderGraphSvg( svg ).");this.flatGraph.forEach(function(u){u.render(l,o)})},a.prototype.copy=function(l){var u={},d=this.constructor.optionKeys;d.forEach(function(m){u[m]=this[m]},this),t.extend(u,l);var h=this.constructor;return new h(u)},a.prototype.copyGraph=function(l){var u=this.copy(l);return this.children.forEach(function(d){d.copyGraph({addTo:u})}),u},a.prototype.normalizeRotate=function(){this.rotate.x=t.modulo(this.rotate.x,s),this.rotate.y=t.modulo(this.rotate.y,s),this.rotate.z=t.modulo(this.rotate.z,s)};function c(l){return function(u){function d(h){this.create(h||{})}return d.prototype=Object.create(l.prototype),d.prototype.constructor=d,d.defaults=t.extend({},l.defaults),t.extend(d.defaults,u),d.optionKeys=l.optionKeys.slice(0),Object.keys(d.defaults).forEach(function(h){!d.optionKeys.indexOf(h)!=1&&d.optionKeys.push(h)}),d.subclass=c(d),d}}return a.subclass=c(a),a})}(xo)),xo.exports}var wo={exports:{}},So;function Ls(){return So||(So=1,function(e){(function(t,n){e.exports?e.exports=n():t.Zdog.Dragger=n()})(Se,function(){var t=typeof window<"u",n="mousedown",r="mousemove",o="mouseup";t&&(window.PointerEvent?(n="pointerdown",r="pointermove",o="pointerup"):"ontouchstart"in window&&(n="touchstart",r="touchmove",o="touchend"));function s(){}function i(a){this.create(a||{})}return i.prototype.create=function(a){this.onDragStart=a.onDragStart||s,this.onDragMove=a.onDragMove||s,this.onDragEnd=a.onDragEnd||s,this.bindDrag(a.startElement)},i.prototype.bindDrag=function(a){a=this.getQueryElement(a),a&&(a.style.touchAction="none",a.addEventListener(n,this))},i.prototype.getQueryElement=function(a){return typeof a=="string"&&(a=document.querySelector(a)),a},i.prototype.handleEvent=function(a){var c=this["on"+a.type];c&&c.call(this,a)},i.prototype.onmousedown=i.prototype.onpointerdown=function(a){this.dragStart(a,a)},i.prototype.ontouchstart=function(a){this.dragStart(a,a.changedTouches[0])},i.prototype.dragStart=function(a,c){a.preventDefault(),this.dragStartX=c.pageX,this.dragStartY=c.pageY,t&&(window.addEventListener(r,this),window.addEventListener(o,this)),this.onDragStart(c)},i.prototype.ontouchmove=function(a){this.dragMove(a,a.changedTouches[0])},i.prototype.onmousemove=i.prototype.onpointermove=function(a){this.dragMove(a,a)},i.prototype.dragMove=function(a,c){a.preventDefault();var l=c.pageX-this.dragStartX,u=c.pageY-this.dragStartY;this.onDragMove(c,l,u)},i.prototype.onmouseup=i.prototype.onpointerup=i.prototype.ontouchend=i.prototype.dragEnd=function(){window.removeEventListener(r,this),window.removeEventListener(o,this),this.onDragEnd()},i})}(wo)),wo.exports}var Co={exports:{}},Eo;function xd(){return Eo||(Eo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Rt(),Ls());else{var r=t.Zdog;r.Illustration=n(r,r.Anchor,r.Dragger)}})(Se,function(t,n,r){function o(){}var s=t.TAU,i=n.subclass({element:void 0,centered:!0,zoom:1,dragRotate:!1,resize:!1,onPrerender:o,onDragStart:o,onDragMove:o,onDragEnd:o,onResize:o});t.extend(i.prototype,r.prototype),i.prototype.create=function(c){n.prototype.create.call(this,c),r.prototype.create.call(this,c),this.setElement(this.element),this.setDragRotate(this.dragRotate),this.setResize(this.resize)},i.prototype.setElement=function(c){if(c=this.getQueryElement(c),!c)throw new Error("Zdog.Illustration element required. Set to "+c);var l=c.nodeName.toLowerCase();l=="canvas"?this.setCanvas(c):l=="svg"&&this.setSvg(c)},i.prototype.setSize=function(c,l){c=Math.round(c),l=Math.round(l),this.isCanvas?this.setSizeCanvas(c,l):this.isSvg&&this.setSizeSvg(c,l)},i.prototype.setResize=function(c){this.resize=c,this.resizeListener||(this.resizeListener=this.onWindowResize.bind(this)),c?(window.addEventListener("resize",this.resizeListener),this.onWindowResize()):window.removeEventListener("resize",this.resizeListener)},i.prototype.onWindowResize=function(){this.setMeasuredSize(),this.onResize(this.width,this.height)},i.prototype.setMeasuredSize=function(){var c,l,u=this.resize=="fullscreen";if(u)c=window.innerWidth,l=window.innerHeight;else{var d=this.element.getBoundingClientRect();c=d.width,l=d.height}this.setSize(c,l)},i.prototype.renderGraph=function(c){this.isCanvas?this.renderGraphCanvas(c):this.isSvg&&this.renderGraphSvg(c)},i.prototype.updateRenderGraph=function(c){this.updateGraph(),this.renderGraph(c)},i.prototype.setCanvas=function(c){this.element=c,this.isCanvas=!0,this.ctx=this.element.getContext("2d"),this.setSizeCanvas(c.width,c.height)},i.prototype.setSizeCanvas=function(c,l){this.width=c,this.height=l;var u=this.pixelRatio=window.devicePixelRatio||1;this.element.width=this.canvasWidth=c*u,this.element.height=this.canvasHeight=l*u;var d=u>1&&!this.resize;d&&(this.element.style.width=c+"px",this.element.style.height=l+"px")},i.prototype.renderGraphCanvas=function(c){c=c||this,this.prerenderCanvas(),n.prototype.renderGraphCanvas.call(c,this.ctx),this.postrenderCanvas()},i.prototype.prerenderCanvas=function(){var c=this.ctx;if(c.lineCap="round",c.lineJoin="round",c.clearRect(0,0,this.canvasWidth,this.canvasHeight),c.save(),this.centered){var l=this.width/2*this.pixelRatio,u=this.height/2*this.pixelRatio;c.translate(l,u)}var d=this.pixelRatio*this.zoom;c.scale(d,d),this.onPrerender(c)},i.prototype.postrenderCanvas=function(){this.ctx.restore()},i.prototype.setSvg=function(c){this.element=c,this.isSvg=!0,this.pixelRatio=1;var l=c.getAttribute("width"),u=c.getAttribute("height");this.setSizeSvg(l,u)},i.prototype.setSizeSvg=function(c,l){this.width=c,this.height=l;var u=c/this.zoom,d=l/this.zoom,h=this.centered?-u/2:0,m=this.centered?-d/2:0;this.element.setAttribute("viewBox",h+" "+m+" "+u+" "+d),this.resize?(this.element.removeAttribute("width"),this.element.removeAttribute("height")):(this.element.setAttribute("width",c),this.element.setAttribute("height",l))},i.prototype.renderGraphSvg=function(c){c=c||this,a(this.element),this.onPrerender(this.element),n.prototype.renderGraphSvg.call(c,this.element)};function a(c){for(;c.firstChild;)c.removeChild(c.firstChild)}return i.prototype.setDragRotate=function(c){if(c)c===!0&&(c=this);else return;this.dragRotate=c,this.bindDrag(this.element)},i.prototype.dragStart=function(){this.dragStartRX=this.dragRotate.rotate.x,this.dragStartRY=this.dragRotate.rotate.y,r.prototype.dragStart.apply(this,arguments)},i.prototype.dragMove=function(c,l){var u=l.pageX-this.dragStartX,d=l.pageY-this.dragStartY,h=Math.min(this.width,this.height),m=u/h*s,v=d/h*s;this.dragRotate.rotate.x=this.dragStartRX-v,this.dragRotate.rotate.y=this.dragStartRY-m,r.prototype.dragMove.apply(this,arguments)},i})}(Co)),Co.exports}var Ro={exports:{}},No;function Pn(){return No||(No=1,function(e){(function(t,n){if(e.exports)e.exports=n($t());else{var r=t.Zdog;r.PathCommand=n(r.Vector)}})(Se,function(t){function n(i,a,c){this.method=i,this.points=a.map(r),this.renderPoints=a.map(o),this.previousPoint=c,this.endRenderPoint=this.renderPoints[this.renderPoints.length-1],i=="arc"&&(this.controlPoints=[new t,new t])}function r(i){return i instanceof t?i:new t(i)}function o(i){return new t(i)}n.prototype.reset=function(){var i=this.points;this.renderPoints.forEach(function(a,c){var l=i[c];a.set(l)})},n.prototype.transform=function(i,a,c){this.renderPoints.forEach(function(l){l.transform(i,a,c)})},n.prototype.render=function(i,a,c){return this[this.method](i,a,c)},n.prototype.move=function(i,a,c){return c.move(i,a,this.renderPoints[0])},n.prototype.line=function(i,a,c){return c.line(i,a,this.renderPoints[0])},n.prototype.bezier=function(i,a,c){var l=this.renderPoints[0],u=this.renderPoints[1],d=this.renderPoints[2];return c.bezier(i,a,l,u,d)};var s=9/16;return n.prototype.arc=function(i,a,c){var l=this.previousPoint,u=this.renderPoints[0],d=this.renderPoints[1],h=this.controlPoints[0],m=this.controlPoints[1];return h.set(l).lerp(u,s),m.set(d).lerp(u,s),c.bezier(i,a,h,m,d)},n})}(Ro)),Ro.exports}var Ao={exports:{}},To;function Nt(){return To||(To=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),$t(),Pn(),Rt());else{var r=t.Zdog;r.Shape=n(r,r.Vector,r.PathCommand,r.Anchor)}})(Se,function(t,n,r,o){var s=o.subclass({stroke:1,fill:!1,color:"#333",closed:!0,visible:!0,path:[{}],front:{z:1},backface:!0});s.prototype.create=function(l){o.prototype.create.call(this,l),this.updatePath(),this.front=new n(l.front||this.front),this.renderFront=new n(this.front),this.renderNormal=new n};var i=["move","line","bezier","arc"];s.prototype.updatePath=function(){this.setPath(),this.updatePathCommands()},s.prototype.setPath=function(){},s.prototype.updatePathCommands=function(){var l;this.pathCommands=this.path.map(function(u,d){var h=Object.keys(u),m=h[0],v=u[m],g=h.length==1&&i.indexOf(m)!=-1;g||(m="line",v=u);var y=m=="line"||m=="move",x=Array.isArray(v);y&&!x&&(v=[v]),m=d===0?"move":m;var b=new r(m,v,l);return l=b.endRenderPoint,b})},s.prototype.reset=function(){this.renderOrigin.set(this.origin),this.renderFront.set(this.front),this.pathCommands.forEach(function(l){l.reset()})},s.prototype.transform=function(l,u,d){this.renderOrigin.transform(l,u,d),this.renderFront.transform(l,u,d),this.renderNormal.set(this.renderOrigin).subtract(this.renderFront),this.pathCommands.forEach(function(h){h.transform(l,u,d)}),this.children.forEach(function(h){h.transform(l,u,d)})},s.prototype.updateSortValue=function(){var l=this.pathCommands.length,u=this.pathCommands[0].endRenderPoint,d=this.pathCommands[l-1].endRenderPoint,h=l>2&&u.isSame(d);h&&(l-=1);for(var m=0,v=0;v<l;v++)m+=this.pathCommands[v].endRenderPoint.z;this.sortValue=m/l},s.prototype.render=function(l,u){var d=this.pathCommands.length;if(!(!this.visible||!d)&&(this.isFacingBack=this.renderNormal.z>0,!(!this.backface&&this.isFacingBack))){if(!u)throw new Error("Zdog renderer required. Set to "+u);var h=d==1;u.isCanvas&&h?this.renderCanvasDot(l,u):this.renderPath(l,u)}};var a=t.TAU;s.prototype.renderCanvasDot=function(l){var u=this.getLineWidth();if(u){l.fillStyle=this.getRenderColor();var d=this.pathCommands[0].endRenderPoint;l.beginPath();var h=u/2;l.arc(d.x,d.y,h,0,a),l.fill()}},s.prototype.getLineWidth=function(){return this.stroke?this.stroke==!0?1:this.stroke:0},s.prototype.getRenderColor=function(){var l=typeof this.backface=="string"&&this.isFacingBack,u=l?this.backface:this.color;return u},s.prototype.renderPath=function(l,u){var d=this.getRenderElement(l,u),h=this.pathCommands.length==2&&this.pathCommands[1].method=="line",m=!h&&this.closed,v=this.getRenderColor();u.renderPath(l,d,this.pathCommands,m),u.stroke(l,d,this.stroke,v,this.getLineWidth()),u.fill(l,d,this.fill,v),u.end(l,d)};var c="http://www.w3.org/2000/svg";return s.prototype.getRenderElement=function(l,u){if(u.isSvg)return this.svgElement||(this.svgElement=document.createElementNS(c,"path"),this.svgElement.setAttribute("stroke-linecap","round"),this.svgElement.setAttribute("stroke-linejoin","round")),this.svgElement},s})}(Ao)),Ao.exports}var Po={exports:{}},ko;function $s(){return ko||(ko=1,function(e){(function(t,n){if(e.exports)e.exports=n(Rt());else{var r=t.Zdog;r.Group=n(r.Anchor)}})(Se,function(t){var n=t.subclass({updateSort:!1,visible:!0});return n.prototype.updateSortValue=function(){var r=0;this.flatGraph.forEach(function(o){o.updateSortValue(),r+=o.sortValue}),this.sortValue=r/this.flatGraph.length,this.updateSort&&this.flatGraph.sort(t.shapeSorter)},n.prototype.render=function(r,o){this.visible&&this.flatGraph.forEach(function(s){s.render(r,o)})},n.prototype.updateFlatGraph=function(){var r=[];this.flatGraph=this.addChildFlatGraph(r)},n.prototype.getFlatGraph=function(){return[this]},n})}(Po)),Po.exports}var Mo={exports:{}},Do;function Fs(){return Do||(Do=1,function(e){(function(t,n){if(e.exports)e.exports=n(Nt());else{var r=t.Zdog;r.Rect=n(r.Shape)}})(Se,function(t){var n=t.subclass({width:1,height:1});return n.prototype.setPath=function(){var r=this.width/2,o=this.height/2;this.path=[{x:-r,y:-o},{x:r,y:-o},{x:r,y:o},{x:-r,y:o}]},n})}(Mo)),Mo.exports}var jo={exports:{}},Io;function bd(){return Io||(Io=1,function(e){(function(t,n){if(e.exports)e.exports=n(Nt());else{var r=t.Zdog;r.RoundedRect=n(r.Shape)}})(Se,function(t){var n=t.subclass({width:1,height:1,cornerRadius:.25,closed:!1});return n.prototype.setPath=function(){var r=this.width/2,o=this.height/2,s=Math.min(r,o),i=Math.min(this.cornerRadius,s),a=r-i,c=o-i,l=[{x:a,y:-o},{arc:[{x:r,y:-o},{x:r,y:-c}]}];c&&l.push({x:r,y:c}),l.push({arc:[{x:r,y:o},{x:a,y:o}]}),a&&l.push({x:-a,y:o}),l.push({arc:[{x:-r,y:o},{x:-r,y:c}]}),c&&l.push({x:-r,y:-c}),l.push({arc:[{x:-r,y:-o},{x:-a,y:-o}]}),a&&l.push({x:a,y:-o}),this.path=l},n})}(jo)),jo.exports}var _o={exports:{}},Oo;function kn(){return Oo||(Oo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Nt());else{var r=t.Zdog;r.Ellipse=n(r.Shape)}})(Se,function(t){var n=t.subclass({diameter:1,width:void 0,height:void 0,quarters:4,closed:!1});return n.prototype.setPath=function(){var r=this.width!=null?this.width:this.diameter,o=this.height!=null?this.height:this.diameter,s=r/2,i=o/2;this.path=[{x:0,y:-i},{arc:[{x:s,y:-i},{x:s,y:0}]}],this.quarters>1&&this.path.push({arc:[{x:s,y:i},{x:0,y:i}]}),this.quarters>2&&this.path.push({arc:[{x:-s,y:i},{x:-s,y:0}]}),this.quarters>3&&this.path.push({arc:[{x:-s,y:-i},{x:0,y:-i}]})},n})}(_o)),_o.exports}var Lo={exports:{}},$o;function wd(){return $o||($o=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Nt());else{var r=t.Zdog;r.Polygon=n(r,r.Shape)}})(Se,function(t,n){var r=n.subclass({sides:3,radius:.5}),o=t.TAU;return r.prototype.setPath=function(){this.path=[];for(var s=0;s<this.sides;s++){var i=s/this.sides*o-o/4,a=Math.cos(i)*this.radius,c=Math.sin(i)*this.radius;this.path.push({x:a,y:c})}},r})}(Lo)),Lo.exports}var Fo={exports:{}},zo;function Sd(){return zo||(zo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),$t(),Rt(),kn());else{var r=t.Zdog;r.Hemisphere=n(r,r.Vector,r.Anchor,r.Ellipse)}})(Se,function(t,n,r,o){var s=o.subclass({fill:!0}),i=t.TAU;s.prototype.create=function(){o.prototype.create.apply(this,arguments),this.apex=new r({addTo:this,translate:{z:this.diameter/2}}),this.renderCentroid=new n},s.prototype.updateSortValue=function(){this.renderCentroid.set(this.renderOrigin).lerp(this.apex.renderOrigin,3/8),this.sortValue=this.renderCentroid.z},s.prototype.render=function(c,l){this.renderDome(c,l),o.prototype.render.apply(this,arguments)},s.prototype.renderDome=function(c,l){if(this.visible){var u=this.getDomeRenderElement(c,l),d=Math.atan2(this.renderNormal.y,this.renderNormal.x),h=this.diameter/2*this.renderNormal.magnitude(),m=this.renderOrigin.x,v=this.renderOrigin.y;if(l.isCanvas){var g=d+i/4,y=d-i/4;c.beginPath(),c.arc(m,v,h,g,y)}else l.isSvg&&(d=(d-i/4)/i*360,this.domeSvgElement.setAttribute("d","M "+-h+",0 A "+h+","+h+" 0 0 1 "+h+",0"),this.domeSvgElement.setAttribute("transform","translate("+m+","+v+" ) rotate("+d+")"));l.stroke(c,u,this.stroke,this.color,this.getLineWidth()),l.fill(c,u,this.fill,this.color),l.end(c,u)}};var a="http://www.w3.org/2000/svg";return s.prototype.getDomeRenderElement=function(c,l){if(l.isSvg)return this.domeSvgElement||(this.domeSvgElement=document.createElementNS(a,"path"),this.domeSvgElement.setAttribute("stroke-linecap","round"),this.domeSvgElement.setAttribute("stroke-linejoin","round")),this.domeSvgElement},s})}(Fo)),Fo.exports}var Bo={exports:{}},Vo;function Cd(){return Vo||(Vo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Pn(),Nt(),$s(),kn());else{var r=t.Zdog;r.Cylinder=n(r,r.PathCommand,r.Shape,r.Group,r.Ellipse)}})(Se,function(t,n,r,o,s){function i(){}var a=o.subclass({color:"#333",updateSort:!0});a.prototype.create=function(){o.prototype.create.apply(this,arguments),this.pathCommands=[new n("move",[{}]),new n("line",[{}])]},a.prototype.render=function(m,v){this.renderCylinderSurface(m,v),o.prototype.render.apply(this,arguments)},a.prototype.renderCylinderSurface=function(m,v){if(this.visible){var g=this.getRenderElement(m,v),y=this.frontBase,x=this.rearBase,b=y.renderNormal.magnitude(),S=y.diameter*b+y.getLineWidth();this.pathCommands[0].renderPoints[0].set(y.renderOrigin),this.pathCommands[1].renderPoints[0].set(x.renderOrigin),v.isCanvas&&(m.lineCap="butt"),v.renderPath(m,g,this.pathCommands),v.stroke(m,g,!0,this.color,S),v.end(m,g),v.isCanvas&&(m.lineCap="round")}};var c="http://www.w3.org/2000/svg";a.prototype.getRenderElement=function(m,v){if(v.isSvg)return this.svgElement||(this.svgElement=document.createElementNS(c,"path")),this.svgElement},a.prototype.copyGraph=i;var l=s.subclass();l.prototype.copyGraph=i;var u=r.subclass({diameter:1,length:1,frontFace:void 0,fill:!0}),d=t.TAU;u.prototype.create=function(){r.prototype.create.apply(this,arguments),this.group=new a({addTo:this,color:this.color,visible:this.visible});var m=this.length/2,v=this.backface||!0;this.frontBase=this.group.frontBase=new s({addTo:this.group,diameter:this.diameter,translate:{z:m},rotate:{y:d/2},color:this.color,stroke:this.stroke,fill:this.fill,backface:this.frontFace||v,visible:this.visible}),this.rearBase=this.group.rearBase=this.frontBase.copy({translate:{z:-m},rotate:{y:0},backface:v})},u.prototype.render=function(){};var h=["stroke","fill","color","visible"];return h.forEach(function(m){var v="_"+m;Object.defineProperty(u.prototype,m,{get:function(){return this[v]},set:function(g){this[v]=g,this.frontBase&&(this.frontBase[m]=g,this.rearBase[m]=g,this.group[m]=g)}})}),u})}(Bo)),Bo.exports}var Ho={exports:{}},Wo;function Ed(){return Wo||(Wo=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),$t(),Pn(),Rt(),kn());else{var r=t.Zdog;r.Cone=n(r,r.Vector,r.PathCommand,r.Anchor,r.Ellipse)}})(Se,function(t,n,r,o,s){var i=s.subclass({length:1,fill:!0}),a=t.TAU;i.prototype.create=function(){s.prototype.create.apply(this,arguments),this.apex=new o({addTo:this,translate:{z:this.length}}),this.renderApex=new n,this.renderCentroid=new n,this.tangentA=new n,this.tangentB=new n,this.surfacePathCommands=[new r("move",[{}]),new r("line",[{}]),new r("line",[{}])]},i.prototype.updateSortValue=function(){this.renderCentroid.set(this.renderOrigin).lerp(this.apex.renderOrigin,1/3),this.sortValue=this.renderCentroid.z},i.prototype.render=function(l,u){this.renderConeSurface(l,u),s.prototype.render.apply(this,arguments)},i.prototype.renderConeSurface=function(l,u){if(this.visible){this.renderApex.set(this.apex.renderOrigin).subtract(this.renderOrigin);var d=this.renderNormal.magnitude(),h=this.renderApex.magnitude2d(),m=this.renderNormal.magnitude2d(),v=Math.acos(m/d),g=Math.sin(v),y=this.diameter/2*d,x=y*g<h;if(x){var b=Math.atan2(this.renderNormal.y,this.renderNormal.x)+a/2,S=h/g,C=Math.acos(y/S),E=this.tangentA,T=this.tangentB;E.x=Math.cos(C)*y*g,E.y=Math.sin(C)*y,T.set(this.tangentA),T.y*=-1,E.rotateZ(b),T.rotateZ(b),E.add(this.renderOrigin),T.add(this.renderOrigin),this.setSurfaceRenderPoint(0,E),this.setSurfaceRenderPoint(1,this.apex.renderOrigin),this.setSurfaceRenderPoint(2,T);var R=this.getSurfaceRenderElement(l,u);u.renderPath(l,R,this.surfacePathCommands),u.stroke(l,R,this.stroke,this.color,this.getLineWidth()),u.fill(l,R,this.fill,this.color),u.end(l,R)}}};var c="http://www.w3.org/2000/svg";return i.prototype.getSurfaceRenderElement=function(l,u){if(u.isSvg)return this.surfaceSvgElement||(this.surfaceSvgElement=document.createElementNS(c,"path"),this.surfaceSvgElement.setAttribute("stroke-linecap","round"),this.surfaceSvgElement.setAttribute("stroke-linejoin","round")),this.surfaceSvgElement},i.prototype.setSurfaceRenderPoint=function(l,u){var d=this.surfacePathCommands[l].renderPoints[0];d.set(u)},i})}(Ho)),Ho.exports}var Uo={exports:{}},Go;function Rd(){return Go||(Go=1,function(e){(function(t,n){if(e.exports)e.exports=n(Ye(),Rt(),Nt(),Fs());else{var r=t.Zdog;r.Box=n(r,r.Anchor,r.Shape,r.Rect)}})(Se,function(t,n,r,o){var s=o.subclass();s.prototype.copyGraph=function(){};var i=t.TAU,a=["frontFace","rearFace","leftFace","rightFace","topFace","bottomFace"],c=t.extend({},r.defaults);delete c.path,a.forEach(function(d){c[d]=!0}),t.extend(c,{width:1,height:1,depth:1,fill:!0});var l=n.subclass(c);l.prototype.create=function(d){n.prototype.create.call(this,d),this.updatePath(),this.fill=this.fill},l.prototype.updatePath=function(){a.forEach(function(d){this[d]=this[d]},this)},a.forEach(function(d){var h="_"+d;Object.defineProperty(l.prototype,d,{get:function(){return this[h]},set:function(m){this[h]=m,this.setFace(d,m)}})}),l.prototype.setFace=function(d,h){var m=d+"Rect",v=this[m];if(!h){this.removeChild(v);return}var g=this.getFaceOptions(d);g.color=typeof h=="string"?h:this.color,v?v.setOptions(g):v=this[m]=new s(g),v.updatePath(),this.addChild(v)},l.prototype.getFaceOptions=function(d){return{frontFace:{width:this.width,height:this.height,translate:{z:this.depth/2}},rearFace:{width:this.width,height:this.height,translate:{z:-this.depth/2},rotate:{y:i/2}},leftFace:{width:this.depth,height:this.height,translate:{x:-this.width/2},rotate:{y:-i/4}},rightFace:{width:this.depth,height:this.height,translate:{x:this.width/2},rotate:{y:i/4}},topFace:{width:this.width,height:this.depth,translate:{y:-this.height/2},rotate:{x:-i/4}},bottomFace:{width:this.width,height:this.depth,translate:{y:this.height/2},rotate:{x:i/4}}}[d]};var u=["color","stroke","fill","backface","front","visible"];return u.forEach(function(d){var h="_"+d;Object.defineProperty(l.prototype,d,{get:function(){return this[h]},set:function(m){this[h]=m,a.forEach(function(v){var g=this[v+"Rect"],y=typeof this[v]=="string",x=d=="color"&&y;g&&!x&&(g[d]=m)},this)}})}),l})}(Uo)),Uo.exports}(function(e){(function(t,n){e.exports&&(e.exports=n(Ye(),_s(),Os(),$t(),Rt(),Ls(),xd(),Pn(),Nt(),$s(),Fs(),bd(),kn(),wd(),Sd(),Cd(),Ed(),Rd()))})(Se,function(t,n,r,o,s,i,a,c,l,u,d,h,m,v,g,y,x,b){return t.CanvasRenderer=n,t.SvgRenderer=r,t.Vector=o,t.Anchor=s,t.Dragger=i,t.Illustration=a,t.PathCommand=c,t.Shape=l,t.Group=u,t.Rect=d,t.RoundedRect=h,t.Ellipse=m,t.Polygon=v,t.Hemisphere=g,t.Cylinder=y,t.Cone=x,t.Box=b,t})})(Is);var Zo=Is.exports;function Nd(e={}){const{size:t="sm",cycleDuration:n=3e3,className:r=""}=e,o=()=>{switch(t){case"sm":return{width:140,height:105,discSize:42};case"md":return{width:300,height:200,discSize:80};case"lg":return{width:400,height:250,discSize:100};case"xl":return{width:500,height:300,discSize:108};default:return{width:140,height:105,discSize:42}}},{width:s,height:i,discSize:a}=o(),c=Math.floor(s*.23),l=document.createElement("div");l.className=`memoreco-disc-loader ${r}`.trim(),l.style.cssText=`
16
16
  position: relative;
17
17
  width: ${s}px;
18
18
  height: ${i}px;
19
- `;const u=document.createElement("canvas");u.width=s,u.height=i,u.style.cssText="border-radius: 8px;",l.appendChild(u);let d=null,h=[],m=null,v=!1;const g=()=>{if(v)return;d=new Io.Illustration({element:u,zoom:1,rotate:{y:0}});const y=(j,P,I)=>{const D=new Io.Ellipse({addTo:d,diameter:a,stroke:!1,fill:!0,color:"#5e0f1a"});h.push({shape:D,id:I,group:j,offset:P})};let b=0;for(let j=0;j<6;j++)y("left",j/6,b++);for(let j=0;j<6;j++)y("right",j/6,b++);const C=j=>1-Math.pow(1-j,2),S=(j,P,I)=>j+(P-j)*I,R=j=>({r:parseInt(j.slice(1,3),16),g:parseInt(j.slice(3,5),16),b:parseInt(j.slice(5,7),16)}),M=["#5e0f1a","#c22a2f","#e0392b","#f05a24","#f39c12","#fde68a"].map(R),A=[...M].reverse(),$=(j,P)=>{if(P<=0)return j[0];if(P>=1)return j[j.length-1];const I=P*(j.length-1),D=Math.floor(I),k=I-D,N=j[D],T=j[D+1];return{r:Math.round(S(N.r,T.r,k)),g:Math.round(S(N.g,T.g,k)),b:Math.round(S(N.b,T.b,k))}};h.forEach(({shape:j,group:P,offset:I,id:D})=>{let k,N,T;if(P==="left"){const E=I,_=C(E);k=-c+c*_,N=Math.PI/2*_,T=300+(100-Math.abs(k))-D*.01;const{r:Y,g:H,b:se}=$(M,E);j.color=`rgba(${Y}, ${H}, ${se}, 1)`}else{const E=I,_=C(E);k=0+c*_,N=Math.PI/2+Math.PI/2*_,T=300+(100-Math.abs(k))-D*.01;const{r:Y,g:H,b:se}=$(A,E);j.color=`rgba(${Y}, ${H}, ${se}, 1)`}j.translate.x=k,j.translate.z=T,j.rotate.y=N}),d.updateRenderGraph();const B=(j,P,I,D)=>{let k,N,T,E;const _=Math.min(I,1),Y=H=>H<.5?2*H*H:1-Math.pow(-2*H+2,2)/2;if(P==="left"){const H=Y(_);k=-c+c*H,N=Math.PI/2*H,T=1,E=300+(100-Math.abs(k))-D*.01;const{r:se,g:U,b:Z}=$(M,_);j.color=`rgba(${se}, ${U}, ${Z}, ${T})`}else{const H=Y(_);k=0+c*H,N=Math.PI/2+Math.PI/2*H,T=1,E=300+(100-Math.abs(k))-D*.01;const{r:se,g:U,b:Z}=$(A,_);j.color=`rgba(${se}, ${U}, ${Z}, ${T})`}j.translate.x=k,j.translate.z=E,j.rotate.y=N},z=j=>{if(v||!d||!h.length)return;const P=j%n/n;for(let I=0;I<h.length;I++){const D=h[I],k=(P+D.offset)%1;if(k<.02){const N=k/.02;B(D.shape,D.group,0,D.id);const T=D.shape.color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([^)]+)\)/);if(T){const E=parseFloat(T[4]);D.shape.color=`rgba(${T[1]}, ${T[2]}, ${T[3]}, ${E*N})`}D.shape.translate.z=100-D.id*.01}else if(k>.98){const N=(1-k)/.02,T=(.98-.02)/.96;B(D.shape,D.group,T,D.id);const E=D.shape.color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([^)]+)\)/);if(E){const _=parseFloat(E[4]);D.shape.color=`rgba(${E[1]}, ${E[2]}, ${E[3]}, ${_*N})`}}else{const N=(k-.02)/.96;B(D.shape,D.group,N,D.id)}}d.updateRenderGraph(),v||(m=requestAnimationFrame(z))};m=requestAnimationFrame(z)},x=()=>{v=!0,m&&(cancelAnimationFrame(m),m=null),h=[],d=null};return g(),{element:l,destroy:x}}const hr=en("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-[#EDEBEB]",secondary:"bg-secondary text-secondary-foreground hover:bg-[#EDEBEB]",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),yt=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Sc:"button";return f.jsx(i,{className:Nt(hr({variant:t,size:n,className:e})),ref:s,...o})});yt.displayName="Button";const Ts=p.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:Nt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ts.displayName="Card";const Ps=p.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:Nt("flex flex-col space-y-1.5 p-6",e),...t}));Ps.displayName="CardHeader";const ks=p.forwardRef(({className:e,...t},n)=>f.jsx("h3",{ref:n,className:Nt("text-2xl font-semibold leading-none tracking-tight",e),...t}));ks.displayName="CardTitle";const Ds=p.forwardRef(({className:e,...t},n)=>f.jsx("p",{ref:n,className:Nt("text-sm text-muted-foreground",e),...t}));Ds.displayName="CardDescription";const Ms=p.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:Nt("p-6 pt-0",e),...t}));Ms.displayName="CardContent";function O(...e){return bs(fr(e))}const js=p.forwardRef(({className:e,type:t,error:n,...r},o)=>f.jsx("input",{type:t,className:O("flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n&&"border-red-500 focus-visible:ring-red-500",e),ref:o,...r}));js.displayName="Input";var vd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=vd.reduce((e,t)=>{const n=Ft(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yd(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}var xd="Label",_s=p.forwardRef((e,t)=>f.jsx(J.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));_s.displayName=xd;var Is=_s;const bd=en("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Os=p.forwardRef(({className:e,...t},n)=>f.jsx(Is,{ref:n,className:O(bd(),e),...t}));Os.displayName=Is.displayName;const wd=en("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-white text-gray-900 border-gray-200",destructive:"border-red-500/50 text-red-900 dark:border-red-500 [&>svg]:text-red-500 bg-red-50",success:"border-green-500/50 text-green-900 dark:border-green-500 [&>svg]:text-green-500 bg-green-50",warning:"border-yellow-500/50 text-yellow-900 dark:border-yellow-500 [&>svg]:text-yellow-500 bg-yellow-50"}},defaultVariants:{variant:"default"}}),Ls=p.forwardRef(({className:e,variant:t,...n},r)=>f.jsx("div",{ref:r,role:"alert",className:O(wd({variant:t}),e),...n}));Ls.displayName="Alert";const $s=p.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:O("text-sm [&_p]:leading-relaxed",e),...t}));$s.displayName="AlertDescription";const Fs=p.forwardRef(({className:e,...t},n)=>f.jsx("h5",{ref:n,className:O("mb-1 font-medium leading-none tracking-tight",e),...t}));Fs.displayName="AlertTitle";const zs=p.forwardRef(({className:e,error:t,...n},r)=>f.jsx("textarea",{className:O("flex min-h-[80px] w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t&&"border-red-500 focus-visible:ring-red-500",e),ref:r,...n}));zs.displayName="Textarea";const Cd=en("animate-spin rounded-full border-2 border-current border-t-transparent",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-12 w-12"}},defaultVariants:{size:"md"}}),Bs=p.forwardRef(({className:e,size:t,...n},r)=>f.jsx("div",{ref:r,className:O(Cd({size:t}),e),...n}));Bs.displayName="Spinner";const Sd=en("relative",{variants:{size:{sm:"w-[140px] h-[105px]",md:"w-[300px] h-[200px]",lg:"w-[400px] h-[250px]",xl:"w-[500px] h-[300px]"}},defaultVariants:{size:"md"}}),Ws=w.forwardRef(({className:e,size:t,cycleDuration:n=3e3,...r},o)=>{const s=w.useRef(null),i=w.useRef(null);return w.useEffect(()=>{if(s.current)return i.current&&i.current.destroy(),i.current=gd({size:t||"md",cycleDuration:n,className:""}),s.current.innerHTML="",s.current.appendChild(i.current.element),()=>{i.current&&(i.current.destroy(),i.current=null)}},[t,n]),f.jsx("div",{ref:a=>{s.current=a,typeof o=="function"?o(a):o&&(o.current=a)},className:O(Sd({size:t}),e),...r})});Ws.displayName="DiscLoader";function Ed(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Nd=e=>{switch(e){case"success":return Td;case"info":return kd;case"warning":return Pd;case"error":return Dd;default:return null}},Rd=Array(12).fill(0),Ad=({visible:e,className:t})=>w.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},w.createElement("div",{className:"sonner-spinner"},Rd.map((n,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Td=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Pd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),kd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Dd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Md=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),jd=()=>{const[e,t]=w.useState(document.hidden);return w.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Jn=1;class _d{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Jn++,i=this.toasts.find(c=>c.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:a,title:r}):c):this.addToast({title:r,...o,dismissible:a,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const a=o.then(async l=>{if(i=["resolve",l],w.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(Od(l)&&!l.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,v=typeof d=="object"&&!w.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...v})}else if(l instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(l):n.error,h=typeof n.description=="function"?await n.description(l):n.description,v=typeof d=="object"&&!w.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...v})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(l):n.success,h=typeof n.description=="function"?await n.description(l):n.description,v=typeof d=="object"&&!w.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:h,...v})}}).catch(async l=>{if(i=["reject",l],n.error!==void 0){s=!1;const u=typeof n.error=="function"?await n.error(l):n.error,d=typeof n.description=="function"?await n.description(l):n.description,m=typeof u=="object"&&!w.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,u)=>a.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Jn++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ne=new _d,Id=(e,t)=>{const n=(t==null?void 0:t.id)||Jn++;return Ne.addToast({title:e,...t,id:n}),n},Od=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ld=Id,$d=()=>Ne.toasts,Fd=()=>Ne.getActiveToasts(),Zt=Object.assign(Ld,{success:Ne.success,info:Ne.info,warning:Ne.warning,error:Ne.error,custom:Ne.custom,message:Ne.message,promise:Ne.promise,dismiss:Ne.dismiss,loading:Ne.loading},{getHistory:$d,getToasts:Fd});Ed("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function on(e){return e.label!==void 0}const zd=3,Bd="24px",Wd="16px",Oo=4e3,Vd=356,Hd=14,Ud=45,Gd=200;function Ve(...e){return e.filter(Boolean).join(" ")}function qd(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Yd=e=>{var t,n,r,o,s,i,a,c,l;const{invert:u,toast:d,unstyled:h,interacting:m,setHeights:v,visibleToasts:g,heights:x,index:y,toasts:b,expanded:C,removeToast:S,defaultRichColors:R,closeButton:M,style:A,cancelButtonStyle:$,actionButtonStyle:B,className:z="",descriptionClassName:j="",duration:P,position:I,gap:D,expandByDefault:k,classNames:N,icons:T,closeButtonAriaLabel:E="Close toast"}=e,[_,Y]=w.useState(null),[H,se]=w.useState(null),[U,Z]=w.useState(!1),[ee,de]=w.useState(!1),[W,V]=w.useState(!1),[ae,L]=w.useState(!1),[Q,K]=w.useState(!1),[ve,ye]=w.useState(0),[Ke,Re]=w.useState(0),Ce=w.useRef(d.duration||P||Oo),Tt=w.useRef(null),we=w.useRef(null),F=y===0,ne=y+1<=g,re=d.type,Ee=d.dismissible!==!1,ot=d.className||"",Ze=d.descriptionClassName||"",Pe=w.useMemo(()=>x.findIndex(q=>q.toastId===d.id)||0,[x,d.id]),ze=w.useMemo(()=>{var q;return(q=d.closeButton)!=null?q:M},[d.closeButton,M]),Pt=w.useMemo(()=>d.duration||P||Oo,[d.duration,P]),kt=w.useRef(0),Qe=w.useRef(0),qt=w.useRef(0),G=w.useRef(null),[fe,ie]=I.split("-"),pe=w.useMemo(()=>x.reduce((q,ue,ce)=>ce>=Pe?q:q+ue.height,0),[x,Pe]),ge=jd(),ke=d.invert||u,Be=re==="loading";Qe.current=w.useMemo(()=>Pe*D+pe,[Pe,pe]),w.useEffect(()=>{Ce.current=Pt},[Pt]),w.useEffect(()=>{Z(!0)},[]),w.useEffect(()=>{const q=we.current;if(q){const ue=q.getBoundingClientRect().height;return Re(ue),v(ce=>[{toastId:d.id,height:ue,position:d.position},...ce]),()=>v(ce=>ce.filter(Se=>Se.toastId!==d.id))}},[v,d.id]),w.useLayoutEffect(()=>{if(!U)return;const q=we.current,ue=q.style.height;q.style.height="auto";const ce=q.getBoundingClientRect().height;q.style.height=ue,Re(ce),v(Se=>Se.find(xe=>xe.toastId===d.id)?Se.map(xe=>xe.toastId===d.id?{...xe,height:ce}:xe):[{toastId:d.id,height:ce,position:d.position},...Se])},[U,d.title,d.description,v,d.id,d.jsx,d.action,d.cancel]);const he=w.useCallback(()=>{de(!0),ye(Qe.current),v(q=>q.filter(ue=>ue.toastId!==d.id)),setTimeout(()=>{S(d)},Gd)},[d,S,v,Qe]);w.useEffect(()=>{if(d.promise&&re==="loading"||d.duration===1/0||d.type==="loading")return;let q;return C||m||ge?(()=>{if(qt.current<kt.current){const Se=new Date().getTime()-kt.current;Ce.current=Ce.current-Se}qt.current=new Date().getTime()})():(()=>{Ce.current!==1/0&&(kt.current=new Date().getTime(),q=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),he()},Ce.current))})(),()=>clearTimeout(q)},[C,m,d,re,ge,he]),w.useEffect(()=>{d.delete&&(he(),d.onDismiss==null||d.onDismiss.call(d,d))},[he,d.delete]);function Dt(){var q;if(T!=null&&T.loading){var ue;return w.createElement("div",{className:Ve(N==null?void 0:N.loader,d==null||(ue=d.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":re==="loading"},T.loading)}return w.createElement(Ad,{className:Ve(N==null?void 0:N.loader,d==null||(q=d.classNames)==null?void 0:q.loader),visible:re==="loading"})}const st=d.icon||(T==null?void 0:T[re])||Nd(re);var gt,We;return w.createElement("li",{tabIndex:0,ref:we,className:Ve(z,ot,N==null?void 0:N.toast,d==null||(t=d.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[re],d==null||(n=d.classNames)==null?void 0:n[re]),"data-sonner-toast":"","data-rich-colors":(gt=d.richColors)!=null?gt:R,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":U,"data-promise":!!d.promise,"data-swiped":Q,"data-removed":ee,"data-visible":ne,"data-y-position":fe,"data-x-position":ie,"data-index":y,"data-front":F,"data-swiping":W,"data-dismissible":Ee,"data-type":re,"data-invert":ke,"data-swipe-out":ae,"data-swipe-direction":H,"data-expanded":!!(C||k&&U),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${ee?ve:Qe.current}px`,"--initial-height":k?"auto":`${Ke}px`,...A,...d.style},onDragEnd:()=>{V(!1),Y(null),G.current=null},onPointerDown:q=>{q.button!==2&&(Be||!Ee||(Tt.current=new Date,ye(Qe.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(V(!0),G.current={x:q.clientX,y:q.clientY})))},onPointerUp:()=>{var q,ue,ce;if(ae||!Ee)return;G.current=null;const Se=Number(((q=we.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),nn=Number(((ue=we.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((ce=Tt.current)==null?void 0:ce.getTime()),De=_==="x"?Se:nn,rn=Math.abs(De)/xe;if(Math.abs(De)>=Ud||rn>.11){ye(Qe.current),d.onDismiss==null||d.onDismiss.call(d,d),se(_==="x"?Se>0?"right":"left":nn>0?"down":"up"),he(),L(!0);return}else{var je,_e;(je=we.current)==null||je.style.setProperty("--swipe-amount-x","0px"),(_e=we.current)==null||_e.style.setProperty("--swipe-amount-y","0px")}K(!1),V(!1),Y(null)},onPointerMove:q=>{var ue,ce,Se;if(!G.current||!Ee||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const xe=q.clientY-G.current.y,De=q.clientX-G.current.x;var rn;const je=(rn=e.swipeDirections)!=null?rn:qd(I);!_&&(Math.abs(De)>1||Math.abs(xe)>1)&&Y(Math.abs(De)>Math.abs(xe)?"x":"y");let _e={x:0,y:0};const Ur=vt=>1/(1.5+Math.abs(vt)/20);if(_==="y"){if(je.includes("top")||je.includes("bottom"))if(je.includes("top")&&xe<0||je.includes("bottom")&&xe>0)_e.y=xe;else{const vt=xe*Ur(xe);_e.y=Math.abs(vt)<Math.abs(xe)?vt:xe}}else if(_==="x"&&(je.includes("left")||je.includes("right")))if(je.includes("left")&&De<0||je.includes("right")&&De>0)_e.x=De;else{const vt=De*Ur(De);_e.x=Math.abs(vt)<Math.abs(De)?vt:De}(Math.abs(_e.x)>0||Math.abs(_e.y)>0)&&K(!0),(ce=we.current)==null||ce.style.setProperty("--swipe-amount-x",`${_e.x}px`),(Se=we.current)==null||Se.style.setProperty("--swipe-amount-y",`${_e.y}px`)}},ze&&!d.jsx&&re!=="loading"?w.createElement("button",{"aria-label":E,"data-disabled":Be,"data-close-button":!0,onClick:Be||!Ee?()=>{}:()=>{he(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Ve(N==null?void 0:N.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(We=T==null?void 0:T.close)!=null?We:Md):null,(re||d.icon||d.promise)&&d.icon!==null&&((T==null?void 0:T[re])!==null||d.icon)?w.createElement("div",{"data-icon":"",className:Ve(N==null?void 0:N.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Dt():null,d.type!=="loading"?st:null):null,w.createElement("div",{"data-content":"",className:Ve(N==null?void 0:N.content,d==null||(s=d.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:Ve(N==null?void 0:N.title,d==null||(i=d.classNames)==null?void 0:i.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?w.createElement("div",{"data-description":"",className:Ve(j,Ze,N==null?void 0:N.description,d==null||(a=d.classNames)==null?void 0:a.description)},typeof d.description=="function"?d.description():d.description):null),w.isValidElement(d.cancel)?d.cancel:d.cancel&&on(d.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||$,onClick:q=>{on(d.cancel)&&Ee&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,q),he())},className:Ve(N==null?void 0:N.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,w.isValidElement(d.action)?d.action:d.action&&on(d.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||B,onClick:q=>{on(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,q),!q.defaultPrevented&&he())},className:Ve(N==null?void 0:N.actionButton,d==null||(l=d.classNames)==null?void 0:l.actionButton)},d.action.label):null)};function Lo(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Xd(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?Wd:Bd;function c(l){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${i}-${l}`]=a:n[`${i}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):c(a)}),n}const Kd=w.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:l,offset:u,mobileOffset:d,theme:h="light",richColors:m,duration:v,style:g,visibleToasts:x=zd,toastOptions:y,dir:b=Lo(),gap:C=Hd,icons:S,containerAriaLabel:R="Notifications"}=t,[M,A]=w.useState([]),$=w.useMemo(()=>r?M.filter(U=>U.toasterId===r):M.filter(U=>!U.toasterId),[M,r]),B=w.useMemo(()=>Array.from(new Set([s].concat($.filter(U=>U.position).map(U=>U.position)))),[$,s]),[z,j]=w.useState([]),[P,I]=w.useState(!1),[D,k]=w.useState(!1),[N,T]=w.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),E=w.useRef(null),_=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),Y=w.useRef(null),H=w.useRef(!1),se=w.useCallback(U=>{A(Z=>{var ee;return(ee=Z.find(de=>de.id===U.id))!=null&&ee.delete||Ne.dismiss(U.id),Z.filter(({id:de})=>de!==U.id)})},[]);return w.useEffect(()=>Ne.subscribe(U=>{if(U.dismiss){requestAnimationFrame(()=>{A(Z=>Z.map(ee=>ee.id===U.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{Sn.flushSync(()=>{A(Z=>{const ee=Z.findIndex(de=>de.id===U.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...U},...Z.slice(ee+1)]:[U,...Z]})})})}),[M]),w.useEffect(()=>{if(h!=="system"){T(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?T("dark"):T("light")),typeof window>"u")return;const U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:Z})=>{T(Z?"dark":"light")})}catch{U.addListener(({matches:ee})=>{try{T(ee?"dark":"light")}catch(de){console.error(de)}})}},[h]),w.useEffect(()=>{M.length<=1&&I(!1)},[M]),w.useEffect(()=>{const U=Z=>{var ee;if(i.every(V=>Z[V]||Z.code===V)){var W;I(!0),(W=E.current)==null||W.focus()}Z.code==="Escape"&&(document.activeElement===E.current||(ee=E.current)!=null&&ee.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),w.useEffect(()=>{if(E.current)return()=>{Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null,H.current=!1)}},[E.current]),w.createElement("section",{ref:n,"aria-label":`${R} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((U,Z)=>{var ee;const[de,W]=U.split("-");return $.length?w.createElement("ol",{key:U,dir:b==="auto"?Lo():b,tabIndex:-1,ref:E,className:l,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":de,"data-x-position":W,style:{"--front-toast-height":`${((ee=z[0])==null?void 0:ee.height)||0}px`,"--width":`${Vd}px`,"--gap":`${C}px`,...g,...Xd(u,d)},onBlur:V=>{H.current&&!V.currentTarget.contains(V.relatedTarget)&&(H.current=!1,Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||H.current||(H.current=!0,Y.current=V.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{D||I(!1)},onDragEnd:()=>I(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||k(!0)},onPointerUp:()=>k(!1)},$.filter(V=>!V.position&&Z===0||V.position===U).map((V,ae)=>{var L,Q;return w.createElement(Yd,{key:V.id,icons:S,index:ae,toast:V,defaultRichColors:m,duration:(L=y==null?void 0:y.duration)!=null?L:v,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:x,closeButton:(Q=y==null?void 0:y.closeButton)!=null?Q:c,interacting:D,position:U,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:se,toasts:$.filter(K=>K.position==V.position),heights:z.filter(K=>K.position==V.position),setHeights:j,expandByDefault:a,gap:C,expanded:P,swipeDirections:t.swipeDirections})})):null}))}),Zd=({closeButton:e=!0,...t})=>f.jsx(Kd,{className:"toaster group",closeButton:e,toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-[#2C2825] group-[.toaster]:border-white/20 group-[.toaster]:shadow-xl group-[.toaster]:backdrop-blur-md group-[.toaster]:rounded-2xl font-sans-body",description:"group-[.toast]:text-[#7A7570] font-sans-body",actionButton:"group-[.toast]:bg-[#FF6B4A] group-[.toast]:text-white group-[.toast]:rounded-xl font-medium",cancelButton:"group-[.toast]:bg-[#F4F4F1] group-[.toast]:text-[#7A7570] group-[.toast]:rounded-xl",closeButton:"group-[.toast]:text-[#7A7570] group-[.toast]:hover:text-[#2C2825] group-[.toast]:hover:bg-[#F4F4F1] group-[.toast]:rounded-lg"}},...t}),Vs=p.forwardRef(({className:e,...t},n)=>f.jsx("form",{ref:n,className:O("space-y-4",e),...t}));Vs.displayName="Form";const Hs=p.forwardRef(({className:e,error:t,children:n,...r},o)=>f.jsxs("div",{ref:o,className:O("space-y-2",e),...r,children:[n,t&&f.jsx("p",{className:"text-sm text-red-600",role:"alert",children:t})]}));Hs.displayName="FormField";const Us=p.forwardRef(({className:e,variant:t="default",size:n="md",...r},o)=>f.jsx("div",{className:O("inline-flex items-center rounded-full border font-medium text-center whitespace-nowrap",{"px-2 py-0.5 text-xs":n==="sm","px-2.5 py-0.5 text-sm":n==="md","px-3 py-1 text-sm":n==="lg","bg-blue-600 border-blue-600 text-white":t==="default","bg-gray-100 border-gray-300 text-gray-800":t==="secondary","bg-transparent border-gray-300 text-gray-700":t==="outline","bg-green-100 border-green-300 text-green-800":t==="success","bg-yellow-100 border-yellow-300 text-yellow-800":t==="warning","bg-red-100 border-red-300 text-red-800":t==="error"},e),ref:o,...r}));Us.displayName="Badge";const Gs=p.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>f.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":t,className:Nt("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Gs.displayName="Separator";function Qd(e,t){const n=p.createContext(t),r=s=>{const{children:i,...a}=s,c=p.useMemo(()=>a,Object.values(a));return f.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=p.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function pt(e,t=[]){let n=[];function r(s,i){const a=p.createContext(i),c=n.length;n=[...n,i];const l=d=>{var y;const{scope:h,children:m,...v}=d,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||a,x=p.useMemo(()=>v,Object.values(v));return f.jsx(g.Provider,{value:x,children:m})};l.displayName=s+"Provider";function u(d,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[c])||a,v=p.useContext(m);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(i=>p.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Jd(o,...t)]}function Jd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...a,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function qs(e){const t=e+"CollectionProvider",[n,r]=pt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:x,children:y}=g,b=w.useRef(null),C=w.useRef(new Map).current;return f.jsx(o,{scope:x,itemMap:C,collectionRef:b,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=Ft(a),l=w.forwardRef((g,x)=>{const{scope:y,children:b}=g,C=s(a,y),S=oe(x,C.collectionRef);return f.jsx(c,{ref:S,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=Ft(u),m=w.forwardRef((g,x)=>{const{scope:y,children:b,...C}=g,S=w.useRef(null),R=oe(x,S),M=s(u,y);return w.useEffect(()=>(M.itemMap.set(S,{ref:S,...C}),()=>void M.itemMap.delete(S))),f.jsx(h,{[d]:"",ref:R,children:b})});m.displayName=u;function v(g){const x=s(e+"CollectionConsumer",g);return w.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((M,A)=>C.indexOf(M.ref.current)-C.indexOf(A.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:m},v,r]}function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var be=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},eu=p[" useInsertionEffect ".trim().toString()]||be;function xt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=tu({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const u=p.useRef(e!==void 0);p.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const l=p.useCallback(u=>{var d;if(a){const h=nu(u)?u(e):u;h!==e&&((d=i.current)==null||d.call(i,h))}else s(u)},[a,e,s,i]);return[c,l]}function tu({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),s=p.useRef(t);return eu(()=>{s.current=t},[t]),p.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function nu(e){return typeof e=="function"}function ru(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Vt=e=>{const{present:t,children:n}=e,r=ou(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=oe(r.ref,su(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null};Vt.displayName="Presence";function ou(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),i=e?"mounted":"unmounted",[a,c]=ru(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=sn(r.current);s.current=a==="mounted"?l:"none"},[a]),be(()=>{const l=r.current,u=o.current;if(u!==e){const h=s.current,m=sn(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),be(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=m=>{const g=sn(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=m=>{m.target===t&&(s.current=sn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function sn(e){return(e==null?void 0:e.animationName)||"none"}function su(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iu=p[" useId ".trim().toString()]||(()=>{}),au=0;function ct(e){const[t,n]=p.useState(iu());return be(()=>{n(r=>r??String(au++))},[e]),e||(t?`radix-${t}`:"")}var An="Collapsible",[lu,Ys]=pt(An),[cu,mr]=lu(An),Xs=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[c,l]=xt({prop:r,defaultProp:o??!1,onChange:i,caller:An});return f.jsx(cu,{scope:n,disabled:s,contentId:ct(),open:c,onOpenToggle:p.useCallback(()=>l(u=>!u),[l]),children:f.jsx(J.div,{"data-state":vr(c),"data-disabled":s?"":void 0,...a,ref:t})})});Xs.displayName=An;var Ks="CollapsibleTrigger",Zs=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=mr(Ks,n);return f.jsx(J.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:te(e.onClick,o.onOpenToggle)})});Zs.displayName=Ks;var gr="CollapsibleContent",Qs=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=mr(gr,e.__scopeCollapsible);return f.jsx(Vt,{present:n||o.open,children:({present:s})=>f.jsx(du,{...r,ref:t,present:s})})});Qs.displayName=gr;var du=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=mr(gr,n),[a,c]=p.useState(r),l=p.useRef(null),u=oe(t,l),d=p.useRef(0),h=d.current,m=p.useRef(0),v=m.current,g=i.open||a,x=p.useRef(g),y=p.useRef(void 0);return p.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),be(()=>{const b=l.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();d.current=C.height,m.current=C.width,x.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),c(r)}},[i.open,r]),f.jsx(J.div,{"data-state":vr(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&o})});function vr(e){return e?"open":"closed"}var uu=Xs,fu=Zs,pu=Qs,hu=p.createContext(void 0);function Js(e){const t=p.useContext(hu);return e||t||"ltr"}var $e="Accordion",mu=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[yr,gu,vu]=qs($e),[Tn]=pt($e,[vu,Ys]),xr=Ys(),ei=w.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return f.jsx(yr.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(wu,{...s,ref:t}):f.jsx(bu,{...o,ref:t})})});ei.displayName=$e;var[ti,yu]=Tn($e),[ni,xu]=Tn($e,{collapsible:!1}),bu=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,c]=xt({prop:n,defaultProp:r??"",onChange:o,caller:$e});return f.jsx(ti,{scope:e.__scopeAccordion,value:w.useMemo(()=>a?[a]:[],[a]),onItemOpen:c,onItemClose:w.useCallback(()=>s&&c(""),[s,c]),children:f.jsx(ni,{scope:e.__scopeAccordion,collapsible:s,children:f.jsx(ri,{...i,ref:t})})})}),wu=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=xt({prop:n,defaultProp:r??[],onChange:o,caller:$e}),c=w.useCallback(u=>a((d=[])=>[...d,u]),[a]),l=w.useCallback(u=>a((d=[])=>d.filter(h=>h!==u)),[a]);return f.jsx(ti,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:l,children:f.jsx(ni,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(ri,{...s,ref:t})})})}),[Cu,Pn]=Tn($e),ri=w.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...i}=e,a=w.useRef(null),c=oe(a,t),l=gu(n),d=Js(o)==="ltr",h=te(e.onKeyDown,m=>{var $;if(!mu.includes(m.key))return;const v=m.target,g=l().filter(B=>{var z;return!((z=B.ref.current)!=null&&z.disabled)}),x=g.findIndex(B=>B.ref.current===v),y=g.length;if(x===-1)return;m.preventDefault();let b=x;const C=0,S=y-1,R=()=>{b=x+1,b>S&&(b=C)},M=()=>{b=x-1,b<C&&(b=S)};switch(m.key){case"Home":b=C;break;case"End":b=S;break;case"ArrowRight":s==="horizontal"&&(d?R():M());break;case"ArrowDown":s==="vertical"&&R();break;case"ArrowLeft":s==="horizontal"&&(d?M():R());break;case"ArrowUp":s==="vertical"&&M();break}const A=b%y;($=g[A].ref.current)==null||$.focus()});return f.jsx(Cu,{scope:n,disabled:r,direction:o,orientation:s,children:f.jsx(yr.Slot,{scope:n,children:f.jsx(J.div,{...i,"data-orientation":s,ref:c,onKeyDown:r?void 0:h})})})}),gn="AccordionItem",[Su,br]=Tn(gn),oi=w.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=Pn(gn,n),i=yu(gn,n),a=xr(n),c=ct(),l=r&&i.value.includes(r)||!1,u=s.disabled||e.disabled;return f.jsx(Su,{scope:n,open:l,disabled:u,triggerId:c,children:f.jsx(uu,{"data-orientation":s.orientation,"data-state":di(l),...a,...o,ref:t,disabled:u,open:l,onOpenChange:d=>{d?i.onItemOpen(r):i.onItemClose(r)}})})});oi.displayName=gn;var si="AccordionHeader",ii=w.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Pn($e,n),s=br(si,n);return f.jsx(J.h3,{"data-orientation":o.orientation,"data-state":di(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});ii.displayName=si;var er="AccordionTrigger",ai=w.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Pn($e,n),s=br(er,n),i=xu(er,n),a=xr(n);return f.jsx(yr.ItemSlot,{scope:n,children:f.jsx(fu,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...r,ref:t})})});ai.displayName=er;var li="AccordionContent",ci=w.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Pn($e,n),s=br(li,n),i=xr(n);return f.jsx(pu,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ci.displayName=li;function di(e){return e?"open":"closed"}var Eu=ei,Nu=oi,Ru=ii,ui=ai,fi=ci;const Au=Eu,pi=p.forwardRef(({className:e,...t},n)=>f.jsx(Nu,{ref:n,className:O("border rounded-lg",e),...t}));pi.displayName="AccordionItem";const hi=p.forwardRef(({className:e,children:t,...n},r)=>f.jsx(Ru,{className:"flex",children:f.jsxs(ui,{ref:r,className:O("flex flex-1 items-center justify-between py-4 px-4 text-left text-sm font-medium transition-all hover:underline",e),...n,children:[t,f.jsx("span",{className:"ml-2",children:"▾"})]})}));hi.displayName=ui.displayName;const mi=p.forwardRef(({className:e,children:t,...n},r)=>f.jsx(fi,{ref:r,className:O("px-4 pb-4 text-sm text-muted-foreground",e),...n,children:t}));mi.displayName=fi.displayName;function bt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Tu(e,t=globalThis==null?void 0:globalThis.document){const n=bt(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pu="DismissableLayer",tr="dismissableLayer.update",ku="dismissableLayer.pointerDownOutside",Du="dismissableLayer.focusOutside",$o,gi=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wr=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=p.useContext(gi),[u,d]=p.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),v=oe(t,A=>d(A)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),b=u?g.indexOf(u):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,R=_u(A=>{const $=A.target,B=[...l.branches].some(z=>z.contains($));!S||B||(o==null||o(A),i==null||i(A),A.defaultPrevented||a==null||a())},h),M=Iu(A=>{const $=A.target;[...l.branches].some(z=>z.contains($))||(s==null||s(A),i==null||i(A),A.defaultPrevented||a==null||a())},h);return Tu(A=>{b===l.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},h),p.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($o=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Fo(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=$o)}},[u,h,n,l]),p.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Fo())},[u,l]),p.useEffect(()=>{const A=()=>m({});return document.addEventListener(tr,A),()=>document.removeEventListener(tr,A)},[]),f.jsx(J.div,{...c,ref:v,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,M.onFocusCapture),onBlurCapture:te(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,R.onPointerDownCapture)})});wr.displayName=Pu;var Mu="DismissableLayerBranch",ju=p.forwardRef((e,t)=>{const n=p.useContext(gi),r=p.useRef(null),o=oe(t,r);return p.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(J.div,{...e,ref:o})});ju.displayName=Mu;function _u(e,t=globalThis==null?void 0:globalThis.document){const n=bt(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){vi(ku,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Iu(e,t=globalThis==null?void 0:globalThis.document){const n=bt(e),r=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!r.current&&vi(Du,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Fo(){const e=new CustomEvent(tr);document.dispatchEvent(e)}function vi(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yd(o,s):o.dispatchEvent(s)}var Vn="focusScope.autoFocusOnMount",Hn="focusScope.autoFocusOnUnmount",zo={bubbles:!1,cancelable:!0},Ou="FocusScope",Cr=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=p.useState(null),l=bt(o),u=bt(s),d=p.useRef(null),h=oe(t,g=>c(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(C){if(m.paused||!a)return;const S=C.target;a.contains(S)?d.current=S:lt(d.current,{select:!0})},x=function(C){if(m.paused||!a)return;const S=C.relatedTarget;S!==null&&(a.contains(S)||lt(d.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),b.disconnect()}}},[r,a,m.paused]),p.useEffect(()=>{if(a){Wo.add(m);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(Vn,zo);a.addEventListener(Vn,l),a.dispatchEvent(y),y.defaultPrevented||(Lu(Wu(yi(a)),{select:!0}),document.activeElement===g&&lt(a))}return()=>{a.removeEventListener(Vn,l),setTimeout(()=>{const y=new CustomEvent(Hn,zo);a.addEventListener(Hn,u),a.dispatchEvent(y),y.defaultPrevented||lt(g??document.body,{select:!0}),a.removeEventListener(Hn,u),Wo.remove(m)},0)}}},[a,l,u,m]);const v=p.useCallback(g=>{if(!n&&!r||m.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const b=g.currentTarget,[C,S]=$u(b);C&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&lt(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&&lt(S,{select:!0})):y===b&&g.preventDefault()}},[n,r,m.paused]);return f.jsx(J.div,{tabIndex:-1,...i,ref:h,onKeyDown:v})});Cr.displayName=Ou;function Lu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lt(r,{select:t}),document.activeElement!==n)return}function $u(e){const t=yi(e),n=Bo(t,e),r=Bo(t.reverse(),e);return[n,r]}function yi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Bo(e,t){for(const n of e)if(!Fu(n,{upTo:t}))return n}function Fu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zu(e){return e instanceof HTMLInputElement&&"select"in e}function lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zu(e)&&t&&e.select()}}var Wo=Bu();function Bu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Vo(e,t),e.unshift(t)},remove(t){var n;e=Vo(e,t),(n=e[0])==null||n.resume()}}}function Vo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Wu(e){return e.filter(t=>t.tagName!=="A")}var Vu="Portal",Sr=p.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=p.useState(!1);be(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Sn.createPortal(f.jsx(J.div,{...r,ref:t}),i):null});Sr.displayName=Vu;var Un=0;function xi(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ho()),document.body.insertAdjacentElement("beforeend",e[1]??Ho()),Un++,()=>{Un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Un--}},[])}function Ho(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var He=function(){return He=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},He.apply(this,arguments)};function bi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Hu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var fn="right-scroll-bar-position",pn="width-before-scroll-bar",Uu="with-scroll-bars-hidden",Gu="--removed-body-scroll-bar-size";function Gn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qu(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Yu=typeof window<"u"?p.useLayoutEffect:p.useEffect,Uo=new WeakMap;function Xu(e,t){var n=qu(null,function(r){return e.forEach(function(o){return Gn(o,r)})});return Yu(function(){var r=Uo.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Gn(a,null)}),s.forEach(function(a){o.has(a)||Gn(a,i)})}Uo.set(n,e)},[e]),n}function Ku(e){return e}function Zu(e,t){t===void 0&&(t=Ku);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function Qu(e){e===void 0&&(e={});var t=Zu(null);return t.options=He({async:!0,ssr:!1},e),t}var wi=function(e){var t=e.sideCar,n=bi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,He({},n))};wi.isSideCarExport=!0;function Ju(e,t){return e.useMedium(t),wi}var Ci=Qu(),qn=function(){},kn=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:qn,onWheelCapture:qn,onTouchMoveCapture:qn}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,m=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,C=e.gapMode,S=bi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=h,M=Xu([n,t]),A=He(He({},S),o);return p.createElement(p.Fragment,null,u&&p.createElement(R,{sideCar:Ci,removeScrollBar:l,shards:d,noRelative:m,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:C}),i?p.cloneElement(p.Children.only(a),He(He({},A),{ref:M})):p.createElement(b,He({},A,{className:c,ref:M}),a))});kn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kn.classNames={fullWidth:pn,zeroRight:fn};var ef=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ef();return t&&e.setAttribute("nonce",t),e}function nf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var of=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tf())&&(nf(t,n),rf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sf=function(){var e=of();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Si=function(){var e=sf(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},af={left:0,top:0,right:0,gap:0},Yn=function(e){return parseInt(e||"",10)||0},lf=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Yn(n),Yn(r),Yn(o)]},cf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return af;var t=lf(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},df=Si(),Ot="data-scroll-locked",uf=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
20
- .`.concat(Uu,` {
19
+ `;const u=document.createElement("canvas");u.width=s,u.height=i,u.style.cssText="border-radius: 8px;",l.appendChild(u);let d=null,h=[],m=null,v=!1;const g=()=>{if(v)return;d=new Zo.Illustration({element:u,zoom:1,rotate:{y:0}});const x=(j,P,O)=>{const D=new Zo.Ellipse({addTo:d,diameter:a,stroke:!1,fill:!0,color:"#5e0f1a"});h.push({shape:D,id:O,group:j,offset:P})};let b=0;for(let j=0;j<6;j++)x("left",j/6,b++);for(let j=0;j<6;j++)x("right",j/6,b++);const S=j=>1-Math.pow(1-j,2),C=(j,P,O)=>j+(P-j)*O,E=j=>({r:parseInt(j.slice(1,3),16),g:parseInt(j.slice(3,5),16),b:parseInt(j.slice(5,7),16)}),T=["#5e0f1a","#c22a2f","#e0392b","#f05a24","#f39c12","#fde68a"].map(E),R=[...T].reverse(),$=(j,P)=>{if(P<=0)return j[0];if(P>=1)return j[j.length-1];const O=P*(j.length-1),D=Math.floor(O),M=O-D,A=j[D],k=j[D+1];return{r:Math.round(C(A.r,k.r,M)),g:Math.round(C(A.g,k.g,M)),b:Math.round(C(A.b,k.b,M))}};h.forEach(({shape:j,group:P,offset:O,id:D})=>{let M,A,k;if(P==="left"){const N=O,I=S(N);M=-c+c*I,A=Math.PI/2*I,k=300+(100-Math.abs(M))-D*.01;const{r:W,g:H,b:ae}=$(T,N);j.color=`rgba(${W}, ${H}, ${ae}, 1)`}else{const N=O,I=S(N);M=0+c*I,A=Math.PI/2+Math.PI/2*I,k=300+(100-Math.abs(M))-D*.01;const{r:W,g:H,b:ae}=$(R,N);j.color=`rgba(${W}, ${H}, ${ae}, 1)`}j.translate.x=M,j.translate.z=k,j.rotate.y=A}),d.updateRenderGraph();const V=(j,P,O,D)=>{let M,A,k,N;const I=Math.min(O,1),W=H=>H<.5?2*H*H:1-Math.pow(-2*H+2,2)/2;if(P==="left"){const H=W(I);M=-c+c*H,A=Math.PI/2*H,k=1,N=300+(100-Math.abs(M))-D*.01;const{r:ae,g:U,b:X}=$(T,I);j.color=`rgba(${ae}, ${U}, ${X}, ${k})`}else{const H=W(I);M=0+c*H,A=Math.PI/2+Math.PI/2*H,k=1,N=300+(100-Math.abs(M))-D*.01;const{r:ae,g:U,b:X}=$(R,I);j.color=`rgba(${ae}, ${U}, ${X}, ${k})`}j.translate.x=M,j.translate.z=N,j.rotate.y=A},z=j=>{if(v||!d||!h.length)return;const P=j%n/n;for(let O=0;O<h.length;O++){const D=h[O],M=(P+D.offset)%1;if(M<.02){const A=M/.02;V(D.shape,D.group,0,D.id);const k=D.shape.color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([^)]+)\)/);if(k){const N=parseFloat(k[4]);D.shape.color=`rgba(${k[1]}, ${k[2]}, ${k[3]}, ${N*A})`}D.shape.translate.z=100-D.id*.01}else if(M>.98){const A=(1-M)/.02,k=(.98-.02)/.96;V(D.shape,D.group,k,D.id);const N=D.shape.color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([^)]+)\)/);if(N){const I=parseFloat(N[4]);D.shape.color=`rgba(${N[1]}, ${N[2]}, ${N[3]}, ${I*A})`}}else{const A=(M-.02)/.96;V(D.shape,D.group,A,D.id)}}d.updateRenderGraph(),v||(m=requestAnimationFrame(z))};m=requestAnimationFrame(z)},y=()=>{v=!0,m&&(cancelAnimationFrame(m),m=null),h=[],d=null};return g(),{element:l,destroy:y}}const Er=Jt("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-[#EDEBEB]",secondary:"bg-secondary text-secondary-foreground hover:bg-[#EDEBEB]",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),vt=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?jc:"button";return p.jsx(i,{className:Et(Er({variant:t,size:n,className:e})),ref:s,...o})});vt.displayName="Button";const zs=f.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Et("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));zs.displayName="Card";const Bs=f.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Et("flex flex-col space-y-1.5 p-6",e),...t}));Bs.displayName="CardHeader";const Vs=f.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:Et("text-2xl font-semibold leading-none tracking-tight",e),...t}));Vs.displayName="CardTitle";const Hs=f.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:Et("text-sm text-muted-foreground",e),...t}));Hs.displayName="CardDescription";const Ws=f.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Et("p-6 pt-0",e),...t}));Ws.displayName="CardContent";function F(...e){return Ds(Sr(e))}const Us=f.forwardRef(({className:e,type:t,error:n,...r},o)=>p.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n&&"border-red-500 focus-visible:ring-red-500",e),ref:o,...r}));Us.displayName="Input";var Ad=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=Ad.reduce((e,t)=>{const n=_t(`Primitive.${t}`),r=f.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Td(e,t){e&&Tn.flushSync(()=>e.dispatchEvent(t))}var Pd="Label",Gs=f.forwardRef((e,t)=>p.jsx(oe.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Gs.displayName=Pd;var Zs=Gs;const kd=Jt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),qs=f.forwardRef(({className:e,...t},n)=>p.jsx(Zs,{ref:n,className:F(kd(),e),...t}));qs.displayName=Zs.displayName;const Md=Jt("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-white text-gray-900 border-gray-200",destructive:"border-red-500/50 text-red-900 dark:border-red-500 [&>svg]:text-red-500 bg-red-50",success:"border-green-500/50 text-green-900 dark:border-green-500 [&>svg]:text-green-500 bg-green-50",warning:"border-yellow-500/50 text-yellow-900 dark:border-yellow-500 [&>svg]:text-yellow-500 bg-yellow-50"}},defaultVariants:{variant:"default"}}),Ys=f.forwardRef(({className:e,variant:t,...n},r)=>p.jsx("div",{ref:r,role:"alert",className:F(Md({variant:t}),e),...n}));Ys.displayName="Alert";const Ks=f.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:F("text-sm [&_p]:leading-relaxed",e),...t}));Ks.displayName="AlertDescription";const Xs=f.forwardRef(({className:e,...t},n)=>p.jsx("h5",{ref:n,className:F("mb-1 font-medium leading-none tracking-tight",e),...t}));Xs.displayName="AlertTitle";const Qs=f.forwardRef(({className:e,error:t,...n},r)=>p.jsx("textarea",{className:F("flex min-h-[80px] w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t&&"border-red-500 focus-visible:ring-red-500",e),ref:r,...n}));Qs.displayName="Textarea";const Dd=Jt("animate-spin rounded-full border-2 border-current border-t-transparent",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-12 w-12"}},defaultVariants:{size:"md"}}),Js=f.forwardRef(({className:e,size:t,...n},r)=>p.jsx("div",{ref:r,className:F(Dd({size:t}),e),...n}));Js.displayName="Spinner";const jd=Jt("relative",{variants:{size:{sm:"w-[140px] h-[105px]",md:"w-[300px] h-[200px]",lg:"w-[400px] h-[250px]",xl:"w-[500px] h-[300px]"}},defaultVariants:{size:"md"}}),ei=w.forwardRef(({className:e,size:t,cycleDuration:n=3e3,...r},o)=>{const s=w.useRef(null),i=w.useRef(null);return w.useEffect(()=>{if(s.current)return i.current&&i.current.destroy(),i.current=Nd({size:t||"md",cycleDuration:n,className:""}),s.current.innerHTML="",s.current.appendChild(i.current.element),()=>{i.current&&(i.current.destroy(),i.current=null)}},[t,n]),p.jsx("div",{ref:a=>{s.current=a,typeof o=="function"?o(a):o&&(o.current=a)},className:F(jd({size:t}),e),...r})});ei.displayName="DiscLoader";function Id(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const _d=e=>{switch(e){case"success":return $d;case"info":return zd;case"warning":return Fd;case"error":return Bd;default:return null}},Od=Array(12).fill(0),Ld=({visible:e,className:t})=>w.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},w.createElement("div",{className:"sonner-spinner"},Od.map((n,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),$d=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Fd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),zd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Bd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Vd=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Hd=()=>{const[e,t]=w.useState(document.hidden);return w.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let cr=1;class Wd{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:cr++,i=this.toasts.find(c=>c.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:a,title:r}):c):this.addToast({title:r,...o,dismissible:a,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const a=o.then(async l=>{if(i=["resolve",l],w.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(Gd(l)&&!l.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,v=typeof d=="object"&&!w.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...v})}else if(l instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(l):n.error,h=typeof n.description=="function"?await n.description(l):n.description,v=typeof d=="object"&&!w.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...v})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(l):n.success,h=typeof n.description=="function"?await n.description(l):n.description,v=typeof d=="object"&&!w.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:h,...v})}}).catch(async l=>{if(i=["reject",l],n.error!==void 0){s=!1;const u=typeof n.error=="function"?await n.error(l):n.error,d=typeof n.description=="function"?await n.description(l):n.description,m=typeof u=="object"&&!w.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,u)=>a.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||cr++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Me=new Wd,Ud=(e,t)=>{const n=(t==null?void 0:t.id)||cr++;return Me.addToast({title:e,...t,id:n}),n},Gd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Zd=Ud,qd=()=>Me.toasts,Yd=()=>Me.getActiveToasts(),Kt=Object.assign(Zd,{success:Me.success,info:Me.info,warning:Me.warning,error:Me.error,custom:Me.custom,message:Me.message,promise:Me.promise,dismiss:Me.dismiss,loading:Me.loading},{getHistory:qd,getToasts:Yd});Id("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function an(e){return e.label!==void 0}const Kd=3,Xd="24px",Qd="16px",qo=4e3,Jd=356,eu=14,tu=45,nu=200;function We(...e){return e.filter(Boolean).join(" ")}function ru(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const ou=e=>{var t,n,r,o,s,i,a,c,l;const{invert:u,toast:d,unstyled:h,interacting:m,setHeights:v,visibleToasts:g,heights:y,index:x,toasts:b,expanded:S,removeToast:C,defaultRichColors:E,closeButton:T,style:R,cancelButtonStyle:$,actionButtonStyle:V,className:z="",descriptionClassName:j="",duration:P,position:O,gap:D,expandByDefault:M,classNames:A,icons:k,closeButtonAriaLabel:N="Close toast"}=e,[I,W]=w.useState(null),[H,ae]=w.useState(null),[U,X]=w.useState(!1),[se,pe]=w.useState(!1),[_,B]=w.useState(!1),[ee,Y]=w.useState(!1),[K,q]=w.useState(!1),[de,ye]=w.useState(0),[De,Oe]=w.useState(0),je=w.useRef(d.duration||P||qo),ke=w.useRef(null),Re=w.useRef(null),Un=x===0,Gn=x+1<=g,Te=d.type,ot=d.dismissible!==!1,Zn=d.className||"",qn=d.descriptionClassName||"",te=w.useMemo(()=>y.findIndex(G=>G.toastId===d.id)||0,[y,d.id]),Yn=w.useMemo(()=>{var G;return(G=d.closeButton)!=null?G:T},[d.closeButton,T]),nn=w.useMemo(()=>d.duration||P||qo,[d.duration,P]),Ht=w.useRef(0),Xe=w.useRef(0),rn=w.useRef(0),Le=w.useRef(null),[Wt,Kn]=O.split("-"),on=w.useMemo(()=>y.reduce((G,me,we)=>we>=te?G:G+me.height,0),[y,te]),L=Hd(),Z=d.invert||u,le=Te==="loading";Xe.current=w.useMemo(()=>te*D+on,[te,on]),w.useEffect(()=>{je.current=nn},[nn]),w.useEffect(()=>{X(!0)},[]),w.useEffect(()=>{const G=Re.current;if(G){const me=G.getBoundingClientRect().height;return Oe(me),v(we=>[{toastId:d.id,height:me,position:d.position},...we]),()=>v(we=>we.filter(Ae=>Ae.toastId!==d.id))}},[v,d.id]),w.useLayoutEffect(()=>{if(!U)return;const G=Re.current,me=G.style.height;G.style.height="auto";const we=G.getBoundingClientRect().height;G.style.height=me,Oe(we),v(Ae=>Ae.find(re=>re.toastId===d.id)?Ae.map(re=>re.toastId===d.id?{...re,height:we}:re):[{toastId:d.id,height:we,position:d.position},...Ae])},[U,d.title,d.description,v,d.id,d.jsx,d.action,d.cancel]);const ie=w.useCallback(()=>{pe(!0),ye(Xe.current),v(G=>G.filter(me=>me.toastId!==d.id)),setTimeout(()=>{C(d)},nu)},[d,C,v,Xe]);w.useEffect(()=>{if(d.promise&&Te==="loading"||d.duration===1/0||d.type==="loading")return;let G;return S||m||L?(()=>{if(rn.current<Ht.current){const Ae=new Date().getTime()-Ht.current;je.current=je.current-Ae}rn.current=new Date().getTime()})():(()=>{je.current!==1/0&&(Ht.current=new Date().getTime(),G=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),ie()},je.current))})(),()=>clearTimeout(G)},[S,m,d,Te,L,ie]),w.useEffect(()=>{d.delete&&(ie(),d.onDismiss==null||d.onDismiss.call(d,d))},[ie,d.delete]);function be(){var G;if(k!=null&&k.loading){var me;return w.createElement("div",{className:We(A==null?void 0:A.loader,d==null||(me=d.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":Te==="loading"},k.loading)}return w.createElement(Ld,{className:We(A==null?void 0:A.loader,d==null||(G=d.classNames)==null?void 0:G.loader),visible:Te==="loading"})}const xe=d.icon||(k==null?void 0:k[Te])||_d(Te);var Ne,Pe;return w.createElement("li",{tabIndex:0,ref:Re,className:We(z,Zn,A==null?void 0:A.toast,d==null||(t=d.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[Te],d==null||(n=d.classNames)==null?void 0:n[Te]),"data-sonner-toast":"","data-rich-colors":(Ne=d.richColors)!=null?Ne:E,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":U,"data-promise":!!d.promise,"data-swiped":K,"data-removed":se,"data-visible":Gn,"data-y-position":Wt,"data-x-position":Kn,"data-index":x,"data-front":Un,"data-swiping":_,"data-dismissible":ot,"data-type":Te,"data-invert":Z,"data-swipe-out":ee,"data-swipe-direction":H,"data-expanded":!!(S||M&&U),"data-testid":d.testId,style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${se?de:Xe.current}px`,"--initial-height":M?"auto":`${De}px`,...R,...d.style},onDragEnd:()=>{B(!1),W(null),Le.current=null},onPointerDown:G=>{G.button!==2&&(le||!ot||(ke.current=new Date,ye(Xe.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(B(!0),Le.current={x:G.clientX,y:G.clientY})))},onPointerUp:()=>{var G,me,we;if(ee||!ot)return;Le.current=null;const Ae=Number(((G=Re.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Q=Number(((me=Re.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),re=new Date().getTime()-((we=ke.current)==null?void 0:we.getTime()),ne=I==="x"?Ae:Q,ve=Math.abs(ne)/re;if(Math.abs(ne)>=tu||ve>.11){ye(Xe.current),d.onDismiss==null||d.onDismiss.call(d,d),ae(I==="x"?Ae>0?"right":"left":Q>0?"down":"up"),ie(),Y(!0);return}else{var ue,ge;(ue=Re.current)==null||ue.style.setProperty("--swipe-amount-x","0px"),(ge=Re.current)==null||ge.style.setProperty("--swipe-amount-y","0px")}q(!1),B(!1),W(null)},onPointerMove:G=>{var me,we,Ae;if(!Le.current||!ot||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;const re=G.clientY-Le.current.y,ne=G.clientX-Le.current.x;var ve;const ue=(ve=e.swipeDirections)!=null?ve:ru(O);!I&&(Math.abs(ne)>1||Math.abs(re)>1)&&W(Math.abs(ne)>Math.abs(re)?"x":"y");let ge={x:0,y:0};const Qe=Ce=>1/(1.5+Math.abs(Ce)/20);if(I==="y"){if(ue.includes("top")||ue.includes("bottom"))if(ue.includes("top")&&re<0||ue.includes("bottom")&&re>0)ge.y=re;else{const Ce=re*Qe(re);ge.y=Math.abs(Ce)<Math.abs(re)?Ce:re}}else if(I==="x"&&(ue.includes("left")||ue.includes("right")))if(ue.includes("left")&&ne<0||ue.includes("right")&&ne>0)ge.x=ne;else{const Ce=ne*Qe(ne);ge.x=Math.abs(Ce)<Math.abs(ne)?Ce:ne}(Math.abs(ge.x)>0||Math.abs(ge.y)>0)&&q(!0),(we=Re.current)==null||we.style.setProperty("--swipe-amount-x",`${ge.x}px`),(Ae=Re.current)==null||Ae.style.setProperty("--swipe-amount-y",`${ge.y}px`)}},Yn&&!d.jsx&&Te!=="loading"?w.createElement("button",{"aria-label":N,"data-disabled":le,"data-close-button":!0,onClick:le||!ot?()=>{}:()=>{ie(),d.onDismiss==null||d.onDismiss.call(d,d)},className:We(A==null?void 0:A.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(Pe=k==null?void 0:k.close)!=null?Pe:Vd):null,(Te||d.icon||d.promise)&&d.icon!==null&&((k==null?void 0:k[Te])!==null||d.icon)?w.createElement("div",{"data-icon":"",className:We(A==null?void 0:A.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||be():null,d.type!=="loading"?xe:null):null,w.createElement("div",{"data-content":"",className:We(A==null?void 0:A.content,d==null||(s=d.classNames)==null?void 0:s.content)},w.createElement("div",{"data-title":"",className:We(A==null?void 0:A.title,d==null||(i=d.classNames)==null?void 0:i.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?w.createElement("div",{"data-description":"",className:We(j,qn,A==null?void 0:A.description,d==null||(a=d.classNames)==null?void 0:a.description)},typeof d.description=="function"?d.description():d.description):null),w.isValidElement(d.cancel)?d.cancel:d.cancel&&an(d.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||$,onClick:G=>{an(d.cancel)&&ot&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,G),ie())},className:We(A==null?void 0:A.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,w.isValidElement(d.action)?d.action:d.action&&an(d.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||V,onClick:G=>{an(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,G),!G.defaultPrevented&&ie())},className:We(A==null?void 0:A.actionButton,d==null||(l=d.classNames)==null?void 0:l.actionButton)},d.action.label):null)};function Yo(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function su(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?Qd:Xd;function c(l){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${i}-${l}`]=a:n[`${i}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):c(a)}),n}const iu=w.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:l,offset:u,mobileOffset:d,theme:h="light",richColors:m,duration:v,style:g,visibleToasts:y=Kd,toastOptions:x,dir:b=Yo(),gap:S=eu,icons:C,containerAriaLabel:E="Notifications"}=t,[T,R]=w.useState([]),$=w.useMemo(()=>r?T.filter(U=>U.toasterId===r):T.filter(U=>!U.toasterId),[T,r]),V=w.useMemo(()=>Array.from(new Set([s].concat($.filter(U=>U.position).map(U=>U.position)))),[$,s]),[z,j]=w.useState([]),[P,O]=w.useState(!1),[D,M]=w.useState(!1),[A,k]=w.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=w.useRef(null),I=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=w.useRef(null),H=w.useRef(!1),ae=w.useCallback(U=>{R(X=>{var se;return(se=X.find(pe=>pe.id===U.id))!=null&&se.delete||Me.dismiss(U.id),X.filter(({id:pe})=>pe!==U.id)})},[]);return w.useEffect(()=>Me.subscribe(U=>{if(U.dismiss){requestAnimationFrame(()=>{R(X=>X.map(se=>se.id===U.id?{...se,delete:!0}:se))});return}setTimeout(()=>{An.flushSync(()=>{R(X=>{const se=X.findIndex(pe=>pe.id===U.id);return se!==-1?[...X.slice(0,se),{...X[se],...U},...X.slice(se+1)]:[U,...X]})})})}),[T]),w.useEffect(()=>{if(h!=="system"){k(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;const U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:X})=>{k(X?"dark":"light")})}catch{U.addListener(({matches:se})=>{try{k(se?"dark":"light")}catch(pe){console.error(pe)}})}},[h]),w.useEffect(()=>{T.length<=1&&O(!1)},[T]),w.useEffect(()=>{const U=X=>{var se;if(i.every(B=>X[B]||X.code===B)){var _;O(!0),(_=N.current)==null||_.focus()}X.code==="Escape"&&(document.activeElement===N.current||(se=N.current)!=null&&se.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),w.useEffect(()=>{if(N.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,H.current=!1)}},[N.current]),w.createElement("section",{ref:n,"aria-label":`${E} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((U,X)=>{var se;const[pe,_]=U.split("-");return $.length?w.createElement("ol",{key:U,dir:b==="auto"?Yo():b,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":pe,"data-x-position":_,style:{"--front-toast-height":`${((se=z[0])==null?void 0:se.height)||0}px`,"--width":`${Jd}px`,"--gap":`${S}px`,...g,...su(u,d)},onBlur:B=>{H.current&&!B.currentTarget.contains(B.relatedTarget)&&(H.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||H.current||(H.current=!0,W.current=B.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{D||O(!1)},onDragEnd:()=>O(!1),onPointerDown:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},$.filter(B=>!B.position&&X===0||B.position===U).map((B,ee)=>{var Y,K;return w.createElement(ou,{key:B.id,icons:C,index:ee,toast:B,defaultRichColors:m,duration:(Y=x==null?void 0:x.duration)!=null?Y:v,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:o,visibleToasts:y,closeButton:(K=x==null?void 0:x.closeButton)!=null?K:c,interacting:D,position:U,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:ae,toasts:$.filter(q=>q.position==B.position),heights:z.filter(q=>q.position==B.position),setHeights:j,expandByDefault:a,gap:S,expanded:P,swipeDirections:t.swipeDirections})})):null}))}),au=({closeButton:e=!0,...t})=>p.jsx(iu,{className:"toaster group",closeButton:e,toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-[#2C2825] group-[.toaster]:border-white/20 group-[.toaster]:shadow-xl group-[.toaster]:backdrop-blur-md group-[.toaster]:rounded-2xl font-sans-body",description:"group-[.toast]:text-[#7A7570] font-sans-body",actionButton:"group-[.toast]:bg-[#FF6B4A] group-[.toast]:text-white group-[.toast]:rounded-xl font-medium",cancelButton:"group-[.toast]:bg-[#F4F4F1] group-[.toast]:text-[#7A7570] group-[.toast]:rounded-xl",closeButton:"group-[.toast]:text-[#7A7570] group-[.toast]:hover:text-[#2C2825] group-[.toast]:hover:bg-[#F4F4F1] group-[.toast]:rounded-lg"}},...t}),ti=f.forwardRef(({className:e,...t},n)=>p.jsx("form",{ref:n,className:F("space-y-4",e),...t}));ti.displayName="Form";const ni=f.forwardRef(({className:e,error:t,children:n,...r},o)=>p.jsxs("div",{ref:o,className:F("space-y-2",e),...r,children:[n,t&&p.jsx("p",{className:"text-sm text-red-600",role:"alert",children:t})]}));ni.displayName="FormField";const ri=f.forwardRef(({className:e,variant:t="default",size:n="md",...r},o)=>p.jsx("div",{className:F("inline-flex items-center rounded-full border font-medium text-center whitespace-nowrap",{"px-2 py-0.5 text-xs":n==="sm","px-2.5 py-0.5 text-sm":n==="md","px-3 py-1 text-sm":n==="lg","bg-blue-600 border-blue-600 text-white":t==="default","bg-gray-100 border-gray-300 text-gray-800":t==="secondary","bg-transparent border-gray-300 text-gray-700":t==="outline","bg-green-100 border-green-300 text-green-800":t==="success","bg-yellow-100 border-yellow-300 text-yellow-800":t==="warning","bg-red-100 border-red-300 text-red-800":t==="error"},e),ref:o,...r}));ri.displayName="Badge";const oi=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>p.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":t,className:Et("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));oi.displayName="Separator";function lu(e,t){const n=f.createContext(t),r=s=>{const{children:i,...a}=s,c=f.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=f.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ft(e,t=[]){let n=[];function r(s,i){const a=f.createContext(i),c=n.length;n=[...n,i];const l=d=>{var x;const{scope:h,children:m,...v}=d,g=((x=h==null?void 0:h[e])==null?void 0:x[c])||a,y=f.useMemo(()=>v,Object.values(v));return p.jsx(g.Provider,{value:y,children:m})};l.displayName=s+"Provider";function u(d,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[c])||a,v=f.useContext(m);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(i=>f.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,cu(o,...t)]}function cu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function si(e){const t=e+"CollectionProvider",[n,r]=ft(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:y,children:x}=g,b=w.useRef(null),S=w.useRef(new Map).current;return p.jsx(o,{scope:y,itemMap:S,collectionRef:b,children:x})};i.displayName=t;const a=e+"CollectionSlot",c=_t(a),l=w.forwardRef((g,y)=>{const{scope:x,children:b}=g,S=s(a,x),C=fe(y,S.collectionRef);return p.jsx(c,{ref:C,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=_t(u),m=w.forwardRef((g,y)=>{const{scope:x,children:b,...S}=g,C=w.useRef(null),E=fe(y,C),T=s(u,x);return w.useEffect(()=>(T.itemMap.set(C,{ref:C,...S}),()=>void T.itemMap.delete(C))),p.jsx(h,{[d]:"",ref:E,children:b})});m.displayName=u;function v(g){const y=s(e+"CollectionConsumer",g);return w.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((T,R)=>S.indexOf(T.ref.current)-S.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:l,ItemSlot:m},v,r]}function ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Ee=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},du=f[" useInsertionEffect ".trim().toString()]||Ee;function yt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=uu({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const u=f.useRef(e!==void 0);f.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const l=f.useCallback(u=>{var d;if(a){const h=fu(u)?u(e):u;h!==e&&((d=i.current)==null||d.call(i,h))}else s(u)},[a,e,s,i]);return[c,l]}function uu({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),s=f.useRef(t);return du(()=>{s.current=t},[t]),f.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function fu(e){return typeof e=="function"}function pu(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Ft=e=>{const{present:t,children:n}=e,r=hu(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),s=fe(r.ref,mu(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:s}):null};Ft.displayName="Presence";function hu(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,c]=pu(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=ln(r.current);s.current=a==="mounted"?l:"none"},[a]),Ee(()=>{const l=r.current,u=o.current;if(u!==e){const h=s.current,m=ln(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ee(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=m=>{const g=ln(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=m=>{m.target===t&&(s.current=ln(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function ln(e){return(e==null?void 0:e.animationName)||"none"}function mu(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gu=f[" useId ".trim().toString()]||(()=>{}),vu=0;function lt(e){const[t,n]=f.useState(gu());return Ee(()=>{n(r=>r??String(vu++))},[e]),e||(t?`radix-${t}`:"")}var Mn="Collapsible",[yu,ii]=ft(Mn),[xu,Rr]=yu(Mn),ai=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[c,l]=yt({prop:r,defaultProp:o??!1,onChange:i,caller:Mn});return p.jsx(xu,{scope:n,disabled:s,contentId:lt(),open:c,onOpenToggle:f.useCallback(()=>l(u=>!u),[l]),children:p.jsx(oe.div,{"data-state":Ar(c),"data-disabled":s?"":void 0,...a,ref:t})})});ai.displayName=Mn;var li="CollapsibleTrigger",ci=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Rr(li,n);return p.jsx(oe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ar(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:ce(e.onClick,o.onOpenToggle)})});ci.displayName=li;var Nr="CollapsibleContent",di=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Rr(Nr,e.__scopeCollapsible);return p.jsx(Ft,{present:n||o.open,children:({present:s})=>p.jsx(bu,{...r,ref:t,present:s})})});di.displayName=Nr;var bu=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Rr(Nr,n),[a,c]=f.useState(r),l=f.useRef(null),u=fe(t,l),d=f.useRef(0),h=d.current,m=f.useRef(0),v=m.current,g=i.open||a,y=f.useRef(g),x=f.useRef(void 0);return f.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),Ee(()=>{const b=l.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const S=b.getBoundingClientRect();d.current=S.height,m.current=S.width,y.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),c(r)}},[i.open,r]),p.jsx(oe.div,{"data-state":Ar(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&o})});function Ar(e){return e?"open":"closed"}var wu=ai,Su=ci,Cu=di,Eu=f.createContext(void 0);function ui(e){const t=f.useContext(Eu);return e||t||"ltr"}var Be="Accordion",Ru=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Tr,Nu,Au]=si(Be),[Dn]=ft(Be,[Au,ii]),Pr=ii(),fi=w.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return p.jsx(Tr.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?p.jsx(Mu,{...s,ref:t}):p.jsx(ku,{...o,ref:t})})});fi.displayName=Be;var[pi,Tu]=Dn(Be),[hi,Pu]=Dn(Be,{collapsible:!1}),ku=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,c]=yt({prop:n,defaultProp:r??"",onChange:o,caller:Be});return p.jsx(pi,{scope:e.__scopeAccordion,value:w.useMemo(()=>a?[a]:[],[a]),onItemOpen:c,onItemClose:w.useCallback(()=>s&&c(""),[s,c]),children:p.jsx(hi,{scope:e.__scopeAccordion,collapsible:s,children:p.jsx(mi,{...i,ref:t})})})}),Mu=w.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=yt({prop:n,defaultProp:r??[],onChange:o,caller:Be}),c=w.useCallback(u=>a((d=[])=>[...d,u]),[a]),l=w.useCallback(u=>a((d=[])=>d.filter(h=>h!==u)),[a]);return p.jsx(pi,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:l,children:p.jsx(hi,{scope:e.__scopeAccordion,collapsible:!0,children:p.jsx(mi,{...s,ref:t})})})}),[Du,jn]=Dn(Be),mi=w.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...i}=e,a=w.useRef(null),c=fe(a,t),l=Nu(n),d=ui(o)==="ltr",h=ce(e.onKeyDown,m=>{var $;if(!Ru.includes(m.key))return;const v=m.target,g=l().filter(V=>{var z;return!((z=V.ref.current)!=null&&z.disabled)}),y=g.findIndex(V=>V.ref.current===v),x=g.length;if(y===-1)return;m.preventDefault();let b=y;const S=0,C=x-1,E=()=>{b=y+1,b>C&&(b=S)},T=()=>{b=y-1,b<S&&(b=C)};switch(m.key){case"Home":b=S;break;case"End":b=C;break;case"ArrowRight":s==="horizontal"&&(d?E():T());break;case"ArrowDown":s==="vertical"&&E();break;case"ArrowLeft":s==="horizontal"&&(d?T():E());break;case"ArrowUp":s==="vertical"&&T();break}const R=b%x;($=g[R].ref.current)==null||$.focus()});return p.jsx(Du,{scope:n,disabled:r,direction:o,orientation:s,children:p.jsx(Tr.Slot,{scope:n,children:p.jsx(oe.div,{...i,"data-orientation":s,ref:c,onKeyDown:r?void 0:h})})})}),bn="AccordionItem",[ju,kr]=Dn(bn),gi=w.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=jn(bn,n),i=Tu(bn,n),a=Pr(n),c=lt(),l=r&&i.value.includes(r)||!1,u=s.disabled||e.disabled;return p.jsx(ju,{scope:n,open:l,disabled:u,triggerId:c,children:p.jsx(wu,{"data-orientation":s.orientation,"data-state":Si(l),...a,...o,ref:t,disabled:u,open:l,onOpenChange:d=>{d?i.onItemOpen(r):i.onItemClose(r)}})})});gi.displayName=bn;var vi="AccordionHeader",yi=w.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=jn(Be,n),s=kr(vi,n);return p.jsx(oe.h3,{"data-orientation":o.orientation,"data-state":Si(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});yi.displayName=vi;var dr="AccordionTrigger",xi=w.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=jn(Be,n),s=kr(dr,n),i=Pu(dr,n),a=Pr(n);return p.jsx(Tr.ItemSlot,{scope:n,children:p.jsx(Su,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...r,ref:t})})});xi.displayName=dr;var bi="AccordionContent",wi=w.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=jn(Be,n),s=kr(bi,n),i=Pr(n);return p.jsx(Cu,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});wi.displayName=bi;function Si(e){return e?"open":"closed"}var Iu=fi,_u=gi,Ou=yi,Ci=xi,Ei=wi;const Lu=Iu,Ri=f.forwardRef(({className:e,...t},n)=>p.jsx(_u,{ref:n,className:F("border rounded-lg",e),...t}));Ri.displayName="AccordionItem";const Ni=f.forwardRef(({className:e,children:t,...n},r)=>p.jsx(Ou,{className:"flex",children:p.jsxs(Ci,{ref:r,className:F("flex flex-1 items-center justify-between py-4 px-4 text-left text-sm font-medium transition-all hover:underline",e),...n,children:[t,p.jsx("span",{className:"ml-2",children:"▾"})]})}));Ni.displayName=Ci.displayName;const Ai=f.forwardRef(({className:e,children:t,...n},r)=>p.jsx(Ei,{ref:r,className:F("px-4 pb-4 text-sm text-muted-foreground",e),...n,children:t}));Ai.displayName=Ei.displayName;function xt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function $u(e,t=globalThis==null?void 0:globalThis.document){const n=xt(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Fu="DismissableLayer",ur="dismissableLayer.update",zu="dismissableLayer.pointerDownOutside",Bu="dismissableLayer.focusOutside",Ko,Ti=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=f.useContext(Ti),[u,d]=f.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),v=fe(t,R=>d(R)),g=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),b=u?g.indexOf(u):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=b>=x,E=Wu(R=>{const $=R.target,V=[...l.branches].some(z=>z.contains($));!C||V||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},h),T=Uu(R=>{const $=R.target;[...l.branches].some(z=>z.contains($))||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},h);return $u(R=>{b===l.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},h),f.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ko=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Xo(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ko)}},[u,h,n,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Xo())},[u,l]),f.useEffect(()=>{const R=()=>m({});return document.addEventListener(ur,R),()=>document.removeEventListener(ur,R)},[]),p.jsx(oe.div,{...c,ref:v,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,E.onPointerDownCapture)})});Mr.displayName=Fu;var Vu="DismissableLayerBranch",Hu=f.forwardRef((e,t)=>{const n=f.useContext(Ti),r=f.useRef(null),o=fe(t,r);return f.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(oe.div,{...e,ref:o})});Hu.displayName=Vu;function Wu(e,t=globalThis==null?void 0:globalThis.document){const n=xt(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Pi(zu,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Uu(e,t=globalThis==null?void 0:globalThis.document){const n=xt(e),r=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!r.current&&Pi(Bu,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xo(){const e=new CustomEvent(ur);document.dispatchEvent(e)}function Pi(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Td(o,s):o.dispatchEvent(s)}var Qn="focusScope.autoFocusOnMount",Jn="focusScope.autoFocusOnUnmount",Qo={bubbles:!1,cancelable:!0},Gu="FocusScope",Dr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=f.useState(null),l=xt(o),u=xt(s),d=f.useRef(null),h=fe(t,g=>c(g)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(S){if(m.paused||!a)return;const C=S.target;a.contains(C)?d.current=C:at(d.current,{select:!0})},y=function(S){if(m.paused||!a)return;const C=S.relatedTarget;C!==null&&(a.contains(C)||at(d.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&at(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const b=new MutationObserver(x);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),b.disconnect()}}},[r,a,m.paused]),f.useEffect(()=>{if(a){es.add(m);const g=document.activeElement;if(!a.contains(g)){const x=new CustomEvent(Qn,Qo);a.addEventListener(Qn,l),a.dispatchEvent(x),x.defaultPrevented||(Zu(Qu(ki(a)),{select:!0}),document.activeElement===g&&at(a))}return()=>{a.removeEventListener(Qn,l),setTimeout(()=>{const x=new CustomEvent(Jn,Qo);a.addEventListener(Jn,u),a.dispatchEvent(x),x.defaultPrevented||at(g??document.body,{select:!0}),a.removeEventListener(Jn,u),es.remove(m)},0)}}},[a,l,u,m]);const v=f.useCallback(g=>{if(!n&&!r||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(y&&x){const b=g.currentTarget,[S,C]=qu(b);S&&C?!g.shiftKey&&x===C?(g.preventDefault(),n&&at(S,{select:!0})):g.shiftKey&&x===S&&(g.preventDefault(),n&&at(C,{select:!0})):x===b&&g.preventDefault()}},[n,r,m.paused]);return p.jsx(oe.div,{tabIndex:-1,...i,ref:h,onKeyDown:v})});Dr.displayName=Gu;function Zu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(at(r,{select:t}),document.activeElement!==n)return}function qu(e){const t=ki(e),n=Jo(t,e),r=Jo(t.reverse(),e);return[n,r]}function ki(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Jo(e,t){for(const n of e)if(!Yu(n,{upTo:t}))return n}function Yu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ku(e){return e instanceof HTMLInputElement&&"select"in e}function at(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ku(e)&&t&&e.select()}}var es=Xu();function Xu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ts(e,t),e.unshift(t)},remove(t){var n;e=ts(e,t),(n=e[0])==null||n.resume()}}}function ts(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qu(e){return e.filter(t=>t.tagName!=="A")}var Ju="Portal",jr=f.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=f.useState(!1);Ee(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?An.createPortal(p.jsx(oe.div,{...r,ref:t}),i):null});jr.displayName=Ju;var er=0;function Mi(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ns()),document.body.insertAdjacentElement("beforeend",e[1]??ns()),er++,()=>{er===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),er--}},[])}function ns(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ue=function(){return Ue=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ue.apply(this,arguments)};function Di(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ef(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var mn="right-scroll-bar-position",gn="width-before-scroll-bar",tf="with-scroll-bars-hidden",nf="--removed-body-scroll-bar-size";function tr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rf(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var of=typeof window<"u"?f.useLayoutEffect:f.useEffect,rs=new WeakMap;function sf(e,t){var n=rf(null,function(r){return e.forEach(function(o){return tr(o,r)})});return of(function(){var r=rs.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||tr(a,null)}),s.forEach(function(a){o.has(a)||tr(a,i)})}rs.set(n,e)},[e]),n}function af(e){return e}function lf(e,t){t===void 0&&(t=af);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function cf(e){e===void 0&&(e={});var t=lf(null);return t.options=Ue({async:!0,ssr:!1},e),t}var ji=function(e){var t=e.sideCar,n=Di(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Ue({},n))};ji.isSideCarExport=!0;function df(e,t){return e.useMedium(t),ji}var Ii=cf(),nr=function(){},In=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:nr,onWheelCapture:nr,onTouchMoveCapture:nr}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,m=e.noRelative,v=e.noIsolation,g=e.inert,y=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,S=e.gapMode,C=Di(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=sf([n,t]),R=Ue(Ue({},C),o);return f.createElement(f.Fragment,null,u&&f.createElement(E,{sideCar:Ii,removeScrollBar:l,shards:d,noRelative:m,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:S}),i?f.cloneElement(f.Children.only(a),Ue(Ue({},R),{ref:T})):f.createElement(b,Ue({},R,{className:c,ref:T}),a))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:gn,zeroRight:mn};var uf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ff(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uf();return t&&e.setAttribute("nonce",t),e}function pf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mf=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ff())&&(pf(t,n),hf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gf=function(){var e=mf();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_i=function(){var e=gf(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},vf={left:0,top:0,right:0,gap:0},rr=function(e){return parseInt(e||"",10)||0},yf=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[rr(n),rr(r),rr(o)]},xf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vf;var t=yf(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},bf=_i(),Dt="data-scroll-locked",wf=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
20
+ .`.concat(tf,` {
21
21
  overflow: hidden `).concat(r,`;
22
22
  padding-right: `).concat(a,"px ").concat(r,`;
23
23
  }
24
- body[`).concat(Ot,`] {
24
+ body[`).concat(Dt,`] {
25
25
  overflow: hidden `).concat(r,`;
26
26
  overscroll-behavior: contain;
27
27
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -34,121 +34,116 @@
34
34
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
35
35
  }
36
36
 
37
- .`).concat(fn,` {
37
+ .`).concat(mn,` {
38
38
  right: `).concat(a,"px ").concat(r,`;
39
39
  }
40
40
 
41
- .`).concat(pn,` {
41
+ .`).concat(gn,` {
42
42
  margin-right: `).concat(a,"px ").concat(r,`;
43
43
  }
44
44
 
45
- .`).concat(fn," .").concat(fn,` {
45
+ .`).concat(mn," .").concat(mn,` {
46
46
  right: 0 `).concat(r,`;
47
47
  }
48
48
 
49
- .`).concat(pn," .").concat(pn,` {
49
+ .`).concat(gn," .").concat(gn,` {
50
50
  margin-right: 0 `).concat(r,`;
51
51
  }
52
52
 
53
- body[`).concat(Ot,`] {
54
- `).concat(Gu,": ").concat(a,`px;
53
+ body[`).concat(Dt,`] {
54
+ `).concat(nf,": ").concat(a,`px;
55
55
  }
56
- `)},Go=function(){var e=parseInt(document.body.getAttribute(Ot)||"0",10);return isFinite(e)?e:0},ff=function(){p.useEffect(function(){return document.body.setAttribute(Ot,(Go()+1).toString()),function(){var e=Go()-1;e<=0?document.body.removeAttribute(Ot):document.body.setAttribute(Ot,e.toString())}},[])},pf=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ff();var s=p.useMemo(function(){return cf(o)},[o]);return p.createElement(df,{styles:uf(s,!t,o,n?"":"!important")})},nr=!1;if(typeof window<"u")try{var an=Object.defineProperty({},"passive",{get:function(){return nr=!0,!0}});window.addEventListener("test",an,an),window.removeEventListener("test",an,an)}catch{nr=!1}var Mt=nr?{passive:!1}:!1,hf=function(e){return e.tagName==="TEXTAREA"},Ei=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hf(e)&&n[t]==="visible")},mf=function(e){return Ei(e,"overflowY")},gf=function(e){return Ei(e,"overflowX")},qo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ni(e,r);if(o){var s=Ri(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vf=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},yf=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ni=function(e,t){return e==="v"?mf(t):gf(t)},Ri=function(e,t){return e==="v"?vf(t):yf(t)},xf=function(e,t){return e==="h"&&t==="rtl"?-1:1},bf=function(e,t,n,r,o){var s=xf(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,d=0,h=0;do{if(!a)break;var m=Ri(e,a),v=m[0],g=m[1],x=m[2],y=g-x-s*v;(v||y)&&Ni(e,a)&&(d+=y,h+=v);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(l=!0),l},ln=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yo=function(e){return[e.deltaX,e.deltaY]},Xo=function(e){return e&&"current"in e?e.current:e},wf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cf=function(e){return`
56
+ `)},os=function(){var e=parseInt(document.body.getAttribute(Dt)||"0",10);return isFinite(e)?e:0},Sf=function(){f.useEffect(function(){return document.body.setAttribute(Dt,(os()+1).toString()),function(){var e=os()-1;e<=0?document.body.removeAttribute(Dt):document.body.setAttribute(Dt,e.toString())}},[])},Cf=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Sf();var s=f.useMemo(function(){return xf(o)},[o]);return f.createElement(bf,{styles:wf(s,!t,o,n?"":"!important")})},fr=!1;if(typeof window<"u")try{var cn=Object.defineProperty({},"passive",{get:function(){return fr=!0,!0}});window.addEventListener("test",cn,cn),window.removeEventListener("test",cn,cn)}catch{fr=!1}var Tt=fr?{passive:!1}:!1,Ef=function(e){return e.tagName==="TEXTAREA"},Oi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ef(e)&&n[t]==="visible")},Rf=function(e){return Oi(e,"overflowY")},Nf=function(e){return Oi(e,"overflowX")},ss=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Li(e,r);if(o){var s=$i(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Af=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tf=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Li=function(e,t){return e==="v"?Rf(t):Nf(t)},$i=function(e,t){return e==="v"?Af(t):Tf(t)},Pf=function(e,t){return e==="h"&&t==="rtl"?-1:1},kf=function(e,t,n,r,o){var s=Pf(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,d=0,h=0;do{if(!a)break;var m=$i(e,a),v=m[0],g=m[1],y=m[2],x=g-y-s*v;(v||x)&&Li(e,a)&&(d+=x,h+=v);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(l=!0),l},dn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},is=function(e){return[e.deltaX,e.deltaY]},as=function(e){return e&&"current"in e?e.current:e},Mf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Df=function(e){return`
57
57
  .block-interactivity-`.concat(e,` {pointer-events: none;}
58
58
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
59
- `)},Sf=0,jt=[];function Ef(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Sf++)[0],s=p.useState(Si)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Hu([e.lockRef.current],(e.shards||[]).map(Xo),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=ln(g),b=n.current,C="deltaX"in g?g.deltaX:b[0]-y[0],S="deltaY"in g?g.deltaY:b[1]-y[1],R,M=g.target,A=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&M.type==="range")return!1;var $=qo(A,M);if(!$)return!0;if($?R=A:(R=A==="v"?"h":"v",$=qo(A,M)),!$)return!1;if(!r.current&&"changedTouches"in g&&(C||S)&&(r.current=R),!R)return!0;var B=r.current||R;return bf(B,x,g,B==="h"?C:S)},[]),c=p.useCallback(function(g){var x=g;if(!(!jt.length||jt[jt.length-1]!==s)){var y="deltaY"in x?Yo(x):ln(x),b=t.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&wf(R.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var C=(i.current.shards||[]).map(Xo).filter(Boolean).filter(function(R){return R.contains(x.target)}),S=C.length>0?a(x,C[0]):!i.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),l=p.useCallback(function(g,x,y,b){var C={name:g,delta:x,target:y,should:b,shadowParent:Nf(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),u=p.useCallback(function(g){n.current=ln(g),r.current=void 0},[]),d=p.useCallback(function(g){l(g.type,Yo(g),g.target,a(g,e.lockRef.current))},[]),h=p.useCallback(function(g){l(g.type,ln(g),g.target,a(g,e.lockRef.current))},[]);p.useEffect(function(){return jt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Mt),document.addEventListener("touchmove",c,Mt),document.addEventListener("touchstart",u,Mt),function(){jt=jt.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,Mt),document.removeEventListener("touchmove",c,Mt),document.removeEventListener("touchstart",u,Mt)}},[]);var m=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(s,{styles:Cf(o)}):null,m?p.createElement(pf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Nf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Rf=Ju(Ci,Ef);var Er=p.forwardRef(function(e,t){return p.createElement(kn,He({},e,{ref:t,sideCar:Rf}))});Er.classNames=kn.classNames;var Af=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,cn=new WeakMap,dn={},Xn=0,Ai=function(e){return e&&(e.host||Ai(e.parentNode))},Tf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ai(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pf=function(e,t,n,r){var o=Tf(t,Array.isArray(e)?e:[e]);dn[n]||(dn[n]=new WeakMap);var s=dn[n],i=[],a=new Set,c=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var m=h.getAttribute(r),v=m!==null&&m!=="false",g=(_t.get(h)||0)+1,x=(s.get(h)||0)+1;_t.set(h,g),s.set(h,x),i.push(h),g===1&&v&&cn.set(h,!0),x===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return u(t),a.clear(),Xn++,function(){i.forEach(function(d){var h=_t.get(d)-1,m=s.get(d)-1;_t.set(d,h),s.set(d,m),h||(cn.has(d)||d.removeAttribute(r),cn.delete(d)),m||d.removeAttribute(n)}),Xn--,Xn||(_t=new WeakMap,_t=new WeakMap,cn=new WeakMap,dn={})}},Ti=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Af(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Pf(r,o,n,"aria-hidden")):function(){return null}},Dn="Dialog",[Pi,ki]=pt(Dn),[kf,Fe]=Pi(Dn),Di=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=p.useRef(null),c=p.useRef(null),[l,u]=xt({prop:r,defaultProp:o??!1,onChange:s,caller:Dn});return f.jsx(kf,{scope:t,triggerRef:a,contentRef:c,contentId:ct(),titleId:ct(),descriptionId:ct(),open:l,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(d=>!d),[u]),modal:i,children:n})};Di.displayName=Dn;var Mi="DialogTrigger",ji=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fe(Mi,n),s=oe(t,o.triggerRef);return f.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ar(o.open),...r,ref:s,onClick:te(e.onClick,o.onOpenToggle)})});ji.displayName=Mi;var Nr="DialogPortal",[Df,_i]=Pi(Nr,{forceMount:void 0}),Ii=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Fe(Nr,t);return f.jsx(Df,{scope:t,forceMount:n,children:p.Children.map(r,i=>f.jsx(Vt,{present:n||s.open,children:f.jsx(Sr,{asChild:!0,container:o,children:i})}))})};Ii.displayName=Nr;var vn="DialogOverlay",Oi=p.forwardRef((e,t)=>{const n=_i(vn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Fe(vn,e.__scopeDialog);return s.modal?f.jsx(Vt,{present:r||s.open,children:f.jsx(jf,{...o,ref:t})}):null});Oi.displayName=vn;var Mf=Ft("DialogOverlay.RemoveScroll"),jf=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fe(vn,n);return f.jsx(Er,{as:Mf,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsx(J.div,{"data-state":Ar(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),wt="DialogContent",Li=p.forwardRef((e,t)=>{const n=_i(wt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Fe(wt,e.__scopeDialog);return f.jsx(Vt,{present:r||s.open,children:s.modal?f.jsx(_f,{...o,ref:t}):f.jsx(If,{...o,ref:t})})});Li.displayName=wt;var _f=p.forwardRef((e,t)=>{const n=Fe(wt,e.__scopeDialog),r=p.useRef(null),o=oe(t,n.contentRef,r);return p.useEffect(()=>{const s=r.current;if(s)return Ti(s)},[]),f.jsx($i,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:te(e.onFocusOutside,s=>s.preventDefault())})}),If=p.forwardRef((e,t)=>{const n=Fe(wt,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return f.jsx($i,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),$i=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=Fe(wt,n),c=p.useRef(null),l=oe(t,c);return xi(),f.jsxs(f.Fragment,{children:[f.jsx(Cr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:f.jsx(wr,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ar(a.open),...i,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(Lf,{titleId:a.titleId}),f.jsx(Ff,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Rr="DialogTitle",Fi=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fe(Rr,n);return f.jsx(J.h2,{id:o.titleId,...r,ref:t})});Fi.displayName=Rr;var zi="DialogDescription",Bi=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fe(zi,n);return f.jsx(J.p,{id:o.descriptionId,...r,ref:t})});Bi.displayName=zi;var Wi="DialogClose",Vi=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fe(Wi,n);return f.jsx(J.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});Vi.displayName=Wi;function Ar(e){return e?"open":"closed"}var Hi="DialogTitleWarning",[Of,Ui]=Qd(Hi,{contentName:wt,titleName:Rr,docsSlug:"dialog"}),Lf=({titleId:e})=>{const t=Ui(Hi),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
59
+ `)},jf=0,Pt=[];function If(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(jf++)[0],s=f.useState(_i)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=ef([e.lockRef.current],(e.shards||[]).map(as),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var x=dn(g),b=n.current,S="deltaX"in g?g.deltaX:b[0]-x[0],C="deltaY"in g?g.deltaY:b[1]-x[1],E,T=g.target,R=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&T.type==="range")return!1;var $=ss(R,T);if(!$)return!0;if($?E=R:(E=R==="v"?"h":"v",$=ss(R,T)),!$)return!1;if(!r.current&&"changedTouches"in g&&(S||C)&&(r.current=E),!E)return!0;var V=r.current||E;return kf(V,y,g,V==="h"?S:C)},[]),c=f.useCallback(function(g){var y=g;if(!(!Pt.length||Pt[Pt.length-1]!==s)){var x="deltaY"in y?is(y):dn(y),b=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&Mf(E.delta,x)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var S=(i.current.shards||[]).map(as).filter(Boolean).filter(function(E){return E.contains(y.target)}),C=S.length>0?a(y,S[0]):!i.current.noIsolation;C&&y.cancelable&&y.preventDefault()}}},[]),l=f.useCallback(function(g,y,x,b){var S={name:g,delta:y,target:x,should:b,shadowParent:_f(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),u=f.useCallback(function(g){n.current=dn(g),r.current=void 0},[]),d=f.useCallback(function(g){l(g.type,is(g),g.target,a(g,e.lockRef.current))},[]),h=f.useCallback(function(g){l(g.type,dn(g),g.target,a(g,e.lockRef.current))},[]);f.useEffect(function(){return Pt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Tt),document.addEventListener("touchmove",c,Tt),document.addEventListener("touchstart",u,Tt),function(){Pt=Pt.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,Tt),document.removeEventListener("touchmove",c,Tt),document.removeEventListener("touchstart",u,Tt)}},[]);var m=e.removeScrollBar,v=e.inert;return f.createElement(f.Fragment,null,v?f.createElement(s,{styles:Df(o)}):null,m?f.createElement(Cf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _f(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Of=df(Ii,If);var Ir=f.forwardRef(function(e,t){return f.createElement(In,Ue({},e,{ref:t,sideCar:Of}))});Ir.classNames=In.classNames;var Lf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kt=new WeakMap,un=new WeakMap,fn={},or=0,Fi=function(e){return e&&(e.host||Fi(e.parentNode))},$f=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fi(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ff=function(e,t,n,r){var o=$f(t,Array.isArray(e)?e:[e]);fn[n]||(fn[n]=new WeakMap);var s=fn[n],i=[],a=new Set,c=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var m=h.getAttribute(r),v=m!==null&&m!=="false",g=(kt.get(h)||0)+1,y=(s.get(h)||0)+1;kt.set(h,g),s.set(h,y),i.push(h),g===1&&v&&un.set(h,!0),y===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(t),a.clear(),or++,function(){i.forEach(function(d){var h=kt.get(d)-1,m=s.get(d)-1;kt.set(d,h),s.set(d,m),h||(un.has(d)||d.removeAttribute(r),un.delete(d)),m||d.removeAttribute(n)}),or--,or||(kt=new WeakMap,kt=new WeakMap,un=new WeakMap,fn={})}},zi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Lf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Ff(r,o,n,"aria-hidden")):function(){return null}},_n="Dialog",[Bi,Vi]=ft(_n),[zf,Ve]=Bi(_n),Hi=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=f.useRef(null),c=f.useRef(null),[l,u]=yt({prop:r,defaultProp:o??!1,onChange:s,caller:_n});return p.jsx(zf,{scope:t,triggerRef:a,contentRef:c,contentId:lt(),titleId:lt(),descriptionId:lt(),open:l,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(d=>!d),[u]),modal:i,children:n})};Hi.displayName=_n;var Wi="DialogTrigger",Ui=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Wi,n),s=fe(t,o.triggerRef);return p.jsx(oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Lr(o.open),...r,ref:s,onClick:ce(e.onClick,o.onOpenToggle)})});Ui.displayName=Wi;var _r="DialogPortal",[Bf,Gi]=Bi(_r,{forceMount:void 0}),Zi=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Ve(_r,t);return p.jsx(Bf,{scope:t,forceMount:n,children:f.Children.map(r,i=>p.jsx(Ft,{present:n||s.open,children:p.jsx(jr,{asChild:!0,container:o,children:i})}))})};Zi.displayName=_r;var wn="DialogOverlay",qi=f.forwardRef((e,t)=>{const n=Gi(wn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ve(wn,e.__scopeDialog);return s.modal?p.jsx(Ft,{present:r||s.open,children:p.jsx(Hf,{...o,ref:t})}):null});qi.displayName=wn;var Vf=_t("DialogOverlay.RemoveScroll"),Hf=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(wn,n);return p.jsx(Ir,{as:Vf,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(oe.div,{"data-state":Lr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bt="DialogContent",Yi=f.forwardRef((e,t)=>{const n=Gi(bt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ve(bt,e.__scopeDialog);return p.jsx(Ft,{present:r||s.open,children:s.modal?p.jsx(Wf,{...o,ref:t}):p.jsx(Uf,{...o,ref:t})})});Yi.displayName=bt;var Wf=f.forwardRef((e,t)=>{const n=Ve(bt,e.__scopeDialog),r=f.useRef(null),o=fe(t,n.contentRef,r);return f.useEffect(()=>{const s=r.current;if(s)return zi(s)},[]),p.jsx(Ki,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,s=>s.preventDefault())})}),Uf=f.forwardRef((e,t)=>{const n=Ve(bt,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return p.jsx(Ki,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Ki=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=Ve(bt,n),c=f.useRef(null),l=fe(t,c);return Mi(),p.jsxs(p.Fragment,{children:[p.jsx(Dr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Mr,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Lr(a.open),...i,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Zf,{titleId:a.titleId}),p.jsx(Yf,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Or="DialogTitle",Xi=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Or,n);return p.jsx(oe.h2,{id:o.titleId,...r,ref:t})});Xi.displayName=Or;var Qi="DialogDescription",Ji=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Qi,n);return p.jsx(oe.p,{id:o.descriptionId,...r,ref:t})});Ji.displayName=Qi;var ea="DialogClose",ta=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(ea,n);return p.jsx(oe.button,{type:"button",...r,ref:t,onClick:ce(e.onClick,()=>o.onOpenChange(!1))})});ta.displayName=ea;function Lr(e){return e?"open":"closed"}var na="DialogTitleWarning",[Gf,ra]=lu(na,{contentName:bt,titleName:Or,docsSlug:"dialog"}),Zf=({titleId:e})=>{const t=ra(na),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
60
60
 
61
61
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
62
62
 
63
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$f="DialogDescriptionWarning",Ff=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ui($f).contentName}}.`;return p.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Gi=Di,qi=ji,Yi=Ii,Tr=Oi,Pr=Li,kr=Fi,Dr=Bi,Mn=Vi;/**
63
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},qf="DialogDescriptionWarning",Yf=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ra(qf).contentName}}.`;return f.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},oa=Hi,sa=Ui,ia=Zi,$r=qi,Fr=Yi,zr=Xi,Br=Ji,On=ta;/**
64
64
  * @license lucide-react v0.542.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const zf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bf=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ko=e=>{const t=Bf(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Wf=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
68
+ */const Kf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xf=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ls=e=>{const t=Xf(e);return t.charAt(0).toUpperCase()+t.slice(1)},aa=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Qf=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
69
69
  * @license lucide-react v0.542.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */var Vf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
73
+ */var Jf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
74
74
  * @license lucide-react v0.542.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const Hf=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>w.createElement("svg",{ref:c,...Vf,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Xi("lucide",o),...!s&&!Wf(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,u])=>w.createElement(l,u)),...Array.isArray(s)?s:[s]]));/**
78
+ */const ep=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>w.createElement("svg",{ref:c,...Jf,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:aa("lucide",o),...!s&&!Qf(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,u])=>w.createElement(l,u)),...Array.isArray(s)?s:[s]]));/**
79
79
  * @license lucide-react v0.542.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
- */const Me=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(Hf,{ref:s,iconNode:t,className:Xi(`lucide-${zf(Ko(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ko(e),n};/**
83
+ */const He=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(ep,{ref:s,iconNode:t,className:aa(`lucide-${Kf(ls(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ls(e),n};/**
84
84
  * @license lucide-react v0.542.0 - ISC
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const Uf=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jn=Me("check",Uf);/**
88
+ */const tp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],en=He("check",tp);/**
89
89
  * @license lucide-react v0.542.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
- */const Gf=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ki=Me("chevron-down",Gf);/**
93
+ */const np=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],la=He("chevron-down",np);/**
94
94
  * @license lucide-react v0.542.0 - ISC
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const qf=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Zi=Me("chevron-up",qf);/**
98
+ */const rp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ca=He("chevron-up",rp);/**
99
99
  * @license lucide-react v0.542.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const Yf=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Qi=Me("copy",Yf);/**
103
+ */const op=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],da=He("copy",op);/**
104
104
  * @license lucide-react v0.542.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const Xf=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Kf=Me("link-2",Xf);/**
108
+ */const sp=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ip=He("link-2",sp);/**
109
109
  * @license lucide-react v0.542.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
- */const Zf=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Zo=Me("loader-circle",Zf);/**
113
+ */const ap=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],cs=He("loader-circle",ap);/**
114
114
  * @license lucide-react v0.542.0 - ISC
115
115
  *
116
116
  * This source code is licensed under the ISC license.
117
117
  * See the LICENSE file in the root directory of this source tree.
118
- */const Qf=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Jf=Me("message-square",Qf);/**
118
+ */const lp=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],cp=He("message-square",lp);/**
119
119
  * @license lucide-react v0.542.0 - ISC
120
120
  *
121
121
  * This source code is licensed under the ISC license.
122
122
  * See the LICENSE file in the root directory of this source tree.
123
- */const ep=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],tp=Me("play",ep);/**
123
+ */const dp=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],up=He("plus",dp);/**
124
124
  * @license lucide-react v0.542.0 - ISC
125
125
  *
126
126
  * This source code is licensed under the ISC license.
127
127
  * See the LICENSE file in the root directory of this source tree.
128
- */const np=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],rp=Me("plus",np);/**
128
+ */const fp=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],pp=He("refresh-cw",fp);/**
129
129
  * @license lucide-react v0.542.0 - ISC
130
130
  *
131
131
  * This source code is licensed under the ISC license.
132
132
  * See the LICENSE file in the root directory of this source tree.
133
- */const op=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],sp=Me("refresh-cw",op);/**
133
+ */const hp=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],mp=He("send",hp);/**
134
134
  * @license lucide-react v0.542.0 - ISC
135
135
  *
136
136
  * This source code is licensed under the ISC license.
137
137
  * See the LICENSE file in the root directory of this source tree.
138
- */const ip=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ap=Me("send",ip);/**
139
- * @license lucide-react v0.542.0 - ISC
140
- *
141
- * This source code is licensed under the ISC license.
142
- * See the LICENSE file in the root directory of this source tree.
143
- */const lp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cp=Me("x",lp),dp=Gi,up=qi,Ji=Yi,fp=Mn,Mr=p.forwardRef(({className:e,...t},n)=>f.jsx(Tr,{ref:n,className:O("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Mr.displayName=Tr.displayName;const ea=p.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(Ji,{children:[f.jsx(Mr,{}),f.jsxs(Pr,{ref:r,className:O("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,f.jsxs(Mn,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 cursor-pointer",children:[f.jsx(cp,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ea.displayName=Pr.displayName;const ta=({className:e,...t})=>f.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ta.displayName="DialogHeader";const na=({className:e,...t})=>f.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});na.displayName="DialogFooter";const ra=p.forwardRef(({className:e,...t},n)=>f.jsx(kr,{ref:n,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));ra.displayName=kr.displayName;const oa=p.forwardRef(({className:e,...t},n)=>f.jsx(Dr,{ref:n,className:O("text-sm text-gray-500",e),...t}));oa.displayName=Dr.displayName;function Qo(e,[t,n]){return Math.min(n,Math.max(t,e))}const pp=["top","right","bottom","left"],ut=Math.min,Ae=Math.max,yn=Math.round,un=Math.floor,Ge=e=>({x:e,y:e}),hp={left:"right",right:"left",bottom:"top",top:"bottom"},mp={start:"end",end:"start"};function rr(e,t,n){return Ae(e,ut(t,n))}function tt(e,t){return typeof e=="function"?e(t):e}function nt(e){return e.split("-")[0]}function Ht(e){return e.split("-")[1]}function jr(e){return e==="x"?"y":"x"}function _r(e){return e==="y"?"height":"width"}const gp=new Set(["top","bottom"]);function Ue(e){return gp.has(nt(e))?"y":"x"}function Ir(e){return jr(Ue(e))}function vp(e,t,n){n===void 0&&(n=!1);const r=Ht(e),o=Ir(e),s=_r(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=xn(i)),[i,xn(i)]}function yp(e){const t=xn(e);return[or(e),t,or(t)]}function or(e){return e.replace(/start|end/g,t=>mp[t])}const Jo=["left","right"],es=["right","left"],xp=["top","bottom"],bp=["bottom","top"];function wp(e,t,n){switch(e){case"top":case"bottom":return n?t?es:Jo:t?Jo:es;case"left":case"right":return t?xp:bp;default:return[]}}function Cp(e,t,n,r){const o=Ht(e);let s=wp(nt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(or)))),s}function xn(e){return e.replace(/left|right|bottom|top/g,t=>hp[t])}function Sp(e){return{top:0,right:0,bottom:0,left:0,...e}}function sa(e){return typeof e!="number"?Sp(e):{top:e,right:e,bottom:e,left:e}}function bn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ts(e,t,n){let{reference:r,floating:o}=e;const s=Ue(t),i=Ir(t),a=_r(i),c=nt(t),l=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Ht(t)){case"start":m[i]-=h*(n&&l?-1:1);break;case"end":m[i]+=h*(n&&l?-1:1);break}return m}const Ep=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=ts(l,r,c),h=r,m={},v=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:b,y:C,data:S,reset:R}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:t}});u=b??u,d=C??d,m={...m,[x]:{...m[x],...S}},R&&v<=50&&(v++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(l=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:d}=ts(l,h,c)),g=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:m}};async function Qt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=tt(t,e),v=sa(m),x=a[h?d==="floating"?"reference":"floating":d],y=bn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),b=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},R=bn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:C,strategy:c}):b);return{top:(y.top-R.top+v.top)/S.y,bottom:(R.bottom-y.bottom+v.bottom)/S.y,left:(y.left-R.left+v.left)/S.x,right:(R.right-y.right+v.right)/S.x}}const Np=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=tt(e,t)||{};if(l==null)return{};const d=sa(u),h={x:n,y:r},m=Ir(o),v=_r(m),g=await i.getDimensions(l),x=m==="y",y=x?"top":"left",b=x?"bottom":"right",C=x?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[m]-h[m]-s.floating[v],R=h[m]-s.reference[m],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let A=M?M[C]:0;(!A||!await(i.isElement==null?void 0:i.isElement(M)))&&(A=a.floating[C]||s.floating[v]);const $=S/2-R/2,B=A/2-g[v]/2-1,z=ut(d[y],B),j=ut(d[b],B),P=z,I=A-g[v]-j,D=A/2-g[v]/2+$,k=rr(P,D,I),N=!c.arrow&&Ht(o)!=null&&D!==k&&s.reference[v]/2-(D<P?z:j)-g[v]/2<0,T=N?D<P?D-P:D-I:0;return{[m]:h[m]+T,data:{[m]:k,centerOffset:D-k-T,...N&&{alignmentOffset:T}},reset:N}}}),Rp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...x}=tt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=nt(o),b=Ue(a),C=nt(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),R=h||(C||!g?[xn(a)]:yp(a)),M=v!=="none";!h&&M&&R.push(...Cp(a,g,v,S));const A=[a,...R],$=await Qt(t,x),B=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&B.push($[y]),d){const D=vp(o,i,S);B.push($[D[0]],$[D[1]])}if(z=[...z,{placement:o,overflows:B}],!B.every(D=>D<=0)){var j,P;const D=(((j=s.flip)==null?void 0:j.index)||0)+1,k=A[D];if(k&&(!(d==="alignment"?b!==Ue(k):!1)||z.every(E=>Ue(E.placement)===b?E.overflows[0]>0:!0)))return{data:{index:D,overflows:z},reset:{placement:k}};let N=(P=z.filter(T=>T.overflows[0]<=0).sort((T,E)=>T.overflows[1]-E.overflows[1])[0])==null?void 0:P.placement;if(!N)switch(m){case"bestFit":{var I;const T=(I=z.filter(E=>{if(M){const _=Ue(E.placement);return _===b||_==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(_=>_>0).reduce((_,Y)=>_+Y,0)]).sort((E,_)=>E[1]-_[1])[0])==null?void 0:I[0];T&&(N=T);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function ns(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rs(e){return pp.some(t=>e[t]>=0)}const Ap=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=tt(e,t);switch(r){case"referenceHidden":{const s=await Qt(t,{...o,elementContext:"reference"}),i=ns(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:rs(i)}}}case"escaped":{const s=await Qt(t,{...o,altBoundary:!0}),i=ns(s,n.floating);return{data:{escapedOffsets:i,escaped:rs(i)}}}default:return{}}}}},ia=new Set(["left","top"]);async function Tp(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=nt(n),a=Ht(n),c=Ue(n)==="y",l=ia.has(i)?-1:1,u=s&&c?-1:1,d=tt(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),c?{x:m*u,y:h*l}:{x:h*l,y:m*u}}const Pp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Tp(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},kp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...c}=tt(e,t),l={x:n,y:r},u=await Qt(t,c),d=Ue(nt(o)),h=jr(d);let m=l[h],v=l[d];if(s){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=m+u[x],C=m-u[y];m=rr(b,m,C)}if(i){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=v+u[x],C=v-u[y];v=rr(b,v,C)}const g=a.fn({...t,[h]:m,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[d]:i}}}}}},Dp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=tt(e,t),u={x:n,y:r},d=Ue(o),h=jr(d);let m=u[h],v=u[d];const g=tt(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const C=h==="y"?"height":"width",S=s.reference[h]-s.floating[C]+x.mainAxis,R=s.reference[h]+s.reference[C]-x.mainAxis;m<S?m=S:m>R&&(m=R)}if(l){var y,b;const C=h==="y"?"width":"height",S=ia.has(nt(o)),R=s.reference[d]-s.floating[C]+(S&&((y=i.offset)==null?void 0:y[d])||0)+(S?0:x.crossAxis),M=s.reference[d]+s.reference[C]+(S?0:((b=i.offset)==null?void 0:b[d])||0)-(S?x.crossAxis:0);v<R?v=R:v>M&&(v=M)}return{[h]:m,[d]:v}}}},Mp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=tt(e,t),u=await Qt(t,l),d=nt(o),h=Ht(o),m=Ue(o)==="y",{width:v,height:g}=s.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,x=h==="end"?"top":"bottom");const b=g-u.top-u.bottom,C=v-u.left-u.right,S=ut(g-u[x],b),R=ut(v-u[y],C),M=!t.middlewareData.shift;let A=S,$=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),M&&!h){const z=Ae(u.left,0),j=Ae(u.right,0),P=Ae(u.top,0),I=Ae(u.bottom,0);m?$=v-2*(z!==0||j!==0?z+j:Ae(u.left,u.right)):A=g-2*(P!==0||I!==0?P+I:Ae(u.top,u.bottom))}await c({...t,availableWidth:$,availableHeight:A});const B=await i.getDimensions(a.floating);return v!==B.width||g!==B.height?{reset:{rects:!0}}:{}}}};function _n(){return typeof window<"u"}function Ut(e){return aa(e)?(e.nodeName||"").toLowerCase():"#document"}function Te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xe(e){var t;return(t=(aa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aa(e){return _n()?e instanceof Node||e instanceof Te(e).Node:!1}function Oe(e){return _n()?e instanceof Element||e instanceof Te(e).Element:!1}function qe(e){return _n()?e instanceof HTMLElement||e instanceof Te(e).HTMLElement:!1}function os(e){return!_n()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Te(e).ShadowRoot}const jp=new Set(["inline","contents"]);function tn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!jp.has(o)}const _p=new Set(["table","td","th"]);function Ip(e){return _p.has(Ut(e))}const Op=[":popover-open",":modal"];function In(e){return Op.some(t=>{try{return e.matches(t)}catch{return!1}})}const Lp=["transform","translate","scale","rotate","perspective"],$p=["transform","translate","scale","rotate","perspective","filter"],Fp=["paint","layout","strict","content"];function Or(e){const t=Lr(),n=Oe(e)?Le(e):e;return Lp.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||$p.some(r=>(n.willChange||"").includes(r))||Fp.some(r=>(n.contain||"").includes(r))}function zp(e){let t=ft(e);for(;qe(t)&&!zt(t);){if(Or(t))return t;if(In(t))return null;t=ft(t)}return null}function Lr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Bp=new Set(["html","body","#document"]);function zt(e){return Bp.has(Ut(e))}function Le(e){return Te(e).getComputedStyle(e)}function On(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ft(e){if(Ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||os(e)&&e.host||Xe(e);return os(t)?t.host:t}function la(e){const t=ft(e);return zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&tn(t)?t:la(t)}function Jt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=la(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Te(o);if(s){const a=sr(i);return t.concat(i,i.visualViewport||[],tn(o)?o:[],a&&n?Jt(a):[])}return t.concat(o,Jt(o,[],n))}function sr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ca(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=yn(n)!==s||yn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function $r(e){return Oe(e)?e:e.contextElement}function Lt(e){const t=$r(e);if(!qe(t))return Ge(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=ca(t);let i=(s?yn(n.width):n.width)/r,a=(s?yn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Wp=Ge(0);function da(e){const t=Te(e);return!Lr()||!t.visualViewport?Wp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Te(e)?!1:t}function Ct(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=$r(e);let i=Ge(1);t&&(r?Oe(r)&&(i=Lt(r)):i=Lt(e));const a=Vp(s,n,r)?da(s):Ge(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=Te(s),m=r&&Oe(r)?Te(r):r;let v=h,g=sr(v);for(;g&&r&&m!==v;){const x=Lt(g),y=g.getBoundingClientRect(),b=Le(g),C=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*x.x,S=y.top+(g.clientTop+parseFloat(b.paddingTop))*x.y;c*=x.x,l*=x.y,u*=x.x,d*=x.y,c+=C,l+=S,v=Te(g),g=sr(v)}}return bn({width:u,height:d,x:c,y:l})}function Ln(e,t){const n=On(e).scrollLeft;return t?t.left+n:Ct(Xe(e)).left+n}function ua(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ln(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Hp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Xe(r),a=t?In(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ge(1);const u=Ge(0),d=qe(r);if((d||!d&&!s)&&((Ut(r)!=="body"||tn(i))&&(c=On(r)),qe(r))){const m=Ct(r);l=Lt(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=i&&!d&&!s?ua(i,c):Ge(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-c.scrollTop*l.y+u.y+h.y}}function Up(e){return Array.from(e.getClientRects())}function Gp(e){const t=Xe(e),n=On(e),r=e.ownerDocument.body,o=Ae(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ae(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ln(e);const a=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Ae(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const ss=25;function qp(e,t){const n=Te(e),r=Xe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const u=Lr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Ln(r);if(l<=0){const u=r.ownerDocument,d=u.body,h=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-m);v<=ss&&(s-=v)}else l<=ss&&(s+=l);return{width:s,height:i,x:a,y:c}}const Yp=new Set(["absolute","fixed"]);function Xp(e,t){const n=Ct(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=qe(e)?Lt(e):Ge(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function is(e,t,n){let r;if(t==="viewport")r=qp(e,n);else if(t==="document")r=Gp(Xe(e));else if(Oe(t))r=Xp(t,n);else{const o=da(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return bn(r)}function fa(e,t){const n=ft(e);return n===t||!Oe(n)||zt(n)?!1:Le(n).position==="fixed"||fa(n,t)}function Kp(e,t){const n=t.get(e);if(n)return n;let r=Jt(e,[],!1).filter(a=>Oe(a)&&Ut(a)!=="body"),o=null;const s=Le(e).position==="fixed";let i=s?ft(e):e;for(;Oe(i)&&!zt(i);){const a=Le(i),c=Or(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Yp.has(o.position)||tn(i)&&!c&&fa(e,i))?r=r.filter(u=>u!==i):o=a,i=ft(i)}return t.set(e,r),r}function Zp(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?In(t)?[]:Kp(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,u)=>{const d=is(t,u,o);return l.top=Ae(d.top,l.top),l.right=ut(d.right,l.right),l.bottom=ut(d.bottom,l.bottom),l.left=Ae(d.left,l.left),l},is(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Qp(e){const{width:t,height:n}=ca(e);return{width:t,height:n}}function Jp(e,t,n){const r=qe(t),o=Xe(t),s=n==="fixed",i=Ct(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ge(0);function l(){c.x=Ln(o)}if(r||!r&&!s)if((Ut(t)!=="body"||tn(o))&&(a=On(t)),r){const m=Ct(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?ua(o,a):Ge(0),d=i.left+a.scrollLeft-c.x-u.x,h=i.top+a.scrollTop-c.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function Kn(e){return Le(e).position==="static"}function as(e,t){if(!qe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xe(e)===n&&(n=n.ownerDocument.body),n}function pa(e,t){const n=Te(e);if(In(e))return n;if(!qe(e)){let o=ft(e);for(;o&&!zt(o);){if(Oe(o)&&!Kn(o))return o;o=ft(o)}return n}let r=as(e,t);for(;r&&Ip(r)&&Kn(r);)r=as(r,t);return r&&zt(r)&&Kn(r)&&!Or(r)?n:r||zp(e)||n}const eh=async function(e){const t=this.getOffsetParent||pa,n=this.getDimensions,r=await n(e.floating);return{reference:Jp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function th(e){return Le(e).direction==="rtl"}const nh={convertOffsetParentRelativeRectToViewportRelativeRect:Hp,getDocumentElement:Xe,getClippingRect:Zp,getOffsetParent:pa,getElementRects:eh,getClientRects:Up,getDimensions:Qp,getScale:Lt,isElement:Oe,isRTL:th};function ha(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rh(e,t){let n=null,r;const o=Xe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:h,height:m}=l;if(a||t(),!h||!m)return;const v=un(d),g=un(o.clientWidth-(u+h)),x=un(o.clientHeight-(d+m)),y=un(u),C={rootMargin:-v+"px "+-g+"px "+-x+"px "+-y+"px",threshold:Ae(0,ut(1,c))||1};let S=!0;function R(M){const A=M[0].intersectionRatio;if(A!==c){if(!S)return i();A?i(!1,A):r=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!ha(l,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(R,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(e)}return i(!0),s}function oh(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=$r(e),u=o||s?[...l?Jt(l):[],...Jt(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=l&&a?rh(l,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let v,g=c?Ct(e):null;c&&x();function x(){const y=Ct(e);g&&!ha(g,y)&&n(),g=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const sh=Pp,ih=kp,ah=Rp,lh=Mp,ch=Ap,ls=Np,dh=Dp,uh=(e,t,n)=>{const r=new Map,o={platform:nh,...n},s={...o.platform,_c:r};return Ep(e,t,{...o,platform:s})};var fh=typeof document<"u",ph=function(){},hn=fh?w.useLayoutEffect:ph;function wn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!wn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ma(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cs(e,t){const n=ma(e);return Math.round(t*n)/n}function Zn(e){const t=p.useRef(e);return hn(()=>{t.current=e}),t}function hh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=p.useState(r);wn(h,r)||m(r);const[v,g]=p.useState(null),[x,y]=p.useState(null),b=p.useCallback(E=>{E!==M.current&&(M.current=E,g(E))},[]),C=p.useCallback(E=>{E!==A.current&&(A.current=E,y(E))},[]),S=s||v,R=i||x,M=p.useRef(null),A=p.useRef(null),$=p.useRef(u),B=c!=null,z=Zn(c),j=Zn(o),P=Zn(l),I=p.useCallback(()=>{if(!M.current||!A.current)return;const E={placement:t,strategy:n,middleware:h};j.current&&(E.platform=j.current),uh(M.current,A.current,E).then(_=>{const Y={..._,isPositioned:P.current!==!1};D.current&&!wn($.current,Y)&&($.current=Y,En.flushSync(()=>{d(Y)}))})},[h,t,n,j,P]);hn(()=>{l===!1&&$.current.isPositioned&&($.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[l]);const D=p.useRef(!1);hn(()=>(D.current=!0,()=>{D.current=!1}),[]),hn(()=>{if(S&&(M.current=S),R&&(A.current=R),S&&R){if(z.current)return z.current(S,R,I);I()}},[S,R,I,z,B]);const k=p.useMemo(()=>({reference:M,floating:A,setReference:b,setFloating:C}),[b,C]),N=p.useMemo(()=>({reference:S,floating:R}),[S,R]),T=p.useMemo(()=>{const E={position:n,left:0,top:0};if(!N.floating)return E;const _=cs(N.floating,u.x),Y=cs(N.floating,u.y);return a?{...E,transform:"translate("+_+"px, "+Y+"px)",...ma(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Y}},[n,a,N.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:I,refs:k,elements:N,floatingStyles:T}),[u,I,k,N,T])}const mh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ls({element:r.current,padding:o}).fn(n):{}:r?ls({element:r,padding:o}).fn(n):{}}}},gh=(e,t)=>({...sh(e),options:[e,t]}),vh=(e,t)=>({...ih(e),options:[e,t]}),yh=(e,t)=>({...dh(e),options:[e,t]}),xh=(e,t)=>({...ah(e),options:[e,t]}),bh=(e,t)=>({...lh(e),options:[e,t]}),wh=(e,t)=>({...ch(e),options:[e,t]}),Ch=(e,t)=>({...mh(e),options:[e,t]});var Sh="Arrow",ga=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return f.jsx(J.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});ga.displayName=Sh;var Eh=ga;function va(e){const[t,n]=p.useState(void 0);return be(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Fr="Popper",[ya,xa]=pt(Fr),[Nh,ba]=ya(Fr),wa=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return f.jsx(Nh,{scope:t,anchor:r,onAnchorChange:o,children:n})};wa.displayName=Fr;var Ca="PopperAnchor",Sa=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ba(Ca,n),i=p.useRef(null),a=oe(t,i),c=p.useRef(null);return p.useEffect(()=>{const l=c.current;c.current=(r==null?void 0:r.current)||i.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:f.jsx(J.div,{...o,ref:a})});Sa.displayName=Ca;var zr="PopperContent",[Rh,Ah]=ya(zr),Ea=p.forwardRef((e,t)=>{var W,V,ae,L,Q,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:v,...g}=e,x=ba(zr,n),[y,b]=p.useState(null),C=oe(t,ve=>b(ve)),[S,R]=p.useState(null),M=va(S),A=(M==null?void 0:M.width)??0,$=(M==null?void 0:M.height)??0,B=r+(s!=="center"?"-"+s:""),z=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],P=j.length>0,I={padding:z,boundary:j.filter(Ph),altBoundary:P},{refs:D,floatingStyles:k,placement:N,isPositioned:T,middlewareData:E}=hh({strategy:"fixed",placement:B,whileElementsMounted:(...ve)=>oh(...ve,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[gh({mainAxis:o+$,alignmentAxis:i}),c&&vh({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?yh():void 0,...I}),c&&xh({...I}),bh({...I,apply:({elements:ve,rects:ye,availableWidth:Ke,availableHeight:Re})=>{const{width:Ce,height:Tt}=ye.reference,we=ve.floating.style;we.setProperty("--radix-popper-available-width",`${Ke}px`),we.setProperty("--radix-popper-available-height",`${Re}px`),we.setProperty("--radix-popper-anchor-width",`${Ce}px`),we.setProperty("--radix-popper-anchor-height",`${Tt}px`)}}),S&&Ch({element:S,padding:a}),kh({arrowWidth:A,arrowHeight:$}),h&&wh({strategy:"referenceHidden",...I})]}),[_,Y]=Aa(N),H=bt(v);be(()=>{T&&(H==null||H())},[T,H]);const se=(W=E.arrow)==null?void 0:W.x,U=(V=E.arrow)==null?void 0:V.y,Z=((ae=E.arrow)==null?void 0:ae.centerOffset)!==0,[ee,de]=p.useState();return be(()=>{y&&de(window.getComputedStyle(y).zIndex)},[y]),f.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:T?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(L=E.transformOrigin)==null?void 0:L.x,(Q=E.transformOrigin)==null?void 0:Q.y].join(" "),...((K=E.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Rh,{scope:n,placedSide:_,onArrowChange:R,arrowX:se,arrowY:U,shouldHideArrow:Z,children:f.jsx(J.div,{"data-side":_,"data-align":Y,...g,ref:C,style:{...g.style,animation:T?void 0:"none"}})})})});Ea.displayName=zr;var Na="PopperArrow",Th={top:"bottom",right:"left",bottom:"top",left:"right"},Ra=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Ah(Na,r),i=Th[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(Eh,{...o,ref:n,style:{...o.style,display:"block"}})})});Ra.displayName=Na;function Ph(e){return e!==null}var kh=e=>({name:"transformOrigin",options:e,fn(t){var x,y,b;const{placement:n,rects:r,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=Aa(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let v="",g="";return l==="bottom"?(v=i?d:`${h}px`,g=`${-c}px`):l==="top"?(v=i?d:`${h}px`,g=`${r.floating.height+c}px`):l==="right"?(v=`${-c}px`,g=i?d:`${m}px`):l==="left"&&(v=`${r.floating.width+c}px`,g=i?d:`${m}px`),{data:{x:v,y:g}}}});function Aa(e){const[t,n="center"]=e.split("-");return[t,n]}var Dh=wa,Mh=Sa,jh=Ea,_h=Ra;function Ta(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pa=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ih="VisuallyHidden",Oh=p.forwardRef((e,t)=>f.jsx(J.span,{...e,ref:t,style:{...Pa,...e.style}}));Oh.displayName=Ih;var Lh=[" ","Enter","ArrowUp","ArrowDown"],$h=[" ","Enter"],St="Select",[$n,Fn,Fh]=qs(St),[Gt]=pt(St,[Fh,xa]),zn=xa(),[zh,ht]=Gt(St),[Bh,Wh]=Gt(St),ka=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:h,required:m,form:v}=e,g=zn(t),[x,y]=p.useState(null),[b,C]=p.useState(null),[S,R]=p.useState(!1),M=Js(l),[A,$]=xt({prop:r,defaultProp:o??!1,onChange:s,caller:St}),[B,z]=xt({prop:i,defaultProp:a,onChange:c,caller:St}),j=p.useRef(null),P=x?v||!!x.closest("form"):!0,[I,D]=p.useState(new Set),k=Array.from(I).map(N=>N.props.value).join(";");return f.jsx(Dh,{...g,children:f.jsxs(zh,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:S,onValueNodeHasChildrenChange:R,contentId:ct(),value:B,onValueChange:z,open:A,onOpenChange:$,dir:M,triggerPointerDownPosRef:j,disabled:h,children:[f.jsx($n.Provider,{scope:t,children:f.jsx(Bh,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(N=>{D(T=>new Set(T).add(N))},[]),onNativeOptionRemove:p.useCallback(N=>{D(T=>{const E=new Set(T);return E.delete(N),E})},[]),children:n})}),P?f.jsxs(tl,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:d,value:B,onChange:N=>z(N.target.value),disabled:h,form:v,children:[B===void 0?f.jsx("option",{value:""}):null,Array.from(I)]},k):null]})})};ka.displayName=St;var Da="SelectTrigger",Ma=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=zn(n),i=ht(Da,n),a=i.disabled||r,c=oe(t,i.onTriggerChange),l=Fn(n),u=p.useRef("touch"),[d,h,m]=rl(g=>{const x=l().filter(C=>!C.disabled),y=x.find(C=>C.value===i.value),b=ol(x,g,y);b!==void 0&&i.onValueChange(b.value)}),v=g=>{a||(i.onOpenChange(!0),m()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return f.jsx(Mh,{asChild:!0,...s,children:f.jsx(J.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":nl(i.value)?"":void 0,...o,ref:c,onClick:te(o.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&v(g)}),onPointerDown:te(o.onPointerDown,g=>{u.current=g.pointerType;const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:te(o.onKeyDown,g=>{const x=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(x&&g.key===" ")&&Lh.includes(g.key)&&(v(),g.preventDefault())})})})});Ma.displayName=Da;var ja="SelectValue",_a=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=ht(ja,n),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,d=oe(t,c.onValueNodeChange);return be(()=>{l(u)},[l,u]),f.jsx(J.span,{...a,ref:d,style:{pointerEvents:"none"},children:nl(c.value)?f.jsx(f.Fragment,{children:i}):s})});_a.displayName=ja;var Vh="SelectIcon",Ia=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ia.displayName=Vh;var Hh="SelectPortal",Oa=e=>f.jsx(Sr,{asChild:!0,...e});Oa.displayName=Hh;var Et="SelectContent",La=p.forwardRef((e,t)=>{const n=ht(Et,e.__scopeSelect),[r,o]=p.useState();if(be(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?En.createPortal(f.jsx($a,{scope:e.__scopeSelect,children:f.jsx($n.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(Fa,{...e,ref:t})});La.displayName=Et;var Ie=10,[$a,mt]=Gt(Et),Uh="SelectContentImpl",Gh=Ft("SelectContent.RemoveScroll"),Fa=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:x,...y}=e,b=ht(Et,n),[C,S]=p.useState(null),[R,M]=p.useState(null),A=oe(t,W=>S(W)),[$,B]=p.useState(null),[z,j]=p.useState(null),P=Fn(n),[I,D]=p.useState(!1),k=p.useRef(!1);p.useEffect(()=>{if(C)return Ti(C)},[C]),xi();const N=p.useCallback(W=>{const[V,...ae]=P().map(K=>K.ref.current),[L]=ae.slice(-1),Q=document.activeElement;for(const K of W)if(K===Q||(K==null||K.scrollIntoView({block:"nearest"}),K===V&&R&&(R.scrollTop=0),K===L&&R&&(R.scrollTop=R.scrollHeight),K==null||K.focus(),document.activeElement!==Q))return},[P,R]),T=p.useCallback(()=>N([$,C]),[N,$,C]);p.useEffect(()=>{I&&T()},[I,T]);const{onOpenChange:E,triggerPointerDownPosRef:_}=b;p.useEffect(()=>{if(C){let W={x:0,y:0};const V=L=>{var Q,K;W={x:Math.abs(Math.round(L.pageX)-(((Q=_.current)==null?void 0:Q.x)??0)),y:Math.abs(Math.round(L.pageY)-(((K=_.current)==null?void 0:K.y)??0))}},ae=L=>{W.x<=10&&W.y<=10?L.preventDefault():C.contains(L.target)||E(!1),document.removeEventListener("pointermove",V),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",ae,{capture:!0})}}},[C,E,_]),p.useEffect(()=>{const W=()=>E(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[E]);const[Y,H]=rl(W=>{const V=P().filter(Q=>!Q.disabled),ae=V.find(Q=>Q.ref.current===document.activeElement),L=ol(V,W,ae);L&&setTimeout(()=>L.ref.current.focus())}),se=p.useCallback((W,V,ae)=>{const L=!k.current&&!ae;(b.value!==void 0&&b.value===V||L)&&(B(W),L&&(k.current=!0))},[b.value]),U=p.useCallback(()=>C==null?void 0:C.focus(),[C]),Z=p.useCallback((W,V,ae)=>{const L=!k.current&&!ae;(b.value!==void 0&&b.value===V||L)&&j(W)},[b.value]),ee=r==="popper"?ir:za,de=ee===ir?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:x}:{};return f.jsx($a,{scope:n,content:C,viewport:R,onViewportChange:M,itemRefCallback:se,selectedItem:$,onItemLeave:U,itemTextRefCallback:Z,focusSelectedItem:T,selectedItemText:z,position:r,isPositioned:I,searchRef:Y,children:f.jsx(Er,{as:Gh,allowPinchZoom:!0,children:f.jsx(Cr,{asChild:!0,trapped:b.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:te(o,W=>{var V;(V=b.trigger)==null||V.focus({preventScroll:!0}),W.preventDefault()}),children:f.jsx(wr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:f.jsx(ee,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:W=>W.preventDefault(),...y,...de,onPlaced:()=>D(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:te(y.onKeyDown,W=>{const V=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!V&&W.key.length===1&&H(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let L=P().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(W.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const Q=W.target,K=L.indexOf(Q);L=L.slice(K+1)}setTimeout(()=>N(L)),W.preventDefault()}})})})})})})});Fa.displayName=Uh;var qh="SelectItemAlignedPosition",za=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ht(Et,n),i=mt(Et,n),[a,c]=p.useState(null),[l,u]=p.useState(null),d=oe(t,A=>u(A)),h=Fn(n),m=p.useRef(!1),v=p.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=i,C=p.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&g&&x&&y){const A=s.trigger.getBoundingClientRect(),$=l.getBoundingClientRect(),B=s.valueNode.getBoundingClientRect(),z=y.getBoundingClientRect();if(s.dir!=="rtl"){const Q=z.left-$.left,K=B.left-Q,ve=A.left-K,ye=A.width+ve,Ke=Math.max(ye,$.width),Re=window.innerWidth-Ie,Ce=Qo(K,[Ie,Math.max(Ie,Re-Ke)]);a.style.minWidth=ye+"px",a.style.left=Ce+"px"}else{const Q=$.right-z.right,K=window.innerWidth-B.right-Q,ve=window.innerWidth-A.right-K,ye=A.width+ve,Ke=Math.max(ye,$.width),Re=window.innerWidth-Ie,Ce=Qo(K,[Ie,Math.max(Ie,Re-Ke)]);a.style.minWidth=ye+"px",a.style.right=Ce+"px"}const j=h(),P=window.innerHeight-Ie*2,I=g.scrollHeight,D=window.getComputedStyle(l),k=parseInt(D.borderTopWidth,10),N=parseInt(D.paddingTop,10),T=parseInt(D.borderBottomWidth,10),E=parseInt(D.paddingBottom,10),_=k+N+I+E+T,Y=Math.min(x.offsetHeight*5,_),H=window.getComputedStyle(g),se=parseInt(H.paddingTop,10),U=parseInt(H.paddingBottom,10),Z=A.top+A.height/2-Ie,ee=P-Z,de=x.offsetHeight/2,W=x.offsetTop+de,V=k+N+W,ae=_-V;if(V<=Z){const Q=j.length>0&&x===j[j.length-1].ref.current;a.style.bottom="0px";const K=l.clientHeight-g.offsetTop-g.offsetHeight,ve=Math.max(ee,de+(Q?U:0)+K+T),ye=V+ve;a.style.height=ye+"px"}else{const Q=j.length>0&&x===j[0].ref.current;a.style.top="0px";const ve=Math.max(Z,k+g.offsetTop+(Q?se:0)+de)+ae;a.style.height=ve+"px",g.scrollTop=V-Z+g.offsetTop}a.style.margin=`${Ie}px 0`,a.style.minHeight=Y+"px",a.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,l,g,x,y,s.dir,r]);be(()=>C(),[C]);const[S,R]=p.useState();be(()=>{l&&R(window.getComputedStyle(l).zIndex)},[l]);const M=p.useCallback(A=>{A&&v.current===!0&&(C(),b==null||b(),v.current=!1)},[C,b]);return f.jsx(Xh,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:M,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:f.jsx(J.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});za.displayName=qh;var Yh="SelectPopperPosition",ir=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ie,...s}=e,i=zn(n);return f.jsx(jh,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ir.displayName=Yh;var[Xh,Br]=Gt(Et,{}),ar="SelectViewport",Ba=p.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=mt(ar,n),i=Br(ar,n),a=oe(t,s.onViewportChange),c=p.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx($n.Slot,{scope:n,children:f.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:te(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const m=Math.abs(c.current-u.scrollTop);if(m>0){const v=window.innerHeight-Ie*2,g=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),y=Math.max(g,x);if(y<v){const b=y+m,C=Math.min(v,b),S=b-C;d.style.height=C+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Ba.displayName=ar;var Wa="SelectGroup",[Kh,Zh]=Gt(Wa),Va=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ct();return f.jsx(Kh,{scope:n,id:o,children:f.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Va.displayName=Wa;var Ha="SelectLabel",Ua=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Zh(Ha,n);return f.jsx(J.div,{id:o.id,...r,ref:t})});Ua.displayName=Ha;var Cn="SelectItem",[Qh,Ga]=Gt(Cn),qa=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=ht(Cn,n),c=mt(Cn,n),l=a.value===r,[u,d]=p.useState(s??""),[h,m]=p.useState(!1),v=oe(t,b=>{var C;return(C=c.itemRefCallback)==null?void 0:C.call(c,b,r,o)}),g=ct(),x=p.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(Qh,{scope:n,value:r,disabled:o,textId:g,isSelected:l,onItemTextChange:p.useCallback(b=>{d(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:f.jsx($n.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:f.jsx(J.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:te(i.onFocus,()=>m(!0)),onBlur:te(i.onBlur,()=>m(!1)),onClick:te(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:te(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:te(i.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:te(i.onPointerMove,b=>{var C;x.current=b.pointerType,o?(C=c.onItemLeave)==null||C.call(c):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(i.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=c.onItemLeave)==null||C.call(c))}),onKeyDown:te(i.onKeyDown,b=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&b.key===" "||($h.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});qa.displayName=Cn;var Kt="SelectItemText",Ya=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=ht(Kt,n),a=mt(Kt,n),c=Ga(Kt,n),l=Wh(Kt,n),[u,d]=p.useState(null),h=oe(t,y=>d(y),c.onItemTextChange,y=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,y,c.value,c.disabled)}),m=u==null?void 0:u.textContent,v=p.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=l;return be(()=>(g(v),()=>x(v)),[g,x,v]),f.jsxs(f.Fragment,{children:[f.jsx(J.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?En.createPortal(s.children,i.valueNode):null]})});Ya.displayName=Kt;var Xa="SelectItemIndicator",Ka=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ga(Xa,n).isSelected?f.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});Ka.displayName=Xa;var lr="SelectScrollUpButton",Za=p.forwardRef((e,t)=>{const n=mt(lr,e.__scopeSelect),r=Br(lr,e.__scopeSelect),[o,s]=p.useState(!1),i=oe(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsx(Ja,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Za.displayName=lr;var cr="SelectScrollDownButton",Qa=p.forwardRef((e,t)=>{const n=mt(cr,e.__scopeSelect),r=Br(cr,e.__scopeSelect),[o,s]=p.useState(!1),i=oe(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsx(Ja,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Qa.displayName=cr;var Ja=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=mt("SelectScrollButton",n),i=p.useRef(null),a=Fn(n),c=p.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),be(()=>{var u;const l=a().find(d=>d.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),f.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:te(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:te(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:te(o.onPointerLeave,()=>{c()})})}),Jh="SelectSeparator",el=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});el.displayName=Jh;var dr="SelectArrow",em=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=zn(n),s=ht(dr,n),i=mt(dr,n);return s.open&&i.position==="popper"?f.jsx(_h,{...o,...r,ref:t}):null});em.displayName=dr;var tm="SelectBubbleInput",tl=p.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=p.useRef(null),s=oe(r,o),i=Ta(t);return p.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),f.jsx(J.select,{...n,style:{...Pa,...n.style},ref:s,defaultValue:t})});tl.displayName=tm;function nl(e){return e===""||e===void 0}function rl(e){const t=bt(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ol(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=nm(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function nm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rm=ka,sl=Ma,om=_a,sm=Ia,im=Oa,il=La,am=Ba,lm=Va,al=Ua,ll=qa,cm=Ya,dm=Ka,cl=Za,dl=Qa,ul=el;const um=rm,fm=lm,pm=om,fl=p.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(sl,{ref:r,className:O("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,f.jsx(sm,{asChild:!0,children:f.jsx(Ki,{className:"h-4 w-4 opacity-50"})})]}));fl.displayName=sl.displayName;const pl=p.forwardRef(({className:e,...t},n)=>f.jsx(cl,{ref:n,className:O("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(Zi,{className:"h-4 w-4"})}));pl.displayName=cl.displayName;const hl=p.forwardRef(({className:e,...t},n)=>f.jsx(dl,{ref:n,className:O("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(Ki,{className:"h-4 w-4"})}));hl.displayName=dl.displayName;const ml=p.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>f.jsx(im,{children:f.jsxs(il,{ref:o,className:O("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[f.jsx(pl,{}),f.jsx(am,{className:O("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),f.jsx(hl,{})]})}));ml.displayName=il.displayName;const gl=p.forwardRef(({className:e,...t},n)=>f.jsx(al,{ref:n,className:O("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));gl.displayName=al.displayName;const vl=p.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(ll,{ref:r,className:O("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(dm,{children:f.jsx(jn,{className:"h-4 w-4"})})}),f.jsx(cm,{children:t})]}));vl.displayName=ll.displayName;const yl=p.forwardRef(({className:e,...t},n)=>f.jsx(ul,{ref:n,className:O("-mx-1 my-1 h-px bg-muted",e),...t}));yl.displayName=ul.displayName;var Bn="Checkbox",[hm]=pt(Bn),[mm,Wr]=hm(Bn);function gm(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:d}=e,[h,m]=xt({prop:n,defaultProp:o??!1,onChange:c,caller:Bn}),[v,g]=p.useState(null),[x,y]=p.useState(null),b=p.useRef(!1),C=v?!!i||!!v.closest("form"):!0,S={checked:h,disabled:s,setChecked:m,control:v,setControl:g,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:b,required:l,defaultChecked:dt(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:y};return f.jsx(mm,{scope:t,...S,children:vm(d)?d(S):r})}var xl="CheckboxTrigger",bl=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:v}=Wr(xl,e),g=oe(o,u),x=p.useRef(c);return p.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const b=()=>d(x.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[s,d]),f.jsx(J.button,{type:"button",role:"checkbox","aria-checked":dt(c)?"mixed":c,"aria-required":l,"data-state":Nl(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:g,onKeyDown:te(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:te(n,y=>{d(b=>dt(b)?!0:!b),v&&m&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});bl.displayName=xl;var Vr=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:l,form:u,...d}=e;return f.jsx(gm,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>f.jsxs(f.Fragment,{children:[f.jsx(bl,{...d,ref:t,__scopeCheckbox:n}),h&&f.jsx(El,{__scopeCheckbox:n})]})})});Vr.displayName=Bn;var wl="CheckboxIndicator",Cl=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Wr(wl,n);return f.jsx(Vt,{present:r||dt(s.checked)||s.checked===!0,children:f.jsx(J.span,{"data-state":Nl(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Cl.displayName=wl;var Sl="CheckboxBubbleInput",El=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:l,value:u,form:d,bubbleInput:h,setBubbleInput:m}=Wr(Sl,e),v=oe(n,m),g=Ta(s),x=va(r);p.useEffect(()=>{const b=h;if(!b)return;const C=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(C,"checked").set,M=!o.current;if(g!==s&&R){const A=new Event("click",{bubbles:M});b.indeterminate=dt(s),R.call(b,dt(s)?!1:s),b.dispatchEvent(A)}},[h,g,s,o]);const y=p.useRef(dt(s)?!1:s);return f.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:a,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:v,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});El.displayName=Sl;function vm(e){return typeof e=="function"}function dt(e){return e==="indeterminate"}function Nl(e){return dt(e)?"indeterminate":e?"checked":"unchecked"}const Rl=p.forwardRef(({className:e,...t},n)=>f.jsx(Vr,{ref:n,className:O("peer h-4 w-4 shrink-0 rounded-sm border border-gray-200 border-gray-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-900 data-[state=checked]:text-gray-50 dark:border-gray-800 dark:border-gray-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300 dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:text-gray-900",e),...t,children:f.jsx(Cl,{className:O("flex items-center justify-center text-current"),children:f.jsx(jn,{className:"h-4 w-4"})})}));Rl.displayName=Vr.displayName;var Al="AlertDialog",[ym]=pt(Al,[ki]),rt=ki(),Tl=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return f.jsx(Gi,{...r,...n,modal:!0})};Tl.displayName=Al;var xm="AlertDialogTrigger",Pl=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return f.jsx(qi,{...o,...r,ref:t})});Pl.displayName=xm;var bm="AlertDialogPortal",kl=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return f.jsx(Yi,{...r,...n})};kl.displayName=bm;var wm="AlertDialogOverlay",Dl=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return f.jsx(Tr,{...o,...r,ref:t})});Dl.displayName=wm;var $t="AlertDialogContent",[Cm,Sm]=ym($t),Em=Nc("AlertDialogContent"),Ml=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=rt(n),i=p.useRef(null),a=oe(t,i),c=p.useRef(null);return f.jsx(Of,{contentName:$t,titleName:jl,docsSlug:"alert-dialog",children:f.jsx(Cm,{scope:n,cancelRef:c,children:f.jsxs(Pr,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:te(o.onOpenAutoFocus,l=>{var u;l.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[f.jsx(Em,{children:r}),f.jsx(Rm,{contentRef:i})]})})})});Ml.displayName=$t;var jl="AlertDialogTitle",_l=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return f.jsx(kr,{...o,...r,ref:t})});_l.displayName=jl;var Il="AlertDialogDescription",Ol=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return f.jsx(Dr,{...o,...r,ref:t})});Ol.displayName=Il;var Nm="AlertDialogAction",Ll=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return f.jsx(Mn,{...o,...r,ref:t})});Ll.displayName=Nm;var $l="AlertDialogCancel",Fl=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Sm($l,n),s=rt(n),i=oe(t,o);return f.jsx(Mn,{...s,...r,ref:i})});Fl.displayName=$l;var Rm=({contentRef:e})=>{const t=`\`${$t}\` requires a description for the component to be accessible for screen reader users.
138
+ */const gp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vp=He("x",gp),yp=oa,xp=sa,ua=ia,bp=On,Vr=f.forwardRef(({className:e,...t},n)=>p.jsx($r,{ref:n,className:F("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Vr.displayName=$r.displayName;const fa=f.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(ua,{children:[p.jsx(Vr,{}),p.jsxs(Fr,{ref:r,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,p.jsxs(On,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 cursor-pointer",children:[p.jsx(vp,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fa.displayName=Fr.displayName;const pa=({className:e,...t})=>p.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pa.displayName="DialogHeader";const ha=({className:e,...t})=>p.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ha.displayName="DialogFooter";const ma=f.forwardRef(({className:e,...t},n)=>p.jsx(zr,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));ma.displayName=zr.displayName;const ga=f.forwardRef(({className:e,...t},n)=>p.jsx(Br,{ref:n,className:F("text-sm text-gray-500",e),...t}));ga.displayName=Br.displayName;function ds(e,[t,n]){return Math.min(n,Math.max(t,e))}const wp=["top","right","bottom","left"],dt=Math.min,Ie=Math.max,Sn=Math.round,pn=Math.floor,Ze=e=>({x:e,y:e}),Sp={left:"right",right:"left",bottom:"top",top:"bottom"},Cp={start:"end",end:"start"};function pr(e,t,n){return Ie(e,dt(t,n))}function tt(e,t){return typeof e=="function"?e(t):e}function nt(e){return e.split("-")[0]}function zt(e){return e.split("-")[1]}function Hr(e){return e==="x"?"y":"x"}function Wr(e){return e==="y"?"height":"width"}const Ep=new Set(["top","bottom"]);function Ge(e){return Ep.has(nt(e))?"y":"x"}function Ur(e){return Hr(Ge(e))}function Rp(e,t,n){n===void 0&&(n=!1);const r=zt(e),o=Ur(e),s=Wr(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Cn(i)),[i,Cn(i)]}function Np(e){const t=Cn(e);return[hr(e),t,hr(t)]}function hr(e){return e.replace(/start|end/g,t=>Cp[t])}const us=["left","right"],fs=["right","left"],Ap=["top","bottom"],Tp=["bottom","top"];function Pp(e,t,n){switch(e){case"top":case"bottom":return n?t?fs:us:t?us:fs;case"left":case"right":return t?Ap:Tp;default:return[]}}function kp(e,t,n,r){const o=zt(e);let s=Pp(nt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(hr)))),s}function Cn(e){return e.replace(/left|right|bottom|top/g,t=>Sp[t])}function Mp(e){return{top:0,right:0,bottom:0,left:0,...e}}function va(e){return typeof e!="number"?Mp(e):{top:e,right:e,bottom:e,left:e}}function En(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ps(e,t,n){let{reference:r,floating:o}=e;const s=Ge(t),i=Ur(t),a=Wr(i),c=nt(t),l=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(zt(t)){case"start":m[i]-=h*(n&&l?-1:1);break;case"end":m[i]+=h*(n&&l?-1:1);break}return m}const Dp=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=ps(l,r,c),h=r,m={},v=0;for(let g=0;g<a.length;g++){const{name:y,fn:x}=a[g],{x:b,y:S,data:C,reset:E}=await x({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:t}});u=b??u,d=S??d,m={...m,[y]:{...m[y],...C}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=ps(l,h,c)),g=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:m}};async function Xt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=tt(t,e),v=va(m),y=a[h?d==="floating"?"reference":"floating":d],x=En(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),b=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=En(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:c}):b);return{top:(x.top-E.top+v.top)/C.y,bottom:(E.bottom-x.bottom+v.bottom)/C.y,left:(x.left-E.left+v.left)/C.x,right:(E.right-x.right+v.right)/C.x}}const jp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=tt(e,t)||{};if(l==null)return{};const d=va(u),h={x:n,y:r},m=Ur(o),v=Wr(m),g=await i.getDimensions(l),y=m==="y",x=y?"top":"left",b=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[m]-h[m]-s.floating[v],E=h[m]-s.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let R=T?T[S]:0;(!R||!await(i.isElement==null?void 0:i.isElement(T)))&&(R=a.floating[S]||s.floating[v]);const $=C/2-E/2,V=R/2-g[v]/2-1,z=dt(d[x],V),j=dt(d[b],V),P=z,O=R-g[v]-j,D=R/2-g[v]/2+$,M=pr(P,D,O),A=!c.arrow&&zt(o)!=null&&D!==M&&s.reference[v]/2-(D<P?z:j)-g[v]/2<0,k=A?D<P?D-P:D-O:0;return{[m]:h[m]+k,data:{[m]:M,centerOffset:D-M-k,...A&&{alignmentOffset:k}},reset:A}}}),Ip=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=tt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=nt(o),b=Ge(a),S=nt(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=h||(S||!g?[Cn(a)]:Np(a)),T=v!=="none";!h&&T&&E.push(...kp(a,g,v,C));const R=[a,...E],$=await Xt(t,y),V=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&V.push($[x]),d){const D=Rp(o,i,C);V.push($[D[0]],$[D[1]])}if(z=[...z,{placement:o,overflows:V}],!V.every(D=>D<=0)){var j,P;const D=(((j=s.flip)==null?void 0:j.index)||0)+1,M=R[D];if(M&&(!(d==="alignment"?b!==Ge(M):!1)||z.every(N=>Ge(N.placement)===b?N.overflows[0]>0:!0)))return{data:{index:D,overflows:z},reset:{placement:M}};let A=(P=z.filter(k=>k.overflows[0]<=0).sort((k,N)=>k.overflows[1]-N.overflows[1])[0])==null?void 0:P.placement;if(!A)switch(m){case"bestFit":{var O;const k=(O=z.filter(N=>{if(T){const I=Ge(N.placement);return I===b||I==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(I=>I>0).reduce((I,W)=>I+W,0)]).sort((N,I)=>N[1]-I[1])[0])==null?void 0:O[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function hs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ms(e){return wp.some(t=>e[t]>=0)}const _p=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=tt(e,t);switch(r){case"referenceHidden":{const s=await Xt(t,{...o,elementContext:"reference"}),i=hs(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ms(i)}}}case"escaped":{const s=await Xt(t,{...o,altBoundary:!0}),i=hs(s,n.floating);return{data:{escapedOffsets:i,escaped:ms(i)}}}default:return{}}}}},ya=new Set(["left","top"]);async function Op(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=nt(n),a=zt(n),c=Ge(n)==="y",l=ya.has(i)?-1:1,u=s&&c?-1:1,d=tt(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),c?{x:m*u,y:h*l}:{x:h*l,y:m*u}}const Lp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Op(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},$p=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...c}=tt(e,t),l={x:n,y:r},u=await Xt(t,c),d=Ge(nt(o)),h=Hr(d);let m=l[h],v=l[d];if(s){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=m+u[y],S=m-u[x];m=pr(b,m,S)}if(i){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=v+u[y],S=v-u[x];v=pr(b,v,S)}const g=a.fn({...t,[h]:m,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[d]:i}}}}}},Fp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=tt(e,t),u={x:n,y:r},d=Ge(o),h=Hr(d);let m=u[h],v=u[d];const g=tt(a,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const S=h==="y"?"height":"width",C=s.reference[h]-s.floating[S]+y.mainAxis,E=s.reference[h]+s.reference[S]-y.mainAxis;m<C?m=C:m>E&&(m=E)}if(l){var x,b;const S=h==="y"?"width":"height",C=ya.has(nt(o)),E=s.reference[d]-s.floating[S]+(C&&((x=i.offset)==null?void 0:x[d])||0)+(C?0:y.crossAxis),T=s.reference[d]+s.reference[S]+(C?0:((b=i.offset)==null?void 0:b[d])||0)-(C?y.crossAxis:0);v<E?v=E:v>T&&(v=T)}return{[h]:m,[d]:v}}}},zp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=tt(e,t),u=await Xt(t,l),d=nt(o),h=zt(o),m=Ge(o)==="y",{width:v,height:g}=s.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=d,y=h==="end"?"top":"bottom");const b=g-u.top-u.bottom,S=v-u.left-u.right,C=dt(g-u[y],b),E=dt(v-u[x],S),T=!t.middlewareData.shift;let R=C,$=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=b),T&&!h){const z=Ie(u.left,0),j=Ie(u.right,0),P=Ie(u.top,0),O=Ie(u.bottom,0);m?$=v-2*(z!==0||j!==0?z+j:Ie(u.left,u.right)):R=g-2*(P!==0||O!==0?P+O:Ie(u.top,u.bottom))}await c({...t,availableWidth:$,availableHeight:R});const V=await i.getDimensions(a.floating);return v!==V.width||g!==V.height?{reset:{rects:!0}}:{}}}};function Ln(){return typeof window<"u"}function Bt(e){return xa(e)?(e.nodeName||"").toLowerCase():"#document"}function _e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(xa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xa(e){return Ln()?e instanceof Node||e instanceof _e(e).Node:!1}function Fe(e){return Ln()?e instanceof Element||e instanceof _e(e).Element:!1}function qe(e){return Ln()?e instanceof HTMLElement||e instanceof _e(e).HTMLElement:!1}function gs(e){return!Ln()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _e(e).ShadowRoot}const Bp=new Set(["inline","contents"]);function tn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ze(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Bp.has(o)}const Vp=new Set(["table","td","th"]);function Hp(e){return Vp.has(Bt(e))}const Wp=[":popover-open",":modal"];function $n(e){return Wp.some(t=>{try{return e.matches(t)}catch{return!1}})}const Up=["transform","translate","scale","rotate","perspective"],Gp=["transform","translate","scale","rotate","perspective","filter"],Zp=["paint","layout","strict","content"];function Gr(e){const t=Zr(),n=Fe(e)?ze(e):e;return Up.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Gp.some(r=>(n.willChange||"").includes(r))||Zp.some(r=>(n.contain||"").includes(r))}function qp(e){let t=ut(e);for(;qe(t)&&!Ot(t);){if(Gr(t))return t;if($n(t))return null;t=ut(t)}return null}function Zr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Yp=new Set(["html","body","#document"]);function Ot(e){return Yp.has(Bt(e))}function ze(e){return _e(e).getComputedStyle(e)}function Fn(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ut(e){if(Bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gs(e)&&e.host||Ke(e);return gs(t)?t.host:t}function ba(e){const t=ut(e);return Ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&tn(t)?t:ba(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ba(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=_e(o);if(s){const a=mr(i);return t.concat(i,i.visualViewport||[],tn(o)?o:[],a&&n?Qt(a):[])}return t.concat(o,Qt(o,[],n))}function mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wa(e){const t=ze(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Sn(n)!==s||Sn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function qr(e){return Fe(e)?e:e.contextElement}function jt(e){const t=qr(e);if(!qe(t))return Ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=wa(t);let i=(s?Sn(n.width):n.width)/r,a=(s?Sn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Kp=Ze(0);function Sa(e){const t=_e(e);return!Zr()||!t.visualViewport?Kp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_e(e)?!1:t}function wt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=qr(e);let i=Ze(1);t&&(r?Fe(r)&&(i=jt(r)):i=jt(e));const a=Xp(s,n,r)?Sa(s):Ze(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=_e(s),m=r&&Fe(r)?_e(r):r;let v=h,g=mr(v);for(;g&&r&&m!==v;){const y=jt(g),x=g.getBoundingClientRect(),b=ze(g),S=x.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,C=x.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,d*=y.y,c+=S,l+=C,v=_e(g),g=mr(v)}}return En({width:u,height:d,x:c,y:l})}function zn(e,t){const n=Fn(e).scrollLeft;return t?t.left+n:wt(Ke(e)).left+n}function Ca(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-zn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Qp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ke(r),a=t?$n(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ze(1);const u=Ze(0),d=qe(r);if((d||!d&&!s)&&((Bt(r)!=="body"||tn(i))&&(c=Fn(r)),qe(r))){const m=wt(r);l=jt(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=i&&!d&&!s?Ca(i,c):Ze(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-c.scrollTop*l.y+u.y+h.y}}function Jp(e){return Array.from(e.getClientRects())}function eh(e){const t=Ke(e),n=Fn(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+zn(e);const a=-n.scrollTop;return ze(r).direction==="rtl"&&(i+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const vs=25;function th(e,t){const n=_e(e),r=Ke(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const u=Zr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=zn(r);if(l<=0){const u=r.ownerDocument,d=u.body,h=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-m);v<=vs&&(s-=v)}else l<=vs&&(s+=l);return{width:s,height:i,x:a,y:c}}const nh=new Set(["absolute","fixed"]);function rh(e,t){const n=wt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=qe(e)?jt(e):Ze(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function ys(e,t,n){let r;if(t==="viewport")r=th(e,n);else if(t==="document")r=eh(Ke(e));else if(Fe(t))r=rh(t,n);else{const o=Sa(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return En(r)}function Ea(e,t){const n=ut(e);return n===t||!Fe(n)||Ot(n)?!1:ze(n).position==="fixed"||Ea(n,t)}function oh(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(a=>Fe(a)&&Bt(a)!=="body"),o=null;const s=ze(e).position==="fixed";let i=s?ut(e):e;for(;Fe(i)&&!Ot(i);){const a=ze(i),c=Gr(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&nh.has(o.position)||tn(i)&&!c&&Ea(e,i))?r=r.filter(u=>u!==i):o=a,i=ut(i)}return t.set(e,r),r}function sh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?$n(t)?[]:oh(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,u)=>{const d=ys(t,u,o);return l.top=Ie(d.top,l.top),l.right=dt(d.right,l.right),l.bottom=dt(d.bottom,l.bottom),l.left=Ie(d.left,l.left),l},ys(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ih(e){const{width:t,height:n}=wa(e);return{width:t,height:n}}function ah(e,t,n){const r=qe(t),o=Ke(t),s=n==="fixed",i=wt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ze(0);function l(){c.x=zn(o)}if(r||!r&&!s)if((Bt(t)!=="body"||tn(o))&&(a=Fn(t)),r){const m=wt(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?Ca(o,a):Ze(0),d=i.left+a.scrollLeft-c.x-u.x,h=i.top+a.scrollTop-c.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function sr(e){return ze(e).position==="static"}function xs(e,t){if(!qe(e)||ze(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ke(e)===n&&(n=n.ownerDocument.body),n}function Ra(e,t){const n=_e(e);if($n(e))return n;if(!qe(e)){let o=ut(e);for(;o&&!Ot(o);){if(Fe(o)&&!sr(o))return o;o=ut(o)}return n}let r=xs(e,t);for(;r&&Hp(r)&&sr(r);)r=xs(r,t);return r&&Ot(r)&&sr(r)&&!Gr(r)?n:r||qp(e)||n}const lh=async function(e){const t=this.getOffsetParent||Ra,n=this.getDimensions,r=await n(e.floating);return{reference:ah(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ch(e){return ze(e).direction==="rtl"}const dh={convertOffsetParentRelativeRectToViewportRelativeRect:Qp,getDocumentElement:Ke,getClippingRect:sh,getOffsetParent:Ra,getElementRects:lh,getClientRects:Jp,getDimensions:ih,getScale:jt,isElement:Fe,isRTL:ch};function Na(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uh(e,t){let n=null,r;const o=Ke(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:h,height:m}=l;if(a||t(),!h||!m)return;const v=pn(d),g=pn(o.clientWidth-(u+h)),y=pn(o.clientHeight-(d+m)),x=pn(u),S={rootMargin:-v+"px "+-g+"px "+-y+"px "+-x+"px",threshold:Ie(0,dt(1,c))||1};let C=!0;function E(T){const R=T[0].intersectionRatio;if(R!==c){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Na(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return i(!0),s}function fh(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=qr(e),u=o||s?[...l?Qt(l):[],...Qt(t)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=l&&a?uh(l,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(x=>{let[b]=x;b&&b.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let v,g=c?wt(e):null;c&&y();function y(){const x=wt(e);g&&!Na(g,x)&&n(),g=x,v=requestAnimationFrame(y)}return n(),()=>{var x;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const ph=Lp,hh=$p,mh=Ip,gh=zp,vh=_p,bs=jp,yh=Fp,xh=(e,t,n)=>{const r=new Map,o={platform:dh,...n},s={...o.platform,_c:r};return Dp(e,t,{...o,platform:s})};var bh=typeof document<"u",wh=function(){},vn=bh?w.useLayoutEffect:wh;function Rn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Rn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Aa(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ws(e,t){const n=Aa(e);return Math.round(t*n)/n}function ir(e){const t=f.useRef(e);return vn(()=>{t.current=e}),t}function Sh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(r);Rn(h,r)||m(r);const[v,g]=f.useState(null),[y,x]=f.useState(null),b=f.useCallback(N=>{N!==T.current&&(T.current=N,g(N))},[]),S=f.useCallback(N=>{N!==R.current&&(R.current=N,x(N))},[]),C=s||v,E=i||y,T=f.useRef(null),R=f.useRef(null),$=f.useRef(u),V=c!=null,z=ir(c),j=ir(o),P=ir(l),O=f.useCallback(()=>{if(!T.current||!R.current)return;const N={placement:t,strategy:n,middleware:h};j.current&&(N.platform=j.current),xh(T.current,R.current,N).then(I=>{const W={...I,isPositioned:P.current!==!1};D.current&&!Rn($.current,W)&&($.current=W,Tn.flushSync(()=>{d(W)}))})},[h,t,n,j,P]);vn(()=>{l===!1&&$.current.isPositioned&&($.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[l]);const D=f.useRef(!1);vn(()=>(D.current=!0,()=>{D.current=!1}),[]),vn(()=>{if(C&&(T.current=C),E&&(R.current=E),C&&E){if(z.current)return z.current(C,E,O);O()}},[C,E,O,z,V]);const M=f.useMemo(()=>({reference:T,floating:R,setReference:b,setFloating:S}),[b,S]),A=f.useMemo(()=>({reference:C,floating:E}),[C,E]),k=f.useMemo(()=>{const N={position:n,left:0,top:0};if(!A.floating)return N;const I=ws(A.floating,u.x),W=ws(A.floating,u.y);return a?{...N,transform:"translate("+I+"px, "+W+"px)",...Aa(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:W}},[n,a,A.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:O,refs:M,elements:A,floatingStyles:k}),[u,O,M,A,k])}const Ch=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?bs({element:r.current,padding:o}).fn(n):{}:r?bs({element:r,padding:o}).fn(n):{}}}},Eh=(e,t)=>({...ph(e),options:[e,t]}),Rh=(e,t)=>({...hh(e),options:[e,t]}),Nh=(e,t)=>({...yh(e),options:[e,t]}),Ah=(e,t)=>({...mh(e),options:[e,t]}),Th=(e,t)=>({...gh(e),options:[e,t]}),Ph=(e,t)=>({...vh(e),options:[e,t]}),kh=(e,t)=>({...Ch(e),options:[e,t]});var Mh="Arrow",Ta=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(oe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ta.displayName=Mh;var Dh=Ta;function Pa(e){const[t,n]=f.useState(void 0);return Ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yr="Popper",[ka,Ma]=ft(Yr),[jh,Da]=ka(Yr),ja=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return p.jsx(jh,{scope:t,anchor:r,onAnchorChange:o,children:n})};ja.displayName=Yr;var Ia="PopperAnchor",_a=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Da(Ia,n),i=f.useRef(null),a=fe(t,i),c=f.useRef(null);return f.useEffect(()=>{const l=c.current;c.current=(r==null?void 0:r.current)||i.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:p.jsx(oe.div,{...o,ref:a})});_a.displayName=Ia;var Kr="PopperContent",[Ih,_h]=ka(Kr),Oa=f.forwardRef((e,t)=>{var _,B,ee,Y,K,q;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:v,...g}=e,y=Da(Kr,n),[x,b]=f.useState(null),S=fe(t,de=>b(de)),[C,E]=f.useState(null),T=Pa(C),R=(T==null?void 0:T.width)??0,$=(T==null?void 0:T.height)??0,V=r+(s!=="center"?"-"+s:""),z=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],P=j.length>0,O={padding:z,boundary:j.filter(Lh),altBoundary:P},{refs:D,floatingStyles:M,placement:A,isPositioned:k,middlewareData:N}=Sh({strategy:"fixed",placement:V,whileElementsMounted:(...de)=>fh(...de,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Eh({mainAxis:o+$,alignmentAxis:i}),c&&Rh({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Nh():void 0,...O}),c&&Ah({...O}),Th({...O,apply:({elements:de,rects:ye,availableWidth:De,availableHeight:Oe})=>{const{width:je,height:ke}=ye.reference,Re=de.floating.style;Re.setProperty("--radix-popper-available-width",`${De}px`),Re.setProperty("--radix-popper-available-height",`${Oe}px`),Re.setProperty("--radix-popper-anchor-width",`${je}px`),Re.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),C&&kh({element:C,padding:a}),$h({arrowWidth:R,arrowHeight:$}),h&&Ph({strategy:"referenceHidden",...O})]}),[I,W]=Fa(A),H=xt(v);Ee(()=>{k&&(H==null||H())},[k,H]);const ae=(_=N.arrow)==null?void 0:_.x,U=(B=N.arrow)==null?void 0:B.y,X=((ee=N.arrow)==null?void 0:ee.centerOffset)!==0,[se,pe]=f.useState();return Ee(()=>{x&&pe(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:k?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Y=N.transformOrigin)==null?void 0:Y.x,(K=N.transformOrigin)==null?void 0:K.y].join(" "),...((q=N.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ih,{scope:n,placedSide:I,onArrowChange:E,arrowX:ae,arrowY:U,shouldHideArrow:X,children:p.jsx(oe.div,{"data-side":I,"data-align":W,...g,ref:S,style:{...g.style,animation:k?void 0:"none"}})})})});Oa.displayName=Kr;var La="PopperArrow",Oh={top:"bottom",right:"left",bottom:"top",left:"right"},$a=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_h(La,r),i=Oh[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Dh,{...o,ref:n,style:{...o.style,display:"block"}})})});$a.displayName=La;function Lh(e){return e!==null}var $h=e=>({name:"transformOrigin",options:e,fn(t){var y,x,b;const{placement:n,rects:r,middlewareData:o}=t,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=Fa(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let v="",g="";return l==="bottom"?(v=i?d:`${h}px`,g=`${-c}px`):l==="top"?(v=i?d:`${h}px`,g=`${r.floating.height+c}px`):l==="right"?(v=`${-c}px`,g=i?d:`${m}px`):l==="left"&&(v=`${r.floating.width+c}px`,g=i?d:`${m}px`),{data:{x:v,y:g}}}});function Fa(e){const[t,n="center"]=e.split("-");return[t,n]}var Fh=ja,zh=_a,Bh=Oa,Vh=$a;function za(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ba=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hh="VisuallyHidden",Wh=f.forwardRef((e,t)=>p.jsx(oe.span,{...e,ref:t,style:{...Ba,...e.style}}));Wh.displayName=Hh;var Uh=[" ","Enter","ArrowUp","ArrowDown"],Gh=[" ","Enter"],St="Select",[Bn,Vn,Zh]=si(St),[Vt]=ft(St,[Zh,Ma]),Hn=Ma(),[qh,pt]=Vt(St),[Yh,Kh]=Vt(St),Va=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:h,required:m,form:v}=e,g=Hn(t),[y,x]=f.useState(null),[b,S]=f.useState(null),[C,E]=f.useState(!1),T=ui(l),[R,$]=yt({prop:r,defaultProp:o??!1,onChange:s,caller:St}),[V,z]=yt({prop:i,defaultProp:a,onChange:c,caller:St}),j=f.useRef(null),P=y?v||!!y.closest("form"):!0,[O,D]=f.useState(new Set),M=Array.from(O).map(A=>A.props.value).join(";");return p.jsx(Fh,{...g,children:p.jsxs(qh,{required:m,scope:t,trigger:y,onTriggerChange:x,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:E,contentId:lt(),value:V,onValueChange:z,open:R,onOpenChange:$,dir:T,triggerPointerDownPosRef:j,disabled:h,children:[p.jsx(Bn.Provider,{scope:t,children:p.jsx(Yh,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(A=>{D(k=>new Set(k).add(A))},[]),onNativeOptionRemove:f.useCallback(A=>{D(k=>{const N=new Set(k);return N.delete(A),N})},[]),children:n})}),P?p.jsxs(pl,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:d,value:V,onChange:A=>z(A.target.value),disabled:h,form:v,children:[V===void 0?p.jsx("option",{value:""}):null,Array.from(O)]},M):null]})})};Va.displayName=St;var Ha="SelectTrigger",Wa=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Hn(n),i=pt(Ha,n),a=i.disabled||r,c=fe(t,i.onTriggerChange),l=Vn(n),u=f.useRef("touch"),[d,h,m]=ml(g=>{const y=l().filter(S=>!S.disabled),x=y.find(S=>S.value===i.value),b=gl(y,g,x);b!==void 0&&i.onValueChange(b.value)}),v=g=>{a||(i.onOpenChange(!0),m()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(zh,{asChild:!0,...s,children:p.jsx(oe.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":hl(i.value)?"":void 0,...o,ref:c,onClick:ce(o.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&v(g)}),onPointerDown:ce(o.onPointerDown,g=>{u.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:ce(o.onKeyDown,g=>{const y=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(y&&g.key===" ")&&Uh.includes(g.key)&&(v(),g.preventDefault())})})})});Wa.displayName=Ha;var Ua="SelectValue",Ga=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=pt(Ua,n),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,d=fe(t,c.onValueNodeChange);return Ee(()=>{l(u)},[l,u]),p.jsx(oe.span,{...a,ref:d,style:{pointerEvents:"none"},children:hl(c.value)?p.jsx(p.Fragment,{children:i}):s})});Ga.displayName=Ua;var Xh="SelectIcon",Za=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(oe.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Za.displayName=Xh;var Qh="SelectPortal",qa=e=>p.jsx(jr,{asChild:!0,...e});qa.displayName=Qh;var Ct="SelectContent",Ya=f.forwardRef((e,t)=>{const n=pt(Ct,e.__scopeSelect),[r,o]=f.useState();if(Ee(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Tn.createPortal(p.jsx(Ka,{scope:e.__scopeSelect,children:p.jsx(Bn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Xa,{...e,ref:t})});Ya.displayName=Ct;var $e=10,[Ka,ht]=Vt(Ct),Jh="SelectContentImpl",em=_t("SelectContent.RemoveScroll"),Xa=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y,...x}=e,b=pt(Ct,n),[S,C]=f.useState(null),[E,T]=f.useState(null),R=fe(t,_=>C(_)),[$,V]=f.useState(null),[z,j]=f.useState(null),P=Vn(n),[O,D]=f.useState(!1),M=f.useRef(!1);f.useEffect(()=>{if(S)return zi(S)},[S]),Mi();const A=f.useCallback(_=>{const[B,...ee]=P().map(q=>q.ref.current),[Y]=ee.slice(-1),K=document.activeElement;for(const q of _)if(q===K||(q==null||q.scrollIntoView({block:"nearest"}),q===B&&E&&(E.scrollTop=0),q===Y&&E&&(E.scrollTop=E.scrollHeight),q==null||q.focus(),document.activeElement!==K))return},[P,E]),k=f.useCallback(()=>A([$,S]),[A,$,S]);f.useEffect(()=>{O&&k()},[O,k]);const{onOpenChange:N,triggerPointerDownPosRef:I}=b;f.useEffect(()=>{if(S){let _={x:0,y:0};const B=Y=>{var K,q;_={x:Math.abs(Math.round(Y.pageX)-(((K=I.current)==null?void 0:K.x)??0)),y:Math.abs(Math.round(Y.pageY)-(((q=I.current)==null?void 0:q.y)??0))}},ee=Y=>{_.x<=10&&_.y<=10?Y.preventDefault():S.contains(Y.target)||N(!1),document.removeEventListener("pointermove",B),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",ee,{capture:!0})}}},[S,N,I]),f.useEffect(()=>{const _=()=>N(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[N]);const[W,H]=ml(_=>{const B=P().filter(K=>!K.disabled),ee=B.find(K=>K.ref.current===document.activeElement),Y=gl(B,_,ee);Y&&setTimeout(()=>Y.ref.current.focus())}),ae=f.useCallback((_,B,ee)=>{const Y=!M.current&&!ee;(b.value!==void 0&&b.value===B||Y)&&(V(_),Y&&(M.current=!0))},[b.value]),U=f.useCallback(()=>S==null?void 0:S.focus(),[S]),X=f.useCallback((_,B,ee)=>{const Y=!M.current&&!ee;(b.value!==void 0&&b.value===B||Y)&&j(_)},[b.value]),se=r==="popper"?gr:Qa,pe=se===gr?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return p.jsx(Ka,{scope:n,content:S,viewport:E,onViewportChange:T,itemRefCallback:ae,selectedItem:$,onItemLeave:U,itemTextRefCallback:X,focusSelectedItem:k,selectedItemText:z,position:r,isPositioned:O,searchRef:W,children:p.jsx(Ir,{as:em,allowPinchZoom:!0,children:p.jsx(Dr,{asChild:!0,trapped:b.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:ce(o,_=>{var B;(B=b.trigger)==null||B.focus({preventScroll:!0}),_.preventDefault()}),children:p.jsx(Mr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:p.jsx(se,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:_=>_.preventDefault(),...x,...pe,onPlaced:()=>D(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:ce(x.onKeyDown,_=>{const B=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!B&&_.key.length===1&&H(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let Y=P().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(_.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const K=_.target,q=Y.indexOf(K);Y=Y.slice(q+1)}setTimeout(()=>A(Y)),_.preventDefault()}})})})})})})});Xa.displayName=Jh;var tm="SelectItemAlignedPosition",Qa=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=pt(Ct,n),i=ht(Ct,n),[a,c]=f.useState(null),[l,u]=f.useState(null),d=fe(t,R=>u(R)),h=Vn(n),m=f.useRef(!1),v=f.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:x,focusSelectedItem:b}=i,S=f.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&g&&y&&x){const R=s.trigger.getBoundingClientRect(),$=l.getBoundingClientRect(),V=s.valueNode.getBoundingClientRect(),z=x.getBoundingClientRect();if(s.dir!=="rtl"){const K=z.left-$.left,q=V.left-K,de=R.left-q,ye=R.width+de,De=Math.max(ye,$.width),Oe=window.innerWidth-$e,je=ds(q,[$e,Math.max($e,Oe-De)]);a.style.minWidth=ye+"px",a.style.left=je+"px"}else{const K=$.right-z.right,q=window.innerWidth-V.right-K,de=window.innerWidth-R.right-q,ye=R.width+de,De=Math.max(ye,$.width),Oe=window.innerWidth-$e,je=ds(q,[$e,Math.max($e,Oe-De)]);a.style.minWidth=ye+"px",a.style.right=je+"px"}const j=h(),P=window.innerHeight-$e*2,O=g.scrollHeight,D=window.getComputedStyle(l),M=parseInt(D.borderTopWidth,10),A=parseInt(D.paddingTop,10),k=parseInt(D.borderBottomWidth,10),N=parseInt(D.paddingBottom,10),I=M+A+O+N+k,W=Math.min(y.offsetHeight*5,I),H=window.getComputedStyle(g),ae=parseInt(H.paddingTop,10),U=parseInt(H.paddingBottom,10),X=R.top+R.height/2-$e,se=P-X,pe=y.offsetHeight/2,_=y.offsetTop+pe,B=M+A+_,ee=I-B;if(B<=X){const K=j.length>0&&y===j[j.length-1].ref.current;a.style.bottom="0px";const q=l.clientHeight-g.offsetTop-g.offsetHeight,de=Math.max(se,pe+(K?U:0)+q+k),ye=B+de;a.style.height=ye+"px"}else{const K=j.length>0&&y===j[0].ref.current;a.style.top="0px";const de=Math.max(X,M+g.offsetTop+(K?ae:0)+pe)+ee;a.style.height=de+"px",g.scrollTop=B-X+g.offsetTop}a.style.margin=`${$e}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,l,g,y,x,s.dir,r]);Ee(()=>S(),[S]);const[C,E]=f.useState();Ee(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const T=f.useCallback(R=>{R&&v.current===!0&&(S(),b==null||b(),v.current=!1)},[S,b]);return p.jsx(rm,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(oe.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Qa.displayName=tm;var nm="SelectPopperPosition",gr=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=$e,...s}=e,i=Hn(n);return p.jsx(Bh,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gr.displayName=nm;var[rm,Xr]=Vt(Ct,{}),vr="SelectViewport",Ja=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=ht(vr,n),i=Xr(vr,n),a=fe(t,s.onViewportChange),c=f.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Bn.Slot,{scope:n,children:p.jsx(oe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ce(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const m=Math.abs(c.current-u.scrollTop);if(m>0){const v=window.innerHeight-$e*2,g=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),x=Math.max(g,y);if(x<v){const b=x+m,S=Math.min(v,b),C=b-S;d.style.height=S+"px",d.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Ja.displayName=vr;var el="SelectGroup",[om,sm]=Vt(el),tl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=lt();return p.jsx(om,{scope:n,id:o,children:p.jsx(oe.div,{role:"group","aria-labelledby":o,...r,ref:t})})});tl.displayName=el;var nl="SelectLabel",rl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=sm(nl,n);return p.jsx(oe.div,{id:o.id,...r,ref:t})});rl.displayName=nl;var Nn="SelectItem",[im,ol]=Vt(Nn),sl=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=pt(Nn,n),c=ht(Nn,n),l=a.value===r,[u,d]=f.useState(s??""),[h,m]=f.useState(!1),v=fe(t,b=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,b,r,o)}),g=lt(),y=f.useRef("touch"),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(im,{scope:n,value:r,disabled:o,textId:g,isSelected:l,onItemTextChange:f.useCallback(b=>{d(S=>S||((b==null?void 0:b.textContent)??"").trim())},[]),children:p.jsx(Bn.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:p.jsx(oe.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:ce(i.onFocus,()=>m(!0)),onBlur:ce(i.onBlur,()=>m(!1)),onClick:ce(i.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:ce(i.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:ce(i.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:ce(i.onPointerMove,b=>{var S;y.current=b.pointerType,o?(S=c.onItemLeave)==null||S.call(c):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(i.onPointerLeave,b=>{var S;b.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:ce(i.onKeyDown,b=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&b.key===" "||(Gh.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});sl.displayName=Nn;var Yt="SelectItemText",il=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=pt(Yt,n),a=ht(Yt,n),c=ol(Yt,n),l=Kh(Yt,n),[u,d]=f.useState(null),h=fe(t,x=>d(x),c.onItemTextChange,x=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,x,c.value,c.disabled)}),m=u==null?void 0:u.textContent,v=f.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=l;return Ee(()=>(g(v),()=>y(v)),[g,y,v]),p.jsxs(p.Fragment,{children:[p.jsx(oe.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Tn.createPortal(s.children,i.valueNode):null]})});il.displayName=Yt;var al="SelectItemIndicator",ll=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ol(al,n).isSelected?p.jsx(oe.span,{"aria-hidden":!0,...r,ref:t}):null});ll.displayName=al;var yr="SelectScrollUpButton",cl=f.forwardRef((e,t)=>{const n=ht(yr,e.__scopeSelect),r=Xr(yr,e.__scopeSelect),[o,s]=f.useState(!1),i=fe(t,r.onScrollButtonChange);return Ee(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(ul,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});cl.displayName=yr;var xr="SelectScrollDownButton",dl=f.forwardRef((e,t)=>{const n=ht(xr,e.__scopeSelect),r=Xr(xr,e.__scopeSelect),[o,s]=f.useState(!1),i=fe(t,r.onScrollButtonChange);return Ee(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(ul,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});dl.displayName=xr;var ul=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=ht("SelectScrollButton",n),i=f.useRef(null),a=Vn(n),c=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),Ee(()=>{var u;const l=a().find(d=>d.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(oe.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ce(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ce(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ce(o.onPointerLeave,()=>{c()})})}),am="SelectSeparator",fl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(oe.div,{"aria-hidden":!0,...r,ref:t})});fl.displayName=am;var br="SelectArrow",lm=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hn(n),s=pt(br,n),i=ht(br,n);return s.open&&i.position==="popper"?p.jsx(Vh,{...o,...r,ref:t}):null});lm.displayName=br;var cm="SelectBubbleInput",pl=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),s=fe(r,o),i=za(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),p.jsx(oe.select,{...n,style:{...Ba,...n.style},ref:s,defaultValue:t})});pl.displayName=cm;function hl(e){return e===""||e===void 0}function ml(e){const t=xt(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function gl(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=dm(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function dm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var um=Va,vl=Wa,fm=Ga,pm=Za,hm=qa,yl=Ya,mm=Ja,gm=tl,xl=rl,bl=sl,vm=il,ym=ll,wl=cl,Sl=dl,Cl=fl;const xm=um,bm=gm,wm=fm,El=f.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(vl,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(pm,{asChild:!0,children:p.jsx(la,{className:"h-4 w-4 opacity-50"})})]}));El.displayName=vl.displayName;const Rl=f.forwardRef(({className:e,...t},n)=>p.jsx(wl,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(ca,{className:"h-4 w-4"})}));Rl.displayName=wl.displayName;const Nl=f.forwardRef(({className:e,...t},n)=>p.jsx(Sl,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(la,{className:"h-4 w-4"})}));Nl.displayName=Sl.displayName;const Al=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(hm,{children:p.jsxs(yl,{ref:o,className:F("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(Rl,{}),p.jsx(mm,{className:F("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(Nl,{})]})}));Al.displayName=yl.displayName;const Tl=f.forwardRef(({className:e,...t},n)=>p.jsx(xl,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Tl.displayName=xl.displayName;const Pl=f.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(bl,{ref:r,className:F("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ym,{children:p.jsx(en,{className:"h-4 w-4"})})}),p.jsx(vm,{children:t})]}));Pl.displayName=bl.displayName;const kl=f.forwardRef(({className:e,...t},n)=>p.jsx(Cl,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));kl.displayName=Cl.displayName;var Wn="Checkbox",[Sm]=ft(Wn),[Cm,Qr]=Sm(Wn);function Em(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:d}=e,[h,m]=yt({prop:n,defaultProp:o??!1,onChange:c,caller:Wn}),[v,g]=f.useState(null),[y,x]=f.useState(null),b=f.useRef(!1),S=v?!!i||!!v.closest("form"):!0,C={checked:h,disabled:s,setChecked:m,control:v,setControl:g,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:b,required:l,defaultChecked:ct(o)?!1:o,isFormControl:S,bubbleInput:y,setBubbleInput:x};return p.jsx(Cm,{scope:t,...C,children:Rm(d)?d(C):r})}var Ml="CheckboxTrigger",Dl=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:v}=Qr(Ml,e),g=fe(o,u),y=f.useRef(c);return f.useEffect(()=>{const x=s==null?void 0:s.form;if(x){const b=()=>d(y.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[s,d]),p.jsx(oe.button,{type:"button",role:"checkbox","aria-checked":ct(c)?"mixed":c,"aria-required":l,"data-state":Ll(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:g,onKeyDown:ce(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:ce(n,x=>{d(b=>ct(b)?!0:!b),v&&m&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Dl.displayName=Ml;var Jr=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:l,form:u,...d}=e;return p.jsx(Em,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(Dl,{...d,ref:t,__scopeCheckbox:n}),h&&p.jsx(Ol,{__scopeCheckbox:n})]})})});Jr.displayName=Wn;var jl="CheckboxIndicator",Il=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Qr(jl,n);return p.jsx(Ft,{present:r||ct(s.checked)||s.checked===!0,children:p.jsx(oe.span,{"data-state":Ll(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Il.displayName=jl;var _l="CheckboxBubbleInput",Ol=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:l,value:u,form:d,bubbleInput:h,setBubbleInput:m}=Qr(_l,e),v=fe(n,m),g=za(s),y=Pa(r);f.useEffect(()=>{const b=h;if(!b)return;const S=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(S,"checked").set,T=!o.current;if(g!==s&&E){const R=new Event("click",{bubbles:T});b.indeterminate=ct(s),E.call(b,ct(s)?!1:s),b.dispatchEvent(R)}},[h,g,s,o]);const x=f.useRef(ct(s)?!1:s);return p.jsx(oe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:a,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:v,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ol.displayName=_l;function Rm(e){return typeof e=="function"}function ct(e){return e==="indeterminate"}function Ll(e){return ct(e)?"indeterminate":e?"checked":"unchecked"}const $l=f.forwardRef(({className:e,...t},n)=>p.jsx(Jr,{ref:n,className:F("peer h-4 w-4 shrink-0 rounded-sm border border-gray-200 border-gray-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-900 data-[state=checked]:text-gray-50 dark:border-gray-800 dark:border-gray-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300 dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:text-gray-900",e),...t,children:p.jsx(Il,{className:F("flex items-center justify-center text-current"),children:p.jsx(en,{className:"h-4 w-4"})})}));$l.displayName=Jr.displayName;var Fl="AlertDialog",[Nm]=ft(Fl,[Vi]),rt=Vi(),zl=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return p.jsx(oa,{...r,...n,modal:!0})};zl.displayName=Fl;var Am="AlertDialogTrigger",Bl=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(sa,{...o,...r,ref:t})});Bl.displayName=Am;var Tm="AlertDialogPortal",Vl=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return p.jsx(ia,{...r,...n})};Vl.displayName=Tm;var Pm="AlertDialogOverlay",Hl=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx($r,{...o,...r,ref:t})});Hl.displayName=Pm;var It="AlertDialogContent",[km,Mm]=Nm(It),Dm=_c("AlertDialogContent"),Wl=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=rt(n),i=f.useRef(null),a=fe(t,i),c=f.useRef(null);return p.jsx(Gf,{contentName:It,titleName:Ul,docsSlug:"alert-dialog",children:p.jsx(km,{scope:n,cancelRef:c,children:p.jsxs(Fr,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:ce(o.onOpenAutoFocus,l=>{var u;l.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[p.jsx(Dm,{children:r}),p.jsx(Im,{contentRef:i})]})})})});Wl.displayName=It;var Ul="AlertDialogTitle",Gl=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(zr,{...o,...r,ref:t})});Gl.displayName=Ul;var Zl="AlertDialogDescription",ql=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(Br,{...o,...r,ref:t})});ql.displayName=Zl;var jm="AlertDialogAction",Yl=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(On,{...o,...r,ref:t})});Yl.displayName=jm;var Kl="AlertDialogCancel",Xl=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Mm(Kl,n),s=rt(n),i=fe(t,o);return p.jsx(On,{...s,...r,ref:i})});Xl.displayName=Kl;var Im=({contentRef:e})=>{const t=`\`${It}\` requires a description for the component to be accessible for screen reader users.
144
139
 
145
- You can add a description to the \`${$t}\` by passing a \`${Il}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
140
+ You can add a description to the \`${It}\` by passing a \`${Zl}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
146
141
 
147
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${$t}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
142
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${It}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
148
143
 
149
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Am=Tl,Tm=Pl,Pm=kl,zl=Dl,Bl=Ml,Wl=Ll,Vl=Fl,Hl=_l,Ul=Ol;const km=Am,Dm=Tm,Gl=Pm,Hr=p.forwardRef(({className:e,...t},n)=>f.jsx(zl,{className:O("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Hr.displayName=zl.displayName;const ql=p.forwardRef(({className:e,...t},n)=>f.jsxs(Gl,{children:[f.jsx(Hr,{}),f.jsx(Bl,{ref:n,className:O("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-gray-800 dark:bg-gray-950",e),...t})]}));ql.displayName=Bl.displayName;const Yl=({className:e,...t})=>f.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yl.displayName="AlertDialogHeader";const Xl=({className:e,...t})=>f.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xl.displayName="AlertDialogFooter";const Kl=p.forwardRef(({className:e,...t},n)=>f.jsx(Hl,{ref:n,className:O("text-lg font-semibold",e),...t}));Kl.displayName=Hl.displayName;const Zl=p.forwardRef(({className:e,...t},n)=>f.jsx(Ul,{ref:n,className:O("text-sm text-gray-500 dark:text-gray-400",e),...t}));Zl.displayName=Ul.displayName;const Ql=p.forwardRef(({className:e,...t},n)=>f.jsx(Wl,{ref:n,className:O(hr(),e),...t}));Ql.displayName=Wl.displayName;const Jl=p.forwardRef(({className:e,...t},n)=>f.jsx(Vl,{ref:n,className:O(hr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Jl.displayName=Vl.displayName;function Mm({caption:e,children:t,plainText:n,enableSpacebar:r=!1,showToast:o=!0,maxHeight:s="60vh",className:i=""}){const[a,c]=w.useState(!1),[l,u]=w.useState(!1),[d,h]=w.useState(!1),[m,v]=w.useState(!1),[g,x]=w.useState(null),y=w.useRef(null),b=w.useRef(null),C=w.useRef(null),S=w.useRef(null),R=w.useRef(!1),M=w.useCallback(()=>{b.current&&clearTimeout(b.current),b.current=window.setTimeout(()=>{C.current&&(x(C.current.getBoundingClientRect()),v(!0))},500)},[]),A=w.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),v(!1),x(null)},[]),$=z=>{const j=z.split(`
150
- `),P=[];return j.forEach((I,D)=>{if(D>0&&P.push(`
151
- `),I.trim().startsWith("//")){P.push(f.jsx("span",{className:"text-gray-400",children:I},`line-${D}`));return}let k=I,N=0;for(;k.length>0;){let T=!1;if(k[0]==='"'){const E=k.indexOf('"',1);if(E!==-1){const _=k.substring(0,E+1);P.push(f.jsx("span",{className:"text-green-400",children:_},`line-${D}-${N}`)),k=k.substring(E+1),N+=E+1,T=!0}}if(!T&&k[0]==="'"){const E=k.indexOf("'",1);if(E!==-1){const _=k.substring(0,E+1);P.push(f.jsx("span",{className:"text-green-400",children:_},`line-${D}-${N}`)),k=k.substring(E+1),N+=E+1,T=!0}}if(!T&&k[0]==="`"){const E=k.indexOf("`",1);if(E!==-1){const _=k.substring(0,E+1);P.push(f.jsx("span",{className:"text-green-400",children:_},`line-${D}-${N}`)),k=k.substring(E+1),N+=E+1,T=!0}}if(!T&&/[a-zA-Z_]/.test(k[0])){const E=k.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(E){const _=E[0];["import","export","from","const","let","var","function","return","await","async","if","else","try","catch","finally","for","while","switch","case","break","continue","default","class","interface","type","enum","extends","implements","new","this","super","void","true","false","null","undefined"].includes(_)?P.push(f.jsx("span",{className:"text-purple-400",children:_},`line-${D}-${N}`)):P.push(_),k=k.substring(_.length),N+=_.length,T=!0}}if(!T&&/\d/.test(k[0])){const E=k.match(/^\d+\.?\d*/);if(E){const _=E[0];P.push(f.jsx("span",{className:"text-orange-400",children:_},`line-${D}-${N}`)),k=k.substring(_.length),N+=_.length,T=!0}}!T&&/[{}\[\]()]/.test(k[0])&&(P.push(f.jsx("span",{className:"text-yellow-300",children:k[0]},`line-${D}-${N}`)),k=k.substring(1),N+=1,T=!0),T||(P.push(k[0]),k=k.substring(1),N+=1)}}),P},B=w.useCallback(async()=>{if(S.current)try{c(!0);const z=n||S.current.innerText||S.current.textContent||"";await navigator.clipboard.writeText(z),o&&Zt.success("Code copied to clipboard"),y.current&&window.clearTimeout(y.current),h(!0),y.current=window.setTimeout(()=>{h(!1)},2e3)}catch(z){console.error("Failed to copy code",z),o&&Zt.error("Failed to copy code")}finally{c(!1)}},[n,o]);return w.useEffect(()=>{if(!r)return;const z=P=>{const I=P.target;P.code==="Space"&&!a&&!R.current&&I.tagName!=="INPUT"&&I.tagName!=="TEXTAREA"&&!I.isContentEditable&&!I.closest("input")&&!I.closest("textarea")&&(P.preventDefault(),R.current=!0,u(!0),C.current&&C.current.blur(),B())},j=P=>{P.code==="Space"&&(R.current=!1,u(!1))};return window.addEventListener("keydown",z),window.addEventListener("keyup",j),()=>{window.removeEventListener("keydown",z),window.removeEventListener("keyup",j)}},[r,a,B]),w.useEffect(()=>()=>{y.current&&window.clearTimeout(y.current),b.current&&window.clearTimeout(b.current)},[]),f.jsxs("figure",{className:`space-y-3 ${i}`,children:[e&&f.jsx("figcaption",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-[#6B6766]",children:e}),f.jsxs("div",{className:"relative group",children:[f.jsx("button",{ref:C,onClick:B,onMouseEnter:M,onMouseLeave:()=>{A(),u(!1)},onMouseDown:()=>u(!0),onMouseUp:()=>u(!1),onTouchStart:()=>u(!0),onTouchEnd:()=>u(!1),disabled:a,className:"absolute top-3 right-3 w-8 h-8 hidden md:flex items-center justify-center rounded-md bg-gray-800/70 hover:bg-gray-700 text-gray-200 transition-colors cursor-pointer select-none focus:outline-none z-10 disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Copy code",children:d?f.jsx(jn,{className:`h-4 w-4 text-green-400 transition-transform duration-150 ${l?"scale-90":"scale-100"}`}):f.jsx(Qi,{className:`h-4 w-4 transition-transform duration-150 ${l?"scale-90":"scale-100"}`})}),f.jsx("pre",{ref:S,className:"overflow-x-auto rounded-2xl bg-gray-900 px-6 py-8 font-mono text-sm leading-relaxed text-gray-100 shadow-sm whitespace-pre",style:{maxHeight:s},children:f.jsx("code",{className:"block",children:typeof t=="string"?$(t):t})})]}),m&&g&&typeof window<"u"&&Sn.createPortal(f.jsx("div",{className:"fixed px-2 py-1 text-xs rounded bg-gray-800 text-white whitespace-nowrap shadow-lg z-[9999] pointer-events-none",style:{left:g.left+g.width/2,top:g.top-40,transform:"translateX(-50%)"},children:"Copy"}),document.body)]})}function jm({url:e,ariaLabel:t="Copy link",showToast:n=!0,className:r=""}){const[o,s]=w.useState(!1),[i,a]=w.useState(!1),[c,l]=w.useState(!1),u=w.useRef(null),d=w.useCallback(async()=>{if(!(!e||o))try{s(!0),await navigator.clipboard.writeText(e),n&&Zt.success("Link copied to clipboard"),u.current&&window.clearTimeout(u.current),l(!0),u.current=window.setTimeout(()=>{l(!1)},2e3)}catch(h){console.error("[LinkCopyButton] Failed to copy link",h),n&&Zt.error("Failed to copy link")}finally{s(!1)}},[e,o,n]);return w.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),f.jsx("button",{type:"button","aria-label":t,onClick:d,onMouseDown:()=>a(!0),onMouseUp:()=>a(!1),onMouseLeave:()=>a(!1),onTouchStart:()=>a(!0),onTouchEnd:()=>a(!1),disabled:o||!e,className:["inline-flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 hover:bg-gray-200 text-gray-700 transition-colors cursor-pointer select-none focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed",r].join(" "),children:c?f.jsx(jn,{className:["h-4 w-4 text-green-600 transition-transform duration-150",i?"scale-90":"scale-100"].join(" ")}):f.jsx(Kf,{className:["h-4 w-4 transition-transform duration-150",i?"scale-90":"scale-100"].join(" ")})})}function ec({url:e,imageUrl:t,status:n,onClick:r,className:o="",size:s="md",showHostname:i=!0}){const a={sm:"w-20 h-20",md:"w-24 h-24",lg:"w-32 h-32"};return f.jsxs("button",{type:"button",onClick:r,style:{cursor:"pointer"},className:`
144
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},_m=zl,Om=Bl,Lm=Vl,Ql=Hl,Jl=Wl,ec=Yl,tc=Xl,nc=Gl,rc=ql;const $m=_m,Fm=Om,oc=Lm,eo=f.forwardRef(({className:e,...t},n)=>p.jsx(Ql,{className:F("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));eo.displayName=Ql.displayName;const sc=f.forwardRef(({className:e,...t},n)=>p.jsxs(oc,{children:[p.jsx(eo,{}),p.jsx(Jl,{ref:n,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-gray-800 dark:bg-gray-950",e),...t})]}));sc.displayName=Jl.displayName;const ic=({className:e,...t})=>p.jsx("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});ic.displayName="AlertDialogHeader";const ac=({className:e,...t})=>p.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ac.displayName="AlertDialogFooter";const lc=f.forwardRef(({className:e,...t},n)=>p.jsx(nc,{ref:n,className:F("text-lg font-semibold",e),...t}));lc.displayName=nc.displayName;const cc=f.forwardRef(({className:e,...t},n)=>p.jsx(rc,{ref:n,className:F("text-sm text-gray-500 dark:text-gray-400",e),...t}));cc.displayName=rc.displayName;const dc=f.forwardRef(({className:e,...t},n)=>p.jsx(ec,{ref:n,className:F(Er(),e),...t}));dc.displayName=ec.displayName;const uc=f.forwardRef(({className:e,...t},n)=>p.jsx(tc,{ref:n,className:F(Er({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));uc.displayName=tc.displayName;function zm({caption:e,children:t,plainText:n,enableSpacebar:r=!1,showToast:o=!0,maxHeight:s="60vh",className:i=""}){const[a,c]=w.useState(!1),[l,u]=w.useState(!1),[d,h]=w.useState(!1),[m,v]=w.useState(!1),[g,y]=w.useState(null),x=w.useRef(null),b=w.useRef(null),S=w.useRef(null),C=w.useRef(null),E=w.useRef(!1),T=w.useCallback(()=>{b.current&&clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current&&(y(S.current.getBoundingClientRect()),v(!0))},500)},[]),R=w.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),v(!1),y(null)},[]),$=z=>{const j=z.split(`
145
+ `),P=[];return j.forEach((O,D)=>{if(D>0&&P.push(`
146
+ `),O.trim().startsWith("//")){P.push(p.jsx("span",{className:"text-gray-400",children:O},`line-${D}`));return}let M=O,A=0;for(;M.length>0;){let k=!1;if(M[0]==='"'){const N=M.indexOf('"',1);if(N!==-1){const I=M.substring(0,N+1);P.push(p.jsx("span",{className:"text-green-400",children:I},`line-${D}-${A}`)),M=M.substring(N+1),A+=N+1,k=!0}}if(!k&&M[0]==="'"){const N=M.indexOf("'",1);if(N!==-1){const I=M.substring(0,N+1);P.push(p.jsx("span",{className:"text-green-400",children:I},`line-${D}-${A}`)),M=M.substring(N+1),A+=N+1,k=!0}}if(!k&&M[0]==="`"){const N=M.indexOf("`",1);if(N!==-1){const I=M.substring(0,N+1);P.push(p.jsx("span",{className:"text-green-400",children:I},`line-${D}-${A}`)),M=M.substring(N+1),A+=N+1,k=!0}}if(!k&&/[a-zA-Z_]/.test(M[0])){const N=M.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(N){const I=N[0];["import","export","from","const","let","var","function","return","await","async","if","else","try","catch","finally","for","while","switch","case","break","continue","default","class","interface","type","enum","extends","implements","new","this","super","void","true","false","null","undefined"].includes(I)?P.push(p.jsx("span",{className:"text-purple-400",children:I},`line-${D}-${A}`)):P.push(I),M=M.substring(I.length),A+=I.length,k=!0}}if(!k&&/\d/.test(M[0])){const N=M.match(/^\d+\.?\d*/);if(N){const I=N[0];P.push(p.jsx("span",{className:"text-orange-400",children:I},`line-${D}-${A}`)),M=M.substring(I.length),A+=I.length,k=!0}}!k&&/[{}\[\]()]/.test(M[0])&&(P.push(p.jsx("span",{className:"text-yellow-300",children:M[0]},`line-${D}-${A}`)),M=M.substring(1),A+=1,k=!0),k||(P.push(M[0]),M=M.substring(1),A+=1)}}),P},V=w.useCallback(async()=>{if(C.current)try{c(!0);const z=n||C.current.innerText||C.current.textContent||"";await navigator.clipboard.writeText(z),o&&Kt.success("Code copied to clipboard"),x.current&&window.clearTimeout(x.current),h(!0),x.current=window.setTimeout(()=>{h(!1)},2e3)}catch(z){console.error("Failed to copy code",z),o&&Kt.error("Failed to copy code")}finally{c(!1)}},[n,o]);return w.useEffect(()=>{if(!r)return;const z=P=>{const O=P.target;P.code==="Space"&&!a&&!E.current&&O.tagName!=="INPUT"&&O.tagName!=="TEXTAREA"&&!O.isContentEditable&&!O.closest("input")&&!O.closest("textarea")&&(P.preventDefault(),E.current=!0,u(!0),S.current&&S.current.blur(),V())},j=P=>{P.code==="Space"&&(E.current=!1,u(!1))};return window.addEventListener("keydown",z),window.addEventListener("keyup",j),()=>{window.removeEventListener("keydown",z),window.removeEventListener("keyup",j)}},[r,a,V]),w.useEffect(()=>()=>{x.current&&window.clearTimeout(x.current),b.current&&window.clearTimeout(b.current)},[]),p.jsxs("figure",{className:`space-y-3 ${i}`,children:[e&&p.jsx("figcaption",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-[#6B6766]",children:e}),p.jsxs("div",{className:"relative group",children:[p.jsx("button",{ref:S,onClick:V,onMouseEnter:T,onMouseLeave:()=>{R(),u(!1)},onMouseDown:()=>u(!0),onMouseUp:()=>u(!1),onTouchStart:()=>u(!0),onTouchEnd:()=>u(!1),disabled:a,className:"absolute top-3 right-3 w-8 h-8 hidden md:flex items-center justify-center rounded-md bg-gray-800/70 hover:bg-gray-700 text-gray-200 transition-colors cursor-pointer select-none focus:outline-none z-10 disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Copy code",children:d?p.jsx(en,{className:`h-4 w-4 text-green-400 transition-transform duration-150 ${l?"scale-90":"scale-100"}`}):p.jsx(da,{className:`h-4 w-4 transition-transform duration-150 ${l?"scale-90":"scale-100"}`})}),p.jsx("pre",{ref:C,className:"overflow-x-auto rounded-2xl bg-gray-900 px-6 py-8 font-mono text-sm leading-relaxed text-gray-100 shadow-sm whitespace-pre",style:{maxHeight:s},children:p.jsx("code",{className:"block",children:typeof t=="string"?$(t):t})})]}),m&&g&&typeof window<"u"&&An.createPortal(p.jsx("div",{className:"fixed px-2 py-1 text-xs rounded bg-gray-800 text-white whitespace-nowrap shadow-lg z-[9999] pointer-events-none",style:{left:g.left+g.width/2,top:g.top-40,transform:"translateX(-50%)"},children:"Copy"}),document.body)]})}function Bm({url:e,ariaLabel:t="Copy link",showToast:n=!0,className:r=""}){const[o,s]=w.useState(!1),[i,a]=w.useState(!1),[c,l]=w.useState(!1),u=w.useRef(null),d=w.useCallback(async()=>{if(!(!e||o))try{s(!0),await navigator.clipboard.writeText(e),n&&Kt.success("Link copied to clipboard"),u.current&&window.clearTimeout(u.current),l(!0),u.current=window.setTimeout(()=>{l(!1)},2e3)}catch(h){console.error("[LinkCopyButton] Failed to copy link",h),n&&Kt.error("Failed to copy link")}finally{s(!1)}},[e,o,n]);return w.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),p.jsx("button",{type:"button","aria-label":t,onClick:d,onMouseDown:()=>a(!0),onMouseUp:()=>a(!1),onMouseLeave:()=>a(!1),onTouchStart:()=>a(!0),onTouchEnd:()=>a(!1),disabled:o||!e,className:["inline-flex h-9 w-9 items-center justify-center rounded-md bg-gray-100 hover:bg-gray-200 text-gray-700 transition-colors cursor-pointer select-none focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed",r].join(" "),children:c?p.jsx(en,{className:["h-4 w-4 text-green-600 transition-transform duration-150",i?"scale-90":"scale-100"].join(" ")}):p.jsx(ip,{className:["h-4 w-4 transition-transform duration-150",i?"scale-90":"scale-100"].join(" ")})})}function fc({url:e,imageUrl:t,status:n,onClick:r,className:o="",size:s="md",showHostname:i=!0}){const a={sm:"w-20 h-20",md:"w-24 h-24",lg:"w-32 h-32"};return p.jsxs("button",{type:"button",onClick:r,style:{cursor:"pointer"},className:`
152
147
  relative
153
148
  ${a[s]}
154
149
  rounded
@@ -164,7 +159,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
164
159
  transition-shadow
165
160
  cursor-pointer
166
161
  ${o}
167
- `,children:[n==="loading"&&f.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100",children:f.jsx("div",{className:"w-6 h-6 border-2 border-gray-700 border-t-transparent rounded-full animate-spin"})}),n==="ready"&&t&&f.jsx("img",{src:t,alt:e,className:"w-full h-full object-cover"}),n==="error"&&f.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-red-50 text-red-600 text-xs font-medium p-2 text-center",children:"Failed"}),i&&f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-900 bg-opacity-80 text-gray-100 text-[8px] font-mono px-1 py-0.5 truncate",children:(()=>{try{return new URL(e).hostname}catch{return e}})()})]})}function _m({url:e,imageUrl:t,status:n,onClose:r,className:o=""}){return f.jsx("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4 ${o}`,children:f.jsxs("div",{className:"relative w-full max-w-4xl bg-white rounded-lg shadow-2xl overflow-hidden",children:[f.jsx("button",{type:"button",onClick:r,style:{cursor:"pointer"},className:"absolute top-4 right-4 text-gray-700 font-medium text-sm uppercase tracking-wide border-2 border-gray-700 rounded-full px-4 py-2 bg-white hover:bg-gray-700 hover:text-white transition-colors z-10 cursor-pointer",children:"Close"}),f.jsxs("div",{className:"p-6 space-y-4",children:[f.jsx("div",{className:"text-xs font-mono text-gray-700 break-all pr-20",children:e}),n==="ready"&&t?f.jsx("img",{src:t,alt:e,className:"w-full max-h-[75vh] object-contain rounded-lg border border-gray-200 bg-gray-50"}):n==="loading"?f.jsxs("div",{className:"flex flex-col items-center gap-4 py-16",children:[f.jsx("div",{className:"w-12 h-12 border-4 border-gray-700 border-t-transparent rounded-full animate-spin"}),f.jsx("p",{className:"font-medium text-sm text-gray-700 uppercase tracking-wide",children:"Capturing screenshot..."})]}):f.jsxs("div",{className:"flex flex-col items-center gap-4 py-16 text-red-600",children:[f.jsx("svg",{className:"w-12 h-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),f.jsx("p",{className:"font-medium text-sm uppercase tracking-wide",children:"Failed to load screenshot"})]})]})]})})}function Im({thumbnails:e,onThumbnailClick:t,className:n="",size:r="md",showHostname:o=!0,maxDisplay:s}){const i=s?e.slice(0,s):e,a=s&&e.length>s?e.length-s:0;return e.length===0?null:f.jsxs("div",{className:`flex flex-wrap gap-2 ${n}`,children:[i.map((c,l)=>f.jsx(ec,{url:c.url,imageUrl:c.imageUrl,status:c.status,onClick:()=>t==null?void 0:t(c),size:r,showHostname:o},c.url+l)),a>0&&f.jsxs("div",{className:`
162
+ `,children:[n==="loading"&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100",children:p.jsx("div",{className:"w-6 h-6 border-2 border-gray-700 border-t-transparent rounded-full animate-spin"})}),n==="ready"&&t&&p.jsx("img",{src:t,alt:e,className:"w-full h-full object-cover"}),n==="error"&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-red-50 text-red-600 text-xs font-medium p-2 text-center",children:"Failed"}),i&&p.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-900 bg-opacity-80 text-gray-100 text-[8px] font-mono px-1 py-0.5 truncate",children:(()=>{try{return new URL(e).hostname}catch{return e}})()})]})}function Vm({url:e,imageUrl:t,status:n,onClose:r,className:o=""}){return p.jsx("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4 ${o}`,children:p.jsxs("div",{className:"relative w-full max-w-4xl bg-white rounded-lg shadow-2xl overflow-hidden",children:[p.jsx("button",{type:"button",onClick:r,style:{cursor:"pointer"},className:"absolute top-4 right-4 text-gray-700 font-medium text-sm uppercase tracking-wide border-2 border-gray-700 rounded-full px-4 py-2 bg-white hover:bg-gray-700 hover:text-white transition-colors z-10 cursor-pointer",children:"Close"}),p.jsxs("div",{className:"p-6 space-y-4",children:[p.jsx("div",{className:"text-xs font-mono text-gray-700 break-all pr-20",children:e}),n==="ready"&&t?p.jsx("img",{src:t,alt:e,className:"w-full max-h-[75vh] object-contain rounded-lg border border-gray-200 bg-gray-50"}):n==="loading"?p.jsxs("div",{className:"flex flex-col items-center gap-4 py-16",children:[p.jsx("div",{className:"w-12 h-12 border-4 border-gray-700 border-t-transparent rounded-full animate-spin"}),p.jsx("p",{className:"font-medium text-sm text-gray-700 uppercase tracking-wide",children:"Capturing screenshot..."})]}):p.jsxs("div",{className:"flex flex-col items-center gap-4 py-16 text-red-600",children:[p.jsx("svg",{className:"w-12 h-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),p.jsx("p",{className:"font-medium text-sm uppercase tracking-wide",children:"Failed to load screenshot"})]})]})]})})}function Hm({thumbnails:e,onThumbnailClick:t,className:n="",size:r="md",showHostname:o=!0,maxDisplay:s}){const i=s?e.slice(0,s):e,a=s&&e.length>s?e.length-s:0;return e.length===0?null:p.jsxs("div",{className:`flex flex-wrap gap-2 ${n}`,children:[i.map((c,l)=>p.jsx(fc,{url:c.url,imageUrl:c.imageUrl,status:c.status,onClick:()=>t==null?void 0:t(c),size:r,showHostname:o},c.url+l)),a>0&&p.jsxs("div",{className:`
168
163
  flex items-center justify-center
169
164
  ${r==="sm"?"w-20 h-20":r==="lg"?"w-32 h-32":"w-24 h-24"}
170
165
  rounded
@@ -175,8 +170,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
175
170
  text-gray-500
176
171
  font-medium
177
172
  text-sm
178
- `,children:["+",a]})]})}const tc=w.forwardRef(({cornerRadius:e=12,cornerSmoothing:t=1,borderWidth:n,borderColor:r="transparent",className:o,children:s,...i},a)=>{const c=w.useRef(null),l=u=>{c.current=u,typeof a=="function"?a(u):a&&(a.current=u)};return w.useEffect(()=>{const u=c.current;if(!u)return;let d;return import("@monokai/monoco").then(({addCorners:h,unobserve:m,FigmaSquircle:v})=>{if(!c.current)return;const g={borderRadius:e,smoothing:t,cornerType:v,clip:!0,observe:!0};n&&(g.border=[n,r]),h(u,g),d=()=>m(u)}).catch(h=>{console.warn("[Squircle] Failed to load @monokai/monoco (non-fatal)",h)}),()=>{d==null||d()}},[e,t,n,r]),f.jsx("div",{ref:l,className:O("overflow-hidden",o),...i,children:s})});tc.displayName="Squircle";function nc(e){const t=e.split(`
179
- `).filter(Boolean);let n="message",r="";for(const o of t)o.startsWith("event:")?n=o.replace("event:","").trim():o.startsWith("data:")&&(r+=o.replace("data:","").trim());if(!r)return null;try{const o=JSON.parse(r);return n==="chunk"&&(o!=null&&o.token)?{type:"chunk",token:String(o.token)}:n==="complete"?{type:"complete"}:n==="error"?{type:"error",message:(o==null?void 0:o.message)||"Streaming error"}:null}catch{return null}}async function*rc(e,t){if(!e.body)throw new Error("Response body is null");const n=e.body.getReader(),r=new TextDecoder;let o="";try{for(;;){const{done:s,value:i}=await n.read();if(s||t.aborted)break;o+=r.decode(i,{stream:!0});const a=o.split(`
173
+ `,children:["+",a]})]})}const Wm=[[.3,0,.473,0,.619,.039],[.804,.088,.912,.196,.961,.381],[1,.527,1,.7,1,1]];function Um(e){return typeof e=="number"?{nw:e,ne:e,se:e,sw:e}:e}function Gm(e,t,n){const r=Math.min(t,n)/2;let{nw:o,ne:s,se:i,sw:a}=e;o=Math.max(0,Math.min(o,r)),s=Math.max(0,Math.min(s,r)),i=Math.max(0,Math.min(i,r)),a=Math.max(0,Math.min(a,r));const c=(l,u,d)=>{const h=l+u;if(h>d&&h>0){const m=d/h;return[l*m,u*m]}return[l,u]};return[o,s]=c(o,s,t),[s,i]=c(s,i,n),[i,a]=c(i,a,t),[a,o]=c(a,o,n),{nw:o,ne:s,se:i,sw:a}}function ar(e,t,n,r,o,s){switch(n){case 0:return[t*r,r*(1-e)];case 1:return[o-r+e*r,t*r];case 2:return[o-t*r,s-r+e*r];case 3:return[r*(1-e),s-t*r];default:return[e,t]}}function hn(e,t,n,r,o){if(!(n<.01))for(const[s,i,a,c,l,u]of Wm){const[d,h]=ar(s,i,t,n,r,o),[m,v]=ar(a,c,t,n,r,o),[g,y]=ar(l,u,t,n,r,o);e.push(`C ${d} ${h} ${m} ${v} ${g} ${y}`)}}function to(e){const{width:t,height:n}=e;if(t<=0||n<=0)return"";const r=Um(e.radius),o=Gm(r,t,n);if(o.nw<=0&&o.ne<=0&&o.se<=0&&o.sw<=0)return`M 0 0 L ${t} 0 L ${t} ${n} L 0 ${n} Z`;const s=Math.min(t,n)/2;if(o.nw>=s-.5&&o.ne>=s-.5&&o.se>=s-.5&&o.sw>=s-.5){const a=t/2,c=t/2,l=n/2;return`M ${a} 0 A ${c} ${l} 0 1 1 ${a} ${n} A ${c} ${l} 0 1 1 ${a} 0 Z`}const i=[];return i.push(`M ${o.nw} 0`),i.push(`L ${t-o.ne} 0`),o.ne>0?hn(i,1,o.ne,t,n):i.push(`L ${t} 0`),i.push(`L ${t} ${n-o.se}`),o.se>0?hn(i,2,o.se,t,n):i.push(`L ${t} ${n}`),i.push(`L ${o.sw} ${n}`),o.sw>0?hn(i,3,o.sw,t,n):i.push(`L 0 ${n}`),i.push(`L 0 ${o.nw}`),o.nw>0?hn(i,0,o.nw,t,n):i.push("L 0 0"),i.push("Z"),i.join(" ")}function Zm(e){if(typeof e=="number"){const t=Math.max(0,Math.min(e,.5));return{nw:t,ne:t,se:t,sw:t}}return{nw:Math.max(0,Math.min(e.nw,.5)),ne:Math.max(0,Math.min(e.ne,.5)),se:Math.max(0,Math.min(e.se,.5)),sw:Math.max(0,Math.min(e.sw,.5))}}function qm(e){const t=Zm(e.radiusFraction);return to({width:1,height:1,radius:t})}let qt=null;function pc(){return qt!==null?qt:typeof CSS>"u"||typeof CSS.supports!="function"?(qt=!1,!1):(qt=CSS.supports("corner-shape","squircle"),qt)}function hc(e,t){e.style.borderRadius=t,e.style.cornerShape="squircle"}function mc(e){e.style.borderRadius="",e.style.cornerShape=""}const gc=w.forwardRef(({cornerRadius:e=12,cornerSmoothing:t,borderWidth:n,borderColor:r="transparent",asChild:o,className:s,children:i,style:a,...c},l)=>{const u=w.useId(),d=w.useRef(null),[h,m]=w.useState(null),v=w.useRef(!1),g=C=>{d.current=C,typeof l=="function"?l(C):l&&(l.current=C)},y=pc();w.useEffect(()=>{v.current||(v.current=!0,console.log(`[Squircle] Using ${y?"native corner-shape":"SVG clip-path fallback"}`))},[y]),w.useEffect(()=>{const C=d.current;if(!C||!y)return;const E=typeof e=="number"?`${e}px`:`${e.nw}px ${e.ne}px ${e.se}px ${e.sw}px`;return hc(C,E),()=>mc(C)},[y,e]),w.useEffect(()=>{if(y)return;const C=d.current;if(!C)return;const E=new ResizeObserver(T=>{for(const R of T){const{width:$,height:V}=R.contentRect;m(z=>z&&z.w===Math.round($)&&z.h===Math.round(V)?z:{w:Math.round($),h:Math.round(V)})}});return E.observe(C),()=>E.disconnect()},[y]);const x=!y&&h?to({width:h.w,height:h.h,radius:e}):"",b=!y&&x?{clipPath:`url(#${u})`,WebkitClipPath:`url(#${u})`}:void 0,S=n&&n>0?{boxShadow:`inset 0 0 0 ${n}px ${r}`}:void 0;return p.jsxs("div",{ref:g,className:F("overflow-hidden relative",s),style:{...a,...b,...S},...c,children:[!y&&x&&p.jsx("svg",{className:"absolute h-0 w-0","aria-hidden":"true",style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:p.jsx("defs",{children:p.jsx("clipPath",{id:u,clipPathUnits:"userSpaceOnUse",children:p.jsx("path",{d:x})})})}),i]})});gc.displayName="Squircle";function Ym(e){let{PI:t,min:n,max:r,cos:o,round:s}=Math,i=e[0]|e[1]<<8|e[2]<<16,a=e[3]|e[4]<<8,c=(i&63)/63,l=(i>>6&63)/31.5-1,u=(i>>12&63)/31.5-1,d=(i>>18&31)/31,h=i>>23,m=(a>>3&63)/63,v=(a>>9&63)/63,g=a>>15,y=r(3,g?h?5:7:a&7),x=r(3,g?a&7:h?5:7),b=h?(e[5]&15)/15:1,S=(e[5]>>4)/15,C=h?6:5,E=0,T=(k,N,I)=>{let W=[];for(let H=0;H<N;H++)for(let ae=H?0:1;ae*N<k*(N-H);ae++)W.push(((e[C+(E>>1)]>>((E++&1)<<2)&15)/7.5-1)*I);return W},R=T(y,x,d),$=T(3,3,m*1.25),V=T(3,3,v*1.25),z=h&&T(5,5,S),j=Km(e),P=s(j>1?32:32*j),O=s(j>1?32/j:32),D=new Uint8Array(P*O*4),M=[],A=[];for(let k=0,N=0;k<O;k++)for(let I=0;I<P;I++,N+=4){let W=c,H=l,ae=u,U=b;for(let _=0,B=r(y,h?5:3);_<B;_++)M[_]=o(t/P*(I+.5)*_);for(let _=0,B=r(x,h?5:3);_<B;_++)A[_]=o(t/O*(k+.5)*_);for(let _=0,B=0;_<x;_++)for(let ee=_?0:1,Y=A[_]*2;ee*x<y*(x-_);ee++,B++)W+=R[B]*M[ee]*Y;for(let _=0,B=0;_<3;_++)for(let ee=_?0:1,Y=A[_]*2;ee<3-_;ee++,B++){let K=M[ee]*Y;H+=$[B]*K,ae+=V[B]*K}if(h)for(let _=0,B=0;_<5;_++)for(let ee=_?0:1,Y=A[_]*2;ee<5-_;ee++,B++)U+=z[B]*M[ee]*Y;let X=W-2/3*H,se=(3*W-X+ae)/2,pe=se-ae;D[N]=r(0,255*n(1,se)),D[N+1]=r(0,255*n(1,pe)),D[N+2]=r(0,255*n(1,X)),D[N+3]=r(0,255*n(1,U))}return{w:P,h:O,rgba:D}}function Km(e){let t=e[3],n=e[2]&128,r=e[4]&128,o=r?n?5:7:t&7,s=r?t&7:n?5:7;return o/s}function Xm(e,t,n){let r=e*4+1,o=6+t*(5+r),s=[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,e>>8,e&255,0,0,t>>8,t&255,8,6,0,0,0,0,0,0,0,o>>>24,o>>16&255,o>>8&255,o&255,73,68,65,84,120,1],i=[0,498536548,997073096,651767980,1994146192,1802195444,1303535960,1342533948,-306674912,-267414716,-690576408,-882789492,-1687895376,-2032938284,-1609899400,-1111625188],a=1,c=0;for(let l=0,u=0,d=r-1;l<t;l++,d+=r-1)for(s.push(l+1<t?0:1,r&255,r>>8,~r&255,r>>8^255,0),c=(c+a)%65521;u<d;u++){let h=n[u]&255;s.push(h),a=(a+h)%65521,c=(c+a)%65521}s.push(c>>8,c&255,a>>8,a&255,0,0,0,0,0,0,0,0,73,69,78,68,174,66,96,130);for(let[l,u]of[[12,29],[37,41+o]]){let d=-1;for(let h=l;h<u;h++)d^=s[h],d=d>>>4^i[d&15],d=d>>>4^i[d&15];d=~d,s[u++]=d>>>24,s[u++]=d>>16&255,s[u++]=d>>8&255,s[u++]=d&255}return"data:image/png;base64,"+btoa(String.fromCharCode(...s))}function Qm(e){let t=Ym(e);return Xm(t.w,t.h,t.rgba)}function Jm(e){try{const t=atob(String(e||"")),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}catch{return null}}function eg({src:e,thumbhash:t,alt:n,title:r,className:o,fallbackText:s,imgClassName:i,srcSet:a,sizes:c}){const l=w.useRef(null),[u,d]=w.useState(null),[h,m]=w.useState(null),v=u===e,g=h===e,y=w.useMemo(()=>{if(!t)return null;const b=Jm(t);if(!b)return null;try{return Qm(b)}catch{return null}},[t]);w.useEffect(()=>{const b=l.current;b&&b.complete&&b.naturalWidth>0&&d(e)},[e]);const x=!!e&&!g;return p.jsxs("div",{className:F("relative overflow-hidden rounded-full bg-gray-200 shrink-0",o),title:r,"aria-label":r||n||void 0,children:[y?p.jsx("img",{src:y,alt:"","aria-hidden":"true",className:"absolute inset-0 h-full w-full object-cover"}):null,x?null:p.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs font-medium text-gray-600",children:s||""}),x?p.jsx("img",{ref:l,src:e||void 0,srcSet:a||void 0,sizes:c||void 0,alt:n||"",className:F("absolute inset-0 h-full w-full object-cover transition-opacity duration-300",v?"opacity-100":"opacity-0",i),onLoad:()=>d(e),onError:()=>m(e),loading:"lazy",decoding:"async"}):null]})}function vc(e){const t=e.split(`
174
+ `).filter(Boolean);let n="message",r="";for(const o of t)o.startsWith("event:")?n=o.replace("event:","").trim():o.startsWith("data:")&&(r+=o.replace("data:","").trim());if(!r)return null;try{const o=JSON.parse(r);return n==="chunk"&&(o!=null&&o.token)?{type:"chunk",token:String(o.token)}:n==="complete"?{type:"complete"}:n==="error"?{type:"error",message:(o==null?void 0:o.message)||"Streaming error"}:null}catch{return null}}async function*yc(e,t){if(!e.body)throw new Error("Response body is null");const n=e.body.getReader(),r=new TextDecoder;let o="";try{for(;;){const{done:s,value:i}=await n.read();if(s||t.aborted)break;o+=r.decode(i,{stream:!0});const a=o.split(`
180
175
 
181
- `);o=a.pop()||"";for(const c of a){if(c.trim().length===0||c.startsWith(":"))continue;const l=nc(c);l&&(yield l)}}}finally{n.releaseLock()}}function oc(e){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return Array.isArray(n)?n:null}catch{return null}}function sc(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function ic(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}function ac(e){return e.map(t=>({role:t.role,content:t.content,response:t.response,status:t.status,timestamp:t.timestamp instanceof Date?t.timestamp.toISOString():new Date().toISOString()}))}function lc(e){return e.map(t=>({role:t.role,content:t.content,response:t.response,status:t.status||"complete",timestamp:new Date(t.timestamp)}))}const ur={en:[{id:"key_takeaways",label:"What are the key takeaways?",prompt:"What are the key takeaways from this recording?"},{id:"main_topics",label:"What topics are discussed?",prompt:"What are the main topics discussed in this recording?"},{id:"notable_quotes",label:"Any notable quotes?",prompt:"What are the most memorable or impactful quotes from this recording?"}],es:[{id:"key_takeaways",label:"¿Cuáles son los puntos clave?",prompt:"¿Cuáles son los puntos clave de esta grabación?"},{id:"main_topics",label:"¿Qué temas se tratan?",prompt:"¿Cuáles son los principales temas tratados en esta grabación?"},{id:"notable_quotes",label:"¿Citas destacadas?",prompt:"¿Cuáles son las citas más memorables de esta grabación?"}],fr:[{id:"key_takeaways",label:"Points clés ?",prompt:"Quels sont les points clés de cet enregistrement ?"},{id:"main_topics",label:"Sujets abordés ?",prompt:"Quels sont les principaux sujets abordés dans cet enregistrement ?"},{id:"notable_quotes",label:"Citations marquantes ?",prompt:"Quelles sont les citations les plus mémorables de cet enregistrement ?"}],de:[{id:"key_takeaways",label:"Wichtigste Erkenntnisse?",prompt:"Was sind die wichtigsten Erkenntnisse aus dieser Aufnahme?"},{id:"main_topics",label:"Besprochene Themen?",prompt:"Welche Hauptthemen werden in dieser Aufnahme besprochen?"},{id:"notable_quotes",label:"Bemerkenswerte Zitate?",prompt:"Was sind die einprägsamsten Zitate aus dieser Aufnahme?"}],pt:[{id:"key_takeaways",label:"Quais são os pontos principais?",prompt:"Quais são os pontos principais desta gravação?"},{id:"main_topics",label:"Quais temas são discutidos?",prompt:"Quais são os principais temas discutidos nesta gravação?"},{id:"notable_quotes",label:"Alguma citação notável?",prompt:"Quais são as citações mais memoráveis desta gravação?"}],it:[{id:"key_takeaways",label:"Quali sono i punti chiave?",prompt:"Quali sono i punti chiave di questa registrazione?"},{id:"main_topics",label:"Quali argomenti vengono discussi?",prompt:"Quali sono i principali argomenti discussi in questa registrazione?"},{id:"notable_quotes",label:"Citazioni notevoli?",prompt:"Quali sono le citazioni più memorabili di questa registrazione?"}]};function cc(e){const t=e.toLowerCase().split("-")[0];return ur[t]||ur.en}function Om(){return typeof navigator>"u"?"en":(navigator.language||navigator.userLanguage||"en").split("-")[0].toLowerCase()}function mn(e){const n=String(e||"").trim().split(":").map(r=>r.trim());if(n.length===2){const r=Number(n[0]),o=Number(n[1]);return!Number.isFinite(r)||!Number.isFinite(o)||o<0||o>59||r<0?null:r*60+o}if(n.length===3){const r=Number(n[0]),o=Number(n[1]),s=Number(n[2]);return!Number.isFinite(r)||!Number.isFinite(o)||!Number.isFinite(s)||o<0||o>59||s<0||s>59||r<0?null:r*3600+o*60+s}return null}function dc(e){const t=Math.max(0,Math.floor(e||0)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=t%60;return n>0?`${n}:${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`:`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`}function uc(e){const t=String(e||""),n=/```[\s\S]*?```/g,r=[];let o=0,s;for(;s=n.exec(t);)s.index>o&&r.push({type:"text",value:t.slice(o,s.index)}),r.push({type:"code",value:s[0]}),o=s.index+s[0].length;o<t.length&&r.push({type:"text",value:t.slice(o)});const i=/\b(\d{1,2}):([0-5]\d)(?::([0-5]\d))?\b/g,a=/\b(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\s*(?:-|–|—)\s*(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\b/g,c=/`[^`]*`/g;return r.map(u=>{if(u.type==="code")return u.value;const d=[];let h=0,m;for(;m=c.exec(u.value);)m.index>h&&d.push(u.value.slice(h,m.index)),d.push(m[0]),h=m.index+m[0].length;return h<u.value.length&&d.push(u.value.slice(h)),d.map(v=>v.startsWith("`")&&v.endsWith("`")?v:v.replace(a,(x,y,b)=>{const C=mn(y),S=mn(b);return C==null?x:S==null?`[${y}](#t=${C})`:`[${y}](#t=${C}&e=${S})`}).replace(i,x=>{const y=mn(x);return y==null?x:`[${x}](#t=${y})`})).join("")}).join("")}function fc({label:e,seconds:t,endSeconds:n,disabled:r=!1,onClick:o,size:s="md"}){const i=typeof n=="number"?dc(n):null,a=i?`${e} - ${i}`:e,c=s==="sm"?"px-2 py-1 text-[10px] gap-1":"px-2.5 py-1 text-xs gap-1.5",l=s==="sm"?"h-2.5 w-2.5":"h-3 w-3";return f.jsxs("span",{className:"relative inline-flex align-baseline group/timecode",children:[f.jsxs("button",{type:"button",onClick:()=>o(t,n),disabled:r,className:`inline-flex items-center rounded-full border border-gray-200 bg-white font-medium text-gray-700 hover:bg-gray-50 hover:border-gray-300 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ${c}`,children:[f.jsx(tp,{className:`text-black shrink-0 ${l}`,fill:"currentColor",strokeWidth:0}),f.jsx("span",{children:e})]}),f.jsxs("span",{className:`pointer-events-none absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap rounded bg-gray-900 px-2 py-1 text-xs text-white opacity-0 shadow-lg transition-opacity z-50 group-hover/timecode:opacity-100 ${i?"":"hidden"}`,children:[a,f.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 top-full border-4 border-transparent border-t-gray-900"})]})]})}function pc({markdown:e,onSeekToMoment:t,size:n="md"}){const r=uc(e),o=n==="sm"?"text-xs":"text-sm";return f.jsx("div",{className:`${o} leading-relaxed`,children:f.jsx(wc,{remarkPlugins:[Cc],components:{p:({children:s})=>f.jsx("p",{className:"mb-2 last:mb-0",children:s}),li:({children:s})=>{const i=Array.isArray(s)?s.map(a=>{var c;return w.isValidElement(a)&&a.type==="p"?(c=a.props)==null?void 0:c.children:a}):s;return f.jsx("li",{className:"ml-0",children:i})},a:({children:s,href:i})=>{const a=String(i||"");if(a.startsWith("#t=")){const c=a.replace(/^#/,""),l=new URLSearchParams(c),u=Number(l.get("t")),d=l.get("e")!=null?Number(l.get("e")):void 0,h=Array.isArray(s)?s.join(""):String(s||"");if(Number.isFinite(u)&&u>=0)return f.jsx(fc,{label:h,seconds:u,endSeconds:Number.isFinite(d)?d:void 0,onClick:t,size:n})}return f.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:"underline underline-offset-4 text-blue-600 hover:text-blue-800",children:s})},ul:({children:s})=>f.jsx("ul",{className:"list-disc pl-5 mb-2 space-y-0.5 [&>li]:pl-1",children:s}),ol:({children:s})=>f.jsx("ol",{className:"list-decimal pl-5 mb-2 space-y-0.5 [&>li]:pl-1",children:s}),strong:({children:s})=>f.jsx("strong",{className:"font-bold",children:s}),em:({children:s})=>f.jsx("em",{className:"italic",children:s}),blockquote:({children:s})=>f.jsx("blockquote",{className:"border-l-2 border-gray-300 pl-3 text-gray-700 my-2",children:s}),code:({children:s,className:i,...a})=>typeof i=="string"&&i.includes("language-")?f.jsx("code",{className:"block font-mono text-[0.85em] leading-relaxed",...a,children:s}):f.jsx("code",{className:"rounded bg-gray-200/70 px-1 py-0.5 font-mono text-[0.85em]",...a,children:s}),pre:({children:s})=>f.jsx("pre",{className:"overflow-x-auto rounded-md bg-gray-200/70 p-3 font-mono text-[0.85em] leading-relaxed my-2",children:s})},children:r||""})})}function ds(e){const t=/\n(?:---\s*\n)?\*?\*?Follow-?up(?: questions?)?:\*?\*?\s*\n([\s\S]*?)$/i,n=e.match(t);if(!n||typeof n.index!="number")return{cleanText:e,followUps:[],hasFollowUpSection:!1};const r=e.slice(0,n.index).trim(),o=n[1]||"",s=[],i=/[-•]\s*(.+?)(?:\?|$)/gm;let a;for(;(a=i.exec(o))!==null;){const c=a[1].trim();if(c){const l=c.replace(/^\[|\]$/g,"").trim();s.push(l.endsWith("?")?l:`${l}?`)}}return{cleanText:r,followUps:s.slice(0,2),hasFollowUpSection:!0}}function Lm({transport:e,language:t,storageKey:n,persist:r=!!n,playerReady:o=!1,onPlayMoment:s,onAddToNotes:i,followUps:a={enabled:!0,max:2},emptyStateTitle:c="Ask about this recording",emptyStateSubtitle:l="Get insights grounded in the transcript and visual content",inputPlaceholder:u="Ask about the video...",variant:d="default",className:h}){const[m,v]=w.useState([]),[g,x]=w.useState(""),[y,b]=w.useState(!1),[C,S]=w.useState(null),[R,M]=w.useState(()=>cc(t)),[A,$]=w.useState(!0),B=20,[z,j]=w.useState(B),P=w.useRef(null),I=w.useRef(null),D=w.useRef(!1),k=w.useRef(!1),N=w.useRef(null),T=w.useRef(null),E=w.useRef(null),_=w.useRef(""),Y=w.useRef("thinking"),H=w.useRef(!1);w.useEffect(()=>{if(!r||!n){v([]),k.current=!0;return}k.current=!1;const F=oc(n);F&&F.length>0?v(lc(F)):v([]);const ne=()=>{k.current=!0};return typeof queueMicrotask=="function"?queueMicrotask(ne):window.setTimeout(ne,0),()=>{T.current&&(T.current.abort(),T.current=null),E.current&&(window.cancelAnimationFrame(E.current),E.current=null),N.current&&(window.clearTimeout(N.current),N.current=null)}},[r,n]),w.useEffect(()=>{if(!(!r||!n||!k.current)){if(!m||m.length===0){ic(n);return}N.current&&window.clearTimeout(N.current),N.current=window.setTimeout(()=>{const F=m.slice(-50);sc(n,ac(F))},250)}},[m,r,n]),w.useEffect(()=>{D.current=!1},[n]),w.useEffect(()=>{if(D.current||!e.suggestions){$(!1);return}D.current=!0,(async()=>{try{const ne=await e.suggestions(t);ne&&ne.length>0&&M(ne)}catch(ne){console.warn("[ChatPanel] Failed to fetch dynamic suggestions:",ne)}finally{$(!1)}})()},[t,e]),w.useEffect(()=>{var F;(F=P.current)==null||F.scrollIntoView({behavior:"smooth"})},[m]);const se=w.useCallback(async(F,ne=!1)=>{if(!(!F.trim()||y)){if(b(!0),S(null),ne||x(""),T.current&&(T.current.abort(),T.current=null),E.current&&(window.cancelAnimationFrame(E.current),E.current=null),_.current="",Y.current="thinking",H.current=!1,!ne){const re={role:"user",content:F,timestamp:new Date};v(Ee=>[...Ee,re])}try{const re=m.filter(G=>G.role==="user"||G.role==="assistant"&&G.response).slice(-10).map(G=>{var fe,ie;return{role:G.role,content:G.role==="user"?G.content:((ie=(fe=G.response)==null?void 0:fe.items)==null?void 0:ie.map(pe=>pe.text).join(`
182
- `))||""}}),ot={role:"assistant",content:"",response:{items:[{text:"",moments:[]}],followUps:[],grounding:"embeddings",language:t},status:"thinking",timestamp:new Date};v(G=>{if(!ne)return[...G,ot];let fe=-1;for(let ie=G.length-1;ie>=0;ie--)if(G[ie].role==="assistant"){fe=ie;break}if(fe>=0){const ie=[...G];return ie[fe]=ot,ie}return[...G,ot]});const Ze=new AbortController;T.current=Ze;const Pe=await e.stream({prompt:F,language:t,history:ne?re.slice(0,-1):re,regenerate:ne},Ze.signal);if(!Pe.ok||!Pe.body)throw new Error(`Failed to start streaming (${Pe.status})`);let ze="";const Pt=(G,fe)=>{v(ie=>{let pe=-1;for(let We=ie.length-1;We>=0;We--)if(ie[We].role==="assistant"){pe=We;break}if(pe<0)return ie;const ge=[...ie],ke=ge[pe],{cleanText:Be,followUps:he,hasFollowUpSection:Dt}=ds(G),st=Dt?Be:G,gt=ke.response?{...ke.response,items:[{text:st,moments:[]}],...he.length>0?{followUps:he}:{}}:{items:[{text:st,moments:[]}],followUps:he,grounding:"embeddings",language:t};return ge[pe]={...ke,content:st,response:gt,status:fe||ke.status},ge})},kt=()=>{E.current||(E.current=window.requestAnimationFrame(()=>{E.current=null,Pt(_.current,Y.current)}))};for await(const G of rc(Pe,Ze.signal))if(G.type==="chunk")ze+=G.token,_.current=ze,H.current||(H.current=!0,Y.current="streaming"),kt();else if(G.type==="complete")Y.current="complete",_.current=ze,kt();else if(G.type==="error")throw new Error(G.message);Y.current="complete",_.current=ze;const{cleanText:Qe,followUps:qt}=ds(ze);if(v(G=>{var ge,ke,Be;let fe=-1;for(let he=G.length-1;he>=0;he--)if(G[he].role==="assistant"){fe=he;break}if(fe<0)return G;const ie=[...G],pe=ie[fe];return ie[fe]={...pe,content:Qe,status:"complete",response:{...pe.response,items:[{text:Qe,moments:[]}],followUps:qt.length>0?qt:((ge=pe.response)==null?void 0:ge.followUps)||[],grounding:((ke=pe.response)==null?void 0:ke.grounding)||"embeddings",language:((Be=pe.response)==null?void 0:Be.language)||t}},ie}),b(!1),e.hydrate)try{const G=await e.hydrate({prompt:F,language:t,history:ne?re.slice(0,-1):re,regenerate:!1},Ze.signal);G&&v(fe=>{var Dt,st,gt,We,q,ue;let ie=-1;for(let ce=fe.length-1;ce>=0;ce--)if(fe[ce].role==="assistant"){ie=ce;break}if(ie<0)return fe;const pe=[...fe],ge=pe[ie],ke=((Dt=ge.response)==null?void 0:Dt.items)||[],Be=((gt=(st=G.items)==null?void 0:st[0])==null?void 0:gt.moments)||[],he=ke.length>0?ke.map((ce,Se)=>({...ce,moments:Se===0?Be:ce.moments||[]})):G.items||[];return pe[ie]={...ge,response:{...ge.response,followUps:(We=ge.response)!=null&&We.followUps&&ge.response.followUps.length>0?ge.response.followUps:G.followUps||[],items:he,grounding:G.grounding||((q=ge.response)==null?void 0:q.grounding)||"embeddings",language:G.language||((ue=ge.response)==null?void 0:ue.language)||t}},pe})}catch(G){console.warn("[ChatPanel] Hydration failed (non-critical):",G)}}catch(re){const Ee=re instanceof Error?re.message:"Failed to send message";S(Ee)}finally{T.current=null,E.current&&(window.cancelAnimationFrame(E.current),E.current=null),b(!1)}}},[e,t,m,y]),U=w.useCallback(F=>{se(F.prompt)},[se]),Z=w.useCallback(F=>{if(F.preventDefault(),g.trim()){const ne=g.trim();x(""),se(ne)}},[g,se]),ee=w.useCallback(F=>{navigator.clipboard.writeText(F)},[]),de=w.useCallback(F=>{se(F,!0)},[se]),W=w.useCallback((F,ne)=>{s==null||s({startSeconds:F,endSeconds:ne})},[s]),V=w.useCallback(F=>{i==null||i(F)},[i]),ae=w.useCallback(F=>{for(let ne=F-1;ne>=0;ne--)if(m[ne].role==="user")return m[ne].content;return""},[m]),L=d==="compact",Q=O("flex flex-col h-full",h),K=O("flex-1 overflow-y-auto space-y-4",L?"px-4 pt-4":"p-4"),ve=F=>O("rounded-lg",L?"max-w-[90%] rounded-xl px-3 py-2.5":"max-w-[85%] px-4 py-3",F==="user"?L?"bg-brand-red text-white":"bg-primary text-white":"bg-gray-100 text-gray-900"),ye=L?"text-xs":"text-sm",Ke=L?"sm":"md",Re=m.length,Ce=Re>z,Tt=Ce?m.slice(Re-z):m,we=w.useCallback(()=>{j(F=>F+B)},[]);return w.useEffect(()=>{m.length<=B&&j(B)},[m.length]),f.jsxs("div",{className:Q,children:[f.jsxs("div",{className:K,children:[m.length===0&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:O("text-center text-gray-500",L?"py-6":"py-8"),children:[f.jsx(Jf,{className:O("mx-auto text-gray-300",L?"w-10 h-10 mb-3":"w-12 h-12 mb-4")}),f.jsx("p",{className:O("font-medium text-gray-700",L?"text-sm":"text-lg"),children:c}),f.jsx("p",{className:O("text-gray-500 mt-1",L?"text-xs":"text-sm"),children:l})]}),f.jsx("div",{className:"flex flex-col gap-2",children:R.map(F=>f.jsx("button",{onClick:()=>U(F),disabled:y,className:O("w-full text-left bg-gray-50 hover:bg-gray-100 rounded-lg border border-gray-200 text-gray-700 transition-colors disabled:opacity-50",L?"px-3 py-2.5 text-xs":"px-4 py-3 text-sm"),children:F.label},F.id))})]}),Ce&&f.jsx("div",{className:"flex justify-center pb-2",children:f.jsxs(yt,{variant:"ghost",size:"sm",onClick:we,className:O("text-gray-500 hover:text-gray-700",L?"h-7 px-3 text-xs":"h-8 px-4 text-sm"),children:[f.jsx(Zi,{className:O("mr-1",L?"w-3 h-3":"w-4 h-4")}),"Load ",Math.min(B,Re-z)," earlier messages"]})}),Tt.map((F,ne)=>{var ot,Ze,Pe;const re=Ce?Re-z+ne:ne,Ee=re===m.length-1;return f.jsx("div",{className:`flex ${F.role==="user"?"justify-end":"justify-start"}`,children:f.jsx("div",{className:ve(F.role),children:F.role==="user"?f.jsx("p",{className:ye,children:F.content}):f.jsx("div",{className:O("space-y-2",!L&&"space-y-3"),children:F.content.trim().length===0?f.jsxs("div",{className:"flex items-center gap-2 text-gray-500",children:[f.jsx(Zo,{className:O("animate-spin",L?"w-3 h-3":"w-4 h-4")}),f.jsx("span",{className:ye,children:"Thinking..."})]}):f.jsxs(f.Fragment,{children:[((ot=F.response)==null?void 0:ot.title)&&f.jsx("p",{className:O("font-semibold",L?"text-sm":"text-base"),children:F.response.title}),f.jsx("div",{className:"space-y-2",children:f.jsxs("div",{className:"relative",children:[f.jsx(pc,{markdown:F.content,onSeekToMoment:W,size:Ke}),F.status!=="complete"&&f.jsx("span",{className:O("inline-block animate-pulse align-baseline ml-0.5",L?"w-1.5":"w-2"),children:"▍"})]})}),F.status==="complete"&&((Ze=F.response)==null?void 0:Ze.grounding)==="transcript_only"&&f.jsx("p",{className:O("text-amber-600 mt-1",L?"text-[10px]":"text-xs"),children:"Note: Timestamps unavailable until indexing completes"}),F.status==="complete"&&f.jsxs("div",{className:O("flex items-center gap-2 border-t border-gray-200",L?"pt-1.5 gap-1.5":"pt-2"),children:[f.jsxs(yt,{variant:"ghost",size:"sm",onClick:()=>ee(F.content),className:O("text-gray-500 hover:text-gray-700","h-7 px-2 text-xs"),children:[f.jsx(Qi,{className:O("mr-1",L?"w-2.5 h-2.5":"w-3 h-3")}),"Copy"]}),f.jsxs(yt,{variant:"ghost",size:"sm",onClick:()=>de(ae(re)),disabled:y&&Ee,className:O("text-gray-500 hover:text-gray-700","h-7 px-2 text-xs"),children:[f.jsx(sp,{className:O("mr-1",L?"w-2.5 h-2.5":"w-3 h-3")}),"Regenerate"]}),i&&f.jsxs(yt,{variant:"ghost",size:"sm",onClick:()=>V(F.content),className:O("text-gray-500 hover:text-gray-700","h-7 px-2 text-xs"),children:[f.jsx(rp,{className:O("mr-1",L?"w-2.5 h-2.5":"w-3 h-3")}),"Add to notes"]})]}),F.status==="complete"&&a.enabled&&((Pe=F.response)==null?void 0:Pe.followUps)&&F.response.followUps.length>0&&Ee&&f.jsxs("div",{className:O("border-t border-gray-200 space-y-1",L?"pt-1.5":"pt-2"),children:[f.jsx("p",{className:O("text-gray-500",L?"text-[10px] mb-1":"text-xs mb-2"),children:"Follow-up:"}),F.response.followUps.slice(0,a.max).map((ze,Pt)=>f.jsx("button",{onClick:()=>se(ze),disabled:y,className:O("block w-full text-left bg-white hover:bg-gray-50 rounded border border-gray-200 text-gray-700 transition-colors disabled:opacity-50",L?"px-2 py-1.5 text-[10px]":"px-3 py-2 text-xs"),children:ze},Pt))]})]})})})},`${F.role}-${re}`)}),C&&f.jsx("div",{className:"text-center py-2",children:f.jsx("p",{className:O("text-red-500",L?"text-xs":"text-sm"),children:C})}),f.jsx("div",{ref:P})]}),f.jsx("div",{className:O("border-t border-gray-200 bg-white shrink-0",L?"p-3":"p-4"),children:f.jsxs("form",{onSubmit:Z,className:"flex items-center gap-2",children:[f.jsx("input",{ref:I,type:"text",value:g,onChange:F=>x(F.target.value),placeholder:u,disabled:y,className:O("flex-1 border border-gray-200 rounded-full focus:outline-none focus:ring-2 disabled:opacity-50",L?"px-3 py-2 text-xs focus:ring-brand-red/30 focus:border-brand-red/40":"px-4 py-2 text-sm focus:ring-primary/20 focus:border-primary")}),f.jsx(yt,{type:"submit",size:"icon",disabled:!g.trim()||y,className:O("rounded-full",L?"h-8 w-8 bg-brand-red hover:bg-brand-red/90":"h-10 w-10"),children:y?f.jsx(Zo,{className:O("animate-spin",L?"w-3.5 h-3.5":"w-4 h-4")}):f.jsx(ap,{className:L?"w-3.5 h-3.5":"w-4 h-4"})})]})})]})}const $m="0.2.12";exports.Accordion=Au;exports.AccordionContent=mi;exports.AccordionItem=pi;exports.AccordionTrigger=hi;exports.Alert=Ls;exports.AlertDescription=$s;exports.AlertDialog=km;exports.AlertDialogAction=Ql;exports.AlertDialogCancel=Jl;exports.AlertDialogContent=ql;exports.AlertDialogDescription=Zl;exports.AlertDialogFooter=Xl;exports.AlertDialogHeader=Yl;exports.AlertDialogOverlay=Hr;exports.AlertDialogPortal=Gl;exports.AlertDialogTitle=Kl;exports.AlertDialogTrigger=Dm;exports.AlertTitle=Fs;exports.Badge=Us;exports.Button=yt;exports.Card=Ts;exports.CardContent=Ms;exports.CardDescription=Ds;exports.CardHeader=Ps;exports.CardTitle=ks;exports.ChatPanel=Lm;exports.Checkbox=Rl;exports.CodeSample=Mm;exports.DEFAULT_SUGGESTIONS=ur;exports.Dialog=dp;exports.DialogClose=fp;exports.DialogContent=ea;exports.DialogDescription=oa;exports.DialogFooter=na;exports.DialogHeader=ta;exports.DialogOverlay=Mr;exports.DialogPortal=Ji;exports.DialogTitle=ra;exports.DialogTrigger=up;exports.DiscLoader=Ws;exports.Form=Vs;exports.FormField=Hs;exports.Input=js;exports.Label=Os;exports.LinkCopyButton=jm;exports.MarkdownText=pc;exports.Select=um;exports.SelectContent=ml;exports.SelectGroup=fm;exports.SelectItem=vl;exports.SelectLabel=gl;exports.SelectSeparator=yl;exports.SelectTrigger=fl;exports.SelectValue=pm;exports.Separator=Gs;exports.Spinner=Bs;exports.Squircle=tc;exports.Textarea=zs;exports.ThumbnailCard=ec;exports.ThumbnailPreviewOverlay=_m;exports.ThumbnailStrip=Im;exports.TimecodeTag=fc;exports.Toaster=Zd;exports.UI_LIBRARY_VERSION=$m;exports.cn=O;exports.formatSecondsAsTimecode=dc;exports.getBrowserLanguage=Om;exports.getDefaultSuggestions=cc;exports.linkifyTimeReferencesInMarkdown=uc;exports.messagesToStored=ac;exports.parseSseEvent=nc;exports.parseTimecodeToSeconds=mn;exports.readSseStream=rc;exports.safeReadChatFromStorage=oc;exports.safeRemoveChatFromStorage=ic;exports.safeWriteChatToStorage=sc;exports.storedToMessages=lc;exports.toast=Zt;
176
+ `);o=a.pop()||"";for(const c of a){if(c.trim().length===0||c.startsWith(":"))continue;const l=vc(c);l&&(yield l)}}}finally{n.releaseLock()}}function xc(e){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return Array.isArray(n)?n:null}catch{return null}}function bc(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function wc(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}function Sc(e){return e.map(t=>({role:t.role,content:t.content,response:t.response,status:t.status,timestamp:t.timestamp instanceof Date?t.timestamp.toISOString():new Date().toISOString()}))}function Cc(e){return e.map(t=>({role:t.role,content:t.content,response:t.response,status:"complete",timestamp:new Date(t.timestamp)}))}const wr={en:[{id:"key_takeaways",label:"What are the key takeaways?",prompt:"What are the key takeaways from this recording?"},{id:"main_topics",label:"What topics are discussed?",prompt:"What are the main topics discussed in this recording?"},{id:"notable_quotes",label:"Any notable quotes?",prompt:"What are the most memorable or impactful quotes from this recording?"}],es:[{id:"key_takeaways",label:"¿Cuáles son los puntos clave?",prompt:"¿Cuáles son los puntos clave de esta grabación?"},{id:"main_topics",label:"¿Qué temas se tratan?",prompt:"¿Cuáles son los principales temas tratados en esta grabación?"},{id:"notable_quotes",label:"¿Citas destacadas?",prompt:"¿Cuáles son las citas más memorables de esta grabación?"}],fr:[{id:"key_takeaways",label:"Points clés ?",prompt:"Quels sont les points clés de cet enregistrement ?"},{id:"main_topics",label:"Sujets abordés ?",prompt:"Quels sont les principaux sujets abordés dans cet enregistrement ?"},{id:"notable_quotes",label:"Citations marquantes ?",prompt:"Quelles sont les citations les plus mémorables de cet enregistrement ?"}],de:[{id:"key_takeaways",label:"Wichtigste Erkenntnisse?",prompt:"Was sind die wichtigsten Erkenntnisse aus dieser Aufnahme?"},{id:"main_topics",label:"Besprochene Themen?",prompt:"Welche Hauptthemen werden in dieser Aufnahme besprochen?"},{id:"notable_quotes",label:"Bemerkenswerte Zitate?",prompt:"Was sind die einprägsamsten Zitate aus dieser Aufnahme?"}],pt:[{id:"key_takeaways",label:"Quais são os pontos principais?",prompt:"Quais são os pontos principais desta gravação?"},{id:"main_topics",label:"Quais temas são discutidos?",prompt:"Quais são os principais temas discutidos nesta gravação?"},{id:"notable_quotes",label:"Alguma citação notável?",prompt:"Quais são as citações mais memoráveis desta gravação?"}],it:[{id:"key_takeaways",label:"Quali sono i punti chiave?",prompt:"Quali sono i punti chiave di questa registrazione?"},{id:"main_topics",label:"Quali argomenti vengono discussi?",prompt:"Quali sono i principali argomenti discussi in questa registrazione?"},{id:"notable_quotes",label:"Citazioni notevoli?",prompt:"Quali sono le citazioni più memorabili di questa registrazione?"}]};function Ec(e){const t=e.toLowerCase().split("-")[0];return wr[t]||wr.en}function tg(){return typeof navigator>"u"?"en":(navigator.language||navigator.userLanguage||"en").split("-")[0].toLowerCase()}function yn(e){const n=String(e||"").trim().split(":").map(r=>r.trim());if(n.length===2){const r=Number(n[0]),o=Number(n[1]);return!Number.isFinite(r)||!Number.isFinite(o)||o<0||o>59||r<0?null:r*60+o}if(n.length===3){const r=Number(n[0]),o=Number(n[1]),s=Number(n[2]);return!Number.isFinite(r)||!Number.isFinite(o)||!Number.isFinite(s)||o<0||o>59||s<0||s>59||r<0?null:r*3600+o*60+s}return null}function xn(e){const t=Math.max(0,Math.floor(e||0)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=t%60;return n>0?`${n}:${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`:`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`}function Rc(e){const t=String(e||""),n=/```[\s\S]*?```/g,r=[];let o=0,s;for(n.lastIndex=0;s=n.exec(t);)s.index>o&&r.push({type:"text",value:t.slice(o,s.index)}),r.push({type:"code",value:s[0]}),o=s.index+s[0].length;o<t.length&&r.push({type:"text",value:t.slice(o)});const i=/\b(\d{1,2}):([0-5]\d)(?::([0-5]\d))?\b/g,a=/\b(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\s*(?:-|–|—)\s*(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\b/g,c=/\[(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\s*(?:-|–|—)\s*(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\]/g,l=/\[(\d{1,2}:[0-5]\d(?::[0-5]\d)?)\]/g,u=/`[^`]*`/g,d=/!?\[[^\]]*?\]\([^\)]*?\)/g,h=/(\[\d{1,2}:[0-5]\d(?::[0-5]\d)?\]\(#t=\d+(?:&e=\d+)?\))\]\(#t=\d+(?:&e=\d+)?\)/g,m=/\[\s*(\[\d{1,2}:[0-5]\d(?::[0-5]\d)?\]\(#t=\d+(?:&e=\d+)?\))/g,v=/\(\s*(\[\d{1,2}:[0-5]\d(?::[0-5]\d)?\]\(#t=\d+(?:&e=\d+)?\))\s*\)/g,g=/\(\s*(\*{1,2}\s*\[\d{1,2}:[0-5]\d(?::[0-5]\d)?\]\(#t=\d+(?:&e=\d+)?\)\s*\*{1,2})\s*\)/g,x=r.map(S=>{if(S.type==="code")return S.value;const C=[];let E=0,T;for(u.lastIndex=0;T=u.exec(S.value);)T.index>E&&C.push(S.value.slice(E,T.index)),C.push(T[0]),E=T.index+T[0].length;return E<S.value.length&&C.push(S.value.slice(E)),C.map(R=>{if(R.startsWith("`")&&R.endsWith("`"))return R;const $=[];let V=0,z;for(d.lastIndex=0;z=d.exec(R);)z.index>V&&$.push(R.slice(V,z.index)),$.push(z[0]),V=z.index+z[0].length;return V<R.length&&$.push(R.slice(V)),$.map(j=>{const P=j.replace(/\[\s*(\[[^\]]+?\]\([^)]+?\))\s*\]/g,"$1");if(d.lastIndex=0,d.test(P))return P;const D=P.replace(c,"$1 - $2").replace(l,"$1").replace(a,(I,W,H)=>{const ae=yn(W),U=yn(H);return ae==null?I:U==null?`[${W}](#t=${ae})`:`[${W}](#t=${ae}&e=${U})`}),M=/\[[^\]]*?\]\(#t=[^)]*?\)/g,A=[];let k=0,N;for(M.lastIndex=0;N=M.exec(D);)N.index>k&&A.push(D.slice(k,N.index)),A.push(N[0]),k=N.index+N[0].length;return k<D.length&&A.push(D.slice(k)),A.map(I=>I.startsWith("[")&&/\(#t=/.test(I)?I:I.replace(i,W=>{const H=yn(W);return H==null?W:`[${W}](#t=${H})`})).join("")}).join("")}).join("")}).join("").replace(h,"$1").replace(m,"$1").replace(g,"$1").replace(v,"$1"),b=/\(#t=\d+(?:&e=\d+)?\)\]|\]\(#t=\d+(?:&e=\d+)?\)\)/;if(b.test(x)){const S=x.search(b),C=Math.max(0,S-40),E=Math.min(x.length,S+60),T=x.slice(C,E);console.warn("[Chat] Detected malformed time link tail:",{preview:T})}return x}const ng=new Map([["bold",f.createElement(f.Fragment,null,f.createElement("path",{d:"M200,28H160a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h40a20,20,0,0,0,20-20V48A20,20,0,0,0,200,28Zm-4,176H164V52h32ZM96,28H56A20,20,0,0,0,36,48V208a20,20,0,0,0,20,20H96a20,20,0,0,0,20-20V48A20,20,0,0,0,96,28ZM92,204H60V52H92Z"}))],["duotone",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,48V208a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,208,48ZM96,40H56a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8H96a8,8,0,0,0,8-8V48A8,8,0,0,0,96,40Z",opacity:"0.2"}),f.createElement("path",{d:"M200,32H160a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm0,176H160V48h40ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Zm0,176H56V48H96Z"}))],["fill",f.createElement(f.Fragment,null,f.createElement("path",{d:"M216,48V208a16,16,0,0,1-16,16H160a16,16,0,0,1-16-16V48a16,16,0,0,1,16-16h40A16,16,0,0,1,216,48ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Z"}))],["light",f.createElement(f.Fragment,null,f.createElement("path",{d:"M200,34H160a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,200,34Zm2,174a2,2,0,0,1-2,2H160a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM96,34H56A14,14,0,0,0,42,48V208a14,14,0,0,0,14,14H96a14,14,0,0,0,14-14V48A14,14,0,0,0,96,34Zm2,174a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H96a2,2,0,0,1,2,2Z"}))],["regular",f.createElement(f.Fragment,null,f.createElement("path",{d:"M200,32H160a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm0,176H160V48h40ZM96,32H56A16,16,0,0,0,40,48V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V48A16,16,0,0,0,96,32Zm0,176H56V48H96Z"}))],["thin",f.createElement(f.Fragment,null,f.createElement("path",{d:"M200,36H160a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,200,36Zm4,172a4,4,0,0,1-4,4H160a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM96,36H56A12,12,0,0,0,44,48V208a12,12,0,0,0,12,12H96a12,12,0,0,0,12-12V48A12,12,0,0,0,96,36Zm4,172a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H96a4,4,0,0,1,4,4Z"}))]]),rg=new Map([["bold",f.createElement(f.Fragment,null,f.createElement("path",{d:"M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z"}))],["duotone",f.createElement(f.Fragment,null,f.createElement("path",{d:"M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z",opacity:"0.2"}),f.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["fill",f.createElement(f.Fragment,null,f.createElement("path",{d:"M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z"}))],["light",f.createElement(f.Fragment,null,f.createElement("path",{d:"M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z"}))],["regular",f.createElement(f.Fragment,null,f.createElement("path",{d:"M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z"}))],["thin",f.createElement(f.Fragment,null,f.createElement("path",{d:"M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z"}))]]),og=w.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),no=f.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:i,children:a,weights:c,...l}=e,{color:u="currentColor",size:d,weight:h="regular",mirrored:m=!1,...v}=f.useContext(og);return f.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??d,height:o??d,fill:r??u,viewBox:"0 0 256 256",transform:i||m?"scale(-1, 1)":void 0,...v,...l},!!n&&f.createElement("title",null,n),a,c.get(s??h))});no.displayName="IconBase";const Nc=f.forwardRef((e,t)=>f.createElement(no,{ref:t,...e,weights:ng}));Nc.displayName="PauseIcon";const sg=Nc,Ac=f.forwardRef((e,t)=>f.createElement(no,{ref:t,...e,weights:rg}));Ac.displayName="PlayIcon";const ig=Ac;function ag({size:e,className:t}){return p.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:t,children:p.jsx("path",{d:"M12 5V2L8 6l4 4V7c2.76 0 5 2.24 5 5s-2.24 5-5 5a5 5 0 0 1-4.9-4H5.02A7 7 0 0 0 12 19a7 7 0 1 0 0-14z"})})}function Tc({label:e,seconds:t,endSeconds:n,disabled:r=!1,onClick:o,size:s="md",isActive:i=!1,isPlaying:a=!1,activeMomentCurrentSeconds:c=null,isSegmentEnded:l=!1,instanceId:u,onHoverStart:d,onHoverEnd:h}){xn(t);const m=typeof n=="number"?xn(n):null,v=!i||!a||typeof c!="number"||!Number.isFinite(c)?t:Math.max(t,Math.min(c,typeof n=="number"?n:c)),g=xn(v),y=m?`${g} - ${m}`:g,x=!!(i&&a),b=!!(i&&l&&!a),S=!!i,C=s==="sm"?"px-2 py-1 text-[10px] gap-1":"px-2.5 py-1 text-xs gap-1.5",E=s==="sm"?12:14;let T,R;S?(T="border-[#2662EA] bg-[#2662EA] text-white hover:bg-[#2662EA] hover:border-[#2662EA]",R="text-white"):(T="border-gray-200 bg-white text-gray-700 hover:bg-gray-50 hover:border-gray-300",R="text-black");const $=b?`Replay segment ${y}`:m?`Play segment ${y}`:`Play from ${y}`;let V;return b?V=p.jsx(ag,{size:E,className:`shrink-0 pointer-events-none ${R}`}):x?V=p.jsx(sg,{size:E,weight:"fill",className:`shrink-0 pointer-events-none ${R}`}):V=p.jsx(ig,{size:E,weight:"fill",className:`shrink-0 pointer-events-none ${R}`}),p.jsxs("button",{type:"button",onClick:()=>o(t,n,u),onMouseEnter:()=>d==null?void 0:d(t,n),onMouseLeave:()=>h==null?void 0:h(),disabled:r,"aria-label":$,className:`inline-flex items-center rounded-full border font-medium transition-colors cursor-pointer align-baseline disabled:opacity-50 disabled:cursor-not-allowed ${C} ${T}`,children:[V,p.jsx("span",{className:"pointer-events-none tabular-nums",children:y||e})]})}function Pc({markdown:e,onSeekToMoment:t,activeMomentInstanceId:n=null,isPlaying:r=!1,activeMomentCurrentSeconds:o=null,isSegmentEnded:s=!1,onHoverMoment:i,onHoverMomentEnd:a,size:c="md"}){const l=Rc(e),u=c==="sm"?"text-xs":"text-sm",d=w.useRef(0);d.current=0;const h=(m,v)=>{const g=d.current++;return`tc-${m}-${v??"x"}-${g}`};return p.jsx("div",{className:`${u} leading-relaxed`,children:p.jsx(Mc,{remarkPlugins:[Dc],components:{p:({children:m})=>p.jsx("p",{className:"mb-2 last:mb-0",children:m}),li:({children:m})=>{const v=Array.isArray(m)?m.map(g=>{var y;return w.isValidElement(g)&&g.type==="p"?(y=g.props)==null?void 0:y.children:g}):m;return p.jsx("li",{className:"ml-0",children:v})},a:({children:m,href:v})=>{const g=String(v||"");if(g.startsWith("#t=")){const y=g.replace(/^#/,""),x=new URLSearchParams(y),b=Number(x.get("t")),S=x.get("e")!=null?Number(x.get("e")):void 0,C=Array.isArray(m)?m.join(""):String(m||"");if(Number.isFinite(b)&&b>=0){const E=h(b,S),T=n===E;return p.jsx(Tc,{label:C,seconds:b,endSeconds:Number.isFinite(S)?S:void 0,onClick:t,size:c,isActive:T,isPlaying:r,activeMomentCurrentSeconds:T?o:null,isSegmentEnded:T&&s,instanceId:E,onHoverStart:i,onHoverEnd:a})}}return p.jsx("a",{href:v,target:"_blank",rel:"noreferrer",className:"underline underline-offset-4 text-blue-600 hover:text-blue-800",children:m})},ul:({children:m})=>p.jsx("ul",{className:"list-disc pl-5 mb-2 space-y-0.5 [&>li]:pl-1",children:m}),ol:({children:m})=>p.jsx("ol",{className:"list-decimal pl-5 mb-2 space-y-0.5 [&>li]:pl-1",children:m}),strong:({children:m})=>p.jsx("strong",{className:"font-bold",children:m}),em:({children:m})=>p.jsx("em",{className:"italic",children:m}),blockquote:({children:m})=>p.jsx("blockquote",{className:"border-l-2 border-gray-300 pl-3 text-gray-700 my-2",children:m}),code:({children:m,className:v,...g})=>typeof v=="string"&&v.includes("language-")?p.jsx("code",{className:"block font-mono text-[0.85em] leading-relaxed",...g,children:m}):p.jsx("code",{className:"rounded bg-gray-200/70 px-1 py-0.5 font-mono text-[0.85em]",...g,children:m}),pre:({children:m})=>p.jsx("pre",{className:"overflow-x-auto rounded-md bg-gray-200/70 p-3 font-mono text-[0.85em] leading-relaxed my-2",children:m})},children:l||""})})}function Ss(e){const t=/\n(?:---\s*\n)?\*?\*?Follow-?up(?: questions?)?:\*?\*?\s*\n([\s\S]*?)$/i,n=e.match(t);if(!n||typeof n.index!="number")return{cleanText:e,followUps:[],hasFollowUpSection:!1};const r=e.slice(0,n.index).trim(),o=n[1]||"",s=[],i=/[-•]\s*(.+?)(?:\?|$)/gm;let a;for(;(a=i.exec(o))!==null;){const c=a[1].trim();if(c){const l=c.replace(/^\[|\]$/g,"").trim();s.push(l.endsWith("?")?l:`${l}?`)}}return{cleanText:r,followUps:s.slice(0,2),hasFollowUpSection:!0}}function lg({transport:e,language:t,storageKey:n,persist:r=!!n,playerReady:o=!1,onPlayMoment:s,activeMomentInstanceId:i=null,isPlaying:a=!1,activeMomentCurrentSeconds:c=null,isSegmentEnded:l=!1,onHoverMoment:u,onHoverMomentEnd:d,onAddToNotes:h,followUps:m={enabled:!0,max:2},emptyStateTitle:v="Ask about this recording",emptyStateSubtitle:g="Get insights grounded in the transcript and visual content",inputPlaceholder:y="Ask about the video...",variant:x="default",className:b}){const[S,C]=w.useState([]),[E,T]=w.useState(""),[R,$]=w.useState(!1),[V,z]=w.useState(null),[j,P]=w.useState(null),O=w.useRef(null),[D,M]=w.useState(null),[A,k]=w.useState([]),[N,I]=w.useState(!0),W=20,[H,ae]=w.useState(W),U=w.useRef(null),X=w.useRef(null),se=w.useRef(null),pe=w.useRef(!1),_=w.useRef(!1),B=w.useRef(!1),ee=w.useRef(null),Y=w.useRef(null),K=w.useRef(null),q=w.useRef(null),de=w.useRef(null),ye=w.useRef(""),De=w.useRef("thinking"),Oe=w.useRef(!1),je=L=>{if(!L||L.length===0)return"0";const Z=L[L.length-1],le=(Z==null?void 0:Z.timestamp)instanceof Date?Z.timestamp.getTime():Date.parse(String((Z==null?void 0:Z.timestamp)||""));return[L.length,String((Z==null?void 0:Z.role)||""),String((Z==null?void 0:Z.status)||""),String((Z==null?void 0:Z.content)||"").length,Number.isFinite(le)?le:0].join("|")};w.useEffect(()=>{if(!r||!n){C([]),_.current=!0,B.current=!1;return}_.current=!1;const L=xc(n);if(L&&L.length>0){const le=Cc(L);C(le),B.current=!0,ee.current=Date.now()}else C([]),B.current=!1,ee.current=null;const Z=()=>{_.current=!0};return typeof queueMicrotask=="function"?queueMicrotask(Z):window.setTimeout(Z,0),()=>{q.current&&(q.current.abort(),q.current=null),de.current&&(window.cancelAnimationFrame(de.current),de.current=null),K.current&&(window.clearTimeout(K.current),K.current=null)}},[r,n]),w.useEffect(()=>{if(!(!r||!n||!_.current)){if(!S||S.length===0){wc(n);return}K.current&&window.clearTimeout(K.current),K.current=window.setTimeout(()=>{const L=S.slice(-50);bc(n,Sc(L))},250)}},[S,r,n]),w.useEffect(()=>{pe.current=!1},[n,e,t]),w.useEffect(()=>{if(pe.current||!e.suggestions){I(!1);return}pe.current=!0;const L=Ec(t),Z=new Set(L.map(ie=>`${ie.id}||${ie.label}||${ie.prompt}`));(async()=>{try{const ie=await e.suggestions(t);ie&&ie.length>0&&(ie.length===L.length&&ie.every(xe=>Z.has(`${xe.id}||${xe.label}||${xe.prompt}`))||k(ie))}catch(ie){console.warn("[ChatPanel] Failed to fetch dynamic suggestions:",ie)}finally{I(!1)}})()},[t,e]),w.useEffect(()=>{if(!X.current)return;const L=je(S);if(Y.current===L)return;const Z=Date.now(),le=ee.current,ie=U.current,xe=(ie?Math.max(0,ie.scrollHeight-ie.scrollTop-ie.clientHeight):0)<=24;if(B.current&&r&&n&&typeof window<"u"){const Ne=`memoreco:chat:last-scrolled-signature:${n}`;if(window.sessionStorage.getItem(Ne)===L){B.current=!1,Y.current=L;return}X.current.scrollIntoView({behavior:"auto"}),window.sessionStorage.setItem(Ne,L),B.current=!1,Y.current=L;return}if(le&&Z-le<1500&&xe){Y.current=L;return}X.current.scrollIntoView({behavior:"smooth"}),Y.current=L},[S,r,n]);const ke=w.useCallback(async(L,Z=!1)=>{if(!(!L.trim()||R)){if($(!0),z(null),Z||T(""),q.current&&(q.current.abort(),q.current=null),de.current&&(window.cancelAnimationFrame(de.current),de.current=null),ye.current="",De.current="thinking",Oe.current=!1,!Z){const le={role:"user",content:L,timestamp:new Date};C(ie=>[...ie,le])}try{const le=S.filter(Q=>Q.role==="user"||Q.role==="assistant"&&Q.response).slice(-10).map(Q=>{var re,ne;return{role:Q.role,content:Q.role==="user"?Q.content:((ne=(re=Q.response)==null?void 0:re.items)==null?void 0:ne.map(ve=>ve.text).join(`
177
+ `))||""}}),be={role:"assistant",content:"",response:{items:[{text:"",moments:[]}],followUps:[],grounding:"embeddings",language:t},status:"thinking",timestamp:new Date};C(Q=>{if(!Z)return[...Q,be];let re=-1;for(let ne=Q.length-1;ne>=0;ne--)if(Q[ne].role==="assistant"){re=ne;break}if(re>=0){const ne=[...Q];return ne[re]=be,ne}return[...Q,be]});const xe=new AbortController;q.current=xe;const Ne=await e.stream({prompt:L,language:t,history:Z?le.slice(0,-1):le,regenerate:Z},xe.signal);if(!Ne.ok||!Ne.body)throw new Error(`Failed to start streaming (${Ne.status})`);let Pe="";const G=(Q,re)=>{C(ne=>{let ve=-1;for(let mt=ne.length-1;mt>=0;mt--)if(ne[mt].role==="assistant"){ve=mt;break}if(ve<0)return ne;const ue=[...ne],ge=ue[ve],{cleanText:Qe,followUps:Ce,hasFollowUpSection:Ut}=Ss(Q),At=Ut?Qe:Q,sn=ge.response?{...ge.response,items:[{text:At,moments:[]}],...Ce.length>0?{followUps:Ce}:{}}:{items:[{text:At,moments:[]}],followUps:Ce,grounding:"embeddings",language:t};return ue[ve]={...ge,content:At,response:sn,status:re||ge.status},ue})},me=()=>{de.current||(de.current=window.requestAnimationFrame(()=>{de.current=null,G(ye.current,De.current)}))};for await(const Q of yc(Ne,xe.signal))if(Q.type==="chunk")Pe+=Q.token,ye.current=Pe,Oe.current||(Oe.current=!0,De.current="streaming"),me();else if(Q.type==="complete")De.current="complete",ye.current=Pe,me();else if(Q.type==="error")throw new Error(Q.message);De.current="complete",ye.current=Pe;const{cleanText:we,followUps:Ae}=Ss(Pe);if(C(Q=>{var ue,ge,Qe;let re=-1;for(let Ce=Q.length-1;Ce>=0;Ce--)if(Q[Ce].role==="assistant"){re=Ce;break}if(re<0)return Q;const ne=[...Q],ve=ne[re];return ne[re]={...ve,content:we,status:"complete",response:{...ve.response,items:[{text:we,moments:[]}],followUps:Ae.length>0?Ae:((ue=ve.response)==null?void 0:ue.followUps)||[],grounding:((ge=ve.response)==null?void 0:ge.grounding)||"embeddings",language:((Qe=ve.response)==null?void 0:Qe.language)||t}},ne}),$(!1),e.hydrate)try{const Q=await e.hydrate({prompt:L,language:t,history:Z?le.slice(0,-1):le,regenerate:!1},xe.signal);Q&&C(re=>{var Ut,At,sn,mt,ro,oo;let ne=-1;for(let gt=re.length-1;gt>=0;gt--)if(re[gt].role==="assistant"){ne=gt;break}if(ne<0)return re;const ve=[...re],ue=ve[ne],ge=((Ut=ue.response)==null?void 0:Ut.items)||[],Qe=((sn=(At=Q.items)==null?void 0:At[0])==null?void 0:sn.moments)||[],Ce=ge.length>0?ge.map((gt,kc)=>({...gt,moments:kc===0?Qe:gt.moments||[]})):Q.items||[];return ve[ne]={...ue,response:{...ue.response,followUps:(mt=ue.response)!=null&&mt.followUps&&ue.response.followUps.length>0?ue.response.followUps:Q.followUps||[],items:Ce,grounding:Q.grounding||((ro=ue.response)==null?void 0:ro.grounding)||"embeddings",language:Q.language||((oo=ue.response)==null?void 0:oo.language)||t}},ve})}catch(Q){console.warn("[ChatPanel] Hydration failed (non-critical):",Q)}}catch(le){const ie=le instanceof Error?le.message:"Failed to send message";z(ie),C(be=>{let xe=-1;for(let G=be.length-1;G>=0;G--)if(be[G].role==="assistant"){xe=G;break}if(xe<0)return be;const Ne=be[xe];if(Ne.status==="complete")return be;const Pe=[...be];return Pe[xe]={...Ne,status:"complete"},Pe})}finally{q.current=null,de.current&&(window.cancelAnimationFrame(de.current),de.current=null),$(!1)}}},[e,t,S,R]),Re=w.useCallback(L=>{ke(L.prompt)},[ke]),Un=w.useCallback(L=>{if(L.preventDefault(),E.trim()){const Z=E.trim();T(""),ke(Z)}},[E,ke]);w.useCallback(L=>{navigator.clipboard.writeText(L)},[]);const Gn=w.useCallback(async(L,Z)=>{try{await navigator.clipboard.writeText(L),P(Z),O.current&&window.clearTimeout(O.current),O.current=window.setTimeout(()=>{P(null),O.current=null},2e3)}catch{}},[]);w.useCallback(L=>{ke(L,!0)},[ke]);const Te=w.useCallback((L,Z)=>{M(Z),ke(L,!0)},[ke]);w.useEffect(()=>{if(!R&&D){const L=window.setTimeout(()=>M(null),150);return()=>window.clearTimeout(L)}},[R,D]),w.useEffect(()=>()=>{O.current&&(window.clearTimeout(O.current),O.current=null)},[]);const ot=w.useCallback((L,Z,le)=>{s==null||s({startSeconds:L,endSeconds:Z,instanceId:le})},[s]),Zn=w.useCallback(L=>{h==null||h(L)},[h]),qn=w.useCallback(L=>{for(let Z=L-1;Z>=0;Z--)if(S[Z].role==="user")return S[Z].content;return""},[S]),te=x==="compact",Yn=F("flex flex-col h-full",b),nn=F("flex-1 overflow-y-auto space-y-4",te?"px-4 pt-4":"p-4"),Ht=L=>F("rounded-lg",te?"max-w-[90%] rounded-xl px-3 py-2.5":"max-w-[85%] px-4 py-3",L==="user"?"bg-primary text-white":"bg-gray-100 text-gray-900"),Xe=te?"text-xs":"text-sm",rn=te?"sm":"md",Le=S.length,Wt=Le>H,Kn=Wt?S.slice(Le-H):S,on=w.useCallback(()=>{ae(L=>L+W)},[]);return w.useEffect(()=>{S.length<=W&&ae(W)},[S.length]),p.jsxs("div",{className:Yn,children:[p.jsxs("div",{ref:U,className:nn,children:[S.length===0&&p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:F("text-center text-gray-500",te?"py-6":"py-8"),children:[p.jsx(cp,{className:F("mx-auto text-gray-300",te?"w-10 h-10 mb-3":"w-12 h-12 mb-4")}),p.jsx("p",{className:F("font-medium text-gray-700",te?"text-sm":"text-lg"),children:v}),p.jsx("p",{className:F("text-gray-500 mt-1",te?"text-xs":"text-sm"),children:g})]}),p.jsx("div",{className:"flex flex-col gap-2",children:A.map(L=>p.jsx("button",{onClick:()=>Re(L),disabled:R,className:F("w-full text-left bg-gray-50 hover:bg-gray-100 rounded-lg border border-gray-200 text-gray-700 transition-colors disabled:opacity-50",te?"px-3 py-2.5 text-xs":"px-4 py-3 text-sm"),children:L.prompt||L.label},L.id))})]}),Wt&&p.jsx("div",{className:"flex justify-center pb-2",children:p.jsxs(vt,{variant:"ghost",size:"sm",onClick:on,className:F("text-gray-500 hover:text-gray-700",te?"h-7 px-3 text-xs":"h-8 px-4 text-sm"),children:[p.jsx(ca,{className:F("mr-1",te?"w-3 h-3":"w-4 h-4")}),"Load ",Math.min(W,Le-H)," earlier messages"]})}),Kn.map((L,Z)=>{var xe,Ne,Pe;const le=Wt?Le-H+Z:Z,ie=le===S.length-1,be=`${L.role}-${le}`;return p.jsx("div",{className:`flex ${L.role==="user"?"justify-end":"justify-start"}`,children:p.jsx("div",{className:Ht(L.role),children:L.role==="user"?p.jsx("p",{className:Xe,children:L.content}):p.jsx("div",{className:F("space-y-2",!te&&"space-y-3"),children:L.content.trim().length===0?p.jsxs("div",{className:"flex items-center gap-2 text-gray-500",children:[p.jsx(cs,{className:F("animate-spin",te?"w-3 h-3":"w-4 h-4")}),p.jsx("span",{className:Xe,children:"Thinking..."})]}):p.jsxs(p.Fragment,{children:[((xe=L.response)==null?void 0:xe.title)&&p.jsx("p",{className:F("font-semibold",te?"text-sm":"text-base"),children:L.response.title}),p.jsx("div",{className:"space-y-2",children:p.jsxs("div",{className:"relative",children:[p.jsx(Pc,{markdown:L.content,onSeekToMoment:ot,activeMomentInstanceId:i,isPlaying:a,activeMomentCurrentSeconds:c,isSegmentEnded:l,onHoverMoment:u,onHoverMomentEnd:d,size:rn}),ie&&R&&L.status!=="complete"&&p.jsx("span",{className:F("inline-block animate-pulse align-baseline ml-0.5",te?"w-1.5":"w-2"),children:"▍"})]})}),L.status==="complete"&&((Ne=L.response)==null?void 0:Ne.grounding)==="transcript_only"&&p.jsx("p",{className:F("text-amber-600 mt-1",te?"text-[10px]":"text-xs"),children:"Note: Timestamps unavailable until indexing completes"}),L.status==="complete"&&p.jsxs("div",{className:F("flex items-center gap-2",te?"mt-1.5 gap-1.5":"mt-2"),children:[p.jsxs(vt,{variant:"ghost",size:"sm",onClick:()=>Gn(L.content,be),className:F("text-gray-500 hover:text-gray-700","h-7 px-3 text-xs gap-2 cursor-pointer select-none active:scale-[0.96] transition-transform duration-100"),children:[j===be?p.jsx(en,{className:F("text-green-600",te?"w-2.5 h-2.5":"w-3 h-3")}):p.jsx(da,{className:F(te?"w-2.5 h-2.5":"w-3 h-3")}),"Copy"]}),ie&&p.jsxs(vt,{variant:"ghost",size:"sm",onClick:()=>Te(qn(le),be),disabled:R,className:F("text-gray-500 hover:text-gray-700","h-7 px-3 text-xs gap-2 cursor-pointer select-none active:scale-[0.96] transition-transform duration-100"),children:[p.jsx(pp,{className:F(D===be&&R?"animate-spin":"",te?"w-2.5 h-2.5":"w-3 h-3")}),"Regenerate"]}),h&&p.jsxs(vt,{variant:"ghost",size:"sm",onClick:()=>Zn(L.content),className:F("text-gray-500 hover:text-gray-700","h-7 px-3 text-xs gap-2 cursor-pointer select-none active:scale-[0.96] transition-transform duration-100"),children:[p.jsx(up,{className:F(te?"w-2.5 h-2.5":"w-3 h-3")}),"Add to notes"]})]}),L.status==="complete"&&m.enabled&&((Pe=L.response)==null?void 0:Pe.followUps)&&L.response.followUps.length>0&&ie&&p.jsxs("div",{className:F("mt-3 border-t border-gray-200 space-y-1",te?"pt-2.5":"pt-3"),children:[p.jsx("p",{className:F("text-gray-500",te?"text-[10px] mb-1":"text-xs mb-2"),children:"Follow-up:"}),L.response.followUps.slice(0,m.max).map((G,me)=>p.jsx("button",{onClick:()=>ke(G),disabled:R,className:F("block w-full text-left bg-white hover:bg-gray-50 rounded border border-gray-200 text-gray-700 transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",te?"px-2 py-1.5 text-[10px]":"px-3 py-2 text-xs"),children:G},me))]})]})})})},`${L.role}-${le}`)}),V&&p.jsx("div",{className:"text-center py-2",children:p.jsx("p",{className:F("text-red-500",te?"text-xs":"text-sm"),children:V})}),p.jsx("div",{ref:X})]}),p.jsx("div",{className:F("border-t border-gray-200 bg-white shrink-0",te?"p-3":"p-4"),children:p.jsxs("form",{onSubmit:Un,className:"flex items-center gap-2",children:[p.jsx("input",{ref:se,type:"text",value:E,onChange:L=>T(L.target.value),placeholder:y,disabled:R,className:F("flex-1 border border-gray-200 rounded-full focus:outline-none focus:ring-2 disabled:opacity-50",te?"px-3 py-2 text-xs focus:ring-primary/20 focus:border-primary":"px-4 py-2 text-sm focus:ring-primary/20 focus:border-primary")}),p.jsx(vt,{type:"submit",size:"icon",disabled:!E.trim()||R,className:F("rounded-full",te?"h-8 w-8 bg-primary hover:bg-primary/90 cursor-pointer disabled:cursor-not-allowed":"h-10 w-10 cursor-pointer disabled:cursor-not-allowed"),children:R?p.jsx(cs,{className:F("animate-spin",te?"w-3.5 h-3.5":"w-4 h-4")}):p.jsx(mp,{className:te?"w-3.5 h-3.5":"w-4 h-4"})})]})})]})}const cg="0.2.13";exports.Accordion=Lu;exports.AccordionContent=Ai;exports.AccordionItem=Ri;exports.AccordionTrigger=Ni;exports.Alert=Ys;exports.AlertDescription=Ks;exports.AlertDialog=$m;exports.AlertDialogAction=dc;exports.AlertDialogCancel=uc;exports.AlertDialogContent=sc;exports.AlertDialogDescription=cc;exports.AlertDialogFooter=ac;exports.AlertDialogHeader=ic;exports.AlertDialogOverlay=eo;exports.AlertDialogPortal=oc;exports.AlertDialogTitle=lc;exports.AlertDialogTrigger=Fm;exports.AlertTitle=Xs;exports.AvatarWithThumbhash=eg;exports.Badge=ri;exports.Button=vt;exports.Card=zs;exports.CardContent=Ws;exports.CardDescription=Hs;exports.CardHeader=Bs;exports.CardTitle=Vs;exports.ChatPanel=lg;exports.Checkbox=$l;exports.CodeSample=zm;exports.DEFAULT_SUGGESTIONS=wr;exports.Dialog=yp;exports.DialogClose=bp;exports.DialogContent=fa;exports.DialogDescription=ga;exports.DialogFooter=ha;exports.DialogHeader=pa;exports.DialogOverlay=Vr;exports.DialogPortal=ua;exports.DialogTitle=ma;exports.DialogTrigger=xp;exports.DiscLoader=ei;exports.Form=ti;exports.FormField=ni;exports.Input=Us;exports.Label=qs;exports.LinkCopyButton=Bm;exports.MarkdownText=Pc;exports.Select=xm;exports.SelectContent=Al;exports.SelectGroup=bm;exports.SelectItem=Pl;exports.SelectLabel=Tl;exports.SelectSeparator=kl;exports.SelectTrigger=El;exports.SelectValue=wm;exports.Separator=oi;exports.Spinner=Js;exports.Squircle=gc;exports.Textarea=Qs;exports.ThumbnailCard=fc;exports.ThumbnailPreviewOverlay=Vm;exports.ThumbnailStrip=Hm;exports.TimecodeTag=Tc;exports.Toaster=au;exports.UI_LIBRARY_VERSION=cg;exports.applyNativeSquircleStyle=hc;exports.buildSquircleOBBPath=qm;exports.buildSquircleRoundedRectPath=to;exports.cn=F;exports.formatSecondsAsTimecode=xn;exports.getBrowserLanguage=tg;exports.getDefaultSuggestions=Ec;exports.linkifyTimeReferencesInMarkdown=Rc;exports.messagesToStored=Sc;exports.parseSseEvent=vc;exports.parseTimecodeToSeconds=yn;exports.readSseStream=yc;exports.removeNativeSquircleStyle=mc;exports.safeReadChatFromStorage=xc;exports.safeRemoveChatFromStorage=wc;exports.safeWriteChatToStorage=bc;exports.storedToMessages=Cc;exports.supportsCornerShapeSquircle=pc;exports.toast=Kt;