UNPKG

@figr-design/identity-code-lib

Version:

This repo contains code for components exported from Figrs design system generator (Identity).

20 lines 744 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("@radix-ui/react-accordion"),o=require("@radix-ui/react-dialog"),i=require("@radix-ui/react-tooltip"),a=require("@radix-ui/react-popover"),s=require("vaul");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=c(t),d=l(t),f=c(n),g=l(n),p=c(r),h=c(o),m=c(i),b=c(a),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)};function w(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function y(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function x(){return x=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},x.apply(this,arguments)}function C(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function I(...e){return t.useCallback(C(...e),e)}"function"==typeof SuppressedError&&SuppressedError;const S=t.forwardRef(((e,n)=>{const{children:r,...o}=e,i=t.Children.toArray(r),a=i.find(k);if(a){const e=a.props.children,r=i.map((n=>n===a?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n));return t.createElement(E,x({},o,{ref:n}),t.isValidElement(e)?t.cloneElement(e,void 0,r):null)}return t.createElement(E,x({},o,{ref:n}),r)}));S.displayName="Slot";const E=t.forwardRef(((e,n)=>{const{children:r,...o}=e;return t.isValidElement(r)?t.cloneElement(r,{...R(o,r.props),ref:n?C(n,r.ref):r.ref}):t.Children.count(r)>1?t.Children.only(null):null}));E.displayName="SlotClone";const N=({children:e})=>t.createElement(t.Fragment,null,e);function k(e){return t.isValidElement(e)&&e.type===N}function R(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function _(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const M=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,A=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=_(e))&&(r&&(r+=" "),r+=t);return r},P=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return A(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=M(t)||M(r);return o[e][a]})),s=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n}))?[...e,n,r]:e}),[]);return A(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};function T(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=T(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const D="-";function O(e){const t=function(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]},o=function(e,t){if(!t)return e;return e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))]))}(Object.entries(e.classGroups),n);return o.forEach((([e,n])=>{V(n,r,e,t)})),r}(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:function(e){const n=e.split(D);return""===n[0]&&1!==n.length&&n.shift(),L(n,t)||function(e){if(F.test(e)){const t=F.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}}function L(e,t){if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?L(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join(D);return t.validators.find((({validator:e})=>e(i)))?.classGroupId}const F=/^\[(.+)\]$/;function V(e,t,n,r){e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void V(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{V(o,j(t,e),n,r)}))}else{(""===e?t:j(t,e)).classGroupId=n}}))}function j(e,t){let n=e;return t.split(D).forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n}function G(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}}const B="!";function W(e){const t=e.separator,n=1===t.length,r=t[0],o=t.length;return function(e){const i=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===r&&(n||e.slice(c,c+o)===t)){i.push(e.slice(l,c)),l=c+o;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===i.length?e:e.substring(l),u=c.startsWith(B);return{modifiers:i,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}}}const H=/\s+/;function z(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=X(e))&&(r&&(r+=" "),r+=t);return r}function X(e){if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=X(e[r]))&&(n&&(n+=" "),n+=t);return n}function Z(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=function(e){return{cache:G(e.cacheSize),splitModifiers:W(e),...O(e)}}(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=function(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(H).map((e=>{const{modifiers:t,hasImportantModifier:o,baseClassName:i,maybePostfixModifierPosition:a}=n(e);let s=r(a?i.substring(0,a):i),l=Boolean(a);if(!s){if(!a)return{isTailwindClass:!1,originalClassName:e};if(s=r(i),!s)return{isTailwindClass:!1,originalClassName:e};l=!1}const c=function(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t}(t).join(":");return{isTailwindClass:!0,modifierId:o?c+B:c,classGroupId:s,originalClassName:e,hasPostfixModifier:l}})).reverse().filter((e=>{if(!e.isTailwindClass)return!0;const{modifierId:t,classGroupId:n,hasPostfixModifier:r}=e,a=t+n;return!i.has(a)&&(i.add(a),o(n,r).forEach((e=>i.add(t+e))),!0)})).reverse().map((e=>e.originalClassName)).join(" ")}(e,n);return o(e,i),i}return function(){return i(z.apply(null,arguments))}}function Y(e){const t=t=>t[e]||[];return t.isThemeGetter=!0,t}const J=/^\[(?:([a-z-]+):)?(.+)\]$/i,U=/^\d+\/\d+$/,$=new Set(["px","full","screen"]),Q=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,q=/\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$/,K=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,te=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function ne(e){return oe(e)||$.has(e)||U.test(e)}function re(e){return be(e,"length",ve)}function oe(e){return Boolean(e)&&!Number.isNaN(Number(e))}function ie(e){return be(e,"number",oe)}function ae(e){return Boolean(e)&&Number.isInteger(Number(e))}function se(e){return e.endsWith("%")&&oe(e.slice(0,-1))}function le(e){return J.test(e)}function ce(e){return Q.test(e)}const ue=new Set(["length","size","percentage"]);function de(e){return be(e,ue,we)}function fe(e){return be(e,"position",we)}const ge=new Set(["image","url"]);function pe(e){return be(e,ge,xe)}function he(e){return be(e,"",ye)}function me(){return!0}function be(e,t,n){const r=J.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))}function ve(e){return q.test(e)&&!K.test(e)}function we(){return!1}function ye(e){return ee.test(e)}function xe(e){return te.test(e)}function Ce(){const e=Y("colors"),t=Y("spacing"),n=Y("blur"),r=Y("brightness"),o=Y("borderColor"),i=Y("borderRadius"),a=Y("borderSpacing"),s=Y("borderWidth"),l=Y("contrast"),c=Y("grayscale"),u=Y("hueRotate"),d=Y("invert"),f=Y("gap"),g=Y("gradientColorStops"),p=Y("gradientColorStopPositions"),h=Y("inset"),m=Y("margin"),b=Y("opacity"),v=Y("padding"),w=Y("saturate"),y=Y("scale"),x=Y("sepia"),C=Y("skew"),I=Y("space"),S=Y("translate"),E=()=>["auto",le,t],N=()=>[le,t],k=()=>["",ne,re],R=()=>["auto",oe,le],_=()=>["","0",le],M=()=>[oe,ie],A=()=>[oe,le];return{cacheSize:500,separator:":",theme:{colors:[me],spacing:[ne,re],blur:["none","",ce,le],brightness:M(),borderColor:[e],borderRadius:["none","","full",ce,le],borderSpacing:N(),borderWidth:k(),contrast:M(),grayscale:_(),hueRotate:A(),invert:_(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[se,re],inset:E(),margin:E(),opacity:M(),padding:N(),saturate:M(),scale:M(),sepia:_(),skew:A(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[ce]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",le]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ae,le]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",ae,le]}],"grid-cols":[{"grid-cols":[me]}],"col-start-end":[{col:["auto",{span:["full",ae,le]},le]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[me]}],"row-start-end":[{row:["auto",{span:[ae,le]},le]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[ce]},ce]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ce,re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ie]}],"font-family":[{font:[me]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",oe,ie]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ne,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ne,re]}],"underline-offset":[{"underline-offset":["auto",ne,le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",fe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",de]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[ne,le]}],"outline-w":[{outline:[ne,re]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ne,re]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ce,he]}],"shadow-color":[{shadow:[me]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ce,le]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[ae,le]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ne,re,ie]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Ie=Z(Ce);function Se(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ie(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=T(e))&&(r&&(r+=" "),r+=t);return r}(e))}var Ee=P("tw-figr-font-secondary tw-figr-inline-flex tw-figr-cursor-pointer tw-figr-items-center tw-figr-justify-center tw-figr-whitespace-nowrap tw-figr-transition-colors disabled:tw-figr-cursor-not-allowed disabled:tw-figr-opacity-50",{variants:{variant:{primary:"tw-figr-rounded-m hover:tw-figr-bg-primary-600 tw-figr-bg-primary tw-figr-text-base-white",destructive:"tw-figr-rounded-m tw-figr-bg-error-100 hover:tw-figr-bg-error-200 tw-figr-text-base-white",secondary:"tw-figr-rounded-m tw-figr-bg-secondary tw-figr-text-base-black hover:tw-figr-bg-secondary-700",outline:"tw-figr-rounded-m tw-figr-border tw-figr-border-neutral-200 tw-figr-bg-base-white tw-figr-text-base-black hover:tw-figr-bg-neutral-100",ghost:"tw-figr-rounded-m tw-figr-text-base-black hover:tw-figr-bg-neutral-100",link:"tw-figr-rounded-m tw-figr-text-base-black hover:tw-figr-text-primary hover:tw-figr-underline","primary-with-icon":"tw-figr-rounded-m tw-figr-gap-s tw-figr-bg-primary tw-figr-text-base-white hover:tw-figr-bg-primary-600","outline-with-icon":"tw-figr-rounded-m tw-figr-gap-s tw-figr-border tw-figr-border-neutral-200 tw-figr-bg-base-white tw-figr-text-base-black hover:tw-figr-bg-neutral-100",icon:"tw-figr-rounded-m tw-figr-gap-s tw-figr-border tw-figr-border-neutral-200 tw-figr-bg-base-white tw-figr-text-base-black hover:tw-figr-bg-neutral-100","icon-rounded":"tw-figr-gap-s tw-figr-rounded-full tw-figr-border tw-figr-border-neutral-200 tw-figr-bg-base-white tw-figr-text-base-black hover:tw-figr-bg-neutral-100",loading:"tw-figr-rounded-m tw-figr-cursor-not-allowed tw-figr-gap-s tw-figr-bg-primary tw-figr-text-base-white tw-figr-opacity-50"},size:{none:"",sm:"tw-figr-py-xs tw-figr-px-m",md:"tw-figr-py-s tw-figr-px-sm",lg:"tw-figr-py-sm tw-figr-px-l",icon:"tw-figr-p-sm"}},defaultVariants:{variant:"primary",size:"md"}}),Ne=u.forwardRef((function(t,n){var r=t.className,o=t.variant,i=t.size,a=t.asChild,s=void 0!==a&&a,l=w(t,["className","variant","size","asChild"]),c=s?S:"button";return e.jsx(c,v({className:Se(Ee({variant:o,size:i,className:r})),ref:n},l))}));Ne.displayName="Button";var ke=u.forwardRef((function(t,n){var r=t.className,o=t.type,i=w(t,["className","type"]);return e.jsx("input",v({type:o,className:Se("tw-figr-ring-offset-background focus-visible:tw-figr-ring-2 focus-visible:tw-figr-ring-primary focus-visible:tw-figr-ring-offset-2 focus-visible:tw-figr-ring-offset-primary tw-figr-border-neutral-200 file:tw-figr-border-0 tw-figr-bg-base-white file:tw-figr-bg-transparent tw-figr-text-desktop-caption-regular tw-figr-text-base-black file:tw-figr-text-desktop-caption-regular placeholder:tw-figr-text-neutral-700 tw-figr-h-10 tw-figr-w-full tw-figr-rounded-m tw-figr-border focus-visible:tw-figr-outline-none disabled:tw-figr-cursor-not-allowed disabled:tw-figr-opacity-50 tw-figr-flex tw-figr-px-3 tw-figr-py-2 file:tw-figr-font-medium",r),ref:n},i))}));function Re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function _e(e,n=[]){let r=[];const o=()=>{const n=r.map((e=>t.createContext(e)));return function(r){const o=(null==r?void 0:r[e])||n;return t.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(n,o){const i=t.createContext(o),a=r.length;function s(n){const{scope:r,children:o,...s}=n,l=(null==r?void 0:r[e][a])||i,c=t.useMemo((()=>s),Object.values(s));return t.createElement(l.Provider,{value:c},o)}return r=[...r,o],s.displayName=n+"Provider",[s,function(r,s){const l=(null==s?void 0:s[e][a])||i,c=t.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Me(o,...n)]}function Me(...e){const n=e[0];if(1===e.length)return n;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return t.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}function Ae(e){const n=t.useRef(e);return t.useEffect((()=>{n.current=e})),t.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function Pe({prop:e,defaultProp:n,onChange:r=(()=>{})}){const[o,i]=function({defaultProp:e,onChange:n}){const r=t.useState(e),[o]=r,i=t.useRef(o),a=Ae(n);return t.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==e,s=a?e:o,l=Ae(r);return[s,t.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else i(t)}),[a,e,i,l])]}function Te(e){const n=t.useRef({value:e,previous:e});return t.useMemo((()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous)),[e])}ke.displayName="Input";const De=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?t.useLayoutEffect:()=>{};function Oe(e){const[n,r]=t.useState(void 0);return De((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),n}const Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=t.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?S:n;return t.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),t.createElement(a,x({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...e,[n]:r}}),{});function Fe(e,t){e&&n.flushSync((()=>e.dispatchEvent(t)))}const Ve="Switch",[je,Ge]=_e(Ve),[Be,We]=je(Ve),He=t.forwardRef(((e,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,g]=t.useState(null),p=I(n,(e=>g(e))),h=t.useRef(!1),m=!f||Boolean(f.closest("form")),[b=!1,v]=Pe({prop:i,defaultProp:a,onChange:u});return t.createElement(Be,{scope:r,checked:b,disabled:l},t.createElement(Le.button,x({type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":Xe(b),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:p,onClick:Re(e.onClick,(e=>{v((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&t.createElement(ze,{control:f,bubbles:!h.current,name:o,value:c,checked:b,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),ze=e=>{const{control:n,checked:r,bubbles:o=!0,...i}=e,a=t.useRef(null),s=Te(r),l=Oe(n);return t.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[s,r,o]),t.createElement("input",x({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Xe(e){return e?"checked":"unchecked"}const Ze=He,Ye=t.forwardRef(((e,n)=>{const{__scopeSwitch:r,...o}=e,i=We("SwitchThumb",r);return t.createElement(Le.span,x({"data-state":Xe(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:n}))}));var Je=u.forwardRef((function(t,n){var r=t.className,o=w(t,["className"]);return e.jsx(Ze,v({className:Se("focus-visible:tw-figr-ring-ring focus-visible:tw-figr-ring-2 focus-visible:tw-figr-ring-offset-2 focus-visible:tw-figr-ring-offset-background tw-figr-border-2 tw-figr-border-transparent data-[state=checked]:tw-figr-bg-primary data-[state=unchecked]:tw-figr-bg-neutral-200 tw-figr-h-6 tw-figr-w-11 tw-figr-shrink-0 tw-figr-rounded-full focus-visible:tw-figr-outline-none disabled:tw-figr-cursor-not-allowed disabled:tw-figr-opacity-50 tw-figr-inline-flex tw-figr-cursor-pointer tw-figr-items-center tw-figr-transition-colors peer",r)},o,{ref:n,children:e.jsx(Ye,{className:Se("tw-figr-ring-0 tw-figr-bg-base-white tw-figr-h-5 tw-figr-w-5 tw-figr-rounded-full tw-figr-shadow-lg tw-figr-pointer-events-none tw-figr-block tw-figr-transition-transform data-[state=checked]:tw-figr-translate-x-5 data-[state=unchecked]:tw-figr-translate-x-0")})}))}));Je.displayName=Ze.displayName;const Ue=e=>{const{present:r,children:o}=e,i=function(e){const[r,o]=t.useState(),i=t.useRef({}),a=t.useRef(e),s=t.useRef("none"),l=e?"mounted":"unmounted",[c,u]=function(e,n){return t.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return t.useEffect((()=>{const e=$e(i.current);s.current="mounted"===c?e:"none"}),[c]),De((()=>{const t=i.current,n=a.current;if(n!==e){const r=s.current,o=$e(t);if(e)u("MOUNT");else if("none"===o||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{u(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,u]),De((()=>{if(r){const e=e=>{const t=$e(i.current).includes(e.animationName);e.target===r&&t&&n.flushSync((()=>u("ANIMATION_END")))},t=e=>{e.target===r&&(s.current=$e(i.current))};return r.addEventListener("animationstart",t),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",t),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:t.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),a="function"==typeof o?o({present:i.isPresent}):t.Children.only(o),s=I(i.ref,a.ref);return"function"==typeof o||i.isPresent?t.cloneElement(a,{ref:s}):null};function $e(e){return(null==e?void 0:e.animationName)||"none"}Ue.displayName="Presence";const Qe="Checkbox",[qe,Ke]=_e(Qe),[et,tt]=qe(Qe),nt=t.forwardRef(((e,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,g]=t.useState(null),p=I(n,(e=>g(e))),h=t.useRef(!1),m=!f||Boolean(f.closest("form")),[b=!1,v]=Pe({prop:i,defaultProp:a,onChange:u}),w=t.useRef(b);return t.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>v(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,v]),t.createElement(et,{scope:r,state:b,disabled:l},t.createElement(Le.button,x({type:"button",role:"checkbox","aria-checked":ot(b)?"mixed":b,"aria-required":s,"data-state":it(b),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:p,onKeyDown:Re(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Re(e.onClick,(e=>{v((e=>!!ot(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&t.createElement(rt,{control:f,bubbles:!h.current,name:o,value:c,checked:b,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),rt=e=>{const{control:n,checked:r,bubbles:o=!0,...i}=e,a=t.useRef(null),s=Te(r),l=Oe(n);return t.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=ot(r),n.call(e,!ot(r)&&r),e.dispatchEvent(t)}}),[s,r,o]),t.createElement("input",x({type:"checkbox","aria-hidden":!0,defaultChecked:!ot(r)&&r},i,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ot(e){return"indeterminate"===e}function it(e){return ot(e)?"indeterminate":e?"checked":"unchecked"}const at=nt,st=t.forwardRef(((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,a=tt("CheckboxIndicator",r);return t.createElement(Ue,{present:o||ot(a.state)||!0===a.state},t.createElement(Le.span,x({"data-state":it(a.state),"data-disabled":a.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...e.style}})))})); /** * @license lucide-react v0.372.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var lt={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"}; /** * @license lucide-react v0.372.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ct=(e,n)=>{const r=t.forwardRef((({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:l,...c},u)=>{return t.createElement("svg",{ref:u,...lt,width:o,height:o,stroke:r,strokeWidth:a?24*Number(i)/Number(o):i,className:["lucide",`lucide-${d=e,d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,s].join(" "),...c},[...n.map((([e,n])=>t.createElement(e,n))),...Array.isArray(l)?l:[l]]);var d; /** * @license lucide-react v0.372.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */}));return r.displayName=`${e}`,r},ut=ct("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),dt=ct("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),ft=ct("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),gt=ct("ArrowUpDown",[["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"}]]),pt=ct("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),ht=ct("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),mt=ct("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),bt=ct("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),vt=ct("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),wt=ct("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),yt=ct("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),xt=ct("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),Ct=ct("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),It=ct("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),St=ct("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]),Et=ct("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"}]]),Nt=ct("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),kt=ct("PanelRightClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]),Rt=ct("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var _t=u.forwardRef((function(t,n){var r=t.className,o=w(t,["className"]);return e.jsx(at,v({ref:n,className:Se("focus-visible:tw-figr-ring-ring tw-figr-border-custom-primary data-[state=checked]:tw-figr-bg-custom-primary data-[state=checked]:tw-figr-text-custom-base-white focus-visible:tw-figr-ring-1 tw-figr-border-primary data-[state=checked]:tw-figr-bg-primary data-[state=checked]:tw-figr-text-base-white tw-figr-h-4 tw-figr-w-4 tw-figr-shrink-0 tw-figr-rounded-full tw-figr-border tw-figr-shadow focus-visible:tw-figr-outline-none disabled:tw-figr-cursor-not-allowed disabled:tw-figr-opacity-50 peer",r)},o,{children:e.jsx(st,{className:Se("tw-figr-text-current tw-figr-flex items-center justify-center"),children:e.jsx(mt,{className:"tw-figr-h-4 tw-figr-w-4"})})}))}));function Mt(e){const t=e+"CollectionProvider",[n,r]=_e(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",l="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=d.default.useRef(null),i=d.default.useRef(new Map).current;return d.default.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:d.default.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=I(t,i(a,n).collectionRef);return d.default.createElement(S,{ref:o},r)})),ItemSlot:d.default.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=d.default.useRef(null),c=I(t,a),u=i(s,n);return d.default.useEffect((()=>(u.itemMap.set(a,{ref:a,...o}),()=>{u.itemMap.delete(a)}))),d.default.createElement(S,{[l]:"",ref:c},r)}))},function(t){const n=i(e+"CollectionConsumer",t);return d.default.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${l}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}_t.displayName=at.displayName;const At=u["useId".toString()]||(()=>{});let Pt=0;function Tt(e){const[t,n]=u.useState(At());return De((()=>{e||n((e=>null!=e?e:String(Pt++)))}),[e]),e||(t?`radix-${t}`:"")}const Dt=t.createContext(void 0);function Ot(e){const n=t.useContext(Dt);return e||n||"ltr"}const Lt="rovingFocusGroup.onEntryFocus",Ft={bubbles:!1,cancelable:!0},Vt="RovingFocusGroup",[jt,Gt,Bt]=Mt(Vt),[Wt,Ht]=_e(Vt,[Bt]),[zt,Xt]=Wt(Vt),Zt=t.forwardRef(((e,n)=>t.createElement(jt.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(jt.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(Yt,x({},e,{ref:n})))))),Yt=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=t.useRef(null),g=I(n,f),p=Ot(a),[h=null,m]=Pe({prop:s,defaultProp:l,onChange:c}),[b,v]=t.useState(!1),w=Ae(u),y=Gt(r),C=t.useRef(!1),[S,E]=t.useState(0);return t.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(Lt,w),()=>e.removeEventListener(Lt,w)}),[w]),t.createElement(zt,{scope:r,orientation:o,dir:p,loop:i,currentTabStopId:h,onItemFocus:t.useCallback((e=>m(e)),[m]),onItemShiftTab:t.useCallback((()=>v(!0)),[]),onFocusableItemAdd:t.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>E((e=>e-1))),[])},t.createElement(Le.div,x({tabIndex:b||0===S?-1:0,"data-orientation":o},d,{ref:g,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,(()=>{C.current=!0})),onFocus:Re(e.onFocus,(e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(Lt,Ft);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=y().filter((e=>e.focusable));$t([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}C.current=!1})),onBlur:Re(e.onBlur,(()=>v(!1)))})))})),Jt=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=e,l=Tt(),c=a||l,u=Xt("RovingFocusGroupItem",r),d=u.currentTabStopId===c,f=Gt(r),{onFocusableItemAdd:g,onFocusableItemRemove:p}=u;return t.useEffect((()=>{if(o)return g(),()=>p()}),[o,g,p]),t.createElement(jt.ItemSlot,{scope:r,id:c,focusable:o,active:i},t.createElement(Le.span,x({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:Re(e.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:Re(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Re(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Ut[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>$t(o)))}var n,r}))})))})),Ut={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $t(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const Qt=Zt,qt=Jt,Kt="Radio",[en,tn]=_e(Kt),[nn,rn]=en(Kt),on=t.forwardRef(((e,n)=>{const{__scopeRadio:r,name:o,checked:i=!1,required:a,disabled:s,value:l="on",onCheck:c,...u}=e,[d,f]=t.useState(null),g=I(n,(e=>f(e))),p=t.useRef(!1),h=!d||Boolean(d.closest("form"));return t.createElement(nn,{scope:r,checked:i,disabled:s},t.createElement(Le.button,x({type:"button",role:"radio","aria-checked":i,"data-state":ln(i),"data-disabled":s?"":void 0,disabled:s,value:l},u,{ref:g,onClick:Re(e.onClick,(e=>{i||null==c||c(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&t.createElement(sn,{control:d,bubbles:!p.current,name:o,value:l,checked:i,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),an=t.forwardRef(((e,n)=>{const{__scopeRadio:r,forceMount:o,...i}=e,a=rn("RadioIndicator",r);return t.createElement(Ue,{present:o||a.checked},t.createElement(Le.span,x({"data-state":ln(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:n})))})),sn=e=>{const{control:n,checked:r,bubbles:o=!0,...i}=e,a=t.useRef(null),s=Te(r),l=Oe(n);return t.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[s,r,o]),t.createElement("input",x({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ln(e){return e?"checked":"unchecked"}const cn=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],un="RadioGroup",[dn,fn]=_e(un,[Ht,tn]),gn=Ht(),pn=tn(),[hn,mn]=dn(un),bn=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:r,name:o,defaultValue:i,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...g}=e,p=gn(r),h=Ot(u),[m,b]=Pe({prop:a,defaultProp:i,onChange:f});return t.createElement(hn,{scope:r,name:o,required:s,disabled:l,value:m,onValueChange:b},t.createElement(Qt,x({asChild:!0},p,{orientation:c,dir:h,loop:d}),t.createElement(Le.div,x({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h},g,{ref:n}))))})),vn=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:r,disabled:o,...i}=e,a=mn("RadioGroupItem",r),s=a.disabled||o,l=gn(r),c=pn(r),u=t.useRef(null),d=I(n,u),f=a.value===i.value,g=t.useRef(!1);return t.useEffect((()=>{const e=e=>{cn.includes(e.key)&&(g.current=!0)},t=()=>g.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),t.createElement(qt,x({asChild:!0},l,{focusable:!s,active:f}),t.createElement(on,x({disabled:s,required:a.required,checked:f},c,i,{name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:Re((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Re(i.onFocus,(()=>{var e;g.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),wn=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:r,...o}=e,i=pn(r);return t.createElement(an,x({},i,o,{ref:n}))}));var yn=u.forwardRef((function(t,n){var r=t.className,o=w(t,["className"]);return e.jsx(bn,v({className:Se("tw-figr-grid tw-figr-gap-2 tw-figr-font-secondary tw-figr-text-desktop-caption-accent ",r)},o,{ref:n}))}));yn.displayName=bn.displayName;var xn=u.forwardRef((function(t,n){var r=t.className,o=w(t,["className"]);return e.jsx(vn,v({ref:n,className:Se("tw-figr-ring-offset-background focus-visible:tw-figr-ring-2 focus-visible:tw-figr-ring-ring focus-visible:tw-figr-ring-offset-2 tw-figr-border-primary tw-figr-text-primary tw-figr-h-4 tw-figr-w-4 tw-figr-rounded-full focus:tw-figr-outline-none disabled:tw-figr-cursor-not-allowed disabled:tw-figr-opacity-50 tw-figr-aspect-square tw-figr-border",r)},o,{children:e.jsx(wn,{className:"tw-figr-flex tw-figr-items-center tw-figr-justify-center",children:e.jsx(It,{className:"tw-figr-text-current tw-figr-h-2.5 tw-figr-w-2.5 tw-figr-fill-current"})})}))}));xn.displayName=vn.displayName;const Cn=t.forwardRef(((e,n)=>t.createElement(Le.label,x({},e,{ref:n,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}}))));var In=P("tw-figr-text-desktop-caption-accent peer-disabled:tw-figr-cursor-not-allowed peer-disabled:tw-figr-op