buildgrid-ui 1.15.1 → 1.15.2
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/buildgrid-ui.umd.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ui;function
|
|
9
|
+
*/var ui;function fg(){if(ui)return En;ui=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var s=null;if(a!==void 0&&(s=""+a),o.key!==void 0&&(s=""+o.key),"key"in o){a={};for(var l in o)l!=="key"&&(a[l]=o[l])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:a}}return En.Fragment=t,En.jsx=n,En.jsxs=n,En}var kn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,62 +14,62 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var di;function
|
|
17
|
+
*/var di;function mg(){return di||(di=1,process.env.NODE_ENV!=="production"&&function(){function e(M){if(M==null)return null;if(typeof M=="function")return M.$$typeof===$?null:M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case g:return"Fragment";case y:return"Profiler";case b:return"StrictMode";case k:return"Suspense";case j:return"SuspenseList";case _:return"Activity"}if(typeof M=="object")switch(typeof M.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case v:return"Portal";case x:return(M.displayName||"Context")+".Provider";case w:return(M._context.displayName||"Context")+".Consumer";case S:var U=M.render;return M=M.displayName,M||(M=U.displayName||U.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case E:return U=M.displayName||null,U!==null?U:e(M.type)||"Memo";case P:U=M._payload,M=M._init;try{return e(M(U))}catch{}}return null}function t(M){return""+M}function n(M){try{t(M);var U=!1}catch{U=!0}if(U){U=console;var T=U.error,D=typeof Symbol=="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return T.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",D),t(M)}}function r(M){if(M===g)return"<>";if(typeof M=="object"&&M!==null&&M.$$typeof===P)return"<...>";try{var U=e(M);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function o(){var M=H.A;return M===null?null:M.getOwner()}function a(){return Error("react-stack-top-frame")}function s(M){if(z.call(M,"key")){var U=Object.getOwnPropertyDescriptor(M,"key").get;if(U&&U.isReactWarning)return!1}return M.key!==void 0}function l(M,U){function T(){te||(te=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}T.isReactWarning=!0,Object.defineProperty(M,"key",{get:T,configurable:!0})}function c(){var M=e(this.type);return W[M]||(W[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function d(M,U,T,D,L,F,J,A){return T=F.ref,M={$$typeof:p,type:M,key:U,props:F,_owner:L},(T!==void 0?T:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:c}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function f(M,U,T,D,L,F,J,A){var Y=U.children;if(Y!==void 0)if(D)if(ee(Y)){for(D=0;D<Y.length;D++)m(Y[D]);Object.freeze&&Object.freeze(Y)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Y);if(z.call(U,"key")){Y=e(M);var X=Object.keys(U).filter(function(oe){return oe!=="key"});D=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",O[Y+D]||(X=0<X.length?"{"+X.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,D,Y,X,Y),O[Y+D]=!0)}if(Y=null,T!==void 0&&(n(T),Y=""+T),s(U)&&(n(U.key),Y=""+U.key),"key"in U){T={};for(var ne in U)ne!=="key"&&(T[ne]=U[ne])}else T=U;return Y&&l(T,typeof M=="function"?M.displayName||M.name||"Unknown":M),d(M,Y,F,L,o(),T,J,A)}function m(M){typeof M=="object"&&M!==null&&M.$$typeof===p&&M._store&&(M._store.validated=1)}var h=C,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),H=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,ee=Array.isArray,K=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(M){return M()}};var te,W={},q=h["react-stack-bottom-frame"].bind(h,a)(),I=K(r(a)),O={};kn.Fragment=g,kn.jsx=function(M,U,T,D,L){var F=1e4>H.recentlyCreatedOwnerStacks++;return f(M,U,T,!1,D,L,F?Error("react-stack-top-frame"):q,F?K(r(M)):I)},kn.jsxs=function(M,U,T,D,L){var F=1e4>H.recentlyCreatedOwnerStacks++;return f(M,U,T,!0,D,L,F?Error("react-stack-top-frame"):q,F?K(r(M)):I)}}()),kn}var fi;function dg(){return fi||(fi=1,process.env.NODE_ENV==="production"?ir.exports=cg():ir.exports=ug()),ir.exports}var i=dg();function mi(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=mi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mi(e))&&(r&&(r+=" "),r+=t);return r}const Bo="-",fg=e=>{const t=pg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Bo);return l[0]===""&&l.length!==1&&l.shift(),pi(l,t)||mg(s)},getConflictingClassGroupIds:(s,l)=>{const c=n[s]||[];return l&&r[s]?[...c,...r[s]]:c}}},pi=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pi(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Bo);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},hi=/^\[(.+)\]$/,mg=e=>{if(hi.test(e)){const t=hi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pg=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)zo(n[o],r,o,t);return r},zo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:gi(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(hg(o)){zo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{zo(s,gi(t,a),n,r)})})},gi=(e,t)=>{let n=e;return t.split(Bo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hg=e=>e.isThemeGetter,gg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Vo="!",Wo=":",vg=Wo.length,bg=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,l=0,c=0,d;for(let v=0;v<o.length;v++){let g=o[v];if(s===0&&l===0){if(g===Wo){a.push(o.slice(c,v)),c=v+vg;continue}if(g==="/"){d=v;continue}}g==="["?s++:g==="]"?s--:g==="("?l++:g===")"&&l--}const f=a.length===0?o:o.substring(c),m=wg(f),h=m!==f,p=d&&d>c?d-c:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}};if(t){const o=t+Wo,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},wg=e=>e.endsWith(Vo)?e.substring(0,e.length-1):e.startsWith(Vo)?e.substring(1):e,yg=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},xg=e=>({cache:gg(e.cacheSize),parseClassName:bg(e),sortModifiers:yg(e),...fg(e)}),Cg=/\s+/,Ng=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(Cg);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:m,modifiers:h,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(f);if(m){c=f+(c.length>0?" "+c:c);continue}let b=!!g,y=r(b?v.substring(0,g):v);if(!y){if(!b){c=f+(c.length>0?" "+c:c);continue}if(y=r(v),!y){c=f+(c.length>0?" "+c:c);continue}b=!1}const w=a(h).join(":"),x=p?w+Vo:w,S=x+y;if(s.includes(S))continue;s.push(S);const k=o(y,b);for(let j=0;j<k.length;++j){const E=k[j];s.push(x+E)}c=f+(c.length>0?" "+c:c)}return c};function Sg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vi(t))&&(r&&(r+=" "),r+=n);return r}const vi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vi(e[r]))&&(n&&(n+=" "),n+=t);return n};function Eg(e,...t){let n,r,o,a=s;function s(c){const d=t.reduce((f,m)=>m(f),e());return n=xg(d),r=n.cache.get,o=n.cache.set,a=l,l(c)}function l(c){const d=r(c);if(d)return d;const f=Ng(c,n);return o(c,f),f}return function(){return a(Sg.apply(null,arguments))}}const Ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},bi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kg=/^\d+\/\d+$/,Pg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tg=/\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$/,Mg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_g=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>kg.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),pt=e=>!!e&&Number.isInteger(Number(e)),Ho=e=>e.endsWith("%")&&le(e.slice(0,-1)),lt=e=>Pg.test(e),Ag=()=>!0,Rg=e=>Tg.test(e)&&!Mg.test(e),yi=()=>!1,Ig=e=>jg.test(e),Dg=e=>_g.test(e),Og=e=>!Q(e)&&!Z(e),$g=e=>Qt(e,Ei,yi),Q=e=>bi.test(e),$t=e=>Qt(e,ki,Rg),Go=e=>Qt(e,Vg,le),xi=e=>Qt(e,Ni,yi),Lg=e=>Qt(e,Si,Dg),lr=e=>Qt(e,Pi,Ig),Z=e=>wi.test(e),Pn=e=>Zt(e,ki),Fg=e=>Zt(e,Wg),Ci=e=>Zt(e,Ni),Bg=e=>Zt(e,Ei),zg=e=>Zt(e,Si),cr=e=>Zt(e,Pi,!0),Qt=(e,t,n)=>{const r=bi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zt=(e,t,n=!1)=>{const r=wi.exec(e);return r?r[1]?t(r[1]):n:!1},Ni=e=>e==="position"||e==="percentage",Si=e=>e==="image"||e==="url",Ei=e=>e==="length"||e==="size"||e==="bg-size",ki=e=>e==="length",Vg=e=>e==="number",Wg=e=>e==="family-name",Pi=e=>e==="shadow",Hg=Eg(()=>{const e=Ne("color"),t=Ne("font"),n=Ne("text"),r=Ne("font-weight"),o=Ne("tracking"),a=Ne("leading"),s=Ne("breakpoint"),l=Ne("container"),c=Ne("spacing"),d=Ne("radius"),f=Ne("shadow"),m=Ne("inset-shadow"),h=Ne("text-shadow"),p=Ne("drop-shadow"),v=Ne("blur"),g=Ne("perspective"),b=Ne("aspect"),y=Ne("ease"),w=Ne("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),Z,Q],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],P=()=>[Z,Q,c],_=()=>[Xt,"full","auto",...P()],$=()=>[pt,"none","subgrid",Z,Q],H=()=>["auto",{span:["full",pt,Z,Q]},pt,Z,Q],z=()=>[pt,"auto",Z,Q],ee=()=>["auto","min","max","fr",Z,Q],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...P()],q=()=>[Xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],I=()=>[e,Z,Q],O=()=>[...S(),Ci,xi,{position:[Z,Q]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Bg,$g,{size:[Z,Q]}],T=()=>[Ho,Pn,$t],D=()=>["","none","full",d,Z,Q],L=()=>["",le,Pn,$t],F=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[le,Ho,Ci,xi],Y=()=>["","none",v,Z,Q],X=()=>["none",le,Z,Q],ne=()=>["none",le,Z,Q],oe=()=>[le,Z,Q],ie=()=>[Xt,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[Ag],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[Og],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",le],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xt,Q,Z,b]}],container:["container"],columns:[{columns:[le,Q,Z,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[pt,"auto",Z,Q]}],basis:[{basis:[Xt,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,Xt,"auto","initial","none",Q]}],grow:[{grow:["",le,Z,Q]}],shrink:[{shrink:["",le,Z,Q]}],order:[{order:[pt,"first","last","none",Z,Q]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[l,"screen",...q()]}],"min-w":[{"min-w":[l,"screen","none",...q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Pn,$t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,Go]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ho,Q]}],"font-family":[{font:[Fg,Q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Z,Q]}],"line-clamp":[{"line-clamp":[le,"none",Z,Go]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",Z,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",Z,$t]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[le,"auto",Z,Q]}],"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",Z,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pt,Z,Q],radial:["",Z,Q],conic:[pt,Z,Q]},zg,Lg]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,Z,Q]}],"outline-w":[{outline:["",le,Pn,$t]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",f,cr,lr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",m,cr,lr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[le,$t]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,cr,lr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[le,Z,Q]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Z,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,Q]}],filter:[{filter:["","none",Z,Q]}],blur:[{blur:Y()}],brightness:[{brightness:[le,Z,Q]}],contrast:[{contrast:[le,Z,Q]}],"drop-shadow":[{"drop-shadow":["","none",p,cr,lr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",le,Z,Q]}],"hue-rotate":[{"hue-rotate":[le,Z,Q]}],invert:[{invert:["",le,Z,Q]}],saturate:[{saturate:[le,Z,Q]}],sepia:[{sepia:["",le,Z,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,Q]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[le,Z,Q]}],"backdrop-contrast":[{"backdrop-contrast":[le,Z,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,Z,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,Z,Q]}],"backdrop-invert":[{"backdrop-invert":["",le,Z,Q]}],"backdrop-opacity":[{"backdrop-opacity":[le,Z,Q]}],"backdrop-saturate":[{"backdrop-saturate":[le,Z,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",le,Z,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",Z,Q]}],ease:[{ease:["linear","initial",y,Z,Q]}],delay:[{delay:[le,Z,Q]}],animate:[{animate:["none",w,Z,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Z,Q]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[Z,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",Z,Q]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[le,Pn,$t,Go]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function R(...e){return Hg(Fo(e))}const Gg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ug=(e,t,n)=>{let r;const o=Gg[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Jt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Yg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xg={date:Jt({formats:Yg,defaultWidth:"full"}),time:Jt({formats:Kg,defaultWidth:"full"}),dateTime:Jt({formats:qg,defaultWidth:"full"})},Qg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Zg=(e,t,n,r)=>Qg[e];function Ze(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):s;o=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Jg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ev={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},nv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},rv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ov={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},av={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ze({values:Jg,defaultWidth:"wide"}),quarter:Ze({values:ev,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ze({values:tv,defaultWidth:"wide"}),day:Ze({values:nv,defaultWidth:"wide"}),dayPeriod:Ze({values:rv,defaultWidth:"wide",formattingValues:ov,defaultFormattingWidth:"wide"})};function Je(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?iv(l,m=>m.test(s)):sv(l,m=>m.test(s));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function sv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function iv(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ti(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const l=t.slice(o.length);return{value:s,rest:l}}}const lv=/^(\d+)(th|st|nd|rd)?/i,cv=/\d+/i,uv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dv={any:[/^b/i,/^(a|c)/i]},fv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mv={any:[/1/i,/2/i,/3/i,/4/i]},pv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hv={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gv={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bv={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yv={ordinalNumber:Ti({matchPattern:lv,parsePattern:cv,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:uv,defaultMatchWidth:"wide",parsePatterns:dv,defaultParseWidth:"any"}),quarter:Je({matchPatterns:fv,defaultMatchWidth:"wide",parsePatterns:mv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:pv,defaultMatchWidth:"wide",parsePatterns:hv,defaultParseWidth:"any"}),day:Je({matchPatterns:gv,defaultMatchWidth:"wide",parsePatterns:vv,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:bv,defaultMatchWidth:"any",parsePatterns:wv,defaultParseWidth:"any"})},Uo={code:"en-US",formatDistance:Ug,formatLong:Xg,formatRelative:Zg,localize:av,match:yv,options:{weekStartsOn:0,firstWeekContainsDate:1}};let xv={};function ur(){return xv}const Mi=6048e5,Cv=864e5,ji=Symbol.for("constructDateFrom");function Ve(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ji in e?e[ji](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return Ve(t||e,e)}function _i(e){const t=Me(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Nv(e,...t){const n=Ve.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ai(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Sv(e,t,n){const[r,o]=Nv(n==null?void 0:n.in,e,t),a=Ai(r),s=Ai(o),l=+a-_i(a),c=+s-_i(s);return Math.round((l-c)/Cv)}function Ev(e,t){const n=Me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function kv(e,t){const n=Me(e,t==null?void 0:t.in);return Sv(n,Ev(n))+1}function Tn(e,t){var l,c,d,f;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function dr(e,t){return Tn(e,{...t,weekStartsOn:1})}function Ri(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ve(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=dr(o),s=Ve(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=dr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Pv(e,t){const n=Ri(e,t),r=Ve(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),dr(r)}function Tv(e,t){const n=Me(e,t==null?void 0:t.in),r=+dr(n)-+Pv(n);return Math.round(r/Mi)+1}function Ii(e,t){var f,m,h,p;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=ur(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=Ve((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const l=Tn(s,t),c=Ve((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=Tn(c,t);return+n>=+l?r+1:+n>=+d?r:r-1}function Mv(e,t){var l,c,d,f;const n=ur(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=Ii(e,t),a=Ve((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Tn(a,t)}function jv(e,t){const n=Me(e,t==null?void 0:t.in),r=+Tn(n,t)-+Mv(n,t);return Math.round(r/Mi)+1}function de(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ht={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return de(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):de(n+1,2)},d(e,t){return de(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return de(e.getHours()%12||12,t.length)},H(e,t){return de(e.getHours(),t.length)},m(e,t){return de(e.getMinutes(),t.length)},s(e,t){return de(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return de(o,t.length)}},en={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Di={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ht.y(e,t)},Y:function(e,t,n,r){const o=Ii(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return de(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):de(a,t.length)},R:function(e,t){const n=Ri(e);return de(n,t.length)},u:function(e,t){const n=e.getFullYear();return de(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return de(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return de(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ht.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return de(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=jv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):de(o,t.length)},I:function(e,t,n){const r=Tv(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):de(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ht.d(e,t)},D:function(e,t,n){const r=kv(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):de(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return de(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return de(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return de(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=en.noon:r===0?o=en.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=en.evening:r>=12?o=en.afternoon:r>=4?o=en.morning:o=en.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ht.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ht.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):de(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):de(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ht.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ht.s(e,t)},S:function(e,t){return ht.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $i(r);case"XXXX":case"XX":return Lt(r);case"XXXXX":case"XXX":default:return Lt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $i(r);case"xxxx":case"xx":return Lt(r);case"xxxxx":case"xxx":default:return Lt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Oi(r,":");case"OOOO":default:return"GMT"+Lt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Oi(r,":");case"zzzz":default:return"GMT"+Lt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return de(r,t.length)},T:function(e,t,n){return de(+e,t.length)}};function Oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+de(a,2)}function $i(e,t){return e%60===0?(e>0?"-":"+")+de(Math.abs(e)/60,2):Lt(e,t)}function Lt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=de(Math.trunc(r/60),2),a=de(r%60,2);return n+o+t+a}const Li=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Fi=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},_v={p:Fi,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Li(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Li(r,t)).replace("{{time}}",Fi(o,t))}},Av=/^D+$/,Rv=/^Y+$/,Iv=["D","DD","YY","YYYY"];function Dv(e){return Av.test(e)}function Ov(e){return Rv.test(e)}function $v(e,t,n){const r=Lv(e,t,n);if(console.warn(r),Iv.includes(e))throw new RangeError(r)}function Lv(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Fv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Bv(e){return!(!Fv(e)&&typeof e!="number"||isNaN(+Me(e)))}const zv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wv=/^'([^]*?)'?$/,Hv=/''/g,Gv=/[a-zA-Z]/;function Yo(e,t,n){var f,m,h,p,v,g,b,y;const r=ur(),o=(n==null?void 0:n.locale)??r.locale??Uo,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(b=r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,l=Me(e,n==null?void 0:n.in);if(!Bv(l))throw new RangeError("Invalid time value");let c=t.match(Vv).map(w=>{const x=w[0];if(x==="p"||x==="P"){const S=_v[x];return S(w,o.formatLong)}return w}).join("").match(zv).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:Uv(w)};if(Di[x])return{isToken:!0,value:w};if(x.match(Gv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Ov(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Dv(x))&&$v(x,t,String(e));const S=Di[x[0]];return S(l,x,o.localize,d)}).join("")}function Uv(e){const t=e.match(Wv);return t?t[1].replace(Hv,"'"):e}function Bi(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return Ve(e,NaN);if(!t)return r;const o=r.getDate(),a=Ve(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function Yv(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Kv(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ve(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function qv(e,t,n){return Bi(e,-1,n)}function Xv(e,t){const n=tb(t);return"formatToParts"in n?Zv(n,e):Jv(n,e)}const Qv={year:0,month:1,day:2,hour:3,minute:4,second:5};function Zv(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=Qv[n[o].type];a!==void 0&&(r[a]=parseInt(n[o].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function Jv(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Ko={},zi=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),eb=zi==="06/25/2014, 00:00:00"||zi==="06/25/2014 00:00:00";function tb(e){return Ko[e]||(Ko[e]=eb?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Ko[e]}function Vi(e,t,n,r,o,a,s){const l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,o,a,s),l}const Wi=36e5,nb=6e4,qo={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Hi(e,t,n){if(!e)return 0;let r=qo.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=qo.timezoneHH.exec(e),r)return o=parseInt(r[1],10),Gi(o)?-(o*Wi):NaN;if(r=qo.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return Gi(o,s)?(a=Math.abs(o)*Wi+s*nb,r[1]==="+"?-a:a):NaN}if(ab(e)){t=new Date(t||Date.now());const s=n?t:rb(t),l=Xo(s,e);return-(n?l:ob(t,l,e))}return NaN}function rb(e){return Vi(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Xo(e,t){const n=Xv(e,t),r=Vi(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const a=o%1e3;return o-=a>=0?a:1e3+a,r-o}function ob(e,t,n){let o=e.getTime()-t;const a=Xo(new Date(o),n);if(t===a)return t;o-=a-t;const s=Xo(new Date(o),n);return a===s?a:Math.max(a,s)}function Gi(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Ui={};function ab(e){if(Ui[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Ui[e]=!0,!0}catch{return!1}}function Yi(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const sb=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Qo=36e5,Ki=6e4,ib=2,Pe={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:sb};function lb(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?ib:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=cb(e),{year:o,restDateString:a}=ub(r.date,n),s=db(a,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const l=s.getTime();let c=0,d;if(r.time&&(c=fb(r.time),c===null||isNaN(c)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=Hi(r.timeZone||t.timeZone,new Date(l+c)),isNaN(d))return new Date(NaN)}else d=Yi(new Date(l+c)),d=Yi(new Date(l+c+d));return new Date(l+c+d)}else return new Date(NaN)}function cb(e){const t={};let n=Pe.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Pe.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=Pe.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function ub(e,t){if(e){const n=Pe.YYY[t],r=Pe.YYYYY[t];let o=Pe.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=Pe.YY.exec(e)||n.exec(e),o){const a=o[1];return{year:parseInt(a,10)*100,restDateString:e.slice(a.length)}}}return{year:null}}function db(e,t){if(t===null)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=Pe.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Qi(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Pe.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return hb(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=Pe.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return Qi(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=Pe.Www.exec(e),a)return o=parseInt(a[1],10)-1,Zi(o)?qi(t,o):new Date(NaN);if(a=Pe.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Zi(o,s)?qi(t,o,s):new Date(NaN)}return null}function fb(e){let t,n,r=Pe.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Zo(t)?t%24*Qo:NaN;if(r=Pe.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Zo(t,n)?t%24*Qo+n*Ki:NaN;if(r=Pe.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Zo(t,n,o)?t%24*Qo+n*Ki+o*1e3:NaN}return null}function qi(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,a=t*7+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}const mb=[31,28,31,30,31,30,31,31,30,31,30,31],pb=[31,29,31,30,31,30,31,31,30,31,30,31];function Xi(e){return e%400===0||e%4===0&&e%100!==0}function Qi(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Xi(e);if(r&&n>pb[t]||!r&&n>mb[t])return!1}return!0}function hb(e,t){if(t<1)return!1;const n=Xi(e);return!(n&&t>366||!n&&t>365)}function Zi(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Zo(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function gb(e,t,n){e=lb(e,n);const r=Hi(t,e,!0),o=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}const vb=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Jo=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},bb=e=>{if(!e)return"";const t=gb(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[Jo(t.getUTCDate(),2),Jo(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},wb=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),yb=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),xb=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)),Cb=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),Nb=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),Sb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),Eb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),kb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),Pb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),Tb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),Mb=e=>e.slice(0,7),jb=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function ea(e,t){const n={...t};for(const r in e)e.hasOwnProperty(r)&&(typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])&&typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?n[r]=ea(e[r],t[r]):n[r]=e[r]);return n}const Re=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",ta=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Ji=(e,t)=>ta(e).includes(ta(t)),_b=(e,t)=>Re(e)<Re(t)?-1:Re(e)>Re(t)?1:0,Ab=(e,t)=>Re(e.name)<Re(t.name)?-1:Re(e.name)>Re(t.name)?1:0,Rb=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,Ib=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,Db=(e,t,n,r)=>Re(e[n][r])<Re(t[n][r])?-1:Re(e[n][r])>Re(t[n][r])?1:0,Ob=e=>e.charAt(0).toUpperCase()+e.slice(1),el=(e,t)=>e.replace(/{{\s*(\w+)\s*}}/g,(n,r)=>t[r]!==void 0?String(t[r]):""),$b=({children:e,className:t,...n})=>i.jsx("div",{className:R("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),Lb=({children:e,className:t,...n})=>i.jsx("div",{className:R("group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl","bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]","transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",t),...n,children:e});function tl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let n=!1;const r=e.map(o=>{const a=tl(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():tl(e[o],null)}}}}function re(...e){return u.useCallback(et(...e),e)}function gt(e){const t=Bb(e),n=u.forwardRef((r,o)=>{const{children:a,...s}=r,l=u.Children.toArray(a),c=l.find(zb);if(c){const d=c.props.children,f=l.map(m=>m===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:m);return i.jsx(t,{...s,ref:o,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Fb=gt("Slot");function Bb(e){const t=u.forwardRef((n,r)=>{const{children:o,...a}=n;if(u.isValidElement(o)){const s=Wb(o),l=Vb(a,o.props);return o.type!==u.Fragment&&(l.ref=r?et(r,s):s),u.cloneElement(o,l)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nl=Symbol("radix.slottable");function rl(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=nl,t}function zb(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nl}function Vb(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const c=a(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Wb(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)}const ol=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Hb=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},Gb=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Fo(a)};return{compose:function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Object.assign(c=>{const d=Object.fromEntries(Object.entries(c||{}).filter(f=>{let[m]=f;return!["class","className"].includes(m)}));return t(a.map(f=>f(d)),c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a.reduce((c,d)=>{let{variants:f}=d;for(const m in f)c[m]=[...new Set([...c[m]??[],...f[m]??[]])];return c},{})})},cva:o=>{const{variants:a,defaultVariants:s}=o??{};return Object.assign(c=>{var d;if(a==null)return t(o==null?void 0:o.base,c==null?void 0:c.class,c==null?void 0:c.className);const f=Object.keys(a).map(p=>{const v=c==null?void 0:c[p],g=s==null?void 0:s[p],b=ol(v)||ol(g);return a[p][b]}),m={...s,...c&&Object.entries(c).reduce((p,v)=>{let[g,b]=v;return b!==void 0&&Object.assign(p,{[g]:b}),p},{})},h=o==null||(d=o.compoundVariants)===null||d===void 0?void 0:d.reduce((p,v)=>{let{class:g,className:b,...y}=v;return Object.entries(y).every(w=>{let[x,S]=w;const k=m[x];return Array.isArray(S)?S.includes(k):k===S})?[...p,g,b]:p},[]);return t(o==null?void 0:o.base,f,h,c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a?Object.fromEntries(Object.entries(a).filter(c=>{let[d]=c;return!d.startsWith("$")}).map(c=>{let[d,f]=c;return[d,Object.keys(f).map(m=>Hb(m))]})):{}})},cx:t}},{cva:al}=Gb(),na={base:["inline-flex items-center justify-center gap-2 whitespace-nowrap hover:cursor-pointer","rounded-md text-sm font-medium transition-colors focus-visible:outline-none","focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none","disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 py-2",lg:"h-10 px-8",xl:"h-12 px-10 text-xl",icon:"h-9 w-9"},rounded:{true:"rounded-full"}},defaultVariants:{variant:"default",size:"md",rounded:!1}},fr=al(na),fe=u.forwardRef(({className:e,variant:t="default",size:n="md",rounded:r=!1,isLoading:o=!1,asChild:a=!1,theme:s=na,...l},c)=>{const d=a?Fb:"button",f=ea(s,na),m=al(f);return i.jsxs(d,{className:R(m({variant:t,size:n,rounded:r,className:e})),ref:c,...l,disabled:o||l.disabled,children:[o&&i.jsxs("svg",{className:"animate-spin -ml-1 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loader-svg",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),l.children]})});fe.displayName="Button";const mr=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...t})}));mr.displayName="Table";const pr=u.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:R("[&_tr]:border-b",e),...t}));pr.displayName="TableHeader";const hr=u.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:R("[&_tr:last-child]:border-0",e),...t}));hr.displayName="TableBody";const sl=u.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));sl.displayName="TableFooter";const tn=u.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));tn.displayName="TableRow";const Mn=u.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:R("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Mn.displayName="TableHead";const nn=u.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:R("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));nn.displayName="TableCell";const il=u.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:R("mt-4 text-sm text-muted-foreground",e),...t}));il.displayName="TableCaption";/**
|
|
22
|
+
<%s key={someKey} {...props} />`,D,Y,X,Y),O[Y+D]=!0)}if(Y=null,T!==void 0&&(n(T),Y=""+T),s(U)&&(n(U.key),Y=""+U.key),"key"in U){T={};for(var ne in U)ne!=="key"&&(T[ne]=U[ne])}else T=U;return Y&&l(T,typeof M=="function"?M.displayName||M.name||"Unknown":M),d(M,Y,F,L,o(),T,J,A)}function m(M){typeof M=="object"&&M!==null&&M.$$typeof===p&&M._store&&(M._store.validated=1)}var h=C,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),H=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,ee=Array.isArray,K=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(M){return M()}};var te,W={},q=h["react-stack-bottom-frame"].bind(h,a)(),I=K(r(a)),O={};kn.Fragment=g,kn.jsx=function(M,U,T,D,L){var F=1e4>H.recentlyCreatedOwnerStacks++;return f(M,U,T,!1,D,L,F?Error("react-stack-top-frame"):q,F?K(r(M)):I)},kn.jsxs=function(M,U,T,D,L){var F=1e4>H.recentlyCreatedOwnerStacks++;return f(M,U,T,!0,D,L,F?Error("react-stack-top-frame"):q,F?K(r(M)):I)}}()),kn}var fi;function pg(){return fi||(fi=1,process.env.NODE_ENV==="production"?ir.exports=fg():ir.exports=mg()),ir.exports}var i=pg();function mi(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=mi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mi(e))&&(r&&(r+=" "),r+=t);return r}const Bo="-",hg=e=>{const t=vg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Bo);return l[0]===""&&l.length!==1&&l.shift(),pi(l,t)||gg(s)},getConflictingClassGroupIds:(s,l)=>{const c=n[s]||[];return l&&r[s]?[...c,...r[s]]:c}}},pi=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pi(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Bo);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},hi=/^\[(.+)\]$/,gg=e=>{if(hi.test(e)){const t=hi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},vg=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)zo(n[o],r,o,t);return r},zo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:gi(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(bg(o)){zo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{zo(s,gi(t,a),n,r)})})},gi=(e,t)=>{let n=e;return t.split(Bo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bg=e=>e.isThemeGetter,wg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Vo="!",Wo=":",yg=Wo.length,xg=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,l=0,c=0,d;for(let v=0;v<o.length;v++){let g=o[v];if(s===0&&l===0){if(g===Wo){a.push(o.slice(c,v)),c=v+yg;continue}if(g==="/"){d=v;continue}}g==="["?s++:g==="]"?s--:g==="("?l++:g===")"&&l--}const f=a.length===0?o:o.substring(c),m=Cg(f),h=m!==f,p=d&&d>c?d-c:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}};if(t){const o=t+Wo,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Cg=e=>e.endsWith(Vo)?e.substring(0,e.length-1):e.startsWith(Vo)?e.substring(1):e,Ng=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},Sg=e=>({cache:wg(e.cacheSize),parseClassName:xg(e),sortModifiers:Ng(e),...hg(e)}),Eg=/\s+/,kg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(Eg);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:m,modifiers:h,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}=n(f);if(m){c=f+(c.length>0?" "+c:c);continue}let b=!!g,y=r(b?v.substring(0,g):v);if(!y){if(!b){c=f+(c.length>0?" "+c:c);continue}if(y=r(v),!y){c=f+(c.length>0?" "+c:c);continue}b=!1}const w=a(h).join(":"),x=p?w+Vo:w,S=x+y;if(s.includes(S))continue;s.push(S);const k=o(y,b);for(let j=0;j<k.length;++j){const E=k[j];s.push(x+E)}c=f+(c.length>0?" "+c:c)}return c};function Pg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vi(t))&&(r&&(r+=" "),r+=n);return r}const vi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vi(e[r]))&&(n&&(n+=" "),n+=t);return n};function Tg(e,...t){let n,r,o,a=s;function s(c){const d=t.reduce((f,m)=>m(f),e());return n=Sg(d),r=n.cache.get,o=n.cache.set,a=l,l(c)}function l(c){const d=r(c);if(d)return d;const f=kg(c,n);return o(c,f),f}return function(){return a(Pg.apply(null,arguments))}}const Ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},bi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mg=/^\d+\/\d+$/,jg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_g=/\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$/,Ag=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ig=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>Mg.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),pt=e=>!!e&&Number.isInteger(Number(e)),Ho=e=>e.endsWith("%")&&le(e.slice(0,-1)),lt=e=>jg.test(e),Dg=()=>!0,Og=e=>_g.test(e)&&!Ag.test(e),yi=()=>!1,$g=e=>Rg.test(e),Lg=e=>Ig.test(e),Fg=e=>!Q(e)&&!Z(e),Bg=e=>Qt(e,Ei,yi),Q=e=>bi.test(e),Lt=e=>Qt(e,ki,Og),Go=e=>Qt(e,Gg,le),xi=e=>Qt(e,Ni,yi),zg=e=>Qt(e,Si,Lg),lr=e=>Qt(e,Pi,$g),Z=e=>wi.test(e),Pn=e=>Zt(e,ki),Vg=e=>Zt(e,Ug),Ci=e=>Zt(e,Ni),Wg=e=>Zt(e,Ei),Hg=e=>Zt(e,Si),cr=e=>Zt(e,Pi,!0),Qt=(e,t,n)=>{const r=bi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zt=(e,t,n=!1)=>{const r=wi.exec(e);return r?r[1]?t(r[1]):n:!1},Ni=e=>e==="position"||e==="percentage",Si=e=>e==="image"||e==="url",Ei=e=>e==="length"||e==="size"||e==="bg-size",ki=e=>e==="length",Gg=e=>e==="number",Ug=e=>e==="family-name",Pi=e=>e==="shadow",Yg=Tg(()=>{const e=Ne("color"),t=Ne("font"),n=Ne("text"),r=Ne("font-weight"),o=Ne("tracking"),a=Ne("leading"),s=Ne("breakpoint"),l=Ne("container"),c=Ne("spacing"),d=Ne("radius"),f=Ne("shadow"),m=Ne("inset-shadow"),h=Ne("text-shadow"),p=Ne("drop-shadow"),v=Ne("blur"),g=Ne("perspective"),b=Ne("aspect"),y=Ne("ease"),w=Ne("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),Z,Q],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],P=()=>[Z,Q,c],_=()=>[Xt,"full","auto",...P()],$=()=>[pt,"none","subgrid",Z,Q],H=()=>["auto",{span:["full",pt,Z,Q]},pt,Z,Q],z=()=>[pt,"auto",Z,Q],ee=()=>["auto","min","max","fr",Z,Q],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...P()],q=()=>[Xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],I=()=>[e,Z,Q],O=()=>[...S(),Ci,xi,{position:[Z,Q]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Wg,Bg,{size:[Z,Q]}],T=()=>[Ho,Pn,Lt],D=()=>["","none","full",d,Z,Q],L=()=>["",le,Pn,Lt],F=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[le,Ho,Ci,xi],Y=()=>["","none",v,Z,Q],X=()=>["none",le,Z,Q],ne=()=>["none",le,Z,Q],oe=()=>[le,Z,Q],ie=()=>[Xt,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[Dg],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[Fg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",le],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xt,Q,Z,b]}],container:["container"],columns:[{columns:[le,Q,Z,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[pt,"auto",Z,Q]}],basis:[{basis:[Xt,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,Xt,"auto","initial","none",Q]}],grow:[{grow:["",le,Z,Q]}],shrink:[{shrink:["",le,Z,Q]}],order:[{order:[pt,"first","last","none",Z,Q]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[l,"screen",...q()]}],"min-w":[{"min-w":[l,"screen","none",...q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Pn,Lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,Go]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ho,Q]}],"font-family":[{font:[Vg,Q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Z,Q]}],"line-clamp":[{"line-clamp":[le,"none",Z,Go]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",Z,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",Z,Lt]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[le,"auto",Z,Q]}],"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",Z,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pt,Z,Q],radial:["",Z,Q],conic:[pt,Z,Q]},Hg,zg]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,Z,Q]}],"outline-w":[{outline:["",le,Pn,Lt]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",f,cr,lr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",m,cr,lr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[le,Lt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,cr,lr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[le,Z,Q]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Z,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,Q]}],filter:[{filter:["","none",Z,Q]}],blur:[{blur:Y()}],brightness:[{brightness:[le,Z,Q]}],contrast:[{contrast:[le,Z,Q]}],"drop-shadow":[{"drop-shadow":["","none",p,cr,lr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",le,Z,Q]}],"hue-rotate":[{"hue-rotate":[le,Z,Q]}],invert:[{invert:["",le,Z,Q]}],saturate:[{saturate:[le,Z,Q]}],sepia:[{sepia:["",le,Z,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,Q]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[le,Z,Q]}],"backdrop-contrast":[{"backdrop-contrast":[le,Z,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,Z,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,Z,Q]}],"backdrop-invert":[{"backdrop-invert":["",le,Z,Q]}],"backdrop-opacity":[{"backdrop-opacity":[le,Z,Q]}],"backdrop-saturate":[{"backdrop-saturate":[le,Z,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",le,Z,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",Z,Q]}],ease:[{ease:["linear","initial",y,Z,Q]}],delay:[{delay:[le,Z,Q]}],animate:[{animate:["none",w,Z,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Z,Q]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[Z,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",Z,Q]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[le,Pn,Lt,Go]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function R(...e){return Yg(Fo(e))}const Kg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},qg=(e,t,n)=>{let r;const o=Kg[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Jt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jg={date:Jt({formats:Xg,defaultWidth:"full"}),time:Jt({formats:Qg,defaultWidth:"full"}),dateTime:Jt({formats:Zg,defaultWidth:"full"})},ev={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tv=(e,t,n,r)=>ev[e];function Ze(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):s;o=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const nv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ov={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},av={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},sv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},iv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lv={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ze({values:nv,defaultWidth:"wide"}),quarter:Ze({values:rv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ze({values:ov,defaultWidth:"wide"}),day:Ze({values:av,defaultWidth:"wide"}),dayPeriod:Ze({values:sv,defaultWidth:"wide",formattingValues:iv,defaultFormattingWidth:"wide"})};function Je(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?uv(l,m=>m.test(s)):cv(l,m=>m.test(s));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function cv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function uv(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ti(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const l=t.slice(o.length);return{value:s,rest:l}}}const dv=/^(\d+)(th|st|nd|rd)?/i,fv=/\d+/i,mv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pv={any:[/^b/i,/^(a|c)/i]},hv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gv={any:[/1/i,/2/i,/3/i,/4/i]},vv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},bv={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},wv={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xv={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Cv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nv={ordinalNumber:Ti({matchPattern:dv,parsePattern:fv,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:mv,defaultMatchWidth:"wide",parsePatterns:pv,defaultParseWidth:"any"}),quarter:Je({matchPatterns:hv,defaultMatchWidth:"wide",parsePatterns:gv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:vv,defaultMatchWidth:"wide",parsePatterns:bv,defaultParseWidth:"any"}),day:Je({matchPatterns:wv,defaultMatchWidth:"wide",parsePatterns:yv,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:xv,defaultMatchWidth:"any",parsePatterns:Cv,defaultParseWidth:"any"})},Uo={code:"en-US",formatDistance:qg,formatLong:Jg,formatRelative:tv,localize:lv,match:Nv,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Sv={};function ur(){return Sv}const Mi=6048e5,Ev=864e5,ji=Symbol.for("constructDateFrom");function Ve(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ji in e?e[ji](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return Ve(t||e,e)}function _i(e){const t=Me(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function kv(e,...t){const n=Ve.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ai(e,t){const n=Me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Pv(e,t,n){const[r,o]=kv(n==null?void 0:n.in,e,t),a=Ai(r),s=Ai(o),l=+a-_i(a),c=+s-_i(s);return Math.round((l-c)/Ev)}function Tv(e,t){const n=Me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Mv(e,t){const n=Me(e,t==null?void 0:t.in);return Pv(n,Tv(n))+1}function Tn(e,t){var l,c,d,f;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=Me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function dr(e,t){return Tn(e,{...t,weekStartsOn:1})}function Ri(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ve(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=dr(o),s=Ve(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=dr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function jv(e,t){const n=Ri(e,t),r=Ve(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),dr(r)}function _v(e,t){const n=Me(e,t==null?void 0:t.in),r=+dr(n)-+jv(n);return Math.round(r/Mi)+1}function Ii(e,t){var f,m,h,p;const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=ur(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=Ve((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const l=Tn(s,t),c=Ve((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=Tn(c,t);return+n>=+l?r+1:+n>=+d?r:r-1}function Av(e,t){var l,c,d,f;const n=ur(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=Ii(e,t),a=Ve((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Tn(a,t)}function Rv(e,t){const n=Me(e,t==null?void 0:t.in),r=+Tn(n,t)-+Av(n,t);return Math.round(r/Mi)+1}function de(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ht={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return de(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):de(n+1,2)},d(e,t){return de(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return de(e.getHours()%12||12,t.length)},H(e,t){return de(e.getHours(),t.length)},m(e,t){return de(e.getMinutes(),t.length)},s(e,t){return de(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return de(o,t.length)}},en={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Di={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ht.y(e,t)},Y:function(e,t,n,r){const o=Ii(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return de(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):de(a,t.length)},R:function(e,t){const n=Ri(e);return de(n,t.length)},u:function(e,t){const n=e.getFullYear();return de(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return de(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return de(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ht.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return de(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Rv(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):de(o,t.length)},I:function(e,t,n){const r=_v(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):de(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ht.d(e,t)},D:function(e,t,n){const r=Mv(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):de(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return de(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return de(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return de(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=en.noon:r===0?o=en.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=en.evening:r>=12?o=en.afternoon:r>=4?o=en.morning:o=en.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ht.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ht.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):de(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):de(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ht.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ht.s(e,t)},S:function(e,t){return ht.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $i(r);case"XXXX":case"XX":return Ft(r);case"XXXXX":case"XXX":default:return Ft(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $i(r);case"xxxx":case"xx":return Ft(r);case"xxxxx":case"xxx":default:return Ft(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Oi(r,":");case"OOOO":default:return"GMT"+Ft(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Oi(r,":");case"zzzz":default:return"GMT"+Ft(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return de(r,t.length)},T:function(e,t,n){return de(+e,t.length)}};function Oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+de(a,2)}function $i(e,t){return e%60===0?(e>0?"-":"+")+de(Math.abs(e)/60,2):Ft(e,t)}function Ft(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=de(Math.trunc(r/60),2),a=de(r%60,2);return n+o+t+a}const Li=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Fi=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Iv={p:Fi,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Li(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Li(r,t)).replace("{{time}}",Fi(o,t))}},Dv=/^D+$/,Ov=/^Y+$/,$v=["D","DD","YY","YYYY"];function Lv(e){return Dv.test(e)}function Fv(e){return Ov.test(e)}function Bv(e,t,n){const r=zv(e,t,n);if(console.warn(r),$v.includes(e))throw new RangeError(r)}function zv(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Vv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wv(e){return!(!Vv(e)&&typeof e!="number"||isNaN(+Me(e)))}const Hv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Uv=/^'([^]*?)'?$/,Yv=/''/g,Kv=/[a-zA-Z]/;function Yo(e,t,n){var f,m,h,p,v,g,b,y;const r=ur(),o=(n==null?void 0:n.locale)??r.locale??Uo,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(b=r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,l=Me(e,n==null?void 0:n.in);if(!Wv(l))throw new RangeError("Invalid time value");let c=t.match(Gv).map(w=>{const x=w[0];if(x==="p"||x==="P"){const S=Iv[x];return S(w,o.formatLong)}return w}).join("").match(Hv).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const x=w[0];if(x==="'")return{isToken:!1,value:qv(w)};if(Di[x])return{isToken:!0,value:w};if(x.match(Kv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const x=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Fv(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Lv(x))&&Bv(x,t,String(e));const S=Di[x[0]];return S(l,x,o.localize,d)}).join("")}function qv(e){const t=e.match(Uv);return t?t[1].replace(Yv,"'"):e}function Bi(e,t,n){const r=Me(e,n==null?void 0:n.in);if(isNaN(t))return Ve(e,NaN);if(!t)return r;const o=r.getDate(),a=Ve(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function Xv(e,t){const n=Me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Qv(e,t){const n=Me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ve(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Zv(e,t,n){return Bi(e,-1,n)}function Jv(e,t){const n=ob(t);return"formatToParts"in n?tb(n,e):nb(n,e)}const eb={year:0,month:1,day:2,hour:3,minute:4,second:5};function tb(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const a=eb[n[o].type];a!==void 0&&(r[a]=parseInt(n[o].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function nb(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Ko={},zi=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),rb=zi==="06/25/2014, 00:00:00"||zi==="06/25/2014 00:00:00";function ob(e){return Ko[e]||(Ko[e]=rb?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Ko[e]}function Vi(e,t,n,r,o,a,s){const l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,o,a,s),l}const Wi=36e5,ab=6e4,qo={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Hi(e,t,n){if(!e)return 0;let r=qo.timezoneZ.exec(e);if(r)return 0;let o,a;if(r=qo.timezoneHH.exec(e),r)return o=parseInt(r[1],10),Gi(o)?-(o*Wi):NaN;if(r=qo.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return Gi(o,s)?(a=Math.abs(o)*Wi+s*ab,r[1]==="+"?-a:a):NaN}if(lb(e)){t=new Date(t||Date.now());const s=n?t:sb(t),l=Xo(s,e);return-(n?l:ib(t,l,e))}return NaN}function sb(e){return Vi(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Xo(e,t){const n=Jv(e,t),r=Vi(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const a=o%1e3;return o-=a>=0?a:1e3+a,r-o}function ib(e,t,n){let o=e.getTime()-t;const a=Xo(new Date(o),n);if(t===a)return t;o-=a-t;const s=Xo(new Date(o),n);return a===s?a:Math.max(a,s)}function Gi(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Ui={};function lb(e){if(Ui[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Ui[e]=!0,!0}catch{return!1}}function Yi(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const cb=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Qo=36e5,Ki=6e4,ub=2,Pe={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:cb};function db(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?ub:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=fb(e),{year:o,restDateString:a}=mb(r.date,n),s=pb(a,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const l=s.getTime();let c=0,d;if(r.time&&(c=hb(r.time),c===null||isNaN(c)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=Hi(r.timeZone||t.timeZone,new Date(l+c)),isNaN(d))return new Date(NaN)}else d=Yi(new Date(l+c)),d=Yi(new Date(l+c+d));return new Date(l+c+d)}else return new Date(NaN)}function fb(e){const t={};let n=Pe.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=Pe.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=Pe.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function mb(e,t){if(e){const n=Pe.YYY[t],r=Pe.YYYYY[t];let o=Pe.YYYY.exec(e)||r.exec(e);if(o){const a=o[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(o=Pe.YY.exec(e)||n.exec(e),o){const a=o[1];return{year:parseInt(a,10)*100,restDateString:e.slice(a.length)}}}return{year:null}}function pb(e,t){if(t===null)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=Pe.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,Qi(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=Pe.DDD.exec(e),a){n=new Date(0);const s=parseInt(a[1],10);return bb(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(a=Pe.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const s=parseInt(a[2],10);return Qi(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(a=Pe.Www.exec(e),a)return o=parseInt(a[1],10)-1,Zi(o)?qi(t,o):new Date(NaN);if(a=Pe.WwwD.exec(e),a){o=parseInt(a[1],10)-1;const s=parseInt(a[2],10)-1;return Zi(o,s)?qi(t,o,s):new Date(NaN)}return null}function hb(e){let t,n,r=Pe.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Zo(t)?t%24*Qo:NaN;if(r=Pe.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Zo(t,n)?t%24*Qo+n*Ki:NaN;if(r=Pe.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Zo(t,n,o)?t%24*Qo+n*Ki+o*1e3:NaN}return null}function qi(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,a=t*7+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}const gb=[31,28,31,30,31,30,31,31,30,31,30,31],vb=[31,29,31,30,31,30,31,31,30,31,30,31];function Xi(e){return e%400===0||e%4===0&&e%100!==0}function Qi(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=Xi(e);if(r&&n>vb[t]||!r&&n>gb[t])return!1}return!0}function bb(e,t){if(t<1)return!1;const n=Xi(e);return!(n&&t>366||!n&&t>365)}function Zi(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Zo(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function wb(e,t,n){e=db(e,n);const r=Hi(t,e,!0),o=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}const yb=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Jo=(e,t=2)=>{for(e=e.toString();e.length<t;)e="0"+e;return e},xb=e=>{if(!e)return"";const t=wb(new Date(e.seconds?e.seconds*1e3:e),"America/Sao_Paulo");return[Jo(t.getUTCDate(),2),Jo(t.getUTCMonth()+1,2),t.getUTCFullYear()].join("/")},Cb=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"short"}).format(e),Nb=e=>new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit"}).format(e),Sb=e=>new Intl.DateTimeFormat("pt-BR",{year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)),Eb=e=>new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(e),kb=e=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(e),Pb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),Tb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Mb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),jb=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),_b=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),Ab=e=>e.slice(0,7),Rb=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"});function ea(e,t){const n={...t};for(const r in e)e.hasOwnProperty(r)&&(typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])&&typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?n[r]=ea(e[r],t[r]):n[r]=e[r]);return n}const Re=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():"",ta=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replaceAll(" ","").toLowerCase():"",Ji=(e,t)=>ta(e).includes(ta(t)),Ib=(e,t)=>Re(e)<Re(t)?-1:Re(e)>Re(t)?1:0,Db=(e,t)=>Re(e.name)<Re(t.name)?-1:Re(e.name)>Re(t.name)?1:0,Ob=(e,t,n)=>e[n]<t[n]?-1:e[n]>t[n]?1:0,$b=(e,t,n)=>e[n]>t[n]?-1:e[n]<t[n]?1:0,Lb=(e,t,n,r)=>Re(e[n][r])<Re(t[n][r])?-1:Re(e[n][r])>Re(t[n][r])?1:0,Fb=e=>e.charAt(0).toUpperCase()+e.slice(1),el=(e,t)=>e.replace(/{{\s*(\w+)\s*}}/g,(n,r)=>t[r]!==void 0?String(t[r]):""),Bb=({children:e,className:t,...n})=>i.jsx("div",{className:R("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e}),zb=({children:e,className:t,...n})=>i.jsx("div",{className:R("group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl","bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]","transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",t),...n,children:e});function tl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let n=!1;const r=e.map(o=>{const a=tl(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():tl(e[o],null)}}}}function re(...e){return u.useCallback(et(...e),e)}function gt(e){const t=Wb(e),n=u.forwardRef((r,o)=>{const{children:a,...s}=r,l=u.Children.toArray(a),c=l.find(Hb);if(c){const d=c.props.children,f=l.map(m=>m===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:m);return i.jsx(t,{...s,ref:o,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return i.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Vb=gt("Slot");function Wb(e){const t=u.forwardRef((n,r)=>{const{children:o,...a}=n;if(u.isValidElement(o)){const s=Ub(o),l=Gb(a,o.props);return o.type!==u.Fragment&&(l.ref=r?et(r,s):s),u.cloneElement(o,l)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nl=Symbol("radix.slottable");function rl(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=nl,t}function Hb(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nl}function Gb(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const c=a(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Ub(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)}const ol=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yb=e=>{if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);return Number.isNaN(t)?e:t},Kb=e=>{const t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Fo(a)};return{compose:function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return Object.assign(c=>{const d=Object.fromEntries(Object.entries(c||{}).filter(f=>{let[m]=f;return!["class","className"].includes(m)}));return t(a.map(f=>f(d)),c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a.reduce((c,d)=>{let{variants:f}=d;for(const m in f)c[m]=[...new Set([...c[m]??[],...f[m]??[]])];return c},{})})},cva:o=>{const{variants:a,defaultVariants:s}=o??{};return Object.assign(c=>{var d;if(a==null)return t(o==null?void 0:o.base,c==null?void 0:c.class,c==null?void 0:c.className);const f=Object.keys(a).map(p=>{const v=c==null?void 0:c[p],g=s==null?void 0:s[p],b=ol(v)||ol(g);return a[p][b]}),m={...s,...c&&Object.entries(c).reduce((p,v)=>{let[g,b]=v;return b!==void 0&&Object.assign(p,{[g]:b}),p},{})},h=o==null||(d=o.compoundVariants)===null||d===void 0?void 0:d.reduce((p,v)=>{let{class:g,className:b,...y}=v;return Object.entries(y).every(w=>{let[x,S]=w;const k=m[x];return Array.isArray(S)?S.includes(k):k===S})?[...p,g,b]:p},[]);return t(o==null?void 0:o.base,f,h,c==null?void 0:c.class,c==null?void 0:c.className)},{variants:a?Object.fromEntries(Object.entries(a).filter(c=>{let[d]=c;return!d.startsWith("$")}).map(c=>{let[d,f]=c;return[d,Object.keys(f).map(m=>Yb(m))]})):{}})},cx:t}},{cva:al}=Kb(),na={base:["inline-flex items-center justify-center gap-2 whitespace-nowrap hover:cursor-pointer","rounded-md text-sm font-medium transition-colors focus-visible:outline-none","focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none","disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 py-2",lg:"h-10 px-8",xl:"h-12 px-10 text-xl",icon:"h-9 w-9"},rounded:{true:"rounded-full"}},defaultVariants:{variant:"default",size:"md",rounded:!1}},fr=al(na),fe=u.forwardRef(({className:e,variant:t="default",size:n="md",rounded:r=!1,isLoading:o=!1,asChild:a=!1,theme:s=na,...l},c)=>{const d=a?Vb:"button",f=ea(s,na),m=al(f);return i.jsxs(d,{className:R(m({variant:t,size:n,rounded:r,className:e})),ref:c,...l,disabled:o||l.disabled,children:[o&&i.jsxs("svg",{className:"animate-spin -ml-1 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loader-svg",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),l.children]})});fe.displayName="Button";const mr=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:R("w-full caption-bottom text-sm",e),...t})}));mr.displayName="Table";const pr=u.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:R("[&_tr]:border-b",e),...t}));pr.displayName="TableHeader";const hr=u.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:R("[&_tr:last-child]:border-0",e),...t}));hr.displayName="TableBody";const sl=u.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:R("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));sl.displayName="TableFooter";const tn=u.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:R("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));tn.displayName="TableRow";const Mn=u.forwardRef(({className:e,...t},n)=>i.jsx("th",{ref:n,className:R("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Mn.displayName="TableHead";const nn=u.forwardRef(({className:e,...t},n)=>i.jsx("td",{ref:n,className:R("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));nn.displayName="TableCell";const il=u.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:R("mt-4 text-sm text-muted-foreground",e),...t}));il.displayName="TableCaption";/**
|
|
23
23
|
* @license lucide-react v0.525.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const qb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ll=e=>{const t=Xb(e);return t.charAt(0).toUpperCase()+t.slice(1)},cl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Qb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
28
|
* @license lucide-react v0.525.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var
|
|
32
|
+
*/var Zb={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"};/**
|
|
33
33
|
* @license lucide-react v0.525.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const Jb=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...l},c)=>C.createElement("svg",{ref:c,...Zb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cl("lucide",o),...!a&&!Qb(l)&&{"aria-hidden":"true"},...l},[...s.map(([d,f])=>C.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
|
|
38
38
|
* @license lucide-react v0.525.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const ue=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(
|
|
42
|
+
*/const ue=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(Jb,{ref:a,iconNode:t,className:cl(`lucide-${qb(ll(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ll(e),n};/**
|
|
43
43
|
* @license lucide-react v0.525.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const ew=ue("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
48
48
|
* @license lucide-react v0.525.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const tw=ue("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
53
53
|
* @license lucide-react v0.525.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const nw=ue("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
58
58
|
* @license lucide-react v0.525.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const rw=ue("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
63
63
|
* @license lucide-react v0.525.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const ow=ue("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
68
68
|
* @license lucide-react v0.525.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const aw=ue("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
|
|
73
73
|
* @license lucide-react v0.525.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
@@ -94,22 +94,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const sw=ue("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
98
98
|
* @license lucide-react v0.525.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const iw=ue("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
103
103
|
* @license lucide-react v0.525.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const lw=ue("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
108
108
|
* @license lucide-react v0.525.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const cw=ue("circle-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]]);/**
|
|
113
113
|
* @license lucide-react v0.525.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
@@ -129,67 +129,67 @@ React keys must be passed directly to JSX without using spread:
|
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const uw=ue("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
133
133
|
* @license lucide-react v0.525.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const dw=ue("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
138
138
|
* @license lucide-react v0.525.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const fw=ue("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
143
143
|
* @license lucide-react v0.525.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const mw=ue("file-down",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
|
|
148
148
|
* @license lucide-react v0.525.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
152
|
+
*/const pw=ue("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
|
|
153
153
|
* @license lucide-react v0.525.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
157
|
+
*/const hw=ue("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
158
158
|
* @license lucide-react v0.525.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const
|
|
162
|
+
*/const gw=ue("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
163
163
|
* @license lucide-react v0.525.0 - ISC
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
167
|
+
*/const vw=ue("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
|
|
168
168
|
* @license lucide-react v0.525.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const
|
|
172
|
+
*/const bw=ue("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
173
173
|
* @license lucide-react v0.525.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const
|
|
177
|
+
*/const ww=ue("list-ordered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
178
178
|
* @license lucide-react v0.525.0 - ISC
|
|
179
179
|
*
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const
|
|
182
|
+
*/const yw=ue("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
183
183
|
* @license lucide-react v0.525.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const
|
|
187
|
+
*/const xw=ue("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
188
188
|
* @license lucide-react v0.525.0 - ISC
|
|
189
189
|
*
|
|
190
190
|
* This source code is licensed under the ISC license.
|
|
191
191
|
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const
|
|
192
|
+
*/const Cw=ue("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|
193
193
|
* @license lucide-react v0.525.0 - ISC
|
|
194
194
|
*
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
@@ -199,18 +199,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
199
199
|
*
|
|
200
200
|
* This source code is licensed under the ISC license.
|
|
201
201
|
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const
|
|
202
|
+
*/const Nw=ue("sliders-horizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
203
203
|
* @license lucide-react v0.525.0 - ISC
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const
|
|
207
|
+
*/const Sw=ue("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
|
|
208
208
|
* @license lucide-react v0.525.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const vt=ue("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ml=Fo,Ft=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ml(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],m=a==null?void 0:a[d];if(f===null)return null;const h=fl(f)||fl(m);return o[d][h]}),l=n&&Object.entries(n).reduce((d,f)=>{let[m,h]=f;return h===void 0||(d[m]=h),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:m,className:h,...p}=f;return Object.entries(p).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...a,...l}[g]):{...a,...l}[g]===b})?[...d,m,h]:d},[]);return ml(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},pl=Ft("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function on({className:e,variant:t,...n}){return i.jsx("div",{className:R(pl({variant:t}),e),...n})}function Cw({searchTerm:e,activeFilters:t,sortState:n,filters:r,columns:o,onClearSearch:a,onClearFilter:s,onClearSort:l}){var d;return Object.values(t).filter(f=>f&&f!=="all").length>0||e.trim().length>0||n.field!==null?i.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.trim()&&i.jsxs(on,{variant:"secondary",className:"gap-1",children:["Search: ",e,i.jsx(vt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:a})]}),Object.entries(t).map(([f,m])=>{if(!m||m==="all")return null;const h=r.find(v=>String(v.field)===f),p=h==null?void 0:h.options.find(v=>v.value===m);return i.jsxs(on,{variant:"secondary",className:"gap-1",children:[h==null?void 0:h.label,": ",(p==null?void 0:p.label)||m,i.jsx(vt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>s(f)})]},f)}),n.field&&i.jsxs(on,{variant:"secondary",className:"gap-1",children:["Sort:"," ",((d=o.find(f=>String(f.key)===n.field))==null?void 0:d.title)||n.field," ",n.direction==="asc"?"↑":"↓",i.jsx(vt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:l})]})]}):null}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Nw(e,t){const n=u.createContext(t),r=a=>{const{children:s,...l}=a,c=u.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function be(e,t=[]){let n=[];function r(a,s){const l=u.createContext(s),c=n.length;n=[...n,s];const d=m=>{var y;const{scope:h,children:p,...v}=m,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,b=u.useMemo(()=>v,Object.values(v));return i.jsx(g.Provider,{value:b,children:p})};d.displayName=a+"Provider";function f(m,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[c])||l,v=u.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>u.createContext(s));return function(l){const c=(l==null?void 0:l[e])||a;return u.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,Sw(o,...t)]}function Sw(...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(a){const s=r.reduce((l,{useScope:c,scopeName:d})=>{const m=c(a)[`__scope${d}`];return{...l,...m}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ge=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Ew=u[" useInsertionEffect ".trim().toString()]||ge;function ye({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=kw({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const m=f.current;m!==l&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,r])}const d=u.useCallback(f=>{var m;if(l){const h=Pw(f)?f(e):f;h!==e&&((m=s.current)==null||m.call(s,h))}else a(f)},[l,e,a,s]);return[c,d]}function kw({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),a=u.useRef(t);return Ew(()=>{a.current=t},[t]),u.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Pw(e){return typeof e=="function"}var Tw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=Tw.reduce((e,t)=>{const n=gt(`Primitive.${t}`),r=u.forwardRef((o,a)=>{const{asChild:s,...l}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vr(e,t){e&&sr.flushSync(()=>e.dispatchEvent(t))}function an(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:y}=g,w=C.useRef(null),x=C.useRef(new Map).current;return i.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:y})};s.displayName=t;const l=e+"CollectionSlot",c=gt(l),d=C.forwardRef((g,b)=>{const{scope:y,children:w}=g,x=a(l,y),S=re(b,x.collectionRef);return i.jsx(c,{ref:S,children:w})});d.displayName=l;const f=e+"CollectionItemSlot",m="data-radix-collection-item",h=gt(f),p=C.forwardRef((g,b)=>{const{scope:y,children:w,...x}=g,S=C.useRef(null),k=re(b,S),j=a(f,y);return C.useEffect(()=>(j.itemMap.set(S,{ref:S,...x}),()=>void j.itemMap.delete(S))),i.jsx(h,{[m]:"",ref:k,children:w})});p.displayName=f;function v(g){const b=a(e+"CollectionConsumer",g);return C.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((j,E)=>x.indexOf(j.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:d,ItemSlot:p},v,r]}var Mw=u.createContext(void 0);function bt(e){const t=u.useContext(Mw);return e||t||"ltr"}function Se(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function jw(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e);u.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 _w="DismissableLayer",aa="dismissableLayer.update",Aw="dismissableLayer.pointerDownOutside",Rw="dismissableLayer.focusOutside",hl,gl=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=u.useContext(gl),[f,m]=u.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=u.useState({}),v=re(t,E=>m(E)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,k=Ow(E=>{const P=E.target,_=[...d.branches].some($=>$.contains(P));!S||_||(o==null||o(E),s==null||s(E),E.defaultPrevented||l==null||l())},h),j=$w(E=>{const P=E.target;[...d.branches].some($=>$.contains(P))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},h);return jw(E=>{w===d.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},h),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(hl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),vl(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hl)}},[f,h,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),vl())},[f,d]),u.useEffect(()=>{const E=()=>p({});return document.addEventListener(aa,E),()=>document.removeEventListener(aa,E)},[]),i.jsx(V.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,j.onFocusCapture),onBlurCapture:B(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,k.onPointerDownCapture)})});Bt.displayName=_w;var Iw="DismissableLayerBranch",Dw=u.forwardRef((e,t)=>{const n=u.useContext(gl),r=u.useRef(null),o=re(t,r);return u.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(V.div,{...e,ref:o})});Dw.displayName=Iw;function Ow(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){bl(Aw,n,d,{discrete:!0})};const d={originalEvent:l};l.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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $w(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=u.useRef(!1);return u.useEffect(()=>{const o=a=>{a.target&&!r.current&&bl(Rw,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vl(){const e=new CustomEvent(aa);document.dispatchEvent(e)}function bl(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vr(o,a):o.dispatchEvent(a)}var sa=0;function br(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wl()),document.body.insertAdjacentElement("beforeend",e[1]??wl()),sa++,()=>{sa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sa--}},[])}function wl(){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 ia="focusScope.autoFocusOnMount",la="focusScope.autoFocusOnUnmount",yl={bubbles:!1,cancelable:!0},Lw="FocusScope",An=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=u.useState(null),d=Se(o),f=Se(a),m=u.useRef(null),h=re(t,g=>c(g)),p=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let g=function(x){if(p.paused||!l)return;const S=x.target;l.contains(S)?m.current=S:wt(m.current,{select:!0})},b=function(x){if(p.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||wt(m.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const k of x)k.removedNodes.length>0&&wt(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,l,p.paused]),u.useEffect(()=>{if(l){Nl.add(p);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(ia,yl);l.addEventListener(ia,d),l.dispatchEvent(y),y.defaultPrevented||(Fw(Hw(xl(l)),{select:!0}),document.activeElement===g&&wt(l))}return()=>{l.removeEventListener(ia,d),setTimeout(()=>{const y=new CustomEvent(la,yl);l.addEventListener(la,f),l.dispatchEvent(y),y.defaultPrevented||wt(g??document.body,{select:!0}),l.removeEventListener(la,f),Nl.remove(p)},0)}}},[l,d,f,p]);const v=u.useCallback(g=>{if(!n&&!r||p.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,S]=Bw(w);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&wt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&wt(S,{select:!0})):y===w&&g.preventDefault()}},[n,r,p.paused]);return i.jsx(V.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});An.displayName=Lw;function Fw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wt(r,{select:t}),document.activeElement!==n)return}function Bw(e){const t=xl(e),n=Cl(t,e),r=Cl(t.reverse(),e);return[n,r]}function xl(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 Cl(e,t){for(const n of e)if(!zw(n,{upTo:t}))return n}function zw(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 Vw(e){return e instanceof HTMLInputElement&&"select"in e}function wt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vw(e)&&t&&e.select()}}var Nl=Ww();function Ww(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Sl(e,t),e.unshift(t)},remove(t){var n;e=Sl(e,t),(n=e[0])==null||n.resume()}}}function Sl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hw(e){return e.filter(t=>t.tagName!=="A")}var Gw=u[" useId ".trim().toString()]||(()=>{}),Uw=0;function pe(e){const[t,n]=u.useState(Gw());return ge(()=>{n(r=>r??String(Uw++))},[e]),t?`radix-${t}`:""}const Yw=["top","right","bottom","left"],yt=Math.min,Ie=Math.max,wr=Math.round,yr=Math.floor,tt=e=>({x:e,y:e}),Kw={left:"right",right:"left",bottom:"top",top:"bottom"},qw={start:"end",end:"start"};function ca(e,t,n){return Ie(e,yt(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function sn(e){return e.split("-")[1]}function ua(e){return e==="x"?"y":"x"}function da(e){return e==="y"?"height":"width"}const Xw=new Set(["top","bottom"]);function nt(e){return Xw.has(ut(e))?"y":"x"}function fa(e){return ua(nt(e))}function Qw(e,t,n){n===void 0&&(n=!1);const r=sn(e),o=fa(e),a=da(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=xr(s)),[s,xr(s)]}function Zw(e){const t=xr(e);return[ma(e),t,ma(t)]}function ma(e){return e.replace(/start|end/g,t=>qw[t])}const El=["left","right"],kl=["right","left"],Jw=["top","bottom"],ey=["bottom","top"];function ty(e,t,n){switch(e){case"top":case"bottom":return n?t?kl:El:t?El:kl;case"left":case"right":return t?Jw:ey;default:return[]}}function ny(e,t,n,r){const o=sn(e);let a=ty(ut(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ma)))),a}function xr(e){return e.replace(/left|right|bottom|top/g,t=>Kw[t])}function ry(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pl(e){return typeof e!="number"?ry(e):{top:e,right:e,bottom:e,left:e}}function Cr(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 Tl(e,t,n){let{reference:r,floating:o}=e;const a=nt(t),s=fa(t),l=da(s),c=ut(t),d=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(sn(t)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}const oy=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=Tl(d,r,c),h=r,p={},v=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:w,y:x,data:S,reset:k}=await y({x:f,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,m=x??m,p={...p,[b]:{...p[b],...S}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(d=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:m}=Tl(d,h,c)),g=-1)}return{x:f,y:m,placement:h,strategy:o,middlewareData:p}};async function Rn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=ct(t,e),v=Pl(p),b=l[h?m==="floating"?"reference":"floating":m],y=Cr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),w=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Cr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-k.top+v.top)/S.y,bottom:(k.bottom-y.bottom+v.bottom)/S.y,left:(y.left-k.left+v.left)/S.x,right:(k.right-y.right+v.right)/S.x}}const ay=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:d,padding:f=0}=ct(e,t)||{};if(d==null)return{};const m=Pl(f),h={x:n,y:r},p=fa(o),v=da(p),g=await s.getDimensions(d),b=p==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-h[p]-a.floating[v],k=h[p]-a.reference[p],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let E=j?j[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(j)))&&(E=l.floating[x]||a.floating[v]);const P=S/2-k/2,_=E/2-g[v]/2-1,$=yt(m[y],_),H=yt(m[w],_),z=$,ee=E-g[v]-H,K=E/2-g[v]/2+P,te=ca(z,K,ee),W=!c.arrow&&sn(o)!=null&&K!==te&&a.reference[v]/2-(K<z?$:H)-g[v]/2<0,q=W?K<z?K-z:K-ee:0;return{[p]:h[p]+q,data:{[p]:te,centerOffset:K-te-q,...W&&{alignmentOffset:q}},reset:W}}}),sy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=ct(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=ut(o),w=nt(l),x=ut(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=h||(x||!g?[xr(l)]:Zw(l)),j=v!=="none";!h&&j&&k.push(...ny(l,g,v,S));const E=[l,...k],P=await Rn(t,b),_=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&_.push(P[y]),m){const K=Qw(o,s,S);_.push(P[K[0]],P[K[1]])}if($=[...$,{placement:o,overflows:_}],!_.every(K=>K<=0)){var H,z;const K=(((H=a.flip)==null?void 0:H.index)||0)+1,te=E[K];if(te&&(!(m==="alignment"?w!==nt(te):!1)||$.every(I=>I.overflows[0]>0&&nt(I.placement)===w)))return{data:{index:K,overflows:$},reset:{placement:te}};let W=(z=$.filter(q=>q.overflows[0]<=0).sort((q,I)=>q.overflows[1]-I.overflows[1])[0])==null?void 0:z.placement;if(!W)switch(p){case"bestFit":{var ee;const q=(ee=$.filter(I=>{if(j){const O=nt(I.placement);return O===w||O==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(O=>O>0).reduce((O,M)=>O+M,0)]).sort((I,O)=>I[1]-O[1])[0])==null?void 0:ee[0];q&&(W=q);break}case"initialPlacement":W=l;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jl(e){return Yw.some(t=>e[t]>=0)}const iy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ct(e,t);switch(r){case"referenceHidden":{const a=await Rn(t,{...o,elementContext:"reference"}),s=Ml(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:jl(s)}}}case"escaped":{const a=await Rn(t,{...o,altBoundary:!0}),s=Ml(a,n.floating);return{data:{escapedOffsets:s,escaped:jl(s)}}}default:return{}}}}},_l=new Set(["left","top"]);async function ly(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ut(n),l=sn(n),c=nt(n)==="y",d=_l.has(s)?-1:1,f=a&&c?-1:1,m=ct(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*f,y:h*d}:{x:h*d,y:p*f}}const cy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:l}=t,c=await ly(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},uy=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...c}=ct(e,t),d={x:n,y:r},f=await Rn(t,c),m=nt(ut(o)),h=ua(m);let p=d[h],v=d[m];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+f[b],x=p-f[y];p=ca(w,p,x)}if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[b],x=v-f[y];v=ca(w,v,x)}const g=l.fn({...t,[h]:p,[m]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:a,[m]:s}}}}}},dy=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=ct(e,t),f={x:n,y:r},m=nt(o),h=ua(m);let p=f[h],v=f[m];const g=ct(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const x=h==="y"?"height":"width",S=a.reference[h]-a.floating[x]+b.mainAxis,k=a.reference[h]+a.reference[x]-b.mainAxis;p<S?p=S:p>k&&(p=k)}if(d){var y,w;const x=h==="y"?"width":"height",S=_l.has(ut(o)),k=a.reference[m]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[m])||0)+(S?0:b.crossAxis),j=a.reference[m]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[m])||0)-(S?b.crossAxis:0);v<k?v=k:v>j&&(v=j)}return{[h]:p,[m]:v}}}},fy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:l}=t,{apply:c=()=>{},...d}=ct(e,t),f=await Rn(t,d),m=ut(o),h=sn(o),p=nt(o)==="y",{width:v,height:g}=a.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,b=h==="end"?"top":"bottom");const w=g-f.top-f.bottom,x=v-f.left-f.right,S=yt(g-f[b],w),k=yt(v-f[y],x),j=!t.middlewareData.shift;let E=S,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),j&&!h){const $=Ie(f.left,0),H=Ie(f.right,0),z=Ie(f.top,0),ee=Ie(f.bottom,0);p?P=v-2*($!==0||H!==0?$+H:Ie(f.left,f.right)):E=g-2*(z!==0||ee!==0?z+ee:Ie(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:E});const _=await s.getDimensions(l.floating);return v!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function Nr(){return typeof window<"u"}function ln(e){return Al(e)?(e.nodeName||"").toLowerCase():"#document"}function De(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(Al(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Al(e){return Nr()?e instanceof Node||e instanceof De(e).Node:!1}function We(e){return Nr()?e instanceof Element||e instanceof De(e).Element:!1}function ot(e){return Nr()?e instanceof HTMLElement||e instanceof De(e).HTMLElement:!1}function Rl(e){return!Nr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof De(e).ShadowRoot}const my=new Set(["inline","contents"]);function In(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!my.has(o)}const py=new Set(["table","td","th"]);function hy(e){return py.has(ln(e))}const gy=[":popover-open",":modal"];function Sr(e){return gy.some(t=>{try{return e.matches(t)}catch{return!1}})}const vy=["transform","translate","scale","rotate","perspective"],by=["transform","translate","scale","rotate","perspective","filter"],wy=["paint","layout","strict","content"];function pa(e){const t=ha(),n=We(e)?He(e):e;return vy.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)||by.some(r=>(n.willChange||"").includes(r))||wy.some(r=>(n.contain||"").includes(r))}function yy(e){let t=xt(e);for(;ot(t)&&!cn(t);){if(pa(t))return t;if(Sr(t))return null;t=xt(t)}return null}function ha(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xy=new Set(["html","body","#document"]);function cn(e){return xy.has(ln(e))}function He(e){return De(e).getComputedStyle(e)}function Er(e){return We(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(ln(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rl(e)&&e.host||rt(e);return Rl(t)?t.host:t}function Il(e){const t=xt(e);return cn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ot(t)&&In(t)?t:Il(t)}function Dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Il(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=De(o);if(a){const l=ga(s);return t.concat(s,s.visualViewport||[],In(o)?o:[],l&&n?Dn(l):[])}return t.concat(o,Dn(o,[],n))}function ga(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dl(e){const t=He(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ot(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=wr(n)!==a||wr(r)!==s;return l&&(n=a,r=s),{width:n,height:r,$:l}}function va(e){return We(e)?e:e.contextElement}function un(e){const t=va(e);if(!ot(t))return tt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Dl(t);let s=(a?wr(n.width):n.width)/r,l=(a?wr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Cy=tt(0);function Ol(e){const t=De(e);return!ha()||!t.visualViewport?Cy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ny(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==De(e)?!1:t}function zt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=va(e);let s=tt(1);t&&(r?We(r)&&(s=un(r)):s=un(e));const l=Ny(a,n,r)?Ol(a):tt(0);let c=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const h=De(a),p=r&&We(r)?De(r):r;let v=h,g=ga(v);for(;g&&r&&p!==v;){const b=un(g),y=g.getBoundingClientRect(),w=He(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,S=y.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,m*=b.y,c+=x,d+=S,v=De(g),g=ga(v)}}return Cr({width:f,height:m,x:c,y:d})}function ba(e,t){const n=Er(e).scrollLeft;return t?t.left+n:zt(rt(e)).left+n}function $l(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ba(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Sy(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=rt(r),l=t?Sr(t.floating):!1;if(r===s||l&&a)return n;let c={scrollLeft:0,scrollTop:0},d=tt(1);const f=tt(0),m=ot(r);if((m||!m&&!a)&&((ln(r)!=="body"||In(s))&&(c=Er(r)),ot(r))){const p=zt(r);d=un(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=s&&!m&&!a?$l(s,c,!0):tt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function Ey(e){return Array.from(e.getClientRects())}function ky(e){const t=rt(e),n=Er(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ba(e);const l=-n.scrollTop;return He(r).direction==="rtl"&&(s+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Py(e,t){const n=De(e),r=rt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;const d=ha();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l,y:c}}const Ty=new Set(["absolute","fixed"]);function My(e,t){const n=zt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ot(e)?un(e):tt(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,d=r*a.y;return{width:s,height:l,x:c,y:d}}function Ll(e,t,n){let r;if(t==="viewport")r=Py(e,n);else if(t==="document")r=ky(rt(e));else if(We(t))r=My(t,n);else{const o=Ol(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Cr(r)}function Fl(e,t){const n=xt(e);return n===t||!We(n)||cn(n)?!1:He(n).position==="fixed"||Fl(n,t)}function jy(e,t){const n=t.get(e);if(n)return n;let r=Dn(e,[],!1).filter(l=>We(l)&&ln(l)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?xt(e):e;for(;We(s)&&!cn(s);){const l=He(s),c=pa(s);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&Ty.has(o.position)||In(s)&&!c&&Fl(e,s))?r=r.filter(f=>f!==s):o=l,s=xt(s)}return t.set(e,r),r}function _y(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Sr(t)?[]:jy(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((d,f)=>{const m=Ll(t,f,o);return d.top=Ie(m.top,d.top),d.right=yt(m.right,d.right),d.bottom=yt(m.bottom,d.bottom),d.left=Ie(m.left,d.left),d},Ll(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ay(e){const{width:t,height:n}=Dl(e);return{width:t,height:n}}function Ry(e,t,n){const r=ot(t),o=rt(t),a=n==="fixed",s=zt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=tt(0);function d(){c.x=ba(o)}if(r||!r&&!a)if((ln(t)!=="body"||In(o))&&(l=Er(t)),r){const p=zt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?$l(o,l):tt(0),m=s.left+l.scrollLeft-c.x-f.x,h=s.top+l.scrollTop-c.y-f.y;return{x:m,y:h,width:s.width,height:s.height}}function wa(e){return He(e).position==="static"}function Bl(e,t){if(!ot(e)||He(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rt(e)===n&&(n=n.ownerDocument.body),n}function zl(e,t){const n=De(e);if(Sr(e))return n;if(!ot(e)){let o=xt(e);for(;o&&!cn(o);){if(We(o)&&!wa(o))return o;o=xt(o)}return n}let r=Bl(e,t);for(;r&&hy(r)&&wa(r);)r=Bl(r,t);return r&&cn(r)&&wa(r)&&!pa(r)?n:r||yy(e)||n}const Iy=async function(e){const t=this.getOffsetParent||zl,n=this.getDimensions,r=await n(e.floating);return{reference:Ry(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dy(e){return He(e).direction==="rtl"}const Oy={convertOffsetParentRelativeRectToViewportRelativeRect:Sy,getDocumentElement:rt,getClippingRect:_y,getOffsetParent:zl,getElementRects:Iy,getClientRects:Ey,getDimensions:Ay,getScale:un,isElement:We,isRTL:Dy};function Vl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $y(e,t){let n=null,r;const o=rt(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:f,top:m,width:h,height:p}=d;if(l||t(),!h||!p)return;const v=yr(m),g=yr(o.clientWidth-(f+h)),b=yr(o.clientHeight-(m+p)),y=yr(f),x={rootMargin:-v+"px "+-g+"px "+-b+"px "+-y+"px",threshold:Ie(0,yt(1,c))||1};let S=!0;function k(j){const E=j[0].intersectionRatio;if(E!==c){if(!S)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Vl(d,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return s(!0),a}function Ly(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=va(e),f=o||a?[...d?Dn(d):[],...Dn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const m=d&&l?$y(d,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),d&&!c&&p.observe(d),p.observe(t));let v,g=c?zt(e):null;c&&b();function b(){const y=zt(e);g&&!Vl(g,y)&&n(),g=y,v=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),m==null||m(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const Fy=cy,By=uy,zy=sy,Vy=fy,Wy=iy,Wl=ay,Hy=dy,Gy=(e,t,n)=>{const r=new Map,o={platform:Oy,...n},a={...o.platform,_c:r};return oy(e,t,{...o,platform:a})};var Uy=typeof document<"u",Yy=function(){},kr=Uy?C.useLayoutEffect:Yy;function Pr(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(!Pr(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 a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Pr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Hl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gl(e,t){const n=Hl(e);return Math.round(t*n)/n}function ya(e){const t=u.useRef(e);return kr(()=>{t.current=e}),t}function Ky(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[f,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=u.useState(r);Pr(h,r)||p(r);const[v,g]=u.useState(null),[b,y]=u.useState(null),w=u.useCallback(I=>{I!==j.current&&(j.current=I,g(I))},[]),x=u.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),S=a||v,k=s||b,j=u.useRef(null),E=u.useRef(null),P=u.useRef(f),_=c!=null,$=ya(c),H=ya(o),z=ya(d),ee=u.useCallback(()=>{if(!j.current||!E.current)return;const I={placement:t,strategy:n,middleware:h};H.current&&(I.platform=H.current),Gy(j.current,E.current,I).then(O=>{const M={...O,isPositioned:z.current!==!1};K.current&&!Pr(P.current,M)&&(P.current=M,sr.flushSync(()=>{m(M)}))})},[h,t,n,H,z]);kr(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(I=>({...I,isPositioned:!1})))},[d]);const K=u.useRef(!1);kr(()=>(K.current=!0,()=>{K.current=!1}),[]),kr(()=>{if(S&&(j.current=S),k&&(E.current=k),S&&k){if($.current)return $.current(S,k,ee);ee()}},[S,k,ee,$,_]);const te=u.useMemo(()=>({reference:j,floating:E,setReference:w,setFloating:x}),[w,x]),W=u.useMemo(()=>({reference:S,floating:k}),[S,k]),q=u.useMemo(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const O=Gl(W.floating,f.x),M=Gl(W.floating,f.y);return l?{...I,transform:"translate("+O+"px, "+M+"px)",...Hl(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:M}},[n,l,W.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:ee,refs:te,elements:W,floatingStyles:q}),[f,ee,te,W,q])}const qy=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?Wl({element:r.current,padding:o}).fn(n):{}:r?Wl({element:r,padding:o}).fn(n):{}}}},Xy=(e,t)=>({...Fy(e),options:[e,t]}),Qy=(e,t)=>({...By(e),options:[e,t]}),Zy=(e,t)=>({...Hy(e),options:[e,t]}),Jy=(e,t)=>({...zy(e),options:[e,t]}),ex=(e,t)=>({...Vy(e),options:[e,t]}),tx=(e,t)=>({...Wy(e),options:[e,t]}),nx=(e,t)=>({...qy(e),options:[e,t]});var rx="Arrow",Ul=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return i.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ul.displayName=rx;var ox=Ul;function Tr(e){const[t,n]=u.useState(void 0);return ge(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xa="Popper",[Yl,Ct]=be(xa),[ax,Kl]=Yl(xa),ql=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return i.jsx(ax,{scope:t,anchor:r,onAnchorChange:o,children:n})};ql.displayName=xa;var Xl="PopperAnchor",Ql=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Kl(Xl,n),s=u.useRef(null),l=re(t,s);return u.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:i.jsx(V.div,{...o,ref:l})});Ql.displayName=Xl;var Ca="PopperContent",[sx,ix]=Yl(Ca),Zl=u.forwardRef((e,t)=>{var A,Y,X,ne,oe,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,b=Kl(Ca,n),[y,w]=u.useState(null),x=re(t,Ce=>w(Ce)),[S,k]=u.useState(null),j=Tr(S),E=(j==null?void 0:j.width)??0,P=(j==null?void 0:j.height)??0,_=r+(a!=="center"?"-"+a:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],z=H.length>0,ee={padding:$,boundary:H.filter(cx),altBoundary:z},{refs:K,floatingStyles:te,placement:W,isPositioned:q,middlewareData:I}=Ky({strategy:"fixed",placement:_,whileElementsMounted:(...Ce)=>Ly(...Ce,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Xy({mainAxis:o+P,alignmentAxis:s}),c&&Qy({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Zy():void 0,...ee}),c&&Jy({...ee}),ex({...ee,apply:({elements:Ce,rects:we,availableWidth:Be,availableHeight:$e})=>{const{width:Ee,height:ze}=we.reference,Te=Ce.floating.style;Te.setProperty("--radix-popper-available-width",`${Be}px`),Te.setProperty("--radix-popper-available-height",`${$e}px`),Te.setProperty("--radix-popper-anchor-width",`${Ee}px`),Te.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),S&&nx({element:S,padding:l}),ux({arrowWidth:E,arrowHeight:P}),h&&tx({strategy:"referenceHidden",...ee})]}),[O,M]=tc(W),U=Se(v);ge(()=>{q&&(U==null||U())},[q,U]);const T=(A=I.arrow)==null?void 0:A.x,D=(Y=I.arrow)==null?void 0:Y.y,L=((X=I.arrow)==null?void 0:X.centerOffset)!==0,[F,J]=u.useState();return ge(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:q?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[(ne=I.transformOrigin)==null?void 0:ne.x,(oe=I.transformOrigin)==null?void 0:oe.y].join(" "),...((ie=I.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(sx,{scope:n,placedSide:O,onArrowChange:k,arrowX:T,arrowY:D,shouldHideArrow:L,children:i.jsx(V.div,{"data-side":O,"data-align":M,...g,ref:x,style:{...g.style,animation:q?void 0:"none"}})})})});Zl.displayName=Ca;var Jl="PopperArrow",lx={top:"bottom",right:"left",bottom:"top",left:"right"},ec=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=ix(Jl,r),s=lx[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(ox,{...o,ref:n,style:{...o.style,display:"block"}})})});ec.displayName=Jl;function cx(e){return e!==null}var ux=e=>({name:"transformOrigin",options:e,fn(t){var b,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,f]=tc(n),m={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let v="",g="";return d==="bottom"?(v=s?m:`${h}px`,g=`${-c}px`):d==="top"?(v=s?m:`${h}px`,g=`${r.floating.height+c}px`):d==="right"?(v=`${-c}px`,g=s?m:`${p}px`):d==="left"&&(v=`${r.floating.width+c}px`,g=s?m:`${p}px`),{data:{x:v,y:g}}}});function tc(e){const[t,n="center"]=e.split("-");return[t,n]}var On=ql,$n=Ql,Mr=Zl,jr=ec,dx="Portal",Ln=u.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,a]=u.useState(!1);ge(()=>a(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?ar.createPortal(i.jsx(V.div,{...r,ref:t}),s):null});Ln.displayName=dx;function fx(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var xe=e=>{const{present:t,children:n}=e,r=mx(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),a=re(r.ref,px(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:a}):null};xe.displayName="Presence";function mx(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),a=u.useRef("none"),s=e?"mounted":"unmounted",[l,c]=fx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=_r(r.current);a.current=l==="mounted"?d:"none"},[l]),ge(()=>{const d=r.current,f=o.current;if(f!==e){const h=a.current,p=_r(d);e?c("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ge(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=p=>{const g=_r(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(a.current=_r(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:u.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function _r(e){return(e==null?void 0:e.animationName)||"none"}function px(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 Na="rovingFocusGroup.onEntryFocus",hx={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Sa,nc,gx]=an(Fn),[vx,Nt]=be(Fn,[gx]),[bx,wx]=vx(Fn),rc=u.forwardRef((e,t)=>i.jsx(Sa.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Sa.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(yx,{...e,ref:t})})}));rc.displayName=Fn;var yx=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...m}=e,h=u.useRef(null),p=re(t,h),v=bt(a),[g,b]=ye({prop:s,defaultProp:l??null,onChange:c,caller:Fn}),[y,w]=u.useState(!1),x=Se(d),S=nc(n),k=u.useRef(!1),[j,E]=u.useState(0);return u.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(Na,x),()=>P.removeEventListener(Na,x)},[x]),i.jsx(bx,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:u.useCallback(P=>b(P),[b]),onItemShiftTab:u.useCallback(()=>w(!0),[]),onFocusableItemAdd:u.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:u.useCallback(()=>E(P=>P-1),[]),children:i.jsx(V.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{k.current=!0}),onFocus:B(e.onFocus,P=>{const _=!k.current;if(P.target===P.currentTarget&&_&&!y){const $=new CustomEvent(Na,hx);if(P.currentTarget.dispatchEvent($),!$.defaultPrevented){const H=S().filter(W=>W.focusable),z=H.find(W=>W.active),ee=H.find(W=>W.id===g),te=[z,ee,...H].filter(Boolean).map(W=>W.ref.current);sc(te,f)}}k.current=!1}),onBlur:B(e.onBlur,()=>w(!1))})})}),oc="RovingFocusGroupItem",ac=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...l}=e,c=pe(),d=a||c,f=wx(oc,n),m=f.currentTabStopId===d,h=nc(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=f;return u.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),i.jsx(Sa.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:i.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:B(e.onMouseDown,b=>{r?f.onItemFocus(d):b.preventDefault()}),onFocus:B(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:B(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=Nx(b,f.orientation,f.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=f.loop?Sx(x,S+1):x.slice(S+1)}setTimeout(()=>sc(x))}}),children:typeof s=="function"?s({isCurrentTabStop:m,hasTabStop:g!=null}):s})})});ac.displayName=oc;var xx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Nx(e,t,n){const r=Cx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xx[r]}function sc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Sx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ar=rc,Rr=ac,Ex=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Ir=new WeakMap,Dr={},Ea=0,ic=function(e){return e&&(e.host||ic(e.parentNode))},kx=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ic(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})},Px=function(e,t,n,r){var o=kx(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var a=Dr[n],s=[],l=new Set,c=new Set(o),d=function(m){!m||l.has(m)||(l.add(m),d(m.parentNode))};o.forEach(d);var f=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(h){if(l.has(h))f(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",g=(dn.get(h)||0)+1,b=(a.get(h)||0)+1;dn.set(h,g),a.set(h,b),s.push(h),g===1&&v&&Ir.set(h,!0),b===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),l.clear(),Ea++,function(){s.forEach(function(m){var h=dn.get(m)-1,p=a.get(m)-1;dn.set(m,h),a.set(m,p),h||(Ir.has(m)||m.removeAttribute(r),Ir.delete(m)),p||m.removeAttribute(n)}),Ea--,Ea||(dn=new WeakMap,dn=new WeakMap,Ir=new WeakMap,Dr={})}},Or=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ex(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Px(r,o,n,"aria-hidden")):function(){return null}},at=function(){return at=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},at.apply(this,arguments)};function lc(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 Tx(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $r="right-scroll-bar-position",Lr="width-before-scroll-bar",Mx="with-scroll-bars-hidden",jx="--removed-body-scroll-bar-size";function ka(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _x(e,t){var n=C.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 Ax=typeof window<"u"?u.useLayoutEffect:u.useEffect,cc=new WeakMap;function Rx(e,t){var n=_x(null,function(r){return e.forEach(function(o){return ka(o,r)})});return Ax(function(){var r=cc.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(l){a.has(l)||ka(l,null)}),a.forEach(function(l){o.has(l)||ka(l,s)})}cc.set(n,e)},[e]),n}function Ix(e){return e}function Dx(e,t){t===void 0&&(t=Ix);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(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Ox(e){e===void 0&&(e={});var t=Dx(null);return t.options=at({async:!0,ssr:!1},e),t}var uc=function(e){var t=e.sideCar,n=lc(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 u.createElement(r,at({},n))};uc.isSideCarExport=!0;function $x(e,t){return e.useMedium(t),uc}var dc=Ox(),Pa=function(){},Fr=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:Pa,onWheelCapture:Pa,onTouchMoveCapture:Pa}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,x=e.gapMode,S=lc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,j=Rx([n,t]),E=at(at({},S),o);return u.createElement(u.Fragment,null,f&&u.createElement(k,{sideCar:dc,removeScrollBar:d,shards:m,noRelative:p,noIsolation:v,inert:g,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:x}),s?u.cloneElement(u.Children.only(l),at(at({},E),{ref:j})):u.createElement(w,at({},E,{className:c,ref:j}),l))});Fr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fr.classNames={fullWidth:Lr,zeroRight:$r};var Lx=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lx();return t&&e.setAttribute("nonce",t),e}function Bx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fx())&&(Bx(t,n),zx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wx=function(){var e=Vx();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fc=function(){var e=Wx(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Hx={left:0,top:0,right:0,gap:0},Ta=function(e){return parseInt(e||"",10)||0},Gx=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[Ta(n),Ta(r),Ta(o)]},Ux=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Hx;var t=Gx(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])}},Yx=fc(),fn="data-scroll-locked",Kx=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
213
|
-
.`.concat(
|
|
212
|
+
*/const vt=ue("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ml=Fo,bt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ml(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],m=a==null?void 0:a[d];if(f===null)return null;const h=fl(f)||fl(m);return o[d][h]}),l=n&&Object.entries(n).reduce((d,f)=>{let[m,h]=f;return h===void 0||(d[m]=h),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:m,className:h,...p}=f;return Object.entries(p).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...a,...l}[g]):{...a,...l}[g]===b})?[...d,m,h]:d},[]);return ml(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},pl=bt("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function on({className:e,variant:t,...n}){return i.jsx("div",{className:R(pl({variant:t}),e),...n})}function Ew({searchTerm:e,activeFilters:t,sortState:n,filters:r,columns:o,onClearSearch:a,onClearFilter:s,onClearSort:l}){var d;return Object.values(t).filter(f=>f&&f!=="all").length>0||e.trim().length>0||n.field!==null?i.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.trim()&&i.jsxs(on,{variant:"secondary",className:"gap-1",children:["Search: ",e,i.jsx(vt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:a})]}),Object.entries(t).map(([f,m])=>{if(!m||m==="all")return null;const h=r.find(v=>String(v.field)===f),p=h==null?void 0:h.options.find(v=>v.value===m);return i.jsxs(on,{variant:"secondary",className:"gap-1",children:[h==null?void 0:h.label,": ",(p==null?void 0:p.label)||m,i.jsx(vt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>s(f)})]},f)}),n.field&&i.jsxs(on,{variant:"secondary",className:"gap-1",children:["Sort:"," ",((d=o.find(f=>String(f.key)===n.field))==null?void 0:d.title)||n.field," ",n.direction==="asc"?"↑":"↓",i.jsx(vt,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:l})]})]}):null}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function kw(e,t){const n=u.createContext(t),r=a=>{const{children:s,...l}=a,c=u.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function be(e,t=[]){let n=[];function r(a,s){const l=u.createContext(s),c=n.length;n=[...n,s];const d=m=>{var y;const{scope:h,children:p,...v}=m,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,b=u.useMemo(()=>v,Object.values(v));return i.jsx(g.Provider,{value:b,children:p})};d.displayName=a+"Provider";function f(m,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[c])||l,v=u.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>u.createContext(s));return function(l){const c=(l==null?void 0:l[e])||a;return u.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,Pw(o,...t)]}function Pw(...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(a){const s=r.reduce((l,{useScope:c,scopeName:d})=>{const m=c(a)[`__scope${d}`];return{...l,...m}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ge=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Tw=u[" useInsertionEffect ".trim().toString()]||ge;function ye({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=Mw({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const m=f.current;m!==l&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,r])}const d=u.useCallback(f=>{var m;if(l){const h=jw(f)?f(e):f;h!==e&&((m=s.current)==null||m.call(s,h))}else a(f)},[l,e,a,s]);return[c,d]}function Mw({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),a=u.useRef(t);return Tw(()=>{a.current=t},[t]),u.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function jw(e){return typeof e=="function"}var _w=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=_w.reduce((e,t)=>{const n=gt(`Primitive.${t}`),r=u.forwardRef((o,a)=>{const{asChild:s,...l}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vr(e,t){e&&sr.flushSync(()=>e.dispatchEvent(t))}function an(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:y}=g,w=C.useRef(null),x=C.useRef(new Map).current;return i.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:y})};s.displayName=t;const l=e+"CollectionSlot",c=gt(l),d=C.forwardRef((g,b)=>{const{scope:y,children:w}=g,x=a(l,y),S=re(b,x.collectionRef);return i.jsx(c,{ref:S,children:w})});d.displayName=l;const f=e+"CollectionItemSlot",m="data-radix-collection-item",h=gt(f),p=C.forwardRef((g,b)=>{const{scope:y,children:w,...x}=g,S=C.useRef(null),k=re(b,S),j=a(f,y);return C.useEffect(()=>(j.itemMap.set(S,{ref:S,...x}),()=>void j.itemMap.delete(S))),i.jsx(h,{[m]:"",ref:k,children:w})});p.displayName=f;function v(g){const b=a(e+"CollectionConsumer",g);return C.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${m}]`));return Array.from(b.itemMap.values()).sort((j,E)=>x.indexOf(j.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:d,ItemSlot:p},v,r]}var Aw=u.createContext(void 0);function wt(e){const t=u.useContext(Aw);return e||t||"ltr"}function Se(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rw(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e);u.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 Iw="DismissableLayer",aa="dismissableLayer.update",Dw="dismissableLayer.pointerDownOutside",Ow="dismissableLayer.focusOutside",hl,gl=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=u.useContext(gl),[f,m]=u.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=u.useState({}),v=re(t,E=>m(E)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=y,k=Fw(E=>{const P=E.target,_=[...d.branches].some($=>$.contains(P));!S||_||(o==null||o(E),s==null||s(E),E.defaultPrevented||l==null||l())},h),j=Bw(E=>{const P=E.target;[...d.branches].some($=>$.contains(P))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},h);return Rw(E=>{w===d.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},h),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(hl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),vl(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=hl)}},[f,h,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),vl())},[f,d]),u.useEffect(()=>{const E=()=>p({});return document.addEventListener(aa,E),()=>document.removeEventListener(aa,E)},[]),i.jsx(V.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,j.onFocusCapture),onBlurCapture:B(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,k.onPointerDownCapture)})});Bt.displayName=Iw;var $w="DismissableLayerBranch",Lw=u.forwardRef((e,t)=>{const n=u.useContext(gl),r=u.useRef(null),o=re(t,r);return u.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(V.div,{...e,ref:o})});Lw.displayName=$w;function Fw(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){bl(Dw,n,d,{discrete:!0})};const d={originalEvent:l};l.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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bw(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=u.useRef(!1);return u.useEffect(()=>{const o=a=>{a.target&&!r.current&&bl(Ow,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vl(){const e=new CustomEvent(aa);document.dispatchEvent(e)}function bl(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vr(o,a):o.dispatchEvent(a)}var sa=0;function br(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wl()),document.body.insertAdjacentElement("beforeend",e[1]??wl()),sa++,()=>{sa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sa--}},[])}function wl(){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 ia="focusScope.autoFocusOnMount",la="focusScope.autoFocusOnUnmount",yl={bubbles:!1,cancelable:!0},zw="FocusScope",An=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,c]=u.useState(null),d=Se(o),f=Se(a),m=u.useRef(null),h=re(t,g=>c(g)),p=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let g=function(x){if(p.paused||!l)return;const S=x.target;l.contains(S)?m.current=S:yt(m.current,{select:!0})},b=function(x){if(p.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||yt(m.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const k of x)k.removedNodes.length>0&&yt(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,l,p.paused]),u.useEffect(()=>{if(l){Nl.add(p);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(ia,yl);l.addEventListener(ia,d),l.dispatchEvent(y),y.defaultPrevented||(Vw(Yw(xl(l)),{select:!0}),document.activeElement===g&&yt(l))}return()=>{l.removeEventListener(ia,d),setTimeout(()=>{const y=new CustomEvent(la,yl);l.addEventListener(la,f),l.dispatchEvent(y),y.defaultPrevented||yt(g??document.body,{select:!0}),l.removeEventListener(la,f),Nl.remove(p)},0)}}},[l,d,f,p]);const v=u.useCallback(g=>{if(!n&&!r||p.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,S]=Ww(w);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&yt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&yt(S,{select:!0})):y===w&&g.preventDefault()}},[n,r,p.paused]);return i.jsx(V.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});An.displayName=zw;function Vw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yt(r,{select:t}),document.activeElement!==n)return}function Ww(e){const t=xl(e),n=Cl(t,e),r=Cl(t.reverse(),e);return[n,r]}function xl(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 Cl(e,t){for(const n of e)if(!Hw(n,{upTo:t}))return n}function Hw(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 Gw(e){return e instanceof HTMLInputElement&&"select"in e}function yt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gw(e)&&t&&e.select()}}var Nl=Uw();function Uw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Sl(e,t),e.unshift(t)},remove(t){var n;e=Sl(e,t),(n=e[0])==null||n.resume()}}}function Sl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yw(e){return e.filter(t=>t.tagName!=="A")}var Kw=u[" useId ".trim().toString()]||(()=>{}),qw=0;function pe(e){const[t,n]=u.useState(Kw());return ge(()=>{n(r=>r??String(qw++))},[e]),t?`radix-${t}`:""}const Xw=["top","right","bottom","left"],xt=Math.min,Ie=Math.max,wr=Math.round,yr=Math.floor,tt=e=>({x:e,y:e}),Qw={left:"right",right:"left",bottom:"top",top:"bottom"},Zw={start:"end",end:"start"};function ca(e,t,n){return Ie(e,xt(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function sn(e){return e.split("-")[1]}function ua(e){return e==="x"?"y":"x"}function da(e){return e==="y"?"height":"width"}const Jw=new Set(["top","bottom"]);function nt(e){return Jw.has(ut(e))?"y":"x"}function fa(e){return ua(nt(e))}function ey(e,t,n){n===void 0&&(n=!1);const r=sn(e),o=fa(e),a=da(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=xr(s)),[s,xr(s)]}function ty(e){const t=xr(e);return[ma(e),t,ma(t)]}function ma(e){return e.replace(/start|end/g,t=>Zw[t])}const El=["left","right"],kl=["right","left"],ny=["top","bottom"],ry=["bottom","top"];function oy(e,t,n){switch(e){case"top":case"bottom":return n?t?kl:El:t?El:kl;case"left":case"right":return t?ny:ry;default:return[]}}function ay(e,t,n,r){const o=sn(e);let a=oy(ut(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ma)))),a}function xr(e){return e.replace(/left|right|bottom|top/g,t=>Qw[t])}function sy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pl(e){return typeof e!="number"?sy(e):{top:e,right:e,bottom:e,left:e}}function Cr(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 Tl(e,t,n){let{reference:r,floating:o}=e;const a=nt(t),s=fa(t),l=da(s),c=ut(t),d=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:m};break;case"left":p={x:r.x-o.width,y:m};break;default:p={x:r.x,y:r.y}}switch(sn(t)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}const iy=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=Tl(d,r,c),h=r,p={},v=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:w,y:x,data:S,reset:k}=await y({x:f,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,m=x??m,p={...p,[b]:{...p[b],...S}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(d=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:m}=Tl(d,h,c)),g=-1)}return{x:f,y:m,placement:h,strategy:o,middlewareData:p}};async function Rn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=ct(t,e),v=Pl(p),b=l[h?m==="floating"?"reference":"floating":m],y=Cr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),w=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Cr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-k.top+v.top)/S.y,bottom:(k.bottom-y.bottom+v.bottom)/S.y,left:(y.left-k.left+v.left)/S.x,right:(k.right-y.right+v.right)/S.x}}const ly=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:l,middlewareData:c}=t,{element:d,padding:f=0}=ct(e,t)||{};if(d==null)return{};const m=Pl(f),h={x:n,y:r},p=fa(o),v=da(p),g=await s.getDimensions(d),b=p==="y",y=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[p]-h[p]-a.floating[v],k=h[p]-a.reference[p],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let E=j?j[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(j)))&&(E=l.floating[x]||a.floating[v]);const P=S/2-k/2,_=E/2-g[v]/2-1,$=xt(m[y],_),H=xt(m[w],_),z=$,ee=E-g[v]-H,K=E/2-g[v]/2+P,te=ca(z,K,ee),W=!c.arrow&&sn(o)!=null&&K!==te&&a.reference[v]/2-(K<z?$:H)-g[v]/2<0,q=W?K<z?K-z:K-ee:0;return{[p]:h[p]+q,data:{[p]:te,centerOffset:K-te-q,...W&&{alignmentOffset:q}},reset:W}}}),cy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=ct(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=ut(o),w=nt(l),x=ut(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=h||(x||!g?[xr(l)]:ty(l)),j=v!=="none";!h&&j&&k.push(...ay(l,g,v,S));const E=[l,...k],P=await Rn(t,b),_=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&_.push(P[y]),m){const K=ey(o,s,S);_.push(P[K[0]],P[K[1]])}if($=[...$,{placement:o,overflows:_}],!_.every(K=>K<=0)){var H,z;const K=(((H=a.flip)==null?void 0:H.index)||0)+1,te=E[K];if(te&&(!(m==="alignment"?w!==nt(te):!1)||$.every(I=>I.overflows[0]>0&&nt(I.placement)===w)))return{data:{index:K,overflows:$},reset:{placement:te}};let W=(z=$.filter(q=>q.overflows[0]<=0).sort((q,I)=>q.overflows[1]-I.overflows[1])[0])==null?void 0:z.placement;if(!W)switch(p){case"bestFit":{var ee;const q=(ee=$.filter(I=>{if(j){const O=nt(I.placement);return O===w||O==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(O=>O>0).reduce((O,M)=>O+M,0)]).sort((I,O)=>I[1]-O[1])[0])==null?void 0:ee[0];q&&(W=q);break}case"initialPlacement":W=l;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Ml(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jl(e){return Xw.some(t=>e[t]>=0)}const uy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ct(e,t);switch(r){case"referenceHidden":{const a=await Rn(t,{...o,elementContext:"reference"}),s=Ml(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:jl(s)}}}case"escaped":{const a=await Rn(t,{...o,altBoundary:!0}),s=Ml(a,n.floating);return{data:{escapedOffsets:s,escaped:jl(s)}}}default:return{}}}}},_l=new Set(["left","top"]);async function dy(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ut(n),l=sn(n),c=nt(n)==="y",d=_l.has(s)?-1:1,f=a&&c?-1:1,m=ct(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*f,y:h*d}:{x:h*d,y:p*f}}const fy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:l}=t,c=await dy(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},my=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...c}=ct(e,t),d={x:n,y:r},f=await Rn(t,c),m=nt(ut(o)),h=ua(m);let p=d[h],v=d[m];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=p+f[b],x=p-f[y];p=ca(w,p,x)}if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[b],x=v-f[y];v=ca(w,v,x)}const g=l.fn({...t,[h]:p,[m]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:a,[m]:s}}}}}},py=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=ct(e,t),f={x:n,y:r},m=nt(o),h=ua(m);let p=f[h],v=f[m];const g=ct(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const x=h==="y"?"height":"width",S=a.reference[h]-a.floating[x]+b.mainAxis,k=a.reference[h]+a.reference[x]-b.mainAxis;p<S?p=S:p>k&&(p=k)}if(d){var y,w;const x=h==="y"?"width":"height",S=_l.has(ut(o)),k=a.reference[m]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[m])||0)+(S?0:b.crossAxis),j=a.reference[m]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[m])||0)-(S?b.crossAxis:0);v<k?v=k:v>j&&(v=j)}return{[h]:p,[m]:v}}}},hy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:l}=t,{apply:c=()=>{},...d}=ct(e,t),f=await Rn(t,d),m=ut(o),h=sn(o),p=nt(o)==="y",{width:v,height:g}=a.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,b=h==="end"?"top":"bottom");const w=g-f.top-f.bottom,x=v-f.left-f.right,S=xt(g-f[b],w),k=xt(v-f[y],x),j=!t.middlewareData.shift;let E=S,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),j&&!h){const $=Ie(f.left,0),H=Ie(f.right,0),z=Ie(f.top,0),ee=Ie(f.bottom,0);p?P=v-2*($!==0||H!==0?$+H:Ie(f.left,f.right)):E=g-2*(z!==0||ee!==0?z+ee:Ie(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:E});const _=await s.getDimensions(l.floating);return v!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function Nr(){return typeof window<"u"}function ln(e){return Al(e)?(e.nodeName||"").toLowerCase():"#document"}function De(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(Al(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Al(e){return Nr()?e instanceof Node||e instanceof De(e).Node:!1}function We(e){return Nr()?e instanceof Element||e instanceof De(e).Element:!1}function ot(e){return Nr()?e instanceof HTMLElement||e instanceof De(e).HTMLElement:!1}function Rl(e){return!Nr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof De(e).ShadowRoot}const gy=new Set(["inline","contents"]);function In(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!gy.has(o)}const vy=new Set(["table","td","th"]);function by(e){return vy.has(ln(e))}const wy=[":popover-open",":modal"];function Sr(e){return wy.some(t=>{try{return e.matches(t)}catch{return!1}})}const yy=["transform","translate","scale","rotate","perspective"],xy=["transform","translate","scale","rotate","perspective","filter"],Cy=["paint","layout","strict","content"];function pa(e){const t=ha(),n=We(e)?He(e):e;return yy.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)||xy.some(r=>(n.willChange||"").includes(r))||Cy.some(r=>(n.contain||"").includes(r))}function Ny(e){let t=Ct(e);for(;ot(t)&&!cn(t);){if(pa(t))return t;if(Sr(t))return null;t=Ct(t)}return null}function ha(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Sy=new Set(["html","body","#document"]);function cn(e){return Sy.has(ln(e))}function He(e){return De(e).getComputedStyle(e)}function Er(e){return We(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ct(e){if(ln(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rl(e)&&e.host||rt(e);return Rl(t)?t.host:t}function Il(e){const t=Ct(e);return cn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ot(t)&&In(t)?t:Il(t)}function Dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Il(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=De(o);if(a){const l=ga(s);return t.concat(s,s.visualViewport||[],In(o)?o:[],l&&n?Dn(l):[])}return t.concat(o,Dn(o,[],n))}function ga(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dl(e){const t=He(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ot(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=wr(n)!==a||wr(r)!==s;return l&&(n=a,r=s),{width:n,height:r,$:l}}function va(e){return We(e)?e:e.contextElement}function un(e){const t=va(e);if(!ot(t))return tt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Dl(t);let s=(a?wr(n.width):n.width)/r,l=(a?wr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Ey=tt(0);function Ol(e){const t=De(e);return!ha()||!t.visualViewport?Ey:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ky(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==De(e)?!1:t}function zt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=va(e);let s=tt(1);t&&(r?We(r)&&(s=un(r)):s=un(e));const l=ky(a,n,r)?Ol(a):tt(0);let c=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const h=De(a),p=r&&We(r)?De(r):r;let v=h,g=ga(v);for(;g&&r&&p!==v;){const b=un(g),y=g.getBoundingClientRect(),w=He(g),x=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,S=y.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,m*=b.y,c+=x,d+=S,v=De(g),g=ga(v)}}return Cr({width:f,height:m,x:c,y:d})}function ba(e,t){const n=Er(e).scrollLeft;return t?t.left+n:zt(rt(e)).left+n}function $l(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ba(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Py(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=rt(r),l=t?Sr(t.floating):!1;if(r===s||l&&a)return n;let c={scrollLeft:0,scrollTop:0},d=tt(1);const f=tt(0),m=ot(r);if((m||!m&&!a)&&((ln(r)!=="body"||In(s))&&(c=Er(r)),ot(r))){const p=zt(r);d=un(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=s&&!m&&!a?$l(s,c,!0):tt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function Ty(e){return Array.from(e.getClientRects())}function My(e){const t=rt(e),n=Er(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ba(e);const l=-n.scrollTop;return He(r).direction==="rtl"&&(s+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:l}}function jy(e,t){const n=De(e),r=rt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;const d=ha();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l,y:c}}const _y=new Set(["absolute","fixed"]);function Ay(e,t){const n=zt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ot(e)?un(e):tt(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,c=o*a.x,d=r*a.y;return{width:s,height:l,x:c,y:d}}function Ll(e,t,n){let r;if(t==="viewport")r=jy(e,n);else if(t==="document")r=My(rt(e));else if(We(t))r=Ay(t,n);else{const o=Ol(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Cr(r)}function Fl(e,t){const n=Ct(e);return n===t||!We(n)||cn(n)?!1:He(n).position==="fixed"||Fl(n,t)}function Ry(e,t){const n=t.get(e);if(n)return n;let r=Dn(e,[],!1).filter(l=>We(l)&&ln(l)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?Ct(e):e;for(;We(s)&&!cn(s);){const l=He(s),c=pa(s);!c&&l.position==="fixed"&&(o=null),(a?!c&&!o:!c&&l.position==="static"&&!!o&&_y.has(o.position)||In(s)&&!c&&Fl(e,s))?r=r.filter(f=>f!==s):o=l,s=Ct(s)}return t.set(e,r),r}function Iy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Sr(t)?[]:Ry(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((d,f)=>{const m=Ll(t,f,o);return d.top=Ie(m.top,d.top),d.right=xt(m.right,d.right),d.bottom=xt(m.bottom,d.bottom),d.left=Ie(m.left,d.left),d},Ll(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Dy(e){const{width:t,height:n}=Dl(e);return{width:t,height:n}}function Oy(e,t,n){const r=ot(t),o=rt(t),a=n==="fixed",s=zt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=tt(0);function d(){c.x=ba(o)}if(r||!r&&!a)if((ln(t)!=="body"||In(o))&&(l=Er(t)),r){const p=zt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?$l(o,l):tt(0),m=s.left+l.scrollLeft-c.x-f.x,h=s.top+l.scrollTop-c.y-f.y;return{x:m,y:h,width:s.width,height:s.height}}function wa(e){return He(e).position==="static"}function Bl(e,t){if(!ot(e)||He(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rt(e)===n&&(n=n.ownerDocument.body),n}function zl(e,t){const n=De(e);if(Sr(e))return n;if(!ot(e)){let o=Ct(e);for(;o&&!cn(o);){if(We(o)&&!wa(o))return o;o=Ct(o)}return n}let r=Bl(e,t);for(;r&&by(r)&&wa(r);)r=Bl(r,t);return r&&cn(r)&&wa(r)&&!pa(r)?n:r||Ny(e)||n}const $y=async function(e){const t=this.getOffsetParent||zl,n=this.getDimensions,r=await n(e.floating);return{reference:Oy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ly(e){return He(e).direction==="rtl"}const Fy={convertOffsetParentRelativeRectToViewportRelativeRect:Py,getDocumentElement:rt,getClippingRect:Iy,getOffsetParent:zl,getElementRects:$y,getClientRects:Ty,getDimensions:Dy,getScale:un,isElement:We,isRTL:Ly};function Vl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function By(e,t){let n=null,r;const o=rt(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const d=e.getBoundingClientRect(),{left:f,top:m,width:h,height:p}=d;if(l||t(),!h||!p)return;const v=yr(m),g=yr(o.clientWidth-(f+h)),b=yr(o.clientHeight-(m+p)),y=yr(f),x={rootMargin:-v+"px "+-g+"px "+-b+"px "+-y+"px",threshold:Ie(0,xt(1,c))||1};let S=!0;function k(j){const E=j[0].intersectionRatio;if(E!==c){if(!S)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Vl(d,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return s(!0),a}function zy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=va(e),f=o||a?[...d?Dn(d):[],...Dn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const m=d&&l?By(d,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),d&&!c&&p.observe(d),p.observe(t));let v,g=c?zt(e):null;c&&b();function b(){const y=zt(e);g&&!Vl(g,y)&&n(),g=y,v=requestAnimationFrame(b)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),m==null||m(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const Vy=fy,Wy=my,Hy=cy,Gy=hy,Uy=uy,Wl=ly,Yy=py,Ky=(e,t,n)=>{const r=new Map,o={platform:Fy,...n},a={...o.platform,_c:r};return iy(e,t,{...o,platform:a})};var qy=typeof document<"u",Xy=function(){},kr=qy?C.useLayoutEffect:Xy;function Pr(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(!Pr(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 a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Pr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Hl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gl(e,t){const n=Hl(e);return Math.round(t*n)/n}function ya(e){const t=u.useRef(e);return kr(()=>{t.current=e}),t}function Qy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[f,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=u.useState(r);Pr(h,r)||p(r);const[v,g]=u.useState(null),[b,y]=u.useState(null),w=u.useCallback(I=>{I!==j.current&&(j.current=I,g(I))},[]),x=u.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),S=a||v,k=s||b,j=u.useRef(null),E=u.useRef(null),P=u.useRef(f),_=c!=null,$=ya(c),H=ya(o),z=ya(d),ee=u.useCallback(()=>{if(!j.current||!E.current)return;const I={placement:t,strategy:n,middleware:h};H.current&&(I.platform=H.current),Ky(j.current,E.current,I).then(O=>{const M={...O,isPositioned:z.current!==!1};K.current&&!Pr(P.current,M)&&(P.current=M,sr.flushSync(()=>{m(M)}))})},[h,t,n,H,z]);kr(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(I=>({...I,isPositioned:!1})))},[d]);const K=u.useRef(!1);kr(()=>(K.current=!0,()=>{K.current=!1}),[]),kr(()=>{if(S&&(j.current=S),k&&(E.current=k),S&&k){if($.current)return $.current(S,k,ee);ee()}},[S,k,ee,$,_]);const te=u.useMemo(()=>({reference:j,floating:E,setReference:w,setFloating:x}),[w,x]),W=u.useMemo(()=>({reference:S,floating:k}),[S,k]),q=u.useMemo(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const O=Gl(W.floating,f.x),M=Gl(W.floating,f.y);return l?{...I,transform:"translate("+O+"px, "+M+"px)",...Hl(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:M}},[n,l,W.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:ee,refs:te,elements:W,floatingStyles:q}),[f,ee,te,W,q])}const Zy=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?Wl({element:r.current,padding:o}).fn(n):{}:r?Wl({element:r,padding:o}).fn(n):{}}}},Jy=(e,t)=>({...Vy(e),options:[e,t]}),ex=(e,t)=>({...Wy(e),options:[e,t]}),tx=(e,t)=>({...Yy(e),options:[e,t]}),nx=(e,t)=>({...Hy(e),options:[e,t]}),rx=(e,t)=>({...Gy(e),options:[e,t]}),ox=(e,t)=>({...Uy(e),options:[e,t]}),ax=(e,t)=>({...Zy(e),options:[e,t]});var sx="Arrow",Ul=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return i.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ul.displayName=sx;var ix=Ul;function Tr(e){const[t,n]=u.useState(void 0);return ge(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var xa="Popper",[Yl,Nt]=be(xa),[lx,Kl]=Yl(xa),ql=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return i.jsx(lx,{scope:t,anchor:r,onAnchorChange:o,children:n})};ql.displayName=xa;var Xl="PopperAnchor",Ql=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Kl(Xl,n),s=u.useRef(null),l=re(t,s);return u.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:i.jsx(V.div,{...o,ref:l})});Ql.displayName=Xl;var Ca="PopperContent",[cx,ux]=Yl(Ca),Zl=u.forwardRef((e,t)=>{var A,Y,X,ne,oe,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,b=Kl(Ca,n),[y,w]=u.useState(null),x=re(t,Ce=>w(Ce)),[S,k]=u.useState(null),j=Tr(S),E=(j==null?void 0:j.width)??0,P=(j==null?void 0:j.height)??0,_=r+(a!=="center"?"-"+a:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],z=H.length>0,ee={padding:$,boundary:H.filter(fx),altBoundary:z},{refs:K,floatingStyles:te,placement:W,isPositioned:q,middlewareData:I}=Qy({strategy:"fixed",placement:_,whileElementsMounted:(...Ce)=>zy(...Ce,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Jy({mainAxis:o+P,alignmentAxis:s}),c&&ex({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?tx():void 0,...ee}),c&&nx({...ee}),rx({...ee,apply:({elements:Ce,rects:we,availableWidth:Be,availableHeight:$e})=>{const{width:Ee,height:ze}=we.reference,Te=Ce.floating.style;Te.setProperty("--radix-popper-available-width",`${Be}px`),Te.setProperty("--radix-popper-available-height",`${$e}px`),Te.setProperty("--radix-popper-anchor-width",`${Ee}px`),Te.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),S&&ax({element:S,padding:l}),mx({arrowWidth:E,arrowHeight:P}),h&&ox({strategy:"referenceHidden",...ee})]}),[O,M]=tc(W),U=Se(v);ge(()=>{q&&(U==null||U())},[q,U]);const T=(A=I.arrow)==null?void 0:A.x,D=(Y=I.arrow)==null?void 0:Y.y,L=((X=I.arrow)==null?void 0:X.centerOffset)!==0,[F,J]=u.useState();return ge(()=>{y&&J(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:q?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[(ne=I.transformOrigin)==null?void 0:ne.x,(oe=I.transformOrigin)==null?void 0:oe.y].join(" "),...((ie=I.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(cx,{scope:n,placedSide:O,onArrowChange:k,arrowX:T,arrowY:D,shouldHideArrow:L,children:i.jsx(V.div,{"data-side":O,"data-align":M,...g,ref:x,style:{...g.style,animation:q?void 0:"none"}})})})});Zl.displayName=Ca;var Jl="PopperArrow",dx={top:"bottom",right:"left",bottom:"top",left:"right"},ec=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=ux(Jl,r),s=dx[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(ix,{...o,ref:n,style:{...o.style,display:"block"}})})});ec.displayName=Jl;function fx(e){return e!==null}var mx=e=>({name:"transformOrigin",options:e,fn(t){var b,y,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,f]=tc(n),m={start:"0%",center:"50%",end:"100%"}[f],h=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,p=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let v="",g="";return d==="bottom"?(v=s?m:`${h}px`,g=`${-c}px`):d==="top"?(v=s?m:`${h}px`,g=`${r.floating.height+c}px`):d==="right"?(v=`${-c}px`,g=s?m:`${p}px`):d==="left"&&(v=`${r.floating.width+c}px`,g=s?m:`${p}px`),{data:{x:v,y:g}}}});function tc(e){const[t,n="center"]=e.split("-");return[t,n]}var On=ql,$n=Ql,Mr=Zl,jr=ec,px="Portal",Ln=u.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,a]=u.useState(!1);ge(()=>a(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?ar.createPortal(i.jsx(V.div,{...r,ref:t}),s):null});Ln.displayName=px;function hx(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var xe=e=>{const{present:t,children:n}=e,r=gx(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),a=re(r.ref,vx(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:a}):null};xe.displayName="Presence";function gx(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),a=u.useRef("none"),s=e?"mounted":"unmounted",[l,c]=hx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=_r(r.current);a.current=l==="mounted"?d:"none"},[l]),ge(()=>{const d=r.current,f=o.current;if(f!==e){const h=a.current,p=_r(d);e?c("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ge(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=p=>{const g=_r(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(a.current=_r(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:u.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function _r(e){return(e==null?void 0:e.animationName)||"none"}function vx(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 Na="rovingFocusGroup.onEntryFocus",bx={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Sa,nc,wx]=an(Fn),[yx,St]=be(Fn,[wx]),[xx,Cx]=yx(Fn),rc=u.forwardRef((e,t)=>i.jsx(Sa.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Sa.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Nx,{...e,ref:t})})}));rc.displayName=Fn;var Nx=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...m}=e,h=u.useRef(null),p=re(t,h),v=wt(a),[g,b]=ye({prop:s,defaultProp:l??null,onChange:c,caller:Fn}),[y,w]=u.useState(!1),x=Se(d),S=nc(n),k=u.useRef(!1),[j,E]=u.useState(0);return u.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(Na,x),()=>P.removeEventListener(Na,x)},[x]),i.jsx(xx,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:u.useCallback(P=>b(P),[b]),onItemShiftTab:u.useCallback(()=>w(!0),[]),onFocusableItemAdd:u.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:u.useCallback(()=>E(P=>P-1),[]),children:i.jsx(V.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...m,ref:p,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{k.current=!0}),onFocus:B(e.onFocus,P=>{const _=!k.current;if(P.target===P.currentTarget&&_&&!y){const $=new CustomEvent(Na,bx);if(P.currentTarget.dispatchEvent($),!$.defaultPrevented){const H=S().filter(W=>W.focusable),z=H.find(W=>W.active),ee=H.find(W=>W.id===g),te=[z,ee,...H].filter(Boolean).map(W=>W.ref.current);sc(te,f)}}k.current=!1}),onBlur:B(e.onBlur,()=>w(!1))})})}),oc="RovingFocusGroupItem",ac=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...l}=e,c=pe(),d=a||c,f=Cx(oc,n),m=f.currentTabStopId===d,h=nc(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=f;return u.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),i.jsx(Sa.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:i.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:B(e.onMouseDown,b=>{r?f.onItemFocus(d):b.preventDefault()}),onFocus:B(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:B(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=kx(b,f.orientation,f.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=f.loop?Px(x,S+1):x.slice(S+1)}setTimeout(()=>sc(x))}}),children:typeof s=="function"?s({isCurrentTabStop:m,hasTabStop:g!=null}):s})})});ac.displayName=oc;var Sx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ex(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kx(e,t,n){const r=Ex(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Sx[r]}function sc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Px(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ar=rc,Rr=ac,Tx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Ir=new WeakMap,Dr={},Ea=0,ic=function(e){return e&&(e.host||ic(e.parentNode))},Mx=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ic(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})},jx=function(e,t,n,r){var o=Mx(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var a=Dr[n],s=[],l=new Set,c=new Set(o),d=function(m){!m||l.has(m)||(l.add(m),d(m.parentNode))};o.forEach(d);var f=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(h){if(l.has(h))f(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",g=(dn.get(h)||0)+1,b=(a.get(h)||0)+1;dn.set(h,g),a.set(h,b),s.push(h),g===1&&v&&Ir.set(h,!0),b===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),l.clear(),Ea++,function(){s.forEach(function(m){var h=dn.get(m)-1,p=a.get(m)-1;dn.set(m,h),a.set(m,p),h||(Ir.has(m)||m.removeAttribute(r),Ir.delete(m)),p||m.removeAttribute(n)}),Ea--,Ea||(dn=new WeakMap,dn=new WeakMap,Ir=new WeakMap,Dr={})}},Or=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Tx(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),jx(r,o,n,"aria-hidden")):function(){return null}},at=function(){return at=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},at.apply(this,arguments)};function lc(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 _x(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $r="right-scroll-bar-position",Lr="width-before-scroll-bar",Ax="with-scroll-bars-hidden",Rx="--removed-body-scroll-bar-size";function ka(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ix(e,t){var n=C.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 Dx=typeof window<"u"?u.useLayoutEffect:u.useEffect,cc=new WeakMap;function Ox(e,t){var n=Ix(null,function(r){return e.forEach(function(o){return ka(o,r)})});return Dx(function(){var r=cc.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(l){a.has(l)||ka(l,null)}),a.forEach(function(l){o.has(l)||ka(l,s)})}cc.set(n,e)},[e]),n}function $x(e){return e}function Lx(e,t){t===void 0&&(t=$x);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(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Fx(e){e===void 0&&(e={});var t=Lx(null);return t.options=at({async:!0,ssr:!1},e),t}var uc=function(e){var t=e.sideCar,n=lc(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 u.createElement(r,at({},n))};uc.isSideCarExport=!0;function Bx(e,t){return e.useMedium(t),uc}var dc=Fx(),Pa=function(){},Fr=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:Pa,onWheelCapture:Pa,onTouchMoveCapture:Pa}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,x=e.gapMode,S=lc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,j=Ox([n,t]),E=at(at({},S),o);return u.createElement(u.Fragment,null,f&&u.createElement(k,{sideCar:dc,removeScrollBar:d,shards:m,noRelative:p,noIsolation:v,inert:g,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:x}),s?u.cloneElement(u.Children.only(l),at(at({},E),{ref:j})):u.createElement(w,at({},E,{className:c,ref:j}),l))});Fr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fr.classNames={fullWidth:Lr,zeroRight:$r};var zx=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zx();return t&&e.setAttribute("nonce",t),e}function Wx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Vx())&&(Wx(t,n),Hx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ux=function(){var e=Gx();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fc=function(){var e=Ux(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Yx={left:0,top:0,right:0,gap:0},Ta=function(e){return parseInt(e||"",10)||0},Kx=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[Ta(n),Ta(r),Ta(o)]},qx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yx;var t=Kx(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])}},Xx=fc(),fn="data-scroll-locked",Qx=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
213
|
+
.`.concat(Ax,` {
|
|
214
214
|
overflow: hidden `).concat(r,`;
|
|
215
215
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|
216
216
|
}
|
|
@@ -244,23 +244,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
body[`).concat(fn,`] {
|
|
247
|
-
`).concat(
|
|
247
|
+
`).concat(Rx,": ").concat(l,`px;
|
|
248
248
|
}
|
|
249
|
-
`)},mc=function(){var e=parseInt(document.body.getAttribute(fn)||"0",10);return isFinite(e)?e:0},
|
|
249
|
+
`)},mc=function(){var e=parseInt(document.body.getAttribute(fn)||"0",10);return isFinite(e)?e:0},Zx=function(){u.useEffect(function(){return document.body.setAttribute(fn,(mc()+1).toString()),function(){var e=mc()-1;e<=0?document.body.removeAttribute(fn):document.body.setAttribute(fn,e.toString())}},[])},Jx=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Zx();var a=u.useMemo(function(){return qx(o)},[o]);return u.createElement(Xx,{styles:Qx(a,!t,o,n?"":"!important")})},Ma=!1;if(typeof window<"u")try{var Br=Object.defineProperty({},"passive",{get:function(){return Ma=!0,!0}});window.addEventListener("test",Br,Br),window.removeEventListener("test",Br,Br)}catch{Ma=!1}var mn=Ma?{passive:!1}:!1,e0=function(e){return e.tagName==="TEXTAREA"},pc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!e0(e)&&n[t]==="visible")},t0=function(e){return pc(e,"overflowY")},n0=function(e){return pc(e,"overflowX")},hc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=gc(e,r);if(o){var a=vc(e,r),s=a[1],l=a[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},r0=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},o0=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gc=function(e,t){return e==="v"?t0(t):n0(t)},vc=function(e,t){return e==="v"?r0(t):o0(t)},a0=function(e,t){return e==="h"&&t==="rtl"?-1:1},s0=function(e,t,n,r,o){var a=a0(e,window.getComputedStyle(t).direction),s=a*r,l=n.target,c=t.contains(l),d=!1,f=s>0,m=0,h=0;do{if(!l)break;var p=vc(e,l),v=p[0],g=p[1],b=p[2],y=g-b-a*v;(v||y)&&gc(e,l)&&(m+=y,h+=v);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(m)<1||!f&&Math.abs(h)<1)&&(d=!0),d},zr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bc=function(e){return[e.deltaX,e.deltaY]},wc=function(e){return e&&"current"in e?e.current:e},i0=function(e,t){return e[0]===t[0]&&e[1]===t[1]},l0=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},s0=0,pn=[];function i0(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(s0++)[0],a=u.useState(fc)[0],s=u.useRef(e);u.useEffect(function(){s.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Tx([e.lockRef.current],(e.shards||[]).map(wc),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=u.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=zr(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-y[0],S="deltaY"in g?g.deltaY:w[1]-y[1],k,j=g.target,E=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&j.type==="range")return!1;var P=hc(E,j);if(!P)return!0;if(P?k=E:(k=E==="v"?"h":"v",P=hc(E,j)),!P)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=k),!k)return!0;var _=r.current||k;return r0(_,b,g,_==="h"?x:S)},[]),c=u.useCallback(function(g){var b=g;if(!(!pn.length||pn[pn.length-1]!==a)){var y="deltaY"in b?bc(b):zr(b),w=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&o0(k.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(wc).filter(Boolean).filter(function(k){return k.contains(b.target)}),S=x.length>0?l(b,x[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),d=u.useCallback(function(g,b,y,w){var x={name:g,delta:b,target:y,should:w,shadowParent:l0(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=u.useCallback(function(g){n.current=zr(g),r.current=void 0},[]),m=u.useCallback(function(g){d(g.type,bc(g),g.target,l(g,e.lockRef.current))},[]),h=u.useCallback(function(g){d(g.type,zr(g),g.target,l(g,e.lockRef.current))},[]);u.useEffect(function(){return pn.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,mn),document.addEventListener("touchmove",c,mn),document.addEventListener("touchstart",f,mn),function(){pn=pn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,mn),document.removeEventListener("touchmove",c,mn),document.removeEventListener("touchstart",f,mn)}},[]);var p=e.removeScrollBar,v=e.inert;return u.createElement(u.Fragment,null,v?u.createElement(a,{styles:a0(o)}):null,p?u.createElement(Xx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function l0(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const c0=$x(dc,i0);var Bn=u.forwardRef(function(e,t){return u.createElement(Fr,at({},e,{ref:t,sideCar:c0}))});Bn.classNames=Fr.classNames;var ja=["Enter"," "],u0=["ArrowDown","PageUp","Home"],yc=["ArrowUp","PageDown","End"],d0=[...u0,...yc],f0={ltr:[...ja,"ArrowRight"],rtl:[...ja,"ArrowLeft"]},m0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},zn="Menu",[Vn,p0,h0]=an(zn),[Vt,xc]=be(zn,[h0,Ct,Nt]),Wn=Ct(),Cc=Nt(),[Nc,St]=Vt(zn),[g0,Hn]=Vt(zn),Sc=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,l=Wn(t),[c,d]=u.useState(null),f=u.useRef(!1),m=Se(a),h=bt(o);return u.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),i.jsx(On,{...l,children:i.jsx(Nc,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:d,children:i.jsx(g0,{scope:t,onClose:u.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};Sc.displayName=zn;var v0="MenuAnchor",_a=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wn(n);return i.jsx($n,{...o,...r,ref:t})});_a.displayName=v0;var Aa="MenuPortal",[b0,Ec]=Vt(Aa,{forceMount:void 0}),kc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=St(Aa,t);return i.jsx(b0,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:r})})})};kc.displayName=Aa;var Le="MenuContent",[w0,Ra]=Vt(Le),Pc=u.forwardRef((e,t)=>{const n=Ec(Le,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=St(Le,e.__scopeMenu),s=Hn(Le,e.__scopeMenu);return i.jsx(Vn.Provider,{scope:e.__scopeMenu,children:i.jsx(xe,{present:r||a.open,children:i.jsx(Vn.Slot,{scope:e.__scopeMenu,children:s.modal?i.jsx(y0,{...o,ref:t}):i.jsx(x0,{...o,ref:t})})})})}),y0=u.forwardRef((e,t)=>{const n=St(Le,e.__scopeMenu),r=u.useRef(null),o=re(t,r);return u.useEffect(()=>{const a=r.current;if(a)return Or(a)},[]),i.jsx(Ia,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),x0=u.forwardRef((e,t)=>{const n=St(Le,e.__scopeMenu);return i.jsx(Ia,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),C0=gt("MenuContent.ScrollLock"),Ia=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,disableOutsideScroll:v,...g}=e,b=St(Le,n),y=Hn(Le,n),w=Wn(n),x=Cc(n),S=p0(n),[k,j]=u.useState(null),E=u.useRef(null),P=re(t,E,b.onContentChange),_=u.useRef(0),$=u.useRef(""),H=u.useRef(0),z=u.useRef(null),ee=u.useRef("right"),K=u.useRef(0),te=v?Bn:u.Fragment,W=v?{as:C0,allowPinchZoom:!0}:void 0,q=O=>{var A,Y;const M=$.current+O,U=S().filter(X=>!X.disabled),T=document.activeElement,D=(A=U.find(X=>X.ref.current===T))==null?void 0:A.textValue,L=U.map(X=>X.textValue),F=I0(L,M,D),J=(Y=U.find(X=>X.textValue===F))==null?void 0:Y.ref.current;(function X(ne){$.current=ne,window.clearTimeout(_.current),ne!==""&&(_.current=window.setTimeout(()=>X(""),1e3))})(M),J&&setTimeout(()=>J.focus())};u.useEffect(()=>()=>window.clearTimeout(_.current),[]),br();const I=u.useCallback(O=>{var U,T;return ee.current===((U=z.current)==null?void 0:U.side)&&O0(O,(T=z.current)==null?void 0:T.area)},[]);return i.jsx(w0,{scope:n,searchRef:$,onItemEnter:u.useCallback(O=>{I(O)&&O.preventDefault()},[I]),onItemLeave:u.useCallback(O=>{var M;I(O)||((M=E.current)==null||M.focus(),j(null))},[I]),onTriggerLeave:u.useCallback(O=>{I(O)&&O.preventDefault()},[I]),pointerGraceTimerRef:H,onPointerGraceIntentChange:u.useCallback(O=>{z.current=O},[]),children:i.jsx(te,{...W,children:i.jsx(An,{asChild:!0,trapped:o,onMountAutoFocus:B(a,O=>{var M;O.preventDefault(),(M=E.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,children:i.jsx(Ar,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:j,onEntryFocus:B(c,O=>{y.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Mr,{role:"menu","aria-orientation":"vertical","data-state":Gc(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:B(g.onKeyDown,O=>{const U=O.target.closest("[data-radix-menu-content]")===O.currentTarget,T=O.ctrlKey||O.altKey||O.metaKey,D=O.key.length===1;U&&(O.key==="Tab"&&O.preventDefault(),!T&&D&&q(O.key));const L=E.current;if(O.target!==L||!d0.includes(O.key))return;O.preventDefault();const J=S().filter(A=>!A.disabled).map(A=>A.ref.current);yc.includes(O.key)&&J.reverse(),A0(J)}),onBlur:B(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(_.current),$.current="")}),onPointerMove:B(e.onPointerMove,Un(O=>{const M=O.target,U=K.current!==O.clientX;if(O.currentTarget.contains(M)&&U){const T=O.clientX>K.current?"right":"left";ee.current=T,K.current=O.clientX}}))})})})})})})});Pc.displayName=Le;var N0="MenuGroup",Da=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(V.div,{role:"group",...r,ref:t})});Da.displayName=N0;var S0="MenuLabel",Tc=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(V.div,{...r,ref:t})});Tc.displayName=S0;var Vr="MenuItem",Mc="menu.itemSelect",Wr=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=u.useRef(null),s=Hn(Vr,e.__scopeMenu),l=Ra(Vr,e.__scopeMenu),c=re(t,a),d=u.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const h=new CustomEvent(Mc,{bubbles:!0,cancelable:!0});m.addEventListener(Mc,p=>r==null?void 0:r(p),{once:!0}),vr(m,h),h.defaultPrevented?d.current=!1:s.onClose()}};return i.jsx(jc,{...o,ref:c,disabled:n,onClick:B(e.onClick,f),onPointerDown:m=>{var h;(h=e.onPointerDown)==null||h.call(e,m),d.current=!0},onPointerUp:B(e.onPointerUp,m=>{var h;d.current||(h=m.currentTarget)==null||h.click()}),onKeyDown:B(e.onKeyDown,m=>{const h=l.searchRef.current!=="";n||h&&m.key===" "||ja.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Wr.displayName=Vr;var jc=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Ra(Vr,n),l=Cc(n),c=u.useRef(null),d=re(t,c),[f,m]=u.useState(!1),[h,p]=u.useState("");return u.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[a.children]),i.jsx(Vn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:i.jsx(Rr,{asChild:!0,...l,focusable:!r,children:i.jsx(V.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:B(e.onPointerMove,Un(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Un(v=>s.onItemLeave(v))),onFocus:B(e.onFocus,()=>m(!0)),onBlur:B(e.onBlur,()=>m(!1))})})})}),E0="MenuCheckboxItem",_c=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(Oc,{scope:e.__scopeMenu,checked:n,children:i.jsx(Wr,{role:"menuitemcheckbox","aria-checked":Hr(n)?"mixed":n,...o,ref:t,"data-state":La(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(Hr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_c.displayName=E0;var Ac="MenuRadioGroup",[k0,P0]=Vt(Ac,{value:void 0,onValueChange:()=>{}}),Rc=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Se(r);return i.jsx(k0,{scope:e.__scopeMenu,value:n,onValueChange:a,children:i.jsx(Da,{...o,ref:t})})});Rc.displayName=Ac;var Ic="MenuRadioItem",Dc=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=P0(Ic,e.__scopeMenu),a=n===o.value;return i.jsx(Oc,{scope:e.__scopeMenu,checked:a,children:i.jsx(Wr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":La(a),onSelect:B(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Dc.displayName=Ic;var Oa="MenuItemIndicator",[Oc,T0]=Vt(Oa,{checked:!1}),$c=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=T0(Oa,n);return i.jsx(xe,{present:r||Hr(a.checked)||a.checked===!0,children:i.jsx(V.span,{...o,ref:t,"data-state":La(a.checked)})})});$c.displayName=Oa;var M0="MenuSeparator",Lc=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Lc.displayName=M0;var j0="MenuArrow",Fc=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wn(n);return i.jsx(jr,{...o,...r,ref:t})});Fc.displayName=j0;var $a="MenuSub",[_0,Bc]=Vt($a),zc=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=St($a,t),s=Wn(t),[l,c]=u.useState(null),[d,f]=u.useState(null),m=Se(o);return u.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),i.jsx(On,{...s,children:i.jsx(Nc,{scope:t,open:r,onOpenChange:m,content:d,onContentChange:f,children:i.jsx(_0,{scope:t,contentId:pe(),triggerId:pe(),trigger:l,onTriggerChange:c,children:n})})})};zc.displayName=$a;var Gn="MenuSubTrigger",Vc=u.forwardRef((e,t)=>{const n=St(Gn,e.__scopeMenu),r=Hn(Gn,e.__scopeMenu),o=Bc(Gn,e.__scopeMenu),a=Ra(Gn,e.__scopeMenu),s=u.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},f=u.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return u.useEffect(()=>f,[f]),u.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),c(null)}},[l,c]),i.jsx(_a,{asChild:!0,...d,children:i.jsx(jc,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Gc(n.open),...e,ref:et(t,o.onTriggerChange),onClick:m=>{var h;(h=e.onClick)==null||h.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Un(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:B(e.onPointerLeave,Un(m=>{var p,v;f();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const g=(v=n.content)==null?void 0:v.dataset.side,b=g==="right",y=b?-5:5,w=h[b?"left":"right"],x=h[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:w,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:w,y:h.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,m=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&m.key===" "||f0[r.dir].includes(m.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),m.preventDefault())})})})});Vc.displayName=Gn;var Wc="MenuSubContent",Hc=u.forwardRef((e,t)=>{const n=Ec(Le,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=St(Le,e.__scopeMenu),s=Hn(Le,e.__scopeMenu),l=Bc(Wc,e.__scopeMenu),c=u.useRef(null),d=re(t,c);return i.jsx(Vn.Provider,{scope:e.__scopeMenu,children:i.jsx(xe,{present:r||a.open,children:i.jsx(Vn.Slot,{scope:e.__scopeMenu,children:i.jsx(Ia,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;s.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{var p;const m=f.currentTarget.contains(f.target),h=m0[s.dir].includes(f.key);m&&h&&(a.onOpenChange(!1),(p=l.trigger)==null||p.focus(),f.preventDefault())})})})})})});Hc.displayName=Wc;function Gc(e){return e?"open":"closed"}function Hr(e){return e==="indeterminate"}function La(e){return Hr(e)?"indeterminate":e?"checked":"unchecked"}function A0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function R0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function I0(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=R0(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function D0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a],c=t[s],d=l.x,f=l.y,m=c.x,h=c.y;f>r!=h>r&&n<(m-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function O0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return D0(n,t)}function Un(e){return t=>t.pointerType==="mouse"?e(t):void 0}var $0=Sc,L0=_a,F0=kc,B0=Pc,z0=Da,V0=Tc,W0=Wr,H0=_c,G0=Rc,U0=Dc,Y0=$c,K0=Lc,q0=Fc,X0=zc,Q0=Vc,Z0=Hc,Gr="DropdownMenu",[J0,lT]=be(Gr,[xc]),ke=xc(),[eC,Uc]=J0(Gr),Yc=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=ke(t),d=u.useRef(null),[f,m]=ye({prop:o,defaultProp:a??!1,onChange:s,caller:Gr});return i.jsx(eC,{scope:t,triggerId:pe(),triggerRef:d,contentId:pe(),open:f,onOpenChange:m,onOpenToggle:u.useCallback(()=>m(h=>!h),[m]),modal:l,children:i.jsx($0,{...c,open:f,onOpenChange:m,dir:r,modal:l,children:n})})};Yc.displayName=Gr;var Kc="DropdownMenuTrigger",qc=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Uc(Kc,n),s=ke(n);return i.jsx(L0,{asChild:!0,...s,children:i.jsx(V.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:et(t,a.triggerRef),onPointerDown:B(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:B(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});qc.displayName=Kc;var tC="DropdownMenuPortal",Xc=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ke(t);return i.jsx(F0,{...r,...n})};Xc.displayName=tC;var Qc="DropdownMenuContent",Zc=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Uc(Qc,n),a=ke(n),s=u.useRef(!1);return i.jsx(B0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,l=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:B(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;(!o.modal||f)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zc.displayName=Qc;var nC="DropdownMenuGroup",Jc=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(z0,{...o,...r,ref:t})});Jc.displayName=nC;var rC="DropdownMenuLabel",eu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(V0,{...o,...r,ref:t})});eu.displayName=rC;var oC="DropdownMenuItem",tu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(W0,{...o,...r,ref:t})});tu.displayName=oC;var aC="DropdownMenuCheckboxItem",nu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(H0,{...o,...r,ref:t})});nu.displayName=aC;var sC="DropdownMenuRadioGroup",ru=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(G0,{...o,...r,ref:t})});ru.displayName=sC;var iC="DropdownMenuRadioItem",ou=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(U0,{...o,...r,ref:t})});ou.displayName=iC;var lC="DropdownMenuItemIndicator",au=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(Y0,{...o,...r,ref:t})});au.displayName=lC;var cC="DropdownMenuSeparator",su=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(K0,{...o,...r,ref:t})});su.displayName=cC;var uC="DropdownMenuArrow",dC=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(q0,{...o,...r,ref:t})});dC.displayName=uC;var fC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=ke(t),[l,c]=ye({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return i.jsx(X0,{...s,open:l,onOpenChange:c,children:n})},mC="DropdownMenuSubTrigger",iu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(Q0,{...o,...r,ref:t})});iu.displayName=mC;var pC="DropdownMenuSubContent",lu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(Z0,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lu.displayName=pC;var hC=Yc,gC=qc,cu=Xc,uu=Zc,vC=Jc,du=eu,fu=tu,mu=nu,bC=ru,pu=ou,hu=au,gu=su,wC=fC,vu=iu,bu=lu;const wu=hC,yu=gC,yC=vC,xC=cu,CC=wC,NC=bC,xu=u.forwardRef(({className:e,inset:t,children:n,...r},o)=>i.jsxs(vu,{ref:o,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,i.jsx(_n,{className:"ml-auto"})]}));xu.displayName=vu.displayName;const Cu=u.forwardRef(({className:e,...t},n)=>i.jsx(bu,{ref:n,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));Cu.displayName=bu.displayName;const Fa=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(cu,{children:i.jsx(uu,{ref:r,sideOffset:t,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...n})}));Fa.displayName=uu.displayName;const Nu=u.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(fu,{ref:r,className:R("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Nu.displayName=fu.displayName;const Ba=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>i.jsxs(mu,{ref:o,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(hu,{children:i.jsx(jn,{className:"h-4 w-4"})})}),t]}));Ba.displayName=mu.displayName;const Su=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(pu,{ref:r,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(hu,{children:i.jsx(dl,{className:"h-2 w-2 fill-current"})})}),t]}));Su.displayName=pu.displayName;const za=u.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(du,{ref:r,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));za.displayName=du.displayName;const Ur=u.forwardRef(({className:e,...t},n)=>i.jsx(gu,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));Ur.displayName=gu.displayName;const Eu=({className:e,...t})=>i.jsx("span",{className:R("ml-auto text-xs tracking-widest opacity-60",e),...t});Eu.displayName="DropdownMenuShortcut";function SC({columns:e,onToggleVisibility:t,onReset:n}){return i.jsxs(wu,{children:[i.jsx(yu,{asChild:!0,children:i.jsxs(fe,{variant:"outline",className:"ml-auto",children:[i.jsx(yw,{className:"h-4 w-4 mr-2"}),"Columns"]})}),i.jsxs(Fa,{align:"end",className:"w-48",children:[i.jsx(za,{children:"Toggle columns"}),i.jsx(Ur,{}),e.map(r=>i.jsx(Ba,{checked:!r.hidden,onCheckedChange:o=>t(String(r.key),o),children:r.title},String(r.key))),i.jsx(Ur,{}),i.jsx(fe,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:n,children:"Reset columns"})]})]})}function ku(e,[t,n]){return Math.min(n,Math.max(t,e))}function Yn(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pu=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"}),EC="VisuallyHidden",Tu=u.forwardRef((e,t)=>i.jsx(V.span,{...e,ref:t,style:{...Pu,...e.style}}));Tu.displayName=EC;var Mu=Tu,kC=[" ","Enter","ArrowUp","ArrowDown"],PC=[" ","Enter"],Wt="Select",[Yr,Kr,TC]=an(Wt),[hn,cT]=be(Wt,[TC,Ct]),qr=Ct(),[MC,Et]=hn(Wt),[jC,_C]=hn(Wt),ju=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:d,name:f,autoComplete:m,disabled:h,required:p,form:v}=e,g=qr(t),[b,y]=u.useState(null),[w,x]=u.useState(null),[S,k]=u.useState(!1),j=bt(d),[E,P]=ye({prop:r,defaultProp:o??!1,onChange:a,caller:Wt}),[_,$]=ye({prop:s,defaultProp:l,onChange:c,caller:Wt}),H=u.useRef(null),z=b?v||!!b.closest("form"):!0,[ee,K]=u.useState(new Set),te=Array.from(ee).map(W=>W.props.value).join(";");return i.jsx(On,{...g,children:i.jsxs(MC,{required:p,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:pe(),value:_,onValueChange:$,open:E,onOpenChange:P,dir:j,triggerPointerDownPosRef:H,disabled:h,children:[i.jsx(Yr.Provider,{scope:t,children:i.jsx(jC,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(W=>{K(q=>new Set(q).add(W))},[]),onNativeOptionRemove:u.useCallback(W=>{K(q=>{const I=new Set(q);return I.delete(W),I})},[]),children:n})}),z?i.jsxs(ed,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:m,value:_,onChange:W=>$(W.target.value),disabled:h,form:v,children:[_===void 0?i.jsx("option",{value:""}):null,Array.from(ee)]},te):null]})})};ju.displayName=Wt;var _u="SelectTrigger",Au=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=qr(n),s=Et(_u,n),l=s.disabled||r,c=re(t,s.onTriggerChange),d=Kr(n),f=u.useRef("touch"),[m,h,p]=nd(g=>{const b=d().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=rd(b,g,y);w!==void 0&&s.onValueChange(w.value)}),v=g=>{l||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return i.jsx($n,{asChild:!0,...a,children:i.jsx(V.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":td(s.value)?"":void 0,...o,ref:c,onClick:B(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:B(o.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:B(o.onKeyDown,g=>{const b=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&kC.includes(g.key)&&(v(),g.preventDefault())})})})});Au.displayName=_u;var Ru="SelectValue",Iu=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...l}=e,c=Et(Ru,n),{onValueNodeHasChildrenChange:d}=c,f=a!==void 0,m=re(t,c.onValueNodeChange);return ge(()=>{d(f)},[d,f]),i.jsx(V.span,{...l,ref:m,style:{pointerEvents:"none"},children:td(c.value)?i.jsx(i.Fragment,{children:s}):a})});Iu.displayName=Ru;var AC="SelectIcon",Du=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Du.displayName=AC;var Ht="SelectContent",Ou=u.forwardRef((e,t)=>{const n=Et(Ht,e.__scopeSelect),[r,o]=u.useState();if(ge(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?sr.createPortal(i.jsx($u,{scope:e.__scopeSelect,children:i.jsx(Yr.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(Lu,{...e,ref:t})});Ou.displayName=Ht;var Ge=10,[$u,kt]=hn(Ht),RC="SelectContentImpl",IC=gt("SelectContent.RemoveScroll"),Lu=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=Et(Ht,n),[x,S]=u.useState(null),[k,j]=u.useState(null),E=re(t,A=>S(A)),[P,_]=u.useState(null),[$,H]=u.useState(null),z=Kr(n),[ee,K]=u.useState(!1),te=u.useRef(!1);u.useEffect(()=>{if(x)return Or(x)},[x]),br();const W=u.useCallback(A=>{const[Y,...X]=z().map(ie=>ie.ref.current),[ne]=X.slice(-1),oe=document.activeElement;for(const ie of A)if(ie===oe||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Y&&k&&(k.scrollTop=0),ie===ne&&k&&(k.scrollTop=k.scrollHeight),ie==null||ie.focus(),document.activeElement!==oe))return},[z,k]),q=u.useCallback(()=>W([P,x]),[W,P,x]);u.useEffect(()=>{ee&&q()},[ee,q]);const{onOpenChange:I,triggerPointerDownPosRef:O}=w;u.useEffect(()=>{if(x){let A={x:0,y:0};const Y=ne=>{var oe,ie;A={x:Math.abs(Math.round(ne.pageX)-(((oe=O.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},X=ne=>{A.x<=10&&A.y<=10?ne.preventDefault():x.contains(ne.target)||I(!1),document.removeEventListener("pointermove",Y),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,I,O]),u.useEffect(()=>{const A=()=>I(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[I]);const[M,U]=nd(A=>{const Y=z().filter(oe=>!oe.disabled),X=Y.find(oe=>oe.ref.current===document.activeElement),ne=rd(Y,A,X);ne&&setTimeout(()=>ne.ref.current.focus())}),T=u.useCallback((A,Y,X)=>{const ne=!te.current&&!X;(w.value!==void 0&&w.value===Y||ne)&&(_(A),ne&&(te.current=!0))},[w.value]),D=u.useCallback(()=>x==null?void 0:x.focus(),[x]),L=u.useCallback((A,Y,X)=>{const ne=!te.current&&!X;(w.value!==void 0&&w.value===Y||ne)&&H(A)},[w.value]),F=r==="popper"?Va:Fu,J=F===Va?{side:l,sideOffset:c,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return i.jsx($u,{scope:n,content:x,viewport:k,onViewportChange:j,itemRefCallback:T,selectedItem:P,onItemLeave:D,itemTextRefCallback:L,focusSelectedItem:q,selectedItemText:$,position:r,isPositioned:ee,searchRef:M,children:i.jsx(Bn,{as:IC,allowPinchZoom:!0,children:i.jsx(An,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:B(o,A=>{var Y;(Y=w.trigger)==null||Y.focus({preventScroll:!0}),A.preventDefault()}),children:i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:i.jsx(F,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...y,...J,onPlaced:()=>K(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:B(y.onKeyDown,A=>{const Y=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!Y&&A.key.length===1&&U(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let ne=z().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(A.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const oe=A.target,ie=ne.indexOf(oe);ne=ne.slice(ie+1)}setTimeout(()=>W(ne)),A.preventDefault()}})})})})})})});Lu.displayName=RC;var DC="SelectItemAlignedPosition",Fu=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Et(Ht,n),s=kt(Ht,n),[l,c]=u.useState(null),[d,f]=u.useState(null),m=re(t,E=>f(E)),h=Kr(n),p=u.useRef(!1),v=u.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=u.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&g&&b&&y){const E=a.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(a.dir!=="rtl"){const oe=$.left-P.left,ie=_.left-oe,Ce=E.left-ie,we=E.width+Ce,Be=Math.max(we,P.width),$e=window.innerWidth-Ge,Ee=ku(ie,[Ge,Math.max(Ge,$e-Be)]);l.style.minWidth=we+"px",l.style.left=Ee+"px"}else{const oe=P.right-$.right,ie=window.innerWidth-_.right-oe,Ce=window.innerWidth-E.right-ie,we=E.width+Ce,Be=Math.max(we,P.width),$e=window.innerWidth-Ge,Ee=ku(ie,[Ge,Math.max(Ge,$e-Be)]);l.style.minWidth=we+"px",l.style.right=Ee+"px"}const H=h(),z=window.innerHeight-Ge*2,ee=g.scrollHeight,K=window.getComputedStyle(d),te=parseInt(K.borderTopWidth,10),W=parseInt(K.paddingTop,10),q=parseInt(K.borderBottomWidth,10),I=parseInt(K.paddingBottom,10),O=te+W+ee+I+q,M=Math.min(b.offsetHeight*5,O),U=window.getComputedStyle(g),T=parseInt(U.paddingTop,10),D=parseInt(U.paddingBottom,10),L=E.top+E.height/2-Ge,F=z-L,J=b.offsetHeight/2,A=b.offsetTop+J,Y=te+W+A,X=O-Y;if(Y<=L){const oe=H.length>0&&b===H[H.length-1].ref.current;l.style.bottom="0px";const ie=d.clientHeight-g.offsetTop-g.offsetHeight,Ce=Math.max(F,J+(oe?D:0)+ie+q),we=Y+Ce;l.style.height=we+"px"}else{const oe=H.length>0&&b===H[0].ref.current;l.style.top="0px";const Ce=Math.max(L,te+g.offsetTop+(oe?T:0)+J)+X;l.style.height=Ce+"px",g.scrollTop=Y-L+g.offsetTop}l.style.margin=`${Ge}px 0`,l.style.minHeight=M+"px",l.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,l,d,g,b,y,a.dir,r]);ge(()=>x(),[x]);const[S,k]=u.useState();ge(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const j=u.useCallback(E=>{E&&v.current===!0&&(x(),w==null||w(),v.current=!1)},[x,w]);return i.jsx($C,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:i.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Fu.displayName=DC;var OC="SelectPopperPosition",Va=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ge,...a}=e,s=qr(n);return i.jsx(Mr,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Va.displayName=OC;var[$C,Wa]=hn(Ht,{}),Ha="SelectViewport",Bu=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=kt(Ha,n),s=Wa(Ha,n),l=re(t,a.onViewportChange),c=u.useRef(0);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(Yr.Slot,{scope:n,children:i.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:B(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&m){const p=Math.abs(c.current-f.scrollTop);if(p>0){const v=window.innerHeight-Ge*2,g=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(g,b);if(y<v){const w=y+p,x=Math.min(v,w),S=w-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Bu.displayName=Ha;var zu="SelectGroup",[LC,FC]=hn(zu),Vu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return i.jsx(LC,{scope:n,id:o,children:i.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Vu.displayName=zu;var Wu="SelectLabel",Hu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=FC(Wu,n);return i.jsx(V.div,{id:o.id,...r,ref:t})});Hu.displayName=Wu;var Xr="SelectItem",[BC,Gu]=hn(Xr),Uu=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,l=Et(Xr,n),c=kt(Xr,n),d=l.value===r,[f,m]=u.useState(a??""),[h,p]=u.useState(!1),v=re(t,w=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,w,r,o)}),g=pe(),b=u.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.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 i.jsx(BC,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:u.useCallback(w=>{m(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:i.jsx(Yr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:i.jsx(V.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:B(s.onFocus,()=>p(!0)),onBlur:B(s.onBlur,()=>p(!1)),onClick:B(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:B(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:B(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:B(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=c.onItemLeave)==null||x.call(c):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:B(s.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(PC.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Uu.displayName=Xr;var Kn="SelectItemText",Yu=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Et(Kn,n),l=kt(Kn,n),c=Gu(Kn,n),d=_C(Kn,n),[f,m]=u.useState(null),h=re(t,y=>m(y),c.onItemTextChange,y=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,y,c.value,c.disabled)}),p=f==null?void 0:f.textContent,v=u.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return ge(()=>(g(v),()=>b(v)),[g,b,v]),i.jsxs(i.Fragment,{children:[i.jsx(V.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?sr.createPortal(a.children,s.valueNode):null]})});Yu.displayName=Kn;var Ku="SelectItemIndicator",qu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Gu(Ku,n).isSelected?i.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});qu.displayName=Ku;var Ga="SelectScrollUpButton",Xu=u.forwardRef((e,t)=>{const n=kt(Ga,e.__scopeSelect),r=Wa(Ga,e.__scopeSelect),[o,a]=u.useState(!1),s=re(t,r.onScrollButtonChange);return ge(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Zu,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Xu.displayName=Ga;var Ua="SelectScrollDownButton",Qu=u.forwardRef((e,t)=>{const n=kt(Ua,e.__scopeSelect),r=Wa(Ua,e.__scopeSelect),[o,a]=u.useState(!1),s=re(t,r.onScrollButtonChange);return ge(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;a(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Zu,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Qu.displayName=Ua;var Zu=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=kt("SelectScrollButton",n),s=u.useRef(null),l=Kr(n),c=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),ge(()=>{var f;const d=l().find(m=>m.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),i.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:B(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:B(o.onPointerLeave,()=>{c()})})}),zC="SelectSeparator",Ju=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Ju.displayName=zC;var Ya="SelectArrow",VC=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qr(n),a=Et(Ya,n),s=kt(Ya,n);return a.open&&s.position==="popper"?i.jsx(jr,{...o,...r,ref:t}):null});VC.displayName=Ya;var WC="SelectBubbleInput",ed=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),a=re(r,o),s=Yn(t);return u.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&f){const m=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(m)}},[s,t]),i.jsx(V.select,{...n,style:{...Pu,...n.style},ref:a,defaultValue:t})});ed.displayName=WC;function td(e){return e===""||e===void 0}function nd(e){const t=Se(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(s=>{const l=n.current+s;t(l),function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function rd(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=HC(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function HC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var GC=ju,od=Au,UC=Iu,YC=Du,ad=Ou,KC=Bu,qC=Vu,sd=Hu,id=Uu,XC=Yu,QC=qu,ld=Xu,cd=Qu,ud=Ju;const Ka=GC,ZC=qC,qa=UC,Qr=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(od,{ref:r,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,i.jsx(YC,{asChild:!0,children:i.jsx(rn,{className:"h-4 w-4 opacity-50"})})]}));Qr.displayName=od.displayName;const Xa=u.forwardRef(({className:e,...t},n)=>i.jsx(ld,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(rw,{className:"h-4 w-4"})}));Xa.displayName=ld.displayName;const Qa=u.forwardRef(({className:e,...t},n)=>i.jsx(cd,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(rn,{className:"h-4 w-4"})}));Qa.displayName=cd.displayName;const Zr=u.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>i.jsxs(ad,{ref:o,className:R("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:[i.jsx(Xa,{}),i.jsx(KC,{className:R("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(Qa,{})]}));Zr.displayName=ad.displayName;const dd=u.forwardRef(({className:e,...t},n)=>i.jsx(sd,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e),...t}));dd.displayName=sd.displayName;const Pt=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(id,{ref:r,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(QC,{children:i.jsx(jn,{className:"h-4 w-4"})})}),i.jsx(XC,{children:t})]}));Pt.displayName=id.displayName;const fd=u.forwardRef(({className:e,...t},n)=>i.jsx(ud,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));fd.displayName=ud.displayName;function JC({filter:e,value:t,onChange:n}){return i.jsxs(Ka,{value:t||"all",onValueChange:n,children:[i.jsx(Qr,{className:"w-40",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(dw,{className:"h-4 w-4"}),i.jsx(qa,{placeholder:e.label})]})}),i.jsxs(Zr,{children:[i.jsxs(Pt,{value:"all",children:["All ",e.label]}),e.options.map(r=>i.jsx(Pt,{value:r.value,children:r.label},r.value))]})]})}const e1=Ft("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),qn=u.forwardRef(({className:e,sizing:t,type:n,...r},o)=>i.jsx("input",{type:n,className:R(e1({sizing:t,className:e})),ref:o,...r}));qn.displayName="Input";function t1({value:e,onChange:t,placeholder:n="Search..."}){return i.jsxs("div",{className:"relative flex-1 max-w-sm",children:[i.jsx(oa,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),i.jsx(qn,{placeholder:n,value:e,onChange:r=>t(r.target.value),className:"pl-10"})]})}function n1({selectedCount:e,onClearSelection:t}){return e===0?null:i.jsxs("div",{className:"bg-muted/50 p-2 rounded-md flex items-center justify-between",children:[i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:e})," ",e===1?"row":"rows"," selected"]}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:t,children:"Clear selection"})]})}var Jr="Checkbox",[r1,uT]=be(Jr),[o1,Za]=r1(Jr);function a1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:l,onCheckedChange:c,required:d,value:f="on",internal_do_not_use_render:m}=e,[h,p]=ye({prop:n,defaultProp:o??!1,onChange:c,caller:Jr}),[v,g]=u.useState(null),[b,y]=u.useState(null),w=u.useRef(!1),x=v?!!s||!!v.closest("form"):!0,S={checked:h,disabled:a,setChecked:p,control:v,setControl:g,name:l,form:s,value:f,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:Tt(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:y};return i.jsx(o1,{scope:t,...S,children:s1(m)?m(S):r})}var md="CheckboxTrigger",pd=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:l,checked:c,required:d,setControl:f,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:v}=Za(md,e),g=re(o,f),b=u.useRef(c);return u.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const w=()=>m(b.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,m]),i.jsx(V.button,{type:"button",role:"checkbox","aria-checked":Tt(c)?"mixed":c,"aria-required":d,"data-state":wd(c),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:g,onKeyDown:B(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:B(n,y=>{m(w=>Tt(w)?!0:!w),v&&p&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});pd.displayName=md;var Ja=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c,onCheckedChange:d,form:f,...m}=e;return i.jsx(a1,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:l,required:s,onCheckedChange:d,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:h})=>i.jsxs(i.Fragment,{children:[i.jsx(pd,{...m,ref:t,__scopeCheckbox:n}),h&&i.jsx(bd,{__scopeCheckbox:n})]})})});Ja.displayName=Jr;var hd="CheckboxIndicator",gd=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Za(hd,n);return i.jsx(xe,{present:r||Tt(a.checked)||a.checked===!0,children:i.jsx(V.span,{"data-state":wd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});gd.displayName=hd;var vd="CheckboxBubbleInput",bd=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:l,disabled:c,name:d,value:f,form:m,bubbleInput:h,setBubbleInput:p}=Za(vd,e),v=re(n,p),g=Yn(a),b=Tr(r);u.useEffect(()=>{const w=h;if(!w)return;const x=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(x,"checked").set,j=!o.current;if(g!==a&&k){const E=new Event("click",{bubbles:j});w.indeterminate=Tt(a),k.call(w,Tt(a)?!1:a),w.dispatchEvent(E)}},[h,g,a,o]);const y=u.useRef(Tt(a)?!1:a);return i.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:l,disabled:c,name:d,value:f,form:m,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bd.displayName=vd;function s1(e){return typeof e=="function"}function Tt(e){return e==="indeterminate"}function wd(e){return Tt(e)?"indeterminate":e?"checked":"unchecked"}const eo=u.forwardRef(({className:e,...t},n)=>i.jsx(Ja,{ref:n,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:i.jsx(gd,{className:R("flex items-center justify-center text-current"),children:i.jsx(jn,{className:"h-4 w-4"})})}));eo.displayName=Ja.displayName;function i1({columns:e,sortState:t,allRowsSelected:n,hasData:r,onSort:o,onToggleAllRows:a,allowSelectAllRows:s}){const l=e.filter(c=>!c.hidden);return i.jsxs(tn,{children:[s&&i.jsx(Mn,{className:"w-12",children:i.jsx(eo,{checked:n&&r,onCheckedChange:a,"aria-label":"Select all rows"})}),l.map(c=>i.jsx(Mn,{className:R(c.sortable?"cursor-pointer select-none":"",c.headerClassName,c.align==="right"?"text-right":"",c.align==="center"?"text-center":""),onClick:c.sortable?()=>o(String(c.key)):void 0,style:{width:c.width?typeof c.width=="number"?`${c.width}px`:c.width:void 0},children:i.jsxs("div",{className:"flex items-center gap-1",children:[c.title,c.sortable&&i.jsx(i.Fragment,{children:t.field===c.key?t.direction==="asc"?i.jsx(tw,{className:"h-4 w-4"}):i.jsx(Qb,{className:"h-4 w-4"}):i.jsx(ew,{className:"h-4 w-4 opacity-50"})})]})},String(c.key)))]})}function l1({row:e,index:t,columns:n,isSelected:r,rowId:o,onToggleSelection:a,allowSelection:s=!0}){const l=n.filter(c=>!c.hidden);return i.jsxs(tn,{className:r?"bg-muted/50":"",children:[s&&i.jsx(nn,{className:"w-12",children:i.jsx(eo,{checked:r,onCheckedChange:c=>a(o,!!c),"aria-label":`Select row ${t+1}`})}),l.map(c=>{const d=e[c.key];return i.jsx(nn,{className:R(c.align==="right"?"text-right":"",c.align==="center"?"text-center":"",c.cellClassName),children:c.customRenderer?c.customRenderer(d,e):String(d??"")},String(c.key))})]})}const Oe=({className:e,repeat:t=1,...n})=>i.jsx(i.Fragment,{children:Array.from({length:t??1}).map((r,o)=>i.jsx("div",{className:R("animate-shimmer bg-gradient-to-r from-gray-300 via-gray-100 to-gray-300","bg-[length:200%_100%] rounded-md h-5",e),...n},o))});function c1({columns:e,rows:t=5}){return i.jsx("div",{className:"rounded-md border",children:i.jsxs(mr,{children:[i.jsx(pr,{children:i.jsx(tn,{children:Array.from({length:e}).map((n,r)=>i.jsx(Mn,{children:i.jsx(Oe,{className:"h-4 w-20"})},r))})}),i.jsx(hr,{children:Array.from({length:t}).map((n,r)=>i.jsx(tn,{children:Array.from({length:e}).map((o,a)=>i.jsx(nn,{children:i.jsx(Oe,{className:"h-4 w-full"})},a))},r))})]})})}function u1(e,t,n){const r=t.filter(f=>!f.hidden),o=r.map(f=>f.title),a=e.map(f=>r.map(m=>{const h=f[m.key];return h!=null?String(h):""})),s=[o.join(","),...a.map(f=>f.join(","))].join(`
|
|
253
|
-
`),l=new Blob([s],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(l),d=document.createElement("a");d.setAttribute("href",c),d.setAttribute("download",`${n}.csv`),d.style.visibility="hidden",document.body.appendChild(d),d.click(),document.body.removeChild(d)}var to="Collapsible",[d1,yd]=be(to),[f1,es]=d1(to),xd=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...l}=e,[c,d]=ye({prop:r,defaultProp:o??!1,onChange:s,caller:to});return i.jsx(f1,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),children:i.jsx(V.div,{"data-state":ns(c),"data-disabled":a?"":void 0,...l,ref:t})})});xd.displayName=to;var Cd="CollapsibleTrigger",Nd=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=es(Cd,n);return i.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ns(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:B(e.onClick,o.onOpenToggle)})});Nd.displayName=Cd;var ts="CollapsibleContent",Sd=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=es(ts,e.__scopeCollapsible);return i.jsx(xe,{present:n||o.open,children:({present:a})=>i.jsx(m1,{...r,ref:t,present:a})})});Sd.displayName=ts;var m1=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=es(ts,n),[l,c]=u.useState(r),d=u.useRef(null),f=re(t,d),m=u.useRef(0),h=m.current,p=u.useRef(0),v=p.current,g=s.open||l,b=u.useRef(g),y=u.useRef(void 0);return u.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),ge(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();m.current=x.height,p.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[s.open,r]),i.jsx(V.div,{"data-state":ns(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,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 ns(e){return e?"open":"closed"}var p1=xd,h1=Nd,g1=Sd,Ue="Accordion",v1=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[rs,b1,w1]=an(Ue),[no,dT]=be(Ue,[w1,yd]),os=yd(),Ed=C.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return i.jsx(rs.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?i.jsx(N1,{...a,ref:t}):i.jsx(C1,{...o,ref:t})})});Ed.displayName=Ue;var[kd,y1]=no(Ue),[Pd,x1]=no(Ue,{collapsible:!1}),C1=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[l,c]=ye({prop:n,defaultProp:r??"",onChange:o,caller:Ue});return i.jsx(kd,{scope:e.__scopeAccordion,value:C.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:C.useCallback(()=>a&&c(""),[a,c]),children:i.jsx(Pd,{scope:e.__scopeAccordion,collapsible:a,children:i.jsx(Td,{...s,ref:t})})})}),N1=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r??[],onChange:o,caller:Ue}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),d=C.useCallback(f=>l((m=[])=>m.filter(h=>h!==f)),[l]);return i.jsx(kd,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:i.jsx(Pd,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(Td,{...a,ref:t})})})}),[S1,ro]=no(Ue),Td=C.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,l=C.useRef(null),c=re(l,t),d=b1(n),m=bt(o)==="ltr",h=B(e.onKeyDown,p=>{var P;if(!v1.includes(p.key))return;const v=p.target,g=d().filter(_=>{var $;return!(($=_.ref.current)!=null&&$.disabled)}),b=g.findIndex(_=>_.ref.current===v),y=g.length;if(b===-1)return;p.preventDefault();let w=b;const x=0,S=y-1,k=()=>{w=b+1,w>S&&(w=x)},j=()=>{w=b-1,w<x&&(w=S)};switch(p.key){case"Home":w=x;break;case"End":w=S;break;case"ArrowRight":a==="horizontal"&&(m?k():j());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(m?j():k());break;case"ArrowUp":a==="vertical"&&j();break}const E=w%y;(P=g[E].ref.current)==null||P.focus()});return i.jsx(S1,{scope:n,disabled:r,direction:o,orientation:a,children:i.jsx(rs.Slot,{scope:n,children:i.jsx(V.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:h})})})}),oo="AccordionItem",[E1,as]=no(oo),Md=C.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=ro(oo,n),s=y1(oo,n),l=os(n),c=pe(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return i.jsx(E1,{scope:n,open:d,disabled:f,triggerId:c,children:i.jsx(p1,{"data-orientation":a.orientation,"data-state":Dd(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:m=>{m?s.onItemOpen(r):s.onItemClose(r)}})})});Md.displayName=oo;var jd="AccordionHeader",_d=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ro(Ue,n),a=as(jd,n);return i.jsx(V.h3,{"data-orientation":o.orientation,"data-state":Dd(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});_d.displayName=jd;var ss="AccordionTrigger",Ad=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ro(Ue,n),a=as(ss,n),s=x1(ss,n),l=os(n);return i.jsx(rs.ItemSlot,{scope:n,children:i.jsx(h1,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});Ad.displayName=ss;var Rd="AccordionContent",Id=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ro(Ue,n),a=as(Rd,n),s=os(n);return i.jsx(g1,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Id.displayName=Rd;function Dd(e){return e?"open":"closed"}var k1=Ed,P1=Md,T1=_d,Od=Ad,$d=Id;const M1=k1,Ld=u.forwardRef(({className:e,...t},n)=>i.jsx(P1,{ref:n,className:R("border-b",e),...t}));Ld.displayName="AccordionItem";const Fd=u.forwardRef(({className:e,children:t,...n},r)=>i.jsx(T1,{className:"flex",children:i.jsxs(Od,{ref:r,className:R("text-base flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,i.jsx(rn,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Fd.displayName=Od.displayName;const Bd=u.forwardRef(({className:e,children:t,...n},r)=>i.jsx($d,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:i.jsx("div",{className:R("pb-4 pt-0",e),children:t})}));Bd.displayName=$d.displayName;const j1=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},ao=u.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const l=c=>{const d=c.target;if(r){const f=j1(d.value,r);d.value=f}o==null||o(c)};return i.jsxs("div",{className:"relative w-full",children:[t&&i.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),i.jsx(qn,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:l,...a}),n&&i.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});ao.displayName="AdaptiveInput";var so="Dialog",[zd,Vd]=be(so),[_1,Ye]=zd(so),Wd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=u.useRef(null),c=u.useRef(null),[d,f]=ye({prop:r,defaultProp:o??!1,onChange:a,caller:so});return i.jsx(_1,{scope:t,triggerRef:l,contentRef:c,contentId:pe(),titleId:pe(),descriptionId:pe(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(m=>!m),[f]),modal:s,children:n})};Wd.displayName=so;var Hd="DialogTrigger",Gd=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(Hd,n),a=re(t,o.triggerRef);return i.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cs(o.open),...r,ref:a,onClick:B(e.onClick,o.onOpenToggle)})});Gd.displayName=Hd;var is="DialogPortal",[A1,Ud]=zd(is,{forceMount:void 0}),Yd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ye(is,t);return i.jsx(A1,{scope:t,forceMount:n,children:u.Children.map(r,s=>i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:s})}))})};Yd.displayName=is;var io="DialogOverlay",Kd=u.forwardRef((e,t)=>{const n=Ud(io,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ye(io,e.__scopeDialog);return a.modal?i.jsx(xe,{present:r||a.open,children:i.jsx(I1,{...o,ref:t})}):null});Kd.displayName=io;var R1=gt("DialogOverlay.RemoveScroll"),I1=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(io,n);return i.jsx(Bn,{as:R1,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(V.div,{"data-state":cs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gt="DialogContent",qd=u.forwardRef((e,t)=>{const n=Ud(Gt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ye(Gt,e.__scopeDialog);return i.jsx(xe,{present:r||a.open,children:a.modal?i.jsx(D1,{...o,ref:t}):i.jsx(O1,{...o,ref:t})})});qd.displayName=Gt;var D1=u.forwardRef((e,t)=>{const n=Ye(Gt,e.__scopeDialog),r=u.useRef(null),o=re(t,n.contentRef,r);return u.useEffect(()=>{const a=r.current;if(a)return Or(a)},[]),i.jsx(Xd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault())})}),O1=u.forwardRef((e,t)=>{const n=Ye(Gt,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return i.jsx(Xd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Xd=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=Ye(Gt,n),c=u.useRef(null),d=re(t,c);return br(),i.jsxs(i.Fragment,{children:[i.jsx(An,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Bt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":cs(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(L1,{titleId:l.titleId}),i.jsx(B1,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ls="DialogTitle",Qd=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(ls,n);return i.jsx(V.h2,{id:o.titleId,...r,ref:t})});Qd.displayName=ls;var Zd="DialogDescription",Jd=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(Zd,n);return i.jsx(V.p,{id:o.descriptionId,...r,ref:t})});Jd.displayName=Zd;var ef="DialogClose",tf=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(ef,n);return i.jsx(V.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});tf.displayName=ef;function cs(e){return e?"open":"closed"}var nf="DialogTitleWarning",[$1,rf]=Nw(nf,{contentName:Gt,titleName:ls,docsSlug:"dialog"}),L1=({titleId:e})=>{const t=rf(nf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
252
|
+
`)},c0=0,pn=[];function u0(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(c0++)[0],a=u.useState(fc)[0],s=u.useRef(e);u.useEffect(function(){s.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=_x([e.lockRef.current],(e.shards||[]).map(wc),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=u.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=zr(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-y[0],S="deltaY"in g?g.deltaY:w[1]-y[1],k,j=g.target,E=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&j.type==="range")return!1;var P=hc(E,j);if(!P)return!0;if(P?k=E:(k=E==="v"?"h":"v",P=hc(E,j)),!P)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=k),!k)return!0;var _=r.current||k;return s0(_,b,g,_==="h"?x:S)},[]),c=u.useCallback(function(g){var b=g;if(!(!pn.length||pn[pn.length-1]!==a)){var y="deltaY"in b?bc(b):zr(b),w=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&i0(k.delta,y)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(wc).filter(Boolean).filter(function(k){return k.contains(b.target)}),S=x.length>0?l(b,x[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),d=u.useCallback(function(g,b,y,w){var x={name:g,delta:b,target:y,should:w,shadowParent:d0(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=u.useCallback(function(g){n.current=zr(g),r.current=void 0},[]),m=u.useCallback(function(g){d(g.type,bc(g),g.target,l(g,e.lockRef.current))},[]),h=u.useCallback(function(g){d(g.type,zr(g),g.target,l(g,e.lockRef.current))},[]);u.useEffect(function(){return pn.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,mn),document.addEventListener("touchmove",c,mn),document.addEventListener("touchstart",f,mn),function(){pn=pn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,mn),document.removeEventListener("touchmove",c,mn),document.removeEventListener("touchstart",f,mn)}},[]);var p=e.removeScrollBar,v=e.inert;return u.createElement(u.Fragment,null,v?u.createElement(a,{styles:l0(o)}):null,p?u.createElement(Jx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function d0(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const f0=Bx(dc,u0);var Bn=u.forwardRef(function(e,t){return u.createElement(Fr,at({},e,{ref:t,sideCar:f0}))});Bn.classNames=Fr.classNames;var ja=["Enter"," "],m0=["ArrowDown","PageUp","Home"],yc=["ArrowUp","PageDown","End"],p0=[...m0,...yc],h0={ltr:[...ja,"ArrowRight"],rtl:[...ja,"ArrowLeft"]},g0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},zn="Menu",[Vn,v0,b0]=an(zn),[Vt,xc]=be(zn,[b0,Nt,St]),Wn=Nt(),Cc=St(),[Nc,Et]=Vt(zn),[w0,Hn]=Vt(zn),Sc=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,l=Wn(t),[c,d]=u.useState(null),f=u.useRef(!1),m=Se(a),h=wt(o);return u.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),i.jsx(On,{...l,children:i.jsx(Nc,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:d,children:i.jsx(w0,{scope:t,onClose:u.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:h,modal:s,children:r})})})};Sc.displayName=zn;var y0="MenuAnchor",_a=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wn(n);return i.jsx($n,{...o,...r,ref:t})});_a.displayName=y0;var Aa="MenuPortal",[x0,Ec]=Vt(Aa,{forceMount:void 0}),kc=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Et(Aa,t);return i.jsx(x0,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:r})})})};kc.displayName=Aa;var Le="MenuContent",[C0,Ra]=Vt(Le),Pc=u.forwardRef((e,t)=>{const n=Ec(Le,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Et(Le,e.__scopeMenu),s=Hn(Le,e.__scopeMenu);return i.jsx(Vn.Provider,{scope:e.__scopeMenu,children:i.jsx(xe,{present:r||a.open,children:i.jsx(Vn.Slot,{scope:e.__scopeMenu,children:s.modal?i.jsx(N0,{...o,ref:t}):i.jsx(S0,{...o,ref:t})})})})}),N0=u.forwardRef((e,t)=>{const n=Et(Le,e.__scopeMenu),r=u.useRef(null),o=re(t,r);return u.useEffect(()=>{const a=r.current;if(a)return Or(a)},[]),i.jsx(Ia,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),S0=u.forwardRef((e,t)=>{const n=Et(Le,e.__scopeMenu);return i.jsx(Ia,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),E0=gt("MenuContent.ScrollLock"),Ia=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,disableOutsideScroll:v,...g}=e,b=Et(Le,n),y=Hn(Le,n),w=Wn(n),x=Cc(n),S=v0(n),[k,j]=u.useState(null),E=u.useRef(null),P=re(t,E,b.onContentChange),_=u.useRef(0),$=u.useRef(""),H=u.useRef(0),z=u.useRef(null),ee=u.useRef("right"),K=u.useRef(0),te=v?Bn:u.Fragment,W=v?{as:E0,allowPinchZoom:!0}:void 0,q=O=>{var A,Y;const M=$.current+O,U=S().filter(X=>!X.disabled),T=document.activeElement,D=(A=U.find(X=>X.ref.current===T))==null?void 0:A.textValue,L=U.map(X=>X.textValue),F=$0(L,M,D),J=(Y=U.find(X=>X.textValue===F))==null?void 0:Y.ref.current;(function X(ne){$.current=ne,window.clearTimeout(_.current),ne!==""&&(_.current=window.setTimeout(()=>X(""),1e3))})(M),J&&setTimeout(()=>J.focus())};u.useEffect(()=>()=>window.clearTimeout(_.current),[]),br();const I=u.useCallback(O=>{var U,T;return ee.current===((U=z.current)==null?void 0:U.side)&&F0(O,(T=z.current)==null?void 0:T.area)},[]);return i.jsx(C0,{scope:n,searchRef:$,onItemEnter:u.useCallback(O=>{I(O)&&O.preventDefault()},[I]),onItemLeave:u.useCallback(O=>{var M;I(O)||((M=E.current)==null||M.focus(),j(null))},[I]),onTriggerLeave:u.useCallback(O=>{I(O)&&O.preventDefault()},[I]),pointerGraceTimerRef:H,onPointerGraceIntentChange:u.useCallback(O=>{z.current=O},[]),children:i.jsx(te,{...W,children:i.jsx(An,{asChild:!0,trapped:o,onMountAutoFocus:B(a,O=>{var M;O.preventDefault(),(M=E.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:p,children:i.jsx(Ar,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:j,onEntryFocus:B(c,O=>{y.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Mr,{role:"menu","aria-orientation":"vertical","data-state":Gc(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:B(g.onKeyDown,O=>{const U=O.target.closest("[data-radix-menu-content]")===O.currentTarget,T=O.ctrlKey||O.altKey||O.metaKey,D=O.key.length===1;U&&(O.key==="Tab"&&O.preventDefault(),!T&&D&&q(O.key));const L=E.current;if(O.target!==L||!p0.includes(O.key))return;O.preventDefault();const J=S().filter(A=>!A.disabled).map(A=>A.ref.current);yc.includes(O.key)&&J.reverse(),D0(J)}),onBlur:B(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(_.current),$.current="")}),onPointerMove:B(e.onPointerMove,Un(O=>{const M=O.target,U=K.current!==O.clientX;if(O.currentTarget.contains(M)&&U){const T=O.clientX>K.current?"right":"left";ee.current=T,K.current=O.clientX}}))})})})})})})});Pc.displayName=Le;var k0="MenuGroup",Da=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(V.div,{role:"group",...r,ref:t})});Da.displayName=k0;var P0="MenuLabel",Tc=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(V.div,{...r,ref:t})});Tc.displayName=P0;var Vr="MenuItem",Mc="menu.itemSelect",Wr=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=u.useRef(null),s=Hn(Vr,e.__scopeMenu),l=Ra(Vr,e.__scopeMenu),c=re(t,a),d=u.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const h=new CustomEvent(Mc,{bubbles:!0,cancelable:!0});m.addEventListener(Mc,p=>r==null?void 0:r(p),{once:!0}),vr(m,h),h.defaultPrevented?d.current=!1:s.onClose()}};return i.jsx(jc,{...o,ref:c,disabled:n,onClick:B(e.onClick,f),onPointerDown:m=>{var h;(h=e.onPointerDown)==null||h.call(e,m),d.current=!0},onPointerUp:B(e.onPointerUp,m=>{var h;d.current||(h=m.currentTarget)==null||h.click()}),onKeyDown:B(e.onKeyDown,m=>{const h=l.searchRef.current!=="";n||h&&m.key===" "||ja.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Wr.displayName=Vr;var jc=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Ra(Vr,n),l=Cc(n),c=u.useRef(null),d=re(t,c),[f,m]=u.useState(!1),[h,p]=u.useState("");return u.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[a.children]),i.jsx(Vn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:i.jsx(Rr,{asChild:!0,...l,focusable:!r,children:i.jsx(V.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:B(e.onPointerMove,Un(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Un(v=>s.onItemLeave(v))),onFocus:B(e.onFocus,()=>m(!0)),onBlur:B(e.onBlur,()=>m(!1))})})})}),T0="MenuCheckboxItem",_c=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(Oc,{scope:e.__scopeMenu,checked:n,children:i.jsx(Wr,{role:"menuitemcheckbox","aria-checked":Hr(n)?"mixed":n,...o,ref:t,"data-state":La(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(Hr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_c.displayName=T0;var Ac="MenuRadioGroup",[M0,j0]=Vt(Ac,{value:void 0,onValueChange:()=>{}}),Rc=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Se(r);return i.jsx(M0,{scope:e.__scopeMenu,value:n,onValueChange:a,children:i.jsx(Da,{...o,ref:t})})});Rc.displayName=Ac;var Ic="MenuRadioItem",Dc=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=j0(Ic,e.__scopeMenu),a=n===o.value;return i.jsx(Oc,{scope:e.__scopeMenu,checked:a,children:i.jsx(Wr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":La(a),onSelect:B(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Dc.displayName=Ic;var Oa="MenuItemIndicator",[Oc,_0]=Vt(Oa,{checked:!1}),$c=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=_0(Oa,n);return i.jsx(xe,{present:r||Hr(a.checked)||a.checked===!0,children:i.jsx(V.span,{...o,ref:t,"data-state":La(a.checked)})})});$c.displayName=Oa;var A0="MenuSeparator",Lc=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Lc.displayName=A0;var R0="MenuArrow",Fc=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wn(n);return i.jsx(jr,{...o,...r,ref:t})});Fc.displayName=R0;var $a="MenuSub",[I0,Bc]=Vt($a),zc=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Et($a,t),s=Wn(t),[l,c]=u.useState(null),[d,f]=u.useState(null),m=Se(o);return u.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),i.jsx(On,{...s,children:i.jsx(Nc,{scope:t,open:r,onOpenChange:m,content:d,onContentChange:f,children:i.jsx(I0,{scope:t,contentId:pe(),triggerId:pe(),trigger:l,onTriggerChange:c,children:n})})})};zc.displayName=$a;var Gn="MenuSubTrigger",Vc=u.forwardRef((e,t)=>{const n=Et(Gn,e.__scopeMenu),r=Hn(Gn,e.__scopeMenu),o=Bc(Gn,e.__scopeMenu),a=Ra(Gn,e.__scopeMenu),s=u.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},f=u.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return u.useEffect(()=>f,[f]),u.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),c(null)}},[l,c]),i.jsx(_a,{asChild:!0,...d,children:i.jsx(jc,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Gc(n.open),...e,ref:et(t,o.onTriggerChange),onClick:m=>{var h;(h=e.onClick)==null||h.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Un(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:B(e.onPointerLeave,Un(m=>{var p,v;f();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const g=(v=n.content)==null?void 0:v.dataset.side,b=g==="right",y=b?-5:5,w=h[b?"left":"right"],x=h[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:w,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:w,y:h.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,m=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&m.key===" "||h0[r.dir].includes(m.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),m.preventDefault())})})})});Vc.displayName=Gn;var Wc="MenuSubContent",Hc=u.forwardRef((e,t)=>{const n=Ec(Le,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Et(Le,e.__scopeMenu),s=Hn(Le,e.__scopeMenu),l=Bc(Wc,e.__scopeMenu),c=u.useRef(null),d=re(t,c);return i.jsx(Vn.Provider,{scope:e.__scopeMenu,children:i.jsx(xe,{present:r||a.open,children:i.jsx(Vn.Slot,{scope:e.__scopeMenu,children:i.jsx(Ia,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;s.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{var p;const m=f.currentTarget.contains(f.target),h=g0[s.dir].includes(f.key);m&&h&&(a.onOpenChange(!1),(p=l.trigger)==null||p.focus(),f.preventDefault())})})})})})});Hc.displayName=Wc;function Gc(e){return e?"open":"closed"}function Hr(e){return e==="indeterminate"}function La(e){return Hr(e)?"indeterminate":e?"checked":"unchecked"}function D0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function O0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $0(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=O0(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function L0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a],c=t[s],d=l.x,f=l.y,m=c.x,h=c.y;f>r!=h>r&&n<(m-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function F0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return L0(n,t)}function Un(e){return t=>t.pointerType==="mouse"?e(t):void 0}var B0=Sc,z0=_a,V0=kc,W0=Pc,H0=Da,G0=Tc,U0=Wr,Y0=_c,K0=Rc,q0=Dc,X0=$c,Q0=Lc,Z0=Fc,J0=zc,eC=Vc,tC=Hc,Gr="DropdownMenu",[nC,fT]=be(Gr,[xc]),ke=xc(),[rC,Uc]=nC(Gr),Yc=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=ke(t),d=u.useRef(null),[f,m]=ye({prop:o,defaultProp:a??!1,onChange:s,caller:Gr});return i.jsx(rC,{scope:t,triggerId:pe(),triggerRef:d,contentId:pe(),open:f,onOpenChange:m,onOpenToggle:u.useCallback(()=>m(h=>!h),[m]),modal:l,children:i.jsx(B0,{...c,open:f,onOpenChange:m,dir:r,modal:l,children:n})})};Yc.displayName=Gr;var Kc="DropdownMenuTrigger",qc=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Uc(Kc,n),s=ke(n);return i.jsx(z0,{asChild:!0,...s,children:i.jsx(V.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:et(t,a.triggerRef),onPointerDown:B(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:B(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});qc.displayName=Kc;var oC="DropdownMenuPortal",Xc=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ke(t);return i.jsx(V0,{...r,...n})};Xc.displayName=oC;var Qc="DropdownMenuContent",Zc=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Uc(Qc,n),a=ke(n),s=u.useRef(!1);return i.jsx(W0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,l=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:B(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;(!o.modal||f)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zc.displayName=Qc;var aC="DropdownMenuGroup",Jc=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(H0,{...o,...r,ref:t})});Jc.displayName=aC;var sC="DropdownMenuLabel",eu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(G0,{...o,...r,ref:t})});eu.displayName=sC;var iC="DropdownMenuItem",tu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(U0,{...o,...r,ref:t})});tu.displayName=iC;var lC="DropdownMenuCheckboxItem",nu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(Y0,{...o,...r,ref:t})});nu.displayName=lC;var cC="DropdownMenuRadioGroup",ru=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(K0,{...o,...r,ref:t})});ru.displayName=cC;var uC="DropdownMenuRadioItem",ou=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(q0,{...o,...r,ref:t})});ou.displayName=uC;var dC="DropdownMenuItemIndicator",au=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(X0,{...o,...r,ref:t})});au.displayName=dC;var fC="DropdownMenuSeparator",su=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(Q0,{...o,...r,ref:t})});su.displayName=fC;var mC="DropdownMenuArrow",pC=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(Z0,{...o,...r,ref:t})});pC.displayName=mC;var hC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=ke(t),[l,c]=ye({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return i.jsx(J0,{...s,open:l,onOpenChange:c,children:n})},gC="DropdownMenuSubTrigger",iu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(eC,{...o,...r,ref:t})});iu.displayName=gC;var vC="DropdownMenuSubContent",lu=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ke(n);return i.jsx(tC,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lu.displayName=vC;var bC=Yc,wC=qc,cu=Xc,uu=Zc,yC=Jc,du=eu,fu=tu,mu=nu,xC=ru,pu=ou,hu=au,gu=su,CC=hC,vu=iu,bu=lu;const wu=bC,yu=wC,NC=yC,SC=cu,EC=CC,kC=xC,xu=u.forwardRef(({className:e,inset:t,children:n,...r},o)=>i.jsxs(vu,{ref:o,className:R("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,i.jsx(_n,{className:"ml-auto"})]}));xu.displayName=vu.displayName;const Cu=u.forwardRef(({className:e,...t},n)=>i.jsx(bu,{ref:n,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));Cu.displayName=bu.displayName;const Fa=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(cu,{children:i.jsx(uu,{ref:r,sideOffset:t,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...n})}));Fa.displayName=uu.displayName;const Nu=u.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(fu,{ref:r,className:R("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Nu.displayName=fu.displayName;const Ba=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>i.jsxs(mu,{ref:o,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(hu,{children:i.jsx(jn,{className:"h-4 w-4"})})}),t]}));Ba.displayName=mu.displayName;const Su=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(pu,{ref:r,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(hu,{children:i.jsx(dl,{className:"h-2 w-2 fill-current"})})}),t]}));Su.displayName=pu.displayName;const za=u.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(du,{ref:r,className:R("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));za.displayName=du.displayName;const Ur=u.forwardRef(({className:e,...t},n)=>i.jsx(gu,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));Ur.displayName=gu.displayName;const Eu=({className:e,...t})=>i.jsx("span",{className:R("ml-auto text-xs tracking-widest opacity-60",e),...t});Eu.displayName="DropdownMenuShortcut";function PC({columns:e,onToggleVisibility:t,onReset:n}){return i.jsxs(wu,{children:[i.jsx(yu,{asChild:!0,children:i.jsxs(fe,{variant:"outline",className:"ml-auto",children:[i.jsx(Nw,{className:"h-4 w-4 mr-2"}),"Columns"]})}),i.jsxs(Fa,{align:"end",className:"w-48",children:[i.jsx(za,{children:"Toggle columns"}),i.jsx(Ur,{}),e.map(r=>i.jsx(Ba,{checked:!r.hidden,onCheckedChange:o=>t(String(r.key),o),children:r.title},String(r.key))),i.jsx(Ur,{}),i.jsx(fe,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:n,children:"Reset columns"})]})]})}function ku(e,[t,n]){return Math.min(n,Math.max(t,e))}function Yn(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pu=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"}),TC="VisuallyHidden",Tu=u.forwardRef((e,t)=>i.jsx(V.span,{...e,ref:t,style:{...Pu,...e.style}}));Tu.displayName=TC;var Mu=Tu,MC=[" ","Enter","ArrowUp","ArrowDown"],jC=[" ","Enter"],Wt="Select",[Yr,Kr,_C]=an(Wt),[hn,mT]=be(Wt,[_C,Nt]),qr=Nt(),[AC,kt]=hn(Wt),[RC,IC]=hn(Wt),ju=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:d,name:f,autoComplete:m,disabled:h,required:p,form:v}=e,g=qr(t),[b,y]=u.useState(null),[w,x]=u.useState(null),[S,k]=u.useState(!1),j=wt(d),[E,P]=ye({prop:r,defaultProp:o??!1,onChange:a,caller:Wt}),[_,$]=ye({prop:s,defaultProp:l,onChange:c,caller:Wt}),H=u.useRef(null),z=b?v||!!b.closest("form"):!0,[ee,K]=u.useState(new Set),te=Array.from(ee).map(W=>W.props.value).join(";");return i.jsx(On,{...g,children:i.jsxs(AC,{required:p,scope:t,trigger:b,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:pe(),value:_,onValueChange:$,open:E,onOpenChange:P,dir:j,triggerPointerDownPosRef:H,disabled:h,children:[i.jsx(Yr.Provider,{scope:t,children:i.jsx(RC,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(W=>{K(q=>new Set(q).add(W))},[]),onNativeOptionRemove:u.useCallback(W=>{K(q=>{const I=new Set(q);return I.delete(W),I})},[]),children:n})}),z?i.jsxs(ed,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:m,value:_,onChange:W=>$(W.target.value),disabled:h,form:v,children:[_===void 0?i.jsx("option",{value:""}):null,Array.from(ee)]},te):null]})})};ju.displayName=Wt;var _u="SelectTrigger",Au=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=qr(n),s=kt(_u,n),l=s.disabled||r,c=re(t,s.onTriggerChange),d=Kr(n),f=u.useRef("touch"),[m,h,p]=nd(g=>{const b=d().filter(x=>!x.disabled),y=b.find(x=>x.value===s.value),w=rd(b,g,y);w!==void 0&&s.onValueChange(w.value)}),v=g=>{l||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return i.jsx($n,{asChild:!0,...a,children:i.jsx(V.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":td(s.value)?"":void 0,...o,ref:c,onClick:B(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:B(o.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:B(o.onKeyDown,g=>{const b=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(b&&g.key===" ")&&MC.includes(g.key)&&(v(),g.preventDefault())})})})});Au.displayName=_u;var Ru="SelectValue",Iu=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...l}=e,c=kt(Ru,n),{onValueNodeHasChildrenChange:d}=c,f=a!==void 0,m=re(t,c.onValueNodeChange);return ge(()=>{d(f)},[d,f]),i.jsx(V.span,{...l,ref:m,style:{pointerEvents:"none"},children:td(c.value)?i.jsx(i.Fragment,{children:s}):a})});Iu.displayName=Ru;var DC="SelectIcon",Du=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Du.displayName=DC;var Ht="SelectContent",Ou=u.forwardRef((e,t)=>{const n=kt(Ht,e.__scopeSelect),[r,o]=u.useState();if(ge(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?sr.createPortal(i.jsx($u,{scope:e.__scopeSelect,children:i.jsx(Yr.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),a):null}return i.jsx(Lu,{...e,ref:t})});Ou.displayName=Ht;var Ge=10,[$u,Pt]=hn(Ht),OC="SelectContentImpl",$C=gt("SelectContent.RemoveScroll"),Lu=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b,...y}=e,w=kt(Ht,n),[x,S]=u.useState(null),[k,j]=u.useState(null),E=re(t,A=>S(A)),[P,_]=u.useState(null),[$,H]=u.useState(null),z=Kr(n),[ee,K]=u.useState(!1),te=u.useRef(!1);u.useEffect(()=>{if(x)return Or(x)},[x]),br();const W=u.useCallback(A=>{const[Y,...X]=z().map(ie=>ie.ref.current),[ne]=X.slice(-1),oe=document.activeElement;for(const ie of A)if(ie===oe||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Y&&k&&(k.scrollTop=0),ie===ne&&k&&(k.scrollTop=k.scrollHeight),ie==null||ie.focus(),document.activeElement!==oe))return},[z,k]),q=u.useCallback(()=>W([P,x]),[W,P,x]);u.useEffect(()=>{ee&&q()},[ee,q]);const{onOpenChange:I,triggerPointerDownPosRef:O}=w;u.useEffect(()=>{if(x){let A={x:0,y:0};const Y=ne=>{var oe,ie;A={x:Math.abs(Math.round(ne.pageX)-(((oe=O.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},X=ne=>{A.x<=10&&A.y<=10?ne.preventDefault():x.contains(ne.target)||I(!1),document.removeEventListener("pointermove",Y),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,I,O]),u.useEffect(()=>{const A=()=>I(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[I]);const[M,U]=nd(A=>{const Y=z().filter(oe=>!oe.disabled),X=Y.find(oe=>oe.ref.current===document.activeElement),ne=rd(Y,A,X);ne&&setTimeout(()=>ne.ref.current.focus())}),T=u.useCallback((A,Y,X)=>{const ne=!te.current&&!X;(w.value!==void 0&&w.value===Y||ne)&&(_(A),ne&&(te.current=!0))},[w.value]),D=u.useCallback(()=>x==null?void 0:x.focus(),[x]),L=u.useCallback((A,Y,X)=>{const ne=!te.current&&!X;(w.value!==void 0&&w.value===Y||ne)&&H(A)},[w.value]),F=r==="popper"?Va:Fu,J=F===Va?{side:l,sideOffset:c,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return i.jsx($u,{scope:n,content:x,viewport:k,onViewportChange:j,itemRefCallback:T,selectedItem:P,onItemLeave:D,itemTextRefCallback:L,focusSelectedItem:q,selectedItemText:$,position:r,isPositioned:ee,searchRef:M,children:i.jsx(Bn,{as:$C,allowPinchZoom:!0,children:i.jsx(An,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:B(o,A=>{var Y;(Y=w.trigger)==null||Y.focus({preventScroll:!0}),A.preventDefault()}),children:i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:i.jsx(F,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...y,...J,onPlaced:()=>K(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:B(y.onKeyDown,A=>{const Y=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!Y&&A.key.length===1&&U(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let ne=z().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(A.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const oe=A.target,ie=ne.indexOf(oe);ne=ne.slice(ie+1)}setTimeout(()=>W(ne)),A.preventDefault()}})})})})})})});Lu.displayName=OC;var LC="SelectItemAlignedPosition",Fu=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=kt(Ht,n),s=Pt(Ht,n),[l,c]=u.useState(null),[d,f]=u.useState(null),m=re(t,E=>f(E)),h=Kr(n),p=u.useRef(!1),v=u.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:y,focusSelectedItem:w}=s,x=u.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&g&&b&&y){const E=a.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(a.dir!=="rtl"){const oe=$.left-P.left,ie=_.left-oe,Ce=E.left-ie,we=E.width+Ce,Be=Math.max(we,P.width),$e=window.innerWidth-Ge,Ee=ku(ie,[Ge,Math.max(Ge,$e-Be)]);l.style.minWidth=we+"px",l.style.left=Ee+"px"}else{const oe=P.right-$.right,ie=window.innerWidth-_.right-oe,Ce=window.innerWidth-E.right-ie,we=E.width+Ce,Be=Math.max(we,P.width),$e=window.innerWidth-Ge,Ee=ku(ie,[Ge,Math.max(Ge,$e-Be)]);l.style.minWidth=we+"px",l.style.right=Ee+"px"}const H=h(),z=window.innerHeight-Ge*2,ee=g.scrollHeight,K=window.getComputedStyle(d),te=parseInt(K.borderTopWidth,10),W=parseInt(K.paddingTop,10),q=parseInt(K.borderBottomWidth,10),I=parseInt(K.paddingBottom,10),O=te+W+ee+I+q,M=Math.min(b.offsetHeight*5,O),U=window.getComputedStyle(g),T=parseInt(U.paddingTop,10),D=parseInt(U.paddingBottom,10),L=E.top+E.height/2-Ge,F=z-L,J=b.offsetHeight/2,A=b.offsetTop+J,Y=te+W+A,X=O-Y;if(Y<=L){const oe=H.length>0&&b===H[H.length-1].ref.current;l.style.bottom="0px";const ie=d.clientHeight-g.offsetTop-g.offsetHeight,Ce=Math.max(F,J+(oe?D:0)+ie+q),we=Y+Ce;l.style.height=we+"px"}else{const oe=H.length>0&&b===H[0].ref.current;l.style.top="0px";const Ce=Math.max(L,te+g.offsetTop+(oe?T:0)+J)+X;l.style.height=Ce+"px",g.scrollTop=Y-L+g.offsetTop}l.style.margin=`${Ge}px 0`,l.style.minHeight=M+"px",l.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,l,d,g,b,y,a.dir,r]);ge(()=>x(),[x]);const[S,k]=u.useState();ge(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const j=u.useCallback(E=>{E&&v.current===!0&&(x(),w==null||w(),v.current=!1)},[x,w]);return i.jsx(BC,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:i.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:i.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Fu.displayName=LC;var FC="SelectPopperPosition",Va=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ge,...a}=e,s=qr(n);return i.jsx(Mr,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Va.displayName=FC;var[BC,Wa]=hn(Ht,{}),Ha="SelectViewport",Bu=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Pt(Ha,n),s=Wa(Ha,n),l=re(t,a.onViewportChange),c=u.useRef(0);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(Yr.Slot,{scope:n,children:i.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:B(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&m){const p=Math.abs(c.current-f.scrollTop);if(p>0){const v=window.innerHeight-Ge*2,g=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(g,b);if(y<v){const w=y+p,x=Math.min(v,w),S=w-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Bu.displayName=Ha;var zu="SelectGroup",[zC,VC]=hn(zu),Vu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return i.jsx(zC,{scope:n,id:o,children:i.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Vu.displayName=zu;var Wu="SelectLabel",Hu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=VC(Wu,n);return i.jsx(V.div,{id:o.id,...r,ref:t})});Hu.displayName=Wu;var Xr="SelectItem",[WC,Gu]=hn(Xr),Uu=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,l=kt(Xr,n),c=Pt(Xr,n),d=l.value===r,[f,m]=u.useState(a??""),[h,p]=u.useState(!1),v=re(t,w=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,w,r,o)}),g=pe(),b=u.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.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 i.jsx(WC,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:u.useCallback(w=>{m(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:i.jsx(Yr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:i.jsx(V.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:B(s.onFocus,()=>p(!0)),onBlur:B(s.onBlur,()=>p(!1)),onClick:B(s.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:B(s.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:B(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:B(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=c.onItemLeave)==null||x.call(c):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:B(s.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(jC.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Uu.displayName=Xr;var Kn="SelectItemText",Yu=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=kt(Kn,n),l=Pt(Kn,n),c=Gu(Kn,n),d=IC(Kn,n),[f,m]=u.useState(null),h=re(t,y=>m(y),c.onItemTextChange,y=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,y,c.value,c.disabled)}),p=f==null?void 0:f.textContent,v=u.useMemo(()=>i.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return ge(()=>(g(v),()=>b(v)),[g,b,v]),i.jsxs(i.Fragment,{children:[i.jsx(V.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?sr.createPortal(a.children,s.valueNode):null]})});Yu.displayName=Kn;var Ku="SelectItemIndicator",qu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Gu(Ku,n).isSelected?i.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});qu.displayName=Ku;var Ga="SelectScrollUpButton",Xu=u.forwardRef((e,t)=>{const n=Pt(Ga,e.__scopeSelect),r=Wa(Ga,e.__scopeSelect),[o,a]=u.useState(!1),s=re(t,r.onScrollButtonChange);return ge(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Zu,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Xu.displayName=Ga;var Ua="SelectScrollDownButton",Qu=u.forwardRef((e,t)=>{const n=Pt(Ua,e.__scopeSelect),r=Wa(Ua,e.__scopeSelect),[o,a]=u.useState(!1),s=re(t,r.onScrollButtonChange);return ge(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;a(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?i.jsx(Zu,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Qu.displayName=Ua;var Zu=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Pt("SelectScrollButton",n),s=u.useRef(null),l=Kr(n),c=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),ge(()=>{var f;const d=l().find(m=>m.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),i.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:B(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:B(o.onPointerLeave,()=>{c()})})}),HC="SelectSeparator",Ju=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Ju.displayName=HC;var Ya="SelectArrow",GC=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qr(n),a=kt(Ya,n),s=Pt(Ya,n);return a.open&&s.position==="popper"?i.jsx(jr,{...o,...r,ref:t}):null});GC.displayName=Ya;var UC="SelectBubbleInput",ed=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),a=re(r,o),s=Yn(t);return u.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&f){const m=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(m)}},[s,t]),i.jsx(V.select,{...n,style:{...Pu,...n.style},ref:a,defaultValue:t})});ed.displayName=UC;function td(e){return e===""||e===void 0}function nd(e){const t=Se(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(s=>{const l=n.current+s;t(l),function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function rd(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=YC(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function YC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var KC=ju,od=Au,qC=Iu,XC=Du,ad=Ou,QC=Bu,ZC=Vu,sd=Hu,id=Uu,JC=Yu,e1=qu,ld=Xu,cd=Qu,ud=Ju;const Ka=KC,t1=ZC,qa=qC,Qr=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(od,{ref:r,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,i.jsx(XC,{asChild:!0,children:i.jsx(rn,{className:"h-4 w-4 opacity-50"})})]}));Qr.displayName=od.displayName;const Xa=u.forwardRef(({className:e,...t},n)=>i.jsx(ld,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(sw,{className:"h-4 w-4"})}));Xa.displayName=ld.displayName;const Qa=u.forwardRef(({className:e,...t},n)=>i.jsx(cd,{ref:n,className:R("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(rn,{className:"h-4 w-4"})}));Qa.displayName=cd.displayName;const Zr=u.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>i.jsxs(ad,{ref:o,className:R("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:[i.jsx(Xa,{}),i.jsx(QC,{className:R("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(Qa,{})]}));Zr.displayName=ad.displayName;const dd=u.forwardRef(({className:e,...t},n)=>i.jsx(sd,{ref:n,className:R("px-2 py-1.5 text-sm font-semibold",e),...t}));dd.displayName=sd.displayName;const Tt=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(id,{ref:r,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(e1,{children:i.jsx(jn,{className:"h-4 w-4"})})}),i.jsx(JC,{children:t})]}));Tt.displayName=id.displayName;const fd=u.forwardRef(({className:e,...t},n)=>i.jsx(ud,{ref:n,className:R("-mx-1 my-1 h-px bg-muted",e),...t}));fd.displayName=ud.displayName;function n1({filter:e,value:t,onChange:n}){return i.jsxs(Ka,{value:t||"all",onValueChange:n,children:[i.jsx(Qr,{className:"w-40",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(pw,{className:"h-4 w-4"}),i.jsx(qa,{placeholder:e.label})]})}),i.jsxs(Zr,{children:[i.jsxs(Tt,{value:"all",children:["All ",e.label]}),e.options.map(r=>i.jsx(Tt,{value:r.value,children:r.label},r.value))]})]})}const r1=bt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),qn=u.forwardRef(({className:e,sizing:t,type:n,...r},o)=>i.jsx("input",{type:n,className:R(r1({sizing:t,className:e})),ref:o,...r}));qn.displayName="Input";function o1({value:e,onChange:t,placeholder:n="Search..."}){return i.jsxs("div",{className:"relative flex-1 max-w-sm",children:[i.jsx(oa,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),i.jsx(qn,{placeholder:n,value:e,onChange:r=>t(r.target.value),className:"pl-10"})]})}function a1({selectedCount:e,onClearSelection:t}){return e===0?null:i.jsxs("div",{className:"bg-muted/50 p-2 rounded-md flex items-center justify-between",children:[i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:e})," ",e===1?"row":"rows"," selected"]}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:t,children:"Clear selection"})]})}var Jr="Checkbox",[s1,pT]=be(Jr),[i1,Za]=s1(Jr);function l1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:l,onCheckedChange:c,required:d,value:f="on",internal_do_not_use_render:m}=e,[h,p]=ye({prop:n,defaultProp:o??!1,onChange:c,caller:Jr}),[v,g]=u.useState(null),[b,y]=u.useState(null),w=u.useRef(!1),x=v?!!s||!!v.closest("form"):!0,S={checked:h,disabled:a,setChecked:p,control:v,setControl:g,name:l,form:s,value:f,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:Mt(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:y};return i.jsx(i1,{scope:t,...S,children:c1(m)?m(S):r})}var md="CheckboxTrigger",pd=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:l,checked:c,required:d,setControl:f,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:v}=Za(md,e),g=re(o,f),b=u.useRef(c);return u.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const w=()=>m(b.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,m]),i.jsx(V.button,{type:"button",role:"checkbox","aria-checked":Mt(c)?"mixed":c,"aria-required":d,"data-state":wd(c),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:g,onKeyDown:B(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:B(n,y=>{m(w=>Mt(w)?!0:!w),v&&p&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});pd.displayName=md;var Ja=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c,onCheckedChange:d,form:f,...m}=e;return i.jsx(l1,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:l,required:s,onCheckedChange:d,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:h})=>i.jsxs(i.Fragment,{children:[i.jsx(pd,{...m,ref:t,__scopeCheckbox:n}),h&&i.jsx(bd,{__scopeCheckbox:n})]})})});Ja.displayName=Jr;var hd="CheckboxIndicator",gd=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Za(hd,n);return i.jsx(xe,{present:r||Mt(a.checked)||a.checked===!0,children:i.jsx(V.span,{"data-state":wd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});gd.displayName=hd;var vd="CheckboxBubbleInput",bd=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:l,disabled:c,name:d,value:f,form:m,bubbleInput:h,setBubbleInput:p}=Za(vd,e),v=re(n,p),g=Yn(a),b=Tr(r);u.useEffect(()=>{const w=h;if(!w)return;const x=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(x,"checked").set,j=!o.current;if(g!==a&&k){const E=new Event("click",{bubbles:j});w.indeterminate=Mt(a),k.call(w,Mt(a)?!1:a),w.dispatchEvent(E)}},[h,g,a,o]);const y=u.useRef(Mt(a)?!1:a);return i.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:l,disabled:c,name:d,value:f,form:m,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bd.displayName=vd;function c1(e){return typeof e=="function"}function Mt(e){return e==="indeterminate"}function wd(e){return Mt(e)?"indeterminate":e?"checked":"unchecked"}const eo=u.forwardRef(({className:e,...t},n)=>i.jsx(Ja,{ref:n,className:R("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:i.jsx(gd,{className:R("flex items-center justify-center text-current"),children:i.jsx(jn,{className:"h-4 w-4"})})}));eo.displayName=Ja.displayName;function u1({columns:e,sortState:t,allRowsSelected:n,hasData:r,onSort:o,onToggleAllRows:a,allowSelectAllRows:s}){const l=e.filter(c=>!c.hidden);return i.jsxs(tn,{children:[s&&i.jsx(Mn,{className:"w-12",children:i.jsx(eo,{checked:n&&r,onCheckedChange:a,"aria-label":"Select all rows"})}),l.map(c=>i.jsx(Mn,{className:R(c.sortable?"cursor-pointer select-none":"",c.headerClassName,c.align==="right"?"text-right":"",c.align==="center"?"text-center":""),onClick:c.sortable?()=>o(String(c.key)):void 0,style:{width:c.width?typeof c.width=="number"?`${c.width}px`:c.width:void 0},children:i.jsxs("div",{className:"flex items-center gap-1",children:[c.title,c.sortable&&i.jsx(i.Fragment,{children:t.field===c.key?t.direction==="asc"?i.jsx(ow,{className:"h-4 w-4"}):i.jsx(ew,{className:"h-4 w-4"}):i.jsx(rw,{className:"h-4 w-4 opacity-50"})})]})},String(c.key)))]})}function d1({row:e,index:t,columns:n,isSelected:r,rowId:o,onToggleSelection:a,allowSelection:s=!0}){const l=n.filter(c=>!c.hidden);return i.jsxs(tn,{className:r?"bg-muted/50":"",children:[s&&i.jsx(nn,{className:"w-12",children:i.jsx(eo,{checked:r,onCheckedChange:c=>a(o,!!c),"aria-label":`Select row ${t+1}`})}),l.map(c=>{const d=e[c.key];return i.jsx(nn,{className:R(c.align==="right"?"text-right":"",c.align==="center"?"text-center":"",c.cellClassName),children:c.customRenderer?c.customRenderer(d,e):String(d??"")},String(c.key))})]})}const Oe=({className:e,repeat:t=1,...n})=>i.jsx(i.Fragment,{children:Array.from({length:t??1}).map((r,o)=>i.jsx("div",{className:R("animate-shimmer bg-gradient-to-r from-gray-300 via-gray-100 to-gray-300","bg-[length:200%_100%] rounded-md h-5",e),...n},o))});function f1({columns:e,rows:t=5}){return i.jsx("div",{className:"rounded-md border",children:i.jsxs(mr,{children:[i.jsx(pr,{children:i.jsx(tn,{children:Array.from({length:e}).map((n,r)=>i.jsx(Mn,{children:i.jsx(Oe,{className:"h-4 w-20"})},r))})}),i.jsx(hr,{children:Array.from({length:t}).map((n,r)=>i.jsx(tn,{children:Array.from({length:e}).map((o,a)=>i.jsx(nn,{children:i.jsx(Oe,{className:"h-4 w-full"})},a))},r))})]})})}function m1(e,t,n){const r=t.filter(f=>!f.hidden),o=r.map(f=>f.title),a=e.map(f=>r.map(m=>{const h=f[m.key];return h!=null?String(h):""})),s=[o.join(","),...a.map(f=>f.join(","))].join(`
|
|
253
|
+
`),l=new Blob([s],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(l),d=document.createElement("a");d.setAttribute("href",c),d.setAttribute("download",`${n}.csv`),d.style.visibility="hidden",document.body.appendChild(d),d.click(),document.body.removeChild(d)}var to="Collapsible",[p1,yd]=be(to),[h1,es]=p1(to),xd=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...l}=e,[c,d]=ye({prop:r,defaultProp:o??!1,onChange:s,caller:to});return i.jsx(h1,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),children:i.jsx(V.div,{"data-state":ns(c),"data-disabled":a?"":void 0,...l,ref:t})})});xd.displayName=to;var Cd="CollapsibleTrigger",Nd=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=es(Cd,n);return i.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ns(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:B(e.onClick,o.onOpenToggle)})});Nd.displayName=Cd;var ts="CollapsibleContent",Sd=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=es(ts,e.__scopeCollapsible);return i.jsx(xe,{present:n||o.open,children:({present:a})=>i.jsx(g1,{...r,ref:t,present:a})})});Sd.displayName=ts;var g1=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=es(ts,n),[l,c]=u.useState(r),d=u.useRef(null),f=re(t,d),m=u.useRef(0),h=m.current,p=u.useRef(0),v=p.current,g=s.open||l,b=u.useRef(g),y=u.useRef(void 0);return u.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),ge(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();m.current=x.height,p.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[s.open,r]),i.jsx(V.div,{"data-state":ns(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,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 ns(e){return e?"open":"closed"}var v1=xd,b1=Nd,w1=Sd,Ue="Accordion",y1=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[rs,x1,C1]=an(Ue),[no,hT]=be(Ue,[C1,yd]),os=yd(),Ed=C.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return i.jsx(rs.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?i.jsx(k1,{...a,ref:t}):i.jsx(E1,{...o,ref:t})})});Ed.displayName=Ue;var[kd,N1]=no(Ue),[Pd,S1]=no(Ue,{collapsible:!1}),E1=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[l,c]=ye({prop:n,defaultProp:r??"",onChange:o,caller:Ue});return i.jsx(kd,{scope:e.__scopeAccordion,value:C.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:C.useCallback(()=>a&&c(""),[a,c]),children:i.jsx(Pd,{scope:e.__scopeAccordion,collapsible:a,children:i.jsx(Td,{...s,ref:t})})})}),k1=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r??[],onChange:o,caller:Ue}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),d=C.useCallback(f=>l((m=[])=>m.filter(h=>h!==f)),[l]);return i.jsx(kd,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:i.jsx(Pd,{scope:e.__scopeAccordion,collapsible:!0,children:i.jsx(Td,{...a,ref:t})})})}),[P1,ro]=no(Ue),Td=C.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,l=C.useRef(null),c=re(l,t),d=x1(n),m=wt(o)==="ltr",h=B(e.onKeyDown,p=>{var P;if(!y1.includes(p.key))return;const v=p.target,g=d().filter(_=>{var $;return!(($=_.ref.current)!=null&&$.disabled)}),b=g.findIndex(_=>_.ref.current===v),y=g.length;if(b===-1)return;p.preventDefault();let w=b;const x=0,S=y-1,k=()=>{w=b+1,w>S&&(w=x)},j=()=>{w=b-1,w<x&&(w=S)};switch(p.key){case"Home":w=x;break;case"End":w=S;break;case"ArrowRight":a==="horizontal"&&(m?k():j());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(m?j():k());break;case"ArrowUp":a==="vertical"&&j();break}const E=w%y;(P=g[E].ref.current)==null||P.focus()});return i.jsx(P1,{scope:n,disabled:r,direction:o,orientation:a,children:i.jsx(rs.Slot,{scope:n,children:i.jsx(V.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:h})})})}),oo="AccordionItem",[T1,as]=no(oo),Md=C.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=ro(oo,n),s=N1(oo,n),l=os(n),c=pe(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return i.jsx(T1,{scope:n,open:d,disabled:f,triggerId:c,children:i.jsx(v1,{"data-orientation":a.orientation,"data-state":Dd(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:m=>{m?s.onItemOpen(r):s.onItemClose(r)}})})});Md.displayName=oo;var jd="AccordionHeader",_d=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ro(Ue,n),a=as(jd,n);return i.jsx(V.h3,{"data-orientation":o.orientation,"data-state":Dd(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});_d.displayName=jd;var ss="AccordionTrigger",Ad=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ro(Ue,n),a=as(ss,n),s=S1(ss,n),l=os(n);return i.jsx(rs.ItemSlot,{scope:n,children:i.jsx(b1,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});Ad.displayName=ss;var Rd="AccordionContent",Id=C.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ro(Ue,n),a=as(Rd,n),s=os(n);return i.jsx(w1,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Id.displayName=Rd;function Dd(e){return e?"open":"closed"}var M1=Ed,j1=Md,_1=_d,Od=Ad,$d=Id;const A1=M1,Ld=u.forwardRef(({className:e,...t},n)=>i.jsx(j1,{ref:n,className:R("border-b",e),...t}));Ld.displayName="AccordionItem";const Fd=u.forwardRef(({className:e,children:t,...n},r)=>i.jsx(_1,{className:"flex",children:i.jsxs(Od,{ref:r,className:R("text-base flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,i.jsx(rn,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Fd.displayName=Od.displayName;const Bd=u.forwardRef(({className:e,children:t,...n},r)=>i.jsx($d,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:i.jsx("div",{className:R("pb-4 pt-0",e),children:t})}));Bd.displayName=$d.displayName;const R1=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},ao=u.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const l=c=>{const d=c.target;if(r){const f=R1(d.value,r);d.value=f}o==null||o(c)};return i.jsxs("div",{className:"relative w-full",children:[t&&i.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),i.jsx(qn,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:l,...a}),n&&i.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});ao.displayName="AdaptiveInput";const I1=bt("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-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),zd=u.forwardRef(({className:e,variant:t,...n},r)=>i.jsx("div",{ref:r,role:"alert",className:R(I1({variant:t}),e),...n}));zd.displayName="Alert";const Vd=u.forwardRef(({className:e,...t},n)=>i.jsx("h5",{ref:n,className:R("mb-1 font-medium leading-none tracking-tight",e),...t}));Vd.displayName="AlertTitle";const Wd=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("text-sm [&_p]:leading-relaxed",e),...t}));Wd.displayName="AlertDescription";var so="Dialog",[Hd,Gd]=be(so),[D1,Ye]=Hd(so),Ud=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=u.useRef(null),c=u.useRef(null),[d,f]=ye({prop:r,defaultProp:o??!1,onChange:a,caller:so});return i.jsx(D1,{scope:t,triggerRef:l,contentRef:c,contentId:pe(),titleId:pe(),descriptionId:pe(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(m=>!m),[f]),modal:s,children:n})};Ud.displayName=so;var Yd="DialogTrigger",Kd=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(Yd,n),a=re(t,o.triggerRef);return i.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cs(o.open),...r,ref:a,onClick:B(e.onClick,o.onOpenToggle)})});Kd.displayName=Yd;var is="DialogPortal",[O1,qd]=Hd(is,{forceMount:void 0}),Xd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ye(is,t);return i.jsx(O1,{scope:t,forceMount:n,children:u.Children.map(r,s=>i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:s})}))})};Xd.displayName=is;var io="DialogOverlay",Qd=u.forwardRef((e,t)=>{const n=qd(io,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ye(io,e.__scopeDialog);return a.modal?i.jsx(xe,{present:r||a.open,children:i.jsx(L1,{...o,ref:t})}):null});Qd.displayName=io;var $1=gt("DialogOverlay.RemoveScroll"),L1=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(io,n);return i.jsx(Bn,{as:$1,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(V.div,{"data-state":cs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gt="DialogContent",Zd=u.forwardRef((e,t)=>{const n=qd(Gt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ye(Gt,e.__scopeDialog);return i.jsx(xe,{present:r||a.open,children:a.modal?i.jsx(F1,{...o,ref:t}):i.jsx(B1,{...o,ref:t})})});Zd.displayName=Gt;var F1=u.forwardRef((e,t)=>{const n=Ye(Gt,e.__scopeDialog),r=u.useRef(null),o=re(t,n.contentRef,r);return u.useEffect(()=>{const a=r.current;if(a)return Or(a)},[]),i.jsx(Jd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:B(e.onFocusOutside,a=>a.preventDefault())})}),B1=u.forwardRef((e,t)=>{const n=Ye(Gt,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return i.jsx(Jd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Jd=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=Ye(Gt,n),c=u.useRef(null),d=re(t,c);return br(),i.jsxs(i.Fragment,{children:[i.jsx(An,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Bt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":cs(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(V1,{titleId:l.titleId}),i.jsx(H1,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ls="DialogTitle",ef=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(ls,n);return i.jsx(V.h2,{id:o.titleId,...r,ref:t})});ef.displayName=ls;var tf="DialogDescription",nf=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(tf,n);return i.jsx(V.p,{id:o.descriptionId,...r,ref:t})});nf.displayName=tf;var rf="DialogClose",of=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ye(rf,n);return i.jsx(V.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});of.displayName=rf;function cs(e){return e?"open":"closed"}var af="DialogTitleWarning",[z1,sf]=kw(af,{contentName:Gt,titleName:ls,docsSlug:"dialog"}),V1=({titleId:e})=>{const t=sf(af),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
254
254
|
|
|
255
255
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
256
256
|
|
|
257
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
257
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},W1="DialogDescriptionWarning",H1=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sf(W1).contentName}}.`;return u.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},us=Ud,lf=Kd,ds=Xd,lo=Qd,co=Zd,fs=ef,ms=nf,uo=of,cf="AlertDialog",[G1,gT]=be(cf,[Gd]),dt=Gd(),uf=e=>{const{__scopeAlertDialog:t,...n}=e,r=dt(t);return i.jsx(us,{...r,...n,modal:!0})};uf.displayName=cf;var U1="AlertDialogTrigger",df=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return i.jsx(lf,{...o,...r,ref:t})});df.displayName=U1;var Y1="AlertDialogPortal",ff=e=>{const{__scopeAlertDialog:t,...n}=e,r=dt(t);return i.jsx(ds,{...r,...n})};ff.displayName=Y1;var K1="AlertDialogOverlay",mf=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return i.jsx(lo,{...o,...r,ref:t})});mf.displayName=K1;var gn="AlertDialogContent",[q1,X1]=G1(gn),Q1=rl("AlertDialogContent"),pf=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=dt(n),s=u.useRef(null),l=re(t,s),c=u.useRef(null);return i.jsx(z1,{contentName:gn,titleName:hf,docsSlug:"alert-dialog",children:i.jsx(q1,{scope:n,cancelRef:c,children:i.jsxs(co,{role:"alertdialog",...a,...o,ref:l,onOpenAutoFocus:B(o.onOpenAutoFocus,d=>{var f;d.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[i.jsx(Q1,{children:r}),i.jsx(J1,{contentRef:s})]})})})});pf.displayName=gn;var hf="AlertDialogTitle",gf=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return i.jsx(fs,{...o,...r,ref:t})});gf.displayName=hf;var vf="AlertDialogDescription",bf=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return i.jsx(ms,{...o,...r,ref:t})});bf.displayName=vf;var Z1="AlertDialogAction",wf=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=dt(n);return i.jsx(uo,{...o,...r,ref:t})});wf.displayName=Z1;var yf="AlertDialogCancel",xf=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=X1(yf,n),a=dt(n),s=re(t,o);return i.jsx(uo,{...a,...r,ref:s})});xf.displayName=yf;var J1=({contentRef:e})=>{const t=`\`${gn}\` requires a description for the component to be accessible for screen reader users.
|
|
258
258
|
|
|
259
|
-
You can add a description to the \`${gn}\` by passing a \`${
|
|
259
|
+
You can add a description to the \`${gn}\` by passing a \`${vf}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
260
260
|
|
|
261
261
|
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 \`${gn}\`. 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.
|
|
262
262
|
|
|
263
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return u.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},
|
|
263
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return u.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},eN=uf,tN=df,nN=ff,Cf=mf,Nf=pf,Sf=wf,Ef=xf,kf=gf,Pf=bf;const rN=eN,oN=tN,Tf=nN,ps=u.forwardRef(({className:e,...t},n)=>i.jsx(Cf,{className:R("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}));ps.displayName=Cf.displayName;const Mf=u.forwardRef(({className:e,...t},n)=>i.jsxs(Tf,{children:[i.jsx(ps,{}),i.jsx(Nf,{ref:n,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background 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),...t})]}));Mf.displayName=Nf.displayName;const jf=({className:e,...t})=>i.jsx("div",{className:R("flex flex-col space-y-2 text-center sm:text-left",e),...t});jf.displayName="AlertDialogHeader";const _f=({className:e,...t})=>i.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_f.displayName="AlertDialogFooter";const Af=u.forwardRef(({className:e,...t},n)=>i.jsx(kf,{ref:n,className:R("text-lg font-semibold",e),...t}));Af.displayName=kf.displayName;const Rf=u.forwardRef(({className:e,...t},n)=>i.jsx(Pf,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));Rf.displayName=Pf.displayName;const If=u.forwardRef(({className:e,...t},n)=>i.jsx(Sf,{ref:n,className:R(fr(),e),...t}));If.displayName=Sf.displayName;const Df=u.forwardRef(({className:e,...t},n)=>i.jsx(Ef,{ref:n,className:R(fr({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Df.displayName=Ef.displayName;const aN=C.forwardRef(function(t,n){const{options:r,placeholder:o="Type to search...",onSelect:a,defaultSelectedOption:s}=t,[l,c]=C.useState((s==null?void 0:s.label)||""),[d,f]=C.useState([]),[m,h]=C.useState(!1),[p,v]=C.useState(-1),[g,b]=C.useState("down"),[y,w]=C.useState(s||null),x=C.useRef(null),S=C.useRef(null),k=C.useRef(null);C.useImperativeHandle(n,()=>({clearSelection:()=>{w(null),c(""),a(null)}})),C.useEffect(()=>{const _=$=>{x.current&&!x.current.contains($.target)&&h(!1)};return document.addEventListener("click",_),()=>{document.removeEventListener("click",_)}},[]),C.useEffect(()=>{const _=r.filter($=>Ji($.label,l));f(_),v(-1)},[l,r]),C.useEffect(()=>{if(m&&S.current){const _=S.current.getBoundingClientRect(),$=window.innerHeight-_.bottom,H=_.top,z=Math.min(d.length*40,240);b($>=z||$>H?"down":"up")}},[m,d]);const j=_=>{var $;c(_.target.value),($=t.onChange)==null||$.call(t,_.target.value),w(null),h(!0)},E=_=>{c(_.label),w(_),h(!1),a(_)},P=_=>{if(!m&&(_.key==="ArrowDown"||_.key==="ArrowUp")){h(!0);return}switch(_.key){case"ArrowDown":v($=>$<d.length-1?$+1:$);break;case"ArrowUp":v($=>$>0?$-1:$);break;case"Enter":p>=0&&p<d.length&&E(d[p]);break;case"Escape":h(!1);break}};return C.useEffect(()=>{m&&k.current&&p>=0&&k.current.children[p].scrollIntoView({block:"nearest"})},[p,m]),i.jsxs("div",{ref:x,className:"relative w-full",children:[i.jsx(ao,{ref:S,type:"text",value:l,onChange:j,onFocus:()=>h(!0),onKeyDown:P,placeholder:o,className:R("w-full",t.className),"aria-expanded":m,"aria-autocomplete":"list","aria-controls":"autocomplete-list",role:"combobox",leftIcon:i.jsx(oa,{className:"w-4 h-4"}),rightIcon:y?i.jsx("button",{className:"mt-[5px]",onClick:()=>{w(null),c(""),a(null)},children:i.jsx(vt,{className:"w-5 h-5"})}):null}),m&&d.length>0&&i.jsx("ul",{id:"autocomplete-list",ref:k,className:`absolute z-10 w-full bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto ${g==="up"?"bottom-full mb-1":"top-full mt-1"}`,role:"listbox",children:d.map((_,$)=>{const H=_.label.split(new RegExp(`(${l})`,"gi"));return i.jsx("li",{onClick:()=>E(_),className:`px-4 py-2 cursor-pointer ${$===p?"bg-blue-100":"hover:bg-gray-100"} ${(y==null?void 0:y.value)===_.value?"bg-blue-200":""}`,role:"option","aria-selected":$===p,id:`option-${$}`,children:H.map((z,ee)=>z.toLowerCase()===l.toLowerCase()?i.jsx("span",{className:"font-bold text-blue-600",children:z},ee):z)},_.value)})})]})});var fo={exports:{}},hs={};/**
|
|
264
264
|
* @license React
|
|
265
265
|
* use-sync-external-store-shim.production.js
|
|
266
266
|
*
|
|
@@ -268,7 +268,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the MIT license found in the
|
|
270
270
|
* LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/var
|
|
271
|
+
*/var Of;function sN(){if(Of)return hs;Of=1;var e=C;function t(m,h){return m===h&&(m!==0||1/m===1/h)||m!==m&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function l(m,h){var p=h(),v=r({inst:{value:p,getSnapshot:h}}),g=v[0].inst,b=v[1];return a(function(){g.value=p,g.getSnapshot=h,c(g)&&b({inst:g})},[m,p,h]),o(function(){return c(g)&&b({inst:g}),m(function(){c(g)&&b({inst:g})})},[m]),s(p),p}function c(m){var h=m.getSnapshot;m=m.value;try{var p=h();return!n(m,p)}catch{return!0}}function d(m,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return hs.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,hs}var gs={};/**
|
|
272
272
|
* @license React
|
|
273
273
|
* use-sync-external-store-shim.development.js
|
|
274
274
|
*
|
|
@@ -276,13 +276,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
276
276
|
*
|
|
277
277
|
* This source code is licensed under the MIT license found in the
|
|
278
278
|
* LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/var If;function rN(){return If||(If=1,process.env.NODE_ENV!=="production"&&function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=v();if(!m){var b=v();a(g,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}b=s({inst:{value:g,getSnapshot:v}});var y=b[0].inst,w=b[1];return c(function(){y.value=g,y.getSnapshot=v,n(y)&&w({inst:y})},[p,g,v]),l(function(){return n(y)&&w({inst:y}),p(function(){n(y)&&w({inst:y})})},[p]),d(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!a(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=C,a=typeof Object.is=="function"?Object.is:e,s=o.useState,l=o.useEffect,c=o.useLayoutEffect,d=o.useDebugValue,f=!1,m=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;gs.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),gs}var Df;function oN(){return Df||(Df=1,process.env.NODE_ENV==="production"?fo.exports=nN():fo.exports=rN()),fo.exports}var aN=oN();function sN(){return aN.useSyncExternalStore(iN,()=>!0,()=>!1)}function iN(){return()=>{}}var vs="Avatar",[lN,mT]=be(vs),[cN,Of]=lN(vs),$f=u.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=u.useState("idle");return i.jsx(cN,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:i.jsx(V.span,{...r,ref:t})})});$f.displayName=vs;var Lf="AvatarImage",Ff=u.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=Of(Lf,n),l=uN(r,a),c=Se(d=>{o(d),s.onImageLoadingStatusChange(d)});return ge(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(V.img,{...a,ref:t,src:r}):null});Ff.displayName=Lf;var Bf="AvatarFallback",zf=u.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Of(Bf,n),[s,l]=u.useState(r===void 0);return u.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?i.jsx(V.span,{...o,ref:t}):null});zf.displayName=Bf;function Vf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function uN(e,{referrerPolicy:t,crossOrigin:n}){const r=sN(),o=u.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=u.useState(()=>Vf(a,e));return ge(()=>{l(Vf(a,e))},[a,e]),ge(()=>{const c=m=>()=>{l(m)};if(!a)return;const d=c("loaded"),f=c("error");return a.addEventListener("load",d),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",d),a.removeEventListener("error",f)}},[a,n,t]),s}var Wf=$f,Hf=Ff,Gf=zf;const Uf=u.forwardRef(({className:e,...t},n)=>i.jsx(Wf,{ref:n,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Uf.displayName=Wf.displayName;const Yf=u.forwardRef(({className:e,...t},n)=>i.jsx(Hf,{ref:n,className:R("aspect-square h-full w-full",e),...t}));Yf.displayName=Hf.displayName;const Kf=u.forwardRef(({className:e,...t},n)=>i.jsx(Gf,{ref:n,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Kf.displayName=Gf.displayName;const dN={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},fN=(e,t,n)=>{let r;const o=dN[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},mN={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},pN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},hN={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gN={date:Jt({formats:mN,defaultWidth:"full"}),time:Jt({formats:pN,defaultWidth:"full"}),dateTime:Jt({formats:hN,defaultWidth:"full"})},vN={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},bN=(e,t,n,r)=>{const o=vN[e];return typeof o=="function"?o(t):o},wN={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},yN={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},xN={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},CN={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},NN={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},SN={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},EN={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Ze({values:wN,defaultWidth:"wide"}),quarter:Ze({values:yN,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ze({values:xN,defaultWidth:"wide"}),day:Ze({values:CN,defaultWidth:"wide"}),dayPeriod:Ze({values:NN,defaultWidth:"wide",formattingValues:SN,defaultFormattingWidth:"wide"})},kN=/^(\d+)[ºªo]?/i,PN=/\d+/i,TN={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},MN={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},jN={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},_N={any:[/1/i,/2/i,/3/i,/4/i]},AN={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},RN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},IN={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},DN={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},ON={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},$N={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},LN={ordinalNumber:Ti({matchPattern:kN,parsePattern:PN,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:TN,defaultMatchWidth:"wide",parsePatterns:MN,defaultParseWidth:"any"}),quarter:Je({matchPatterns:jN,defaultMatchWidth:"wide",parsePatterns:_N,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:AN,defaultMatchWidth:"wide",parsePatterns:RN,defaultParseWidth:"any"}),day:Je({matchPatterns:IN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:ON,defaultMatchWidth:"any",parsePatterns:$N,defaultParseWidth:"any"})},FN={code:"pt-BR",formatDistance:fN,formatLong:gN,formatRelative:bN,localize:EN,match:LN,options:{weekStartsOn:0,firstWeekContainsDate:1}},BN=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=C.useState(e||new Date),s={ptBR:FN,enUS:Uo}[n],l=()=>{o(p=>qv(p))},c=()=>{o(p=>Bi(p,1))},d=p=>{t&&t(p)},f=Array.from({length:Kv(r)}).map((p,v)=>new Date(r.getFullYear(),r.getMonth(),v+1)),m=Yv(r).getDay(),h=Array.from({length:7}).map((p,v)=>Yo(new Date(2021,0,v+3),"EEEEEE",{locale:s}));return i.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:l,"aria-label":"Previous Month",children:i.jsx(gr,{})}),i.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:Yo(r,"MMMM yyyy",{locale:s})}),i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:c,"aria-label":"Next Month",children:i.jsx(_n,{})})]}),i.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[h.map((p,v)=>i.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:p},v)),Array.from({length:m}).map((p,v)=>i.jsx("div",{className:"","aria-hidden":"true"},`empty-${v}`)),f.map(p=>i.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&p.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>d(p),"aria-label":Yo(p,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&p.toDateString()===e.toDateString()?"true":"false",children:p.getDate()},p.toISOString()))]})]})},qf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("rounded-xl border bg-card text-card-foreground shadow",e),...t}));qf.displayName="Card";const Xf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));Xf.displayName="CardHeader";const Qf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("font-semibold leading-none tracking-tight pb-4",e),...t}));Qf.displayName="CardTitle";const Zf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("text-sm text-muted-foreground",e),...t}));Zf.displayName="CardDescription";const Jf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("p-6 py-0",e),...t}));Jf.displayName="CardContent";const em=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("flex items-center p-6 pt-6",e),...t}));em.displayName="CardFooter";var tm=1,zN=.9,VN=.8,WN=.17,bs=.1,ws=.999,HN=.9999,GN=.99,UN=/[\\\/_+.#"@\[\(\{&]/,YN=/[\\\/_+.#"@\[\(\{&]/g,KN=/[\s-]/,nm=/[\s-]/g;function ys(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?tm:GN;var l=`${o},${a}`;if(s[l]!==void 0)return s[l];for(var c=r.charAt(a),d=n.indexOf(c,o),f=0,m,h,p,v;d>=0;)m=ys(e,t,n,r,d+1,a+1,s),m>f&&(d===o?m*=tm:UN.test(e.charAt(d-1))?(m*=VN,p=e.slice(o,d-1).match(YN),p&&o>0&&(m*=Math.pow(ws,p.length))):KN.test(e.charAt(d-1))?(m*=zN,v=e.slice(o,d-1).match(nm),v&&o>0&&(m*=Math.pow(ws,v.length))):(m*=WN,o>0&&(m*=Math.pow(ws,d-o))),e.charAt(d)!==t.charAt(a)&&(m*=HN)),(m<bs&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(h=ys(e,t,n,r,d+1,a+2,s),h*bs>m&&(m=h*bs)),m>f&&(f=m),d=n.indexOf(c,d+1);return s[l]=f,f}function rm(e){return e.toLowerCase().replace(nm," ")}function qN(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ys(e,t,rm(e),rm(t),0,0,{})}var Xn='[cmdk-group=""]',xs='[cmdk-group-items=""]',XN='[cmdk-group-heading=""]',om='[cmdk-item=""]',am=`${om}:not([aria-disabled="true"])`,Cs="cmdk-item-select",vn="data-value",QN=(e,t,n)=>qN(e,t,n),sm=u.createContext(void 0),Qn=()=>u.useContext(sm),im=u.createContext(void 0),Ns=()=>u.useContext(im),lm=u.createContext(void 0),cm=u.forwardRef((e,t)=>{let n=bn(()=>{var T,D;return{search:"",value:(D=(T=e.value)!=null?T:e.defaultValue)!=null?D:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=bn(()=>new Set),o=bn(()=>new Map),a=bn(()=>new Map),s=bn(()=>new Set),l=um(e),{label:c,children:d,value:f,onValueChange:m,filter:h,shouldFilter:p,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,...y}=e,w=pe(),x=pe(),S=pe(),k=u.useRef(null),j=lS();Ut(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,E.emit()}},[f]),Ut(()=>{j(6,ee)},[]);let E=u.useMemo(()=>({subscribe:T=>(s.current.add(T),()=>s.current.delete(T)),snapshot:()=>n.current,setState:(T,D,L)=>{var F,J,A,Y;if(!Object.is(n.current[T],D)){if(n.current[T]=D,T==="search")z(),$(),j(1,H);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(S);X?X.focus():(F=document.getElementById(w))==null||F.focus()}if(j(7,()=>{var X;n.current.selectedItemId=(X=K())==null?void 0:X.id,E.emit()}),L||j(5,ee),((J=l.current)==null?void 0:J.value)!==void 0){let X=D??"";(Y=(A=l.current).onValueChange)==null||Y.call(A,X);return}}E.emit()}},emit:()=>{s.current.forEach(T=>T())}}),[]),P=u.useMemo(()=>({value:(T,D,L)=>{var F;D!==((F=a.current.get(T))==null?void 0:F.value)&&(a.current.set(T,{value:D,keywords:L}),n.current.filtered.items.set(T,_(D,L)),j(2,()=>{$(),E.emit()}))},item:(T,D)=>(r.current.add(T),D&&(o.current.has(D)?o.current.get(D).add(T):o.current.set(D,new Set([T]))),j(3,()=>{z(),$(),n.current.value||H(),E.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let L=K();j(4,()=>{z(),(L==null?void 0:L.getAttribute("id"))===T&&H(),E.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:k}),[]);function _(T,D){var L,F;let J=(F=(L=l.current)==null?void 0:L.filter)!=null?F:QN;return T?J(T,n.current.search,D):0}function $(){if(!n.current.search||l.current.shouldFilter===!1)return;let T=n.current.filtered.items,D=[];n.current.filtered.groups.forEach(F=>{let J=o.current.get(F),A=0;J.forEach(Y=>{let X=T.get(Y);A=Math.max(X,A)}),D.push([F,A])});let L=k.current;te().sort((F,J)=>{var A,Y;let X=F.getAttribute("id"),ne=J.getAttribute("id");return((A=T.get(ne))!=null?A:0)-((Y=T.get(X))!=null?Y:0)}).forEach(F=>{let J=F.closest(xs);J?J.appendChild(F.parentElement===J?F:F.closest(`${xs} > *`)):L.appendChild(F.parentElement===L?F:F.closest(`${xs} > *`))}),D.sort((F,J)=>J[1]-F[1]).forEach(F=>{var J;let A=(J=k.current)==null?void 0:J.querySelector(`${Xn}[${vn}="${encodeURIComponent(F[0])}"]`);A==null||A.parentElement.appendChild(A)})}function H(){let T=te().find(L=>L.getAttribute("aria-disabled")!=="true"),D=T==null?void 0:T.getAttribute(vn);E.setState("value",D||void 0)}function z(){var T,D,L,F;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let A of r.current){let Y=(D=(T=a.current.get(A))==null?void 0:T.value)!=null?D:"",X=(F=(L=a.current.get(A))==null?void 0:L.keywords)!=null?F:[],ne=_(Y,X);n.current.filtered.items.set(A,ne),ne>0&&J++}for(let[A,Y]of o.current)for(let X of Y)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(A);break}n.current.filtered.count=J}function ee(){var T,D,L;let F=K();F&&(((T=F.parentElement)==null?void 0:T.firstChild)===F&&((L=(D=F.closest(Xn))==null?void 0:D.querySelector(XN))==null||L.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function K(){var T;return(T=k.current)==null?void 0:T.querySelector(`${om}[aria-selected="true"]`)}function te(){var T;return Array.from(((T=k.current)==null?void 0:T.querySelectorAll(am))||[])}function W(T){let D=te()[T];D&&E.setState("value",D.getAttribute(vn))}function q(T){var D;let L=K(),F=te(),J=F.findIndex(Y=>Y===L),A=F[J+T];(D=l.current)!=null&&D.loop&&(A=J+T<0?F[F.length-1]:J+T===F.length?F[0]:F[J+T]),A&&E.setState("value",A.getAttribute(vn))}function I(T){let D=K(),L=D==null?void 0:D.closest(Xn),F;for(;L&&!F;)L=T>0?sS(L,Xn):iS(L,Xn),F=L==null?void 0:L.querySelector(am);F?E.setState("value",F.getAttribute(vn)):q(T)}let O=()=>W(te().length-1),M=T=>{T.preventDefault(),T.metaKey?O():T.altKey?I(1):q(1)},U=T=>{T.preventDefault(),T.metaKey?W(0):T.altKey?I(-1):q(-1)};return u.createElement(V.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var D;(D=y.onKeyDown)==null||D.call(y,T);let L=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||L))switch(T.key){case"n":case"j":{b&&T.ctrlKey&&M(T);break}case"ArrowDown":{M(T);break}case"p":case"k":{b&&T.ctrlKey&&U(T);break}case"ArrowUp":{U(T);break}case"Home":{T.preventDefault(),W(0);break}case"End":{T.preventDefault(),O();break}case"Enter":{T.preventDefault();let F=K();if(F){let J=new Event(Cs);F.dispatchEvent(J)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:uS},c),mo(e,T=>u.createElement(im.Provider,{value:E},u.createElement(sm.Provider,{value:P},T))))}),ZN=u.forwardRef((e,t)=>{var n,r;let o=pe(),a=u.useRef(null),s=u.useContext(lm),l=Qn(),c=um(e),d=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Ut(()=>{if(!d)return l.item(o,s==null?void 0:s.id)},[d]);let f=dm(o,a,[e.value,e.children,a],e.keywords),m=Ns(),h=Mt(j=>j.value&&j.value===f.current),p=Mt(j=>d||l.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);u.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(Cs,v),()=>j.removeEventListener(Cs,v)},[p,e.onSelect,e.disabled]);function v(){var j,E;g(),(E=(j=c.current).onSelect)==null||E.call(j,f.current)}function g(){m.setState("value",f.current,!0)}if(!p)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:S,...k}=e;return u.createElement(V.div,{ref:et(a,t),...k,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!h,"data-disabled":!!b,"data-selected":!!h,onPointerMove:b||l.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),JN=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=pe(),l=u.useRef(null),c=u.useRef(null),d=pe(),f=Qn(),m=Mt(p=>o||f.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);Ut(()=>f.group(s),[]),dm(s,l,[e.value,e.heading,c]);let h=u.useMemo(()=>({id:s,forceMount:o}),[o]);return u.createElement(V.div,{ref:et(l,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&u.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),mo(e,p=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},u.createElement(lm.Provider,{value:h},p))))}),eS=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=u.useRef(null),a=Mt(s=>!s.search);return!n&&!a?null:u.createElement(V.div,{ref:et(o,t),...r,"cmdk-separator":"",role:"separator"})}),tS=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Ns(),s=Mt(d=>d.search),l=Mt(d=>d.selectedItemId),c=Qn();return u.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),u.createElement(V.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),nS=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=u.useRef(null),s=u.useRef(null),l=Mt(d=>d.selectedItemId),c=Qn();return u.useEffect(()=>{if(s.current&&a.current){let d=s.current,f=a.current,m,h=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let p=d.offsetHeight;f.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(d),()=>{cancelAnimationFrame(m),h.unobserve(d)}}},[]),u.createElement(V.div,{ref:et(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},mo(e,d=>u.createElement("div",{ref:et(s,c.listInnerRef),"cmdk-list-sizer":""},d)))}),rS=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...l}=e;return u.createElement(us,{open:n,onOpenChange:r},u.createElement(ds,{container:s},u.createElement(lo,{"cmdk-overlay":"",className:o}),u.createElement(co,{"aria-label":e.label,"cmdk-dialog":"",className:a},u.createElement(cm,{ref:t,...l}))))}),oS=u.forwardRef((e,t)=>Mt(n=>n.filtered.count===0)?u.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),aS=u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return u.createElement(V.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},mo(e,s=>u.createElement("div",{"aria-hidden":!0},s)))}),je=Object.assign(cm,{List:nS,Item:ZN,Input:tS,Group:JN,Separator:eS,Dialog:rS,Empty:oS,Loading:aS});function sS(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function iS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function um(e){let t=u.useRef(e);return Ut(()=>{t.current=e}),t}var Ut=typeof window>"u"?u.useEffect:u.useLayoutEffect;function bn(e){let t=u.useRef();return t.current===void 0&&(t.current=e()),t}function Mt(e){let t=Ns(),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function dm(e,t,n,r=[]){let o=u.useRef(),a=Qn();return Ut(()=>{var s;let l=(()=>{var d;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),c=r.map(d=>d.trim());a.value(e,l,c),(s=t.current)==null||s.setAttribute(vn,l),o.current=l}),o}var lS=()=>{let[e,t]=u.useState(),n=bn(()=>new Map);return Ut(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function cS(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mo({asChild:e,children:t},n){return e&&u.isValidElement(t)?u.cloneElement(cS(t),{ref:t.ref},n(t.props.children)):n(t)}var uS={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const po=us,fm=of,mm=ds,dS=uo,Ss=u.forwardRef(({className:e,...t},n)=>i.jsx(lo,{ref:n,className:R("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}));Ss.displayName=lo.displayName;const Zn=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(mm,{children:[i.jsx(Ss,{}),i.jsxs(co,{ref:r,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border","bg-background 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 max-h-[100dvh] overflow-y-auto",e),...n,children:[t,i.jsxs(uo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(vt,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zn.displayName=co.displayName;const ho=({className:e,...t})=>i.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ho.displayName="DialogHeader";const pm=({className:e,...t})=>i.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pm.displayName="DialogFooter";const go=u.forwardRef(({className:e,...t},n)=>i.jsx(fs,{ref:n,className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));go.displayName=fs.displayName;const vo=u.forwardRef(({className:e,...t},n)=>i.jsx(ms,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));vo.displayName=ms.displayName;const bo=u.forwardRef(({className:e,...t},n)=>i.jsx(je,{ref:n,className:R("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));bo.displayName=je.displayName;const fS=({children:e,...t})=>i.jsx(po,{...t,children:i.jsx(Zn,{className:"overflow-hidden p-0 shadow-lg",children:i.jsx(bo,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Es=u.forwardRef(({className:e,...t},n)=>i.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[i.jsx(oa,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.jsx(je.Input,{ref:n,className:R("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Es.displayName=je.Input.displayName;const ks=u.forwardRef(({className:e,...t},n)=>i.jsx(je.List,{ref:n,className:R("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ks.displayName=je.List.displayName;const Ps=u.forwardRef((e,t)=>i.jsx(je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ps.displayName=je.Empty.displayName;const wo=u.forwardRef(({className:e,...t},n)=>i.jsx(je.Group,{ref:n,className:R("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));wo.displayName=je.Group.displayName;const Ts=u.forwardRef(({className:e,...t},n)=>i.jsx(je.Separator,{ref:n,className:R("-mx-1 h-px bg-border",e),...t}));Ts.displayName=je.Separator.displayName;const wn=u.forwardRef(({className:e,...t},n)=>i.jsx(je.Item,{ref:n,className:R("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));wn.displayName=je.Item.displayName;const hm=({className:e,...t})=>i.jsx("span",{className:R("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});hm.displayName="CommandShortcut";const gm=C.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:l=0,...c}=e,d=C.useRef(null);C.useImperativeHandle(t,()=>d.current);const[f,m]=C.useState(""),h=g=>{const b=g.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},p=g=>{const b=g.target.value,y=parseFloat(b.replace(/\D/g,""))/100;m(h(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},v=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return C.useEffect(()=>{m(h(+l))},[l]),i.jsx(ao,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:p,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...c})});gm.displayName="CurrencyInput";var mS="Label",vm=u.forwardRef((e,t)=>i.jsx(V.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())}}));vm.displayName=mS;var bm=vm;const pS=Ft("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wm=u.forwardRef(({className:e,...t},n)=>i.jsx(bm,{ref:n,className:R(pS(),e),...t}));wm.displayName=bm.displayName;var yo="Popover",[ym,hT]=be(yo,[Ct]),Jn=Ct(),[hS,jt]=ym(yo),xm=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,l=Jn(t),c=u.useRef(null),[d,f]=u.useState(!1),[m,h]=ye({prop:r,defaultProp:o??!1,onChange:a,caller:yo});return i.jsx(On,{...l,children:i.jsx(hS,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:s,children:n})})};xm.displayName=yo;var Cm="PopoverAnchor",Nm=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(Cm,n),a=Jn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return u.useEffect(()=>(s(),()=>l()),[s,l]),i.jsx($n,{...a,...r,ref:t})});Nm.displayName=Cm;var Sm="PopoverTrigger",Em=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(Sm,n),a=Jn(n),s=re(t,o.triggerRef),l=i.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":jm(o.open),...r,ref:s,onClick:B(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:i.jsx($n,{asChild:!0,...a,children:l})});Em.displayName=Sm;var Ms="PopoverPortal",[gS,vS]=ym(Ms,{forceMount:void 0}),km=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=jt(Ms,t);return i.jsx(gS,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:r})})})};km.displayName=Ms;var yn="PopoverContent",Pm=u.forwardRef((e,t)=>{const n=vS(yn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=jt(yn,e.__scopePopover);return i.jsx(xe,{present:r||a.open,children:a.modal?i.jsx(wS,{...o,ref:t}):i.jsx(yS,{...o,ref:t})})});Pm.displayName=yn;var bS=gt("PopoverContent.RemoveScroll"),wS=u.forwardRef((e,t)=>{const n=jt(yn,e.__scopePopover),r=u.useRef(null),o=re(t,r),a=u.useRef(!1);return u.useEffect(()=>{const s=r.current;if(s)return Or(s)},[]),i.jsx(Bn,{as:bS,allowPinchZoom:!0,children:i.jsx(Tm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),a.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),yS=u.forwardRef((e,t)=>{const n=jt(yn,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return i.jsx(Tm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Tm=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...m}=e,h=jt(yn,n),p=Jn(n);return br(),i.jsx(An,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:i.jsx(Mr,{"data-state":jm(h.open),role:"dialog",id:h.contentId,...p,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Mm="PopoverClose",xS=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(Mm,n);return i.jsx(V.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});xS.displayName=Mm;var CS="PopoverArrow",NS=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Jn(n);return i.jsx(jr,{...o,...r,ref:t})});NS.displayName=CS;function jm(e){return e?"open":"closed"}var SS=xm,ES=Nm,kS=Em,PS=km,_m=Pm;const Am=SS,Rm=kS,TS=ES,js=u.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>i.jsx(PS,{children:i.jsx(_m,{ref:o,align:t,sideOffset:n,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));js.displayName=_m.displayName;var MS="Separator",Im="horizontal",jS=["horizontal","vertical"],Dm=u.forwardRef((e,t)=>{const{decorative:n,orientation:r=Im,...o}=e,a=_S(r)?r:Im,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(V.div,{"data-orientation":a,...l,...o,ref:t})});Dm.displayName=MS;function _S(e){return jS.includes(e)}var Om=Dm;const xo=u.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>i.jsx(Om,{ref:o,decorative:n,orientation:t,className:R("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xo.displayName=Om.displayName;const $m=Ft("mx-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),Lm=u.forwardRef(({options:e,onValueChange:t,variant:n,defaultValue:r=[],placeholder:o="Select options",maxCount:a=3,modalPopover:s=!1,asChild:l=!1,className:c,...d},f)=>{const[m,h]=u.useState(r),[p,v]=u.useState(!1),[g,b]=u.useState(!1),y=E=>{if(E.key==="Enter")v(!0);else if(E.key==="Backspace"&&!E.currentTarget.value){const P=[...m];P.pop(),h(P),t(P)}},w=E=>{const P=m.includes(E)?m.filter(_=>_!==E):[...m,E];h(P),t(P)},x=()=>{h([]),t([])},S=()=>{v(E=>!E)},k=()=>{const E=m.slice(0,a);h(E),t(E)},j=()=>{if(m.length===e.length)x();else{const E=e.map(P=>P.value);h(E),t(E)}};return i.jsxs(Am,{open:p,onOpenChange:v,modal:s,children:[i.jsx(Rm,{asChild:!0,children:i.jsx(fe,{ref:f,...d,onClick:S,className:R("flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",c),children:m.length>0?i.jsxs("div",{className:"flex justify-between items-center w-full",children:[i.jsxs("div",{className:"flex flex-wrap items-center",children:[m.slice(0,a).map(E=>{const P=e.find(_=>_.value===E);return i.jsxs(on,{className:R($m({variant:n})),children:[P==null?void 0:P.label,i.jsx(ra,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:_=>{_.stopPropagation(),w(E)}})]},E)}),m.length>a&&i.jsxs(on,{className:R("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",$m({variant:n})),children:[`+ ${m.length-a} more`,i.jsx(ra,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:E=>{E.stopPropagation(),k()}})]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(vt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:E=>{E.stopPropagation(),x()}}),i.jsx(xo,{orientation:"vertical",className:"flex min-h-6 h-full"}),i.jsx(rn,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):i.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[i.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:o}),i.jsx(rn,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),i.jsx(js,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>v(!1),children:i.jsxs(bo,{children:[i.jsx(Es,{placeholder:"Search...",onKeyDown:y}),i.jsxs(ks,{children:[i.jsx(Ps,{children:"No results found."}),i.jsxs(wo,{children:[i.jsxs(wn,{onSelect:j,className:"cursor-pointer",children:[i.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",m.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(jn,{className:"h-4 w-4"})}),i.jsx("span",{children:"(Select All)"})]},"all"),e.map(E=>{const P=m.includes(E.value);return i.jsxs(wn,{onSelect:()=>w(E.value),className:"cursor-pointer",children:[i.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",P?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(jn,{className:"h-4 w-4"})}),i.jsx("span",{children:E.label})]},E.value)})]}),i.jsx(Ts,{}),i.jsx(wo,{children:i.jsxs("div",{className:"flex items-center justify-between",children:[m.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(wn,{onSelect:x,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),i.jsx(xo,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),i.jsx(wn,{onSelect:()=>v(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});Lm.displayName="MultiSelect";var Yt="NavigationMenu",[_s,Fm,AS]=an(Yt),[As,RS,IS]=an(Yt),[Rs,gT]=be(Yt,[AS,IS]),[DS,Fe]=Rs(Yt),[OS,$S]=Rs(Yt),Bm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:l=300,orientation:c="horizontal",dir:d,...f}=e,[m,h]=u.useState(null),p=re(t,_=>h(_)),v=bt(d),g=u.useRef(0),b=u.useRef(0),y=u.useRef(0),[w,x]=u.useState(!0),[S,k]=ye({prop:r,onChange:_=>{const $=_!=="",H=l>0;$?(window.clearTimeout(y.current),H&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),l)),o==null||o(_)},defaultProp:a??"",caller:Yt}),j=u.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>k(""),150)},[k]),E=u.useCallback(_=>{window.clearTimeout(b.current),k(_)},[k]),P=u.useCallback(_=>{S===_?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),k(_)},s)},[S,k,s]);return u.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),i.jsx(zm,{scope:n,isRootMenu:!0,value:S,dir:v,orientation:c,rootNavigationMenu:m,onTriggerEnter:_=>{window.clearTimeout(g.current),w?P(_):E(_)},onTriggerLeave:()=>{window.clearTimeout(g.current),j()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:j,onItemSelect:_=>{k($=>$===_?"":_)},onItemDismiss:()=>k(""),children:i.jsx(V.nav,{"aria-label":"Main","data-orientation":c,dir:v,...f,ref:p})})});Bm.displayName=Yt;var Is="NavigationMenuSub",LS=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...l}=e,c=Fe(Is,n),[d,f]=ye({prop:r,onChange:o,defaultProp:a??"",caller:Is});return i.jsx(zm,{scope:n,isRootMenu:!1,value:d,dir:c.dir,orientation:s,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:m=>f(m),onItemSelect:m=>f(m),onItemDismiss:()=>f(""),children:i.jsx(V.div,{"data-orientation":s,...l,ref:t})})});LS.displayName=Is;var zm=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:l,onItemSelect:c,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:h,onContentLeave:p}=e,[v,g]=u.useState(null),[b,y]=u.useState(new Map),[w,x]=u.useState(null);return i.jsx(DS,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:Yn(l),baseId:pe(),dir:o,orientation:a,viewport:v,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:Se(f),onTriggerLeave:Se(m),onContentEnter:Se(h),onContentLeave:Se(p),onItemSelect:Se(c),onItemDismiss:Se(d),onViewportContentChange:u.useCallback((S,k)=>{y(j=>(j.set(S,k),new Map(j)))},[]),onViewportContentRemove:u.useCallback(S=>{y(k=>k.has(S)?(k.delete(S),new Map(k)):k)},[]),children:i.jsx(_s.Provider,{scope:t,children:i.jsx(OS,{scope:t,items:b,children:s})})})},Vm="NavigationMenuList",Wm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fe(Vm,n),a=i.jsx(V.ul,{"data-orientation":o.orientation,...r,ref:t});return i.jsx(V.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:i.jsx(_s.Slot,{scope:n,children:o.isRootMenu?i.jsx(ep,{asChild:!0,children:a}):a})})});Wm.displayName=Vm;var Hm="NavigationMenuItem",[FS,Gm]=Rs(Hm),Um=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=pe(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=u.useRef(null),c=u.useRef(null),d=u.useRef(null),f=u.useRef(()=>{}),m=u.useRef(!1),h=u.useCallback((v="start")=>{if(l.current){f.current();const g=Ls(l.current);g.length&&Fs(v==="start"?g:g.reverse())}},[]),p=u.useCallback(()=>{if(l.current){const v=Ls(l.current);v.length&&(f.current=US(v))}},[]);return i.jsx(FS,{scope:n,value:s,triggerRef:c,contentRef:l,focusProxyRef:d,wasEscapeCloseRef:m,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:p,onContentFocusOutside:p,children:i.jsx(V.li,{...o,ref:t})})});Um.displayName=Hm;var Ds="NavigationMenuTrigger",Ym=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Fe(Ds,e.__scopeNavigationMenu),s=Gm(Ds,e.__scopeNavigationMenu),l=u.useRef(null),c=re(l,s.triggerRef,t),d=rp(a.baseId,s.value),f=op(a.baseId,s.value),m=u.useRef(!1),h=u.useRef(!1),p=s.value===a.value;return i.jsxs(i.Fragment,{children:[i.jsx(_s.ItemSlot,{scope:n,value:s.value,children:i.jsx(np,{asChild:!0,children:i.jsx(V.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":zs(p),"aria-expanded":p,"aria-controls":f,...o,ref:c,onPointerEnter:B(e.onPointerEnter,()=>{h.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:B(e.onPointerMove,No(()=>{r||h.current||s.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(s.value),m.current=!0)})),onPointerLeave:B(e.onPointerLeave,No(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:B(e.onClick,()=>{a.onItemSelect(s.value),h.current=p}),onKeyDown:B(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&v.key===b&&(s.onEntryKeyDown(),v.preventDefault())})})})}),p&&i.jsxs(i.Fragment,{children:[i.jsx(Mu,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const g=s.contentRef.current,b=v.relatedTarget,y=b===l.current,w=g==null?void 0:g.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&i.jsx("span",{"aria-owns":f})]})]})});Ym.displayName=Ds;var BS="NavigationMenuLink",Km="navigationMenu.linkSelect",qm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return i.jsx(np,{asChild:!0,children:i.jsx(V.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:B(e.onClick,s=>{const l=s.target,c=new CustomEvent(Km,{bubbles:!0,cancelable:!0});if(l.addEventListener(Km,d=>o==null?void 0:o(d),{once:!0}),vr(l,c),!c.defaultPrevented&&!s.metaKey){const d=new CustomEvent(Co,{bubbles:!0,cancelable:!0});vr(l,d)}},{checkForDefaultPrevented:!1})})})});qm.displayName=BS;var Os="NavigationMenuIndicator",Xm=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fe(Os,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?ar.createPortal(i.jsx(xe,{present:n||a,children:i.jsx(zS,{...r,ref:t})}),o.indicatorTrack):null});Xm.displayName=Os;var zS=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fe(Os,n),a=Fm(n),[s,l]=u.useState(null),[c,d]=u.useState(null),f=o.orientation==="horizontal",m=!!o.value;u.useEffect(()=>{var g;const v=(g=a().find(b=>b.value===o.value))==null?void 0:g.ref.current;v&&l(v)},[a,o.value]);const h=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return Bs(s,h),Bs(o.indicatorTrack,h),c?i.jsx(V.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),xn="NavigationMenuContent",Qm=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fe(xn,e.__scopeNavigationMenu),a=Gm(xn,e.__scopeNavigationMenu),s=re(a.contentRef,t),l=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?i.jsx(VS,{forceMount:n,...c,ref:s}):i.jsx(xe,{present:n||l,children:i.jsx(Zm,{"data-state":zs(l),...c,ref:s,onPointerEnter:B(e.onPointerEnter,o.onContentEnter),onPointerLeave:B(e.onPointerLeave,No(o.onContentLeave)),style:{pointerEvents:!l&&o.isRootMenu?"none":void 0,...c.style}})})});Qm.displayName=xn;var VS=u.forwardRef((e,t)=>{const n=Fe(xn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ge(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ge(()=>()=>o(e.value),[e.value,o]),null}),Co="navigationMenu.rootContentDismiss",Zm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:l,onContentFocusOutside:c,...d}=e,f=Fe(xn,n),m=u.useRef(null),h=re(m,t),p=rp(f.baseId,r),v=op(f.baseId,r),g=Fm(n),b=u.useRef(null),{onItemDismiss:y}=f;u.useEffect(()=>{const x=m.current;if(f.isRootMenu&&x){const S=()=>{var k;y(),l(),x.contains(document.activeElement)&&((k=o.current)==null||k.focus())};return x.addEventListener(Co,S),()=>x.removeEventListener(Co,S)}},[f.isRootMenu,e.value,o,y,l]);const w=u.useMemo(()=>{const S=g().map($=>$.value);f.dir==="rtl"&&S.reverse();const k=S.indexOf(f.value),j=S.indexOf(f.previousValue),E=r===f.value,P=j===S.indexOf(r);if(!E&&!P)return b.current;const _=(()=>{if(k!==j){if(E&&j!==-1)return k>j?"from-end":"from-start";if(P&&k!==-1)return k>j?"to-start":"to-end"}return null})();return b.current=_,_},[f.previousValue,f.value,f.dir,g,r]);return i.jsx(ep,{asChild:!0,children:i.jsx(Bt,{id:v,"aria-labelledby":p,"data-motion":w,"data-orientation":f.orientation,...d,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;const x=new Event(Co,{bubbles:!0,cancelable:!0});(S=m.current)==null||S.dispatchEvent(x)},onFocusOutside:B(e.onFocusOutside,x=>{var k;c();const S=x.target;(k=f.rootNavigationMenu)!=null&&k.contains(S)&&x.preventDefault()}),onPointerDownOutside:B(e.onPointerDownOutside,x=>{var E;const S=x.target,k=g().some(P=>{var _;return(_=P.ref.current)==null?void 0:_.contains(S)}),j=f.isRootMenu&&((E=f.viewport)==null?void 0:E.contains(S));(k||j||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:B(e.onKeyDown,x=>{var j;const S=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!S){const E=Ls(x.currentTarget),P=document.activeElement,_=E.findIndex(z=>z===P),H=x.shiftKey?E.slice(0,_).reverse():E.slice(_+1,E.length);Fs(H)?x.preventDefault():(j=a.current)==null||j.focus()}}),onEscapeKeyDown:B(e.onEscapeKeyDown,x=>{s.current=!0})})})}),$s="NavigationMenuViewport",Jm=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!Fe($s,e.__scopeNavigationMenu).value;return i.jsx(xe,{present:n||a,children:i.jsx(WS,{...r,ref:t})})});Jm.displayName=$s;var WS=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=Fe($s,n),s=re(t,a.onViewportChange),l=$S(xn,e.__scopeNavigationMenu),[c,d]=u.useState(null),[f,m]=u.useState(null),h=c?(c==null?void 0:c.width)+"px":void 0,p=c?(c==null?void 0:c.height)+"px":void 0,v=!!a.value,g=v?a.value:a.previousValue;return Bs(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),i.jsx(V.div,{"data-state":zs(v),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":p,...o.style},onPointerEnter:B(e.onPointerEnter,a.onContentEnter),onPointerLeave:B(e.onPointerLeave,No(a.onContentLeave)),children:Array.from(l.items).map(([y,{ref:w,forceMount:x,...S}])=>{const k=g===y;return i.jsx(xe,{present:x||k,children:i.jsx(Zm,{...S,ref:et(w,j=>{k&&j&&m(j)})})},y)})})}),HS="FocusGroup",ep=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fe(HS,n);return i.jsx(As.Provider,{scope:n,children:i.jsx(As.Slot,{scope:n,children:i.jsx(V.div,{dir:o.dir,...r,ref:t})})})}),tp=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],GS="FocusGroupItem",np=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=RS(n),a=Fe(GS,n);return i.jsx(As.ItemSlot,{scope:n,children:i.jsx(V.button,{...r,ref:t,onKeyDown:B(e.onKeyDown,s=>{if(["Home","End",...tp].includes(s.key)){let c=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&c.reverse(),tp.includes(s.key)){const m=c.indexOf(s.currentTarget);c=c.slice(m+1)}setTimeout(()=>Fs(c)),s.preventDefault()}})})})});function Ls(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 Fs(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function US(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Bs(e,t){const n=Se(t);ge(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function zs(e){return e?"open":"closed"}function rp(e,t){return`${e}-trigger-${t}`}function op(e,t){return`${e}-content-${t}`}function No(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ap=Bm,sp=Wm,YS=Um,ip=Ym,KS=qm,lp=Xm,cp=Qm,up=Jm;const dp=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(ap,{ref:r,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,i.jsx(Vs,{})]}));dp.displayName=ap.displayName;const fp=u.forwardRef(({className:e,...t},n)=>i.jsx(sp,{ref:n,className:R("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));fp.displayName=sp.displayName;const qS=YS,mp=Ft("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),pp=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(ip,{ref:r,className:R(mp(),"group",e),...n,children:[t," ",i.jsx(rn,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));pp.displayName=ip.displayName;const hp=u.forwardRef(({className:e,...t},n)=>i.jsx(cp,{ref:n,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));hp.displayName=cp.displayName;const XS=KS,Vs=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:i.jsx(up,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));Vs.displayName=up.displayName;const gp=u.forwardRef(({className:e,...t},n)=>i.jsx(lp,{ref:n,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:i.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));gp.displayName=lp.displayName;const vp=({className:e,...t})=>i.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("mx-auto flex w-full justify-center",e),...t});vp.displayName="Pagination";const bp=u.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,className:R("flex flex-row items-center gap-1",e),...t}));bp.displayName="PaginationContent";const wp=u.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,className:R("",e),...t}));wp.displayName="PaginationItem";const So=({className:e,isActive:t,size:n="icon",...r})=>i.jsx(fe,{"aria-current":t?"page":void 0,className:R(fr({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});So.displayName="PaginationLink";const yp=({className:e,...t})=>i.jsx(So,{"aria-label":"Previous page",className:R("gap-1",e),...t,children:i.jsx(gr,{className:"h-4 w-4"})});yp.displayName="PaginationPrevious";const xp=({className:e,...t})=>i.jsx(So,{"aria-label":"Next page",className:R("gap-1",e),...t,children:i.jsx(_n,{className:"h-4 w-4"})});xp.displayName="PaginationNext";const Cp=({className:e,...t})=>i.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[i.jsx(iw,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"More pages"})]});Cp.displayName="PaginationEllipsis";var Ws="Progress",Hs=100,[QS,vT]=be(Ws),[ZS,JS]=QS(Ws),Np=u.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=eE,...s}=e;(o||o===0)&&!Pp(o)&&console.error(tE(`${o}`,"Progress"));const l=Pp(o)?o:Hs;r!==null&&!Tp(r,l)&&console.error(nE(`${r}`,"Progress"));const c=Tp(r,l)?r:null,d=Eo(c)?a(c,l):void 0;return i.jsx(ZS,{scope:n,value:c,max:l,children:i.jsx(V.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Eo(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":kp(c,l),"data-value":c??void 0,"data-max":l,...s,ref:t})})});Np.displayName=Ws;var Sp="ProgressIndicator",Ep=u.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=JS(Sp,n);return i.jsx(V.div,{"data-state":kp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Ep.displayName=Sp;function eE(e,t){return`${Math.round(e/t*100)}%`}function kp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Eo(e){return typeof e=="number"}function Pp(e){return Eo(e)&&!isNaN(e)&&e>0}function Tp(e,t){return Eo(e)&&!isNaN(e)&&e<=t&&e>=0}function tE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Hs}\`.`}function nE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
279
|
+
*/var $f;function iN(){return $f||($f=1,process.env.NODE_ENV!=="production"&&function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=v();if(!m){var b=v();a(g,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}b=s({inst:{value:g,getSnapshot:v}});var y=b[0].inst,w=b[1];return c(function(){y.value=g,y.getSnapshot=v,n(y)&&w({inst:y})},[p,g,v]),l(function(){return n(y)&&w({inst:y}),p(function(){n(y)&&w({inst:y})})},[p]),d(g),g}function n(p){var v=p.getSnapshot;p=p.value;try{var g=v();return!a(p,g)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=C,a=typeof Object.is=="function"?Object.is:e,s=o.useState,l=o.useEffect,c=o.useLayoutEffect,d=o.useDebugValue,f=!1,m=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;gs.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),gs}var Lf;function lN(){return Lf||(Lf=1,process.env.NODE_ENV==="production"?fo.exports=sN():fo.exports=iN()),fo.exports}var cN=lN();function uN(){return cN.useSyncExternalStore(dN,()=>!0,()=>!1)}function dN(){return()=>{}}var vs="Avatar",[fN,vT]=be(vs),[mN,Ff]=fN(vs),Bf=u.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=u.useState("idle");return i.jsx(mN,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:i.jsx(V.span,{...r,ref:t})})});Bf.displayName=vs;var zf="AvatarImage",Vf=u.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=Ff(zf,n),l=pN(r,a),c=Se(d=>{o(d),s.onImageLoadingStatusChange(d)});return ge(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?i.jsx(V.img,{...a,ref:t,src:r}):null});Vf.displayName=zf;var Wf="AvatarFallback",Hf=u.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Ff(Wf,n),[s,l]=u.useState(r===void 0);return u.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?i.jsx(V.span,{...o,ref:t}):null});Hf.displayName=Wf;function Gf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function pN(e,{referrerPolicy:t,crossOrigin:n}){const r=uN(),o=u.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=u.useState(()=>Gf(a,e));return ge(()=>{l(Gf(a,e))},[a,e]),ge(()=>{const c=m=>()=>{l(m)};if(!a)return;const d=c("loaded"),f=c("error");return a.addEventListener("load",d),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",d),a.removeEventListener("error",f)}},[a,n,t]),s}var Uf=Bf,Yf=Vf,Kf=Hf;const qf=u.forwardRef(({className:e,...t},n)=>i.jsx(Uf,{ref:n,className:R("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));qf.displayName=Uf.displayName;const Xf=u.forwardRef(({className:e,...t},n)=>i.jsx(Yf,{ref:n,className:R("aspect-square h-full w-full",e),...t}));Xf.displayName=Yf.displayName;const Qf=u.forwardRef(({className:e,...t},n)=>i.jsx(Kf,{ref:n,className:R("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Qf.displayName=Kf.displayName;const hN={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},gN=(e,t,n)=>{let r;const o=hN[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},vN={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},bN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wN={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yN={date:Jt({formats:vN,defaultWidth:"full"}),time:Jt({formats:bN,defaultWidth:"full"}),dateTime:Jt({formats:wN,defaultWidth:"full"})},xN={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},CN=(e,t,n,r)=>{const o=xN[e];return typeof o=="function"?o(t):o},NN={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},SN={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},EN={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},kN={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},PN={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},TN={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},MN={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Ze({values:NN,defaultWidth:"wide"}),quarter:Ze({values:SN,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ze({values:EN,defaultWidth:"wide"}),day:Ze({values:kN,defaultWidth:"wide"}),dayPeriod:Ze({values:PN,defaultWidth:"wide",formattingValues:TN,defaultFormattingWidth:"wide"})},jN=/^(\d+)[ºªo]?/i,_N=/\d+/i,AN={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},RN={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},IN={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},DN={any:[/1/i,/2/i,/3/i,/4/i]},ON={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},$N={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},LN={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},FN={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},BN={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},zN={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},VN={ordinalNumber:Ti({matchPattern:jN,parsePattern:_N,valueCallback:e=>parseInt(e,10)}),era:Je({matchPatterns:AN,defaultMatchWidth:"wide",parsePatterns:RN,defaultParseWidth:"any"}),quarter:Je({matchPatterns:IN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Je({matchPatterns:ON,defaultMatchWidth:"wide",parsePatterns:$N,defaultParseWidth:"any"}),day:Je({matchPatterns:LN,defaultMatchWidth:"wide",parsePatterns:FN,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:BN,defaultMatchWidth:"any",parsePatterns:zN,defaultParseWidth:"any"})},WN={code:"pt-BR",formatDistance:gN,formatLong:yN,formatRelative:CN,localize:MN,match:VN,options:{weekStartsOn:0,firstWeekContainsDate:1}},HN=({selectedDate:e,onChange:t,language:n="enUS"})=>{const[r,o]=C.useState(e||new Date),s={ptBR:WN,enUS:Uo}[n],l=()=>{o(p=>Zv(p))},c=()=>{o(p=>Bi(p,1))},d=p=>{t&&t(p)},f=Array.from({length:Qv(r)}).map((p,v)=>new Date(r.getFullYear(),r.getMonth(),v+1)),m=Xv(r).getDay(),h=Array.from({length:7}).map((p,v)=>Yo(new Date(2021,0,v+3),"EEEEEE",{locale:s}));return i.jsxs("div",{className:"max-w-sm mx-auto p-4 border rounded shadow",role:"application","aria-label":"Calendar",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:l,"aria-label":"Previous Month",children:i.jsx(gr,{})}),i.jsx("h2",{className:"text-lg font-bold","aria-live":"polite",children:Yo(r,"MMMM yyyy",{locale:s})}),i.jsx("button",{className:"px-2 py-1 bg-gray-200 rounded hover:bg-gray-300",onClick:c,"aria-label":"Next Month",children:i.jsx(_n,{})})]}),i.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[h.map((p,v)=>i.jsx("div",{className:"text-center font-medium","aria-hidden":"true",children:p},v)),Array.from({length:m}).map((p,v)=>i.jsx("div",{className:"","aria-hidden":"true"},`empty-${v}`)),f.map(p=>i.jsx("button",{className:`p-2 rounded hover:bg-blue-100 ${e&&p.toDateString()===e.toDateString()&&"bg-blue-200"}`,onClick:()=>d(p),"aria-label":Yo(p,"MMMM do yyyy",{locale:s}),"aria-pressed":e&&p.toDateString()===e.toDateString()?"true":"false",children:p.getDate()},p.toISOString()))]})]})},Zf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Zf.displayName="Card";const Jf=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));Jf.displayName="CardHeader";const em=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("font-semibold leading-none tracking-tight pb-4",e),...t}));em.displayName="CardTitle";const tm=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("text-sm text-muted-foreground",e),...t}));tm.displayName="CardDescription";const nm=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("p-6 py-0",e),...t}));nm.displayName="CardContent";const rm=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:R("flex items-center p-6 pt-6",e),...t}));rm.displayName="CardFooter";var om=1,GN=.9,UN=.8,YN=.17,bs=.1,ws=.999,KN=.9999,qN=.99,XN=/[\\\/_+.#"@\[\(\{&]/,QN=/[\\\/_+.#"@\[\(\{&]/g,ZN=/[\s-]/,am=/[\s-]/g;function ys(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?om:qN;var l=`${o},${a}`;if(s[l]!==void 0)return s[l];for(var c=r.charAt(a),d=n.indexOf(c,o),f=0,m,h,p,v;d>=0;)m=ys(e,t,n,r,d+1,a+1,s),m>f&&(d===o?m*=om:XN.test(e.charAt(d-1))?(m*=UN,p=e.slice(o,d-1).match(QN),p&&o>0&&(m*=Math.pow(ws,p.length))):ZN.test(e.charAt(d-1))?(m*=GN,v=e.slice(o,d-1).match(am),v&&o>0&&(m*=Math.pow(ws,v.length))):(m*=YN,o>0&&(m*=Math.pow(ws,d-o))),e.charAt(d)!==t.charAt(a)&&(m*=KN)),(m<bs&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(h=ys(e,t,n,r,d+1,a+2,s),h*bs>m&&(m=h*bs)),m>f&&(f=m),d=n.indexOf(c,d+1);return s[l]=f,f}function sm(e){return e.toLowerCase().replace(am," ")}function JN(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ys(e,t,sm(e),sm(t),0,0,{})}var Xn='[cmdk-group=""]',xs='[cmdk-group-items=""]',eS='[cmdk-group-heading=""]',im='[cmdk-item=""]',lm=`${im}:not([aria-disabled="true"])`,Cs="cmdk-item-select",vn="data-value",tS=(e,t,n)=>JN(e,t,n),cm=u.createContext(void 0),Qn=()=>u.useContext(cm),um=u.createContext(void 0),Ns=()=>u.useContext(um),dm=u.createContext(void 0),fm=u.forwardRef((e,t)=>{let n=bn(()=>{var T,D;return{search:"",value:(D=(T=e.value)!=null?T:e.defaultValue)!=null?D:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=bn(()=>new Set),o=bn(()=>new Map),a=bn(()=>new Map),s=bn(()=>new Set),l=mm(e),{label:c,children:d,value:f,onValueChange:m,filter:h,shouldFilter:p,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,...y}=e,w=pe(),x=pe(),S=pe(),k=u.useRef(null),j=fS();Ut(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,E.emit()}},[f]),Ut(()=>{j(6,ee)},[]);let E=u.useMemo(()=>({subscribe:T=>(s.current.add(T),()=>s.current.delete(T)),snapshot:()=>n.current,setState:(T,D,L)=>{var F,J,A,Y;if(!Object.is(n.current[T],D)){if(n.current[T]=D,T==="search")z(),$(),j(1,H);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(S);X?X.focus():(F=document.getElementById(w))==null||F.focus()}if(j(7,()=>{var X;n.current.selectedItemId=(X=K())==null?void 0:X.id,E.emit()}),L||j(5,ee),((J=l.current)==null?void 0:J.value)!==void 0){let X=D??"";(Y=(A=l.current).onValueChange)==null||Y.call(A,X);return}}E.emit()}},emit:()=>{s.current.forEach(T=>T())}}),[]),P=u.useMemo(()=>({value:(T,D,L)=>{var F;D!==((F=a.current.get(T))==null?void 0:F.value)&&(a.current.set(T,{value:D,keywords:L}),n.current.filtered.items.set(T,_(D,L)),j(2,()=>{$(),E.emit()}))},item:(T,D)=>(r.current.add(T),D&&(o.current.has(D)?o.current.get(D).add(T):o.current.set(D,new Set([T]))),j(3,()=>{z(),$(),n.current.value||H(),E.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let L=K();j(4,()=>{z(),(L==null?void 0:L.getAttribute("id"))===T&&H(),E.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:k}),[]);function _(T,D){var L,F;let J=(F=(L=l.current)==null?void 0:L.filter)!=null?F:tS;return T?J(T,n.current.search,D):0}function $(){if(!n.current.search||l.current.shouldFilter===!1)return;let T=n.current.filtered.items,D=[];n.current.filtered.groups.forEach(F=>{let J=o.current.get(F),A=0;J.forEach(Y=>{let X=T.get(Y);A=Math.max(X,A)}),D.push([F,A])});let L=k.current;te().sort((F,J)=>{var A,Y;let X=F.getAttribute("id"),ne=J.getAttribute("id");return((A=T.get(ne))!=null?A:0)-((Y=T.get(X))!=null?Y:0)}).forEach(F=>{let J=F.closest(xs);J?J.appendChild(F.parentElement===J?F:F.closest(`${xs} > *`)):L.appendChild(F.parentElement===L?F:F.closest(`${xs} > *`))}),D.sort((F,J)=>J[1]-F[1]).forEach(F=>{var J;let A=(J=k.current)==null?void 0:J.querySelector(`${Xn}[${vn}="${encodeURIComponent(F[0])}"]`);A==null||A.parentElement.appendChild(A)})}function H(){let T=te().find(L=>L.getAttribute("aria-disabled")!=="true"),D=T==null?void 0:T.getAttribute(vn);E.setState("value",D||void 0)}function z(){var T,D,L,F;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let A of r.current){let Y=(D=(T=a.current.get(A))==null?void 0:T.value)!=null?D:"",X=(F=(L=a.current.get(A))==null?void 0:L.keywords)!=null?F:[],ne=_(Y,X);n.current.filtered.items.set(A,ne),ne>0&&J++}for(let[A,Y]of o.current)for(let X of Y)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(A);break}n.current.filtered.count=J}function ee(){var T,D,L;let F=K();F&&(((T=F.parentElement)==null?void 0:T.firstChild)===F&&((L=(D=F.closest(Xn))==null?void 0:D.querySelector(eS))==null||L.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function K(){var T;return(T=k.current)==null?void 0:T.querySelector(`${im}[aria-selected="true"]`)}function te(){var T;return Array.from(((T=k.current)==null?void 0:T.querySelectorAll(lm))||[])}function W(T){let D=te()[T];D&&E.setState("value",D.getAttribute(vn))}function q(T){var D;let L=K(),F=te(),J=F.findIndex(Y=>Y===L),A=F[J+T];(D=l.current)!=null&&D.loop&&(A=J+T<0?F[F.length-1]:J+T===F.length?F[0]:F[J+T]),A&&E.setState("value",A.getAttribute(vn))}function I(T){let D=K(),L=D==null?void 0:D.closest(Xn),F;for(;L&&!F;)L=T>0?uS(L,Xn):dS(L,Xn),F=L==null?void 0:L.querySelector(lm);F?E.setState("value",F.getAttribute(vn)):q(T)}let O=()=>W(te().length-1),M=T=>{T.preventDefault(),T.metaKey?O():T.altKey?I(1):q(1)},U=T=>{T.preventDefault(),T.metaKey?W(0):T.altKey?I(-1):q(-1)};return u.createElement(V.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var D;(D=y.onKeyDown)==null||D.call(y,T);let L=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||L))switch(T.key){case"n":case"j":{b&&T.ctrlKey&&M(T);break}case"ArrowDown":{M(T);break}case"p":case"k":{b&&T.ctrlKey&&U(T);break}case"ArrowUp":{U(T);break}case"Home":{T.preventDefault(),W(0);break}case"End":{T.preventDefault(),O();break}case"Enter":{T.preventDefault();let F=K();if(F){let J=new Event(Cs);F.dispatchEvent(J)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:pS},c),mo(e,T=>u.createElement(um.Provider,{value:E},u.createElement(cm.Provider,{value:P},T))))}),nS=u.forwardRef((e,t)=>{var n,r;let o=pe(),a=u.useRef(null),s=u.useContext(dm),l=Qn(),c=mm(e),d=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Ut(()=>{if(!d)return l.item(o,s==null?void 0:s.id)},[d]);let f=pm(o,a,[e.value,e.children,a],e.keywords),m=Ns(),h=jt(j=>j.value&&j.value===f.current),p=jt(j=>d||l.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);u.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(Cs,v),()=>j.removeEventListener(Cs,v)},[p,e.onSelect,e.disabled]);function v(){var j,E;g(),(E=(j=c.current).onSelect)==null||E.call(j,f.current)}function g(){m.setState("value",f.current,!0)}if(!p)return null;let{disabled:b,value:y,onSelect:w,forceMount:x,keywords:S,...k}=e;return u.createElement(V.div,{ref:et(a,t),...k,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!h,"data-disabled":!!b,"data-selected":!!h,onPointerMove:b||l.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),rS=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=pe(),l=u.useRef(null),c=u.useRef(null),d=pe(),f=Qn(),m=jt(p=>o||f.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);Ut(()=>f.group(s),[]),pm(s,l,[e.value,e.heading,c]);let h=u.useMemo(()=>({id:s,forceMount:o}),[o]);return u.createElement(V.div,{ref:et(l,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&u.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),mo(e,p=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},u.createElement(dm.Provider,{value:h},p))))}),oS=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=u.useRef(null),a=jt(s=>!s.search);return!n&&!a?null:u.createElement(V.div,{ref:et(o,t),...r,"cmdk-separator":"",role:"separator"})}),aS=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Ns(),s=jt(d=>d.search),l=jt(d=>d.selectedItemId),c=Qn();return u.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),u.createElement(V.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),sS=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=u.useRef(null),s=u.useRef(null),l=jt(d=>d.selectedItemId),c=Qn();return u.useEffect(()=>{if(s.current&&a.current){let d=s.current,f=a.current,m,h=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let p=d.offsetHeight;f.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(d),()=>{cancelAnimationFrame(m),h.unobserve(d)}}},[]),u.createElement(V.div,{ref:et(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},mo(e,d=>u.createElement("div",{ref:et(s,c.listInnerRef),"cmdk-list-sizer":""},d)))}),iS=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...l}=e;return u.createElement(us,{open:n,onOpenChange:r},u.createElement(ds,{container:s},u.createElement(lo,{"cmdk-overlay":"",className:o}),u.createElement(co,{"aria-label":e.label,"cmdk-dialog":"",className:a},u.createElement(fm,{ref:t,...l}))))}),lS=u.forwardRef((e,t)=>jt(n=>n.filtered.count===0)?u.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),cS=u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return u.createElement(V.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},mo(e,s=>u.createElement("div",{"aria-hidden":!0},s)))}),je=Object.assign(fm,{List:sS,Item:nS,Input:aS,Group:rS,Separator:oS,Dialog:iS,Empty:lS,Loading:cS});function uS(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function dS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function mm(e){let t=u.useRef(e);return Ut(()=>{t.current=e}),t}var Ut=typeof window>"u"?u.useEffect:u.useLayoutEffect;function bn(e){let t=u.useRef();return t.current===void 0&&(t.current=e()),t}function jt(e){let t=Ns(),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function pm(e,t,n,r=[]){let o=u.useRef(),a=Qn();return Ut(()=>{var s;let l=(()=>{var d;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),c=r.map(d=>d.trim());a.value(e,l,c),(s=t.current)==null||s.setAttribute(vn,l),o.current=l}),o}var fS=()=>{let[e,t]=u.useState(),n=bn(()=>new Map);return Ut(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function mS(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mo({asChild:e,children:t},n){return e&&u.isValidElement(t)?u.cloneElement(mS(t),{ref:t.ref},n(t.props.children)):n(t)}var pS={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const po=us,hm=lf,gm=ds,hS=uo,Ss=u.forwardRef(({className:e,...t},n)=>i.jsx(lo,{ref:n,className:R("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}));Ss.displayName=lo.displayName;const Zn=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(gm,{children:[i.jsx(Ss,{}),i.jsxs(co,{ref:r,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border","bg-background 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 max-h-[100dvh] overflow-y-auto",e),...n,children:[t,i.jsxs(uo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(vt,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zn.displayName=co.displayName;const ho=({className:e,...t})=>i.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ho.displayName="DialogHeader";const vm=({className:e,...t})=>i.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});vm.displayName="DialogFooter";const go=u.forwardRef(({className:e,...t},n)=>i.jsx(fs,{ref:n,className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));go.displayName=fs.displayName;const vo=u.forwardRef(({className:e,...t},n)=>i.jsx(ms,{ref:n,className:R("text-sm text-muted-foreground",e),...t}));vo.displayName=ms.displayName;const bo=u.forwardRef(({className:e,...t},n)=>i.jsx(je,{ref:n,className:R("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));bo.displayName=je.displayName;const gS=({children:e,...t})=>i.jsx(po,{...t,children:i.jsx(Zn,{className:"overflow-hidden p-0 shadow-lg",children:i.jsx(bo,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Es=u.forwardRef(({className:e,...t},n)=>i.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[i.jsx(oa,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.jsx(je.Input,{ref:n,className:R("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Es.displayName=je.Input.displayName;const ks=u.forwardRef(({className:e,...t},n)=>i.jsx(je.List,{ref:n,className:R("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ks.displayName=je.List.displayName;const Ps=u.forwardRef((e,t)=>i.jsx(je.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ps.displayName=je.Empty.displayName;const wo=u.forwardRef(({className:e,...t},n)=>i.jsx(je.Group,{ref:n,className:R("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));wo.displayName=je.Group.displayName;const Ts=u.forwardRef(({className:e,...t},n)=>i.jsx(je.Separator,{ref:n,className:R("-mx-1 h-px bg-border",e),...t}));Ts.displayName=je.Separator.displayName;const wn=u.forwardRef(({className:e,...t},n)=>i.jsx(je.Item,{ref:n,className:R("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));wn.displayName=je.Item.displayName;const bm=({className:e,...t})=>i.jsx("span",{className:R("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bm.displayName="CommandShortcut";const wm=C.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:l=0,...c}=e,d=C.useRef(null);C.useImperativeHandle(t,()=>d.current);const[f,m]=C.useState(""),h=g=>{const b=g.toFixed(2).split("."),y=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${y}${r}${b[1]}`},p=g=>{const b=g.target.value,y=parseFloat(b.replace(/\D/g,""))/100;m(h(y)),a(y),d.current&&window.requestAnimationFrame(()=>{var w;(w=d.current)==null||w.setSelectionRange(d.current.value.length,d.current.value.length)})},v=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return C.useEffect(()=>{m(h(+l))},[l]),i.jsx(ao,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:p,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...c})});wm.displayName="CurrencyInput";var vS="Label",ym=u.forwardRef((e,t)=>i.jsx(V.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())}}));ym.displayName=vS;var xm=ym;const bS=bt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cm=u.forwardRef(({className:e,...t},n)=>i.jsx(xm,{ref:n,className:R(bS(),e),...t}));Cm.displayName=xm.displayName;var yo="Popover",[Nm,wT]=be(yo,[Nt]),Jn=Nt(),[wS,_t]=Nm(yo),Sm=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,l=Jn(t),c=u.useRef(null),[d,f]=u.useState(!1),[m,h]=ye({prop:r,defaultProp:o??!1,onChange:a,caller:yo});return i.jsx(On,{...l,children:i.jsx(wS,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:s,children:n})})};Sm.displayName=yo;var Em="PopoverAnchor",km=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=_t(Em,n),a=Jn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return u.useEffect(()=>(s(),()=>l()),[s,l]),i.jsx($n,{...a,...r,ref:t})});km.displayName=Em;var Pm="PopoverTrigger",Tm=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=_t(Pm,n),a=Jn(n),s=re(t,o.triggerRef),l=i.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Rm(o.open),...r,ref:s,onClick:B(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:i.jsx($n,{asChild:!0,...a,children:l})});Tm.displayName=Pm;var Ms="PopoverPortal",[yS,xS]=Nm(Ms,{forceMount:void 0}),Mm=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=_t(Ms,t);return i.jsx(yS,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:r})})})};Mm.displayName=Ms;var yn="PopoverContent",jm=u.forwardRef((e,t)=>{const n=xS(yn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=_t(yn,e.__scopePopover);return i.jsx(xe,{present:r||a.open,children:a.modal?i.jsx(NS,{...o,ref:t}):i.jsx(SS,{...o,ref:t})})});jm.displayName=yn;var CS=gt("PopoverContent.RemoveScroll"),NS=u.forwardRef((e,t)=>{const n=_t(yn,e.__scopePopover),r=u.useRef(null),o=re(t,r),a=u.useRef(!1);return u.useEffect(()=>{const s=r.current;if(s)return Or(s)},[]),i.jsx(Bn,{as:CS,allowPinchZoom:!0,children:i.jsx(_m,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),a.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),SS=u.forwardRef((e,t)=>{const n=_t(yn,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return i.jsx(_m,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),_m=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...m}=e,h=_t(yn,n),p=Jn(n);return br(),i.jsx(An,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:i.jsx(Mr,{"data-state":Rm(h.open),role:"dialog",id:h.contentId,...p,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Am="PopoverClose",ES=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=_t(Am,n);return i.jsx(V.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>o.onOpenChange(!1))})});ES.displayName=Am;var kS="PopoverArrow",PS=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Jn(n);return i.jsx(jr,{...o,...r,ref:t})});PS.displayName=kS;function Rm(e){return e?"open":"closed"}var TS=Sm,MS=km,jS=Tm,_S=Mm,Im=jm;const Dm=TS,Om=jS,AS=MS,js=u.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>i.jsx(_S,{children:i.jsx(Im,{ref:o,align:t,sideOffset:n,className:R("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));js.displayName=Im.displayName;var RS="Separator",$m="horizontal",IS=["horizontal","vertical"],Lm=u.forwardRef((e,t)=>{const{decorative:n,orientation:r=$m,...o}=e,a=DS(r)?r:$m,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(V.div,{"data-orientation":a,...l,...o,ref:t})});Lm.displayName=RS;function DS(e){return IS.includes(e)}var Fm=Lm;const xo=u.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>i.jsx(Fm,{ref:o,decorative:n,orientation:t,className:R("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xo.displayName=Fm.displayName;const Bm=bt("mx-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),zm=u.forwardRef(({options:e,onValueChange:t,variant:n,defaultValue:r=[],placeholder:o="Select options",maxCount:a=3,modalPopover:s=!1,asChild:l=!1,className:c,...d},f)=>{const[m,h]=u.useState(r),[p,v]=u.useState(!1),[g,b]=u.useState(!1),y=E=>{if(E.key==="Enter")v(!0);else if(E.key==="Backspace"&&!E.currentTarget.value){const P=[...m];P.pop(),h(P),t(P)}},w=E=>{const P=m.includes(E)?m.filter(_=>_!==E):[...m,E];h(P),t(P)},x=()=>{h([]),t([])},S=()=>{v(E=>!E)},k=()=>{const E=m.slice(0,a);h(E),t(E)},j=()=>{if(m.length===e.length)x();else{const E=e.map(P=>P.value);h(E),t(E)}};return i.jsxs(Dm,{open:p,onOpenChange:v,modal:s,children:[i.jsx(Om,{asChild:!0,children:i.jsx(fe,{ref:f,...d,onClick:S,className:R("flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",c),children:m.length>0?i.jsxs("div",{className:"flex justify-between items-center w-full",children:[i.jsxs("div",{className:"flex flex-wrap items-center",children:[m.slice(0,a).map(E=>{const P=e.find(_=>_.value===E);return i.jsxs(on,{className:R(Bm({variant:n})),children:[P==null?void 0:P.label,i.jsx(ra,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:_=>{_.stopPropagation(),w(E)}})]},E)}),m.length>a&&i.jsxs(on,{className:R("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",Bm({variant:n})),children:[`+ ${m.length-a} more`,i.jsx(ra,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:E=>{E.stopPropagation(),k()}})]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(vt,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:E=>{E.stopPropagation(),x()}}),i.jsx(xo,{orientation:"vertical",className:"flex min-h-6 h-full"}),i.jsx(rn,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):i.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[i.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:o}),i.jsx(rn,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),i.jsx(js,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>v(!1),children:i.jsxs(bo,{children:[i.jsx(Es,{placeholder:"Search...",onKeyDown:y}),i.jsxs(ks,{children:[i.jsx(Ps,{children:"No results found."}),i.jsxs(wo,{children:[i.jsxs(wn,{onSelect:j,className:"cursor-pointer",children:[i.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",m.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(jn,{className:"h-4 w-4"})}),i.jsx("span",{children:"(Select All)"})]},"all"),e.map(E=>{const P=m.includes(E.value);return i.jsxs(wn,{onSelect:()=>w(E.value),className:"cursor-pointer",children:[i.jsx("div",{className:R("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",P?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:i.jsx(jn,{className:"h-4 w-4"})}),i.jsx("span",{children:E.label})]},E.value)})]}),i.jsx(Ts,{}),i.jsx(wo,{children:i.jsxs("div",{className:"flex items-center justify-between",children:[m.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(wn,{onSelect:x,className:"flex-1 justify-center cursor-pointer",children:"Clear"}),i.jsx(xo,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),i.jsx(wn,{onSelect:()=>v(!1),className:"flex-1 justify-center cursor-pointer max-w-full",children:"Close"})]})})]})]})})]})});zm.displayName="MultiSelect";var Yt="NavigationMenu",[_s,Vm,OS]=an(Yt),[As,$S,LS]=an(Yt),[Rs,yT]=be(Yt,[OS,LS]),[FS,Fe]=Rs(Yt),[BS,zS]=Rs(Yt),Wm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:l=300,orientation:c="horizontal",dir:d,...f}=e,[m,h]=u.useState(null),p=re(t,_=>h(_)),v=wt(d),g=u.useRef(0),b=u.useRef(0),y=u.useRef(0),[w,x]=u.useState(!0),[S,k]=ye({prop:r,onChange:_=>{const $=_!=="",H=l>0;$?(window.clearTimeout(y.current),H&&x(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>x(!0),l)),o==null||o(_)},defaultProp:a??"",caller:Yt}),j=u.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>k(""),150)},[k]),E=u.useCallback(_=>{window.clearTimeout(b.current),k(_)},[k]),P=u.useCallback(_=>{S===_?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),k(_)},s)},[S,k,s]);return u.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(y.current)},[]),i.jsx(Hm,{scope:n,isRootMenu:!0,value:S,dir:v,orientation:c,rootNavigationMenu:m,onTriggerEnter:_=>{window.clearTimeout(g.current),w?P(_):E(_)},onTriggerLeave:()=>{window.clearTimeout(g.current),j()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:j,onItemSelect:_=>{k($=>$===_?"":_)},onItemDismiss:()=>k(""),children:i.jsx(V.nav,{"aria-label":"Main","data-orientation":c,dir:v,...f,ref:p})})});Wm.displayName=Yt;var Is="NavigationMenuSub",VS=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...l}=e,c=Fe(Is,n),[d,f]=ye({prop:r,onChange:o,defaultProp:a??"",caller:Is});return i.jsx(Hm,{scope:n,isRootMenu:!1,value:d,dir:c.dir,orientation:s,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:m=>f(m),onItemSelect:m=>f(m),onItemDismiss:()=>f(""),children:i.jsx(V.div,{"data-orientation":s,...l,ref:t})})});VS.displayName=Is;var Hm=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:l,onItemSelect:c,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:h,onContentLeave:p}=e,[v,g]=u.useState(null),[b,y]=u.useState(new Map),[w,x]=u.useState(null);return i.jsx(FS,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:Yn(l),baseId:pe(),dir:o,orientation:a,viewport:v,onViewportChange:g,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:Se(f),onTriggerLeave:Se(m),onContentEnter:Se(h),onContentLeave:Se(p),onItemSelect:Se(c),onItemDismiss:Se(d),onViewportContentChange:u.useCallback((S,k)=>{y(j=>(j.set(S,k),new Map(j)))},[]),onViewportContentRemove:u.useCallback(S=>{y(k=>k.has(S)?(k.delete(S),new Map(k)):k)},[]),children:i.jsx(_s.Provider,{scope:t,children:i.jsx(BS,{scope:t,items:b,children:s})})})},Gm="NavigationMenuList",Um=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fe(Gm,n),a=i.jsx(V.ul,{"data-orientation":o.orientation,...r,ref:t});return i.jsx(V.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:i.jsx(_s.Slot,{scope:n,children:o.isRootMenu?i.jsx(rp,{asChild:!0,children:a}):a})})});Um.displayName=Gm;var Ym="NavigationMenuItem",[WS,Km]=Rs(Ym),qm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=pe(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=u.useRef(null),c=u.useRef(null),d=u.useRef(null),f=u.useRef(()=>{}),m=u.useRef(!1),h=u.useCallback((v="start")=>{if(l.current){f.current();const g=Ls(l.current);g.length&&Fs(v==="start"?g:g.reverse())}},[]),p=u.useCallback(()=>{if(l.current){const v=Ls(l.current);v.length&&(f.current=XS(v))}},[]);return i.jsx(WS,{scope:n,value:s,triggerRef:c,contentRef:l,focusProxyRef:d,wasEscapeCloseRef:m,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:p,onContentFocusOutside:p,children:i.jsx(V.li,{...o,ref:t})})});qm.displayName=Ym;var Ds="NavigationMenuTrigger",Xm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Fe(Ds,e.__scopeNavigationMenu),s=Km(Ds,e.__scopeNavigationMenu),l=u.useRef(null),c=re(l,s.triggerRef,t),d=sp(a.baseId,s.value),f=ip(a.baseId,s.value),m=u.useRef(!1),h=u.useRef(!1),p=s.value===a.value;return i.jsxs(i.Fragment,{children:[i.jsx(_s.ItemSlot,{scope:n,value:s.value,children:i.jsx(ap,{asChild:!0,children:i.jsx(V.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":zs(p),"aria-expanded":p,"aria-controls":f,...o,ref:c,onPointerEnter:B(e.onPointerEnter,()=>{h.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:B(e.onPointerMove,No(()=>{r||h.current||s.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(s.value),m.current=!0)})),onPointerLeave:B(e.onPointerLeave,No(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:B(e.onClick,()=>{a.onItemSelect(s.value),h.current=p}),onKeyDown:B(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&v.key===b&&(s.onEntryKeyDown(),v.preventDefault())})})})}),p&&i.jsxs(i.Fragment,{children:[i.jsx(Mu,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const g=s.contentRef.current,b=v.relatedTarget,y=b===l.current,w=g==null?void 0:g.contains(b);(y||!w)&&s.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&i.jsx("span",{"aria-owns":f})]})]})});Xm.displayName=Ds;var HS="NavigationMenuLink",Qm="navigationMenu.linkSelect",Zm=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return i.jsx(ap,{asChild:!0,children:i.jsx(V.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:B(e.onClick,s=>{const l=s.target,c=new CustomEvent(Qm,{bubbles:!0,cancelable:!0});if(l.addEventListener(Qm,d=>o==null?void 0:o(d),{once:!0}),vr(l,c),!c.defaultPrevented&&!s.metaKey){const d=new CustomEvent(Co,{bubbles:!0,cancelable:!0});vr(l,d)}},{checkForDefaultPrevented:!1})})})});Zm.displayName=HS;var Os="NavigationMenuIndicator",Jm=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fe(Os,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?ar.createPortal(i.jsx(xe,{present:n||a,children:i.jsx(GS,{...r,ref:t})}),o.indicatorTrack):null});Jm.displayName=Os;var GS=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fe(Os,n),a=Vm(n),[s,l]=u.useState(null),[c,d]=u.useState(null),f=o.orientation==="horizontal",m=!!o.value;u.useEffect(()=>{var g;const v=(g=a().find(b=>b.value===o.value))==null?void 0:g.ref.current;v&&l(v)},[a,o.value]);const h=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return Bs(s,h),Bs(o.indicatorTrack,h),c?i.jsx(V.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),xn="NavigationMenuContent",ep=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fe(xn,e.__scopeNavigationMenu),a=Km(xn,e.__scopeNavigationMenu),s=re(a.contentRef,t),l=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?i.jsx(US,{forceMount:n,...c,ref:s}):i.jsx(xe,{present:n||l,children:i.jsx(tp,{"data-state":zs(l),...c,ref:s,onPointerEnter:B(e.onPointerEnter,o.onContentEnter),onPointerLeave:B(e.onPointerLeave,No(o.onContentLeave)),style:{pointerEvents:!l&&o.isRootMenu?"none":void 0,...c.style}})})});ep.displayName=xn;var US=u.forwardRef((e,t)=>{const n=Fe(xn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ge(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ge(()=>()=>o(e.value),[e.value,o]),null}),Co="navigationMenu.rootContentDismiss",tp=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:l,onContentFocusOutside:c,...d}=e,f=Fe(xn,n),m=u.useRef(null),h=re(m,t),p=sp(f.baseId,r),v=ip(f.baseId,r),g=Vm(n),b=u.useRef(null),{onItemDismiss:y}=f;u.useEffect(()=>{const x=m.current;if(f.isRootMenu&&x){const S=()=>{var k;y(),l(),x.contains(document.activeElement)&&((k=o.current)==null||k.focus())};return x.addEventListener(Co,S),()=>x.removeEventListener(Co,S)}},[f.isRootMenu,e.value,o,y,l]);const w=u.useMemo(()=>{const S=g().map($=>$.value);f.dir==="rtl"&&S.reverse();const k=S.indexOf(f.value),j=S.indexOf(f.previousValue),E=r===f.value,P=j===S.indexOf(r);if(!E&&!P)return b.current;const _=(()=>{if(k!==j){if(E&&j!==-1)return k>j?"from-end":"from-start";if(P&&k!==-1)return k>j?"to-start":"to-end"}return null})();return b.current=_,_},[f.previousValue,f.value,f.dir,g,r]);return i.jsx(rp,{asChild:!0,children:i.jsx(Bt,{id:v,"aria-labelledby":p,"data-motion":w,"data-orientation":f.orientation,...d,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;const x=new Event(Co,{bubbles:!0,cancelable:!0});(S=m.current)==null||S.dispatchEvent(x)},onFocusOutside:B(e.onFocusOutside,x=>{var k;c();const S=x.target;(k=f.rootNavigationMenu)!=null&&k.contains(S)&&x.preventDefault()}),onPointerDownOutside:B(e.onPointerDownOutside,x=>{var E;const S=x.target,k=g().some(P=>{var _;return(_=P.ref.current)==null?void 0:_.contains(S)}),j=f.isRootMenu&&((E=f.viewport)==null?void 0:E.contains(S));(k||j||!f.isRootMenu)&&x.preventDefault()}),onKeyDown:B(e.onKeyDown,x=>{var j;const S=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!S){const E=Ls(x.currentTarget),P=document.activeElement,_=E.findIndex(z=>z===P),H=x.shiftKey?E.slice(0,_).reverse():E.slice(_+1,E.length);Fs(H)?x.preventDefault():(j=a.current)==null||j.focus()}}),onEscapeKeyDown:B(e.onEscapeKeyDown,x=>{s.current=!0})})})}),$s="NavigationMenuViewport",np=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!Fe($s,e.__scopeNavigationMenu).value;return i.jsx(xe,{present:n||a,children:i.jsx(YS,{...r,ref:t})})});np.displayName=$s;var YS=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=Fe($s,n),s=re(t,a.onViewportChange),l=zS(xn,e.__scopeNavigationMenu),[c,d]=u.useState(null),[f,m]=u.useState(null),h=c?(c==null?void 0:c.width)+"px":void 0,p=c?(c==null?void 0:c.height)+"px":void 0,v=!!a.value,g=v?a.value:a.previousValue;return Bs(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),i.jsx(V.div,{"data-state":zs(v),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":p,...o.style},onPointerEnter:B(e.onPointerEnter,a.onContentEnter),onPointerLeave:B(e.onPointerLeave,No(a.onContentLeave)),children:Array.from(l.items).map(([y,{ref:w,forceMount:x,...S}])=>{const k=g===y;return i.jsx(xe,{present:x||k,children:i.jsx(tp,{...S,ref:et(w,j=>{k&&j&&m(j)})})},y)})})}),KS="FocusGroup",rp=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Fe(KS,n);return i.jsx(As.Provider,{scope:n,children:i.jsx(As.Slot,{scope:n,children:i.jsx(V.div,{dir:o.dir,...r,ref:t})})})}),op=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],qS="FocusGroupItem",ap=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=$S(n),a=Fe(qS,n);return i.jsx(As.ItemSlot,{scope:n,children:i.jsx(V.button,{...r,ref:t,onKeyDown:B(e.onKeyDown,s=>{if(["Home","End",...op].includes(s.key)){let c=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&c.reverse(),op.includes(s.key)){const m=c.indexOf(s.currentTarget);c=c.slice(m+1)}setTimeout(()=>Fs(c)),s.preventDefault()}})})})});function Ls(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 Fs(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function XS(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Bs(e,t){const n=Se(t);ge(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function zs(e){return e?"open":"closed"}function sp(e,t){return`${e}-trigger-${t}`}function ip(e,t){return`${e}-content-${t}`}function No(e){return t=>t.pointerType==="mouse"?e(t):void 0}var lp=Wm,cp=Um,QS=qm,up=Xm,ZS=Zm,dp=Jm,fp=ep,mp=np;const pp=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(lp,{ref:r,className:R("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,i.jsx(Vs,{})]}));pp.displayName=lp.displayName;const hp=u.forwardRef(({className:e,...t},n)=>i.jsx(cp,{ref:n,className:R("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));hp.displayName=cp.displayName;const JS=QS,gp=bt("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),vp=u.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(up,{ref:r,className:R(gp(),"group",e),...n,children:[t," ",i.jsx(rn,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));vp.displayName=up.displayName;const bp=u.forwardRef(({className:e,...t},n)=>i.jsx(fp,{ref:n,className:R("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));bp.displayName=fp.displayName;const eE=ZS,Vs=u.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:R("absolute left-0 top-full flex justify-center"),children:i.jsx(mp,{className:R("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));Vs.displayName=mp.displayName;const wp=u.forwardRef(({className:e,...t},n)=>i.jsx(dp,{ref:n,className:R("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:i.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));wp.displayName=dp.displayName;const yp=({className:e,...t})=>i.jsx("nav",{role:"navigation","aria-label":"pagination",className:R("mx-auto flex w-full justify-center",e),...t});yp.displayName="Pagination";const xp=u.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,className:R("flex flex-row items-center gap-1",e),...t}));xp.displayName="PaginationContent";const Cp=u.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,className:R("",e),...t}));Cp.displayName="PaginationItem";const So=({className:e,isActive:t,size:n="icon",...r})=>i.jsx(fe,{"aria-current":t?"page":void 0,className:R(fr({variant:t?"default":"outline",rounded:!1,size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});So.displayName="PaginationLink";const Np=({className:e,...t})=>i.jsx(So,{"aria-label":"Previous page",className:R("gap-1",e),...t,children:i.jsx(gr,{className:"h-4 w-4"})});Np.displayName="PaginationPrevious";const Sp=({className:e,...t})=>i.jsx(So,{"aria-label":"Next page",className:R("gap-1",e),...t,children:i.jsx(_n,{className:"h-4 w-4"})});Sp.displayName="PaginationNext";const Ep=({className:e,...t})=>i.jsxs("span",{"aria-hidden":!0,className:R("flex h-9 w-9 items-center justify-center",e),...t,children:[i.jsx(uw,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"More pages"})]});Ep.displayName="PaginationEllipsis";var Ws="Progress",Hs=100,[tE,xT]=be(Ws),[nE,rE]=tE(Ws),kp=u.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=oE,...s}=e;(o||o===0)&&!jp(o)&&console.error(aE(`${o}`,"Progress"));const l=jp(o)?o:Hs;r!==null&&!_p(r,l)&&console.error(sE(`${r}`,"Progress"));const c=_p(r,l)?r:null,d=Eo(c)?a(c,l):void 0;return i.jsx(nE,{scope:n,value:c,max:l,children:i.jsx(V.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Eo(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":Mp(c,l),"data-value":c??void 0,"data-max":l,...s,ref:t})})});kp.displayName=Ws;var Pp="ProgressIndicator",Tp=u.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=rE(Pp,n);return i.jsx(V.div,{"data-state":Mp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Tp.displayName=Pp;function oE(e,t){return`${Math.round(e/t*100)}%`}function Mp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Eo(e){return typeof e=="number"}function jp(e){return Eo(e)&&!isNaN(e)&&e>0}function _p(e,t){return Eo(e)&&!isNaN(e)&&e<=t&&e>=0}function aE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Hs}\`.`}function sE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
280
280
|
- a positive number
|
|
281
281
|
- less than the value passed to \`max\` (or ${Hs} if no \`max\` prop is set)
|
|
282
282
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
283
283
|
|
|
284
|
-
Defaulting to \`null\`.`}var Mp=Np,rE=Ep;const Gs=u.forwardRef(({className:e,value:t,...n},r)=>i.jsx(Mp,{ref:r,className:R("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:i.jsx(rE,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gs.displayName=Mp.displayName;function oE(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...l}=e,[c,d]=C.useState(""),[f,m]=C.useState(!1),h=y=>{let w=0;return y.length>=8&&(w+=25),y.match(/[a-z]/)&&(w+=25),y.match(/[A-Z]/)&&(w+=25),y.match(/[0-9]/)&&(w+=25),w},p=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,v=h(c),g=p(v),b=y=>{var w;d(y.target.value),(w=e.onChange)==null||w.call(e,y)};return i.jsxs("div",{className:"w-full space-y-4",children:[i.jsxs("div",{className:"relative",children:[i.jsx(qn,{...l,type:f?"text":"password",value:c,onChange:b,className:`pr-10 ${n||""}`}),i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:o,children:f?i.jsx(lw,{className:"h-4 w-4"}):i.jsx(cw,{className:"h-4 w-4"})})]}),t&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsxs("span",{children:[s,":"]}),i.jsx("span",{children:g})]}),i.jsx(Gs,{value:v,className:"h-2"})]})]})}var Us="Radio",[aE,jp]=be(Us),[sE,iE]=aE(Us),_p=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:c,form:d,...f}=e,[m,h]=u.useState(null),p=re(t,b=>h(b)),v=u.useRef(!1),g=m?d||!!m.closest("form"):!0;return i.jsxs(sE,{scope:n,checked:o,disabled:s,children:[i.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Dp(o),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:p,onClick:B(e.onClick,b=>{o||c==null||c(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&i.jsx(Ip,{control:m,bubbles:!v.current,name:r,value:l,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});_p.displayName=Us;var Ap="RadioIndicator",Rp=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=iE(Ap,n);return i.jsx(xe,{present:r||a.checked,children:i.jsx(V.span,{"data-state":Dp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Rp.displayName=Ap;var lE="RadioBubbleInput",Ip=u.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=u.useRef(null),l=re(s,a),c=Yn(n),d=Tr(t);return u.useEffect(()=>{const f=s.current;if(!f)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&p){const v=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(v)}},[c,n,r]),i.jsx(V.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ip.displayName=lE;function Dp(e){return e?"checked":"unchecked"}var cE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ko="RadioGroup",[uE,bT]=be(ko,[Nt,jp]),Op=Nt(),$p=jp(),[dE,fE]=uE(ko),Lp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:d,loop:f=!0,onValueChange:m,...h}=e,p=Op(n),v=bt(d),[g,b]=ye({prop:a,defaultProp:o??null,onChange:m,caller:ko});return i.jsx(dE,{scope:n,name:r,required:s,disabled:l,value:g,onValueChange:b,children:i.jsx(Ar,{asChild:!0,...p,orientation:c,dir:v,loop:f,children:i.jsx(V.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...h,ref:t})})})});Lp.displayName=ko;var Fp="RadioGroupItem",Bp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=fE(Fp,n),s=a.disabled||r,l=Op(n),c=$p(n),d=u.useRef(null),f=re(t,d),m=a.value===o.value,h=u.useRef(!1);return u.useEffect(()=>{const p=g=>{cE.includes(g.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),i.jsx(Rr,{asChild:!0,...l,focusable:!s,active:m,children:i.jsx(_p,{disabled:s,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:B(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:B(o.onFocus,()=>{var p;h.current&&((p=d.current)==null||p.click())})})})});Bp.displayName=Fp;var mE="RadioGroupIndicator",zp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=$p(n);return i.jsx(Rp,{...o,...r,ref:t})});zp.displayName=mE;var Vp=Lp,Wp=Bp,pE=zp;const Hp=u.forwardRef(({className:e,...t},n)=>i.jsx(Vp,{className:R("grid gap-2",e),...t,ref:n}));Hp.displayName=Vp.displayName;const Gp=u.forwardRef(({className:e,...t},n)=>i.jsx(Wp,{ref:n,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(pE,{className:"flex items-center justify-center",children:i.jsx(dl,{className:"h-3.5 w-3.5 fill-primary"})})}));Gp.displayName=Wp.displayName;const hE=["primary","secondary","success","error","warning","info","white","neutral"],gE=["xs","sm","md","lg","xl","2xl"],Up=Ft("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-green-700",error:"text-red-700",warning:"text-yellow-700",info:"text-blue-700",white:"text-white",neutral:"text-gray-700"},size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-14 w-14","2xl":"h-20 w-20"}},defaultVariants:{color:"primary",size:"md"}}),Yp=e=>{const{label:t,size:n,color:r,className:o}=e;return i.jsxs("div",{className:R("flex flex-col justify-center items-center",o),children:[i.jsx(bw,{className:R(Up({color:r,size:n}),"animate-spin")}),t&&i.jsx("p",{className:R("italic",Up({color:r})),children:t})]})};var Po="Switch",[vE,wT]=be(Po),[bE,wE]=vE(Po),Kp=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:d,form:f,...m}=e,[h,p]=u.useState(null),v=re(t,x=>p(x)),g=u.useRef(!1),b=h?f||!!h.closest("form"):!0,[y,w]=ye({prop:o,defaultProp:a??!1,onChange:d,caller:Po});return i.jsxs(bE,{scope:n,checked:y,disabled:l,children:[i.jsx(V.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":Zp(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onClick:B(e.onClick,x=>{w(S=>!S),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&i.jsx(Qp,{control:h,bubbles:!g.current,name:r,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Kp.displayName=Po;var qp="SwitchThumb",Xp=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=wE(qp,n);return i.jsx(V.span,{"data-state":Zp(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Xp.displayName=qp;var yE="SwitchBubbleInput",Qp=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=u.useRef(null),l=re(s,a),c=Yn(n),d=Tr(t);return u.useEffect(()=>{const f=s.current;if(!f)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&p){const v=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(v)}},[c,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qp.displayName=yE;function Zp(e){return e?"checked":"unchecked"}var Jp=Kp,xE=Xp;const eh=u.forwardRef(({className:e,...t},n)=>i.jsx(Jp,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:i.jsx(xE,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));eh.displayName=Jp.displayName;var To="Tabs",[CE,yT]=be(To,[Nt]),th=Nt(),[NE,Ys]=CE(To),nh=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=e,f=bt(l),[m,h]=ye({prop:r,onChange:o,defaultProp:a??"",caller:To});return i.jsx(NE,{scope:n,baseId:pe(),value:m,onValueChange:h,orientation:s,dir:f,activationMode:c,children:i.jsx(V.div,{dir:f,"data-orientation":s,...d,ref:t})})});nh.displayName=To;var rh="TabsList",oh=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ys(rh,n),s=th(n);return i.jsx(Ar,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:i.jsx(V.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});oh.displayName=rh;var ah="TabsTrigger",sh=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ys(ah,n),l=th(n),c=ch(s.baseId,r),d=uh(s.baseId,r),f=r===s.value;return i.jsx(Rr,{asChild:!0,...l,focusable:!o,active:f,children:i.jsx(V.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:B(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?s.onValueChange(r):m.preventDefault()}),onKeyDown:B(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const m=s.activationMode!=="manual";!f&&!o&&m&&s.onValueChange(r)})})})});sh.displayName=ah;var ih="TabsContent",lh=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,l=Ys(ih,n),c=ch(l.baseId,r),d=uh(l.baseId,r),f=r===l.value,m=u.useRef(f);return u.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),i.jsx(xe,{present:o||f,children:({present:h})=>i.jsx(V.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:h&&a})})});lh.displayName=ih;function ch(e,t){return`${e}-trigger-${t}`}function uh(e,t){return`${e}-content-${t}`}var SE=nh,dh=oh,fh=sh,mh=lh;const EE=SE,ph=u.forwardRef(({className:e,...t},n)=>i.jsx(dh,{ref:n,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ph.displayName=dh.displayName;const hh=u.forwardRef(({className:e,...t},n)=>i.jsx(fh,{ref:n,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));hh.displayName=fh.displayName;const gh=u.forwardRef(({className:e,...t},n)=>i.jsx(mh,{ref:n,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));gh.displayName=mh.displayName;const vh=u.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:R("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));vh.displayName="Textarea";var kE=e=>{switch(e){case"success":return ME;case"info":return _E;case"warning":return jE;case"error":return AE;default:return null}},PE=Array(12).fill(0),TE=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},PE.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ME=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),jE=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),_E=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),AE=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),RE=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),IE=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ks=1,DE=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ks++,a=this.toasts.find(l=>l.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async c=>{if(a=["resolve",c],C.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if($E(c)&&!c.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,d)=>s.then(()=>a[0]==="reject"?d(a[1]):c(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ks++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_e=new DE,OE=(e,t)=>{let n=(t==null?void 0:t.id)||Ks++;return _e.addToast({title:e,...t,id:n}),n},$E=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",LE=OE,FE=()=>_e.toasts,BE=()=>_e.getActiveToasts(),ft=Object.assign(LE,{success:_e.success,info:_e.info,warning:_e.warning,error:_e.error,custom:_e.custom,message:_e.message,promise:_e.promise,dismiss:_e.dismiss,loading:_e.loading},{getHistory:FE,getToasts:BE});function zE(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}zE(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
|
|
285
|
-
`);function Mo(e){return e.label!==void 0}var VE=3,WE="32px",HE="16px",bh=4e3,GE=356,UE=14,YE=20,KE=200;function Ke(...e){return e.filter(Boolean).join(" ")}function qE(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var XE=e=>{var t,n,r,o,a,s,l,c,d,f,m;let{invert:h,toast:p,unstyled:v,interacting:g,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:S,expanded:k,removeToast:j,defaultRichColors:E,closeButton:P,style:_,cancelButtonStyle:$,actionButtonStyle:H,className:z="",descriptionClassName:ee="",duration:K,position:te,gap:W,loadingIcon:q,expandByDefault:I,classNames:O,icons:M,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:T}=e,[D,L]=C.useState(null),[F,J]=C.useState(null),[A,Y]=C.useState(!1),[X,ne]=C.useState(!1),[oe,ie]=C.useState(!1),[Ce,we]=C.useState(!1),[Be,$e]=C.useState(!1),[Ee,ze]=C.useState(0),[Te,rr]=C.useState(0),Rt=C.useRef(p.duration||K||bh),or=C.useRef(null),st=C.useRef(null),$o=x===0,Lo=x+1<=y,G=p.type,ae=p.dismissible!==!1,ce=p.className||"",ve=p.descriptionClassName||"",Ae=C.useMemo(()=>w.findIndex(se=>se.toastId===p.id)||0,[w,p.id]),mt=C.useMemo(()=>{var se;return(se=p.closeButton)!=null?se:P},[p.closeButton,P]),it=C.useMemo(()=>p.duration||K||bh,[p.duration,K]),ii=C.useRef(0),Nn=C.useRef(0),sg=C.useRef(0),Sn=C.useRef(null),[xP,CP]=te.split("-"),ig=C.useMemo(()=>w.reduce((se,me,he)=>he>=Ae?se:se+me.height,0),[w,Ae]),lg=IE(),NP=p.invert||h,li=G==="loading";Nn.current=C.useMemo(()=>Ae*W+ig,[Ae,ig]),C.useEffect(()=>{Rt.current=it},[it]),C.useEffect(()=>{Y(!0)},[]),C.useEffect(()=>{let se=st.current;if(se){let me=se.getBoundingClientRect().height;return rr(me),b(he=>[{toastId:p.id,height:me,position:p.position},...he]),()=>b(he=>he.filter(qe=>qe.toastId!==p.id))}},[b,p.id]),C.useLayoutEffect(()=>{if(!A)return;let se=st.current,me=se.style.height;se.style.height="auto";let he=se.getBoundingClientRect().height;se.style.height=me,rr(he),b(qe=>qe.find(Xe=>Xe.toastId===p.id)?qe.map(Xe=>Xe.toastId===p.id?{...Xe,height:he}:Xe):[{toastId:p.id,height:he,position:p.position},...qe])},[A,p.title,p.description,b,p.id]);let It=C.useCallback(()=>{ne(!0),ze(Nn.current),b(se=>se.filter(me=>me.toastId!==p.id)),setTimeout(()=>{j(p)},KE)},[p,j,b,Nn]);C.useEffect(()=>{if(p.promise&&G==="loading"||p.duration===1/0||p.type==="loading")return;let se;return k||g||T&&lg?(()=>{if(sg.current<ii.current){let me=new Date().getTime()-ii.current;Rt.current=Rt.current-me}sg.current=new Date().getTime()})():Rt.current!==1/0&&(ii.current=new Date().getTime(),se=setTimeout(()=>{var me;(me=p.onAutoClose)==null||me.call(p,p),It()},Rt.current)),()=>clearTimeout(se)},[k,g,p,G,T,lg,It]),C.useEffect(()=>{p.delete&&It()},[It,p.delete]);function SP(){var se,me,he;return M!=null&&M.loading?C.createElement("div",{className:Ke(O==null?void 0:O.loader,(se=p==null?void 0:p.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":G==="loading"},M.loading):q?C.createElement("div",{className:Ke(O==null?void 0:O.loader,(me=p==null?void 0:p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":G==="loading"},q):C.createElement(TE,{className:Ke(O==null?void 0:O.loader,(he=p==null?void 0:p.classNames)==null?void 0:he.loader),visible:G==="loading"})}return C.createElement("li",{tabIndex:0,ref:st,className:Ke(z,ce,O==null?void 0:O.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[G],(n=p==null?void 0:p.classNames)==null?void 0:n[G]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":A,"data-promise":!!p.promise,"data-swiped":Be,"data-removed":X,"data-visible":Lo,"data-y-position":xP,"data-x-position":CP,"data-index":x,"data-front":$o,"data-swiping":oe,"data-dismissible":ae,"data-type":G,"data-invert":NP,"data-swipe-out":Ce,"data-swipe-direction":F,"data-expanded":!!(k||I&&A),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${X?Ee:Nn.current}px`,"--initial-height":I?"auto":`${Te}px`,..._,...p.style},onDragEnd:()=>{ie(!1),L(null),Sn.current=null},onPointerDown:se=>{li||!ae||(or.current=new Date,ze(Nn.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(ie(!0),Sn.current={x:se.clientX,y:se.clientY}))},onPointerUp:()=>{var se,me,he,qe;if(Ce||!ae)return;Sn.current=null;let Xe=Number(((se=st.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dt=Number(((me=st.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),qt=new Date().getTime()-((he=or.current)==null?void 0:he.getTime()),Qe=D==="x"?Xe:Dt,Ot=Math.abs(Qe)/qt;if(Math.abs(Qe)>=YE||Ot>.11){ze(Nn.current),(qe=p.onDismiss)==null||qe.call(p,p),J(D==="x"?Xe>0?"right":"left":Dt>0?"down":"up"),It(),we(!0),$e(!1);return}ie(!1),L(null)},onPointerMove:se=>{var me,he,qe,Xe;if(!Sn.current||!ae||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let Dt=se.clientY-Sn.current.y,qt=se.clientX-Sn.current.x,Qe=(he=e.swipeDirections)!=null?he:qE(te);!D&&(Math.abs(qt)>1||Math.abs(Dt)>1)&&L(Math.abs(qt)>Math.abs(Dt)?"x":"y");let Ot={x:0,y:0};D==="y"?(Qe.includes("top")||Qe.includes("bottom"))&&(Qe.includes("top")&&Dt<0||Qe.includes("bottom")&&Dt>0)&&(Ot.y=Dt):D==="x"&&(Qe.includes("left")||Qe.includes("right"))&&(Qe.includes("left")&&qt<0||Qe.includes("right")&&qt>0)&&(Ot.x=qt),(Math.abs(Ot.x)>0||Math.abs(Ot.y)>0)&&$e(!0),(qe=st.current)==null||qe.style.setProperty("--swipe-amount-x",`${Ot.x}px`),(Xe=st.current)==null||Xe.style.setProperty("--swipe-amount-y",`${Ot.y}px`)}},mt&&!p.jsx?C.createElement("button",{"aria-label":U,"data-disabled":li,"data-close-button":!0,onClick:li||!ae?()=>{}:()=>{var se;It(),(se=p.onDismiss)==null||se.call(p,p)},className:Ke(O==null?void 0:O.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(a=M==null?void 0:M.close)!=null?a:RE):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,G||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Ke(O==null?void 0:O.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||SP():null,p.type!=="loading"?p.icon||(M==null?void 0:M[G])||kE(G):null):null,C.createElement("div",{"data-content":"",className:Ke(O==null?void 0:O.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},C.createElement("div",{"data-title":"",className:Ke(O==null?void 0:O.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Ke(ee,ve,O==null?void 0:O.description,(d=p==null?void 0:p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&Mo(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||$,onClick:se=>{var me,he;Mo(p.cancel)&&ae&&((he=(me=p.cancel).onClick)==null||he.call(me,se),It())},className:Ke(O==null?void 0:O.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&Mo(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:se=>{var me,he;Mo(p.action)&&((he=(me=p.action).onClick)==null||he.call(me,se),!se.defaultPrevented&&It())},className:Ke(O==null?void 0:O.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function wh(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function QE(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",l=a?HE:WE;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=l:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),n}var ZE=C.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:l,offset:c,mobileOffset:d,theme:f="light",richColors:m,duration:h,style:p,visibleToasts:v=VE,toastOptions:g,dir:b=wh(),gap:y=UE,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[j,E]=C.useState([]),P=C.useMemo(()=>Array.from(new Set([r].concat(j.filter(T=>T.position).map(T=>T.position)))),[j,r]),[_,$]=C.useState([]),[H,z]=C.useState(!1),[ee,K]=C.useState(!1),[te,W]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=C.useRef(null),I=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=C.useRef(null),M=C.useRef(!1),U=C.useCallback(T=>{E(D=>{var L;return(L=D.find(F=>F.id===T.id))!=null&&L.delete||_e.dismiss(T.id),D.filter(({id:F})=>F!==T.id)})},[]);return C.useEffect(()=>_e.subscribe(T=>{if(T.dismiss){E(D=>D.map(L=>L.id===T.id?{...L,delete:!0}:L));return}setTimeout(()=>{ar.flushSync(()=>{E(D=>{let L=D.findIndex(F=>F.id===T.id);return L!==-1?[...D.slice(0,L),{...D[L],...T},...D.slice(L+1)]:[T,...D]})})})}),[]),C.useEffect(()=>{if(f!=="system"){W(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let T=window.matchMedia("(prefers-color-scheme: dark)");try{T.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{T.addListener(({matches:L})=>{try{W(L?"dark":"light")}catch(F){console.error(F)}})}},[f]),C.useEffect(()=>{j.length<=1&&z(!1)},[j]),C.useEffect(()=>{let T=D=>{var L,F;o.every(J=>D[J]||D.code===J)&&(z(!0),(L=q.current)==null||L.focus()),D.code==="Escape"&&(document.activeElement===q.current||(F=q.current)!=null&&F.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]),C.useEffect(()=>{if(q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,M.current=!1)}},[q.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((T,D)=>{var L;let[F,J]=T.split("-");return j.length?C.createElement("ol",{key:T,dir:b==="auto"?wh():b,tabIndex:-1,ref:q,className:l,"data-sonner-toaster":!0,"data-theme":te,"data-y-position":F,"data-lifted":H&&j.length>1&&!a,"data-x-position":J,style:{"--front-toast-height":`${((L=_[0])==null?void 0:L.height)||0}px`,"--width":`${GE}px`,"--gap":`${y}px`,...p,...QE(c,d)},onBlur:A=>{M.current&&!A.currentTarget.contains(A.relatedTarget)&&(M.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||M.current||(M.current=!0,O.current=A.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ee||z(!1)},onDragEnd:()=>z(!1),onPointerDown:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},j.filter(A=>!A.position&&D===0||A.position===T).map((A,Y)=>{var X,ne;return C.createElement(XE,{key:A.id,icons:x,index:Y,toast:A,defaultRichColors:m,duration:(X=g==null?void 0:g.duration)!=null?X:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ne=g==null?void 0:g.closeButton)!=null?ne:s,interacting:ee,position:T,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:j.filter(oe=>oe.position==A.position),heights:_.filter(oe=>oe.position==A.position),setHeights:$,expandByDefault:a,gap:y,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const jo=({onClick:e})=>i.jsx(fe,{onClick:()=>e(),variant:"ghost",size:"xl",className:"ml-auto px-3",children:i.jsx(vt,{className:"!h-6 !w-6"})}),JE={...ft,success:(e,t)=>{const n=ft.success(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n},error:(e,t)=>{const n=ft.error(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n},warning:(e,t)=>{const n=ft.warning(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n},info:(e,t)=>{const n=ft.info(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n}},ek=({...e})=>i.jsx(ZE,{className:"toaster group",toastOptions:{classNames:{title:"py-3 px-0",toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg p-0",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",icon:"p-4 group-data-[type=error]:text-red-500 group-data-[type=success]:text-green-500 group-data-[type=warning]:text-amber-500 group-data-[type=info]:text-blue-500",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var yh="Toggle",qs=u.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[s,l]=ye({prop:n,onChange:o,defaultProp:r??!1,caller:yh});return i.jsx(V.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:B(e.onClick,()=>{e.disabled||l(!s)})})});qs.displayName=yh;var xh=qs;const Xs=Ft("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ch=u.forwardRef(({className:e,variant:t,size:n,...r},o)=>i.jsx(xh,{ref:o,className:R(Xs({variant:t,size:n,className:e})),...r}));Ch.displayName=xh.displayName;var _t="ToggleGroup",[Nh,xT]=be(_t,[Nt]),Sh=Nt(),Qs=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return i.jsx(tk,{...o,ref:t})}if(n==="multiple"){const o=r;return i.jsx(nk,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${_t}\``)});Qs.displayName=_t;var[Eh,kh]=Nh(_t),tk=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r??"",onChange:o,caller:_t});return i.jsx(Eh,{scope:e.__scopeToggleGroup,type:"single",value:C.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:C.useCallback(()=>l(""),[l]),children:i.jsx(Ph,{...a,ref:t})})}),nk=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r??[],onChange:o,caller:_t}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),d=C.useCallback(f=>l((m=[])=>m.filter(h=>h!==f)),[l]);return i.jsx(Eh,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:d,children:i.jsx(Ph,{...a,ref:t})})});Qs.displayName=_t;var[rk,ok]=Nh(_t),Ph=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:l=!0,...c}=e,d=Sh(n),f=bt(s),m={role:"group",dir:f,...c};return i.jsx(rk,{scope:n,rovingFocus:o,disabled:r,children:o?i.jsx(Ar,{asChild:!0,...d,orientation:a,dir:f,loop:l,children:i.jsx(V.div,{...m,ref:t})}):i.jsx(V.div,{...m,ref:t})})}),_o="ToggleGroupItem",Th=C.forwardRef((e,t)=>{const n=kh(_o,e.__scopeToggleGroup),r=ok(_o,e.__scopeToggleGroup),o=Sh(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:a,disabled:s},c=C.useRef(null);return r.rovingFocus?i.jsx(Rr,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:i.jsx(Mh,{...l,ref:t})}):i.jsx(Mh,{...l,ref:t})});Th.displayName=_o;var Mh=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=kh(_o,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?s:void 0;return i.jsx(qs,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),jh=Qs,_h=Th;const Ah=u.createContext({size:"default",variant:"default"}),Rh=u.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>i.jsx(jh,{ref:a,className:R("flex items-center justify-center gap-1",e),...o,children:i.jsx(Ah.Provider,{value:{variant:t,size:n},children:r})}));Rh.displayName=jh.displayName;const Ih=u.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=u.useContext(Ah);return i.jsx(_h,{ref:a,className:R(Xs({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});Ih.displayName=_h.displayName;var[Ao,CT]=be("Tooltip",[Ct]),Ro=Ct(),Dh="TooltipProvider",ak=700,Zs="tooltip.open",[sk,Js]=Ao(Dh),Oh=e=>{const{__scopeTooltip:t,delayDuration:n=ak,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=u.useRef(!0),l=u.useRef(!1),c=u.useRef(0);return u.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),i.jsx(sk,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:u.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};Oh.displayName=Dh;var er="Tooltip",[ik,tr]=Ao(er),$h=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=Js(er,e.__scopeTooltip),d=Ro(t),[f,m]=u.useState(null),h=pe(),p=u.useRef(0),v=s??c.disableHoverableContent,g=l??c.delayDuration,b=u.useRef(!1),[y,w]=ye({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Zs))):c.onClose(),a==null||a(E)},caller:er}),x=u.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),S=u.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,w(!0)},[w]),k=u.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),j=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,w(!0),p.current=0},g)},[g,w]);return u.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),i.jsx(On,{...d,children:i.jsx(ik,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:f,onTriggerChange:m,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayedRef.current?j():S()},[c.isOpenDelayedRef,j,S]),onTriggerLeave:u.useCallback(()=>{v?k():(window.clearTimeout(p.current),p.current=0)},[k,v]),onOpen:S,onClose:k,disableHoverableContent:v,children:n})})};$h.displayName=er;var ei="TooltipTrigger",Lh=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tr(ei,n),a=Js(ei,n),s=Ro(n),l=u.useRef(null),c=re(t,l,o.onTriggerChange),d=u.useRef(!1),f=u.useRef(!1),m=u.useCallback(()=>d.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),i.jsx($n,{asChild:!0,...s,children:i.jsx(V.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:B(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});Lh.displayName=ei;var ti="TooltipPortal",[lk,ck]=Ao(ti,{forceMount:void 0}),Fh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=tr(ti,t);return i.jsx(lk,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:r})})})};Fh.displayName=ti;var Cn="TooltipContent",Bh=u.forwardRef((e,t)=>{const n=ck(Cn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=tr(Cn,e.__scopeTooltip);return i.jsx(xe,{present:r||s.open,children:s.disableHoverableContent?i.jsx(zh,{side:o,...a,ref:t}):i.jsx(uk,{side:o,...a,ref:t})})}),uk=u.forwardRef((e,t)=>{const n=tr(Cn,e.__scopeTooltip),r=Js(Cn,e.__scopeTooltip),o=u.useRef(null),a=re(t,o),[s,l]=u.useState(null),{trigger:c,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,h=u.useCallback(()=>{l(null),m(!1)},[m]),p=u.useCallback((v,g)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},w=hk(y,b.getBoundingClientRect()),x=gk(y,w),S=vk(g.getBoundingClientRect()),k=wk([...x,...S]);l(k),m(!0)},[m]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(c&&f){const v=b=>p(b,f),g=b=>p(b,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),u.useEffect(()=>{if(s){const v=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},w=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),x=!bk(y,s);w?h():x&&(h(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,s,d,h]),i.jsx(zh,{...e,ref:a})}),[dk,fk]=Ao(er,{isInside:!1}),mk=rl("TooltipContent"),zh=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=tr(Cn,n),d=Ro(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Zs,f),()=>document.removeEventListener(Zs,f)),[f]),u.useEffect(()=>{if(c.trigger){const m=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:i.jsxs(Mr,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(mk,{children:r}),i.jsx(dk,{scope:n,isInside:!0,children:i.jsx(Mu,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Bh.displayName=Cn;var Vh="TooltipArrow",pk=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return fk(Vh,n).isInside?null:i.jsx(jr,{...o,...r,ref:t})});pk.displayName=Vh;function hk(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function gk(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function vk(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function bk(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a],c=t[s],d=l.x,f=l.y,m=c.x,h=c.y;f>r!=h>r&&n<(m-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function wk(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),yk(t)}function yk(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var xk=Oh,Ck=$h,Nk=Lh,Sk=Fh,Wh=Bh;const Ek=xk,kk=Ck,Pk=Nk,Hh=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(Sk,{children:i.jsx(Wh,{ref:r,sideOffset:t,className:R("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Hh.displayName=Wh.displayName;const Tk=()=>{const[e,t]=C.useState([]);return[e,a=>{t([...e,a])},a=>{const s=[...e];s.splice(a,1),t(s)},(a,s)=>{const l=[...e];l.filter(c=>c[a]!==s),t(l)}]};function Mk(){const[e,t]=C.useState(null);return[e,async r=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(r),t(r),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]}function Gh(e,t=250){const[n,r]=C.useState(e);return C.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const Uh=u.createContext(void 0),Yh={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},Kh={info:{icon:mw,className:"text-blue-500"},success:{icon:aw,className:"text-green-500"},error:{icon:ra,className:"text-red-500"},warning:{icon:ow,className:"text-yellow-500"},confirm:{icon:ul,className:"text-blue-500"},custom:{icon:ul,className:"text-gray-500"}};function jk({children:e}){var g,b,y,w,x,S,k,j,E,P,_,$,H;const[t,n]=u.useState({isOpen:!1,options:null}),r=u.useCallback(z=>{n({isOpen:!0,options:z})},[]),o=u.useCallback(()=>{n(z=>({...z,isOpen:!1}))},[]),a=u.useCallback(z=>{r({...z,type:"info"})},[r]),s=u.useCallback(z=>{r({...z,type:"success"})},[r]),l=u.useCallback(z=>{r({...z,type:"error"})},[r]),c=u.useCallback(z=>{r({...z,type:"warning"})},[r]),d=u.useCallback(z=>{r({...z,type:"custom"})},[r]),f=u.useCallback(z=>{r({...z,type:"confirm"})},[r]),m=(z,ee,K)=>{let te=Kh[z].icon;return ee&&(te=ee),i.jsx(te,{className:R("h-24 w-24",Kh[z].className,K)})},h=u.useMemo(()=>({open:r,close:o,info:a,success:s,error:l,warning:c,custom:d,confirm:f}),[r,o,a,s,l,c,d,f]),[p,v]=u.useState(!1);return i.jsxs(Uh.Provider,{value:h,children:[e,i.jsx(po,{open:t.isOpen,onOpenChange:z=>!z&&o(),modal:!0,children:i.jsxs(Zn,{className:R((g=t.options)!=null&&g.size?Yh[t.options.size]:Yh.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&i.jsxs(ho,{children:[i.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon,t.options.iconClassName)}),t.options.title&&i.jsx(go,{className:"text-center",children:t.options.title}),i.jsx(vo,{className:"text-center",children:t.options.message})]}),((y=t.options)==null?void 0:y.type)==="confirm"&&i.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[i.jsx(fe,{isLoading:p??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(k=(S=t.options)==null?void 0:S.confirmButton)==null?void 0:k.disabled,className:(j=t.options.confirmButton)==null?void 0:j.className,onClick:()=>{var ee,K,te,W;if(!((K=(ee=t.options)==null?void 0:ee.confirmButton)!=null&&K.onClick))throw new Error("Confirmation type dialog needs to implement the onConfirm function");const z=(W=(te=t.options)==null?void 0:te.confirmButton)==null?void 0:W.onClick();z instanceof Promise?(v(!0),z.then(()=>{v(!1),o()}).finally(()=>v(!1))):o()},children:((E=t.options.confirmButton)==null?void 0:E.label)??"Confirm"}),((P=t.options.cancelButton)==null?void 0:P.label)&&i.jsx(fe,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(_=t.options.cancelButton)==null?void 0:_.loading,disabled:p||(($=t.options.cancelButton)==null?void 0:$.disabled),children:(H=t.options.cancelButton)==null?void 0:H.label})]})]})})]})}function _k(){const e=u.useContext(Uh);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const Ak=(e=!1)=>{const[t,n]=u.useState(e),r=u.useCallback(()=>n(!0),[]),o=u.useCallback(()=>n(!1),[]),a=u.useCallback(()=>n(s=>!s),[]);return{isOpen:t,open:r,close:o,toggle:a}},Rk=(e=!1)=>{const[t,n]=u.useState(e),r=u.useCallback(()=>n(!0),[]),o=u.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
|
|
284
|
+
Defaulting to \`null\`.`}var Ap=kp,iE=Tp;const Gs=u.forwardRef(({className:e,value:t,...n},r)=>i.jsx(Ap,{ref:r,className:R("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:i.jsx(iE,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gs.displayName=Ap.displayName;function lE(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...l}=e,[c,d]=C.useState(""),[f,m]=C.useState(!1),h=y=>{let w=0;return y.length>=8&&(w+=25),y.match(/[a-z]/)&&(w+=25),y.match(/[A-Z]/)&&(w+=25),y.match(/[0-9]/)&&(w+=25),w},p=y=>y===0?r.veryWeak:y<=25?r.weak:y<=50?r.medium:y<=75?r.strong:r.veryStrong,v=h(c),g=p(v),b=y=>{var w;d(y.target.value),(w=e.onChange)==null||w.call(e,y)};return i.jsxs("div",{className:"w-full space-y-4",children:[i.jsxs("div",{className:"relative",children:[i.jsx(qn,{...l,type:f?"text":"password",value:c,onChange:b,className:`pr-10 ${n||""}`}),i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:o,children:f?i.jsx(dw,{className:"h-4 w-4"}):i.jsx(fw,{className:"h-4 w-4"})})]}),t&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsxs("span",{children:[s,":"]}),i.jsx("span",{children:g})]}),i.jsx(Gs,{value:v,className:"h-2"})]})]})}var Us="Radio",[cE,Rp]=be(Us),[uE,dE]=cE(Us),Ip=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:c,form:d,...f}=e,[m,h]=u.useState(null),p=re(t,b=>h(b)),v=u.useRef(!1),g=m?d||!!m.closest("form"):!0;return i.jsxs(uE,{scope:n,checked:o,disabled:s,children:[i.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Lp(o),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:p,onClick:B(e.onClick,b=>{o||c==null||c(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&i.jsx($p,{control:m,bubbles:!v.current,name:r,value:l,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Ip.displayName=Us;var Dp="RadioIndicator",Op=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=dE(Dp,n);return i.jsx(xe,{present:r||a.checked,children:i.jsx(V.span,{"data-state":Lp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Op.displayName=Dp;var fE="RadioBubbleInput",$p=u.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=u.useRef(null),l=re(s,a),c=Yn(n),d=Tr(t);return u.useEffect(()=>{const f=s.current;if(!f)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&p){const v=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(v)}},[c,n,r]),i.jsx(V.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$p.displayName=fE;function Lp(e){return e?"checked":"unchecked"}var mE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ko="RadioGroup",[pE,CT]=be(ko,[St,Rp]),Fp=St(),Bp=Rp(),[hE,gE]=pE(ko),zp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:d,loop:f=!0,onValueChange:m,...h}=e,p=Fp(n),v=wt(d),[g,b]=ye({prop:a,defaultProp:o??null,onChange:m,caller:ko});return i.jsx(hE,{scope:n,name:r,required:s,disabled:l,value:g,onValueChange:b,children:i.jsx(Ar,{asChild:!0,...p,orientation:c,dir:v,loop:f,children:i.jsx(V.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...h,ref:t})})})});zp.displayName=ko;var Vp="RadioGroupItem",Wp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=gE(Vp,n),s=a.disabled||r,l=Fp(n),c=Bp(n),d=u.useRef(null),f=re(t,d),m=a.value===o.value,h=u.useRef(!1);return u.useEffect(()=>{const p=g=>{mE.includes(g.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",v)}},[]),i.jsx(Rr,{asChild:!0,...l,focusable:!s,active:m,children:i.jsx(Ip,{disabled:s,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:B(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:B(o.onFocus,()=>{var p;h.current&&((p=d.current)==null||p.click())})})})});Wp.displayName=Vp;var vE="RadioGroupIndicator",Hp=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Bp(n);return i.jsx(Op,{...o,...r,ref:t})});Hp.displayName=vE;var Gp=zp,Up=Wp,bE=Hp;const Yp=u.forwardRef(({className:e,...t},n)=>i.jsx(Gp,{className:R("grid gap-2",e),...t,ref:n}));Yp.displayName=Gp.displayName;const Kp=u.forwardRef(({className:e,...t},n)=>i.jsx(Up,{ref:n,className:R("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(bE,{className:"flex items-center justify-center",children:i.jsx(dl,{className:"h-3.5 w-3.5 fill-primary"})})}));Kp.displayName=Up.displayName;const wE=["primary","secondary","success","error","warning","info","white","neutral"],yE=["xs","sm","md","lg","xl","2xl"],qp=bt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-green-700",error:"text-red-700",warning:"text-yellow-700",info:"text-blue-700",white:"text-white",neutral:"text-gray-700"},size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-14 w-14","2xl":"h-20 w-20"}},defaultVariants:{color:"primary",size:"md"}}),Xp=e=>{const{label:t,size:n,color:r,className:o}=e;return i.jsxs("div",{className:R("flex flex-col justify-center items-center",o),children:[i.jsx(xw,{className:R(qp({color:r,size:n}),"animate-spin")}),t&&i.jsx("p",{className:R("italic",qp({color:r})),children:t})]})};var Po="Switch",[xE,NT]=be(Po),[CE,NE]=xE(Po),Qp=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:d,form:f,...m}=e,[h,p]=u.useState(null),v=re(t,x=>p(x)),g=u.useRef(!1),b=h?f||!!h.closest("form"):!0,[y,w]=ye({prop:o,defaultProp:a??!1,onChange:d,caller:Po});return i.jsxs(CE,{scope:n,checked:y,disabled:l,children:[i.jsx(V.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":th(y),"data-disabled":l?"":void 0,disabled:l,value:c,...m,ref:v,onClick:B(e.onClick,x=>{w(S=>!S),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&i.jsx(eh,{control:h,bubbles:!g.current,name:r,value:c,checked:y,required:s,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Qp.displayName=Po;var Zp="SwitchThumb",Jp=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=NE(Zp,n);return i.jsx(V.span,{"data-state":th(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Jp.displayName=Zp;var SE="SwitchBubbleInput",eh=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=u.useRef(null),l=re(s,a),c=Yn(n),d=Tr(t);return u.useEffect(()=>{const f=s.current;if(!f)return;const m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&p){const v=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(v)}},[c,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});eh.displayName=SE;function th(e){return e?"checked":"unchecked"}var nh=Qp,EE=Jp;const rh=u.forwardRef(({className:e,...t},n)=>i.jsx(nh,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:i.jsx(EE,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));rh.displayName=nh.displayName;var To="Tabs",[kE,ST]=be(To,[St]),oh=St(),[PE,Ys]=kE(To),ah=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=e,f=wt(l),[m,h]=ye({prop:r,onChange:o,defaultProp:a??"",caller:To});return i.jsx(PE,{scope:n,baseId:pe(),value:m,onValueChange:h,orientation:s,dir:f,activationMode:c,children:i.jsx(V.div,{dir:f,"data-orientation":s,...d,ref:t})})});ah.displayName=To;var sh="TabsList",ih=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ys(sh,n),s=oh(n);return i.jsx(Ar,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:i.jsx(V.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});ih.displayName=sh;var lh="TabsTrigger",ch=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ys(lh,n),l=oh(n),c=fh(s.baseId,r),d=mh(s.baseId,r),f=r===s.value;return i.jsx(Rr,{asChild:!0,...l,focusable:!o,active:f,children:i.jsx(V.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:B(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?s.onValueChange(r):m.preventDefault()}),onKeyDown:B(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const m=s.activationMode!=="manual";!f&&!o&&m&&s.onValueChange(r)})})})});ch.displayName=lh;var uh="TabsContent",dh=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,l=Ys(uh,n),c=fh(l.baseId,r),d=mh(l.baseId,r),f=r===l.value,m=u.useRef(f);return u.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),i.jsx(xe,{present:o||f,children:({present:h})=>i.jsx(V.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:h&&a})})});dh.displayName=uh;function fh(e,t){return`${e}-trigger-${t}`}function mh(e,t){return`${e}-content-${t}`}var TE=ah,ph=ih,hh=ch,gh=dh;const ME=TE,vh=u.forwardRef(({className:e,...t},n)=>i.jsx(ph,{ref:n,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));vh.displayName=ph.displayName;const bh=u.forwardRef(({className:e,...t},n)=>i.jsx(hh,{ref:n,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));bh.displayName=hh.displayName;const wh=u.forwardRef(({className:e,...t},n)=>i.jsx(gh,{ref:n,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));wh.displayName=gh.displayName;const yh=u.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:R("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));yh.displayName="Textarea";var jE=e=>{switch(e){case"success":return RE;case"info":return DE;case"warning":return IE;case"error":return OE;default:return null}},_E=Array(12).fill(0),AE=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},_E.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),RE=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),IE=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),DE=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),OE=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),$E=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),LE=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ks=1,FE=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ks++,a=this.toasts.find(l=>l.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async c=>{if(a=["resolve",c],C.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if(zE(c)&&!c.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,d)=>s.then(()=>a[0]==="reject"?d(a[1]):c(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ks++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_e=new FE,BE=(e,t)=>{let n=(t==null?void 0:t.id)||Ks++;return _e.addToast({title:e,...t,id:n}),n},zE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",VE=BE,WE=()=>_e.toasts,HE=()=>_e.getActiveToasts(),ft=Object.assign(VE,{success:_e.success,info:_e.info,warning:_e.warning,error:_e.error,custom:_e.custom,message:_e.message,promise:_e.promise,dismiss:_e.dismiss,loading:_e.loading},{getHistory:WE,getToasts:HE});function GE(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}GE(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
|
|
285
|
+
`);function Mo(e){return e.label!==void 0}var UE=3,YE="32px",KE="16px",xh=4e3,qE=356,XE=14,QE=20,ZE=200;function Ke(...e){return e.filter(Boolean).join(" ")}function JE(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var ek=e=>{var t,n,r,o,a,s,l,c,d,f,m;let{invert:h,toast:p,unstyled:v,interacting:g,setHeights:b,visibleToasts:y,heights:w,index:x,toasts:S,expanded:k,removeToast:j,defaultRichColors:E,closeButton:P,style:_,cancelButtonStyle:$,actionButtonStyle:H,className:z="",descriptionClassName:ee="",duration:K,position:te,gap:W,loadingIcon:q,expandByDefault:I,classNames:O,icons:M,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:T}=e,[D,L]=C.useState(null),[F,J]=C.useState(null),[A,Y]=C.useState(!1),[X,ne]=C.useState(!1),[oe,ie]=C.useState(!1),[Ce,we]=C.useState(!1),[Be,$e]=C.useState(!1),[Ee,ze]=C.useState(0),[Te,rr]=C.useState(0),It=C.useRef(p.duration||K||xh),or=C.useRef(null),st=C.useRef(null),$o=x===0,Lo=x+1<=y,G=p.type,ae=p.dismissible!==!1,ce=p.className||"",ve=p.descriptionClassName||"",Ae=C.useMemo(()=>w.findIndex(se=>se.toastId===p.id)||0,[w,p.id]),mt=C.useMemo(()=>{var se;return(se=p.closeButton)!=null?se:P},[p.closeButton,P]),it=C.useMemo(()=>p.duration||K||xh,[p.duration,K]),ii=C.useRef(0),Nn=C.useRef(0),cg=C.useRef(0),Sn=C.useRef(null),[EP,kP]=te.split("-"),ug=C.useMemo(()=>w.reduce((se,me,he)=>he>=Ae?se:se+me.height,0),[w,Ae]),dg=LE(),PP=p.invert||h,li=G==="loading";Nn.current=C.useMemo(()=>Ae*W+ug,[Ae,ug]),C.useEffect(()=>{It.current=it},[it]),C.useEffect(()=>{Y(!0)},[]),C.useEffect(()=>{let se=st.current;if(se){let me=se.getBoundingClientRect().height;return rr(me),b(he=>[{toastId:p.id,height:me,position:p.position},...he]),()=>b(he=>he.filter(qe=>qe.toastId!==p.id))}},[b,p.id]),C.useLayoutEffect(()=>{if(!A)return;let se=st.current,me=se.style.height;se.style.height="auto";let he=se.getBoundingClientRect().height;se.style.height=me,rr(he),b(qe=>qe.find(Xe=>Xe.toastId===p.id)?qe.map(Xe=>Xe.toastId===p.id?{...Xe,height:he}:Xe):[{toastId:p.id,height:he,position:p.position},...qe])},[A,p.title,p.description,b,p.id]);let Dt=C.useCallback(()=>{ne(!0),ze(Nn.current),b(se=>se.filter(me=>me.toastId!==p.id)),setTimeout(()=>{j(p)},ZE)},[p,j,b,Nn]);C.useEffect(()=>{if(p.promise&&G==="loading"||p.duration===1/0||p.type==="loading")return;let se;return k||g||T&&dg?(()=>{if(cg.current<ii.current){let me=new Date().getTime()-ii.current;It.current=It.current-me}cg.current=new Date().getTime()})():It.current!==1/0&&(ii.current=new Date().getTime(),se=setTimeout(()=>{var me;(me=p.onAutoClose)==null||me.call(p,p),Dt()},It.current)),()=>clearTimeout(se)},[k,g,p,G,T,dg,Dt]),C.useEffect(()=>{p.delete&&Dt()},[Dt,p.delete]);function TP(){var se,me,he;return M!=null&&M.loading?C.createElement("div",{className:Ke(O==null?void 0:O.loader,(se=p==null?void 0:p.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":G==="loading"},M.loading):q?C.createElement("div",{className:Ke(O==null?void 0:O.loader,(me=p==null?void 0:p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":G==="loading"},q):C.createElement(AE,{className:Ke(O==null?void 0:O.loader,(he=p==null?void 0:p.classNames)==null?void 0:he.loader),visible:G==="loading"})}return C.createElement("li",{tabIndex:0,ref:st,className:Ke(z,ce,O==null?void 0:O.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[G],(n=p==null?void 0:p.classNames)==null?void 0:n[G]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":A,"data-promise":!!p.promise,"data-swiped":Be,"data-removed":X,"data-visible":Lo,"data-y-position":EP,"data-x-position":kP,"data-index":x,"data-front":$o,"data-swiping":oe,"data-dismissible":ae,"data-type":G,"data-invert":PP,"data-swipe-out":Ce,"data-swipe-direction":F,"data-expanded":!!(k||I&&A),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${X?Ee:Nn.current}px`,"--initial-height":I?"auto":`${Te}px`,..._,...p.style},onDragEnd:()=>{ie(!1),L(null),Sn.current=null},onPointerDown:se=>{li||!ae||(or.current=new Date,ze(Nn.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(ie(!0),Sn.current={x:se.clientX,y:se.clientY}))},onPointerUp:()=>{var se,me,he,qe;if(Ce||!ae)return;Sn.current=null;let Xe=Number(((se=st.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ot=Number(((me=st.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),qt=new Date().getTime()-((he=or.current)==null?void 0:he.getTime()),Qe=D==="x"?Xe:Ot,$t=Math.abs(Qe)/qt;if(Math.abs(Qe)>=QE||$t>.11){ze(Nn.current),(qe=p.onDismiss)==null||qe.call(p,p),J(D==="x"?Xe>0?"right":"left":Ot>0?"down":"up"),Dt(),we(!0),$e(!1);return}ie(!1),L(null)},onPointerMove:se=>{var me,he,qe,Xe;if(!Sn.current||!ae||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let Ot=se.clientY-Sn.current.y,qt=se.clientX-Sn.current.x,Qe=(he=e.swipeDirections)!=null?he:JE(te);!D&&(Math.abs(qt)>1||Math.abs(Ot)>1)&&L(Math.abs(qt)>Math.abs(Ot)?"x":"y");let $t={x:0,y:0};D==="y"?(Qe.includes("top")||Qe.includes("bottom"))&&(Qe.includes("top")&&Ot<0||Qe.includes("bottom")&&Ot>0)&&($t.y=Ot):D==="x"&&(Qe.includes("left")||Qe.includes("right"))&&(Qe.includes("left")&&qt<0||Qe.includes("right")&&qt>0)&&($t.x=qt),(Math.abs($t.x)>0||Math.abs($t.y)>0)&&$e(!0),(qe=st.current)==null||qe.style.setProperty("--swipe-amount-x",`${$t.x}px`),(Xe=st.current)==null||Xe.style.setProperty("--swipe-amount-y",`${$t.y}px`)}},mt&&!p.jsx?C.createElement("button",{"aria-label":U,"data-disabled":li,"data-close-button":!0,onClick:li||!ae?()=>{}:()=>{var se;Dt(),(se=p.onDismiss)==null||se.call(p,p)},className:Ke(O==null?void 0:O.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(a=M==null?void 0:M.close)!=null?a:$E):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,G||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Ke(O==null?void 0:O.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||TP():null,p.type!=="loading"?p.icon||(M==null?void 0:M[G])||jE(G):null):null,C.createElement("div",{"data-content":"",className:Ke(O==null?void 0:O.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},C.createElement("div",{"data-title":"",className:Ke(O==null?void 0:O.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Ke(ee,ve,O==null?void 0:O.description,(d=p==null?void 0:p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&Mo(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||$,onClick:se=>{var me,he;Mo(p.cancel)&&ae&&((he=(me=p.cancel).onClick)==null||he.call(me,se),Dt())},className:Ke(O==null?void 0:O.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&Mo(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:se=>{var me,he;Mo(p.action)&&((he=(me=p.action).onClick)==null||he.call(me,se),!se.defaultPrevented&&Dt())},className:Ke(O==null?void 0:O.actionButton,(m=p==null?void 0:p.classNames)==null?void 0:m.actionButton)},p.action.label):null))};function Ch(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function tk(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",l=a?KE:YE;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=l:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),n}var nk=C.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:l,offset:c,mobileOffset:d,theme:f="light",richColors:m,duration:h,style:p,visibleToasts:v=UE,toastOptions:g,dir:b=Ch(),gap:y=XE,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[j,E]=C.useState([]),P=C.useMemo(()=>Array.from(new Set([r].concat(j.filter(T=>T.position).map(T=>T.position)))),[j,r]),[_,$]=C.useState([]),[H,z]=C.useState(!1),[ee,K]=C.useState(!1),[te,W]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=C.useRef(null),I=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=C.useRef(null),M=C.useRef(!1),U=C.useCallback(T=>{E(D=>{var L;return(L=D.find(F=>F.id===T.id))!=null&&L.delete||_e.dismiss(T.id),D.filter(({id:F})=>F!==T.id)})},[]);return C.useEffect(()=>_e.subscribe(T=>{if(T.dismiss){E(D=>D.map(L=>L.id===T.id?{...L,delete:!0}:L));return}setTimeout(()=>{ar.flushSync(()=>{E(D=>{let L=D.findIndex(F=>F.id===T.id);return L!==-1?[...D.slice(0,L),{...D[L],...T},...D.slice(L+1)]:[T,...D]})})})}),[]),C.useEffect(()=>{if(f!=="system"){W(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let T=window.matchMedia("(prefers-color-scheme: dark)");try{T.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{T.addListener(({matches:L})=>{try{W(L?"dark":"light")}catch(F){console.error(F)}})}},[f]),C.useEffect(()=>{j.length<=1&&z(!1)},[j]),C.useEffect(()=>{let T=D=>{var L,F;o.every(J=>D[J]||D.code===J)&&(z(!0),(L=q.current)==null||L.focus()),D.code==="Escape"&&(document.activeElement===q.current||(F=q.current)!=null&&F.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]),C.useEffect(()=>{if(q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,M.current=!1)}},[q.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((T,D)=>{var L;let[F,J]=T.split("-");return j.length?C.createElement("ol",{key:T,dir:b==="auto"?Ch():b,tabIndex:-1,ref:q,className:l,"data-sonner-toaster":!0,"data-theme":te,"data-y-position":F,"data-lifted":H&&j.length>1&&!a,"data-x-position":J,style:{"--front-toast-height":`${((L=_[0])==null?void 0:L.height)||0}px`,"--width":`${qE}px`,"--gap":`${y}px`,...p,...tk(c,d)},onBlur:A=>{M.current&&!A.currentTarget.contains(A.relatedTarget)&&(M.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||M.current||(M.current=!0,O.current=A.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{ee||z(!1)},onDragEnd:()=>z(!1),onPointerDown:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},j.filter(A=>!A.position&&D===0||A.position===T).map((A,Y)=>{var X,ne;return C.createElement(ek,{key:A.id,icons:x,index:Y,toast:A,defaultRichColors:m,duration:(X=g==null?void 0:g.duration)!=null?X:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ne=g==null?void 0:g.closeButton)!=null?ne:s,interacting:ee,position:T,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:j.filter(oe=>oe.position==A.position),heights:_.filter(oe=>oe.position==A.position),setHeights:$,expandByDefault:a,gap:y,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const jo=({onClick:e})=>i.jsx(fe,{onClick:()=>e(),variant:"ghost",size:"xl",className:"ml-auto px-3",children:i.jsx(vt,{className:"!h-6 !w-6"})}),rk={...ft,success:(e,t)=>{const n=ft.success(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n},error:(e,t)=>{const n=ft.error(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n},warning:(e,t)=>{const n=ft.warning(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n},info:(e,t)=>{const n=ft.info(e,{...t,cancel:i.jsx(jo,{onClick:()=>ft.dismiss(n)})});return n}},ok=({...e})=>i.jsx(nk,{className:"toaster group",toastOptions:{classNames:{title:"py-3 px-0",toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg p-0",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",icon:"p-4 group-data-[type=error]:text-red-500 group-data-[type=success]:text-green-500 group-data-[type=warning]:text-amber-500 group-data-[type=info]:text-blue-500",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var Nh="Toggle",qs=u.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[s,l]=ye({prop:n,onChange:o,defaultProp:r??!1,caller:Nh});return i.jsx(V.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:B(e.onClick,()=>{e.disabled||l(!s)})})});qs.displayName=Nh;var Sh=qs;const Xs=bt("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Eh=u.forwardRef(({className:e,variant:t,size:n,...r},o)=>i.jsx(Sh,{ref:o,className:R(Xs({variant:t,size:n,className:e})),...r}));Eh.displayName=Sh.displayName;var At="ToggleGroup",[kh,ET]=be(At,[St]),Ph=St(),Qs=C.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return i.jsx(ak,{...o,ref:t})}if(n==="multiple"){const o=r;return i.jsx(sk,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${At}\``)});Qs.displayName=At;var[Th,Mh]=kh(At),ak=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r??"",onChange:o,caller:At});return i.jsx(Th,{scope:e.__scopeToggleGroup,type:"single",value:C.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:C.useCallback(()=>l(""),[l]),children:i.jsx(jh,{...a,ref:t})})}),sk=C.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,l]=ye({prop:n,defaultProp:r??[],onChange:o,caller:At}),c=C.useCallback(f=>l((m=[])=>[...m,f]),[l]),d=C.useCallback(f=>l((m=[])=>m.filter(h=>h!==f)),[l]);return i.jsx(Th,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:d,children:i.jsx(jh,{...a,ref:t})})});Qs.displayName=At;var[ik,lk]=kh(At),jh=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:l=!0,...c}=e,d=Ph(n),f=wt(s),m={role:"group",dir:f,...c};return i.jsx(ik,{scope:n,rovingFocus:o,disabled:r,children:o?i.jsx(Ar,{asChild:!0,...d,orientation:a,dir:f,loop:l,children:i.jsx(V.div,{...m,ref:t})}):i.jsx(V.div,{...m,ref:t})})}),_o="ToggleGroupItem",_h=C.forwardRef((e,t)=>{const n=Mh(_o,e.__scopeToggleGroup),r=lk(_o,e.__scopeToggleGroup),o=Ph(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:a,disabled:s},c=C.useRef(null);return r.rovingFocus?i.jsx(Rr,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:i.jsx(Ah,{...l,ref:t})}):i.jsx(Ah,{...l,ref:t})});_h.displayName=_o;var Ah=C.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Mh(_o,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?s:void 0;return i.jsx(qs,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Rh=Qs,Ih=_h;const Dh=u.createContext({size:"default",variant:"default"}),Oh=u.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>i.jsx(Rh,{ref:a,className:R("flex items-center justify-center gap-1",e),...o,children:i.jsx(Dh.Provider,{value:{variant:t,size:n},children:r})}));Oh.displayName=Rh.displayName;const $h=u.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=u.useContext(Dh);return i.jsx(Ih,{ref:a,className:R(Xs({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});$h.displayName=Ih.displayName;var[Ao,kT]=be("Tooltip",[Nt]),Ro=Nt(),Lh="TooltipProvider",ck=700,Zs="tooltip.open",[uk,Js]=Ao(Lh),Fh=e=>{const{__scopeTooltip:t,delayDuration:n=ck,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=u.useRef(!0),l=u.useRef(!1),c=u.useRef(0);return u.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),i.jsx(uk,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:u.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};Fh.displayName=Lh;var er="Tooltip",[dk,tr]=Ao(er),Bh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=Js(er,e.__scopeTooltip),d=Ro(t),[f,m]=u.useState(null),h=pe(),p=u.useRef(0),v=s??c.disableHoverableContent,g=l??c.delayDuration,b=u.useRef(!1),[y,w]=ye({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Zs))):c.onClose(),a==null||a(E)},caller:er}),x=u.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),S=u.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,w(!0)},[w]),k=u.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),j=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,w(!0),p.current=0},g)},[g,w]);return u.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),i.jsx(On,{...d,children:i.jsx(dk,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:f,onTriggerChange:m,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayedRef.current?j():S()},[c.isOpenDelayedRef,j,S]),onTriggerLeave:u.useCallback(()=>{v?k():(window.clearTimeout(p.current),p.current=0)},[k,v]),onOpen:S,onClose:k,disableHoverableContent:v,children:n})})};Bh.displayName=er;var ei="TooltipTrigger",zh=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tr(ei,n),a=Js(ei,n),s=Ro(n),l=u.useRef(null),c=re(t,l,o.onTriggerChange),d=u.useRef(!1),f=u.useRef(!1),m=u.useCallback(()=>d.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),i.jsx($n,{asChild:!0,...s,children:i.jsx(V.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:B(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});zh.displayName=ei;var ti="TooltipPortal",[fk,mk]=Ao(ti,{forceMount:void 0}),Vh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=tr(ti,t);return i.jsx(fk,{scope:t,forceMount:n,children:i.jsx(xe,{present:n||a.open,children:i.jsx(Ln,{asChild:!0,container:o,children:r})})})};Vh.displayName=ti;var Cn="TooltipContent",Wh=u.forwardRef((e,t)=>{const n=mk(Cn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=tr(Cn,e.__scopeTooltip);return i.jsx(xe,{present:r||s.open,children:s.disableHoverableContent?i.jsx(Hh,{side:o,...a,ref:t}):i.jsx(pk,{side:o,...a,ref:t})})}),pk=u.forwardRef((e,t)=>{const n=tr(Cn,e.__scopeTooltip),r=Js(Cn,e.__scopeTooltip),o=u.useRef(null),a=re(t,o),[s,l]=u.useState(null),{trigger:c,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,h=u.useCallback(()=>{l(null),m(!1)},[m]),p=u.useCallback((v,g)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},w=wk(y,b.getBoundingClientRect()),x=yk(y,w),S=xk(g.getBoundingClientRect()),k=Nk([...x,...S]);l(k),m(!0)},[m]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(c&&f){const v=b=>p(b,f),g=b=>p(b,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),u.useEffect(()=>{if(s){const v=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},w=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),x=!Ck(y,s);w?h():x&&(h(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,s,d,h]),i.jsx(Hh,{...e,ref:a})}),[hk,gk]=Ao(er,{isInside:!1}),vk=rl("TooltipContent"),Hh=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=tr(Cn,n),d=Ro(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Zs,f),()=>document.removeEventListener(Zs,f)),[f]),u.useEffect(()=>{if(c.trigger){const m=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),i.jsx(Bt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:i.jsxs(Mr,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(vk,{children:r}),i.jsx(hk,{scope:n,isInside:!0,children:i.jsx(Mu,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Wh.displayName=Cn;var Gh="TooltipArrow",bk=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return gk(Gh,n).isInside?null:i.jsx(jr,{...o,...r,ref:t})});bk.displayName=Gh;function wk(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function yk(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function xk(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Ck(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a],c=t[s],d=l.x,f=l.y,m=c.x,h=c.y;f>r!=h>r&&n<(m-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function Nk(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Sk(t)}function Sk(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ek=Fh,kk=Bh,Pk=zh,Tk=Vh,Uh=Wh;const Mk=Ek,jk=kk,_k=Pk,Yh=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(Tk,{children:i.jsx(Uh,{ref:r,sideOffset:t,className:R("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Yh.displayName=Uh.displayName;const Ak=()=>{const[e,t]=C.useState([]);return[e,a=>{t([...e,a])},a=>{const s=[...e];s.splice(a,1),t(s)},(a,s)=>{const l=[...e];l.filter(c=>c[a]!==s),t(l)}]};function Rk(){const[e,t]=C.useState(null);return[e,async r=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(r),t(r),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]}function Kh(e,t=250){const[n,r]=C.useState(e);return C.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const qh=u.createContext(void 0),Xh={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},Qh={info:{icon:gw,className:"text-blue-500"},success:{icon:lw,className:"text-green-500"},error:{icon:ra,className:"text-red-500"},warning:{icon:iw,className:"text-yellow-500"},confirm:{icon:ul,className:"text-blue-500"},custom:{icon:ul,className:"text-gray-500"}};function Ik({children:e}){var g,b,y,w,x,S,k,j,E,P,_,$,H;const[t,n]=u.useState({isOpen:!1,options:null}),r=u.useCallback(z=>{n({isOpen:!0,options:z})},[]),o=u.useCallback(()=>{n(z=>({...z,isOpen:!1}))},[]),a=u.useCallback(z=>{r({...z,type:"info"})},[r]),s=u.useCallback(z=>{r({...z,type:"success"})},[r]),l=u.useCallback(z=>{r({...z,type:"error"})},[r]),c=u.useCallback(z=>{r({...z,type:"warning"})},[r]),d=u.useCallback(z=>{r({...z,type:"custom"})},[r]),f=u.useCallback(z=>{r({...z,type:"confirm"})},[r]),m=(z,ee,K)=>{let te=Qh[z].icon;return ee&&(te=ee),i.jsx(te,{className:R("h-24 w-24",Qh[z].className,K)})},h=u.useMemo(()=>({open:r,close:o,info:a,success:s,error:l,warning:c,custom:d,confirm:f}),[r,o,a,s,l,c,d,f]),[p,v]=u.useState(!1);return i.jsxs(qh.Provider,{value:h,children:[e,i.jsx(po,{open:t.isOpen,onOpenChange:z=>!z&&o(),modal:!0,children:i.jsxs(Zn,{className:R((g=t.options)!=null&&g.size?Xh[t.options.size]:Xh.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&i.jsxs(ho,{children:[i.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon,t.options.iconClassName)}),t.options.title&&i.jsx(go,{className:"text-center",children:t.options.title}),i.jsx(vo,{className:"text-center",children:t.options.message})]}),((y=t.options)==null?void 0:y.type)==="confirm"&&i.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[i.jsx(fe,{isLoading:p??((x=(w=t.options)==null?void 0:w.confirmButton)==null?void 0:x.loading),disabled:(k=(S=t.options)==null?void 0:S.confirmButton)==null?void 0:k.disabled,className:(j=t.options.confirmButton)==null?void 0:j.className,onClick:()=>{var ee,K,te,W;if(!((K=(ee=t.options)==null?void 0:ee.confirmButton)!=null&&K.onClick))throw new Error("Confirmation type dialog needs to implement the onConfirm function");const z=(W=(te=t.options)==null?void 0:te.confirmButton)==null?void 0:W.onClick();z instanceof Promise?(v(!0),z.then(()=>{v(!1),o()}).finally(()=>v(!1))):o()},children:((E=t.options.confirmButton)==null?void 0:E.label)??"Confirm"}),((P=t.options.cancelButton)==null?void 0:P.label)&&i.jsx(fe,{variant:"outline",onClick:o,className:t.options.cancelButton.className,isLoading:(_=t.options.cancelButton)==null?void 0:_.loading,disabled:p||(($=t.options.cancelButton)==null?void 0:$.disabled),children:(H=t.options.cancelButton)==null?void 0:H.label})]})]})})]})}function Dk(){const e=u.useContext(qh);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}const Ok=(e=!1)=>{const[t,n]=u.useState(e),r=u.useCallback(()=>n(!0),[]),o=u.useCallback(()=>n(!1),[]),a=u.useCallback(()=>n(s=>!s),[]);return{isOpen:t,open:r,close:o,toggle:a}},$k=(e=!1)=>{const[t,n]=u.useState(e),r=u.useCallback(()=>n(!0),[]),o=u.useCallback(()=>n(!1),[]);return[t,r,o]};/*!
|
|
286
286
|
* Compressor.js v1.2.1
|
|
287
287
|
* https://fengyuanchen.github.io/compressorjs
|
|
288
288
|
*
|
|
@@ -290,4 +290,4 @@ Defaulting to \`null\`.`}var Mp=Np,rE=Ep;const Gs=u.forwardRef(({className:e,val
|
|
|
290
290
|
* Released under the MIT license
|
|
291
291
|
*
|
|
292
292
|
* Date: 2023-02-28T14:09:41.732Z
|
|
293
|
-
*/function qh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qh(Object(n),!0).forEach(function(r){Ok(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ik(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qh(r.key),r)}}function Dk(e,t,n){return t&&Xh(e.prototype,t),n&&Xh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ok(e,t,n){return t=Qh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}function $k(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Qh(e){var t=$k(e,"string");return typeof t=="symbol"?t:String(t)}var Zh={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,r=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=r&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),a=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,s=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,l=(r||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(c){var d,f,m,h,p,v,g,b,y;if(d=c.match(s),!d)throw new Error("invalid data URI");for(f=d[2]?d[1]:"text/plain"+(d[3]||";charset=US-ASCII"),m=!!d[4],h=c.slice(d[0].length),m?p=atob(h):p=decodeURIComponent(h),v=new ArrayBuffer(p.length),g=new Uint8Array(v),b=0;b<p.length;b+=1)g[b]=p.charCodeAt(b);return r?new Blob([o?g:v],{type:f}):(y=new a,y.append(v),y.getBlob(f))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(c,d,f){var m=this;setTimeout(function(){f&&n.toDataURL&&l?c(l(m.toDataURL(d,f))):c(m.mozGetAsFile("blob",d))})}:n.toDataURL&&l&&(n.msToBlob?n.toBlob=function(c,d,f){var m=this;setTimeout(function(){(d&&d!=="image/png"||f)&&n.toDataURL&&l?c(l(m.toDataURL(d,f))):c(m.msToBlob(d))})}:n.toBlob=function(c,d,f){var m=this;setTimeout(function(){c(l(m.toDataURL(d,f)))})})),e.exports?e.exports=l:t.dataURLtoBlob=l}(window)})(Zh);var Jh=Zh.exports,Lk=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},eg={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},Fk=typeof window<"u"&&typeof window.document<"u",At=Fk?window:{},Oo=function(t){return t>0&&t<1/0},Bk=Array.prototype.slice;function ni(e){return Array.from?Array.from(e):Bk.call(e)}var zk=/^image\/.+$/;function ri(e){return zk.test(e)}function Vk(e){var t=ri(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var tg=String.fromCharCode;function Wk(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=tg(e.getUint8(o));return r}var Hk=At.btoa;function ng(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(tg.apply(null,ni(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(Hk(n.join("")))}function Gk(e){var t=new DataView(e),n;try{var r,o,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var s=t.byteLength,l=2;l+1<s;){if(t.getUint8(l)===255&&t.getUint8(l+1)===225){o=l;break}l+=1}if(o){var c=o+4,d=o+10;if(Wk(t,c,4)==="Exif"){var f=t.getUint16(d);if(r=f===18761,(r||f===19789)&&t.getUint16(d+2,r)===42){var m=t.getUint32(d+4,r);m>=8&&(a=d+m)}}}if(a){var h=t.getUint16(a,r),p,v;for(v=0;v<h;v+=1)if(p=a+v*12+2,t.getUint16(p,r)===274){p+=8,n=t.getUint16(p,r),t.setUint16(p,1,r);break}}}catch{n=1}return n}function Uk(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:r}}var Yk=/\.\d*(?:0|9){12}\d*$/;function rg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Yk.test(e)?Math.round(e*t)/t:e}function nr(e){var t=e.aspectRatio,n=e.height,r=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=Oo(r),s=Oo(n);if(a&&s){var l=n*t;(o==="contain"||o==="none")&&l>r||o==="cover"&&l<r?n=r/t:r=n*t}else a?n=r/t:s&&(r=n*t);return{width:r,height:n}}function Kk(e){for(var t=ni(new Uint8Array(e)),n=t.length,r=[],o=0;o+3<n;){var a=t[o],s=t[o+1];if(a===255&&s===218)break;if(a===255&&s===216)o+=2;else{var l=t[o+2]*256+t[o+3],c=o+l+2,d=t.slice(o,c);r.push(d),o=c}}return r.reduce(function(f,m){return m[0]===255&&m[1]===225?f.concat(m):f},[])}function qk(e,t){var n=ni(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var r=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+r));return new Uint8Array(o)}var Xk=At.ArrayBuffer,oi=At.FileReader,Kt=At.URL||At.webkitURL,Qk=/\.\w+$/,Zk=At.Compressor,Jk=function(){function e(t,n){Ik(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=Io(Io({},eg),n),this.aborted=!1,this.result=null,this.init()}return Dk(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!Lk(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!ri(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Kt||!oi){this.fail(new Error("The current browser does not support image compression."));return}Xk||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",l=s&&o.checkOrientation,c=s&&o.retainExif;if(Kt&&!l&&!c)this.load({url:Kt.createObjectURL(r)});else{var d=new oi;this.reader=d,d.onload=function(f){var m=f.target,h=m.result,p={},v=1;l&&(v=Gk(h),v>1&&Do(p,Uk(v))),c&&(n.exif=Kk(h)),l||c?!Kt||v>1?p.url=ng(h,a):p.url=Kt.createObjectURL(r):p.url=h,n.load(p)},d.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},d.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},d.onloadend=function(){n.reader=null},l||c?d.readAsArrayBuffer(r):d.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,o=this.file,a=this.image;a.onload=function(){r.draw(Io(Io({},n),{},{naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight}))},a.onabort=function(){r.fail(new Error("Aborted to load the image."))},a.onerror=function(){r.fail(new Error("Failed to load the image."))},At.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(At.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=o.name,a.src=n.url}},{key:"draw",value:function(n){var r=this,o=n.naturalWidth,a=n.naturalHeight,s=n.rotate,l=s===void 0?0:s,c=n.scaleX,d=c===void 0?1:c,f=n.scaleY,m=f===void 0?1:f,h=this.file,p=this.image,v=this.options,g=document.createElement("canvas"),b=g.getContext("2d"),y=Math.abs(l)%180===90,w=(v.resize==="contain"||v.resize==="cover")&&Oo(v.width)&&Oo(v.height),x=Math.max(v.maxWidth,0)||1/0,S=Math.max(v.maxHeight,0)||1/0,k=Math.max(v.minWidth,0)||0,j=Math.max(v.minHeight,0)||0,E=o/a,P=v.width,_=v.height;if(y){var $=[S,x];x=$[0],S=$[1];var H=[j,k];k=H[0],j=H[1];var z=[_,P];P=z[0],_=z[1]}w&&(E=P/_);var ee=nr({aspectRatio:E,width:x,height:S},"contain");x=ee.width,S=ee.height;var K=nr({aspectRatio:E,width:k,height:j},"cover");if(k=K.width,j=K.height,w){var te=nr({aspectRatio:E,width:P,height:_},v.resize);P=te.width,_=te.height}else{var W=nr({aspectRatio:E,width:P,height:_}),q=W.width;P=q===void 0?o:q;var I=W.height;_=I===void 0?a:I}P=Math.floor(rg(Math.min(Math.max(P,k),x))),_=Math.floor(rg(Math.min(Math.max(_,j),S)));var O=-P/2,M=-_/2,U=P,T=_,D=[];if(w){var L=0,F=0,J=o,A=a,Y=nr({aspectRatio:E,width:o,height:a},{contain:"cover",cover:"contain"}[v.resize]);J=Y.width,A=Y.height,L=(o-J)/2,F=(a-A)/2,D.push(L,F,J,A)}if(D.push(O,M,U,T),y){var X=[_,P];P=X[0],_=X[1]}g.width=P,g.height=_,ri(v.mimeType)||(v.mimeType=h.type);var ne="transparent";h.size>v.convertSize&&v.convertTypes.indexOf(v.mimeType)>=0&&(v.mimeType="image/jpeg");var oe=v.mimeType==="image/jpeg";if(oe&&(ne="#fff"),b.fillStyle=ne,b.fillRect(0,0,P,_),v.beforeDraw&&v.beforeDraw.call(this,b,g),!this.aborted&&(b.save(),b.translate(P/2,_/2),b.rotate(l*Math.PI/180),b.scale(d,m),b.drawImage.apply(b,[p].concat(D)),b.restore(),v.drew&&v.drew.call(this,b,g),!this.aborted)){var ie=function(we){if(!r.aborted){var Be=function(Te){return r.done({naturalWidth:o,naturalHeight:a,result:Te})};if(we&&oe&&v.retainExif&&r.exif&&r.exif.length>0){var $e=function(Te){return Be(Jh(ng(qk(Te,r.exif),v.mimeType)))};if(we.arrayBuffer)we.arrayBuffer().then($e).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Ee=new oi;r.reader=Ee,Ee.onload=function(ze){var Te=ze.target;$e(Te.result)},Ee.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},Ee.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},Ee.onloadend=function(){r.reader=null},Ee.readAsArrayBuffer(we)}}else Be(we)}};g.toBlob?g.toBlob(ie,v.mimeType,v.quality):ie(Jh(g.toDataURL(v.mimeType,v.quality)))}}},{key:"done",value:function(n){var r=n.naturalWidth,o=n.naturalHeight,a=n.result,s=this.file,l=this.image,c=this.options;if(Kt&&l.src.indexOf("blob:")===0&&Kt.revokeObjectURL(l.src),a)if(c.strict&&!c.retainExif&&a.size>s.size&&c.mimeType===s.type&&!(c.width>r||c.height>o||c.minWidth>r||c.minHeight>o||c.maxWidth<r||c.maxHeight<o))a=s;else{var d=new Date;a.lastModified=d.getTime(),a.lastModifiedDate=d,a.name=s.name,a.name&&a.type!==s.type&&(a.name=a.name.replace(Qk,Vk(a.type)))}else a=s;this.result=a,c.success&&c.success.call(this,a)}},{key:"fail",value:function(n){var r=this.options;if(r.error)r.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=Zk,e}},{key:"setDefaults",value:function(n){Do(eg,n)}}]),e}();const eP=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new Jk(n,r??{quality:.8,maxWidth:2e3,maxHeight:2e3,mimeType:"image/jpeg",success(s){o(s)},error(s){a(s)}})}),formatFileSize:n=>{var r=n===0?0:Math.floor(Math.log(n)/Math.log(1024));return+(n/Math.pow(1024,r)).toFixed(2)*1+" "+["B","kB","MB","GB","TB"][r]}}),tP=function(e,t){const[n,r]=C.useState(!1);function o({key:s}){s===e&&r(!0)}const a=({key:s})=>{s===e&&r(!1)};return C.useEffect(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)})),C.useEffect(()=>{n&&(t==null||t(n))},[n]),n};function nP(e,t){const[n,r]=C.useState(()=>{try{const s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.error(s),t}});return[n,s=>{try{const l=s instanceof Function?s(n):s;r(l),window.localStorage.setItem(e,JSON.stringify(l))}catch(l){console.error(l)}},()=>{try{r(t),window.localStorage.removeItem(e)}catch(s){console.error(s)}}]}function rP(e){const[t,n]=C.useState(!1);return C.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const ai=768;function oP(){const[e,t]=u.useState(void 0);return u.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ai-1}px)`),r=()=>{t(window.innerWidth<ai)};return n.addEventListener("change",r),t(window.innerWidth<ai),()=>n.removeEventListener("change",r)},[]),!!e}const aP=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return C.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}},si=e=>{const{currentPage:t,totalPages:n,totalItems:r,startIndex:o,endIndex:a,onPageChange:s,onPreviousPage:l,onNextPage:c,showItemsCounter:d=!0,counterText:f="Showing {{startIndex}} to {{endIndex}} of {{totalItems}} results"}=e,m=()=>{const h=[];if(n<=7)for(let v=1;v<=n;v++)h.push(v);else{h.push(1),t>4&&h.push("...");const v=Math.max(2,t-1),g=Math.min(n-1,t+1);for(let b=v;b<=g;b++)b!==1&&b!==n&&h.push(b);t<n-3&&h.push("..."),n>1&&h.push(n)}return h};return n<=1?null:i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[d?i.jsx("div",{className:"text-sm text-muted-foreground",children:el(f,{startIndex:o+1,endIndex:a,totalItems:r})}):null,i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:l,disabled:t===1,className:"h-8 w-8 p-0",children:i.jsx(gr,{className:"h-4 w-4"})}),m().map((h,p)=>i.jsx(C.Fragment,{children:h==="..."?i.jsx("span",{className:"px-2 text-muted-foreground",children:"..."}):i.jsx(fe,{variant:t===h?"default":"outline",size:"sm",onClick:()=>s(h),className:"h-8 w-8 p-0",children:h})},p)),i.jsx(fe,{variant:"outline",size:"sm",onClick:c,disabled:t===n,className:"h-8 w-8 p-0",children:i.jsx(_n,{className:"h-4 w-4"})})]})]})};function sP({data:e,columns:t,searchFields:n,filters:r=[],pageSize:o=40,className:a="",loading:s=!1,tools:l,activeFilters:c={}},d){var Ee,ze,Te,rr,Rt,or,st,$o,Lo;const[f,m]=C.useState(""),[h,p]=C.useState(1),[v,g]=C.useState(c),[b,y]=C.useState({field:null,direction:null}),[w,x]=C.useState(new Set),[S,k]=C.useState(t),[j,E]=C.useState(0),P=Gh(f,1e3),_=(G,ae)=>String(G.id||G._id||`row-${ae}`),$=C.useMemo(()=>{let G=e.slice();if(P.trim()){const ae=P.toLowerCase();G=G.filter(ce=>n.some(ve=>{const Ae=ce[ve];return Ae==null?!1:String(Ae).toLowerCase().includes(ae)}))}if(Object.entries(v).forEach(([ae,ce])=>{ce&&ce!=="all"&&(G=G.filter(ve=>{const Ae=ve[ae];return String(Ae)===ce}))}),b.field&&b.direction){const{field:ae,direction:ce}=b;G.sort((ve,Ae)=>{const mt=ve[ae],it=Ae[ae];return mt==null&&it==null?0:mt==null?ce==="asc"?-1:1:it==null?ce==="asc"?1:-1:typeof mt=="string"&&typeof it=="string"?ce==="asc"?mt.localeCompare(it):it.localeCompare(mt):ce==="asc"?mt-it:it-mt})}return G},[e,n,P,v,b,j]),H=C.useMemo(()=>{const G=$.length,ae=Math.ceil(G/o),ce=(h-1)*o,ve=ce+o;return{currentData:$.slice(ce,ve),totalItems:G,totalPages:ae,startIndex:ce,endIndex:Math.min(ve,G)}},[$,h,o]);C.useEffect(()=>{p(1)},[P,v,b]);const z=C.useCallback(()=>$.filter((G,ae)=>{const ce=_(G,ae);return w.has(ce)}),[$,w]),ee=C.useCallback(()=>w.size,[w]),K=C.useCallback(G=>{x(new Set(G))},[]),te=C.useCallback(()=>$,[$]),W=C.useCallback(()=>{g({}),m(""),y({field:null,direction:null}),p(1)},[]),q=C.useCallback((G="table-export")=>{u1($,S,G)},[$,S]),I=C.useCallback(G=>{G>=1&&G<=H.totalPages&&p(G)},[H.totalPages]),O=C.useCallback(()=>{E(G=>G+1)},[]),M=C.useCallback((G,ae)=>{g(ce=>({...ce,[G]:ae}))},[]),U=C.useCallback(G=>{g(ae=>{const ce={...ae};return delete ce[G],ce})},[]),T=C.useCallback(()=>{W()},[W]),D=C.useCallback(G=>{y(ae=>ae.field===G?ae.direction==="asc"?{field:G,direction:"desc"}:ae.direction==="desc"?{field:null,direction:null}:{field:G,direction:"asc"}:{field:G,direction:"asc"})},[]),L=C.useCallback((G,ae)=>{k(ce=>ce.map(ve=>String(ve.key)===G?{...ve,hidden:!ae}:ve))},[]),F=C.useCallback(()=>{k(t)},[t]),J=C.useCallback(G=>{if(G){const ae=new Set;H.currentData.forEach((ce,ve)=>{const Ae=_(ce,ve);ae.add(Ae)}),x(ae)}else x(new Set)},[H.currentData]),A=C.useCallback((G,ae)=>{x(ce=>{const ve=new Set(ce);return ae?ve.add(G):ve.delete(G),ve})},[]),Y=C.useCallback(()=>{q()},[q]),X=C.useCallback(()=>{p(G=>Math.max(G-1,1))},[]),ne=C.useCallback(()=>{p(G=>Math.min(G+1,H.totalPages))},[H.totalPages]),oe=C.useCallback(G=>{I(G)},[I]),Ce=Object.values(v).filter(G=>G&&G!=="all").length>0||f.trim().length>0||b.field!==null,we=S.filter(G=>!G.hidden),Be=w.size,$e=C.useMemo(()=>H.currentData.length>0&&H.currentData.every((G,ae)=>{const ce=_(G,ae);return w.has(ce)}),[H.currentData,w]);return C.useImperativeHandle(d,()=>({getSelectedItems:z,clearSelection:()=>x(new Set),getSelectionCount:ee,selectItems:K,getFilteredData:te,resetFilters:W,exportData:q,goToPage:I,refresh:O}),[z,ee,K,te,W,q,I,O]),s?i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[i.jsx(Oe,{className:"h-10 w-full max-w-sm"}),r.map((G,ae)=>i.jsx(Oe,{className:"h-10 w-30"},ae)),i.jsx(Oe,{className:"h-10 w-32 ml-auto"})]}),i.jsx(c1,{columns:we.length+1,rows:o}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Oe,{className:"h-4 w-48"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Oe,{className:"h-8 w-20"}),i.jsx(Oe,{className:"h-8 w-8"}),i.jsx(Oe,{className:"h-8 w-8"}),i.jsx(Oe,{className:"h-8 w-8"}),i.jsx(Oe,{className:"h-8 w-20"})]})]})]}):i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[(Ee=l==null?void 0:l.search)!=null&&Ee.hide?null:i.jsx(t1,{placeholder:(ze=l==null?void 0:l.search)==null?void 0:ze.placeholder,value:f,onChange:m}),r.map(G=>i.jsx(JC,{filter:G,value:v[String(G.field)],onChange:ae=>M(String(G.field),ae)},String(G.field))),(Te=l==null?void 0:l.columnSelector)!=null&&Te.hide?i.jsx(SC,{columns:S,onToggleVisibility:L,onReset:F}):null,(rr=l==null?void 0:l.export)!=null&&rr.hide?i.jsxs(fe,{variant:"outline",onClick:Y,children:[i.jsx(uw,{className:"h-4 w-4 mr-2"}),((Rt=l==null?void 0:l.export)==null?void 0:Rt.label)??"Export CSV"]}):null,!((or=l==null?void 0:l.clearFilters)!=null&&or.hide)&&Ce&&i.jsxs(fe,{variant:"outline",onClick:T,children:[i.jsx(vt,{className:"h-4 w-4 mr-2"}),((st=l==null?void 0:l.clearFilters)==null?void 0:st.label)??"Clear All"]})]}),i.jsx(Cw,{searchTerm:f,activeFilters:v,sortState:b,filters:r,columns:S,onClearSearch:()=>m(""),onClearFilter:U,onClearSort:()=>y({field:null,direction:null})}),i.jsx(n1,{selectedCount:Be,onClearSelection:()=>x(new Set)}),i.jsx("div",{className:"rounded-md border",children:i.jsxs(mr,{children:[i.jsx(pr,{children:i.jsx(i1,{allowSelectAllRows:!(($o=l==null?void 0:l.rowSelector)!=null&&$o.hide),columns:S,sortState:b,allRowsSelected:$e,hasData:H.currentData.length>0,onSort:D,onToggleAllRows:J})}),i.jsx(hr,{children:H.currentData.length===0?i.jsx("tr",{children:i.jsx(nn,{colSpan:we.length+1,className:"h-24 text-center text-muted-foreground",children:Ce?"No results found for the current filters.":"No data available."})}):H.currentData.map((G,ae)=>{var ve;const ce=_(G,ae);return i.jsx(l1,{row:G,index:ae,allowSelection:!((ve=l==null?void 0:l.rowSelector)!=null&&ve.hide),columns:S,isSelected:w.has(ce),rowId:ce,onToggleSelection:A},ce)})})]})}),i.jsx(si,{currentPage:h,totalPages:H.totalPages,totalItems:H.totalItems,startIndex:H.startIndex,endIndex:H.endIndex,onPageChange:oe,onPreviousPage:X,onNextPage:ne,counterText:(Lo=l==null?void 0:l.pagination)==null?void 0:Lo.label})]})}const iP=C.forwardRef(sP),og=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return i.jsxs("div",{className:R("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||i.jsx(sw,{size:45}),i.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function lP(e){const{triggerElement:t,steps:n}=e,[r,o]=C.useState(!1),[a,s]=C.useState(0),l=()=>{s(d=>d<n.length-1?d+1:d)},c=()=>{s(d=>d>0?d-1:d)};return i.jsxs(po,{open:r,onOpenChange:o,children:[i.jsx(fm,{asChild:!0,children:t}),i.jsxs(Zn,{className:"sm:max-w-[425px]",children:[i.jsxs(ho,{className:R(n[a].title===""&&"sr-only"),children:[i.jsx(go,{children:n[a].title}),i.jsx(vo,{className:"sr-only",children:n[a].title})]}),i.jsx("div",{children:n[a].description}),i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:c,disabled:a===0,children:i.jsx(gr,{className:"h-4 w-4"})}),i.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>i.jsx("div",{className:R("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:l,disabled:a===n.length-1,children:i.jsx(_n,{className:"h-4 w-4"})})]})]})]})}const cP=e=>i.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),uP=e=>{const{execCommand:t}=e,n=()=>{const a=document.createElement("input");a.type="file",a.accept="image/*",a.onchange=async s=>{var c;const l=(c=s.target.files)==null?void 0:c[0];if(l){const d=new FileReader;d.onload=()=>{t("insertImage",d.result)},d.readAsDataURL(l)}},a.click()},r=()=>{const a=prompt("Enter the URL:");a&&t("createLink",a)},o=a=>{t("fontSize",a)};return i.jsxs("div",{className:"flex flex-wrap gap-2 border-b pb-2 mb-2",children:[i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("bold"),type:"button",children:i.jsx(nw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("italic"),type:"button",children:i.jsx(pw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("underline"),type:"button",children:i.jsx(xw,{size:16})}),i.jsxs(Ka,{onValueChange:a=>o(a),defaultValue:"3",children:[i.jsx(Qr,{className:"w-[100px]",children:i.jsx(qa,{placeholder:"Size"})}),i.jsxs(Zr,{children:[i.jsx(Pt,{value:"1",children:i.jsx("div",{children:"Small"})}),i.jsx(Pt,{value:"3",children:i.jsx("div",{children:"Medium"})}),i.jsx(Pt,{value:"5",children:i.jsx("div",{children:"Large"})}),i.jsx(Pt,{value:"7",children:i.jsx("div",{children:"Extra Large"})})]})]}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),type:"button",children:i.jsx(vw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),type:"button",children:i.jsx(gw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),type:"button",children:i.jsx(ww,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:n,type:"button",children:i.jsx(fw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:r,type:"button",children:i.jsx(hw,{size:16})})]})},dP=({initialValue:e="",onChange:t,className:n})=>{const r=C.useRef(null);C.useEffect(()=>{const s=new MutationObserver(()=>{t==null||t(r.current?r.current.innerHTML:"")});r.current&&s.observe(r.current,{childList:!0})},[]),C.useEffect(()=>{r.current&&(r.current.innerHTML=e)},[]);const o=()=>{r.current&&(t==null||t(r.current.innerHTML))},a=(s,l)=>{r.current&&(document.execCommand(s,!1,l),o())};return i.jsxs("div",{className:R("w-full p-4 border rounded-lg shadow-md",n),children:[i.jsx(uP,{execCommand:a}),i.jsx("div",{ref:r,contentEditable:!0,className:"w-full h-48 p-2 border rounded overflow-y-auto focus:outline-none min-h-20 resize-y unreset",onInput:o})]})},fP=e=>{const{observerOptions:t,images:n,classNames:r}=e,[o,a]=C.useState([]),s=C.useRef(null);return C.useEffect(()=>{const l={root:document.querySelector(".image-gallery"),rootMargin:"0px",threshold:1,...t};return s.current=new IntersectionObserver(c=>{c.forEach(d=>{if(d.isIntersecting&&d.target instanceof HTMLDivElement){const f=Number(d.target.dataset.index);a(m=>[...new Set([...m,f])])}})},l),()=>{var c;return(c=s.current)==null?void 0:c.disconnect()}},[]),C.useEffect(()=>{document.querySelectorAll(".image-cell").forEach(c=>{var d;return(d=s.current)==null?void 0:d.observe(c)})},[n]),i.jsx("div",{className:R("image-gallery overflow-auto grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))]","gap-2 justify-center h-full",r==null?void 0:r.imageGallery),children:n.map((l,c)=>i.jsx("div",{"data-index":c,className:R("image-cell w-full h-52",r==null?void 0:r.imageCell),children:o.includes(c)&&i.jsx("img",{src:l,alt:`Gallery Image ${c+1}`,className:R("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},c))})},mP=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=Uo,mode:a="month"}=e,s=l=>{let c=t,d=n;a==="month"?l==="prev"?c===0?(c=11,d--):c--:c===11?(c=0,d++):c++:d=l==="prev"?d-1:d+1,r(c,d)};return i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("prev"),"aria-label":`Previous ${a}`,children:i.jsx(Zb,{className:"!h-8 !w-8"})}),i.jsxs("div",{className:"text-center",children:[i.jsx("h2",{className:"text-2xl font-bold capitalize",children:a==="month"?o.localize.month(t,{width:"wide"}):n}),a==="month"&&i.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("next"),"aria-label":`Next ${a}`,children:i.jsx(Jb,{className:"!h-8 !w-8"})})]})},ag=({initIndex:e,onPageChange:t,totalItems:n,totalPages:r,pageTotalItems:o,currentPage:a,showItemsCounter:s=!0})=>i.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s&&i.jsxs("p",{children:[i.jsx("b",{children:e+1})," - ",i.jsx("b",{children:e+o})," (",n,")"]}),r>1&&i.jsx(si,{currentPage:a,onPageChange:t,totalPages:r,totalItems:n,startIndex:e,endIndex:e+o,onPreviousPage:()=>t(a-1),onNextPage:()=>t(a+1)})]}),pP=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=i.jsx(og,{notFoundText:"No item found!"}),isLoading:l=!1,showItemsCounter:c=!0,loadingVariant:d="loader"}=e,[f,m]=C.useState(t);C.useEffect(()=>{m(t),p(1)},[t]);const[h,p]=C.useState(r),v=Math.ceil(f.length/n),g=(h-1)*n,b=h*n,y=f.slice(g,b),w=l?i.jsx("section",{className:"w-full",children:d==="loader"?i.jsx(Yp,{size:"lg"}):i.jsx(Oe,{className:"h-12 w-full",repeat:n})}):f.length===0?s:void 0;return i.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[i.jsx(ag,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:v,currentPage:h,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c}),w?i.jsx("section",{className:"w-full",children:w}):i.jsx("section",{className:`w-full ${a}`,children:y.map((x,S)=>i.jsx(C.Fragment,{children:o(x,S)},x.id))}),i.jsx(ag,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:v,currentPage:h,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c})]})},hP=({fixed:e,isOpen:t,onToggle:n,children:r,className:o})=>{const[a,s]=C.useState(!0),l=C.useRef(null),c=C.useRef(null),d=t!==void 0?t:a,f=()=>{var h;e||(n?n(!1):s(!1),(h=c.current)==null||h.focus())},m=h=>{l.current&&!l.current.contains(h.target)&&!e&&f()};return C.useEffect(()=>{if(!e)return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[e]),i.jsxs(i.Fragment,{children:[i.jsx("aside",{ref:l,className:R("bg-white z-50 h-full shadow-md flex flex-col fixed top-0 left-0 transition-all duration-300 ease-in-out overflow-auto",{"w-72":e||d},{"w-0":!d&&!e},{"translate-x-0":d},{"-translate-x-full":!d&&!e},o),"aria-hidden":!d,children:r}),e&&i.jsx("div",{className:"w-72 relative"})]})},gP=({children:e,className:t})=>i.jsx("header",{className:R("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),vP=({children:e,className:t})=>i.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),bP=({children:e,className:t})=>i.jsx("ul",{className:R("flex flex-col gap-2 my-4 px-4",t),children:e}),wP=({children:e,className:t,onClick:n})=>i.jsx("li",{className:R("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),yP=({children:e,className:t})=>i.jsx("footer",{className:R("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e});N.Accordion=M1,N.AccordionContent=Bd,N.AccordionItem=Ld,N.AccordionTrigger=Fd,N.AdaptiveInput=ao,N.AlertDialog=J1,N.AlertDialogAction=_f,N.AlertDialogCancel=Af,N.AlertDialogContent=kf,N.AlertDialogDescription=jf,N.AlertDialogFooter=Tf,N.AlertDialogHeader=Pf,N.AlertDialogOverlay=ps,N.AlertDialogPortal=Ef,N.AlertDialogTitle=Mf,N.AlertDialogTrigger=eN,N.Autocomplete=tN,N.Avatar=Uf,N.AvatarFallback=Kf,N.AvatarImage=Yf,N.Badge=on,N.BentoCard=Lb,N.BentoGrid=$b,N.Button=fe,N.Calendar=BN,N.Card=qf,N.CardContent=Jf,N.CardDescription=Zf,N.CardFooter=em,N.CardHeader=Xf,N.CardTitle=Qf,N.Checkbox=eo,N.Command=bo,N.CommandDialog=fS,N.CommandEmpty=Ps,N.CommandGroup=wo,N.CommandInput=Es,N.CommandItem=wn,N.CommandList=ks,N.CommandSeparator=Ts,N.CommandShortcut=hm,N.CurrencyInput=gm,N.DataTable=iP,N.Dialog=po,N.DialogClose=dS,N.DialogContent=Zn,N.DialogDescription=vo,N.DialogFooter=pm,N.DialogHeader=ho,N.DialogOverlay=Ss,N.DialogPortal=mm,N.DialogProvider=jk,N.DialogTitle=go,N.DialogTrigger=fm,N.DropdownMenu=wu,N.DropdownMenuCheckboxItem=Ba,N.DropdownMenuContent=Fa,N.DropdownMenuGroup=yC,N.DropdownMenuItem=Nu,N.DropdownMenuLabel=za,N.DropdownMenuPortal=xC,N.DropdownMenuRadioGroup=NC,N.DropdownMenuRadioItem=Su,N.DropdownMenuSeparator=Ur,N.DropdownMenuShortcut=Eu,N.DropdownMenuSub=CC,N.DropdownMenuSubContent=Cu,N.DropdownMenuSubTrigger=xu,N.DropdownMenuTrigger=yu,N.EmptyItems=og,N.HelpCarousel=lP,N.HtmlTextArea=cP,N.HtmlTextEditor=dP,N.Input=qn,N.Label=wm,N.LazyImageGallery=fP,N.MonthNavigator=mP,N.MultiSelect=Lm,N.NavigationMenu=dp,N.NavigationMenuContent=hp,N.NavigationMenuIndicator=gp,N.NavigationMenuItem=qS,N.NavigationMenuLink=XS,N.NavigationMenuList=fp,N.NavigationMenuTrigger=pp,N.NavigationMenuViewport=Vs,N.PaginatedItems=pP,N.Pagination=vp,N.PaginationContent=bp,N.PaginationControls=si,N.PaginationEllipsis=Cp,N.PaginationItem=wp,N.PaginationLink=So,N.PaginationNext=xp,N.PaginationPrevious=yp,N.PasswordInput=oE,N.Popover=Am,N.PopoverAnchor=TS,N.PopoverContent=js,N.PopoverTrigger=Rm,N.Progress=Gs,N.RadioGroup=Hp,N.RadioGroupItem=Gp,N.Select=Ka,N.SelectContent=Zr,N.SelectGroup=ZC,N.SelectItem=Pt,N.SelectLabel=dd,N.SelectScrollDownButton=Qa,N.SelectScrollUpButton=Xa,N.SelectSeparator=fd,N.SelectTrigger=Qr,N.SelectValue=qa,N.Separator=xo,N.Sidebar=hP,N.SidebarFooter=yP,N.SidebarHeader=gP,N.SidebarList=bP,N.SidebarListItem=wP,N.SidebarNav=vP,N.Skeleton=Oe,N.Spinner=Yp,N.Switch=eh,N.Table=mr,N.TableBody=hr,N.TableCaption=il,N.TableCell=nn,N.TableFooter=sl,N.TableHead=Mn,N.TableHeader=pr,N.TableRow=tn,N.Tabs=EE,N.TabsContent=gh,N.TabsList=ph,N.TabsTrigger=hh,N.Textarea=vh,N.Toaster=ek,N.Toggle=Ch,N.ToggleGroup=Rh,N.ToggleGroupItem=Ih,N.Tooltip=kk,N.TooltipContent=Hh,N.TooltipProvider=Ek,N.TooltipTrigger=Pk,N.badgeVariants=pl,N.buttonVariants=fr,N.capitalize=Ob,N.cn=R,N.containSearchStrings=Ji,N.formatCurrency=vb,N.formatDateAndMonth=kb,N.formatDateAndTime=xb,N.formatDateAndWeekday=Sb,N.formatDateAndWeekdayAndYear=Eb,N.formatDateDayMonth=yb,N.formatDateMonthYear=wb,N.formatDateUTC=bb,N.formatLongDate=Pb,N.formatShortDate=Tb,N.formatWeekDayAndShortDate=jb,N.getLongDate=Nb,N.getMonthName=Cb,N.getMonthYearFromISODate=Mb,N.mergeObjects=ea,N.navigationMenuTriggerStyle=mp,N.normalizeString=Re,N.normalizeStringToCompare=ta,N.padString=Jo,N.replaceTemplateWithVariables=el,N.sortByField=Rb,N.sortByFieldDesc=Ib,N.sortByName=Ab,N.sortByNestedField=Db,N.sortNormalize=_b,N.spinnerColors=hE,N.spinnerSizes=gE,N.toast=JE,N.toggleVariants=Xs,N.useArray=Tk,N.useCopyToClipboard=Mk,N.useDebounce=Gh,N.useDialog=_k,N.useDisclosure=Ak,N.useDisclosureBool=Rk,N.useFileUtilities=eP,N.useIsMobile=oP,N.useKeyPress=tP,N.useLocalStorage=nP,N.useMediaQuery=rP,N.usePWAInstall=aP,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
293
|
+
*/function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zh(Object(n),!0).forEach(function(r){Bk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eg(r.key),r)}}function Fk(e,t,n){return t&&Jh(e.prototype,t),n&&Jh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bk(e,t,n){return t=eg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}function zk(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function eg(e){var t=zk(e,"string");return typeof t=="symbol"?t:String(t)}var tg={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,r=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=r&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),a=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,s=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,l=(r||a)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(c){var d,f,m,h,p,v,g,b,y;if(d=c.match(s),!d)throw new Error("invalid data URI");for(f=d[2]?d[1]:"text/plain"+(d[3]||";charset=US-ASCII"),m=!!d[4],h=c.slice(d[0].length),m?p=atob(h):p=decodeURIComponent(h),v=new ArrayBuffer(p.length),g=new Uint8Array(v),b=0;b<p.length;b+=1)g[b]=p.charCodeAt(b);return r?new Blob([o?g:v],{type:f}):(y=new a,y.append(v),y.getBlob(f))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(c,d,f){var m=this;setTimeout(function(){f&&n.toDataURL&&l?c(l(m.toDataURL(d,f))):c(m.mozGetAsFile("blob",d))})}:n.toDataURL&&l&&(n.msToBlob?n.toBlob=function(c,d,f){var m=this;setTimeout(function(){(d&&d!=="image/png"||f)&&n.toDataURL&&l?c(l(m.toDataURL(d,f))):c(m.msToBlob(d))})}:n.toBlob=function(c,d,f){var m=this;setTimeout(function(){c(l(m.toDataURL(d,f)))})})),e.exports?e.exports=l:t.dataURLtoBlob=l}(window)})(tg);var ng=tg.exports,Vk=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},rg={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},Wk=typeof window<"u"&&typeof window.document<"u",Rt=Wk?window:{},Oo=function(t){return t>0&&t<1/0},Hk=Array.prototype.slice;function ni(e){return Array.from?Array.from(e):Hk.call(e)}var Gk=/^image\/.+$/;function ri(e){return Gk.test(e)}function Uk(e){var t=ri(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var og=String.fromCharCode;function Yk(e,t,n){var r="",o;for(n+=t,o=t;o<n;o+=1)r+=og(e.getUint8(o));return r}var Kk=Rt.btoa;function ag(e,t){for(var n=[],r=8192,o=new Uint8Array(e);o.length>0;)n.push(og.apply(null,ni(o.subarray(0,r)))),o=o.subarray(r);return"data:".concat(t,";base64,").concat(Kk(n.join("")))}function qk(e){var t=new DataView(e),n;try{var r,o,a;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var s=t.byteLength,l=2;l+1<s;){if(t.getUint8(l)===255&&t.getUint8(l+1)===225){o=l;break}l+=1}if(o){var c=o+4,d=o+10;if(Yk(t,c,4)==="Exif"){var f=t.getUint16(d);if(r=f===18761,(r||f===19789)&&t.getUint16(d+2,r)===42){var m=t.getUint32(d+4,r);m>=8&&(a=d+m)}}}if(a){var h=t.getUint16(a,r),p,v;for(v=0;v<h;v+=1)if(p=a+v*12+2,t.getUint16(p,r)===274){p+=8,n=t.getUint16(p,r),t.setUint16(p,1,r);break}}}catch{n=1}return n}function Xk(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:r}}var Qk=/\.\d*(?:0|9){12}\d*$/;function sg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Qk.test(e)?Math.round(e*t)/t:e}function nr(e){var t=e.aspectRatio,n=e.height,r=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",a=Oo(r),s=Oo(n);if(a&&s){var l=n*t;(o==="contain"||o==="none")&&l>r||o==="cover"&&l<r?n=r/t:r=n*t}else a?n=r/t:s&&(r=n*t);return{width:r,height:n}}function Zk(e){for(var t=ni(new Uint8Array(e)),n=t.length,r=[],o=0;o+3<n;){var a=t[o],s=t[o+1];if(a===255&&s===218)break;if(a===255&&s===216)o+=2;else{var l=t[o+2]*256+t[o+3],c=o+l+2,d=t.slice(o,c);r.push(d),o=c}}return r.reduce(function(f,m){return m[0]===255&&m[1]===225?f.concat(m):f},[])}function Jk(e,t){var n=ni(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var r=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+r));return new Uint8Array(o)}var eP=Rt.ArrayBuffer,oi=Rt.FileReader,Kt=Rt.URL||Rt.webkitURL,tP=/\.\w+$/,nP=Rt.Compressor,rP=function(){function e(t,n){Lk(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=Io(Io({},rg),n),this.aborted=!1,this.result=null,this.init()}return Fk(e,[{key:"init",value:function(){var n=this,r=this.file,o=this.options;if(!Vk(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var a=r.type;if(!ri(a)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Kt||!oi){this.fail(new Error("The current browser does not support image compression."));return}eP||(o.checkOrientation=!1,o.retainExif=!1);var s=a==="image/jpeg",l=s&&o.checkOrientation,c=s&&o.retainExif;if(Kt&&!l&&!c)this.load({url:Kt.createObjectURL(r)});else{var d=new oi;this.reader=d,d.onload=function(f){var m=f.target,h=m.result,p={},v=1;l&&(v=qk(h),v>1&&Do(p,Xk(v))),c&&(n.exif=Zk(h)),l||c?!Kt||v>1?p.url=ag(h,a):p.url=Kt.createObjectURL(r):p.url=h,n.load(p)},d.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},d.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},d.onloadend=function(){n.reader=null},l||c?d.readAsArrayBuffer(r):d.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,o=this.file,a=this.image;a.onload=function(){r.draw(Io(Io({},n),{},{naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight}))},a.onabort=function(){r.fail(new Error("Aborted to load the image."))},a.onerror=function(){r.fail(new Error("Failed to load the image."))},Rt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Rt.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=o.name,a.src=n.url}},{key:"draw",value:function(n){var r=this,o=n.naturalWidth,a=n.naturalHeight,s=n.rotate,l=s===void 0?0:s,c=n.scaleX,d=c===void 0?1:c,f=n.scaleY,m=f===void 0?1:f,h=this.file,p=this.image,v=this.options,g=document.createElement("canvas"),b=g.getContext("2d"),y=Math.abs(l)%180===90,w=(v.resize==="contain"||v.resize==="cover")&&Oo(v.width)&&Oo(v.height),x=Math.max(v.maxWidth,0)||1/0,S=Math.max(v.maxHeight,0)||1/0,k=Math.max(v.minWidth,0)||0,j=Math.max(v.minHeight,0)||0,E=o/a,P=v.width,_=v.height;if(y){var $=[S,x];x=$[0],S=$[1];var H=[j,k];k=H[0],j=H[1];var z=[_,P];P=z[0],_=z[1]}w&&(E=P/_);var ee=nr({aspectRatio:E,width:x,height:S},"contain");x=ee.width,S=ee.height;var K=nr({aspectRatio:E,width:k,height:j},"cover");if(k=K.width,j=K.height,w){var te=nr({aspectRatio:E,width:P,height:_},v.resize);P=te.width,_=te.height}else{var W=nr({aspectRatio:E,width:P,height:_}),q=W.width;P=q===void 0?o:q;var I=W.height;_=I===void 0?a:I}P=Math.floor(sg(Math.min(Math.max(P,k),x))),_=Math.floor(sg(Math.min(Math.max(_,j),S)));var O=-P/2,M=-_/2,U=P,T=_,D=[];if(w){var L=0,F=0,J=o,A=a,Y=nr({aspectRatio:E,width:o,height:a},{contain:"cover",cover:"contain"}[v.resize]);J=Y.width,A=Y.height,L=(o-J)/2,F=(a-A)/2,D.push(L,F,J,A)}if(D.push(O,M,U,T),y){var X=[_,P];P=X[0],_=X[1]}g.width=P,g.height=_,ri(v.mimeType)||(v.mimeType=h.type);var ne="transparent";h.size>v.convertSize&&v.convertTypes.indexOf(v.mimeType)>=0&&(v.mimeType="image/jpeg");var oe=v.mimeType==="image/jpeg";if(oe&&(ne="#fff"),b.fillStyle=ne,b.fillRect(0,0,P,_),v.beforeDraw&&v.beforeDraw.call(this,b,g),!this.aborted&&(b.save(),b.translate(P/2,_/2),b.rotate(l*Math.PI/180),b.scale(d,m),b.drawImage.apply(b,[p].concat(D)),b.restore(),v.drew&&v.drew.call(this,b,g),!this.aborted)){var ie=function(we){if(!r.aborted){var Be=function(Te){return r.done({naturalWidth:o,naturalHeight:a,result:Te})};if(we&&oe&&v.retainExif&&r.exif&&r.exif.length>0){var $e=function(Te){return Be(ng(ag(Jk(Te,r.exif),v.mimeType)))};if(we.arrayBuffer)we.arrayBuffer().then($e).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Ee=new oi;r.reader=Ee,Ee.onload=function(ze){var Te=ze.target;$e(Te.result)},Ee.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},Ee.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},Ee.onloadend=function(){r.reader=null},Ee.readAsArrayBuffer(we)}}else Be(we)}};g.toBlob?g.toBlob(ie,v.mimeType,v.quality):ie(ng(g.toDataURL(v.mimeType,v.quality)))}}},{key:"done",value:function(n){var r=n.naturalWidth,o=n.naturalHeight,a=n.result,s=this.file,l=this.image,c=this.options;if(Kt&&l.src.indexOf("blob:")===0&&Kt.revokeObjectURL(l.src),a)if(c.strict&&!c.retainExif&&a.size>s.size&&c.mimeType===s.type&&!(c.width>r||c.height>o||c.minWidth>r||c.minHeight>o||c.maxWidth<r||c.maxHeight<o))a=s;else{var d=new Date;a.lastModified=d.getTime(),a.lastModifiedDate=d,a.name=s.name,a.name&&a.type!==s.type&&(a.name=a.name.replace(tP,Uk(a.type)))}else a=s;this.result=a,c.success&&c.success.call(this,a)}},{key:"fail",value:function(n){var r=this.options;if(r.error)r.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=nP,e}},{key:"setDefaults",value:function(n){Do(rg,n)}}]),e}();const oP=()=>({compressImage:async(n,r)=>await new Promise((o,a)=>{new rP(n,r??{quality:.8,maxWidth:2e3,maxHeight:2e3,mimeType:"image/jpeg",success(s){o(s)},error(s){a(s)}})}),formatFileSize:n=>{var r=n===0?0:Math.floor(Math.log(n)/Math.log(1024));return+(n/Math.pow(1024,r)).toFixed(2)*1+" "+["B","kB","MB","GB","TB"][r]}}),aP=function(e,t){const[n,r]=C.useState(!1);function o({key:s}){s===e&&r(!0)}const a=({key:s})=>{s===e&&r(!1)};return C.useEffect(()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)})),C.useEffect(()=>{n&&(t==null||t(n))},[n]),n};function sP(e,t){const[n,r]=C.useState(()=>{try{const s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.error(s),t}});return[n,s=>{try{const l=s instanceof Function?s(n):s;r(l),window.localStorage.setItem(e,JSON.stringify(l))}catch(l){console.error(l)}},()=>{try{r(t),window.localStorage.removeItem(e)}catch(s){console.error(s)}}]}function iP(e){const[t,n]=C.useState(!1);return C.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const ai=768;function lP(){const[e,t]=u.useState(void 0);return u.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ai-1}px)`),r=()=>{t(window.innerWidth<ai)};return n.addEventListener("change",r),t(window.innerWidth<ai),()=>n.removeEventListener("change",r)},[]),!!e}const cP=()=>{const[e,t]=C.useState(null),[n,r]=C.useState(!1);return C.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}},si=e=>{const{currentPage:t,totalPages:n,totalItems:r,startIndex:o,endIndex:a,onPageChange:s,onPreviousPage:l,onNextPage:c,showItemsCounter:d=!0,counterText:f="Showing {{startIndex}} to {{endIndex}} of {{totalItems}} results"}=e,m=()=>{const h=[];if(n<=7)for(let v=1;v<=n;v++)h.push(v);else{h.push(1),t>4&&h.push("...");const v=Math.max(2,t-1),g=Math.min(n-1,t+1);for(let b=v;b<=g;b++)b!==1&&b!==n&&h.push(b);t<n-3&&h.push("..."),n>1&&h.push(n)}return h};return n<=1?null:i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[d?i.jsx("div",{className:"text-sm text-muted-foreground",children:el(f,{startIndex:o+1,endIndex:a,totalItems:r})}):null,i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:l,disabled:t===1,className:"h-8 w-8 p-0",children:i.jsx(gr,{className:"h-4 w-4"})}),m().map((h,p)=>i.jsx(C.Fragment,{children:h==="..."?i.jsx("span",{className:"px-2 text-muted-foreground",children:"..."}):i.jsx(fe,{variant:t===h?"default":"outline",size:"sm",onClick:()=>s(h),className:"h-8 w-8 p-0",children:h})},p)),i.jsx(fe,{variant:"outline",size:"sm",onClick:c,disabled:t===n,className:"h-8 w-8 p-0",children:i.jsx(_n,{className:"h-4 w-4"})})]})]})};function uP({data:e,columns:t,searchFields:n,filters:r=[],pageSize:o=40,className:a="",loading:s=!1,tools:l,activeFilters:c={}},d){var Ee,ze,Te,rr,It,or,st,$o,Lo;const[f,m]=C.useState(""),[h,p]=C.useState(1),[v,g]=C.useState(c),[b,y]=C.useState({field:null,direction:null}),[w,x]=C.useState(new Set),[S,k]=C.useState(t),[j,E]=C.useState(0),P=Kh(f,1e3),_=(G,ae)=>String(G.id||G._id||`row-${ae}`),$=C.useMemo(()=>{let G=e.slice();if(P.trim()){const ae=P.toLowerCase();G=G.filter(ce=>n.some(ve=>{const Ae=ce[ve];return Ae==null?!1:String(Ae).toLowerCase().includes(ae)}))}if(Object.entries(v).forEach(([ae,ce])=>{ce&&ce!=="all"&&(G=G.filter(ve=>{const Ae=ve[ae];return String(Ae)===ce}))}),b.field&&b.direction){const{field:ae,direction:ce}=b;G.sort((ve,Ae)=>{const mt=ve[ae],it=Ae[ae];return mt==null&&it==null?0:mt==null?ce==="asc"?-1:1:it==null?ce==="asc"?1:-1:typeof mt=="string"&&typeof it=="string"?ce==="asc"?mt.localeCompare(it):it.localeCompare(mt):ce==="asc"?mt-it:it-mt})}return G},[e,n,P,v,b,j]),H=C.useMemo(()=>{const G=$.length,ae=Math.ceil(G/o),ce=(h-1)*o,ve=ce+o;return{currentData:$.slice(ce,ve),totalItems:G,totalPages:ae,startIndex:ce,endIndex:Math.min(ve,G)}},[$,h,o]);C.useEffect(()=>{p(1)},[P,v,b]);const z=C.useCallback(()=>$.filter((G,ae)=>{const ce=_(G,ae);return w.has(ce)}),[$,w]),ee=C.useCallback(()=>w.size,[w]),K=C.useCallback(G=>{x(new Set(G))},[]),te=C.useCallback(()=>$,[$]),W=C.useCallback(()=>{g({}),m(""),y({field:null,direction:null}),p(1)},[]),q=C.useCallback((G="table-export")=>{m1($,S,G)},[$,S]),I=C.useCallback(G=>{G>=1&&G<=H.totalPages&&p(G)},[H.totalPages]),O=C.useCallback(()=>{E(G=>G+1)},[]),M=C.useCallback((G,ae)=>{g(ce=>({...ce,[G]:ae}))},[]),U=C.useCallback(G=>{g(ae=>{const ce={...ae};return delete ce[G],ce})},[]),T=C.useCallback(()=>{W()},[W]),D=C.useCallback(G=>{y(ae=>ae.field===G?ae.direction==="asc"?{field:G,direction:"desc"}:ae.direction==="desc"?{field:null,direction:null}:{field:G,direction:"asc"}:{field:G,direction:"asc"})},[]),L=C.useCallback((G,ae)=>{k(ce=>ce.map(ve=>String(ve.key)===G?{...ve,hidden:!ae}:ve))},[]),F=C.useCallback(()=>{k(t)},[t]),J=C.useCallback(G=>{if(G){const ae=new Set;H.currentData.forEach((ce,ve)=>{const Ae=_(ce,ve);ae.add(Ae)}),x(ae)}else x(new Set)},[H.currentData]),A=C.useCallback((G,ae)=>{x(ce=>{const ve=new Set(ce);return ae?ve.add(G):ve.delete(G),ve})},[]),Y=C.useCallback(()=>{q()},[q]),X=C.useCallback(()=>{p(G=>Math.max(G-1,1))},[]),ne=C.useCallback(()=>{p(G=>Math.min(G+1,H.totalPages))},[H.totalPages]),oe=C.useCallback(G=>{I(G)},[I]),Ce=Object.values(v).filter(G=>G&&G!=="all").length>0||f.trim().length>0||b.field!==null,we=S.filter(G=>!G.hidden),Be=w.size,$e=C.useMemo(()=>H.currentData.length>0&&H.currentData.every((G,ae)=>{const ce=_(G,ae);return w.has(ce)}),[H.currentData,w]);return C.useImperativeHandle(d,()=>({getSelectedItems:z,clearSelection:()=>x(new Set),getSelectionCount:ee,selectItems:K,getFilteredData:te,resetFilters:W,exportData:q,goToPage:I,refresh:O}),[z,ee,K,te,W,q,I,O]),s?i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[i.jsx(Oe,{className:"h-10 w-full max-w-sm"}),r.map((G,ae)=>i.jsx(Oe,{className:"h-10 w-30"},ae)),i.jsx(Oe,{className:"h-10 w-32 ml-auto"})]}),i.jsx(f1,{columns:we.length+1,rows:o}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Oe,{className:"h-4 w-48"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Oe,{className:"h-8 w-20"}),i.jsx(Oe,{className:"h-8 w-8"}),i.jsx(Oe,{className:"h-8 w-8"}),i.jsx(Oe,{className:"h-8 w-8"}),i.jsx(Oe,{className:"h-8 w-20"})]})]})]}):i.jsxs("div",{className:`space-y-4 ${a}`,children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[(Ee=l==null?void 0:l.search)!=null&&Ee.hide?null:i.jsx(o1,{placeholder:(ze=l==null?void 0:l.search)==null?void 0:ze.placeholder,value:f,onChange:m}),r.map(G=>i.jsx(n1,{filter:G,value:v[String(G.field)],onChange:ae=>M(String(G.field),ae)},String(G.field))),(Te=l==null?void 0:l.columnSelector)!=null&&Te.hide?i.jsx(PC,{columns:S,onToggleVisibility:L,onReset:F}):null,(rr=l==null?void 0:l.export)!=null&&rr.hide?i.jsxs(fe,{variant:"outline",onClick:Y,children:[i.jsx(mw,{className:"h-4 w-4 mr-2"}),((It=l==null?void 0:l.export)==null?void 0:It.label)??"Export CSV"]}):null,!((or=l==null?void 0:l.clearFilters)!=null&&or.hide)&&Ce&&i.jsxs(fe,{variant:"outline",onClick:T,children:[i.jsx(vt,{className:"h-4 w-4 mr-2"}),((st=l==null?void 0:l.clearFilters)==null?void 0:st.label)??"Clear All"]})]}),i.jsx(Ew,{searchTerm:f,activeFilters:v,sortState:b,filters:r,columns:S,onClearSearch:()=>m(""),onClearFilter:U,onClearSort:()=>y({field:null,direction:null})}),i.jsx(a1,{selectedCount:Be,onClearSelection:()=>x(new Set)}),i.jsx("div",{className:"rounded-md border",children:i.jsxs(mr,{children:[i.jsx(pr,{children:i.jsx(u1,{allowSelectAllRows:!(($o=l==null?void 0:l.rowSelector)!=null&&$o.hide),columns:S,sortState:b,allRowsSelected:$e,hasData:H.currentData.length>0,onSort:D,onToggleAllRows:J})}),i.jsx(hr,{children:H.currentData.length===0?i.jsx("tr",{children:i.jsx(nn,{colSpan:we.length+1,className:"h-24 text-center text-muted-foreground",children:Ce?"No results found for the current filters.":"No data available."})}):H.currentData.map((G,ae)=>{var ve;const ce=_(G,ae);return i.jsx(d1,{row:G,index:ae,allowSelection:!((ve=l==null?void 0:l.rowSelector)!=null&&ve.hide),columns:S,isSelected:w.has(ce),rowId:ce,onToggleSelection:A},ce)})})]})}),i.jsx(si,{currentPage:h,totalPages:H.totalPages,totalItems:H.totalItems,startIndex:H.startIndex,endIndex:H.endIndex,onPageChange:oe,onPreviousPage:X,onNextPage:ne,counterText:(Lo=l==null?void 0:l.pagination)==null?void 0:Lo.label})]})}const dP=C.forwardRef(uP),ig=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return i.jsxs("div",{className:R("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||i.jsx(cw,{size:45}),i.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function fP(e){const{triggerElement:t,steps:n}=e,[r,o]=C.useState(!1),[a,s]=C.useState(0),l=()=>{s(d=>d<n.length-1?d+1:d)},c=()=>{s(d=>d>0?d-1:d)};return i.jsxs(po,{open:r,onOpenChange:o,children:[i.jsx(hm,{asChild:!0,children:t}),i.jsxs(Zn,{className:"sm:max-w-[425px]",children:[i.jsxs(ho,{className:R(n[a].title===""&&"sr-only"),children:[i.jsx(go,{children:n[a].title}),i.jsx(vo,{className:"sr-only",children:n[a].title})]}),i.jsx("div",{children:n[a].description}),i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:c,disabled:a===0,children:i.jsx(gr,{className:"h-4 w-4"})}),i.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>i.jsx("div",{className:R("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:l,disabled:a===n.length-1,children:i.jsx(_n,{className:"h-4 w-4"})})]})]})]})}const mP=e=>i.jsx("div",{className:"unreset",dangerouslySetInnerHTML:{__html:e.children}}),pP=e=>{const{execCommand:t}=e,n=()=>{const a=document.createElement("input");a.type="file",a.accept="image/*",a.onchange=async s=>{var c;const l=(c=s.target.files)==null?void 0:c[0];if(l){const d=new FileReader;d.onload=()=>{t("insertImage",d.result)},d.readAsDataURL(l)}},a.click()},r=()=>{const a=prompt("Enter the URL:");a&&t("createLink",a)},o=a=>{t("fontSize",a)};return i.jsxs("div",{className:"flex flex-wrap gap-2 border-b pb-2 mb-2",children:[i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("bold"),type:"button",children:i.jsx(aw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("italic"),type:"button",children:i.jsx(vw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("underline"),type:"button",children:i.jsx(Sw,{size:16})}),i.jsxs(Ka,{onValueChange:a=>o(a),defaultValue:"3",children:[i.jsx(Qr,{className:"w-[100px]",children:i.jsx(qa,{placeholder:"Size"})}),i.jsxs(Zr,{children:[i.jsx(Tt,{value:"1",children:i.jsx("div",{children:"Small"})}),i.jsx(Tt,{value:"3",children:i.jsx("div",{children:"Medium"})}),i.jsx(Tt,{value:"5",children:i.jsx("div",{children:"Large"})}),i.jsx(Tt,{value:"7",children:i.jsx("div",{children:"Extra Large"})})]})]}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertUnorderedList"),type:"button",children:i.jsx(yw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("insertOrderedList"),type:"button",children:i.jsx(ww,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>t("formatBlock","blockquote"),type:"button",children:i.jsx(Cw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:n,type:"button",children:i.jsx(hw,{size:16})}),i.jsx(fe,{variant:"outline",size:"icon",onClick:r,type:"button",children:i.jsx(bw,{size:16})})]})},hP=({initialValue:e="",onChange:t,className:n})=>{const r=C.useRef(null);C.useEffect(()=>{const s=new MutationObserver(()=>{t==null||t(r.current?r.current.innerHTML:"")});r.current&&s.observe(r.current,{childList:!0})},[]),C.useEffect(()=>{r.current&&(r.current.innerHTML=e)},[]);const o=()=>{r.current&&(t==null||t(r.current.innerHTML))},a=(s,l)=>{r.current&&(document.execCommand(s,!1,l),o())};return i.jsxs("div",{className:R("w-full p-4 border rounded-lg shadow-md",n),children:[i.jsx(pP,{execCommand:a}),i.jsx("div",{ref:r,contentEditable:!0,className:"w-full h-48 p-2 border rounded overflow-y-auto focus:outline-none min-h-20 resize-y unreset",onInput:o})]})},gP=e=>{const{observerOptions:t,images:n,classNames:r}=e,[o,a]=C.useState([]),s=C.useRef(null);return C.useEffect(()=>{const l={root:document.querySelector(".image-gallery"),rootMargin:"0px",threshold:1,...t};return s.current=new IntersectionObserver(c=>{c.forEach(d=>{if(d.isIntersecting&&d.target instanceof HTMLDivElement){const f=Number(d.target.dataset.index);a(m=>[...new Set([...m,f])])}})},l),()=>{var c;return(c=s.current)==null?void 0:c.disconnect()}},[]),C.useEffect(()=>{document.querySelectorAll(".image-cell").forEach(c=>{var d;return(d=s.current)==null?void 0:d.observe(c)})},[n]),i.jsx("div",{className:R("image-gallery overflow-auto grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))]","gap-2 justify-center h-full",r==null?void 0:r.imageGallery),children:n.map((l,c)=>i.jsx("div",{"data-index":c,className:R("image-cell w-full h-52",r==null?void 0:r.imageCell),children:o.includes(c)&&i.jsx("img",{src:l,alt:`Gallery Image ${c+1}`,className:R("animate-fade-up animate-duration-[400ms] animate-ease-linear w-full h-full object-cover",r==null?void 0:r.image)})},c))})},vP=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=Uo,mode:a="month"}=e,s=l=>{let c=t,d=n;a==="month"?l==="prev"?c===0?(c=11,d--):c--:c===11?(c=0,d++):c++:d=l==="prev"?d-1:d+1,r(c,d)};return i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("prev"),"aria-label":`Previous ${a}`,children:i.jsx(tw,{className:"!h-8 !w-8"})}),i.jsxs("div",{className:"text-center",children:[i.jsx("h2",{className:"text-2xl font-bold capitalize",children:a==="month"?o.localize.month(t,{width:"wide"}):n}),a==="month"&&i.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>s("next"),"aria-label":`Next ${a}`,children:i.jsx(nw,{className:"!h-8 !w-8"})})]})},lg=({initIndex:e,onPageChange:t,totalItems:n,totalPages:r,pageTotalItems:o,currentPage:a,showItemsCounter:s=!0})=>i.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[s&&i.jsxs("p",{children:[i.jsx("b",{children:e+1})," - ",i.jsx("b",{children:e+o})," (",n,")"]}),r>1&&i.jsx(si,{currentPage:a,onPageChange:t,totalPages:r,totalItems:n,startIndex:e,endIndex:e+o,onPreviousPage:()=>t(a-1),onNextPage:()=>t(a+1)})]}),bP=e=>{const{data:t=[],perPage:n=50,initialPage:r=1,children:o,itemsContainerClass:a="",emptyState:s=i.jsx(ig,{notFoundText:"No item found!"}),isLoading:l=!1,showItemsCounter:c=!0,loadingVariant:d="loader"}=e,[f,m]=C.useState(t);C.useEffect(()=>{m(t),p(1)},[t]);const[h,p]=C.useState(r),v=Math.ceil(f.length/n),g=(h-1)*n,b=h*n,y=f.slice(g,b),w=l?i.jsx("section",{className:"w-full",children:d==="loader"?i.jsx(Xp,{size:"lg"}):i.jsx(Oe,{className:"h-12 w-full",repeat:n})}):f.length===0?s:void 0;return i.jsxs("div",{className:"flex flex-col gap-4 items-end",children:[i.jsx(lg,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:v,currentPage:h,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c}),w?i.jsx("section",{className:"w-full",children:w}):i.jsx("section",{className:`w-full ${a}`,children:y.map((x,S)=>i.jsx(C.Fragment,{children:o(x,S)},x.id))}),i.jsx(lg,{initIndex:g,endIndex:b,totalItems:f.length,totalPages:v,currentPage:h,pageTotalItems:y.length,onPageChange:p,showItemsCounter:c})]})},wP=({fixed:e,isOpen:t,onToggle:n,children:r,className:o})=>{const[a,s]=C.useState(!0),l=C.useRef(null),c=C.useRef(null),d=t!==void 0?t:a,f=()=>{var h;e||(n?n(!1):s(!1),(h=c.current)==null||h.focus())},m=h=>{l.current&&!l.current.contains(h.target)&&!e&&f()};return C.useEffect(()=>{if(!e)return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[e]),i.jsxs(i.Fragment,{children:[i.jsx("aside",{ref:l,className:R("bg-white z-50 h-full shadow-md flex flex-col fixed top-0 left-0 transition-all duration-300 ease-in-out overflow-auto",{"w-72":e||d},{"w-0":!d&&!e},{"translate-x-0":d},{"-translate-x-full":!d&&!e},o),"aria-hidden":!d,children:r}),e&&i.jsx("div",{className:"w-72 relative"})]})},yP=({children:e,className:t})=>i.jsx("header",{className:R("p-4 flex justify-between items-center border-b",t),"aria-label":"Sidebar header",children:e}),xP=({children:e,className:t})=>i.jsx("nav",{"aria-label":"Sidebar navigation",className:t,children:e}),CP=({children:e,className:t})=>i.jsx("ul",{className:R("flex flex-col gap-2 my-4 px-4",t),children:e}),NP=({children:e,className:t,onClick:n})=>i.jsx("li",{className:R("flex items-center gap-2 hover:bg-gray-100 rounded transition-colors",t),onClick:n,children:e}),SP=({children:e,className:t})=>i.jsx("footer",{className:R("mt-auto p-4 text-sm",t),"aria-label":"Sidebar footer",children:e});N.Accordion=A1,N.AccordionContent=Bd,N.AccordionItem=Ld,N.AccordionTrigger=Fd,N.AdaptiveInput=ao,N.Alert=zd,N.AlertDescription=Wd,N.AlertDialog=rN,N.AlertDialogAction=If,N.AlertDialogCancel=Df,N.AlertDialogContent=Mf,N.AlertDialogDescription=Rf,N.AlertDialogFooter=_f,N.AlertDialogHeader=jf,N.AlertDialogOverlay=ps,N.AlertDialogPortal=Tf,N.AlertDialogTitle=Af,N.AlertDialogTrigger=oN,N.AlertTitle=Vd,N.Autocomplete=aN,N.Avatar=qf,N.AvatarFallback=Qf,N.AvatarImage=Xf,N.Badge=on,N.BentoCard=zb,N.BentoGrid=Bb,N.Button=fe,N.Calendar=HN,N.Card=Zf,N.CardContent=nm,N.CardDescription=tm,N.CardFooter=rm,N.CardHeader=Jf,N.CardTitle=em,N.Checkbox=eo,N.Command=bo,N.CommandDialog=gS,N.CommandEmpty=Ps,N.CommandGroup=wo,N.CommandInput=Es,N.CommandItem=wn,N.CommandList=ks,N.CommandSeparator=Ts,N.CommandShortcut=bm,N.CurrencyInput=wm,N.DataTable=dP,N.Dialog=po,N.DialogClose=hS,N.DialogContent=Zn,N.DialogDescription=vo,N.DialogFooter=vm,N.DialogHeader=ho,N.DialogOverlay=Ss,N.DialogPortal=gm,N.DialogProvider=Ik,N.DialogTitle=go,N.DialogTrigger=hm,N.DropdownMenu=wu,N.DropdownMenuCheckboxItem=Ba,N.DropdownMenuContent=Fa,N.DropdownMenuGroup=NC,N.DropdownMenuItem=Nu,N.DropdownMenuLabel=za,N.DropdownMenuPortal=SC,N.DropdownMenuRadioGroup=kC,N.DropdownMenuRadioItem=Su,N.DropdownMenuSeparator=Ur,N.DropdownMenuShortcut=Eu,N.DropdownMenuSub=EC,N.DropdownMenuSubContent=Cu,N.DropdownMenuSubTrigger=xu,N.DropdownMenuTrigger=yu,N.EmptyItems=ig,N.HelpCarousel=fP,N.HtmlTextArea=mP,N.HtmlTextEditor=hP,N.Input=qn,N.Label=Cm,N.LazyImageGallery=gP,N.MonthNavigator=vP,N.MultiSelect=zm,N.NavigationMenu=pp,N.NavigationMenuContent=bp,N.NavigationMenuIndicator=wp,N.NavigationMenuItem=JS,N.NavigationMenuLink=eE,N.NavigationMenuList=hp,N.NavigationMenuTrigger=vp,N.NavigationMenuViewport=Vs,N.PaginatedItems=bP,N.Pagination=yp,N.PaginationContent=xp,N.PaginationControls=si,N.PaginationEllipsis=Ep,N.PaginationItem=Cp,N.PaginationLink=So,N.PaginationNext=Sp,N.PaginationPrevious=Np,N.PasswordInput=lE,N.Popover=Dm,N.PopoverAnchor=AS,N.PopoverContent=js,N.PopoverTrigger=Om,N.Progress=Gs,N.RadioGroup=Yp,N.RadioGroupItem=Kp,N.Select=Ka,N.SelectContent=Zr,N.SelectGroup=t1,N.SelectItem=Tt,N.SelectLabel=dd,N.SelectScrollDownButton=Qa,N.SelectScrollUpButton=Xa,N.SelectSeparator=fd,N.SelectTrigger=Qr,N.SelectValue=qa,N.Separator=xo,N.Sidebar=wP,N.SidebarFooter=SP,N.SidebarHeader=yP,N.SidebarList=CP,N.SidebarListItem=NP,N.SidebarNav=xP,N.Skeleton=Oe,N.Spinner=Xp,N.Switch=rh,N.Table=mr,N.TableBody=hr,N.TableCaption=il,N.TableCell=nn,N.TableFooter=sl,N.TableHead=Mn,N.TableHeader=pr,N.TableRow=tn,N.Tabs=ME,N.TabsContent=wh,N.TabsList=vh,N.TabsTrigger=bh,N.Textarea=yh,N.Toaster=ok,N.Toggle=Eh,N.ToggleGroup=Oh,N.ToggleGroupItem=$h,N.Tooltip=jk,N.TooltipContent=Yh,N.TooltipProvider=Mk,N.TooltipTrigger=_k,N.badgeVariants=pl,N.buttonVariants=fr,N.capitalize=Fb,N.cn=R,N.containSearchStrings=Ji,N.formatCurrency=yb,N.formatDateAndMonth=Mb,N.formatDateAndTime=Sb,N.formatDateAndWeekday=Pb,N.formatDateAndWeekdayAndYear=Tb,N.formatDateDayMonth=Nb,N.formatDateMonthYear=Cb,N.formatDateUTC=xb,N.formatLongDate=jb,N.formatShortDate=_b,N.formatWeekDayAndShortDate=Rb,N.getLongDate=kb,N.getMonthName=Eb,N.getMonthYearFromISODate=Ab,N.mergeObjects=ea,N.navigationMenuTriggerStyle=gp,N.normalizeString=Re,N.normalizeStringToCompare=ta,N.padString=Jo,N.replaceTemplateWithVariables=el,N.sortByField=Ob,N.sortByFieldDesc=$b,N.sortByName=Db,N.sortByNestedField=Lb,N.sortNormalize=Ib,N.spinnerColors=wE,N.spinnerSizes=yE,N.toast=rk,N.toggleVariants=Xs,N.useArray=Ak,N.useCopyToClipboard=Rk,N.useDebounce=Kh,N.useDialog=Dk,N.useDisclosure=Ok,N.useDisclosureBool=$k,N.useFileUtilities=oP,N.useIsMobile=lP,N.useKeyPress=aP,N.useLocalStorage=sP,N.useMediaQuery=iP,N.usePWAInstall=cP,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|